Bus index reversal when SystemVerilog module instantiates a BDF in Quartus Prime Pro 21.2
I have a legacy BDF that I need to use in a current design. Using Quartus Prime Pro v20.4 or v21.2, I see the bus indexes reversed on the port connections when the BDF diagram is instantiated from within a SystemVerilog module. This same practice in Quartus II worked without the unexpected index reversal.
Here's a toy example that illustrates the problem. I've attached the full project below.
BDF:
Top-level:
module top ( input logic clk, input logic [3:0] x, output logic [7:0] y ); bdftest bdf_i ( .clk(clk), .x_in({x, 4'b0}), // Indexes [3:0] should be 0 .y_out(y) ); endmodule
The RTL netlist viewer shows:
Looking at the properties for bdf_i:
The connections are reversed! This worked as expected in Quartus II v9.1. While not a big issue in this toy example, it is a problem for my module when MSBs and LSBs are reversed.
Any ideas how to fix this behavior rather than manually bit reversing all the inputs and outputs?
Thanks,
Paul
Yeah, I'd just convert to HDL and use that if you have more complex designs causing this issue. Just save yourself the time and effort trying to fix the schematics.