aboutsummaryrefslogtreecommitdiffstats
path: root/serdes
diff options
context:
space:
mode:
authormatt <matt@221aa14e-8319-0410-a670-987f0aec2ac5>2008-10-08 05:53:22 +0000
committermatt <matt@221aa14e-8319-0410-a670-987f0aec2ac5>2008-10-08 05:53:22 +0000
commit898d5986f896627d0dd8973d89459a965c7f6806 (patch)
treefda68ac0bf35cc075af68c507435a32d704eb4b7 /serdes
parent8614511f0497a195386a6b7e03d25d040b7ea8ff (diff)
downloaduhd-898d5986f896627d0dd8973d89459a965c7f6806.tar.gz
uhd-898d5986f896627d0dd8973d89459a965c7f6806.tar.bz2
uhd-898d5986f896627d0dd8973d89459a965c7f6806.zip
added the basic wb<-->extram interface and a serdes interrupt to tell link status
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9746 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'serdes')
-rw-r--r--serdes/serdes.v4
-rw-r--r--serdes/serdes_rx.v21
2 files changed, 13 insertions, 12 deletions
diff --git a/serdes/serdes.v b/serdes/serdes.v
index 81e9f2b43..8429b8fd9 100644
--- a/serdes/serdes.v
+++ b/serdes/serdes.v
@@ -16,6 +16,8 @@ module serdes
output [15:0] tx_occupied, output tx_full, output tx_empty,
output [15:0] rx_occupied, output rx_full, output rx_empty,
+
+ output serdes_link_up,
output [31:0] debug0,
output [31:0] debug1);
@@ -40,7 +42,7 @@ module serdes
.wr_ready_i(wr_ready_i),.wr_full_i(wr_full_i),
.fifo_space(fifo_space), .xon_rcvd(xon_rcvd), .xoff_rcvd(xoff_rcvd),
.fifo_occupied(rx_occupied),.fifo_full(rx_full),.fifo_empty(rx_empty),
- .debug(debug_rx) );
+ .serdes_link_up(serdes_link_up), .debug(debug_rx) );
serdes_fc_tx serdes_fc_tx
(.clk(clk),.rst(rst),
diff --git a/serdes/serdes_rx.v b/serdes/serdes_rx.v
index bbe263b14..efcd8af2c 100644
--- a/serdes/serdes_rx.v
+++ b/serdes/serdes_rx.v
@@ -42,6 +42,7 @@ module serdes_rx
output xon_rcvd, output xoff_rcvd,
output [15:0] fifo_occupied, output fifo_full, output fifo_empty,
+ output reg serdes_link_up,
output [31:0] debug
);
@@ -336,18 +337,16 @@ module serdes_rx
assign wr_dat_o = line_o;
- /*
- assign debug = { { fifo_space[15:8] },
- { fifo_space[7:0] },
- { 2'd0, error_i, sop_i, eop_i, error_o, sop_o, eop_o },
- { full, empty, write, read, xfer_active, state[2:0] } };
-
- assign debug = { { xoff_rcvd,xon_rcvd,sop_i,eop_i,error_i,state[2:0] },
- { odd, wait_here, write_pre, write_d, write, full, chosen_data[17:16]},
- { chosen_data[15:8] },
- { chosen_data[7:0] } };
- */
+ wire slu = ~({2'b11,K_ERROR}=={ser_rkmsb,ser_rklsb,ser_r});
+ reg [3:0] slu_reg;
+
+ always @(posedge clk)
+ if(rst) slu_reg <= 0;
+ else slu_reg <= {slu_reg[2:0],slu};
+ always @(posedge clk)
+ serdes_link_up <= &slu_reg[3:1];
+
assign debug = { full, empty, odd, xfer_active, sop_i, eop_i, error_i, state[2:0] };
endmodule // serdes_rx