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

Basic Qsys Tcl Script Fails (EModuleProperty)

Altera_Forum
Honored Contributor II
1,860 Views

Hi, 

 

I'm trying to use a Qsys tcl script (modify.tcl) to modify an existing .qsys system (soc_system.qsys), but I am running into issues when trying to set the composition callback function. Here's what modify.tcl looks like: 

 

package require -exact qsys 14.0 set_module_property COMPOSITION_CALLBACK compose proc compose { } { set_instance_parameter_value led_pio {width} {16} } 

 

Here's how I'm invoking it: 

 

qsys-script --system-file=soc_system.qsys --script=modify.tcl 

 

The error is: 

 

Error: set_module_property: COMPOSITION_CALLBACK not allowed for EModuleProperty, must be in {} 

 

This is confusing to me because the Altera Qsys tcl reference explicitly lists module properties (which are what set_module_property accepts), and they include COMPOSITION_CALLBACK (and many others): https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/hb/qts/qsys_tcl.pdf#page=8. Many examples in the Altera documentation make the same exact call: https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/hb/qts/qsys_intro.pdf#page=12. Also, even when I use Qsys to automatically generate a _hw.tcl script from the .qsys file, I get the same error when I try to convert the tcl script back into a .qsys file. Basically, calls to set_module_property with anything but NAME or GENERATION_ID fail. I haven't found anyone online with the same problem, so I'm at a loss as to what could be going on. 

 

Using this instead doesn't modify the qsys file at all: 

 

package require -exact qsys 14.0 set_instance_parameter_value led_pio {width} {16} 

 

Does anyone know what the issue could be? I am running Ubuntu 12.04. 

 

Thanks in advance!
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
1,111 Views

You're confusing a couple different things. 

 

a) qsys-script as you are running it is intended to modify .qsys systems, not modules (_hw.tcl)  

 

b) the TCL reference (qsys_tcl.pdf) describes the TCL used in the _hw.tcl files, not the TCL used in qsys-script scripts. 

 

c) the TCL commands in qsys-script scripts are described in qsys_intro.pdf (page 47) 

 

d) the specific TCL example you're citing is for Instance scripts, which are another can of worms. Is that really what you're trying to do? 

 

 

As a trivial qsys-script example, if you've got a .qsys with a PIO instance called pio_0, the following script will change it's width to 64 and save the results. 

package require -exact qsys 13.1 set_instance_parameter_value pio_0 {width} {64} save_system
0 Kudos
Reply