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

Reply

VHDL - VHDL Simulation delays

 
Thread Tools Search this Thread
Old 04-11-2005, 11:41 AM   #1
Default VHDL Simulation delays


Hi everybody,
I am new to VHDL and have just started tackling the VHDL simulation. I
have read that in signal assignments of the type:

a <= b after 10 ns;

the 'after' clause is ignored in synthesis. Ok, but when should I use
such clauses in the simulation? They are very useful in the
testbenches, but when and why should I use such clauses in the VHDL
sources that will be later synthesized? Also, I am using XST from
Xilinx, here is an excerpt from the synthesis report:

Minimum period: 2.546ns (Maximum Frequency: 392.773MHz)
Minimum input arrival time before clock: No path found
Maximum output required time after clock: 7.683ns
Maximum combinational path delay: No path found

Can anyone tell me how the frequency is computed? Is this the maximum
frequency that my design is able to operate at? What influences the
maximum frequency?
Also, what is the meaning of "mininum input arrival time"(probably the
time before the clock that an input signal must be stable and valid?),
"maximum output required time after clock"(maybe the time after clock
that an output signal must remain stable and valid?) and "maximum
combinational path delay"(maybe the largest combinational path - but
path between what signals - inputs and outputs defined in the 'ports'
section of the top level entity)?
Thank you in advance!

Best regards,
Stoyan Shopov



stoyan.shopov@gmail.com
  Reply With Quote
Old 04-11-2005, 03:34 PM   #2
Ralf Hildebrandt
 
Posts: n/a
Default Re: VHDL Simulation delays
wrote:


> I am new to VHDL and have just started tackling the VHDL simulation. I
> have read that in signal assignments of the type:
>
> a <= b after 10 ns;
>
> the 'after' clause is ignored in synthesis. Ok, but when should I use
> such clauses in the simulation? They are very useful in the
> testbenches, but when and why should I use such clauses in the VHDL
> sources that will be later synthesized?


Then let me ask you one thing: What is the difference between a
testbench and a VHDL source?

I can't see one, as the testbench is also VHDL.

All parts of your project, that are going to be synthesized have to
avoid the after-clause. All others may use it.
This includes using the after clause in a subcomponent during the design
process if you are doing top-down design modelling and the subcomponent
will be modelled in a synthesizable way later.



But ... well ... I use the after-clause very seldom and avoid it even if
I do top-down modelling. Even big parts of my testbenches are
synthesizable.
I don't like to model a component in a non-synthesizable way if I have
to model it later in a synthesizable way, because the conversion often
leads to unforseen problems.

Ralf


Ralf Hildebrandt
  Reply With Quote
Old 04-11-2005, 07:02 PM   #3
Mike Treseler
 
Posts: n/a
Default Re: VHDL Simulation delays
wrote:
> Hi everybody,
> I am new to VHDL and have just started tackling the VHDL simulation. I
> have read that in signal assignments of the type:
>
> a <= b after 10 ns;
>
> the 'after' clause is ignored in synthesis. Ok, but when should I use
> such clauses in the simulation?


I use them very rarely as it makes testbench
synchronization very difficult. I prefer
a main testbench process as shown below.

-- Mike Treseler

---------------------------------------------
main : process is
---------------------------------------------
procedure tic is
begin
wait until rising_edge(clk_s);
end procedure tic;
---------------------------------------------
begin
a <= b;
tic;
-- everything else;
wait;
end process main;
---------------------------------------------


Mike Treseler
  Reply With Quote
Old 04-12-2005, 03:38 PM   #4
Jim George
 
Posts: n/a
Default Re: VHDL Simulation delays
Mike Treseler wrote:
> wrote:
>
>> Hi everybody,
>> I am new to VHDL and have just started tackling the VHDL simulation. I
>> have read that in signal assignments of the type:
>>
>> a <= b after 10 ns;
>>
>> the 'after' clause is ignored in synthesis. Ok, but when should I use
>> such clauses in the simulation?

>
>
> I use them very rarely as it makes testbench
> synchronization very difficult. I prefer
> a main testbench process as shown below.
>
> -- Mike Treseler
>
> ---------------------------------------------
> main : process is
> ---------------------------------------------
> procedure tic is
> begin
> wait until rising_edge(clk_s);
> end procedure tic;
> ---------------------------------------------
> begin
> a <= b;
> tic;
> -- everything else;
> wait;
> end process main;
> ---------------------------------------------


Mike,
A rough equivalent to your code would be

main: process (clk)
begin
if (rising_edge(clk)) then
a <= b;
end if;
end process;

However, the problem is a gets assigned *exactly* at the clock, which
is not what happens in the real world (due to setup time). Here, an
"after" clause on the assignment would help simulate that. For example,
one of my designs interfaces with a QL5064 chip, whose datasheet says
that the chip's control bus signals have a 4 ns setup time. So in my
test bench, I use "data <= data_int after 4 ns;"
-Jim


Jim George
  Reply With Quote
Old 04-13-2005, 06:56 AM   #5
Mike Treseler
 
Posts: n/a
Default Re: VHDL Simulation delays
Jim George wrote:

> A rough equivalent to your code would be
> main: process (clk)
> begin
> if (rising_edge(clk)) then
> a <= b;
> end if;
> end process;


True, except for the -- everything else part. See:
http://home.comcast.net/~mike_treseler/test_uart.vhd
for a full example of this style of synchronous testbench.

> However, the problem is a gets assigned *exactly* at the clock,
> which is not what happens in the real world (due to setup time).


But it is what happens in a synchronous simulation
of the real word. Real clock to Q delays become delta delays.
The DUT provides synchronization of all inputs that
need it.

> Here,
> an "after" clause on the assignment would help simulate that. For
> example, one of my designs interfaces with a QL5064 chip, whose
> datasheet says that the chip's control bus signals have a 4 ns setup
> time. So in my test bench, I use "data <= data_int after 4 ns;"


Nothing wrong with that.

Synchronized inputs and static timing analysis
are my preference to verify the setup and holds.

This testbench style is not synthesizable like Ralf's.
It just works works like one that is -- but a
little easier for me to read.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 04-13-2005, 10:19 AM   #6
Jim George
 
Posts: n/a
Default Re: VHDL Simulation delays
> True, except for the -- everything else part. See:
> http://home.comcast.net/~mike_treseler/test_uart.vhd
> for a full example of this style of synchronous testbench.


OK, that example made it clear what kinda stuff could go into
"--everything else". Thanks!


Jim George
  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
How to execute an external software from VHDL? And how to interface VHDL with JAVA? becool_nikks Software 0 03-06-2009 07:08 PM
Help on auto conversion from Matlab to vhdl on filter design hardheart Hardware 0 12-07-2007 09:19 AM
ARRAY(n DOWNTO 0) OF STD_LOGIC_VECTOR(m DOWNTO 0) - VHDL freitass Hardware 0 11-01-2007 03:44 PM
Post-Route Simulation does not give output for the first clock cycle Options velocityreviews Software 0 04-17-2007 05:47 PM
simulation Tom MCITP 0 04-05-2007 01:40 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