amaranth-lang / amaranth-soc

System on Chip toolkit for Amaranth HDL
BSD 2-Clause "Simplified" License
83 stars 31 forks source link

Signature.create in amaranth-soc interfaces is incompatible with Signature.create from latest Amaranth #60

Closed koblonczek closed 10 months ago

koblonczek commented 11 months ago

After changes introduced in Amaranth in https://github.com/amaranth-lang/amaranth/commit/422ba9ea51855472e1ed50c3c6eb297a4bff446d definition of Signature.create in e.g. wishbone module is incompatible - it lacks src_loc_at keyword argument that is required by this call in Amaranth, hence it will throw an error:

  File "(...)/venv/lib/python3.10/site-packages/amaranth_soc/wishbone/bus.py", line 467, in __init__
    super().__init__()
  File "(...)/venv/lib/python3.10/site-packages/amaranth/lib/wiring.py", line 873, in __init__
    self.__dict__.update(self.signature.members.create(path=()))
  File "(...)/venv/lib/python3.10/site-packages/amaranth/lib/wiring.py", line 242, in create
    attrs[name] = create_dimensions(member.dimensions, path=(*path, name),
  File "(...)/venv/lib/python3.10/site-packages/amaranth/lib/wiring.py", line 237, in create_dimensions
    return create_value(path, src_loc_at=1 + src_loc_at)
  File "(...)/venv/lib/python3.10/site-packages/amaranth/lib/wiring.py", line 233, in create_value
    return member.signature.create(path=path, src_loc_at=1 + src_loc_at)
  TypeError: Signature.create() got an unexpected keyword argument 'src_loc_at'