Commit ba6430bd authored by Denia Bouhired-Ferrag's avatar Denia Bouhired-Ferrag

Small modifications to account for very short pulses of 250ns. Previously module…

Small modifications to account for very short pulses of 250ns. Previously module would not work properly for the required 2MHz frequency
parent 7aabf27e
......@@ -51,6 +51,8 @@
-- side.
-- 24-07-2014 Theodor Stana Added g_with_fixed_pwidth generic and
-- subsequent logic.
-- 19-12-2016 Denia Bouhired Small modification to FSM to allow for very short 250ns pulses.
--==============================================================================
-- TODO: -
--==============================================================================
......@@ -284,16 +286,23 @@ gen_with_fixed_pwidth : if (g_with_fixed_pwidth = true) generate
end if;
---------------------------------------------------------------------
-- GEN_GF_OFF
-- GEN_GF_OFFc
---------------------------------------------------------------------
-- Extend the generated pulse to the required pulse width.
---------------------------------------------------------------------
when GEN_GF_OFF =>
-- Pulse logic and state change
pulse_cnt <= pulse_cnt + 1;
if (pulse_cnt = c_max_gen_gf_off) then
if pulse_cnt = c_max_gen_gf_off then
state <= REJ_GF_OFF;
end if;
if c_max_gen_gf_off = 0 then
state <= REJ_GF_OFF;
pulse_gf_off_rst <= '1';
end if;
-- Pulse error assignment
pulse_err_p_o <= '0';
......@@ -310,7 +319,8 @@ gen_with_fixed_pwidth : if (g_with_fixed_pwidth = true) generate
-- Pulse logic and state change
pulse_gf_off_rst <= '1';
pulse_cnt <= pulse_cnt + 1;
if (pulse_cnt = c_max_rej_gf_off) then
if (pulse_cnt = c_max_rej_gf_off or c_max_rej_gf_off = 5) then -- second condition in
--the OR added to allow very short pulses of 250ns through
state <= IDLE;
end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment