-1

There is an expression in my code, as in the code below. I am writing this code in Modelsim and this is a Verilog module. The compiler is giving warning, as in title. I have already searched that on internet but couldn't find any reference to that. Please note that when I remove the keyword 'parameter' this warning goes away. I must keep the keyword parameter, as I want to keep this as constant.

parameter reg  [4:0]REG_MIN = 5'b00000;   // Address of Minimum register <br/>
parameter reg  [4:0]REG_MAX = 5'b10110;  // Address of Maximum register 
Unn
  • 4,775
  • 18
  • 30
TRoa
  • 344
  • 5
  • 15

1 Answers1

3

Verilog does not allow specification of data types of parameters, but SystemVerilog does. Make sure your file has a *.sv file extension. Otherwise, parameters assume the type from the RHS.

dave_59
  • 39,096
  • 3
  • 24
  • 63