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.

Problem with model sim

Status
Not open for further replies.

deepu_s_s

Full Member level 5
Joined
Mar 24, 2007
Messages
305
Helped
15
Reputation
30
Reaction score
5
Trophy points
1,298
Activity points
3,021
Hello friends
I am facing some problem with modelsim. When i am using `timesacle 1ns/ps in the test bench, the test bench is not working. If i removed the timescale , it was working perfectly

Thanks and Regards
Deepak
 

This contains two syntax errors:
`timesacle 1ns/ps

Try this:
`timescale 1ns/1ps

If that doesn't solve the problem, show us more code so we can reproduce the problem.
 

here is the test bench in verilog
 

Without the timescale directive, you need to say "run 4000" to reach the $stop statement.
With the timescale directive, you need to say "run 4000000" to reach the $stop statement.

Maybe that's the only problem. I can't check further because module pattern_detector is not included.
 

I didnt get u echo. can u explain me more clearly. I am able to run the testbench without the timescale without any problem. any way i am including the pattern_detector also

Added after 19 minutes:

here is the pattern detector
 

Ok, the pattern_detector module didn't change the situation. Both ways work fine for me.

The timescale directive changes the simulation time units, so you have to run the simulation for sufficient time to reach the $stop statement. Without the timescale directive, it reaches the $stop statement in about 3800ps (because my ModelSim default time unit is ps). With the timescale directive, it reaches the $stop statement in about 3800ns.

After running the simulation, be sure you've zoomed out to see the entire time axis.

If that doesn't help, please clarify your first message, "the test bench is not working". Describe what goes wrong.
 

but for me with timescale i am not getting the clock pulse. i am using modelsim se 6.2g version
 

What do you see instead of the clock pulse? A flat line? Blackness? Maybe show us a screen snapshot of your ModelSim display.

Again, be sure to run the simulation for sufficient time, and be sure to zoom out to view the entire time line. ModelSim sometimes displays only the tail end of the waveform, or nothing at all, until you zoom out.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top