Mixed language delta delay problem..

U

uj101

I'm facing a delta delay issue (CLK arriving before the data) for the
mixed language (VHDL/Verilog) simulation in modeltech. Has anyone
faced the same and knows any simple workaround (instead of inserting
#1 or after).

Thx

uj101
 
K

KJ

I'm facing a delta delay issue (CLK arriving before the data) for the
mixed language (VHDL/Verilog) simulation in modeltech. Has anyone
faced the same and knows any simple workaround (instead of inserting
#1 or after).

Go back to your notes from basic logic design #101...Clock arriving
before the data is the way it is supposed to be. The rising edge of a
clock *causes* the output of a flop (i.e. the data) to change.

Similarly, inputs to a flop are sampled *at* the rising edge, the fact
that the data changes later (even if it is only one simulation delta
delay later) is picked up on the *next* clock edge.

KJ
 
H

HT-Lab

uj101 said:
I'm facing a delta delay issue (CLK arriving before the data) for the
mixed language (VHDL/Verilog) simulation in modeltech. Has anyone
faced the same and knows any simple workaround (instead of inserting
#1 or after).

Thx

uj101

Make sure that you do not have any combinatorial clock assignments in your
code. Modelsim 6.4 can now display delta's in the waveform window (although
it is a bit flaky :)

Hans
www.ht-lab.com
 
T

Torsten Landschoff

Go back to your notes from basic logic design #101...Clock arriving
before the data is the way it is supposed to be.  The rising edge of a
clock *causes* the output of a flop (i.e. the data) to change.

How about the inverse problem (data arriving before the clock because
the clock is forwarded using concurrent signal assignments)?

Greetings, Torsten
 
M

Mike Treseler

Torsten said:
How about the inverse problem (data arriving before the clock because
the clock is forwarded using concurrent signal assignments)?

A clock does not belong in a signal assignment.

-- Mike Treseler
 
T

Torsten Landschoff

A clock does not belong in a signal assignment.

  -- Mike Treseler

So how does one generate the clock signal in a VHDL testbench?

Greetings, Torsten
 
M

Mike Treseler

Make that,
A clock does not belong in a signal assignment in synthesis code.

Torsten said:
So how does one generate the clock signal in a VHDL testbench?

I use a simulation process with wait statements, as below.
See http://mysite.verizon.net/miketreseler/test_uart.vhd
for details.

-- Mike Treseler


...
begin -- process tb_clk
clk_s <= '0';
if now < rst_time then
rst_s <= '1'; -- rst once with clk running
else
rst_s <= '0'; -- then low forever
end if;
if done_s then wait; end if; -- Stop clock
wait for clk_cy/2; -- clock low
clk_s <= '1';
fixed_stim; -- auxiliary output from process
wait for clk_cy/2; -- clock high
end process tb_clk;
 
M

Mike Treseler

Mike said:
Make that,
A clock does not belong in a signal assignment in synthesis code

... or on the right side of a signal assignment in simulation.
 
H

HT-Lab

A clock does not belong in a signal assignment.

-- Mike Treseler

So how does one generate the clock signal in a VHDL testbench?

From what I remember it used to be the case that a concurrent clock
assigment as in :

clock <= not clock after xx;

simulated faster than using a process, however, with all the modern
optimisation techniques I suspect this is no longer the case.

Hans
www.ht-lab.com
 
M

Mike Treseler

Mike said:
... or on the right side of a signal assignment in simulation.

OK, how about:

A clock only belongs in a signal assignment,
in a testbench clock generator process.

-- Mike Treseler

"I think, therefore I post, one more time."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top