ELGIP-47 - Fixed issue with Bus Burst instruction
This commit is contained in:
parent
8ff7429513
commit
b9500b28ea
3 changed files with 39 additions and 28 deletions
|
|
@ -111,9 +111,9 @@ add wave -noupdate /generic_sequencer_15_tb/iUUT/clr_vec_ii
|
|||
add wave -noupdate /generic_sequencer_15_tb/iUUT/op_cnt
|
||||
add wave -noupdate /generic_sequencer_15_tb/iUUT/op_cnt_done
|
||||
add wave -noupdate /generic_sequencer_15_tb/iUUT/inc_op_cnt
|
||||
add wave -noupdate /generic_sequencer_15_tb/iUUT/bus_ack
|
||||
add wave -noupdate -radix hexadecimal /generic_sequencer_15_tb/iUUT/bus_data
|
||||
add wave -noupdate /generic_sequencer_15_tb/iUUT/bus_valid
|
||||
add wave -noupdate /generic_sequencer_15_tb/iUUT/bus_ack
|
||||
add wave -noupdate /generic_sequencer_15_tb/iUUT/bus_valid_i
|
||||
add wave -noupdate /generic_sequencer_15_tb/iUUT/bus_pause
|
||||
add wave -noupdate -radix hexadecimal /generic_sequencer_15_tb/iUUT/pos_store
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
-- Author : Robbie Temple (original)
|
||||
-- Company : Global Inkjet Systems
|
||||
-- Created : 2016-05-12
|
||||
-- Last update: 2019-04-03
|
||||
-- Last update: 2019-04-04
|
||||
-- SVN ID : Git
|
||||
-- Standard : VHDL'2008
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
@ -132,7 +132,7 @@ architecture rtl of generic_sequencer_15 is
|
|||
signal r1_data_valid : std_logic; -- strobe to cause R1 to be updated with R1_data value
|
||||
|
||||
signal decode, clr_vec, ld_vec : std_logic;
|
||||
signal bus_valid_i, busy_i : std_logic;
|
||||
signal bus_valid_i, busy_i : std_logic;
|
||||
signal ld_start_addr, inc_ram_addr : std_logic;
|
||||
signal ld_trig_mask, ld_trig_sel : std_logic;
|
||||
signal ld_pos : std_logic;
|
||||
|
|
@ -438,13 +438,14 @@ begin
|
|||
end if;
|
||||
|
||||
when s_bus_burst =>
|
||||
if(BUS_BURST_EN = true) then
|
||||
if(op_cnt_done = '1') then
|
||||
if(BUS_BURST_EN = true) then
|
||||
bus_valid_i <= '1';
|
||||
if(op_cnt_done = '1' and bus_ack = '1') then
|
||||
bus_valid_i <= '0';
|
||||
fsm_nxt <= s_fetch;
|
||||
elsif(bus_ack = '1' and bus_pause = '0') then
|
||||
elsif(bus_pause = '0') then
|
||||
inc_ram_addr <= '1';
|
||||
inc_op_cnt <= '1';
|
||||
bus_valid_i <= '1';
|
||||
end if;
|
||||
else
|
||||
fsm_nxt <= s_fetch;
|
||||
|
|
@ -637,11 +638,11 @@ begin
|
|||
pBURST_REGs : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
bus_valid <= bus_valid_i;
|
||||
bus_pause <= bus_valid_i;
|
||||
bus_valid <= bus_valid_i and not (bus_ack and bus_pause);
|
||||
bus_pause <= bus_valid_i and (not bus_ack or inc_ram_addr);
|
||||
if(seq_enable = '0') then
|
||||
bus_data <= (others => '0');
|
||||
elsif(bus_valid_i = '1') then
|
||||
elsif(bus_valid_i = '1' and (bus_pause = '0' or bus_ack = '1')) then
|
||||
bus_data <= ram_rd_data(BUS_WIDTH-1 downto 0);
|
||||
end if;
|
||||
end if;
|
||||
|
|
|
|||
|
|
@ -435,14 +435,14 @@ begin
|
|||
end if;
|
||||
end loop; -- n
|
||||
if(valid = false) then
|
||||
log("ERROR: cannot detect bus_valid before timeout.", VLOW);
|
||||
log("ERROR: cannot detect bus_valid before timeout (Expected value = " & to_hstring(exp_val) & ").", VLOW);
|
||||
error_flag <= true;
|
||||
wait;
|
||||
else
|
||||
if(bus_data /= exp_val) then
|
||||
log("ERROR: detected bus_data = 0x" & to_hstring(bus_data) & ", expected = 0x" & to_hstring(exp_val) & ".", VLOW);
|
||||
error_flag <= true;
|
||||
wait;
|
||||
error_flag <= true;
|
||||
wait;
|
||||
end if;
|
||||
end if;
|
||||
end procedure check_burst_data;
|
||||
|
|
@ -706,16 +706,24 @@ begin
|
|||
trigger_in <= (0 => '1', others => '0');
|
||||
wait_clk_cycles(1);
|
||||
trigger_in <= (others => '0');
|
||||
wait_clk_cycles(5);
|
||||
wait_clk_cycles(2);
|
||||
if(bus_valid /='1') then
|
||||
wait until bus_valid = '1';
|
||||
end if;
|
||||
bus_ack <= '1';
|
||||
check_burst_data(X"DEADBEEF", 4);
|
||||
check_burst_data(X"BADA5555", 4);
|
||||
check_burst_data(X"CAFEF00D", 4);
|
||||
check_burst_data(X"DEADBEEF", 4);
|
||||
check_burst_data(X"FFFF0000", 4);
|
||||
check_burst_data(X"0000FFFF", 4);
|
||||
check_burst_data(X"DEADBEEF", 1);
|
||||
wait_clk_cycles(2);
|
||||
check_burst_data(X"BADA5555", 1);
|
||||
wait_clk_cycles(2);
|
||||
check_burst_data(X"CAFEF00D", 1);
|
||||
wait_clk_cycles(2);
|
||||
check_burst_data(X"DEADBEEF", 1);
|
||||
wait_clk_cycles(4);
|
||||
check_burst_data(X"FFFF0000", 1);
|
||||
wait_clk_cycles(4);
|
||||
check_burst_data(X"0000FFFF", 1);
|
||||
|
||||
wait until busy = '0';
|
||||
wait until bus_valid = '0';
|
||||
bus_ack <= '0';
|
||||
wait_clk_cycles(10);
|
||||
|
||||
|
|
@ -733,34 +741,36 @@ begin
|
|||
trigger_in <= (others => '0');
|
||||
wait_clk_cycles(5);
|
||||
bus_ack <= '1';
|
||||
--wait_clk_cycles(1);
|
||||
--bus_ack <= '0';
|
||||
check_burst_data(X"DEADBEEF", 1);
|
||||
wait_clk_cycles(1);
|
||||
bus_ack <= '0';
|
||||
check_burst_data(X"DEADBEEF", 4);
|
||||
wait_clk_cycles(3);
|
||||
bus_ack <= '1';
|
||||
check_burst_data(X"BADA5555", 1);
|
||||
wait_clk_cycles(1);
|
||||
bus_ack <= '0';
|
||||
wait_clk_cycles(1);
|
||||
bus_ack <= '1';
|
||||
check_burst_data(X"CAFEF00D", 1);
|
||||
wait_clk_cycles(1);
|
||||
bus_ack <= '0';
|
||||
check_burst_data(X"BADA5555", 4);
|
||||
wait_clk_cycles(3);
|
||||
bus_ack <= '1';
|
||||
check_burst_data(X"DEADBEEF", 1);
|
||||
wait_clk_cycles(1);
|
||||
bus_ack <= '0';
|
||||
check_burst_data(X"CAFEF00D", 4);
|
||||
wait_clk_cycles(3);
|
||||
bus_ack <= '1';
|
||||
check_burst_data(X"FFFF0000", 1);
|
||||
wait_clk_cycles(1);
|
||||
bus_ack <= '0';
|
||||
check_burst_data(X"DEADBEEF", 4);
|
||||
wait_clk_cycles(3);
|
||||
bus_ack <= '1';
|
||||
check_burst_data(X"0000FFFF", 1);
|
||||
wait_clk_cycles(1);
|
||||
bus_ack <= '0';
|
||||
check_burst_data(X"FFFF0000", 4);
|
||||
wait_clk_cycles(3);
|
||||
bus_ack <= '1';
|
||||
wait_clk_cycles(1);
|
||||
bus_ack <= '0';
|
||||
check_burst_data(X"0000FFFF", 4);
|
||||
|
||||
wait until busy = '0';
|
||||
wait_clk_cycles(10);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue