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.

Problem with a constant parameter in Verilog code

Status
Not open for further replies.

Monkey

Newbie level 6
Joined
Apr 26, 2004
Messages
13
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
118
Parameter in Verilog

I'm refine a design to be parameterized.
The code is now:
module #(w1, w2, w3, w4, w5, w6) all_mux
mux #(w1) mux_inst_1;
mux #(w2) mux_inst_2;
...

The goal to use generate. Replace w with w1, w2, ... w6. Something like:

module #(w1, w2, w3, w4, w5, w6) all_mux
genvar i
generate for (i=1; i< 7; i=i+1) mux #(w) mux_inst;
endgenerate;

The problem is w needs to be constant. While, I didn't figure out a way to make it happen.
Any ideas?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top