Skip to content

Commit

Permalink
Revert "fhdl/verilog: do not use initial begin in _printinit (not acc…
Browse files Browse the repository at this point in the history
…epted 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.
  • Loading branch information
sbourdeauducq committed Mar 18, 2015
1 parent 89fefef commit bdc47b2
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions migen/fhdl/verilog.py
Expand Up @@ -279,19 +279,11 @@ def _printinit(f, ios, ns):
- ios \
- list_targets(f) \
- list_special_ios(f, False, True, True)
wires = (_list_comb_wires(f) | list_special_ios(f, True, False, False)) \
- ios \
- list_targets(f) \
- list_special_ios(f, False, True, True)
if signals:
r += "initial begin\n"
for s in sorted(signals, key=lambda x: x.huid):
if s in wires:
r += "assign" + ns.get_name(s) + " = " + _printexpr(ns, s.reset)[0] + ";\n"
r += "always @(*) begin\n"
for s in sorted(signals, key=lambda x: x.huid):
if s not in wires:
r += "\t" + ns.get_name(s) + " <= " + _printexpr(ns, s.reset)[0] + ";\n"
r += "end\n"
r += "\t" + ns.get_name(s) + " <= " + _printexpr(ns, s.reset)[0] + ";\n"
r += "end\n\n"
return r

def convert(f, ios=None, name="top",
Expand Down

0 comments on commit bdc47b2

Please sign in to comment.