hdl / conda-eda

Conda recipes for FPGA EDA tools for simulation, synthesis, place and route and bitstream generation.
https://anaconda.org/LiteX-Hub
Apache License 2.0
91 stars 26 forks source link

Add ghdl and ghdl-yosys-plugin #171

Open shenki opened 2 years ago

shenki commented 2 years ago

In order to use VHDL with the yosys flows, we need ghdl and the ghdl yosys plugin to be part of the environment.

https://github.com/ghdl/ghdl-yosys-plugin

https://github.com/ghdl/ghdl.git

kgugala commented 2 years ago

@umarcor can you take a look at this?

umarcor commented 2 years ago

The main challenge is the availability of an Ada compiler in the Conda ecosystem. GHDL is written in Ada, so that's required in order to build the ghdl binary or the libghdl shared library. The ghdl-yosys-plugin is written in C, so an Ada compiler is not required. However, it depends on libghdl and on the assets of a GHDL installation.

umarcor commented 2 years ago

@proppy @PiotrZierhoffer would you know how to customize a compiler to enable Ada support in GCC?

/cc @mithro

proppy commented 2 years ago

@umarcor wouldn't https://github.com/conda-forge/staged-recipes/issues/14692 also help?

umarcor commented 2 years ago

@proppy, I believe that the main purpose is to support it on Linux, because all the tools are expected to be available, while some might be missing on Windows or macOS.

MSYS2 packages on Windows are known to work (one of my main workstation is a Windows 10 with MSYS2).

proppy commented 2 years ago

@umarcor ah yes, what I meant was that having the ada compiler available in conda-forge could enable us to build a recipe for this.

mithro commented 2 years ago

FYI -> https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html#customizing-the-compilers

mithro commented 2 years ago

https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html#using-your-customized-compiler-package-with-conda-build-3

nobodywasishere commented 1 year ago

Are these of any use? https://github.com/alire-project/GNAT-FSF-builds/releases/tag/gnat-12.2.0-1 It should(?) be possible to create conda packages for at least the linux/mac x86 ones.

nobodywasishere commented 1 year ago

Also found a gcc ada compiler that runs on M1 macs https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-12.2.0-aarch64

proppy commented 1 year ago

It seems that there is https://github.com/hdl/conda-eda/tree/master/syn/ghdlsynth in the repo but it doesn't seems to be currently included in the CI https://github.com/hdl/conda-eda/search?q=ghdlsynth (and therefore not published).

@PiotrZierhoffer @umarcor do you know if that's related to this effort?

proppy commented 1 year ago

/cc @xobs

umarcor commented 1 year ago

@proppy see https://github.com/hdl/conda-eda/commits/master/syn/ghdlsynth. I guess it never worked because there was never an Ada compiler available. So, the recipe/metadata are good enough, but a build time dependency is missing in the environment.