Skip to content

Commit bdc47b2

Browse files
committedMar 18, 2015
Revert "fhdl/verilog: do not use initial begin in _printinit (not accepted by all synthesis tools ex: Synplify Pro does not accept it)"
This breaks simulations, and we will try to use the "reg name = value" syntax instead. This reverts commit e946f6e.
1 parent 89fefef commit bdc47b2

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed
 

Diff for: ‎migen/fhdl/verilog.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -279,19 +279,11 @@ def _printinit(f, ios, ns):
279279
- ios \
280280
- list_targets(f) \
281281
- list_special_ios(f, False, True, True)
282-
wires = (_list_comb_wires(f) | list_special_ios(f, True, False, False)) \
283-
- ios \
284-
- list_targets(f) \
285-
- list_special_ios(f, False, True, True)
286282
if signals:
283+
r += "initial begin\n"
287284
for s in sorted(signals, key=lambda x: x.huid):
288-
if s in wires:
289-
r += "assign" + ns.get_name(s) + " = " + _printexpr(ns, s.reset)[0] + ";\n"
290-
r += "always @(*) begin\n"
291-
for s in sorted(signals, key=lambda x: x.huid):
292-
if s not in wires:
293-
r += "\t" + ns.get_name(s) + " <= " + _printexpr(ns, s.reset)[0] + ";\n"
294-
r += "end\n"
285+
r += "\t" + ns.get_name(s) + " <= " + _printexpr(ns, s.reset)[0] + ";\n"
286+
r += "end\n\n"
295287
return r
296288

297289
def convert(f, ios=None, name="top",

0 commit comments

Comments
 (0)
Please sign in to comment.