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 get pin width from other module in verilog verify?

Status
Not open for further replies.

sidneyluo

Newbie level 4
Joined
May 6, 2010
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
china
Activity points
1,329
i'm developing a function coverage for an exist design module module_m. some input of module_m is defined by parameters. my function coverage should also use the parameters to define the input port. so, the problem is: how can i get the right value from the design file and pass it to my m_fcoverage.sv file?
the limit is i can't modify the rtl design file. i can only new a m_fcoverage.sv to realized it. how can i do?

//module module_m in module_m.v
module module_m(A,B,C);

parameter A_WIDTH = 32;

input [A_WIDTH-1 : 0] A;
input B;
output C;

...
endmodule

//module top.v
module top(...);

module_m #(.A_WIDTH(16)) u_m(.A(a),.B(b),.C(c));
...
endmodule

//my new file for function coverage
module m_fcoverage(A,B,C);

parameter WHATWIDTH= 8;
input [WHATWIDTH-1 : 0] A;
input B;
input C;

covergroup cg @(B)
...
endgroup

cg cg=new();
endmodule

bind module_m m_fcovrage #(.WHATWIDTH(WHATWIDTH)) m_fcovrage(A,B,C);


then how can i get the correct value for WHATWIDTH?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top