commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10744 - gnuradio/trunk/usrp2/fpga/simple_gemac


From: matt
Subject: [Commit-gnuradio] r10744 - gnuradio/trunk/usrp2/fpga/simple_gemac
Date: Thu, 2 Apr 2009 02:19:03 -0600 (MDT)

Author: matt
Date: 2009-04-02 02:19:03 -0600 (Thu, 02 Apr 2009)
New Revision: 10744

Modified:
   gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tb.v
Log:
test multiple error types


Modified: gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tb.v
===================================================================
--- gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tb.v    2009-04-02 
08:16:11 UTC (rev 10743)
+++ gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tb.v    2009-04-02 
08:19:03 UTC (rev 10744)
@@ -18,14 +18,17 @@
    wire [7:0] rx_data, tx_data;
    
    reg [15:0] pause_time;
-   reg pause_req     = 0;
+   reg pause_req      = 0;
 
-   wire GMII_RX_CLK  = GMII_GTX_CLK;
+   wire GMII_RX_CLK   = GMII_GTX_CLK;
 
+   reg [7:0] FORCE_DAT_ERR = 0;
+   reg FORCE_ERR = 0;
+   
    // Loopback
    assign GMII_RX_DV  = GMII_TX_EN;
-   assign GMII_RX_ER  = GMII_TX_ER;
-   assign GMII_RXD    = GMII_TXD;
+   assign GMII_RX_ER  = GMII_TX_ER | FORCE_ERR;
+   assign GMII_RXD    = GMII_TXD ^ FORCE_DAT_ERR;
    
    simple_gemac simple_gemac
      (.clk125(clk),  .reset(reset),
@@ -48,7 +51,7 @@
    rxmac_to_ll8 rx_adapt
      (.clk(clk), .reset(reset), .clear(0),
       .rx_data(rx_data), .rx_valid(rx_valid), .rx_error(rx_error), 
.rx_ack(rx_ack),
-      .ll_data(rx_ll_data), .ll_sof(rx_ll_sof), .ll_eof(rx_ll_eof), 
+      .ll_data(rx_ll_data), .ll_sof(rx_ll_sof), .ll_eof(rx_ll_eof), 
.ll_error(rx_ll_error),
       .ll_src_rdy(rx_ll_src_rdy), .ll_dst_rdy(rx_ll_dst_rdy));
 
    ll8_shortfifo rx_sfifo
@@ -92,7 +95,7 @@
    initial
      for (i=0;i<65536;i=i+1)
        pkt_rom[i] <= 8'h0;
-      
+
    initial
      begin
        @(negedge reset);
@@ -135,6 +138,27 @@
        #100000 $finish;
      end
 
+    initial
+     begin
+       #90000;
+       @(posedge clk);
+       FORCE_DAT_ERR <= 8'h10;
+       @(posedge clk);
+       FORCE_DAT_ERR <= 8'h00;
+     end
+
+   initial
+     begin
+       #116000;
+       @(posedge clk);
+       FORCE_ERR <= 1;
+       @(posedge clk);
+       FORCE_ERR <= 0;
+     end
+
+   // Tests: Send and recv flow control, send and receive good packets, RX CRC 
err, RX_ER
+   // Still need to test: RX overrun, TX underrun
+   
    /*
    always @(posedge clk)
      if(GMII_TX_EN)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]