summaryrefslogtreecommitdiff
path: root/usrp2/fpga/simple_gemac/simple_gemac_rx.v
blob: 8650a69a9a1279453c0bf3e2c4d90eb770db63e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34


module simple_gemac_rx
  (input clk125, input reset,
   input GMII_RX_CLK, input GMII_RX_DV, input GMII_RX_ER, input [7:0] GMII_RXD,
   output rx_clk, output [7:0] rx_data, output rx_valid, output rx_error, output rx_ack,
   output reg [15:0] pause_quanta_rcvd, output reg pause_rcvd );

   
   
   initial 
     begin
	pause_rcvd    <= 0;
	pause_quanta_rcvd  = 10;
	#50000 pause_rcvd <= 1;
	@(posedge rx_clk)
	  pause_rcvd <= 0;
	repeat (100)
	  @(posedge rx_clk);
	pause_quanta_rcvd <= 15;
	pause_rcvd 	  <= 1;
	@(posedge rx_clk)
	  pause_rcvd <= 0;
	repeat (1200)
	  @(posedge rx_clk);
	pause_rcvd 	  <= 1;
	@(posedge rx_clk)
	  pause_rcvd <= 0;
	
     end
   
   assign rx_clk 	   = GMII_RX_CLK;
   
endmodule // simple_gemac_rx