simulation error

U

u_stadler

on thing i forgot to ask:

when i synthesise the design it assumes that thr RD and WR signals are
clocks. how can i avoid this? is there a command?. the reason why i
don't want this is because when i want to assign package pins i will
only allow me to use clock pins for those signals.

thanks
 
M

Mike Treseler

when i synthesise the design it assumes that thr RD and WR signals are
clocks. how can i avoid this?

Add a clock input and use 'event with no other inputs.

-- Mike Treseler
____________________________
IN_SYNC: process(RESET, clk)
begin
if RESET = '0' then
s_In_Data <= (others => '0');
elsif rising_edge(clk) then
if WR = '1' then
s_In_Data <= s_Next_In_Data;
s_In_Count <= s_Next_In_Count;
end if;
end if;
end process IN_SYNC;
 
U

u_stadler

but how can i trigger on a rising edge then?
for example i only want to copy the input on the rising edge of WR?
 
M

Mike Treseler

but how can i trigger on a rising edge then?

make a synchronous strobe using an
AND gate, inverter and one flop.
for example i only want to copy the input on the rising edge of WR?

Use the strobe in the clocked process:

if strobe = '1' then
some_reg <= input_to_copy;
end if;

Here's a related example of counting rising edges
using a synchronous strobe:

http://home.comcast.net/~mike_treseler/rise_count.vhd

This uses variables instead of signals,
but it's the same idea.

-- Mike Treseler
 

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,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top