add issuer verilog generator
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 19 Jul 2020 19:44:18 +0000 (20:44 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 19 Jul 2020 19:44:18 +0000 (20:44 +0100)
src/soc/simple/issuer_verilog.py [new file with mode: 0644]

diff --git a/src/soc/simple/issuer_verilog.py b/src/soc/simple/issuer_verilog.py
new file mode 100644 (file)
index 0000000..17cbc4d
--- /dev/null
@@ -0,0 +1,26 @@
+"""simple core issuer verilog generator
+"""
+
+import sys
+from nmigen.cli import verilog
+
+from soc.config.test.test_loadstore import TestMemPspec
+from soc.simple.issuer import TestIssuer
+
+
+if __name__ == '__main__':
+    units = {'alu': 1, 'cr': 1, 'branch': 1, 'trap': 1, 'logical': 1,
+             'spr': 1,
+             'mul': 1,
+             'shiftrot': 1}
+    pspec = TestMemPspec(ldst_ifacetype='bare_wb',
+                         imem_ifacetype='bare_wb',
+                         addr_wid=48,
+                         mask_wid=8,
+                         reg_wid=64,
+                         units=units)
+    dut = TestIssuer(pspec)
+
+    vl = verilog.convert(dut, ports=dut.ports(), name="test_issuer")
+    with open(sys.argv[1], "w") as f:
+        f.write(vl)