Skip to content
Snippets Groups Projects
Commit 2a889c4f authored by Pieter Donker's avatar Pieter Donker
Browse files

L2SDP-180, processed review commnents 3

parent 49698cec
No related branches found
No related tags found
2 merge requests!100Removed text for XSub that is now written in Confluence Subband correlator...,!59Resolve L2SDP-180
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
-- Description: -- Description:
-- . delay input pulse by nof_cycles_delay -- . delay input pulse by nof_cycles_delay
-- . output pulse is derived from low-high transition of input pulse. -- . output pulse is derived from low-high transition of input pulse.
-- . during delay other input pulses are ignored -- . the actual pulse delay will be delay + 1, due to implementation latency of 1 clk cycle
-- -------------------------------------------------------------------------- -- --------------------------------------------------------------------------
LIBRARY IEEE, technology_lib; LIBRARY IEEE, technology_lib;
...@@ -54,31 +54,27 @@ ARCHITECTURE rtl OF common_variable_delay IS ...@@ -54,31 +54,27 @@ ARCHITECTURE rtl OF common_variable_delay IS
SIGNAL nxt_out_val : STD_LOGIC; SIGNAL nxt_out_val : STD_LOGIC;
SIGNAL delay_cnt : NATURAL; SIGNAL delay_cnt : NATURAL;
SIGNAL nxt_delay_cnt : NATURAL; SIGNAL nxt_delay_cnt : NATURAL;
SIGNAL prev_in_val : STD_LOGIC := '0'; SIGNAL prev_in_val : STD_LOGIC;
BEGIN BEGIN
out_val <= i_out_val; out_val <= i_out_val;
p_delay: PROCESS(enable, in_val, prev_in_val, nxt_delay_cnt, delay_cnt, delay) p_delay: PROCESS(enable, in_val, prev_in_val, delay, delay_cnt)
BEGIN BEGIN
nxt_out_val <= '0'; nxt_out_val <= '0';
nxt_delay_cnt <= delay_cnt + 1; nxt_delay_cnt <= 0;
IF enable = '1' THEN IF enable = '1' THEN
IF in_val = '1' AND prev_in_val = '0' THEN -- detect risingedge of in_val IF in_val = '1' AND prev_in_val = '0' THEN -- detect rising edge of in_val
IF delay = 0 THEN IF delay = 0 THEN
nxt_out_val <= '1'; nxt_out_val <= '1';
nxt_delay_cnt <= g_max_delay;
ELSE
nxt_delay_cnt <= 1;
END IF; END IF;
END IF; ELSE
nxt_delay_cnt <= delay_cnt + 1;
IF delay_cnt = delay THEN IF (delay_cnt+1) = delay THEN
nxt_out_val <= '1'; nxt_out_val <= '1';
END IF;
END IF; END IF;
ELSE
nxt_delay_cnt <= g_max_delay;
END IF; END IF;
END PROCESS; END PROCESS;
...@@ -95,5 +91,4 @@ BEGIN ...@@ -95,5 +91,4 @@ BEGIN
END IF; END IF;
END PROCESS; END PROCESS;
END rtl; END rtl;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment