December 8, 2024

Vivado EMIO project using Tcl

This is also an Antminer S9 project.

I have s9_emio already that has 51 emio pins configured to go to the 47 externally routed FPGA signals and the 4 onboard LED. This time I am repeating that projet, but setting up the Tcl scripts so I can put it on Github, as well as use it as a jumping off port to add fancy LED control.

I start by making a throw-away block diagram project I call "zzz". I launch Vivado and use the create project "wizard".
The part is xc7z010clg400-1.

Next we create a block design. The usual "design_1" default will be fine. I add the Zynq block and do two customizations:

If we didn't turn off AXI GP0 it would fuss about things that it could not connect. The EMIO signals appear as "GPIO_0" on the Zynq block. I find the right place to place the mouse so I can get a menu for GPIO_0 that has the entry "Make external". I select this, then run block automation.

Go to Sources, expand Design Sources, then select design_1 and get a menu. Select "create HDL wrapper".

The constraint file

We need to add our constraint file.

We could have done this right up front, but it doesn't hurt at all to do it after setting up the model and generating the HDL wrapper.

Under "sources" I use the big "+" and change the selection to "add or create constraints". Then I used the "add" button, navigate to where my constraint file is, and add it.

Generate bitstream

I click on this button at the lower left and wait the usual 6 minutes.
It works!
/u1/home/tom/vivado/zzz/zzz.runs/impl_1/design_1_wrapper.bit

Test the bitstream

And we have a bitstream!

/u1/home/tom/vivado/s9_emio/s9_emio.runs/impl_1/design_1_wrapper.bit
We can copy this into Kyu, rebuild, and write some C code to test this.

Conclusion

Vivado 2024.2 seems exactly the same as 2022.2 that I have been using. And it works on my Fedora 41 linux system.
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org