public domain tools for FPGAs
Go to file
2015-07-10 11:13:39 +08:00
doc Rewrite manuals in the better semantic mdoc format (still works in groff). 2013-07-03 22:55:53 -06:00
libs %lX is too small to contain uint64 on 32-bit platforms, so use %llX. thanks to bentley 2015-07-10 10:43:53 +08:00
mini-jtag - a few things moved from custom text to json 2015-03-15 16:42:35 -04:00
.gitignore more json, some bram work 2015-04-01 17:13:32 -04:00
autotest_diff.sh *.sh: use "/usr/bin/env bash" shebang line 2013-01-16 10:06:36 +08:00
autotest.c more json, some bram work 2015-04-01 17:13:32 -04:00
bit2fp.c more json, some bram work 2015-04-01 17:13:32 -04:00
blinking_led.c more logic variable reorg 2013-02-14 08:42:08 -05:00
draw_svg_tiles.c started with clock routing 2012-12-07 23:02:04 -05:00
fp2bit.c blinking_led fix 2013-01-18 07:53:30 -05:00
fpgastyle.css css 2012-06-23 16:55:17 +02:00
fpinfo.c more json, some bram work 2015-04-01 17:13:32 -04:00
hello_world.c more logic variable reorg 2013-02-14 08:42:08 -05:00
hstrrep.c fix cppcheck warnings 2013-01-16 10:15:05 +08:00
j1_blinking.c bug fixing 2013-01-21 08:51:38 -05:00
jtag_counter.c bug fixing 2013-01-21 08:51:38 -05:00
lib.svg tiny svg steps 2012-06-18 04:47:51 +02:00
LINKS more dirwire modeling 2012-11-04 14:19:18 +01:00
lut.svg finished lut equiv. schematic 2012-06-23 16:54:53 +02:00
Makefile We should use --ignore-fail-on-non-empty instead of -rf 2015-07-10 11:13:39 +08:00
Makefile.common Don't assume bash is at /bin/bash (not the case on, e.g., BSD). 2013-07-04 11:21:55 -06:00
merge_log.sh *.sh: use "/usr/bin/env bash" shebang line 2013-01-16 10:06:36 +08:00
merge_seq.c - a few things moved from custom text to json 2015-03-15 16:42:35 -04:00
pair2net.c fix cppcheck warnings 2013-01-16 10:15:05 +08:00
printf_swbits.c happy new year 2013 2013-01-16 10:15:05 +08:00
README more json, some bram work 2015-04-01 17:13:32 -04:00
sort_seq.c - a few things moved from custom text to json 2015-03-15 16:42:35 -04:00
UNLICENSE ramb16 cleanup, going public domain, see unlicense.org 2012-06-26 01:45:43 +02:00

Introduction
 fpgatools converts the configuration of an FPGA between
 JSON and bitstream representation.

 The only supported chip at this time is the xc6slx9, a 45nm-generation
 FPGA with 5720 6-input LUTs, block ram and multiply-accumulate
 resources.

 Also not included are place and route tools or other higher-level
 logic optimization, synthesis, Verilog, HLS, etc.
 Future work on integrating with graywolf or yosys might be an option.
 If you have ideas in that direction, please email the author at
 wspraul@q-ag.de

 *) educational resource
 *) have fun and experiment with every feature of the chip
 *) command-line tools, text-based file formats
 *) supported platform: Linux
 *) free software, released into the public domain (see
    UNLICENSE for details)

FAQ
 todo

Libraries

- libfpga-control    programmatic access to libfpga-model
- libfpga-model      in-memory representation of the FPGA
- libfpga-floorplan  reads and writes .fp floorplan files
- libfpga-bit        reads and writes .bit bitstream files

Design Utilities

- hello_world        outputs an AND gate floorplan to stdout
- blinking_led       outputs blinking led design to stdout
- fpinfo             outputs information about tiles, devices, ports,
                     connections and switches in a floorplan
- fp2bit             converts .fp floorplan into .bit bitstream
- bit2fp             converts .bit bitstream into .fp floorplan
- draw_svg_tiles     draws a simple .svg showing tile types

fpgatools Development Utilities

- autotest           test suite
- sort_seq           sorts line-based text file by sequence numbers in strings
- merge_seq          merges a pre-sorted text file into wire sequences
- pair2net           reads the first two words per line and builds nets
- hstrrep            high-speed hashed array based search and replace util

Profiling

~# time ./hello_world
~# perf record ./hello_world
~# perf annotate
~# perf report

TODO (as of 2015-03)

short-term (3 months):
* support block memory
  -> write block_mem autotest
* support macc
* support pll_adv
* support dcm
* support ilogic2/ologic2

mid-term (12 months):
* example: counter (including clock, jtag)
* more cases in logic block configuration
* autotest: fix bugs in lut_encoding, logic_cfg, routing_sw, io_sw tests
* autotest: protect stderr of diff executable in autotest log
* several places might benefit from a bison parser:
  - switchbox description into bit parser/generator (bit_frames.c)
  - inter-tile wire connections (model_conns.c)
  - configure devices and route wires

cleanup (whenever convenient):
* use tile flags instead of tile names
* model connections and switches together rather than separately
* describe more wire names/meanings with integers instead of strings
* move all part-specific static data into xc_info()

long-term (>12 months):
* auto-crc calculation in .bit file
* MCB switches and connections
* maybe fp2bit should natively write ieee1532 and separate tools convert
  from ieee1532 to .bit and other formats
* design fpga core that uses high-speed icap/reconfig to process data
* example: j1 soc
* support chips other than xc6slx9, maybe xc7a35 or xc7a100

ChangeLog

2012-12-20
* Second design verified: blinking_led is a clocked design where the clock
  increments a counter and the highest bit of the counter drives a LED.

2012-09-24
* First design verified: hello_world is an unclocked AND gate design
  which was verified in a xc6slx9.

2012-08-20
* Beginning of full fidelity circle with model, floorplan, conversion
  between floorplan and binary configuration formats.

2012-06-03
* Project started.