|
1 | 1 | """ |
2 | 2 | Steps provide an extensible way to modify the `chipflow` command behavior for a given design |
3 | 3 | """ |
4 | | - |
| 4 | +import logging |
5 | 5 | import os |
6 | 6 | from abc import ABC |
7 | 7 |
|
8 | 8 | from amaranth import Module |
9 | 9 |
|
10 | 10 | from ..platforms.utils import IOSignature |
11 | 11 |
|
| 12 | +logger = logging.getLogger(__name__) |
| 13 | + |
12 | 14 | def setup_amaranth_tools(): |
13 | 15 | _amaranth_settings = { |
14 | 16 | "AMARANTH_USE_YOSYS": "system", |
@@ -43,12 +45,17 @@ def run_cli(self, args): |
43 | 45 |
|
44 | 46 |
|
45 | 47 | def _wire_up_ports(m: Module, top, platform): |
| 48 | + logger.debug("wiring up ports") |
| 49 | + logger.debug("adding top:") |
46 | 50 | for n, t in top.items(): |
| 51 | + logger.debug(f" > {n}, {t}") |
47 | 52 | setattr(m.submodules, n, t) |
48 | 53 |
|
| 54 | + logger.debug("wiring up:") |
49 | 55 | for component, iface in platform._pinlock.port_map.items(): |
50 | 56 | for iface_name, member, in iface.items(): |
51 | 57 | for name, port in member.items(): |
| 58 | + logger.debug(f" > {component}, {iface_name}, {member}") |
52 | 59 | iface = getattr(top[component], iface_name) |
53 | 60 | wire = (iface if isinstance(iface.signature, IOSignature) |
54 | 61 | else getattr(iface, name)) |
|
0 commit comments