Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Commit e6378c3

Browse files
committed
wip
1 parent ee5a9d2 commit e6378c3

22 files changed

Lines changed: 492 additions & 1379 deletions

docs/process-drawio.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
if [[ "$DISPLAY" == "" ]] && [[ "$1" != "--noauto" ]]; then
4+
exec xvfb-run --auto-servernum -- "$0" --noauto
5+
fi
6+
7+
cd "$(dirname "$0")"
8+
9+
for name in $(find src -name '*.drawio')
10+
do
11+
for theme in dark light
12+
do
13+
drawio -x $name -o ${name%.drawio}-$theme.svg --svg-theme $theme --embed-svg-fonts false -f svg &
14+
done
15+
done
16+
17+
wait

docs/src/device-dark.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/src/device-light.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/src/fpga.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,43 @@ The usual convention is to consider the segment where the wire is driven (here:
128128

129129
## Wires, wire segments, connectors — Project Combine model
130130

131-
In Project Combine, the interconnect database describes a number (usually between ~100 and ~1000) of *wire slots*, which are identified by `WireSlotId`. A *wire segment* is uniquely identified by a tuple of `(CellCoord, WireSlotId)`, which is also known as `WireCoord`. A *wire* is identified by the `WireCoord` of its canonical segment.
131+
In Project Combine, the interconnect database describes a number (usually between ~100 and ~1000) of *wire slots*, which are identified by `WireSlotId`. A *wire segment* is uniquely identified by a tuple of `(CellCoord, WireSlotId)`, which is also known as `WireCoord`. Thus, logically, a *wire slot* is replicated across all cells.
132+
133+
As mentioned before, a *wire* is identified by the `WireCoord` of its canonical segment.
134+
135+
To make this clearer, consider [example 1](#example-1--simple-bidirectional-quad-wire) again:
136+
137+
![Example device](wires-1-light.svg#light-only)
138+
![Example device](wires-1-dark.svg#dark-only)
139+
140+
Here, there are five *wire slots*, named `QUAD_H_[0-4]`. Notice how the combination of wire slot and cell coordinates uniquely identifies a specific wire segment.
141+
142+
In order to figure out which wire segments are actually connected together (and therefore to find the canonical segment of the wire), we need to consider the *wire kind* of the segment. The interconnect database specifies the *wire kind* of each *wire slot*, thus each wire segment with a particular `WireSlotId` has the same wire kind.
132143

133144
### Regions
134145

135-
Since the device may contain many kinds of regional wires with varying scopes, the interconnect database describes a number of *region slots*, identified by `RegionSlotId`. Every regional wire slot is associated with such a region slot, and every cell of the expanded grid contains a mapping from `RegionSlotId` to a `CellCoord` where the canonical segment of all associated regional wires is located. Thus, to describe [example 4](#example-4--regional-wires) above, one would allocate a single region slot, associate wire slot `GCLK0` with it, then store the following canonical coordinate for each cell:
146+
One of the simpler wire kinds are *regional wires*. Because regional wires tend to come in "bundles", wherein a group of wires runs in parallel across an entire region, it is these regions that are actually represented within the database.
147+
148+
However, since a wire slot and its wire kind is global across all cells, `WireKind::Regional` cannot directly point to a specific region. Instead, it specifies a `RegionSlotId`. A *region slot* can be thought as the "type" of a region, or its place in some kind of hierarchy.
149+
150+
![Example device with a region hierarchy being described with two region slots](region-slots-light.svg#light-only)
151+
![Example device with a region hierarchy being described with two region slots](region-slots-dark.svg#dark-only)
136152

137-
- `X[0-3]Y[0-3]`: `X3Y3` is the canonical cell
138-
- `X[4-7]Y[0-3]`: `X4Y3` is the canonical cell
139-
- `X[0-3]Y[4-7]`: `X3Y4` is the canonical cell
140-
- `X[4-7]Y[4-7]`: `X4Y4` is the canonical cell
153+
However, the region structure doesn't necessarily need to be hierarchical. For example, some devices have interconnect which can be described with a set of staggered region slots:
154+
155+
![Example device with two region slots being interleaved](region-slots-staggered-light.svg#light-only)
156+
![Example device with two region slots being interleaved](region-slots-staggered-dark.svg#dark-only)
157+
158+
Thus, to describe [example 4](#example-4--regional-wires), we would:
159+
- allocate a region slot, e.g. `RSLOT0`;
160+
- in each cell, store the coordinates of the canonical wire segment as the *region root* for `RSLOT0`;
161+
- assign wire slot `GCLK0` to wire kind `Regional(RSLOT0)`.
141162

142163
### Connectors
143164

144-
For other kinds of wires, the connections between wire segments in (usually adjacent) cells are described by *connectors* and *connector classes*.
165+
KEY OBSERVATION: There is a lot of complexity here, however it is motivated by *the desire to deduplicate data*.
166+
167+
For wire kinds other than regional, the connections between wire segments in (usually adjacent) cells are described by *connectors* and *connector classes*.
145168

146169
The interconnect database describes a small number of *connector slots*, identified by `ConnectorSlotId`. For most databases, there are four connector slots, corresponding to the four directions, but some devices (such as versal) require more complex descriptions.
147170

docs/src/region-slots-dark.svg

Lines changed: 3 additions & 0 deletions
Loading

docs/src/region-slots-light.svg

Lines changed: 3 additions & 0 deletions
Loading

docs/src/region-slots-staggered-dark.svg

Lines changed: 3 additions & 0 deletions
Loading

docs/src/region-slots-staggered-light.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)