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.

Urgent: Use of ns and ps in modelsim!!

Status
Not open for further replies.

xman24

Junior Member level 2
Joined
Oct 10, 2010
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,444
Hi..

I need to use 2 clocks with one clock freq
'83.33 ns' and the other one with '64.8 ps'. I am giving this 2 clocks from my testbench to design file. I am using verilog and using modelsim 5.4. Is it something related to timescale. pls help. If it is timescale, please explain what it performs.
If this can't be done in modelsim 5.4, I will be using Synopsys VCS, is there any option in that to give these different time unit clocks,what should be done in Synopsys VCS?
Thanks. Pls help immediately.
 

In modelsim 6 you go to wave -> grid & timeline -> time units selector
You can also right click over the box showing the cursor value and select grid and timeline properties, you 'll find the same time unit selector.
I suppose that version 5 is similar

Alex

---------- Post added at 03:05 ---------- Previous post was at 02:25 ----------

I just checked and the simulation resolution is a different thing, to set it you go to simulate -> start simulation and you set the resolution there, then select the file you want and start simulation
 

timescale 1ns/1ps means that the basic time unit for your design is 1ns and its granularity is up to 1ps.

so "assign a = #1 b" would mean a is delayed version of b by 1ns
 

Thanks...But still I didn't get the whole thing....
@alexan_e There is no option in my simulator, modelsim SE/EE plus 5.4e.
 

@chipmonkey 83.3ns clock generation is fine. Thanks. But how to give a 64.8 ps clock!!
 

@chipmonkey 83.3ns clock generation is fine. Thanks. But how to give a 64.8 ps clock!!

`timescale 1ns/1ps

initial
begin
clk = 1'b0;
forever #0.0324 = ~clk;
end

this will create the second clock. however the timeperiod wont be accurate in this case. it will be 64 ps clock. You can try with smaller timescales. I have not used less than ps. so not very sure if it works
 

Can you just write the code to generate the two clocks in same file using 'timescale..
 

Can you just write the code to generate the two clocks in same file using 'timescale..

`timescale 1ns/1ps

initial
begin
clkA = 1'b0;
clkB = 1'b0;
forever #41.665 clkA = ~clkA;
forever #0.0324 clkB = ~clkB;
end

Here timeperiod of clkA = 83.33ns, timeperiod of clkB = 64ps
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top