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.

[Modelsim-Questa] - how to count rising edges?

Status
Not open for further replies.

ivlsi

Advanced Member level 3
Joined
Feb 17, 2012
Messages
883
Helped
17
Reputation
32
Reaction score
16
Trophy points
1,298
Activity points
6,868
Hi All,

How is it possible to count number of rising/falling edges in a specific wave in the MG Questa?

Thank you!
 

(Time@edge2 - Time@edge1)/TimeBetweenAdjacentEdges

Of course if your signal isn't periodic, then I end up manually counting pulses and multiplying by two.

The other option is I put a counter in my testbench to count the edges (easy to do in Verilog as you can observes signals in lower levels of the hierarchy), not sure if you can do this in VHDL.
 

No, I want to do this in Questa using its features. For example, in NCSIM (Cadence) has a build-in feature, which allow to count the signal edges between two cursors...
 

In Modelsim, you can use cursors to do that. This can be done by placing the cursor in the wave window at the point from where you wish to start the counting, select the signal and then go to Edit and there is an option named "Signal Search". Using that option, you can do a variety of searches, like counting any transition, rising/falling edge, search a particular signal value etc. I haven't used QuesraSim for that purpose, but I hope that it should be having some similar feature like this one.

Hope that helps.
MSBR
 
**broken link removed**

First of all, thank you MSBR for your reply. But, as you can see in the Signal Search window where is no an option to count edges, there is just an option to stop after N edges... So, still how to count edges :)

By the way, how is it possible to add signals from source window to waves? There should be a drag & drop feature for this... How to use?

Thank you!
 

Actually, I use Modelsim for all my HDL simulations. I am not sure what equivalent functions are supported in QuestaSim for that. I just hope (because QuestaSim is considered to be more powerful than Modelsim) that QuestaSim must have some equivalent features. Please try this thing in the Wave window.

In Modelsim, and some other simulators either, I have seen that you can add the signals to the wave window by right clicking on the signal and then using some option like "Add to wave". You can also add all of the signals of a module at once, by right clicking at the module in Object Window and Adding all the signals to the wave.

Hope that helps.
MSBR
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top