problem in delaying the input bit??

D

dcreddy1980

i have to delay the input data(X) by some number of clock periods depending
up on the signal tmp.

architecture behaviour of test
signal tmp : integer := 3;
signal clcokperiod : time := 2 ns;
begin
Y <= X after tmp*clockperiod; ---so, the o/p is obtained after 6 ns
end behaviour;
X and Y are bits(STD_LOGIC).i dont want to have the above code...because i
am setting the clock period on my own..could any one help me in getting the
same behaviour in a different way.

thanks in advance
dcreddy
 
Z

zingafriend

If you are setting the clock period then you might be having clock as
the input, so use temp as a counter to count that many clock cycles and
make X<=Y.

Neo
 
D

dcreddy1980

hi...

entity test is
port(X : in std_logic;
clk : in std_logic;
Y : out std_logic);
end test;
architecture behaviour of test is
signal tmp : integer :=3;
signal clock period : time := 2 ns;
begin
Y <= X after tmp * clock period;
end behaviour;

u have to get the same behaviour as the above component does but not by
using after statement in the code for delaying the inout data.
 
D

dcreddy1980

hi...

entity test is
port(X : in std_logic;
clk : in std_logic;
Y : out std_logic);
end test;
architecture behaviour of test is
signal tmp : integer :=3;
signal clock period : time := 2 ns;
begin
Y <= X after tmp * clock period;
end behaviour;

u have to get the same behaviour as the above component does but not by
using after statement in the code for delaying the inout data.
 
M

Mike Treseler

dcreddy1980 said:
entity test is
port(X : in std_logic;
clk : in std_logic;
Y : out std_logic);
end test;
architecture behaviour of test is
signal tmp : integer :=3;
signal clock period : time := 2 ns;
begin
Y <= X after tmp * clock period;
end behaviour;

u have to get the same behaviour as the above component does but not by
using after statement in the code for delaying the inout data.

Consider a shift register.

-- 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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top