Commit e30a22c0 authored by Dave Newbold's avatar Dave Newbold

Fixing startup for new ZS_DEL

parent 4082b690
......@@ -122,7 +122,7 @@ begin
begin
if falling_edge(clk40) then
if (mode = '1' and nzen = '0') or (mode = '0' and nzen_d = '0') then
pnz <= to_unsigned(0, pnz'length);
pnz <= (others => '0');
else
if (mode = '0' and pnz = ZS_FIRST_ADDR - 1) or pnz = ZS_LAST_ADDR then
pnz <= (others => '0');
......
......@@ -46,13 +46,11 @@ begin
end if;
if up = '1' then
if and_reduce(std_logic_vector(sctr(BLK_RADIX - 1 downto 0))) = '1' then
if unsigned(sctr(3 + BLK_RADIX downto BLK_RADIX)) = 0 then
nzs_en <= '1';
elsif unsigned(sctr(3 + BLK_RADIX downto BLK_RADIX)) = NZS_BLKS then
zs_en <= '1';
elsif unsigned(sctr(7 + BLK_RADIX downto BLK_RADIX)) = NZS_BLKS - 1 + unsigned(zs_blks) then
trig_en <= '1';
end if;
nzs_en = '1';
elsif unsigned(sctr(3 + BLK_RADIX downto BLK_RADIX)) = NZS_BLKS and sctr(BLK_RADIX - 1 downto 0) = to_unsigned(ZS_DEL, BLK_RADIX) then
nzs_en <= '1';
elsif unsigned(sctr(7 + BLK_RADIX downto BLK_RADIX)) = NZS_BLKS + unsigned(zs_blks) then
trig_en <= '1';
end if;
end if;
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