aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Izraelevitz2015-12-11 13:18:01 -0800
committerazidar2016-01-16 11:45:00 -0800
commit24789a974ce55a9b83133bdd5dd7a64241e447d6 (patch)
treed718211c9fa645ccc04c4a5eaaef090f538e5c84 /src
parent1d63b78f41ab3c3de88a5bb167f7412186dd677a (diff)
Moved integer declaration inside module to be verilog (not system-verilog) compliant
Diffstat (limited to 'src')
-rw-r--r--src/main/stanza/verilog.stanza3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/stanza/verilog.stanza b/src/main/stanza/verilog.stanza
index 15c6ac6a..0e1c97c3 100644
--- a/src/main/stanza/verilog.stanza
+++ b/src/main/stanza/verilog.stanza
@@ -307,7 +307,6 @@ defn emit-module (m:InModule) :
updates[get-name(clock(mem-declaration))] = my-clk-update
;==== Actually printing module =====
- if length(simuls) != 0 : print-all(["integer STDERR = 32'h80000002;\n"])
val port-indent = " "
print-all(["module " name(m) "(\n"])
for (p in ports(m),i in 1 to false) do :
@@ -322,6 +321,8 @@ defn emit-module (m:InModule) :
add(assigns,["assign " name(p) " = " emit(cons[name(p)]) ";"])
if length(ports(m)) == 0 : print(");\n")
+ if length(simuls) != 0 : print-all([" integer STDERR = 32'h80000002;\n"])
+
for w in wires do :
print(" ")
println-all(w)