Skip to content

Commit a367a2f

Browse files
csantosbtgingold
authored andcommitted
README.md: Document synthesis and p&r with volatile guix containers.
1 parent b1ea607 commit a367a2f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,22 @@ iceprog leds.bin
135135
See [hdl/containers](https://github.com/hdl/containers) for further info about containers including other EDA tools.
136136

137137
> NOTE: on GNU/Linux, it should be possible to use board programming tools through `hdlc/icestorm`. On Windows and macOS, accessing USB/COM ports of the host from containers is challenging. Therefore, board programming tools need to be available on the host. Windows users can find several board programming tools available as [MSYS2](https://www.msys2.org/) packages. See [mingw-w64-x86_64-eda](https://packages.msys2.org/group/mingw-w64-x86_64-eda)|[mingw-w64-i686-eda](https://packages.msys2.org/group/mingw-w64-i686-eda) and [hdl/MINGW-packages](https://github.com/hdl/MINGW-packages).
138+
139+
## Guix containers
140+
141+
As an alternative, [guix](https://guix.gnu.org/) on the fly [shells](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html), provide custom, disposable containers.
142+
143+
Synthesis with Yosys:
144+
145+
```sh
146+
YS='ghdl leds.vhdl spin1.vhdl -e leds; synth_ice40 -json leds.json'
147+
MODULE='~/.guix-profile/lib/yosys/ghdl.so'
148+
149+
guix shell -CP ghdl-yosys-plugin -- yosys -m $MODULE -p $YS
150+
```
151+
152+
P&R the design with [nextpnr](https://github.com/YosysHQ/nextpnr) and generate a bitstream with [icestorm](https://github.com/cliffordwolf/icestorm) tools:
153+
154+
```sh
155+
guix shell -C nextpnr icestorm -- nextpnr-ice40 --hx1k --json leds.json --pcf leds.pcf --asc leds.asc && icepack leds.asc leds.bin
156+
```

0 commit comments

Comments
 (0)