Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

SystemConsole and Tcl GPIB extension

Altera_Forum
Honored Contributor II
3,316 Views

Hi, 

 

Anyone tried to add Tcl extensions to SystemConsole? Is it possible? 

 

I'm controlling a Stratix IV GX Development kit using SystemConsole and also need to control a synthesizer via GPIB. 

 

I'm controlling the kit using SystemConsole, since the JTAG-to-Avalon-MM API is not available under quartus_stp. 

 

I can get the GPIB Tcl extension working under quartus_stp by installing the library into Quartus's Tcl library folder. 

 

Since SystemConsole does not see the library that quartus_stp sees, it looks like it must have its own different set of paths to determine what constitutes its Tcl interface. I've found several other short-comings with SystemConsole's support for Tcl, eg., fileevent does not work, so you cannot write a proper server application, TCLLIBPATH is ignored, so 'package require myPackage' does not work (this works fine under quartus_stp, the Quartus Tcl console, Modelsim, etc). 

 

I have written Tcl scripts that get the JTAG-to-Avalon-MM bridge interface working under regular quartus_stp, so I think I'll just migrate away from SystemConsole. But, I figured I'd at least see if anyone else has had any luck (or would like to complain in general about SystemConsole). 

 

Cheers, 

Dave
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
1,547 Views

Dave, 

 

AFAIK, System Console, though TCL-like in nature, is actually based upon JACL (TCL on Java). 

 

Though there may be more current information elsewhere, I'm familiar with the System Console Wiki page (http://www.alterawiki.com/wiki/system_console). 

 

So...semi-long story short, there are ways to add TCL libraries/capabilities to JACL, but I'm unsure if what you're looking to do would work or not. 

 

Best of luck! 

 

slacker
0 Kudos
Altera_Forum
Honored Contributor II
1,547 Views

Hi Slacker, 

 

--- Quote Start ---  

 

AFAIK, System Console, though TCL-like in nature, is actually based upon JACL (TCL on Java). 

 

--- Quote End ---  

 

 

Thanks for the info. 

 

 

--- Quote Start ---  

 

So...semi-long story short, there are ways to add TCL libraries/capabilities to JACL, but I'm unsure if what you're looking to do would work or not. 

 

--- Quote End ---  

 

 

I think I'll just start an anti-SystemConsole wiki page instead :) 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
1,547 Views

SystemConsole 11.0 was based on JACL, in 11.1 it uses the standard C++ TCL interpreter so more things should work. 

 

If they do not then please file detailled bug reports, or make detailled posts here about what went wrong.
0 Kudos
Altera_Forum
Honored Contributor II
1,547 Views

Hi Wombat, 

 

--- Quote Start ---  

SystemConsole 11.0 was based on JACL, in 11.1 it uses the standard C++ TCL interpreter so more things should work. 

 

If they do not then please file detailled bug reports, or make detailled posts here about what went wrong. 

--- Quote End ---  

Thanks for the info! 

 

I'll check 11.1, but here's my list of gripes; 

 

1) fileevent does not work, so you cannot write a Tcl server (that will handle multiple clients) 

 

2) info nameofexecutable returns an empty string (quartus_stp and others return the executable name). arvg0 however returns "system-console", so you can use that for tool detection. 

 

3) package require and TCLLIBPATH do not work 

 

4) Tk does not work 

 

5) The Tcl procedures supplied by Altera are not consistent across tools, eg., there are no JTAG-to-Avalon-MM Tcl commands for the command-line tools like quartus_stp, which do not suffer from the above list of gripes. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
1,547 Views

An update on the gripes with respect to Quartus 11.1sp1 (tested under Windows XP): 

 

1) fileevent now works, so you can handle multiple clients from a SystemConsole Tcl server. 

 

2) info nameofexecutable still returns an empty string (but argv0 can be used instead) 

 

3) package require and TCLLIBPATH now work. 

 

For the Tcl GPIB library, I did not need to use TCLLIBPATH, I just copied the package directory to $QUARTUS_ROOTDIR/sopc_builder/system_console/lib/gpib. 

 

I tried this under 10.1 and although package require would work after copying it to the Quartus subdirectory (since TCLLIBPATH did not work), any attempts to use the GPIB procedures would fail. I suspect the SystemConsole shell does not have all the OS paths set correctly. This is corrected in 11.1sp1. 

 

Definitely an improvement! Thanks Altera! 

 

Cheers, 

Dave
0 Kudos
Reply