how to interpret stated verilog parameter definition

Status
Not open for further replies.

neetin1984

Newbie level 1
Joined
Aug 7, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
7
hi

I was going through a verilog rtl and it have parameter definition in following ways

parameter [NUM_CLK_DOMAIN-1:0] VALID_CLK_DOMAIN = {NUM_CLK_DOMAIN{1'b1}};

localparam [NUM_CLK_DOMAIN_EXPANDED-1:0] VALID_CLK_DOMAIN_EXPANDED = {8{VALID_CLK_DOMAIN}};


someone let me know how to interpret above.
 

Hi,
[NUM_CLK_DOMAIN-1:0] this is range definition.
Previously defined parameter NUM_CLK_DOMAIN equals to width of VALID_CLK_DOMAIN parameter. If range is not defined, it would be 32 bits.
{NUM_CLK_DOMAIN{1'b1}} here replication of concatenation is used.
Let's say NUM_CLK_DOMAIN is 8, then VALID_CLK_DOMAIN parameter will be 8 bits wide, and will get value 8'b1111_1111.

localparam are parameters that cannot be overriden at instantiation or by defparam.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…