back: return name map from convert_fragment().
This commit is contained in:
parent
7342662bee
commit
d1779bdb59
3 changed files with 25 additions and 11 deletions
|
|
@ -254,9 +254,12 @@ class TemplatedPlatform(Platform):
|
|||
# and to incorporate the nMigen version into generated code.
|
||||
autogenerated = "Automatically generated by nMigen {}. Do not edit.".format(__version__)
|
||||
|
||||
name_map = None
|
||||
def emit_design(backend):
|
||||
nonlocal name_map
|
||||
backend_mod = {"rtlil": rtlil, "verilog": verilog}[backend]
|
||||
return backend_mod.convert_fragment(fragment, name=name)
|
||||
design_text, name_map = backend_mod.convert_fragment(fragment, name=name)
|
||||
return design_text
|
||||
|
||||
def emit_commands(format):
|
||||
commands = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue