aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils/rfnoc/templates/modules/connect_clk_domains.v.mako
diff options
context:
space:
mode:
Diffstat (limited to 'host/utils/rfnoc/templates/modules/connect_clk_domains.v.mako')
-rw-r--r--host/utils/rfnoc/templates/modules/connect_clk_domains.v.mako12
1 files changed, 12 insertions, 0 deletions
diff --git a/host/utils/rfnoc/templates/modules/connect_clk_domains.v.mako b/host/utils/rfnoc/templates/modules/connect_clk_domains.v.mako
new file mode 100644
index 000000000..df055645c
--- /dev/null
+++ b/host/utils/rfnoc/templates/modules/connect_clk_domains.v.mako
@@ -0,0 +1,12 @@
+<%page args="connections, clocks"/>\
+\
+%for connection in connections:
+<%
+ src_name = connection["srcblk"] # Should always be "_device_"
+ src = clocks[(src_name, connection["srcport"])]
+ dst_name = connection["dstblk"]
+ dst = clocks[(dst_name, connection["dstport"])]
+%>\
+ assign ${dst_name}_${dst["name"]}_clk = ${src["name"]}_clk;
+%endfor
+