ghdl / docker

Scripts to build and use docker images including GHDL
40 stars 10 forks source link

Add nextpnr-ecp5 to ghdl/synth:nextpnr image? #21

Closed antonblanchard closed 4 years ago

antonblanchard commented 4 years ago

Hi @eine, I'm trying to use Docker images to do a complete GHDL/yosys/nextpnr workflow. A simple example is here https://github.com/antonblanchard/ghdl-yosys-blink

Rght now the ghdl/synth:nextpnr image only looks to have ice40 support. Any thoughts to adding ECP5 to that image? I was hoping nextpnr would have their own Docker images, but I couldn't find them.

eine commented 4 years ago
antonblanchard commented 4 years ago
  • Do you know how larger are the dependencies for ECP5? This is to decide whether to add it to the same image or to provide ghdl/synth:nextpnr-ecp5. In the latter case, is it worth/possible to build nextpnr with ECP5 support only or should it include support for both families?

From memory I just needed prjtrellis. I'm not sure if nextpnr has to be built twice.

Sure, I'll try to submit something today.

  • Currently, nextpnr is built without GUI support. However, should you find it useful, we can add a ghdl/synth:nextpnr-gui image that includes it.

I must admit I haven't used the nextpnr gui myself yet.

  • The issue was transferred from ghdl/ghdl to this repo. Maintaining docker images that go beyond GHDL was a license I took without explicitly discussing it with Tristan. Hence, I prefer to keep ghdl/ghdl for issues related to GHDL, to reduce (at least organise) the noise that might unfocus him from his priorities.

Makes sense!

I've been using podman with Fedora lately and it has just worked for everything I've needed. I'll add a variable in the Makefile to allow it to use Docker or podman I think.

I didn't see the full example (very nice!), but I'm sure I picked up the basic Docker options from the documentation somewhere.

  • Regarding nextpnr having their own Docker images... I tried to upstream the images that are complementary to GHDL. After ORConf, I proposed to fit some of them under the umbrella of FOSSI/Librecores. See librecores/docker-images#33. Previously, I had suggested YosysHQ/yosys#1287 and YosysHQ/SymbiYosys#58. Unfortunately, there seems to be either little interest or time.

I had stumbled on many of your issues when looking for images and it is a bit disappointing none of the projects want to do anything about it.

eine commented 4 years ago

From memory I just needed prjtrellis. I'm not sure if nextpnr has to be built twice.

We'll guess it ;)

Sure, I'll try to submit something today.

Thanks! I assume that, as soon as we start shipping a new image, you can have it tested with ghdl-yosys-blink, isn't it? If that is the case, you can already try ghdl/synth:nextpnr-ecp5. Note that this is a very first image, just to test if we can have a complete validation workflow.

I must admit I haven't used the nextpnr gui myself yet.

Then, we'll leave it as is until someone shows interest on that feature.

I didn't see the full example (very nice!), but I'm sure I picked up the basic Docker options from the documentation somewhere.

I'll move it to the docs when ghdlsynth is out of beta (which might involve reorganising the sources tgingold/ghdlsynth-beta#74). That will hopefully make it easier to find.

eine commented 4 years ago

@antonblanchard, I'm closing this because new images are available.

Nonetheless, what do you think about contributing/upstreaming ghdl-yosys-blink to ghdlsynth-beta? A few days ago I started reorganising available examples. Currently, there are three subfolders, one for each board. However, all three boards contain ICE40 devices. It'd be interesting to have a subfolder for ECP5 boards too. I think that a first step can be to copy ghdl-yosys-blink as subdir examples/ecp5, as is. Then, I would extend the docker section of the readme.

Since some of the examples are duplicated (e.g. blink), in the future I would like to cleanup by merging all ICE40 examples in a single subdir (following the same structure as ghdl-yosys-blink).

At the same time, currently I'm cloning both ghdlsynth-beta and ghdl-yosys-blink in the test step of this repo. Having them merged would make it slightly "easier".