Commit Graph

36 Commits

Author SHA1 Message Date
Tomasz Michalak 58c26369de bitstream_tools: Add unit tests for Spartan6
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-10-22 09:20:04 +02:00
Tomasz Michalak b35bf3fe11 bitstream_tools: Add support for Spartan6
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-10-22 09:20:04 +02:00
Tomasz Michalak d328a2f576 Add initial support for UltraScalePlus devices
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-10-15 13:45:14 +02:00
Tomasz Michalak 464a09a424 bitstream_tools: Move frames template methods to header file
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-10-11 14:14:28 +02:00
Tomasz Michalak 630cebd0fb Remove unused class
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-10-09 08:45:04 +02:00
Tomasz Michalak b356ed2761 Change location of Series7 tests and adapt to new API
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-10-09 08:45:04 +02:00
Tomasz Michalak 35b7130116 Replace API for Series7
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-10-09 08:45:04 +02:00
Tomasz Michalak cbc58c9ad1 xc7series: add unit test for addMissingFrames
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-04-10 15:00:41 +02:00
Tomasz Michalak 710658ebf8 libprjxray: move definition of icap_ecc to source file
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-04-10 14:42:34 +02:00
Tomasz Michalak 2aa3c30976 xc7frames2bit: implement tool for xilinx 7-series bitstream generation from frames
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-03-19 09:13:29 +01:00
Herbert Poetzl b69ed5cc7e Code cleanup and additional comments
Signed-off-by: Herbert Poetzl <herbert@13thfloor.at>
2018-01-31 18:48:01 -08:00
Herbert Poetzl 86f49cc9da Added ICAP CRC and ECC calculations and tests
Signed-off-by: Herbert Poetzl <herbert@13thfloor.at>
2018-01-31 18:48:01 -08:00
John McMaster dab52e90ba
Merge branch 'master' into bit_write 2018-01-17 15:07:04 -08:00
John McMaster fe49ac6cee bitstream writer utility class
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-17 15:06:12 -08:00
Rick Altherr 012494552d lib: xc7series: generate packets from a Configuration
ConfigurationPacketizer translates a Configuration's frame data to a
sequence of ConfigurationPackets that will write that configuration to
the configuration's Part.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-17 11:20:06 -08:00
Rick Altherr 2da520bea3 Remove unused ConfigurationFrameRange
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-10 14:28:30 -08:00
Rick Altherr 2b34fbb35d xc7series: refactor Part()
ConfigurationFrameAddress row-half and row fields translate directly to
the clock region structure used in 7-series parts.  Break these concepts
out into separate classes and encode them as such in Part YAML.

Columns within a row are more complicated. Column indices are relative
to a BlockType. Think of each BlockType as a data bus that terminates at
some particular tile type (e.g. CLB_IO_CLK maps to INT_{L,R} tiles).
Column indices act as addresses of endpoints on the associated BlockType
bus.  As the bus is 1 frame (101 words, 404 bytes) wide, each endpoint
feeds frames into multiple tiles simultaneously.

Minor addresses are frame addresses within a BlockType bus endpoint.
These can refer to frames either stored within the endpoint tiles
or in tiles chained behind them.

Note that a given tile can be connected on multiple BlockType buses.
For example, block RAMs appear to be attached both by being chained
behind an INT_{L,R} on the CLB_IO_CLK bus as well as being a direct
endpoint on the BLOCK_RAM bus.  Due to this, tiles conceptually belong
to the row rather than a single column.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-10 14:28:23 -08:00
Rick Altherr 1232caf648 lib: combine 7series tests into a single target
Reduces repitition in CMakeLists.txt.  Individiual tests can be selected
via gtest flags.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-05 14:01:44 -08:00
Rick Altherr 5a664c04ec lib: xc7series: shorten ConfigurationFrameAddress to FrameAddress
Frame addresses are only used in the context of configuration frames.
Remove the prefix to reduce typing that does not improve clarity.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-04 15:33:15 -08:00
Rick Altherr 6ba411294e lib: xc7series: verify bitstream variants parse to same configurations
Normal, debug, and per-frame CRC bitstreams differ in the commands used
to write the frame data but should generate equivalent configurations.
Note that this currently fails as something is wrong with normal
bitstream parsing.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-04 15:11:00 -08:00
Rick Altherr bd3fa58584 lib: xc7series: class to hold a configuration
Currently is able to parse IDCODE and frames from a sequence of
ConfigurationPackets.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr d251aa0ed7 lib: xc7series: wrapper for part-specific information
Currently just the pieces required to successfully identify and decode
a bitstream into configuration frames.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 4f6046d177 lib: xc7series: wrapper for ranges of config frame addresses
Includes conversion to/from YAML.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 6a2fb25013 lib: xc7series: YAML conversion tests for ConfigurationFrameAddress
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 7e2cdc0947 lib: xc7series: block_type YAML conversion tests
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 195323e0c8 lib: xc7series: enable conversion to/from YAML for frame addresses
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr fd3a5d8bab lib: xc7series: ostream overload for BlockType
Makes debugging a bit easier.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 47e02d4cfd lib: xc7series: move register details to reusable enum
Both ConfigurationPacket and Configuration need to reference registers.
Use a common scoped enum to reduce change of errors.  Leverage stream
operator to simplify outputing register names.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 0a005ab5a1 lib: move Xilinx 7series classes into a separate namespace
Class names were getting unwieldy.  Use a namespace to group all the
7series classes and allow for shorter class names.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 82a989cfc9 lib: Parser for Xilinx bitstream file format
Reads the raw bitstream into configuration packets that represent
internal register writes.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 4bc1567103 lib: Xilinx 7-Series configuration packet
Encapsulates configuration packets used in Xilinx 7-Series bitstream
format.  The same class handles both Type 1 and Type 2 packets.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr fdf0bc46a1 lib: adapter to read big-endian words from a span<> containing bytes
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr f65ee46f7c lib: bit manipulation functions
Functions for hiding all the masking and shifting required for accessing
bit ranges within an integer type.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 51b586365b lib: Wrapper for retrieving info from a database directory
Currently provides list of segbits files saved in the database.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 3e203b956b lib: Reader for segbits files
Acts as an iterator that yields a single record from the file.  Uses a
memory-mapped file and absl::string_view to avoid copies within the
reader.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 30a1e466d3 lib: wrapper to manage memory-mapped files
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00