From 319153388977463d0b1922f3534df0f90b8904c1 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 7 Dec 2015 12:03:36 +0100 Subject: [PATCH] soc/software/libnet: add debug defines on microudp --- litex/soc/software/libnet/microudp.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/litex/soc/software/libnet/microudp.c b/litex/soc/software/libnet/microudp.c index 1f0191fb..100bd6f9 100644 --- a/litex/soc/software/libnet/microudp.c +++ b/litex/soc/software/libnet/microudp.c @@ -9,6 +9,9 @@ #include +//#define DEBUG_MICROUDP_TX +//#define DEBUG_MICROUDP_TX + #define ETHERTYPE_ARP 0x0806 #define ETHERTYPE_IP 0x0800 @@ -132,6 +135,15 @@ static void send_packet(void) txbuffer->raw[txlen+3] = (crc & 0xff000000) >> 24; txlen += 4; #endif + +#ifdef DEBUG_MICROUDP_TX + int j; + printf(">>>> txlen : %d\n", txlen); + for(j=0;jraw[j]); + printf("\n"); +#endif + ethmac_sram_reader_slot_write(txslot); ethmac_sram_reader_length_write(txlen); while(!(ethmac_sram_reader_ready_read())); @@ -357,6 +369,14 @@ static void process_frame(void) { flush_cpu_dcache(); +#ifdef DEBUG_MICROUDP_RX + int j; + printf("<<< rxlen : %d\n", rxlen); + for(j=0;jraw[j]); + printf("\n"); +#endif + #ifndef HW_PREAMBLE_CRC int i; for(i=0;i<7;i++) -- 2.30.2