Open nakengelhardt opened 6 months ago
It seems the SV standard is not particularly clear on whether this is allowed. I can't find any place that explicitly allows or forbids it, but given that in other instances (variables and type definitions) the standard explicitly requires the declaration to precede a reference, it would be reasonable to infer that the absence of such a requirement for parameters means that it is allowed.
Not 100% sure what the standard has to say about using a localparam defined inside a module in its port definitions, but given that these two examples work:
I think this should also work (and verific accept it too):
However with
read_verilog
the combination of using the parameter straight (not in an expression) and defining its value with a function call leads to an error: