summaryrefslogtreecommitdiff
path: root/usrp2/fpga/simple_gemac
diff options
context:
space:
mode:
authormatt2009-04-02 23:30:31 +0000
committermatt2009-04-02 23:30:31 +0000
commite18293239dbcdb1ed569cdc781a57a09852b40ec (patch)
treebac4d688dd85087a7750a54817c157e444f9cef8 /usrp2/fpga/simple_gemac
parente12cfbc559caec03dd0f2ca244478431ccbfb9c5 (diff)
downloadgnuradio-e18293239dbcdb1ed569cdc781a57a09852b40ec.tar.gz
gnuradio-e18293239dbcdb1ed569cdc781a57a09852b40ec.tar.bz2
gnuradio-e18293239dbcdb1ed569cdc781a57a09852b40ec.zip
simulate a hiccup in the filling of the fifo. If long enough, will cause a tx underrun.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10749 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2/fpga/simple_gemac')
-rw-r--r--usrp2/fpga/simple_gemac/eth_tasks.v15
1 files changed, 15 insertions, 0 deletions
diff --git a/usrp2/fpga/simple_gemac/eth_tasks.v b/usrp2/fpga/simple_gemac/eth_tasks.v
index f13d75f3b..d49f30e24 100644
--- a/usrp2/fpga/simple_gemac/eth_tasks.v
+++ b/usrp2/fpga/simple_gemac/eth_tasks.v
@@ -107,8 +107,21 @@ task SendPacketFromFile;
end
endtask // SendPacketFromFile
+task Waiter;
+ input [31:0] wait_length;
+ begin
+ tx_ll_src_rdy2 <= 0;
+ repeat(wait_length)
+ @(posedge clk);
+ tx_ll_src_rdy2 <= 1;
+ end
+endtask // Waiter
+
task SendPacketFromFile_ll8;
input [31:0] data_len;
+ input [31:0] wait_length;
+ input [31:0] wait_time;
+
integer count;
begin
$display("Sending Packet From File to LL8 Len=%d, %d",data_len,$time);
@@ -129,6 +142,8 @@ task SendPacketFromFile_ll8;
tx_ll_data2 <= pkt_rom[i];
tx_ll_sof2 <= 0;
@(posedge clk);
+ if(i==wait_time)
+ Waiter(wait_length);
end
while(~tx_ll_dst_rdy2)