Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - problem with modelsim

 
Thread Tools Search this Thread
Old 08-03-2003, 12:18 PM   #1
Default problem with modelsim


Hi there,

I am experiencing a problem when using Modelsim. The following piece of
code is to be simulated :

variable t1,t2 : time;
variable temp1, temp2 : real;
variable cp : real := (1.0/(500 * 1000000.0));


temp1 := cell_ptr.t1(x+y-1);
temp2 := cell_ptr.t2(x+y-1);

t1 := (temp1 * cp) * 1 sec;
t2 := (cp - (temp2 * cp)) * 1 sec;

The variable temp1 for example has the value 0.10991, temp2 is 0.877552.
Cp is as expected 2e-9. The problem occurs with t1 and t2. These
calculations result in 0. When simulating this code with Aldec Riviera,
the variables are correctly calculated. Is there something to be done in
Modelsim, maybe concerning the time resolution, so this works? Im using
Modelsim XE/Starter 5.6a, the free Xilinx edition. Thanks for any help,

Regards,

Torsten



Torsten Bitterlich
  Reply With Quote
Old 08-04-2003, 01:20 PM   #2
Egbert Molenkamp
 
Posts: n/a
Default Re: problem with modelsim
Although not familair with the details of "Modelsim XE/Starter". You can
normally set
a resolution in ModelSim add the moment you load a design using the
graphical environment
or if you type the vsim command, something like: vsim -t fs <your design>
should work

Egbert Molenkamp

"Torsten Bitterlich" <> schreef in bericht
news:bgir2o$p1gml$...
> Hi there,
>
> I am experiencing a problem when using Modelsim. The following piece of
> code is to be simulated :
>
> variable t1,t2 : time;
> variable temp1, temp2 : real;
> variable cp : real := (1.0/(500 * 1000000.0));
>
>
> temp1 := cell_ptr.t1(x+y-1);
> temp2 := cell_ptr.t2(x+y-1);
>
> t1 := (temp1 * cp) * 1 sec;
> t2 := (cp - (temp2 * cp)) * 1 sec;
>
> The variable temp1 for example has the value 0.10991, temp2 is 0.877552.
> Cp is as expected 2e-9. The problem occurs with t1 and t2. These
> calculations result in 0. When simulating this code with Aldec Riviera,
> the variables are correctly calculated. Is there something to be done in
> Modelsim, maybe concerning the time resolution, so this works? Im using
> Modelsim XE/Starter 5.6a, the free Xilinx edition. Thanks for any help,
>
> Regards,
>
> Torsten
>





Egbert Molenkamp
  Reply With Quote
Old 08-05-2003, 08:57 AM   #3
Srinivasan Venkataramanan
 
Posts: n/a
Default Re: problem with modelsim
Hi,
Modelsim XE/Starter does support that option and Egbert is correct in his
observation, it is your time resolution that has truncated t1 & t2. Here is
the sample output from MXE/Starter:

# ** Note: temp1 1.099100e-001 temp2 8.775520e-001 t1 220 ps t2 245 ps cp
2.000000e-009

^^^^^^^^^^^^^^
If I run with -t ns

$ vsim -c time_e -t ns -do "run"
# ** Note: temp1 1.099100e-001 temp2 8.775520e-001 t1 0 ns t2 0 ns cp
2.000000e-009

^^^^^^^^^^^^
Srinivasan
--
Srinivasan Venkataramanan
Senior Verification Engineer
Software & Silicon Systems India Pvt Ltd. - an Intel company
Bangalore, India

http://www.noveldv.com http://www.deeps.org

I don't speak for Intel
"Egbert Molenkamp" <> wrote in message
news:bgljf0$2hv$...
> Although not familair with the details of "Modelsim XE/Starter". You can
> normally set
> a resolution in ModelSim add the moment you load a design using the
> graphical environment
> or if you type the vsim command, something like: vsim -t fs <your design>
> should work
>
> Egbert Molenkamp
>
> "Torsten Bitterlich" <> schreef in bericht
> news:bgir2o$p1gml$...
> > Hi there,
> >
> > I am experiencing a problem when using Modelsim. The following piece of
> > code is to be simulated :
> >
> > variable t1,t2 : time;
> > variable temp1, temp2 : real;
> > variable cp : real := (1.0/(500 * 1000000.0));
> >
> >
> > temp1 := cell_ptr.t1(x+y-1);
> > temp2 := cell_ptr.t2(x+y-1);
> >
> > t1 := (temp1 * cp) * 1 sec;
> > t2 := (cp - (temp2 * cp)) * 1 sec;
> >
> > The variable temp1 for example has the value 0.10991, temp2 is 0.877552.
> > Cp is as expected 2e-9. The problem occurs with t1 and t2. These
> > calculations result in 0. When simulating this code with Aldec Riviera,
> > the variables are correctly calculated. Is there something to be done in
> > Modelsim, maybe concerning the time resolution, so this works? Im using
> > Modelsim XE/Starter 5.6a, the free Xilinx edition. Thanks for any help,
> >
> > Regards,
> >
> > Torsten
> >

>
>





Srinivasan Venkataramanan
  Reply With Quote
Old 04-24-2008, 11:52 PM   #4
agustinmarquez
Junior Member
 
Join Date: Apr 2008
Posts: 1
Default
hello, for me the problem is that the modelsim starter is limited for simulated some programs. do you check it?

bye

QUOTE=Torsten Bitterlich]Hi there,

I am experiencing a problem when using Modelsim. The following piece of
code is to be simulated :

variable t1,t2 : time;
variable temp1, temp2 : real;
variable cp : real := (1.0/(500 * 1000000.0));


temp1 := cell_ptr.t1(x+y-1);
temp2 := cell_ptr.t2(x+y-1);

t1 := (temp1 * cp) * 1 sec;
t2 := (cp - (temp2 * cp)) * 1 sec;

The variable temp1 for example has the value 0.10991, temp2 is 0.877552.
Cp is as expected 2e-9. The problem occurs with t1 and t2. These
calculations result in 0. When simulating this code with Aldec Riviera,
the variables are correctly calculated. Is there something to be done in
Modelsim, maybe concerning the time resolution, so this works? Im using
Modelsim XE/Starter 5.6a, the free Xilinx edition. Thanks for any help,

Regards,

Torsten[/quote]


agustinmarquez
agustinmarquez is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dial Up Problem smackedass A+ Certification 3 02-02-2007 11:59 PM
Re: Virus Problem ** Help!** David BlandIII A+ Certification 1 03-02-2004 06:00 PM
Pioneer DVR3100S problem with Satellite receiver Samsung DCR 9500 Fredrik Bengtsson DVD Video 0 12-12-2003 02:32 PM
Re: Serious Computer Problem hootnholler A+ Certification 1 11-24-2003 12:18 PM
Re: Serious Computer Problem Bret A+ Certification 0 11-19-2003 12:51 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46