Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17254 Discussions

Enable signaltap in quartus_sh build?

Altera_Forum
Honored Contributor II
2,786 Views

I do my builds using tcl scripts. I usually do the full build by running 

 

 

quartus_sh -t build.tcl Where build.tcl will create the project, do assignments and then run compile 

 

 

However when I include signaltap files in this flow I have to do: 

 

 

quartus_sh -t setup.tcl quartus_stp project_name --stp_file file.stp --enable quartus_sh -t comp.tcl Where setup.tcl will create the project and do assignements, and comp.tcl will simply run "execute_flow -compile". However, it's a bit cumbersome to run three processes. 

 

 

Is there a way to run the equivalent of quartus_stp from within quartus_sh

 

 

Most of the stuff that I've found in the stp package is related to running signaltap. Also enabling signaltap and stp files using assignment is not sufficient as the quartus_stp program appears to convert the xml forms in the stp file to various sld_node assignments etc.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
1,709 Views

I've never really understood the SignalTap interface via Tcl, but it's definitely non-standard. Here's something I put together for somebody else that worked. Change project_name to your project name: 

 

project_open project_name 

post_message "Setting SignalTap II Logic Analyzer settings." 

post_message "Assignments --> Settings --> SignaTap II Logic Analyzer" 

# Note that these assignments are unnecessary, as the quartus_stp call really adds the .stp, but this makes the .qsf match what was run 

set_global_assignment -name SIGNALTAP_FILE mystp.stp 

set_global_assignment -name ENABLE_SIGNALTAP ON 

set_global_assignment -name USE_SIGNALTAP_FILE mystp.stp 

set_global_assignment -name PARTITION_NETLIST_TYPE STRICT_POST_FIT -section_id Top 

set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top 

export_assignments; post_message -type info "Exporting Assignments..." 

 

qexec "quartus_stp --stp_file mystp.stp --enable project_name" 

qexec "quartus_map --read_settings_files=on --write_settings_files=off project_name -c rev_name" 

qexec "quartus_cdb project_name --merge" 

qexec "quartus_fit --read_settings_files=off --write_settings_files=off project_name -c rev_name" 

qexec "quartus_asm --read_settings_files=off --write_settings_files=off project_name -c rev_name" 

project_close
0 Kudos
Altera_Forum
Honored Contributor II
1,709 Views

Thanks, but that's basically what I do except you fork out the processes from quartus rather than the parent shell. I was looking for a package which was doing the equivalent of the quartus_stp process. Forking out processes which will modify the currently open project database could possibly lead to potential problems.

0 Kudos
Altera_Forum
Honored Contributor II
1,709 Views

I'd move project_close before running quartus_stp for safety as that process modifies the .qsf file on disk. In addition, I'd remove the following two redundant assignments that will be updated by quartus_stp --stp_file mystp.stp --enable project_name: 

set_global_assignment -name ENABLE_SIGNALTAP ON 

set_global_assignment -name USE_SIGNALTAP_FILE mystp.stp 

 

Alternatively, I'd change the command arguments to simply be "quartus_stp project_name" if you'd like to set those two up explicitly. Having two just makes the script harder to maintain. 

 

Here is what I'd do in one .tcl script evaluated by quartus_sh: 

 

 

project_open project_name 

source setup.tcl 

project_close 

qexec "quartus_stp --stp_file mystp.stp --enable project_name" 

project_open project_name 

source comp.tcl 

project_close
0 Kudos
Reply