I have issues using a delay in VHDL

Status
Not open for further replies.

ggiacomo

Newbie level 3
Joined
Apr 17, 2018
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
49
Hello. I need to implement a certain block in VHDL. The design would be something similar to this one.


At first it seemed very easy to me, but after looking into it I realised I am not sure about how to handle the delay. The design has to be synthesizable, so I cannot use "after".
I have tried a simple approach but Im not sure if thats allowed. Assuming one clock cycle delay, the process is

Code VHDL - [expand]
1
2
3
4
5
6
process(clk) is
begin
  if (clk'even and clk='1') then
    in_1_delayed<= in_1;
   end if;
end process;



Would it be the correct approach or there is a different way?
 

This is a 1 cycle delay (register). Except for the misspelling of event, it is the standard template.
 
It's just semantics, but I'd recommend doing the following.


Code VHDL - [expand]
1
if rising_edge(clk) then

 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…