cleanup: removed unused signals and state

This commit is contained in:
Erik Örtenberg 2025-05-23 16:41:41 +02:00
parent 9cdcb8cd74
commit 07150fe14a
2 changed files with 2 additions and 15 deletions

View File

@ -150,17 +150,6 @@ begin
else
next_tx_state <= TX_W_BODY;
end if;
when TX_AWAIT =>
-- Wait for RX FSM to get a response
if (st.curr_tx_transaction = WRITE_ADD or st.curr_tx_transaction = WRITE)
and st.curr_rx_transaction = WRITE_ACK then
next_tx_state <= IDLE;
elsif (st.curr_tx_transaction = READ_ADD or st.curr_tx_transaction = READ)
and st.curr_rx_transaction = READ_RESPONSE and (st.rx_stage = 1 or next_tx_transaction = WRITE or next_tx_transaction = WRITE_ADD) then
next_tx_state <= IDLE;
else
next_tx_state <= TX_AWAIT;
end if;
end case;
--- Next State Assignment Of RX FSM ---
case st.curr_rx_state is
@ -260,7 +249,6 @@ begin
if st.tx_stage > 0 then
local_next_data_out := st.manager_data((((st.tx_stage - 1) mod 4) + 1) * 8 - 1 downto ((((st.tx_stage - 1) mod 4) + 1) - 1) * 8);
end if;
when TX_AWAIT =>
when ADDR1 =>
local_next_data_out := st.curr_tx_addr(31 downto 24);
when ADDR2 =>
@ -421,7 +409,7 @@ begin
next_data_out <= local_next_data_out;
end process comb_proc;
-- Process updating internal registers based on primary clock
seq_proc: process(ext_to_socbridge_driver_rec.clk, st.ext_to_socbridge_driver_reg.data, rst, clk)
seq_proc: process(ext_to_socbridge_driver_rec.clk, rst, clk)
begin
if(rst = '1') then
st.ext_to_socbridge_driver_reg.data <= (others => '0');
@ -553,7 +541,6 @@ begin
end if;
when RX_AWAIT =>
st.manager_data <= manager_to_socbridge_driver.data;
-- THIS DOESN'T WORK FOR LARGER THAN 4 BYTE ACCESSES, SHOULD BE FIXED BUT NOT NEEDED IF ONLY 4 BYTE ACCESSES ARRIVE
if st.curr_tx_transaction = READ_RESPONSE or st.curr_tx_transaction = WRITE_ACK then
if (st.curr_rx_transaction = READ or st.curr_rx_transaction = READ_ADD) and (st.tx_stage - 2) mod 4 = 0 then
st.manager_addr <= std_logic_vector(to_unsigned(to_integer(unsigned(st.manager_addr) + 4), 32));

View File

@ -18,7 +18,7 @@ package socbridge_driver_pkg is
RX_R_BODY, RX_HEADER, RX_W_BODY);
type tx_state_t is
(IDLE, ADDR1, ADDR2, ADDR3, ADDR4, TX_AWAIT,
(IDLE, ADDR1, ADDR2, ADDR3, ADDR4,
TX_HEADER, TX_W_BODY, TX_R_BODY);
--- TRANSLATOR ---
type ctrl_inst_state_t is (IDLE, SEND, SEND_ACCEPTED, AWAIT);