Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

[Quartus+scripts] How to run different scripts automatically after each flow stage?

Hi All,

How can I automatically run the custom scripts after each stage of compilation in Quartus?

Let's say I want to run the script1 after the Analyze & Elaborate stage of compilation.

Let's say I want to run the script2 after the Filler.

Let's say I want to run the script3 after the STA stage.

etc...

How can I make these script run automatically after each stage?

Thank you!

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    As an example here is a Makefile I use to run Quartus:

    
    DESIGN=test
    all:: generate report
    generate::
    	$(QUARTUS_BIN)/quartus_map $(DESIGN) --write_settings_files=off
    	$(QUARTUS_BIN)/quartus_fit $(DESIGN) --write_settings_files=off --seed=1
    	$(QUARTUS_BIN)/quartus_asm $(DESIGN) --write_settings_files=off
    	$(QUARTUS_BIN)/quartus_sta $(DESIGN)
    	$(QUARTUS_BIN)/quartus_sta -t generate_timing.tcl $(DESIGN) 10
    	$(QUARTUS_BIN)/quartus_eda $(DESIGN) --write_settings_files=off -c $(DESIGN)
    	$(QUARTUS_BIN)/quartus_cpf -c $(DESIGN).cof
    report::
    	@-echo ' '
    	-egrep --color -i '\(+ violated\)' TQ_*.rpt
    	@-echo ' '
    	-egrep -vi '^this panel reports' TQ_fmax_summary.rpt
    	@-echo ' '
    clean::
    	-rm -f $(DESIGN).*.rpt $(DESIGN).*.summary $(DESIGN).*.smsg $(DESIGN).map $(DESIGN)_assignment_defaults.qdf TQ_*.rpt PLL*.txt meminit.txt
    	-rm -f $(DESIGN).done $(DESIGN).map $(DESIGN).pof $(DESIGN).sof $(DESIGN).jic $(DESIGN).pin $(DESIGN).jdi $(DESIGN).qws $(DESIGN).*.ddb $(DESIGN).sld
    	-rm -rf db incremental_db simulation
    #  the end
    

    so one could conceivably insert any extra invocations of special TCL scripts within the generate target as necessary.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks a lot! Can I ask you how this Makefile works? Where should it be placed?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Thanks a lot! Can I ask you how this Makefile works? Where should it be placed?

    --- Quote End ---

    It would go in your design directory. It should directly work under Linux. I happen to run on Win7 64b with Cygwin installed (a unix command line environment) so I just cd my cygwin shell window to the top of my design directory and type 'make'. No need to use the Quartus graphical environment at all.

    Maybe it will work in the new Win10 linux shell environment, I don't know. I don't use nor have I ever used Win10.