Skip to content

Commit 84d183f

Browse files
lansergerobtaylor
authored andcommitted
Added process to the pin lock file
1 parent d6b7833 commit 84d183f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

chipflow_lib/pin_lock.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def lock_pins() -> None:
8686
oldlock = LockFile.model_validate_json(json_string)
8787

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

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

148-
newlock = LockFile(package=package, port_map=port_map, metadata=interfaces)
149+
newlock = LockFile(process=process_name,
150+
package=package,
151+
port_map=port_map,
152+
metadata=interfaces)
149153

150154
with open('pins.lock', 'w') as f:
151155
f.write(newlock.model_dump_json(indent=2, serialize_as_any=True))

chipflow_lib/platforms/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ class LockFile(pydantic.BaseModel):
405405
port_map: Mapping of components to interfaces to port
406406
metadata: Amaranth metadata, for reference
407407
"""
408+
process: str
408409
package: Package
409410
port_map: PortMap
410411
metadata: dict

0 commit comments

Comments
 (0)