Delaying signal assignment

H

hssig

How can I delay a signal in the following manner ?


signal clk : std_logic;
signal sig : std_logic;

process
begin
clk <= '1'; wait for 10 ns;
clk <= '0'; wait for 10 ns;
end process;

Now I want "sig" to be High for 50us, after that it should be assigned
the value of clk.

The following approach does not work:
sig <= '1', clk after 50 us;

Cheers, hssig
 
A

Andy

How can I delay a signal in the following manner ?

signal clk : std_logic;
signal sig : std_logic;

process
begin
   clk <= '1'; wait for 10 ns;
   clk <= '0'; wait for 10 ns;
end process;

Now I want "sig" to be High for 50us, after that it should be assigned
the value of clk.

The following approach does not work:
sig <= '1', clk after 50 us;

Cheers, hssig

signal enable : boolean := false;
signal clk : std_logic := '0';
signal sig : std_logic := '1';

enable <= true after 50 us;

clk <= not clk after 10 ns;

sig <= clk when enable, else '1';

Andy
 
R

rickman

How can I delay a signal in the following manner ?

signal clk : std_logic;
signal sig : std_logic;

process
begin
   clk <= '1'; wait for 10 ns;
   clk <= '0'; wait for 10 ns;
end process;

Now I want "sig" to be High for 50us, after that it should be assigned
the value of clk.

The following approach does not work:
sig <= '1', clk after 50 us;

Cheers, hssig

50us <= '1', '0' after 50 us;
sig <= clk or 50us;

Isn't that easy? Don't make things too hard by thinking about them
too much...

Rick
 
D

Dave

The following approach does not work:
sig <= '1', clk after 50 us;

Try:-

sig <= transport '1', clk after 50 us;

(this instructs the simulator to model sig as a transmission line)
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top