aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils/rfnoc/templates/modules/static_router.v.mako
diff options
context:
space:
mode:
Diffstat (limited to 'host/utils/rfnoc/templates/modules/static_router.v.mako')
-rw-r--r--host/utils/rfnoc/templates/modules/static_router.v.mako15
1 files changed, 15 insertions, 0 deletions
diff --git a/host/utils/rfnoc/templates/modules/static_router.v.mako b/host/utils/rfnoc/templates/modules/static_router.v.mako
new file mode 100644
index 000000000..3649c278b
--- /dev/null
+++ b/host/utils/rfnoc/templates/modules/static_router.v.mako
@@ -0,0 +1,15 @@
+<%page args="connections"/>\
+\
+%for connection in connections:
+<%
+ srcblk = connection["srcblk"]
+ dstblk = connection["dstblk"]
+ srcport = "in" if connection["srcport"] == None else connection["srcport"]
+ dstport = "out" if connection["dstport"] == None else connection["dstport"]
+%>\
+ assign s_${dstblk}_${dstport}_tdata = m_${srcblk}_${srcport}_tdata ;
+ assign s_${dstblk}_${dstport}_tlast = m_${srcblk}_${srcport}_tlast ;
+ assign s_${dstblk}_${dstport}_tvalid = m_${srcblk}_${srcport}_tvalid;
+ assign m_${srcblk}_${srcport}_tready = s_${dstblk}_${dstport}_tready;
+
+%endfor \ No newline at end of file