Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top