mirror of https://github.com/openXC7/prjxray.git
docs: Importing wiki/Database-Files.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
This commit is contained in:
parent
7db569d4eb
commit
31d81ad314
|
|
@ -4,7 +4,7 @@
|
|||
Introduction
|
||||
------------
|
||||
|
||||
This section documents how prjxray represents the bitstream database
|
||||
This section documents how prjxray represents the bitstream database. The databases are plain text files, using either simple line-based syntax or JSON. The databases are located in `database/<device_class>/`. The `settings.sh` file contains some configurations used by the tools that generate the database, including the region of interest (ROI, see [[Glossary]]).
|
||||
|
||||
These ".db" files come in two common flavors:
|
||||
* `segbits_*.db`_: encodes bitstream bits
|
||||
|
|
@ -12,10 +12,23 @@ These ".db" files come in two common flavors:
|
|||
|
||||
Also note: .rdb (raw db) is a convention for a non-expanded .db file (see below)
|
||||
|
||||
Segment bit positions
|
||||
---------------------
|
||||
|
||||
Bit positions within a segment are written using the following notation: A two digit decimal number followed by an underscore followed by a two digit decimal number. For example `26_47`.
|
||||
|
||||
The first number indicates the frame address relative to the base frame address for the segment and ranges from `00` to `35` for Atrix-7 CLB segments.
|
||||
|
||||
The second number indicates the bit position with
|
||||
|
||||
|
||||
segbits_*.db
|
||||
------------
|
||||
|
||||
Tag files document the meaning of individual configuration bits or bit pattern. They contain one line for each pattern. The first word (sequence of non-whitespace characters) in that line is the *configuration tag*, the remaining words in the line is the list of bits for that pattern. A bit prefixed with a `!` marks a bit that must be cleared, a bit bit not prefixed with a `!` marks a bit that must be set.
|
||||
|
||||
No configuration tag may include the bit pattern for another tag as subset. If it does then this is an indicator that there is an incorrect entry in the database. Usually this either means that a tag has additional bits in their pattern that should not be there, or that `!<bit>` entries are missing for one or more tags.
|
||||
|
||||
These are created by segmatch to describe bitstream IP encoding.
|
||||
|
||||
Example lines:
|
||||
|
|
@ -37,11 +50,11 @@ Example lines:
|
|||
* Candidate bits exist, but they've only ever been set to 1
|
||||
* INT.FAN_ALT4.SS2END0 <m1 2> 18_09 25_08
|
||||
* Internal only
|
||||
* segmatch -m (min tag value occurances) was given, but occurances are below this threshold
|
||||
* segmatch -m (min tag value occurrences) was given, but occurrences are below this threshold
|
||||
* ie INT.FAN_ALT4.SS2END0 occcured twice, but this is below the acceptable level (say 5)
|
||||
* INT.FAN_ALT4.SS2END0 <M 6 8> 18_09 25_08
|
||||
* Internal only
|
||||
* segmatch -M (min tag occurances) was given, but total occurances are below this threshold
|
||||
* segmatch -M (min tag occurrences) was given, but total occurrences are below this threshold
|
||||
* First value (6) is present=1, second value (8) is present=0
|
||||
* Say -M 15, but there are 6 + 8 = 14 samples, below the acceptable threshold
|
||||
|
||||
|
|
@ -58,6 +71,29 @@ Related tools:
|
|||
* Ex: CLB is solved by first solving LUT bits, and then solving FF bits
|
||||
|
||||
|
||||
Interconnect PIP Tags
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Tags for interconnect PIPs are stored in the `segbits_int_l.db` and `segbits_int_r.db` database files. For example, look at `segbits_int_l.db` for the bits that configure the `INT_L` tile in a `CLBLL_L` or `CLBLM_L` segment.
|
||||
|
||||
Tags that enable interconnect PIPs have the following syntax: `<tile_type>.<destination_wire>.<source_wire>`.
|
||||
|
||||
The `<tile_type>` may be `INT_L` or `INT_R`. The destination and source wires are wire names in that tile type. For example, consider the following entry in `segbits_int_l.db`: `INT_L.NL1BEG1.NN6END2 07_32 12_33`
|
||||
|
||||
This means that the bits `07_32` and `12_33` must be set in the segment to drive the value from the wire `NN6END2` to the wire `NL1BEG1`.
|
||||
|
||||
CLB Configurations Tags
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Tags for CLB tiles use a dot-separated hierarchy for their tag names. For example the tag `CLBLL_L.SLICEL_X0.ALUT.INIT[00]` documents the bit position of the LSB LUT init bit for the ALUT for the slice with even X coordinate within a `CLBLL_L` tile. (There are 4 LUTs in a slice: ALUT, BLUT, CLUT, and DLUT. And there are two slices in a CLB tile: One with an even X coordinate using the `SLICEL_X0` namespace for tags, and one with an odd X coordinate using the `SLICEL_X1` namespace for tags.)
|
||||
|
||||
|
||||
|
||||
ppips_*.db
|
||||
----------
|
||||
|
||||
Pseudo PIPs are PIPs in the Vivado tool, but do not have actual bit pattern. The `ppips_*.db` files contain information on pseudo-PIPs. Those files contain one entry per pseudo-PIP, each with one of the following three tags: `always`, `default` or `hint`. The tag `always` is used for pseudo-PIPs that are actually always-on, i.e. that are permanent connections between two wires. The tag `default` is used for pseudo-PIPs that represent the default behavior if no other driver has been configured for the destination net (all `default` pseudo-PIPs connect to the `VCC_WIRE` net). And the tag `hint` is used for PIPs that are used by Vivado to tell the router that two logic slice outputs drive the same value, i.e. behave like they are connected as far as the routing process is concerned.
|
||||
|
||||
mask_*.db
|
||||
---------
|
||||
|
||||
|
|
@ -67,3 +103,35 @@ Example line: bit 01_256
|
|||
|
||||
See previous section for number meaning
|
||||
|
||||
For each segment type there is a mask file `mask_<seg_type>.db` that contains one line for each bit that has been observed being set in any of the example designs generated during generation of the database. The lines simply contain the keyword `bit` followed by the bit position. This database is used to identify unused bits in the configuration segments.
|
||||
|
||||
|
||||
.bits example
|
||||
-------------
|
||||
|
||||
Say entry is: bit_0002050b_002_05
|
||||
|
||||
2 step process:
|
||||
* Decode which segment
|
||||
* Decode which bit within that segment
|
||||
|
||||
We have:
|
||||
* Frame address 0x0002050b (hex)
|
||||
* Word #: 2 (decimal, 0-99)
|
||||
* Bit #: 5 (decimal, 0-31)
|
||||
|
||||
The CLB tile and the associated interconnect switchbox tile are configured together as a segment. However, configuration data is grouped by segment column rather than tile column. First, note this segment consists of 36 frames. Second, note there are 100 32 bit words per frame (+ 1 for checksum => 101 actual). Each segment takes 2 of those words meaning 50 segments (ie 50 CLB tiles + 50 interconnect tiles) are effected per frame. This means that the smallest unit that can be fully configured is a group of 50 CLB tile + switchbox tile segments taking 4 * 36 * 101 = 14544 bytes. Finally, note segment columns are aligned to 0x80 addresses (which easily fits the 36 required frames).
|
||||
|
||||
tilegrid.json defines addresses more precisely. Taking 0x0002050b, the frame base address is 0x0002050b & 0xFFFFFF80 => 0x00020500. The frame offset is 0x0002050b & 0x7F => 0x0B => 11.
|
||||
|
||||
So in summary:
|
||||
* Frame base address: 0x00020500
|
||||
* Frame offset: 0x0B (11)
|
||||
* Frame word #: 2
|
||||
* Frame word bit #: 5
|
||||
|
||||
So, with this in mind, we have frame base address 0x00020500 and word # 2. This maps to tilegrid.json entry SEG_CLBLL_L_X12Y101 (has "baseaddr": ["0x00020600", 2]). This also yields "type": "clbll_l" meaning we are configuring a CLBLL_L.
|
||||
|
||||
Looking at segbits_clbll_l.db, we need to look up the bit at segment column 11, offset at bit 5. However, this is not present, so we fall back to segbits_int_l.db. This yields a few entries related to EL1BEG (ex: INT_L.EL1BEG_N3.EL1END0 11_05 13_05).
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,15 @@ General notes:
|
|||
tilegrid.json
|
||||
-------------
|
||||
|
||||
The file `tilegrid.json` contains lists of all tiles in the ROI and the configuration segments formed by those tiles. It also documents the membership relationship of tiles and segments.
|
||||
|
||||
For each segment this contains the configuration frame base address, and the word offset within the frames, as well as the number of frames for the segment and number of occupied words in each frame.
|
||||
|
||||
For each tile this file contains the tile type, grid X/Y coordinates for the tile, and sites (slices) within the tile.
|
||||
|
||||
Note that pairs of INT-tiles and non-INT-tiles form a segment. The same type-name (e.g. `CLBLL_R` is used for the non-INT tile within the segment, and the segment itself). So for example, a `CLBLL_R` segment contains a `CLBLL_R` tile and an `INT_R` tile.
|
||||
|
||||
|
||||
This section assumes you are already familiar with the 7 series bitstream format.
|
||||
|
||||
This file contains two elements:
|
||||
|
|
@ -101,6 +110,8 @@ Interpreted as:
|
|||
tileconn.json
|
||||
-------------
|
||||
|
||||
The file `tileconn.json` contains the information how the wires of neighboring tiles are connected to each other. It contains one entry for each pair of tile types, each containing a list of pairs of wires that belong to the same node.
|
||||
|
||||
This file documents how adjacent tile pairs are connected.
|
||||
No directionality is given.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue