Update network_processor docs, add arp to diagram

This commit is contained in:
Byron Lathi
2024-08-19 17:40:50 -07:00
parent 8e87345f22
commit bcb5259f92
10 changed files with 216 additions and 43 deletions

View File

@@ -4,4 +4,5 @@ src/sub/cpu_wrapper/sources.list
src/sub/network_processor/sources.list src/sub/network_processor/sources.list
src/sub/rtl-common/sources.list src/sub/rtl-common/sources.list
src/sub/sd_controller_wrapper/sources.list src/sub/sd_controller_wrapper/sources.list
src/sub/wb2axip/sources.list src/sub/wb2axip/sources.list
src/sub/verilog-ethernet/sources.list

View File

@@ -1,6 +1,6 @@
<mxfile host="Electron" modified="2024-08-19T01:34:22.985Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="7YJNTvqT_vwzpQqfHzJo" version="21.2.8" type="device"> <mxfile host="Electron" modified="2024-08-20T00:38:33.871Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="K6e3hAK_SmFVhlEYEYQY" version="21.2.8" type="device">
<diagram name="Page-1" id="8lX2gjxiGhIz8fm0OWgg"> <diagram name="Page-1" id="8lX2gjxiGhIz8fm0OWgg">
<mxGraphModel dx="2408" dy="1069" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> <mxGraphModel dx="2927" dy="1425" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root> <root>
<mxCell id="0" /> <mxCell id="0" />
<mxCell id="1" parent="0" /> <mxCell id="1" parent="0" />
@@ -99,8 +99,8 @@
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-348" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.625;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;fillColor=#6a00ff;strokeColor=#3700CC;" parent="1" edge="1"> <mxCell id="hUmURhrymKCytomf8O3q-348" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.625;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;fillColor=#6a00ff;strokeColor=#3700CC;" parent="1" edge="1">
<mxGeometry relative="1" as="geometry"> <mxGeometry relative="1" as="geometry">
<mxPoint x="480" y="160" as="targetPoint" /> <mxPoint x="620.03" y="160" as="targetPoint" />
<mxPoint x="480" y="250" as="sourcePoint" /> <mxPoint x="620.03" y="250" as="sourcePoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-293" value="" style="group;fillColor=default;" parent="1" vertex="1" connectable="0"> <mxCell id="hUmURhrymKCytomf8O3q-293" value="" style="group;fillColor=default;" parent="1" vertex="1" connectable="0">
@@ -198,8 +198,8 @@
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-347" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.625;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;fillColor=#6a00ff;strokeColor=#3700CC;" parent="1" edge="1"> <mxCell id="hUmURhrymKCytomf8O3q-347" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.625;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;fillColor=#6a00ff;strokeColor=#3700CC;" parent="1" edge="1">
<mxGeometry relative="1" as="geometry"> <mxGeometry relative="1" as="geometry">
<mxPoint x="489.92" y="160" as="targetPoint" /> <mxPoint x="629.95" y="160" as="targetPoint" />
<mxPoint x="489.92" y="250" as="sourcePoint" /> <mxPoint x="629.95" y="250" as="sourcePoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-269" value="" style="group;fillColor=default;" parent="1" vertex="1" connectable="0"> <mxCell id="hUmURhrymKCytomf8O3q-269" value="" style="group;fillColor=default;" parent="1" vertex="1" connectable="0">
@@ -315,11 +315,11 @@
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-360" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fillColor=#d80073;strokeColor=#A50040;" parent="1" target="wy1xcPKCa-p-PBI3JPLa-122" edge="1"> <mxCell id="hUmURhrymKCytomf8O3q-360" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fillColor=#d80073;strokeColor=#A50040;" parent="1" target="wy1xcPKCa-p-PBI3JPLa-122" edge="1">
<mxGeometry relative="1" as="geometry"> <mxGeometry relative="1" as="geometry">
<mxPoint x="489.97" y="80" as="sourcePoint" /> <mxPoint x="630" y="80" as="sourcePoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="wy1xcPKCa-p-PBI3JPLa-122" value="APB Decoder" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1"> <mxCell id="wy1xcPKCa-p-PBI3JPLa-122" value="APB Decoder" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="409.97" y="120" width="160" height="40" as="geometry" /> <mxGeometry x="550" y="120" width="160" height="40" as="geometry" />
</mxCell> </mxCell>
<mxCell id="wy1xcPKCa-p-PBI3JPLa-129" value="" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=135;" parent="1" vertex="1"> <mxCell id="wy1xcPKCa-p-PBI3JPLa-129" value="" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=135;" parent="1" vertex="1">
<mxGeometry x="750" y="170" width="30" height="70" as="geometry" /> <mxGeometry x="750" y="170" width="30" height="70" as="geometry" />
@@ -377,16 +377,16 @@
<mxPoint x="280" y="80" as="targetPoint" /> <mxPoint x="280" y="80" as="targetPoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-14" value="" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" parent="1" vertex="1"> <mxCell id="hUmURhrymKCytomf8O3q-14" value="AXI4-Lite mux/demux" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" parent="1" vertex="1">
<mxGeometry x="200" y="120" width="160" height="40" as="geometry" /> <mxGeometry x="200" y="120" width="160" height="40" as="geometry" />
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-19" value="" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rotation=-90;" parent="1" vertex="1"> <mxCell id="hUmURhrymKCytomf8O3q-19" value="axis demux" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rotation=-90;" parent="1" vertex="1">
<mxGeometry x="-0.030000000000001137" y="320.03" width="120" height="40.06" as="geometry" /> <mxGeometry x="-0.030000000000001137" y="320.03" width="120" height="40.06" as="geometry" />
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fillColor=#e3c800;strokeColor=#B09500;" parent="1" source="hUmURhrymKCytomf8O3q-20" target="hUmURhrymKCytomf8O3q-24" edge="1"> <mxCell id="hUmURhrymKCytomf8O3q-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fillColor=#e3c800;strokeColor=#B09500;" parent="1" source="hUmURhrymKCytomf8O3q-20" target="hUmURhrymKCytomf8O3q-24" edge="1">
<mxGeometry relative="1" as="geometry" /> <mxGeometry relative="1" as="geometry" />
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-20" value="" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rotation=-90;" parent="1" vertex="1"> <mxCell id="hUmURhrymKCytomf8O3q-20" value="axis arb" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rotation=-90;" parent="1" vertex="1">
<mxGeometry y="540" width="120" height="40" as="geometry" /> <mxGeometry y="540" width="120" height="40" as="geometry" />
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#e3c800;strokeColor=#B09500;" parent="1" source="hUmURhrymKCytomf8O3q-23" target="hUmURhrymKCytomf8O3q-19" edge="1"> <mxCell id="hUmURhrymKCytomf8O3q-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#e3c800;strokeColor=#B09500;" parent="1" source="hUmURhrymKCytomf8O3q-23" target="hUmURhrymKCytomf8O3q-19" edge="1">
@@ -402,8 +402,8 @@
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-346" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.625;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;fillColor=#6a00ff;strokeColor=#3700CC;" parent="1" edge="1"> <mxCell id="hUmURhrymKCytomf8O3q-346" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.625;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;fillColor=#6a00ff;strokeColor=#3700CC;" parent="1" edge="1">
<mxGeometry relative="1" as="geometry"> <mxGeometry relative="1" as="geometry">
<mxPoint x="500" y="160" as="targetPoint" /> <mxPoint x="640.03" y="160" as="targetPoint" />
<mxPoint x="500" y="250" as="sourcePoint" /> <mxPoint x="640.03" y="250" as="sourcePoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-358" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fillColor=#d80073;strokeColor=#A50040;" parent="1" source="hUmURhrymKCytomf8O3q-24" edge="1"> <mxCell id="hUmURhrymKCytomf8O3q-358" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fillColor=#d80073;strokeColor=#A50040;" parent="1" source="hUmURhrymKCytomf8O3q-24" edge="1">
@@ -499,7 +499,7 @@
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="wy1xcPKCa-p-PBI3JPLa-102" value="REGS" style="rounded=0;whiteSpace=wrap;html=1;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;container=0;" parent="hUmURhrymKCytomf8O3q-268" vertex="1"> <mxCell id="wy1xcPKCa-p-PBI3JPLa-102" value="REGS" style="rounded=0;whiteSpace=wrap;html=1;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;container=0;" parent="hUmURhrymKCytomf8O3q-268" vertex="1">
<mxGeometry x="290" y="20.069999999999993" width="120" height="60" as="geometry" /> <mxGeometry x="430" y="9.999999999999993" width="120" height="60" as="geometry" />
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-16" value="Ring Buffer Manager" style="rounded=0;whiteSpace=wrap;html=1;container=0;" parent="hUmURhrymKCytomf8O3q-268" vertex="1"> <mxCell id="hUmURhrymKCytomf8O3q-16" value="Ring Buffer Manager" style="rounded=0;whiteSpace=wrap;html=1;container=0;" parent="hUmURhrymKCytomf8O3q-268" vertex="1">
<mxGeometry x="80" y="310" width="120" height="60" as="geometry" /> <mxGeometry x="80" y="310" width="120" height="60" as="geometry" />
@@ -531,12 +531,11 @@
<mxPoint x="270" y="170" as="targetPoint" /> <mxPoint x="270" y="170" as="targetPoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-345" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.563;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;fillColor=#6a00ff;strokeColor=#3700CC;" parent="1" source="wy1xcPKCa-p-PBI3JPLa-102" target="wy1xcPKCa-p-PBI3JPLa-122" edge="1"> <mxCell id="hUmURhrymKCytomf8O3q-345" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;startArrow=classic;startFill=1;endArrow=none;endFill=0;fillColor=#6a00ff;strokeColor=#3700CC;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.625;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="wy1xcPKCa-p-PBI3JPLa-102" target="wy1xcPKCa-p-PBI3JPLa-122" edge="1">
<mxGeometry relative="1" as="geometry"> <mxGeometry relative="1" as="geometry">
<mxPoint x="509.97" y="170" as="targetPoint" /> <mxPoint x="650" y="170" as="targetPoint" />
<Array as="points"> <Array as="points" />
<mxPoint x="510" y="160" /> <mxPoint x="730.0000000000002" y="270" as="sourcePoint" />
</Array>
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="hUmURhrymKCytomf8O3q-349" value="" style="endArrow=classic;html=1;rounded=0;fillColor=#e3c800;strokeColor=#B09500;" parent="1" edge="1"> <mxCell id="hUmURhrymKCytomf8O3q-349" value="" style="endArrow=classic;html=1;rounded=0;fillColor=#e3c800;strokeColor=#B09500;" parent="1" edge="1">
@@ -587,6 +586,37 @@
<mxPoint x="79.97" y="569.97" as="targetPoint" /> <mxPoint x="79.97" y="569.97" as="targetPoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="1vVpc469gqlHnz9TW-pm-1" value="arp mux/dmux" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
<mxGeometry x="400" y="120" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1vVpc469gqlHnz9TW-pm-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;startArrow=classic;startFill=1;fillColor=#008a00;strokeColor=#005700;exitX=0.667;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="1vVpc469gqlHnz9TW-pm-1" target="wy1xcPKCa-p-PBI3JPLa-92">
<mxGeometry relative="1" as="geometry">
<mxPoint x="480" y="170" as="sourcePoint" />
<Array as="points">
<mxPoint x="480" y="295" />
<mxPoint x="430" y="295" />
<mxPoint x="430" y="450" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="1vVpc469gqlHnz9TW-pm-3" value="" style="endArrow=classic;html=1;rounded=0;startArrow=none;startFill=0;fillColor=#008a00;strokeColor=#005700;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="470" y="220" as="sourcePoint" />
<mxPoint x="470" y="160" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1vVpc469gqlHnz9TW-pm-4" value="" style="endArrow=classic;html=1;rounded=0;startArrow=none;startFill=0;fillColor=#008a00;strokeColor=#005700;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="460" y="210" as="sourcePoint" />
<mxPoint x="460" y="160" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1vVpc469gqlHnz9TW-pm-6" value="" style="endArrow=classic;html=1;rounded=0;fillColor=#008a00;strokeColor=#005700;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="450" y="200" as="sourcePoint" />
<mxPoint x="450" y="160" as="targetPoint" />
</mxGeometry>
</mxCell>
</root> </root>
</mxGraphModel> </mxGraphModel>
</diagram> </diagram>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 156 KiB

View File

@@ -1,28 +1,29 @@
module tcp #( module tcp #(
parameter NUM_TCP=8 parameter NUM_TCP=8,
parameter DATA_WIDTH=8
)( )(
input i_clk, input i_clk,
input i_rst, input i_rst,
output logic s_reg_axil_awready, output logic s_reg_axil_awready,
input wire s_reg_axil_awvalid, input wire s_reg_axil_awvalid,
input wire [8:0] s_reg_axil_awaddr, input wire [8:0] s_reg_axil_awaddr,
input wire [2:0] s_reg_axil_awprot, input wire [2:0] s_reg_axil_awprot,
output logic s_reg_axil_wready, output logic s_reg_axil_wready,
input wire s_reg_axil_wvalid, input wire s_reg_axil_wvalid,
input wire [31:0] s_reg_axil_wdata, input wire [31:0] s_reg_axil_wdata,
input wire [3:0] s_reg_axil_wstrb, input wire [3:0] s_reg_axil_wstrb,
input wire s_reg_axil_bready, input wire s_reg_axil_bready,
output logic s_reg_axil_bvalid, output logic s_reg_axil_bvalid,
output logic [1:0] s_reg_axil_bresp, output logic [1:0] s_reg_axil_bresp,
output logic s_reg_axil_arready, output logic s_reg_axil_arready,
input wire s_reg_axil_arvalid, input wire s_reg_axil_arvalid,
input wire [8:0] s_reg_axil_araddr, input wire [8:0] s_reg_axil_araddr,
input wire [2:0] s_reg_axil_arprot, input wire [2:0] s_reg_axil_arprot,
input wire s_reg_axil_rready, input wire s_reg_axil_rready,
output logic s_reg_axil_rvalid, output logic s_reg_axil_rvalid,
output logic [31:0] s_reg_axil_rdata, output logic [31:0] s_reg_axil_rdata,
output logic [1:0] s_reg_axil_rresp output logic [1:0] s_reg_axil_rresp
); );
tcp_top_regfile_pkg::tcp_top_regfile__in_t tcp_hwif_in; tcp_top_regfile_pkg::tcp_top_regfile__in_t tcp_hwif_in;
@@ -57,6 +58,111 @@ tcp_top_regfile u_tcp_top_regfile (
.hwif_out (tcp_hwif_out) .hwif_out (tcp_hwif_out)
); );
localparam KEEP_WIDTH = ((DATA_WIDTH+7)/8);
localparam USER_WIDTH = 1;
localparam DEST_WIDTH = 8;
logic [DATA_WIDTH-1:0] m2s_tx_axis_tdata;
logic [KEEP_WIDTH-1:0] m2s_tx_axis_tkeep;
logic m2s_tx_axis_tvalid;
logic m2s_tx_axis_tready;
logic m2s_tx_axis_tlast;
logic [DEST_WIDTH-1:0] m2s_tx_axis_tdest;
logic [USER_WIDTH-1:0] m2s_tx_axis_tuser;
logic [NUM_TCP*DATA_WIDTH-1:0] tcp_tx_axis_tdata;
logic [NUM_TCP*KEEP_WIDTH-1:0] tcp_tx_axis_tkeep;
logic [NUM_TCP-1:0] tcp_tx_axis_tvalid;
logic [NUM_TCP-1:0] tcp_tx_axis_tready;
logic [NUM_TCP-1:0] tcp_tx_axis_tlast;
logic [NUM_TCP*DEST_WIDTH-1:0] tcp_tx_axis_tdest;
logic [NUM_TCP*USER_WIDTH-1:0] tcp_tx_axis_tuser;
logic [NUM_TCP*DATA_WIDTH-1:0] tcp_rx_axis_tdata;
logic [NUM_TCP*KEEP_WIDTH-1:0] tcp_rx_axis_tkeep;
logic [NUM_TCP-1:0] tcp_rx_axis_tvalid;
logic [NUM_TCP-1:0] tcp_rx_axis_tready;
logic [NUM_TCP-1:0] tcp_rx_axis_tlast;
logic [NUM_TCP*DEST_WIDTH-1:0] tcp_rx_axis_tdest;
logic [NUM_TCP*USER_WIDTH-1:0] tcp_rx_axis_tuser;
logic [DATA_WIDTH-1:0] s2m_rx_axis_tdata;
logic [KEEP_WIDTH-1:0] s2m_rx_axis_tkeep;
logic s2m_rx_axis_tvalid;
logic s2m_rx_axis_tready;
logic s2m_rx_axis_tlast;
logic [DEST_WIDTH-1:0] s2m_rx_axis_tdest;
logic [USER_WIDTH-1:0] s2m_rx_axis_tuser;
//m2s dma
//s2m dma
// tx_stream demux
axis_demux #(
.M_COUNT(NUM_TCP),
.DATA_WIDTH(DATA_WIDTH),
.M_DEST_WIDTH(DEST_WIDTH),
.DEST_ENABLE(1),
.TDEST_ROUTE(1)
) tx_stream_demux (
.clk (i_clk),
.rst (i_rst),
.s_axis_tdata (m2s_tx_axis_tdata),
.s_axis_tkeep (m2s_tx_axis_tkeep),
.s_axis_tvalid (m2s_tx_axis_tvalid),
.s_axis_tready (m2s_tx_axis_tready),
.s_axis_tlast (m2s_tx_axis_tlast),
.s_axis_tid ('0),
.s_axis_tdest (m2s_tx_axis_tdest),
.s_axis_tuser (m2s_tx_axis_tuser),
.m_axis_tdata (tcp_tx_axis_tdata),
.m_axis_tkeep (tcp_tx_axis_tkeep),
.m_axis_tvalid (tcp_tx_axis_tvalid),
.m_axis_tready (tcp_tx_axis_tready),
.m_axis_tlast (tcp_tx_axis_tlast),
.m_axis_tid (),
.m_axis_tdest (tcp_tx_axis_tdest),
.m_axis_tuser (tcp_tx_axis_tuser),
.enable ('1),
.drop ('0),
.select ('0)
);
// rx_stream arb
axis_arb_mux #(
.S_COUNT(NUM_TCP),
.DATA_WIDTH(DATA_WIDTH),
.DEST_ENABLE(1),
.DEST_WIDTH(8)
) rx_stream_demux (
.clk (i_clk),
.rst (i_rst),
.s_axis_tdata (tcp_rx_axis_tdata),
.s_axis_tkeep (tcp_rx_axis_tkeep),
.s_axis_tvalid (tcp_rx_axis_tvalid),
.s_axis_tready (tcp_rx_axis_tready),
.s_axis_tlast (tcp_rx_axis_tlast),
.s_axis_tid ('0),
.s_axis_tdest (tcp_rx_axis_tdest),
.s_axis_tuser (tcp_rx_axis_tuser),
.m_axis_tdata (s2m_rx_axis_tdata),
.m_axis_tkeep (s2m_rx_axis_tkeep),
.m_axis_tvalid (s2m_rx_axis_tvalid),
.m_axis_tready (s2m_rx_axis_tready),
.m_axis_tlast (s2m_rx_axis_tlast),
.m_axis_tid (),
.m_axis_tdest (s2m_rx_axis_tdest),
.m_axis_tuser (s2m_rx_axis_tuser)
);
generate generate
for (genvar i = 0; i < NUM_TCP; i++) begin for (genvar i = 0; i < NUM_TCP; i++) begin
@@ -88,7 +194,23 @@ generate
.s_cpuif_rd_err (), .s_cpuif_rd_err (),
.s_cpuif_rd_data (tcp_hwif_in.tcp_streams[i].rd_data), .s_cpuif_rd_data (tcp_hwif_in.tcp_streams[i].rd_data),
.s_cpuif_wr_ack (tcp_hwif_in.tcp_streams[i].wr_ack), .s_cpuif_wr_ack (tcp_hwif_in.tcp_streams[i].wr_ack),
.s_cpuif_wr_err () .s_cpuif_wr_err (),
.s_axis_tdata (tcp_tx_axis_tdata[i*DATA_WIDTH+:DATA_WIDTH]),
.s_axis_tkeep (tcp_tx_axis_tkeep[i*KEEP_WIDTH+:KEEP_WIDTH]),
.s_axis_tvalid (tcp_tx_axis_tvalid[i]),
.s_axis_tready (tcp_tx_axis_tready[i]),
.s_axis_tlast (tcp_tx_axis_tlast[i]),
.s_axis_tdest (tcp_tx_axis_tdest[i*DEST_WIDTH+:DEST_WIDTH]),
.s_axis_tuser (tcp_tx_axis_tuser[i*USER_WIDTH+:USER_WIDTH]),
.m_axis_tdata (tcp_rx_axis_tdata[i*DATA_WIDTH+:DATA_WIDTH]),
.m_axis_tkeep (tcp_rx_axis_tkeep[i*KEEP_WIDTH+:KEEP_WIDTH]),
.m_axis_tvalid (tcp_rx_axis_tvalid[i]),
.m_axis_tready (tcp_rx_axis_tready[i]),
.m_axis_tlast (tcp_rx_axis_tlast[i]),
.m_axis_tdest (tcp_rx_axis_tdest[i*DEST_WIDTH+:DEST_WIDTH]),
.m_axis_tuser (tcp_rx_axis_tuser[i*USER_WIDTH+:USER_WIDTH])
); );
end end
endgenerate endgenerate

View File

@@ -1,4 +1,9 @@
module tcp_stream( module tcp_stream #(
parameter DATA_WIDTH = 8,
parameter KEEP_WIDTH = ((DATA_WIDTH+7)/8),
parameter DEST_WIDTH = 8,
parameter USER_WIDTH = 1
)(
input wire clk, input wire clk,
input wire rst, input wire rst,
@@ -13,8 +18,23 @@ module tcp_stream(
output wire s_cpuif_rd_err, output wire s_cpuif_rd_err,
output wire [31:0] s_cpuif_rd_data, output wire [31:0] s_cpuif_rd_data,
output wire s_cpuif_wr_ack, output wire s_cpuif_wr_ack,
output wire s_cpuif_wr_err output wire s_cpuif_wr_err,
input wire [DATA_WIDTH-1:0] s_axis_tdata,
input wire [KEEP_WIDTH-1:0] s_axis_tkeep,
input wire s_axis_tvalid,
output wire s_axis_tready,
input wire s_axis_tlast,
input wire [DEST_WIDTH-1:0] s_axis_tdest,
input wire [USER_WIDTH-1:0] s_axis_tuser,
output wire [DATA_WIDTH-1:0] m_axis_tdata,
output wire [KEEP_WIDTH-1:0] m_axis_tkeep,
output wire m_axis_tvalid,
input wire m_axis_tready,
output wire m_axis_tlast,
output wire [DEST_WIDTH-1:0] m_axis_tdest,
output wire [USER_WIDTH-1:0] m_axis_tuser
); );
// regs // regs