From faa915824a672e2f426846dd4341b9b69ce68978 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Tue, 23 Sep 2025 12:50:29 +0200 Subject: [PATCH] rmii: Do not prepend sync header This is done by the MAC. --- trashernet/trashernet_rmii.vhd | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/trashernet/trashernet_rmii.vhd b/trashernet/trashernet_rmii.vhd index f1c4cd9..ffcff6c 100644 --- a/trashernet/trashernet_rmii.vhd +++ b/trashernet/trashernet_rmii.vhd @@ -182,7 +182,7 @@ begin signal temp_tx_data_en : std_logic; signal temp_tx_data_ack : std_logic; - type state_t is (IDLE, HEADER, DATA, IPG); + type state_t is (IDLE, DATA, IPG); signal state : state_t; signal sr : byte; signal dibit_cnt : integer range 0 to 3; @@ -250,25 +250,14 @@ begin if byte_done then if byte_cnt > 0 then byte_cnt <= byte_cnt - 1; - else end if; end if; case state is when IDLE => - sr <= x"55"; - byte_cnt <= SYNC_HEADER_SIZE_BYTES - 1; + sr <= temp_tx_data; dibit_cnt <= 0; if temp_tx_data_en then - state <= HEADER; - end if; - - when HEADER => - sr <= x"55"; - if not temp_tx_data_en then - state <= IDLE; - elsif block_done then - sr <= x"D5"; state <= DATA; end if; @@ -291,10 +280,10 @@ begin byte_done <= '1' when dibit_cnt = 3 else '0'; block_done <= '1' when (byte_cnt = 0) and (byte_done = '1') else '0'; temp_tx_data_ack <= '1' when (state = DATA) and (byte_done = '1') and (temp_tx_data_en = '1') else '0'; - phy_out.tx_active <= '1' when (state = HEADER) or (state = DATA) else '0'; + phy_out.tx_active <= '1' when state = DATA else '0'; rmii_txd <= sr(1 downto 0); - rmii_tx_en <= '1' when (state = HEADER) or (state = DATA) else '0'; + rmii_tx_en <= '1' when state = DATA else '0'; end block transmitter; end architecture rtl;