Skip to content

Commit 1cb9d43

Browse files
wanda-phiwhitequark
authored andcommitted
back.rtlil: Remove code allowing internal yosys cells in Instance.
This was allowed only because Amaranth used it internally. Now that all uses are gone, let's just disallow it entirely.
1 parent 6dc7c27 commit 1cb9d43

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

amaranth/back/rtlil.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -923,12 +923,8 @@ def emit_instance(self, cell_idx, cell):
923923
ports[name] = self.instance_wires[cell_idx, name]
924924
for name, nets in cell.ports_io.items():
925925
ports[name] = self.sigspec(nets)
926-
if cell.type.startswith("$"):
927-
type = cell.type
928-
else:
929-
type = "\\" + cell.type
930-
self.builder.cell(type, cell.name, ports=ports, params=cell.parameters,
931-
attrs=cell.attributes, src=_src(cell.src_loc))
926+
self.builder.cell(f"\\{cell.type}", cell.name, ports=ports, params=cell.parameters,
927+
attrs=cell.attributes, src=_src(cell.src_loc))
932928

933929
def emit_cells(self):
934930
for cell_idx in self.module.cells:

0 commit comments

Comments
 (0)