Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion chipflow_lib/pin_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def lock_pins() -> None:
oldlock = LockFile.model_validate_json(json_string)

print(f"Locking pins: {'using pins.lock' if lockfile.exists() else ''}")
process_name = config["chipflow"]["silicon"]["process"]
package_name = config["chipflow"]["silicon"]["package"]

if package_name not in PACKAGE_DEFINITIONS:
Expand Down Expand Up @@ -145,7 +146,10 @@ def lock_pins() -> None:
_map, _ = allocate_pins(k, v, pins)
port_map.add_ports(component, k, _map)

newlock = LockFile(package=package, port_map=port_map, metadata=interfaces)
newlock = LockFile(process=process_name,
package=package,
port_map=port_map,
metadata=interfaces)

with open('pins.lock', 'w') as f:
f.write(newlock.model_dump_json(indent=2, serialize_as_any=True))
Expand Down
1 change: 1 addition & 0 deletions chipflow_lib/platforms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ class LockFile(pydantic.BaseModel):
port_map: Mapping of components to interfaces to port
metadata: Amaranth metadata, for reference
"""
process: str
package: Package
port_map: PortMap
metadata: dict
Expand Down
Loading