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.

View SystemVerilog function variables in ModelSim waveform view?

Status
Not open for further replies.

likewise

Newbie level 5
Joined
Jun 22, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,372
Hello,

I have a module that uses a function in the combinational logic always block. (How) Can I inspect the internal signals (or variables) of a function in ModelSim?

I have an simplified example of what I intend to do:

function logic inverse(logic x);
logic y;
y = x?0:1;
return y;
endfunction

logic a;
logic b;
always_comb begin: d1_next
b = inverse(a);
end

add wave -noupdate -format Logic -radix unsigned /module_inst/a
add wave -noupdate -format Logic -radix unsigned /module_inst/b

(How) Can I inspect the internal signal or variable 'y' of the function in ModelSim?

add wave -noupdate -format Logic -radix unsigned /module_inst/<...>


I know I can revert to using sub modules instead of functions, and this works, but sometimes I like functions better.

Regards,

Leon.
 

If the function is static and only called from one always block, the easiest way to learn how to do this is to bring up the Questa GUI. Then either step into the code and add the selected signals to the waveform, or look in the objects window for the signals and add them to the waveform. You will see the commands used to add the signals in the transcript window.

However, if the function is called from more than one place, it does not make much sense to add the internal signals to the waveform, especially if the calls are made within the same time step.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top