Skip to content

Commit 0ac2998

Browse files
committed
wip clocks
1 parent e37b958 commit 0ac2998

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
lines changed

chipflow_lib/platforms/silicon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def instantiate_ports(self, m: Module):
263263
return
264264

265265
pinlock = load_pinlock()
266-
for component, iface in pinlock.port_map.items():
266+
for component, iface in pinlock.port_map.ports.items():
267267
for k, v in iface.items():
268268
for name, port in v.items():
269269
self._ports[port.port_name] = SiliconPlatformPort(component, name, port)

chipflow_lib/platforms/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ class Package(pydantic.BaseModel):
476476
Serialisable identifier for a defined packaging option
477477
"""
478478
type: PackageDef = pydantic.Field(discriminator="package_type")
479-
479+
clocks: List[str]
480480

481481
def _linear_allocate_components(interfaces: dict, lockfile: LockFile | None, allocate, unallocated) -> PortMap:
482482
port_map = PortMap()
@@ -595,6 +595,7 @@ def model_post_init(self, __context):
595595

596596
def allocate_pins(self, process: 'Process', lockfile: LockFile|None) -> LockFile:
597597
portmap = _linear_allocate_components(self._interfaces, lockfile, self._allocate, set(self._ordered_pins))
598+
#clocks =
598599
return LockFile(package=Package(type=self), process=process, metadata=self._interfaces, port_map=portmap)
599600

600601
@property

docs/chipflow-toml-guide.rst

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,11 @@ You probably won't need to change these if you're starting from an example repos
6969
.. _chipflow_lib: https://github.com/ChipFlow/chipflow-lib
7070

7171

72-
``[chipflow.clocks]``
73-
---------------------
74-
75-
.. code-block:: TOML
72+
Clock Definitions
73+
-----------------
7674

77-
[chipflow.clocks]
78-
default = 'sys_clk'
75+
The clock pins to be allocation on the package are determined from the top level clock domains exposed by components in `[chipflow.top]`.
7976

80-
This section links the clock domains utilized in the design to specific pads.
81-
These pads need to be specified in the `[silicon.pads]`_ section with the :term:`type` set to :term:`clock`.
82-
The ``default`` clock domain is associated with the Amaranth :any:`sync <lang-domains>` :ref:`clock domain <lang-clockdomains>`.
83-
Currently, only one ``default`` clock domain is supported.
8477

8578

8679
``[chipflow.resets]``
@@ -140,20 +133,15 @@ Available Package Definitions
140133
+----------+-----------+--------------------+------------------------------------+
141134

142135

143-
``[silicon.power]``
144-
-------------------
145136

146-
This section outlines the connection of pads to the power supply available for the selected process and package.
147-
These pads are declared with the :term:type parameter, along with a name and other optional information, like voltage.
137+
Power connections
138+
-----------------
148139

149-
Note that in this context, the :term:type parameter can only be ``ground`` or ``power``.
140+
The package definition provides default locations for pins needed for bringup and test, like core power, ground, clock and reset, along with JTAG.
150141

151-
The package definition provides default locations for pins needed for bringup and test, like core power, ground, clock and reset, along with JTAG. These are called:
142+
These can be determined by calling `BasePackageDef.bringup_pins`.
152143

153-
[chipflow.silicon.power]
154-
vdd = { type = "power", name = "vdd", voltage = "1.8V" }
155-
gnd = { type = "ground", name = "gnd" }
156-
```
144+
For ports that require their own power lines, you can set ``allocate_power`` and ``power_voltage`` in their `IOSignature`.
157145

158146
.. glossary::
159147

0 commit comments

Comments
 (0)