diff --git a/litex/soc/software/include/hw/ethmac_mem.h b/litex/soc/software/include/hw/ethmac_mem.h deleted file mode 100644 index 03c7b96d0..000000000 --- a/litex/soc/software/include/hw/ethmac_mem.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __HW_ETHMAC_MEM_H -#define __HW_ETHMAC_MEM_H - -#include - -#define ETHMAC_RX0_BASE ETHMAC_BASE -#define ETHMAC_RX1_BASE (ETHMAC_BASE+0x0800) -#define ETHMAC_TX0_BASE (ETHMAC_BASE+0x1000) -#define ETHMAC_TX1_BASE (ETHMAC_BASE+0x1800) - -#endif diff --git a/litex/soc/software/libnet/microudp.c b/litex/soc/software/libnet/microudp.c index 1850a274a..90b73a7e1 100644 --- a/litex/soc/software/libnet/microudp.c +++ b/litex/soc/software/libnet/microudp.c @@ -1,4 +1,6 @@ #include +#include + #ifdef CSR_ETHMAC_BASE #include @@ -6,7 +8,6 @@ #include #include #include -#include #include @@ -415,10 +416,10 @@ void microudp_start(const unsigned char *macaddr, unsigned int ip) ethmac_sram_reader_ev_pending_write(ETHMAC_EV_SRAM_READER); ethmac_sram_writer_ev_pending_write(ETHMAC_EV_SRAM_WRITER); - rxbuffer0 = (ethernet_buffer *)ETHMAC_RX0_BASE; - rxbuffer1 = (ethernet_buffer *)ETHMAC_RX1_BASE; - txbuffer0 = (ethernet_buffer *)ETHMAC_TX0_BASE; - txbuffer1 = (ethernet_buffer *)ETHMAC_TX1_BASE; + rxbuffer0 = (ethernet_buffer *)(ETHMAC_BASE + 0*ETHMAC_SLOT_SIZE); + rxbuffer1 = (ethernet_buffer *)(ETHMAC_BASE + 1*ETHMAC_SLOT_SIZE); + txbuffer0 = (ethernet_buffer *)(ETHMAC_BASE + 2*ETHMAC_SLOT_SIZE); + txbuffer1 = (ethernet_buffer *)(ETHMAC_BASE + 3*ETHMAC_SLOT_SIZE); rxslot = 0; txslot = 0;