From: Sebastien Bourdeauducq Date: Mon, 12 Dec 2011 23:24:40 +0000 (+0100) Subject: fhdl: allow a namespace to be specified for Verilog conversion X-Git-Tag: 24jan2021_ls180~2099^2~1142 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a72faaecddd7307e1b0d98da1c47baee20aaa73d;p=litex.git fhdl: allow a namespace to be specified for Verilog conversion --- diff --git a/migen/fhdl/verilog.py b/migen/fhdl/verilog.py index 4c22fd4c..219b7141 100644 --- a/migen/fhdl/verilog.py +++ b/migen/fhdl/verilog.py @@ -115,12 +115,12 @@ def _printinstances(ns, i, clk, rst): r += ");\n\n" return r -def Convert(f, ios=set(), name="top", clkname="sys_clk", rstname="sys_rst"): - ns = Namespace() - +def Convert(f, ios=set(), name="top", clkname="sys_clk", rstname="sys_rst", ns=None): + if ns is None: ns = Namespace() + clks = Signal(name=clkname) rsts = Signal(name=rstname) - + ios |= f.pads sigs = ListSignals(f)