summaryrefslogtreecommitdiffstats
path: root/usrp2/fifo
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-22 17:12:41 -0800
committerJosh Blum <josh@joshknows.com>2010-11-23 19:06:59 -0800
commit05f7a0d5c5070203172683020ecde79c0f15fe28 (patch)
tree93c5cc312aee8f9888b2061cf82249bbd6aed0a0 /usrp2/fifo
parent9633a82509463d3bffcb9e8cae4db66dd4d79812 (diff)
downloaduhd-05f7a0d5c5070203172683020ecde79c0f15fe28.tar.gz
uhd-05f7a0d5c5070203172683020ecde79c0f15fe28.tar.bz2
uhd-05f7a0d5c5070203172683020ecde79c0f15fe28.zip
packet_router: moved udp tx proto machine into packet router, replaced udp_wrapper in top level with some fifo conversion stuff
Diffstat (limited to 'usrp2/fifo')
-rw-r--r--usrp2/fifo/packet_router.v44
1 files changed, 42 insertions, 2 deletions
diff --git a/usrp2/fifo/packet_router.v b/usrp2/fifo/packet_router.v
index 8bd687c5a..0ccf665f9 100644
--- a/usrp2/fifo/packet_router.v
+++ b/usrp2/fifo/packet_router.v
@@ -70,6 +70,9 @@ module packet_router
wire [35:0] com_out_data;
wire com_out_valid;
wire com_out_ready;
+ wire [35:0] udp_out_data;
+ wire udp_out_valid;
+ wire udp_out_ready;
////////////////////////////////////////////////////////////////////
// status and control handshakes
@@ -180,7 +183,7 @@ module packet_router
);
////////////////////////////////////////////////////////////////////
- // Communication output source combiner
+ // Communication output source combiner (feeds UDP proto machine)
// - DSP framer
// - CPU input
// - Error input
@@ -215,7 +218,7 @@ module packet_router
.clk(stream_clk), .reset(stream_rst), .clear(stream_clr),
.data0_i(_combiner0_data), .src0_rdy_i(_combiner0_valid), .dst0_rdy_o(_combiner0_ready),
.data1_i(_combiner1_data), .src1_rdy_i(_combiner1_valid), .dst1_rdy_o(_combiner1_ready),
- .data_o(com_out_data), .src_rdy_o(com_out_valid), .dst_rdy_i(com_out_ready)
+ .data_o(udp_out_data), .src_rdy_o(udp_out_valid), .dst_rdy_i(udp_out_ready)
);
////////////////////////////////////////////////////////////////////
@@ -553,6 +556,43 @@ module packet_router
);
////////////////////////////////////////////////////////////////////
+ // UDP TX Protocol machine
+ ////////////////////////////////////////////////////////////////////
+
+ //dummy signals to connect the components below
+ wire [18:0] _udp_r2s_data, _udp_s2p_data, _udp_p2s_data, _udp_s2r_data;
+ wire _udp_r2s_valid, _udp_s2p_valid, _udp_p2s_valid, _udp_s2r_valid;
+ wire _udp_r2s_ready, _udp_s2p_ready, _udp_p2s_ready, _udp_s2r_ready;
+
+ fifo36_to_fifo19 udp_fifo36_to_fifo19
+ (.clk(stream_clk), .reset(stream_rst), .clear(stream_clr),
+ .f36_datain(udp_out_data), .f36_src_rdy_i(udp_out_valid), .f36_dst_rdy_o(udp_out_ready),
+ .f19_dataout(_udp_r2s_data), .f19_src_rdy_o(_udp_r2s_valid), .f19_dst_rdy_i(_udp_r2s_ready) );
+
+ fifo_short #(.WIDTH(19)) udp_shortfifo19_inp
+ (.clk(stream_clk), .reset(stream_rst), .clear(stream_clr),
+ .datain(_udp_r2s_data), .src_rdy_i(_udp_r2s_valid), .dst_rdy_o(_udp_r2s_ready),
+ .dataout(_udp_s2p_data), .src_rdy_o(_udp_s2p_valid), .dst_rdy_i(_udp_s2p_ready),
+ .space(), .occupied() );
+
+ prot_eng_tx #(.BASE(UDP_BASE)) udp_prot_eng_tx
+ (.clk(stream_clk), .reset(stream_rst), .clear(stream_clr),
+ .set_stb(set_stb), .set_addr(set_addr), .set_data(set_data),
+ .datain(_udp_s2p_data), .src_rdy_i(_udp_s2p_valid), .dst_rdy_o(_udp_s2p_ready),
+ .dataout(_udp_p2s_data), .src_rdy_o(_udp_p2s_valid), .dst_rdy_i(_udp_p2s_ready) );
+
+ fifo_short #(.WIDTH(19)) udp_shortfifo19_out
+ (.clk(stream_clk), .reset(stream_rst), .clear(stream_clr),
+ .datain(_udp_p2s_data), .src_rdy_i(_udp_p2s_valid), .dst_rdy_o(_udp_p2s_ready),
+ .dataout(_udp_s2r_data), .src_rdy_o(_udp_s2r_valid), .dst_rdy_i(_udp_s2r_ready),
+ .space(), .occupied() );
+
+ fifo19_to_fifo36 udp_fifo19_to_fifo36
+ (.clk(stream_clk), .reset(stream_rst), .clear(stream_clr),
+ .f19_datain(_udp_s2r_data), .f19_src_rdy_i(_udp_s2r_valid), .f19_dst_rdy_o(_udp_s2r_ready),
+ .f36_dataout(com_out_data), .f36_src_rdy_o(com_out_valid), .f36_dst_rdy_i(com_out_ready) );
+
+ ////////////////////////////////////////////////////////////////////
// Assign debugs
////////////////////////////////////////////////////////////////////