Commit Graph

109 Commits

Author SHA1 Message Date
John McMaster 23813e3065 fasm2frame: optional value on simple elements
Remove INT prefixes not in segdb
Better test cases

Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-23 15:27:58 -08:00
John McMaster e892576560 fasm: slice site name as 0/1 instead of global coordinate. Test cleanup
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-22 17:49:51 -08:00
Rick Altherr 86db6b6724 Tool to patch a 7-series bitstream
Applies a .frm file (lines of frame address: frame words) to a bitstream
and writes the result as a new bitstream.  Note that the new bitstream
will not include the initialization and finalization sequences required
for programming.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-22 14:15:31 -08:00
Rick Altherr c894e1f123 tools: support CLBLL_L in segprint2fasm and fasm2frame
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-22 14:15:27 -08:00
Clifford Wolf b0b7ec0c06 Run "make format"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-01-22 19:46:45 +01:00
Clifford Wolf 98d2cd0945 Improve simpleroute debug output
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-01-20 20:52:11 +01:00
Clifford Wolf b98a4abf1e Add simpleroute.py tool for routing signals through ROI
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-01-20 18:15:56 +01:00
John McMaster 7ae7b0c16c roi_harness: misc fixes
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 20:14:33 -08:00
John McMaster 8c2e8ad1ea segprint2fasm: test suite
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 13:06:24 -08:00
John McMaster 58e84a20d2 segprint2fasm: baseline utility
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 13:05:36 -08:00
John McMaster 764ff74100 fasm2frame: stdin/stdout files by default
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 13:05:30 -08:00
John McMaster e995034158 fasm2frame FPGA assembler tool. Remove minitest rel path
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 10:58:19 -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 53d7f1f80b lib: xc7series: shorten accessor names
_address suffix on accessors is unnecessary and somewhat inaccurate.
The returned values are indices rather than frame addresses.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-10 14:28:17 -08:00
Rick Altherr 50d2521b33 Apply clang-format to all C++ files
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-08 17:14:27 -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 a4858be23a lib: accessor to get contents of a memory-mapped file as bytes
MemoryMappedFile's data() method returns a void* as it has no idea what
type the contents are.  Viewing it as bytes is a very common operation
so add a convience method that wraps the pointer in a Span<uint8_t>.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-04 11:17:59 -08:00
Rick Altherr 28c447c6b2 tools: Rewrite bitread using libprjxray
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 6a17a92d83 tools: rewrite gen_part_base_yaml using xc7series::Part
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 5eb7e15ad3 tools: Tool to generate part YAML from a debug bitstream
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 27aa3d7892 bittool: command for retrieving device IDCODE from a bitstream
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 a53589956e Revert "segmatch: add options to exclude tags and bits from a database"
Does not work as intended.  Removing to avoid confusion.

This reverts commit caeba1b49af17bdceb35803b2c3bc55ef0e3cf62.

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 76210b02c5 Revert "segmath: fixup inverted logic for --exclude_known"
Does not work as intended.  Remove to avoid confusion.
This reverts commit 80d8d6d8d3bc5e7ad5c72c9998777b5e0590ec30.

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 86f22183f8 bittool: Specify action via a positional arg instead of a flag
Action is a required option with no reasonable default.  Making it a
flag just requires the user to type extra for no benefit.

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 d799da0ad5 bittool: command to dump all frame addresses used in a bitstream
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 cfbfb477e6 frame_address_decoder: Autodetect input address base (oct, dec, hex)
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 bd9338da4a Tool to decode xc7series 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 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 216698560d tools: bitstream inspection tool built on libprjxray
Initial version support dumping configuration packets from a bitstream.

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
Clifford Wolf 339fd235bc Update tools to correctly handle ECC mask (ECC is only 13 LSB bits in word 50)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf 0efe772467 Fixed bitread FLAGS_o handling
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr a0f08cf3a2 segmath: fixup inverted logic for --exclude_known
Skip tags and bits if they are _found_ in the excluded sets.

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 744ed997a9 segmatch: add options to exclude tags and bits from a database
--exclude_known will omit any tags and bits that are already saved in
the database specified with --database_path.

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
Clifford Wolf 78a0ca0ef7 Add "segmatch -k"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf 913c4104b2 Add custom bool vector for segmatch
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
John McMaster 3c4d0b190f Ignore cmake generated files
Signed-off-by: John McMaster <JohnDMcMaster@gmail.com>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf 92d349bae1 Fix bitread tool handling of Type 1 FDRI writes
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 6d03445fb9 segmatch: convert to gflags
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 edc665d6df segmatch: Allow candidate output threshold to be set by flag
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
Clifford Wolf c3234588e1 Add seg name autoincrement to segmatch
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf b4b392ed54 Update gitignore files
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 5e42fd5abc bitread: Replace flag parsing with gflags
Some flag-related string parsing is also replaced with methods from
abseil.

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 fedf33b5ce tools: build with CMake
Building with CMake makes it a lot easier to bring in other libraries
such as gflags and abseil.

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
Clifford Wolf de1f909a37 Don't output segmatch stats when cnt_candidates is zero
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf fea6a9efb0 Add seg_int database
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf 1e74fd5d38 Improve const1 handling in segmatch
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf 90c0b570e8 Improve segmatch tool
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf 73c5f22931 Use decimal numbers in bit labels, some other cleanups
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf 8d462d341a Add FF XINI bits
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Clifford Wolf 3c955e6216 Flip "bitread -p" output Y axis
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-10-16 03:11:54 +02:00
Clifford Wolf 9e80cadfcc Add bitread PGM support
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-10-16 02:35:12 +02:00
Clifford Wolf 715b261c3e Add 010-lutinit fuzzer, Improve segmatch
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-10-15 03:00:56 +02:00
Clifford Wolf c5eaa5af77 Add Makefile to fuzzers/example/
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-10-14 04:28:13 +02:00
Clifford Wolf 18bdd5a1f3 Add XRAY_ROI_FRAMES and "bitread -F"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-10-14 01:35:02 +02:00
Clifford Wolf c860a78a86 Fix a bug in bitread when writing the same frame multiple times
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-10-14 01:33:47 +02:00
Clifford Wolf 916cae0ccd Add some CARRY4 related tests to "simple" experiment
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-10-13 22:00:49 +02:00
Clifford Wolf 06a31a602e Add segmatch tool
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-10-13 13:58:41 +02:00
Clifford Wolf bbdce157c5 Update picorv32 experiment and bitread.cc
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-10-13 11:21:59 +02:00
Clifford Wolf 3362b92cb1 Add bitread and add SLICEBIT extraction to gridinfo
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-07-23 13:57:59 +02:00