Merge remote-tracking branch 'remotes/origin/1.10006.gen_seq_bug_fix'

This commit is contained in:
gianmarcogirau 2019-05-17 10:53:11 +01:00
commit 0636ecb4fc

View file

@ -6,7 +6,7 @@
-- Author : Robbie Temple (original)
-- Company : Global Inkjet Systems
-- Created : 2016-05-12
-- Last update: 2019-05-10
-- Last update: 2019-05-17
-- SVN ID : Git
-- Standard : VHDL'2008
-------------------------------------------------------------------------------
@ -136,7 +136,7 @@ architecture rtl of generic_sequencer_15 is
signal ld_start_addr, inc_ram_addr : std_logic;
signal ld_trig_mask, ld_trig_sel : std_logic;
signal ld_pos : std_logic;
signal flag, alu_upd : std_logic;
signal zero_flag, alu_upd : std_logic;
signal clr_vec_i, clr_vec_ii : std_logic;
signal fetch_op, ramp_up : std_logic;
signal op_cnt_done, inc_op_cnt : std_logic;
@ -285,6 +285,10 @@ begin
trig_int <= trigger_in(to_integer(unsigned(trig_sel))) and trig_mask(to_integer(unsigned(trig_sel)));
--pragma translate_off
assert (to_integer(unsigned(trig_sel)) < TRIGGER_WIDTH) report "ERROR: trig_sel out of selectable trigger mask" severity failure;
--pragma translate_off
-----------------------------------------------------------------------------
-- Dual-Port Memory buffer
-----------------------------------------------------------------------------
@ -586,8 +590,8 @@ begin
ld_jmp_addr <= '1' when decode = '1' and (jump_abs = '1' or jump_rel = '1' or jump_r1 = '1') else '0';
jump_abs <= '1' when (opcode = CMD_JUMP and (subcode = X"0" or (subcode = X"1" and flag = '1') or (subcode = X"2" and flag = '0'))) or (opcode = CMD_END and subcode = X"1") else '0';
jump_rel <= '1' when (opcode = CMD_BRANCH and (subcode = X"0" or (subcode = X"1" and flag = '1') or (subcode = X"2" and flag = '0'))) or (opcode = CMD_LOOP and loop_done = '0') or (opcode = CMD_END and subcode = X"2") else '0';
jump_abs <= '1' when (opcode = CMD_JUMP and (subcode = X"0" or (subcode = X"1" and zero_flag = '1') or (subcode = X"2" and zero_flag = '0'))) or (opcode = CMD_END and subcode = X"1") else '0';
jump_rel <= '1' when (opcode = CMD_BRANCH and (subcode = X"0" or (subcode = X"1" and zero_flag = '1') or (subcode = X"2" and zero_flag = '0'))) or (opcode = CMD_LOOP and loop_done = '0') or (opcode = CMD_END and subcode = X"2") else '0';
jump_r1 <= '1' when opcode = CMD_JUMP and subcode = X"F" else '0';
save_ret_addr <= ld_jmp_addr;
@ -710,21 +714,21 @@ begin
case subcode is
when x"0" =>
if ((trigger_in(TRIGGER_WIDTH - 1 downto 0) and trig_mask(TRIGGER_WIDTH - 1 downto 0)) = (operand_comp(TRIGGER_WIDTH - 1 downto 0) and trig_mask(TRIGGER_WIDTH - 1 downto 0))) then
flag <= '1';
zero_flag <= '1';
else
flag <= '0';
zero_flag <= '0';
end if;
when x"1" =>
if (r1 = operand_1) then
flag <= '1';
zero_flag <= '1';
else
flag <= '0';
zero_flag <= '0';
end if;
when x"2" | x"3" | x"4" =>
if (signed(r1_next) = 0) then
flag <= '1';
zero_flag <= '1';
else
flag <= '0';
zero_flag <= '0';
end if;
when others => null;
end case;