commit-gnuradio
[Top][All Lists]
Advanced

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

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


From: matt
Subject: [Commit-gnuradio] r10719 - gnuradio/trunk/usrp2/fpga/simple_gemac
Date: Tue, 31 Mar 2009 01:51:53 -0600 (MDT)

Author: matt
Date: 2009-03-31 01:51:53 -0600 (Tue, 31 Mar 2009)
New Revision: 10719

Modified:
   gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tb.v
   gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tx.v
Log:
cleaned up a little


Modified: gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tb.v
===================================================================
--- gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tb.v    2009-03-31 
07:39:34 UTC (rev 10718)
+++ gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tb.v    2009-03-31 
07:51:53 UTC (rev 10719)
@@ -37,8 +37,7 @@
 
    task SendFlowCtrl;
      begin
-       $display("Sending Flow Control");
-        $display($time);
+       $display("Sending Flow Control, %d", $time);
        @(posedge clk);
        pause_req <= 1;
        @(posedge clk);
@@ -51,16 +50,14 @@
       input [7:0] data_start;
       input [31:0] data_len;
       begin
-        $display("Sending Packet Len=%d", data_len);
-        $display($time);
+        $display("Sending Packet Len=%d, %d", data_len, $time);
         count <= 1;
         tx_data  <= data_start;
         tx_error <= 0;
         tx_valid <= 1;
         while(~tx_ack)
           @(posedge tx_clk);
-//      $display("Packet Accepted");
-//      $display($time);
+        $display("Packet Accepted, %d", $time);
         while(count < data_len)
           begin
              tx_data <= tx_data + 1;
@@ -75,8 +72,7 @@
    task SendPacketFromFile;
       input [31:0] data_len;
       begin
-        $display("Sending Packet From File Len=%d",data_len);
-        $display($time);
+        $display("Sending Packet From File Len=%d, %d",data_len,$time);
         $readmemh( "test_packet.mem",pkt_rom );     
         count    = 0;
         tx_data  = pkt_rom[count];
@@ -84,8 +80,7 @@
         tx_valid = 1;
         while(~tx_ack)
           @(posedge tx_clk);
-//      $display("Packet Accepted");
-//      $display($time);
+        $display("Packet Accepted, %d",$time);
         count = 1;
         while(count < data_len)
           begin
@@ -112,31 +107,31 @@
    initial
      begin
        @(negedge reset);
-       repeat (100)
+       repeat (10)
          @(posedge clk);
        SendFlowCtrl;
-       repeat (200)
+       repeat (20)
          @(posedge clk);
        SendPacket(8'hAA,10);
-       repeat (100)
+       repeat (10)
          @(posedge clk);
        SendPacketFromFile(60);
-       repeat (100)
+       repeat (10)
          @(posedge clk);
        SendPacketFromFile(61);
-       repeat (100)
+       repeat (10)
          @(posedge clk);
        SendPacketFromFile(62);
-       repeat (100)
+       repeat (10)
          @(posedge clk);
        SendPacketFromFile(63);
-       repeat (100)
+       repeat (1)
          @(posedge clk);
        SendPacketFromFile(64);
-       repeat (100)
+       repeat (10)
          @(posedge clk);
        SendPacketFromFile(59);
-       repeat (100)
+       repeat (1)
          @(posedge clk);
        SendPacketFromFile(58);
        #10000 $finish;

Modified: gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tx.v
===================================================================
--- gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tx.v    2009-03-31 
07:39:34 UTC (rev 10718)
+++ gnuradio/trunk/usrp2/fpga/simple_gemac/simple_gemac_tx.v    2009-03-31 
07:51:53 UTC (rev 10719)
@@ -201,30 +201,11 @@
        (tx_state==TX_PAD) |
        (tx_state[6]);
 
-   reg [7:0] crc_ctr;
-   reg calc_crc_d1;
-   always @(posedge tx_clk) 
-     calc_crc_d1 <= calc_crc;
-   
-   always @(posedge tx_clk)
-     if(reset)
-       crc_ctr          <= 0;
-     else if(calc_crc)
-       crc_ctr          <= crc_ctr+1;
-     else if(calc_crc_d1)
-       $display("CRC COUNT = %d",crc_ctr);
-     else
-       crc_ctr <= 0;
-
    crc crc(.clk(tx_clk), .reset(reset), .clear(clear_crc),
            .data(txd_pre), .calc(calc_crc), .crc_out(crc_out));
 
    assign tx_ack    = (tx_state == TX_FIRSTBYTE);
 
-   reg tx_valid_d1;
-   always @(posedge tx_clk)
-     tx_valid_d1   <= tx_valid;
-   
    always @(posedge tx_clk) 
      begin
        GMII_TX_EN <= tx_en_pre;
@@ -244,3 +225,21 @@
      end
    
 endmodule // simple_gemac_tx
+
+// Testing code
+/*
+    reg [7:0] crc_ctr;
+   reg calc_crc_d1;
+   always @(posedge tx_clk) 
+     calc_crc_d1 <= calc_crc;
+   
+   always @(posedge tx_clk)
+     if(reset)
+       crc_ctr          <= 0;
+     else if(calc_crc)
+       crc_ctr          <= crc_ctr+1;
+     else if(calc_crc_d1)
+       $display("CRC COUNT = %d",crc_ctr);
+     else
+       crc_ctr <= 0;
+*/





reply via email to

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