Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

negative edge trigger

Altera_Forum
Honored Contributor II
1,941 Views

hi guys , i need a little help here. 

i need to create a negative edge trigger for a period of one clock only. 

meaning the signal was at '1' and went down to '0' for one clock period. 

does anyone have an idea how to do it in VHDL ?
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
896 Views

to do a negative edge trigger - you flop the signal twice and then AND the second flop with the NOT of the first flop ex: 

 

signal q: std_logic; 

signal qq : std_logic; 

signal neg_edge_trig : std_logic; 

 

process(clk) 

begin 

if rising_edge(clk) then 

q <= input_signal; 

qq <= q; 

end if; 

end process; 

 

neg_edge_trig <= NOT q AND qq;
0 Kudos
Altera_Forum
Honored Contributor II
896 Views

will it preform it for exact one clock period ?? 

p.s. 

thank you very much for the replay.
0 Kudos
Altera_Forum
Honored Contributor II
896 Views

also wonder , if i want to make it automatically. should i switch the 'input_signal' by '1' ?

0 Kudos
Altera_Forum
Honored Contributor II
896 Views

Yes this will create a 1 cycle pulse following the falling edge of your input signal

0 Kudos
Altera_Forum
Honored Contributor II
896 Views

 

--- Quote Start ---  

to do a negative edge trigger - you flop the signal twice and then AND the second flop with the NOT of the first flop ex: 

 

signal q: std_logic; 

signal qq : std_logic; 

signal neg_edge_trig : std_logic; 

 

process(clk) 

begin 

if rising_edge(clk) then 

q <= input_signal; 

qq <= q; 

end if; 

end process; 

 

neg_edge_trig <= not q and qq; 

--- Quote End ---  

 

 

By this way, neg_edge_trig is a result of combinational logic (= not a registered signal).
0 Kudos
Reply