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

Reply

VHDL - General question on the simulation of VHDL-code with Alteras QuartusII

 
Thread Tools Search this Thread
Old 06-06-2007, 07:14 PM   #1
Default General question on the simulation of VHDL-code with Alteras QuartusII


Hello everybody,

I just started with VHDL and I have three (probably simple) questions:

Using Alteras Quartus 2 Tool I want to do some VHDL simulation:

A simple example:

ARCHITECTURE TEST OF TEST IS
BEGIN
x <= i after 20 ns;
END TEST;

Using the simulator that is integrated in Quartus 2 I generated a simple
waveform where:

i = ' 0 ' form 0 ns to 10 ns
i = ' 1 ' for time > 10 ns

When I switch to "Functional Simulation" timing is ignored (as
expected). When I switch to "Timing Simulation" I get:

x = '1' for time > 23 ns

which obviously reflects the timing of the FPGA for which the design was
synthesised by Quartus II.

Now my questions are as follows:

Question 1: How can I just perform a VHDL simulation that reflects the
timing expressed by the statement "... after 20 ns"?

Question 2: How can I instruct Quartus II to accept all valid VHDL-code
and not only code that actually can be synthesised? I just want to
simulate a VHDL model!

Question 3: How can run simple test benches written in VHDL (like in the
example attached below) and watch the resulting waveforms using Quartus II.

Any help is highly appreciated!

Best regards

Markus




-- Test Bench:

LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;

ENTITY TEST IS
PORT (
i1, i2: IN std_logic;
o: OUT std_logic
);
END TEST;


ARCHITECTURE TEST OF TEST IS
BEGIN
o <= i1 and i2;
END TEST;



LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;

ENTITY TB_TEST IS
END TB_TEST;

ARCHITECTURE TB_TEST of TB_TEST is
COMPONENT TEST IS
PORT (
i1, i2: IN std_logic;
o: OUT std_logic
);
END COMPONENT;

SIGNAL w_i1, w_i2: std_logic;
BEGIN
DUT:
TEST PORT MAP( i1 => w_i1,
i2 => w_i2);

STIMULI:
PROCESS
BEGIN
w_i1 <= '1';
WAIT FOR 50 ns;
w_i2 <= '1';
WAIT FOR 50 ns;
w_i1 <= '0';
WAIT FOR 50 ns;
END PROCESS STIMULI;
END TB_TEST;


Markus Jochim
  Reply With Quote
Old 06-06-2007, 07:21 PM   #2
Mike Treseler
 
Posts: n/a
Default Re: General question on the simulation of VHDL-code with AlterasQuartus II
Markus Jochim wrote:

> Using Alteras Quartus 2 Tool I want to do some VHDL simulation:
> A simple example:
> ARCHITECTURE TEST OF TEST IS
> BEGIN
> x <= i after 20 ns;
> END TEST;
> Using the simulator that is integrated in Quartus 2 I generated a simple
> waveform where:


The integrated simulator is not a vhdl simulator.
Use the quartus oem modelsim program instead.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 06-07-2007, 09:34 PM   #3
ghelbig@lycos.com
 
Posts: n/a
Default Re: General question on the simulation of VHDL-code with Alteras Quartus II
On Jun 6, 11:14 am, Markus Jochim <joc...@dc.uni-due.de> wrote:
> Hello everybody,
>
> I just started with VHDL and I have three (probably simple) questions:
>
> Using Alteras Quartus 2 Tool I want to do some VHDL simulation:
>
> A simple example:
>
> ARCHITECTURE TEST OF TEST IS
> BEGIN
> x <= i after 20 ns;
> END TEST;
>
> Using the simulator that is integrated in Quartus 2 I generated a simple
> waveform where:
>
> i = ' 0 ' form 0 ns to 10 ns
> i = ' 1 ' for time > 10 ns
>
> When I switch to "Functional Simulation" timing is ignored (as
> expected). When I switch to "Timing Simulation" I get:
>
> x = '1' for time > 23 ns
>
> which obviously reflects the timing of the FPGA for which the design was
> synthesised by Quartus II.
>
> Now my questions are as follows:
>
> Question 1: How can I just perform a VHDL simulation that reflects the
> timing expressed by the statement "... after 20 ns"?
>
> Question 2: How can I instruct Quartus II to accept all valid VHDL-code
> and not only code that actually can be synthesised? I just want to
> simulate a VHDL model!
>
> Question 3: How can run simple test benches written in VHDL (like in the
> example attached below) and watch the resulting waveforms using Quartus II.
>
> Any help is highly appreciated!
>
> Best regards
>
> Markus
>
> -- Test Bench:
>
> LIBRARY IEEE;
> USE IEEE.std_logic_1164.ALL;
>
> ENTITY TEST IS
> PORT (
> i1, i2: IN std_logic;
> o: OUT std_logic
> );
> END TEST;
>
> ARCHITECTURE TEST OF TEST IS
> BEGIN
> o <= i1 and i2;
> END TEST;
>
> LIBRARY IEEE;
> USE IEEE.std_logic_1164.ALL;
>
> ENTITY TB_TEST IS
> END TB_TEST;
>
> ARCHITECTURE TB_TEST of TB_TEST is
> COMPONENT TEST IS
> PORT (
> i1, i2: IN std_logic;
> o: OUT std_logic
> );
> END COMPONENT;
>
> SIGNAL w_i1, w_i2: std_logic;
> BEGIN
> DUT:
> TEST PORT MAP( i1 => w_i1,
> i2 => w_i2);
>
> STIMULI:
> PROCESS
> BEGIN
> w_i1 <= '1';
> WAIT FOR 50 ns;
> w_i2 <= '1';
> WAIT FOR 50 ns;
> w_i1 <= '0';
> WAIT FOR 50 ns;
> END PROCESS STIMULI;
> END TB_TEST;


To expand on Mike's answer:

Question 1: Use a real simulator.
Question 2: You can't; Quartus is essentially a front end for a
synthesizer (Use a real simulator.)
Question 3: Use a real simulator.



ghelbig@lycos.com
  Reply With Quote
Old 06-08-2007, 12:11 AM   #4
HT-Lab
 
Posts: n/a
Default Re: General question on the simulation of VHDL-code with Alteras Quartus II

<> wrote in message
news: oups.com...
> On Jun 6, 11:14 am, Markus Jochim <joc...@dc.uni-due.de> wrote:
>> Hello everybody,
>>
>> I just started with VHDL and I have three (probably simple) questions:
>>
>> Using Alteras Quartus 2 Tool I want to do some VHDL simulation:
>>
>> A simple example:
>>
>> ARCHITECTURE TEST OF TEST IS
>> BEGIN
>> x <= i after 20 ns;
>> END TEST;
>>
>> Using the simulator that is integrated in Quartus 2 I generated a simple
>> waveform where:
>>
>> i = ' 0 ' form 0 ns to 10 ns
>> i = ' 1 ' for time > 10 ns
>>
>> When I switch to "Functional Simulation" timing is ignored (as
>> expected). When I switch to "Timing Simulation" I get:
>>
>> x = '1' for time > 23 ns
>>
>> which obviously reflects the timing of the FPGA for which the design was
>> synthesised by Quartus II.
>>
>> Now my questions are as follows:
>>
>> Question 1: How can I just perform a VHDL simulation that reflects the
>> timing expressed by the statement "... after 20 ns"?
>>
>> Question 2: How can I instruct Quartus II to accept all valid VHDL-code
>> and not only code that actually can be synthesised? I just want to
>> simulate a VHDL model!
>>
>> Question 3: How can run simple test benches written in VHDL (like in the
>> example attached below) and watch the resulting waveforms using Quartus
>> II.

...snip..
>
> To expand on Mike's answer:
>
> Question 1: Use a real simulator.
> Question 2: You can't; Quartus is essentially a front end for a
> synthesizer (Use a real simulator.)
> Question 3: Use a real simulator.


So if I understand you correctly, you are trying to say that he should use a
real simulator?

Hans
www.ht-lab.com





HT-Lab
  Reply With Quote
Old 06-08-2007, 05:51 PM   #5
Markus Jochim
 
Posts: n/a
Default Re: General question on the simulation of VHDL-code with AlterasQuartus II
That was my impression as well... I tried the ModelSim Web Edition as
recommended by Mike and everything works fine!

Thanks for answering a Newbie-question and for being helpful with a
simple and unambiguous answer

Markus

>
> So if I understand you correctly, you are trying to say that he should use a
> real simulator?
>
> Hans
> www.ht-lab.com
>
>
>



Markus Jochim
  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
vhdl code for bidirectional transceiver qtr General Help Related Topics 0 07-05-2007 05:00 PM
Writing Register code in vhdl amirster Hardware 2 06-11-2007 03:22 PM
vhdl code amirster Hardware 0 05-10-2007 07:28 AM
Re: PROBLEM SOLVED General USB Printer setup question, and situation-specific question Bum A+ Certification 0 01-15-2005 10:13 AM
Re: General USB Printer setup question, and situation-specific question AG A+ Certification 0 01-13-2005 11:13 PM




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