fusesoc icon indicating copy to clipboard operation
fusesoc copied to clipboard

Question: execute command before generating a project using Vivado

Open rafaelnp opened this issue 2 months ago • 3 comments

I am using PeakHDL to store synthesis time and date in an AXI4-Subordinate IP Core and have to execute register generation every time the project. containing this IP Core, is generated. The following code is used in a Makefile and performs the register generation successfully.

project:
        # generate sysinfo registers
        $(MAKE) -C ./hdl/ipcores/sysinfo/ all
        fusesoc run --setup --target=synth --no-export $(PROJ_NAME)

I took a look at the hook scripts. and as fas as I understood, they run after the project is generated. I also took a look at #488 and #353 and could not achieve any positive result. Is it possible to achieve what I described above?

FuseSoC version: 2.4.4 OS: Arch Linux - 6.17.2-arch1-1 Vivado: 2021.2

Thanks in advance for any suggestions.

rafaelnp avatar Oct 20 '25 18:10 rafaelnp

Did you try to use generators instead of hooks? https://fusesoc.readthedocs.io/en/stable/user/build_system/generators.html#

If you can provide a minimal example project with PeakHDL I can help you configure fusesoc generators.

rbrglez avatar Oct 21 '25 08:10 rbrglez

Thanks for the suggestions. Reading the link you sent, I understood the concept, however not the practical side, the implementation. Could you please send me a link to a project using fusesoc + generators?

rafaelnp avatar Oct 21 '25 20:10 rafaelnp

Using this repository I was able to get generators working in FuseSoC. At work, I'm now using them to generate registers.

rbrglez avatar Oct 22 '25 06:10 rbrglez

After a while trying to run the examples, I could achieve no results. Unfortunately there is no documentation. In the FuseSoC the concepts are explained, but there are no examples or mention to which commands should be used to use a generator, in the generators repo.

Could you please provide the commands needed to run the generators examples in the repo you mentioned ?

rafaelnp avatar Dec 17 '25 21:12 rafaelnp

I have created a fork of the FuseSoC generator repository and added a new generator that produces the current date.

You can view the fork here: https://github.com/rbrglez/fusesoc-generators/tree/feature/date

Additionally, I included a minimal README.md showing how to run the generator and generate a VHDL date package.

rbrglez avatar Dec 18 '25 08:12 rbrglez