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.

cant understand this verilog code

Status
Not open for further replies.
i have 1 module named A and 2 files with .v extension,named B and C.The point that should be considered is that B and C do not have any module-like definition,they just hold parameter values
//-----------------------------
`include "B.v"
`include "C.v"
module A (...);

endmodule
//-----------------------------

//------- B.v------------------
`ifndef _B_V_
`define _B_V_ 1

`define lgd 13
//-----------------------------

//------------ C.v-------------
parameters cop2 = 6'b010111;
.
.
.
//-----------------------------

I set A as my top-level ,and added files B and C to workspace, after compiling the outcome was depressing, it hadn't got parameters from these included files...what should i do to make it run?!!!!
 

Unlike defines, parameters are local to a module. That means, all parameters defined in module c.v will be ignored in your example, because the include statement is placed outside the module scope.
 

also had done it,but didn't work
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top