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++
12603 Discussions

Editor callback in SOPC components

Altera_Forum
Honored Contributor II
979 Views

I'm trying to make a SOPC Builder component of a module written in Verilog.  

Besides some internal SOPC connections, my module has a parameterized, user-specified number of "conduit" ports: from 1 to 8.  

Each of these external ports has some four parameters which must also be specified by the user. 

So, I want the GUI of my SOPC component to include the following: 

a) a dropdown list for specifying the number of ports ("NOP"); 

b) a number of field groups equal to NOP, each group containing the four parameter fields for one port. These groups of fields should appear and disappear dynamically when I change the value in the NOP dropdown list. 

Or, at least, unused port field groups should be greyed out when NOP is less than 8. 

 

Do I understand it right 

that I have to make an editor callback in the .tcl script? 

The SOPC Builder user guide doesn't give a detailed explanation of how to make editor callbacks. I've looked through the source files of Altera-provided SOPC components, and learnt that all components with dynamically changing GUIs are written in Perl or something. 

Is it possible to write what I want to write using Tcl only?  

I wouldn't want to study Perl right now... 

Maybe there are some comprehensive documents on SOPC components GUIs that could help me?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
305 Views

You can do all that in the validation and elaboration callbacks. The .tcl API is versioned so if you use the latest you might be able to do everything in a single callback (not sure haven't hand written a .tcl file in a while). Search the wiki for "modular SGDMA" and take a look at the .tcl files for each of the components in the /ip directory. There are interfaces like the response port (dispatcher core) that change based on the parameterization. The read/write masters have dropdown selection boxes and GUI options that enable/disable based on the parameterization. Make sure you use the same .tcl API otherwise the callback behavior will be different.

0 Kudos
Reply