Skip to content

Commit

Permalink
debug EOI #736
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Gardner-Stephen committed Aug 13, 2024
1 parent 6755b24 commit de671be
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/vhdl/internal1581.vhdl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ architecture romanesque_revival of internal1581 is

signal fast_serial_direction : std_logic;
signal atn_ack : std_logic;

signal last_address : unsigned(15 downto 0) := to_unsigned(0,16);
signal report_read : std_logic := '0';

begin

Expand Down Expand Up @@ -300,8 +303,22 @@ begin

-- Export last byte written to 1581 RX byte location to support automated
-- tests of IEC communications in tb_iec_serial.vhdl
if address = x"0054" and cpu_write_n='0' then
last_rx_byte <= wdata;
-- Also report
report_read <= '0';
last_address <= address;
if last_address /= address then
if address = x"0054" and cpu_write_n='0' then
last_rx_byte <= wdata;
end if;
if address = x"0051" and cpu_write_n='0' then
report "1581DOS: Setting EOI byte to $" & to_hexstring(wdata);
end if;
if address = x"0051" and cpu_write_n='1' then
report_read <= '1';
end if;
end if;
if report_read='1' and cpu_write_n='1' then
report "1581DOS: Reading EOI byte value $" & to_hexstring(rdata);
end if;

end if;
Expand Down

0 comments on commit de671be

Please sign in to comment.