vikasvij1982
Newbie level 5
Hi,
I wanted to code a generalized module for a project in which based on the parameters the number of inputs can vary. I know how to have different bit widths based on parameters, but not number of inputs.
As an example, if i want to have a module M1 which can have only in1 as input or it can also have in2, or in3 as inputs and this input selection is done by parameter.
Can i do something like that?? Or is there any way i can do overloading of the module name in Verilog??
Thanks for any help you can provide
Vikas
I wanted to code a generalized module for a project in which based on the parameters the number of inputs can vary. I know how to have different bit widths based on parameters, but not number of inputs.
As an example, if i want to have a module M1 which can have only in1 as input or it can also have in2, or in3 as inputs and this input selection is done by parameter.
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 module #(parameter in2_select = 0, parameter in3_select = 0) M1 ( if(in2_select) input in2, if(in3_select) input in3, input in1, output out );
Can i do something like that?? Or is there any way i can do overloading of the module name in Verilog??
Thanks for any help you can provide
Vikas
Last edited by a moderator: