Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VHDL Support #11

Open
pedro-javierf opened this issue Sep 27, 2021 · 3 comments
Open

VHDL Support #11

pedro-javierf opened this issue Sep 27, 2021 · 3 comments

Comments

@pedro-javierf
Copy link

I was wondering what learning resources are available regarding the programming of the iCE40HX4K in the Alhambra-II using the VHDL language rather than Verilog/SystemVerilog. The reasoning for this is, lots of Spanish universities teach VHDL and not Verilog, thus it'd be great for students to be able to leverage their learnt FPGA skills using this board.

As far as I'm concerned, the only toolchain that supports this is the "official" Lattice iCEcube2. But how can a bitmap generated with this privative software (or others) be programmed into the board over USB?

@Werni2A
Copy link

Werni2A commented Nov 27, 2021

Shouldn't Lattice's toolchain be able to also program the Alhambra Board? I can't imagine that this does not work. Anyhow an open-source approach is provided by iceprog from the icestorm or openFPGAloader.

A short example below shows how to use both tools to program the ice40 FPGA (both were tested on my board). Still you have to adjust PWD for your current working directory and PROJ with your bitstream project name.

DOCKERARGS=run --rm -v /$(PWD)://wrk -w //wrk
ICEPROG=docker $(DOCKERARGS) --device /dev/bus/usb gcr.io/hdl-containers/prog:latest iceprog
OPENFPGALOADER=docker $(DOCKERARGS) --device /dev/bus/usb gcr.io/hdl-containers/openfpgaloader:latest openFPGALoader

$(ICEPROG) -d i:0x0403:0x6010:0 build/$(PROJ).bin
$(OPENFPGALOADER) -b ice40_generic build/$(PROJ).bin

@Werni2A
Copy link

Werni2A commented Nov 28, 2021

A simple design can be found at my repo that should get you started with a pure OSS VHDL flow.

@pedro-javierf
Copy link
Author

Thanks for the OSS flow @Werni2A ! I will definitely look into it. I had already found and documented the lattice VHDL flow here but this is what I really wanted :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants