Initial support for ghdl synthesis
authorAnton Blanchard <anton@linux.ibm.com>
Fri, 17 Jan 2020 23:02:07 +0000 (10:02 +1100)
committerAnton Blanchard <anton@ozlabs.org>
Tue, 21 Jan 2020 01:52:20 +0000 (12:52 +1100)
commitdb937403ec9aff71ba8c17f68b62ea40a575f51c
tree9a028ded3b27c18d272ddf8ebf91e57f86305acc
parent21a40c2ba62d95212df173fa56aa11c22b08b422
Initial support for ghdl synthesis

A first pass at ghdl synthesis using yosys and nextpnr. It runs hello world
or micropython if the FPGA has enough block RAM (eg ECP5 85F). The hello
world testcase also loops UART rx to tx in software (ie not a hardware
loopback).

It uses Docker images, so no software needs to be installed. If you prefer
podman you can use that too. Edit Makefile.synth to configure your FPGA,
JTAG device etc.

To build:

make -f Makefile.synth

and to program:

make -f Makefile.synth prog

A few issues:

We need to add PLL support. Right now Microwatt runs at whatever the
external clock frequency is and the baud rate gets scaled by how far off
50MHz it is. This means on the ecp5-evn with a 12 MHz clock rate the baud
rate is a quite strange 27650 (115200 * 50 / 12). On my OrangeCrab with a
50MHz clock the UART is 115200.

It uses a large amount of resources, way more than it should. There are
still some ghdl/yosys issues to be sorted out.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
14 files changed:
Makefile.synth [new file with mode: 0644]
constraints/ecp5-evn.lpf [new file with mode: 0644]
constraints/orange-crab.lpf [new file with mode: 0644]
openocd/LFE5U-25F.cfg [new file with mode: 0644]
openocd/LFE5U-45F.cfg [new file with mode: 0644]
openocd/LFE5U-85F.cfg [new file with mode: 0644]
openocd/LFE5UM-25F.cfg [new file with mode: 0644]
openocd/LFE5UM-45F.cfg [new file with mode: 0644]
openocd/LFE5UM-85F.cfg [new file with mode: 0644]
openocd/LFE5UM5G-25F.cfg [new file with mode: 0644]
openocd/LFE5UM5G-45F.cfg [new file with mode: 0644]
openocd/LFE5UM5G-85F.cfg [new file with mode: 0644]
openocd/ecp5-evn.cfg [new file with mode: 0644]
openocd/olimex-arm-usb-tiny-h.cfg [new file with mode: 0644]