I have a module that is passed a parameter
then instantiates another module corresponding to the defined parameter.
However, in the event that a case isn't defined for a certain combination of parameters, I would like an error to be thrown at compile time to highlight the problem, like so:
generate
if (PARAM1 == 1 && PARAM2 == 2) begin
// instantiate module logic_A
end else if (PARAM1 == 2 && PARAM2 == 1) begin
// instantiate module logic_B
end else begin
// throw an error at compile time if we haven't
// defined a case for those parameters
end
endgenerate
However, this code still needs to be synthesizable (in Verilog, not SystemVerilog) and pass LINTing, despite the inserted error.
Does anyone know what I could use in this situation? Thank you in advance.