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 identify the no.of clock cycles during simulation of design?

Status
Not open for further replies.

anusha vasanta

Member level 1
Joined
Sep 23, 2014
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
251
Hi all,
i had a very basic doubt as per the design i can understand the no.of clk cycles, but during my simulation how can i identify simply the no.of clock cycles my design is taking. any easy way help me
thanx in advance..
 

You will have to count. Else by knowing the clock period and time between input and output, you can determine it(Output-Input)/clock period...
 
With VHDL ( assuming you meant positive clock edges )

Code:
signal counter : natural := 0 ;

process ( clock ) is
begin
  if rising_edge ( clock ) then
     counter <= counter  + 1 ;
  end if ;
end process ;
 
Hi,
In my opinion the approach to follow depends on your design complexity. I presume you can view your simulation via waveforms.
1> For simple designs look at the CLK signal when the simulation ends. Note the time indicated by the cursor for the CLK signal. Divide this time by 1 CLK period to get the no. of clk cycles. Sarath666 already mentioned this.
2> The other is the counter method (shaiko's post). Make the counter to stop counting by checking if a particular signal is asserted or de-asserted (this signal should be significant in determining if your simu is over) and the counter value will give you the no. of clk cycles.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top