|
15 | 15 | from amaranth import * |
16 | 16 |
|
17 | 17 | from .. import ChipFlowError |
18 | | -from ..platforms import SiliconPlatform, top_interfaces |
| 18 | +from ..platforms import SiliconPlatform, top_interfaces, load_pinlock |
19 | 19 |
|
20 | 20 |
|
21 | 21 | logger = logging.getLogger(__name__) |
@@ -116,21 +116,6 @@ def submit(self, rtlil_path, *, dry_run=False, wait=False): |
116 | 116 | if git_dirty: |
117 | 117 | logging.warning("Git tree is dirty, submitting anyway!") |
118 | 118 | submission_name += "-dirty" |
119 | | - dep_versions = { |
120 | | - "python": sys.version.split()[0] |
121 | | - } |
122 | | - for package in ( |
123 | | - # Upstream packages |
124 | | - "yowasp-runtime", "yowasp-yosys", |
125 | | - "amaranth", "amaranth-stdio", "amaranth-soc", |
126 | | - # ChipFlow packages |
127 | | - "chipflow-lib", |
128 | | - "amaranth-orchard", "amaranth-vexriscv", |
129 | | - ): |
130 | | - try: |
131 | | - dep_versions[package] = importlib.metadata.version(package) |
132 | | - except importlib.metadata.PackageNotFoundError: |
133 | | - dep_versions[package] = None |
134 | 119 |
|
135 | 120 | data = { |
136 | 121 | "projectId": self.project_name, |
@@ -160,17 +145,9 @@ def submit(self, rtlil_path, *, dry_run=False, wait=False): |
160 | 145 | f"dir={port.direction}, width={width}") |
161 | 146 | pads[padname] = {'loc': port.pins[0], 'type': port.direction.value} |
162 | 147 |
|
163 | | - # Use the Pydantic models to access configuration data |
164 | | - silicon_model = self.config_model.chipflow.silicon |
165 | | - config = { |
166 | | - "dependency_versions": dep_versions, |
167 | | - "silicon": { |
168 | | - "process": str(silicon_model.process), |
169 | | - "pad_ring": silicon_model.package, |
170 | | - "pads": pads, |
171 | | - "power": {k: {"type": v.type, "loc": v.loc} for k, v in silicon_model.power.items()} |
172 | | - } |
173 | | - } |
| 148 | + pinlock = load_pinlock() |
| 149 | + config = pinlock.json() |
| 150 | + |
174 | 151 | if dry_run: |
175 | 152 | print(f"data=\n{json.dumps(data, indent=2)}") |
176 | 153 | print(f"files['config']=\n{json.dumps(config, indent=2)}") |
|
0 commit comments