fixed data not coming through. writes were problematic in tb, reads in socbridge

This commit is contained in:
Erik Örtenberg 2025-03-11 14:55:25 +01:00
parent 4c4a651ee7
commit 82278e77cf
2 changed files with 4 additions and 2 deletions

View File

@ -173,7 +173,7 @@ begin
curr_word <= "00101001";
wait for CLK_PERIOD;
curr_word <= "00000000";
wait for CLK_PERIOD*10;
wait for CLK_PERIOD*20;
curr_word <= "01100001";
wait for CLK_PERIOD;
curr_word <= "00100000";
@ -197,6 +197,7 @@ begin
int_socbridge_in.payload <= std_logic_vector(to_unsigned(input, int_socbridge_in.payload'length));
input := input + 1 mod 256;
wait until rising_edge(clk) and int_socbridge_out.is_full_out = '0';
wait until falling_edge(clk);
int_socbridge_in.write_enable_out <= '1';
int_socbridge_in.payload <= std_logic_vector(to_unsigned(input, int_socbridge_in.payload'length));
input := input + 1 mod 256;

View File

@ -166,7 +166,7 @@ begin
when RX_RESPONSE =>
-- Wait for read response.
if curr_response = READ_RESPONSE then
next_state <= RX_BODY_NO_OUT;
next_state <= RX_BODY;
else
next_state <= RX_RESPONSE;
end if;
@ -241,6 +241,7 @@ begin
if st.curr_cmd = WRITE_ADD then
int_out.is_full_out <= '0';
ext_out_data_cmd := int_in.payload;
report integer'image(to_integer(signed(ext_out_data_cmd))) & " "& integer'image(to_integer(signed(int_in.payload)));
end if;
end case;
next_parity_out <= calc_parity(ext_out_data_cmd);