My question may be rudamental, I am not sure if an input signal could be used as a parameter in verilog.
My question is based on a need to select one of two instances that are available based on input signal. This signal would be static post sysnthesis.
module DUT (signal1 ....)
input signal1; // this signal to be used as parameter
`ifdef signal1
X U1
`else
Y U1
`endif
endmodule
Here X and Y are two different modules. Alternate suggestions are also available to implement the same.
regards
Further Explaination:
I want only one of the two blocks of hardware after synthesis. I want a syntax that could allow the hardware configuration controlledby a signal, which is going to have a static value. Signal1 would be connected to either 0 or 1 in some other part of the design. I know this seems to be an incorrect method of doing things but it is a multi-module design and I have no control over the other block.