From d7437256f54daddece9fc39b506050080762f858 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 2 Feb 2017 21:35:36 +0100 Subject: Add build and use instructions. --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 59ef622..4ef0883 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,44 @@ # ghdlsynth-beta VHDL synthesis (based on ghdl) + +This is awfully experimental and work in progress! + +## How to build + +FIXME: should provide an easy way to build as a module! + +Get ghdl from github, +build and install +build and install libghdlsynth.a: +```sh +$ make libghdlsynth.a +$ make install.libghdlsynth +``` + +Get yosys. + +From ghdlsynth-beta: +Patch yosys sources using yosys.diff +Copy the ghdl/ directory in yosys/frontends + +Configure yosys. +In Makefile.conf, add: +```makefile +ENABLE_GHDL := 1 +GHDL_DIR := +``` + +Build yosys. + +## How to use + +Example for icestick: + +```sh +ghdl -a leds.vhdl +ghdl -a spin1.vhdl +yosys -p 'ghdl leds; synth_ice40 -blif leds.blif' +arachne-pnr -d 1k -o leds.asc -p leds.pcf leds.blif +icepack leds.asc leds.bin +ceprog leds.bin +``` -- cgit v1.2.3