Commit Graph

593 Commits

Author SHA1 Message Date
Rick Altherr 87d9538af9 Return zero-fill packets when reading bitstreams
Zero-fill packets are required in certain conditions to create valid
bitstreams.  When reading a bitstream, make sure they are yielded and
printed.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-22 14:15:30 -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
Rick Altherr b0604362e0 lib: xc7series: const all the Span<>s
Span<T> can be converted to a Span<const T> but the reverse is not true.
Since most of the uses of spans do not allow modification of the data,
taking a Span<const T> is more versatile and importantly allows them to
be used in const methods.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-22 14:15:13 -08:00
Clifford Wolf 84d09c833e
Merge pull request #54 from SymbiFlow/simpleroute.py
Add simpleroute.py tool for routing signals through ROI
2018-01-22 19:50:54 +01: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
Rick Altherr 19b73fe296
Merge pull request #53 from mcmasterg/roi_xdc
Roi xdc
2018-01-19 14:25:10 -08:00
John McMaster 2015f4cb62 roi_harness: remove top.v test
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-19 14:09:24 -08:00
John McMaster 5b0a1f7cb5 roi_harness: example clk hack
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-19 14:03:31 -08:00
John McMaster b6ae50b718 roi_harness: preserve contraints between harness and sub-project
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-19 14:03:13 -08:00
Rick Altherr c38907cd73
Merge pull request #52 from mcmasterg/roi_harness
Roi harness
2018-01-18 20:33:07 -08:00
John McMaster 4237ed0898 roi_harness: generate .frm file
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 20:25:42 -08: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 169a822865 roi_harness: basys3 pins to allow partgen
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 20:07:42 -08:00
John McMaster 4657677aad roi_harness: inverted LED/switch example
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 19:12:38 -08:00
John McMaster 4b2c424e97 roi_harness: output dir per configuration
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 19:07:03 -08:00
John McMaster a39e1bca78 roi_harness: basys3 support, separate top.v into harness and ROI .v files
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-18 18:05:36 -08:00
Rick Altherr d587030ea5
Merge pull request #51 from mcmasterg/segprint2fasm
Segprint2fasm
2018-01-18 16:56:51 -08:00
Rick Altherr 6732bccec0
Merge pull request #50 from mcmasterg/fasm2frame
Fasm2frame
2018-01-18 16:56:39 -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
John McMaster b5960c9b55
Merge pull request #47 from mcmasterg/bit_write
Bitstream writer utility class
2018-01-17 15:56:16 -08:00
John McMaster 68d98f929c
Merge branch 'master' into bit_write 2018-01-17 15:21:51 -08:00
John McMaster e5df3ca564
Merge pull request #49 from mcmasterg/minitest_flatten_h
minitests: flatten hiearchy
2018-01-17 15:21:38 -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
John McMaster e7b14ecca7
Merge branch 'master' into minitest_flatten_h 2018-01-17 14:59:01 -08:00
Rick Altherr 90fdd44e08
Merge pull request #48 from kc8apf/packet_generator
lib: xc7series: generate packets from a Configuration
2018-01-17 14:54:36 -08:00
John McMaster 8c9659f197 minitests: flatten hiearchy
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
2018-01-17 14:42:08 -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 5749352937 lib: xc7series: convience constructor for Configuration
Configuration's original constructor expects Span<uint32_t>s as part of
the map to avoid copying the actual frame data.  In tests or any other
place that needs to directly construct a Configuration, the caller will
already have a map with vector<uint32_t> to hold the actual frame data.
This new constructor just wraps those vectors in Spans.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-16 16:11:08 -08:00
Rick Altherr 850539927f
Merge pull request #42 from kc8apf/disable_tests_by_default
Fix default build settings
2018-01-12 12:09:53 -08:00
Rick Altherr 02d28f2920 Document how to enable test and build with debug info
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-12 11:48:11 -08:00
Rick Altherr 0910ac07a2 Use CMake build types to set optimization level
CMake has reasonable defaults for Debug and Release builds but the build
type isn't specified by default. That led to me adding explicit flags.
Remove those flags and default to using Release builds.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-12 11:48:11 -08:00
Rick Altherr f413656912 Disable tests by default
No need to spend time building all the tests unless you specifically
want them.  To build them, run 'cmake -DPRJXRAY_BUILD_TESTING=ON ..' in
the build directory.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-12 11:48:11 -08:00
Rick Altherr 908c32adaf
Merge pull request #44 from kc8apf/part_refactor
xc7series: refactor Part()
2018-01-12 10:57:43 -08:00
Rick Altherr 9cec0d5832
Merge branch 'master' into part_refactor 2018-01-12 10:49:19 -08:00
Rick Altherr 667ba2f5ea
Merge pull request #43 from kc8apf/use_yapf
Use yapf instead of autopep8 for Python formatting
2018-01-12 10:18:20 -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 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 43e51dd5c1 Reformat existing Python files with yapf
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-09 14:50:06 -08:00
Rick Altherr 820c0a5d78 Use yapf instead of autopep8 for Python formatting
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-09 14:50:05 -08:00
Rick Altherr 67c7914a2c Revert "Autopep8 on all existing sources"
This reverts commit 925885c2cc.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-09 14:49:57 -08:00
Rick Altherr 17985d1934
Merge pull request #41 from kc8apf/code_format
Specify and enforce code style for C++ and Python
2018-01-09 11:40:57 -08:00
Rick Altherr fdea2b256d travis: Check for format errors
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-08 18:20:57 -08:00
Rick Altherr d14fc142df Makefile: target to format source code
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-08 17:23:42 -08:00