Altera_Forum
Honored Contributor
16 years agoRunning a batch file before compiling
In my VHDL application I have some registers which are readable via SPI by a CPU. I would like to have one of the registers report the current source code revision.
I am using Subversion + TortoiseSVN for revision control on my Quartus project. Subversion comes with a utility which can put the current source revision into your source code, so that every time you build, the version number can automatically be updated in the logic itself. So my plan is is have a batch file which calls SubWCRev.exe. This takes a template file, substitutes the variable $WCREV$ with the subversion revision number and writes the output to dualPortRegs.mif. This way, my FPGA version register will always refer to the correct source version. However, I would really like this batch file to be executed whenever I direct Quartus to compile. Is there a way to tell Quartus to run a batch file before compiling my project? This way I can't ever forget to update the version number; It will happen automatically. Thanks, -Kevin