Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12690 Discussions

Hooks for own tools during Quartus Compilation?

Altera_Forum
Honored Contributor II
1,797 Views

Hi, 

 

we'd like to embed a number that identifies a particular FPGA configuration in it (the SYS ID isn't sufficient because it doesn't change if only logic outside the SOPC was modified) 

 

Ideally, this number should be generated (or taken from version control system) and embedded in the configuration automatically as a last step before compiling and assembling. 

 

I know that I could create my own build script for the whole process, but is there a way to have it integrated when building from Quartus GUI? Maybe some hook somewhere in one of the existing scripts to call something external? 

 

Such hooks exist in the Eclipse NIOS IDE for building the firmware, but not in Quartus... 

 

Would appreciate it if you knew one. 

 

Regards, 

Kolja
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
431 Views

You could create an Avalon mapped component that instantiates a ROM. You will get a hex/mif file to pre-initialize it which you can inject your version control number into (script it or manual). Then parameterize the memory to be LE based instead of memory. By using LEs it should synthesize into wires and be almost free (you'll have a little bit of switch fabric logic created). 

 

You could also get really fancy and avoid the memory instantiation altogether and just have a script that parses HDL and modifies a parameter within it. 

 

I hope that helps, maybe someone else will have a better idea for you.
0 Kudos
Altera_Forum
Honored Contributor II
431 Views

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

You could create an Avalon mapped component that instantiates a ROM[/b] 

--- Quote End ---  

 

 

Well I have not been clear about my actual question. I didn&#39;t mean to ask what the script to embed the number should do, but rather: how to ensure this script is executed when (or immediately before) selecting "Compile" in Quartus. 

 

Experience shows that steps that can be omitted will be omitted, and that&#39;s not acceptable in this case... And it would be same with a selfmade build script that has to be executed "outside Quartus". It would be used only in special cases (i.e. when specifically asked to do so) but it really should be used _always_. 

 

So I&#39;m actually looking for a hook for such script, in the build process that is triggered from Quartus&#39; menu.
0 Kudos
Reply