MSSGE Toolflow FAQ



Links

Other useful FAQs:

Frequently Asked Questions


What does MSSGE mean ?

MSSGE stands for Matlab/Simulink/System Generator/EDK toolflow.


What do I need to use the MSSGE flow ?

Software

As suggested by its name, the MSSGE flow requires Matlab, Simulink, System Generator, and EDK. The following versions are currently supported:

Optional but recommended:

Only the listed versions of the software are supported. Others may work but your results may vary.

Licenses

Some of the functionality supported by the toolflow require licensed cores from Xilinx. Currently, they include:

BWRC users should use the following servers if any of the above cores are needed:


How do I access the MSSGE libraries ?

If you are a user within BWRC, start Matlab using the Matlab7sp2.bat script located in \\hitz\designs\BEE\mlib and all of the system and design libraries will be available to you in Simulink.

If you are an external user, you must first download all the libraries and base systems. They are available on a CVS repository via anonymous access. The CVS root is located at :pserver:anonymous:@alien.ssl.berkeley.edu:2402/home/cvs/casper_cvsroot. For example, to checkout module xps_library from the repository, you would use:

cvs -d :pserver:anonymous:@alien.ssl.berkeley.edu:2402/home/cvs/casper_cvsroot checkout xps_library

Doing a plain checkout or update will get you the latest development versions of the source. To get the latest stable versions, get the tagged versions using cvs checkout -r <tag> or cvs update -r <tag>.

The current modules available are:

Note that to use some of the library blocks you may need to get additional blocksets for Simulink. Currently, to use the ADC interface block, you will need to get the Signal Processing Blockset and to simulate designs you will need the Fixed-Point Toolbox.

All libraries are released under the GNU General Public License


Setting up the toolflow environment

Once the libraries are downloaded, you will need to add the astro_library, bee_library, and xps_library directories to your Matlab path. This can be done using File -> Set Path if you have control over your Matlab installation.

If you do not have control over your Matlab installation, you can write a simple Matlab script using to add the libraries to your path automatically during startup using addpath. To do this, put your addpath commands into a file named startup.m. Create a Windows shortcut to %MATLABPATH%\win32\Matlab.exe and under the "Shortcut" tab of the shortcut's properties set the "Start in" field to the directory where you have your startup.m file.

The following Windows environment variables need to be set:

Lastly, the location of astro_library must also be added to the Windows path.


How do I add software to the PowerPC

The first time bee_xps is run on a Simulink design, a .\design_name\src directory will be created for you to put your source files in. The software platform runs on a full PowerPC 405 hard core compiled with gcc, so any kind of standard C code and libraries will work. The core lacks a floating-point unit, however, but has floating-point emulation.

The toolflow acts on your source code based on comment lines immediately following the function definition header and before the opening brace. For example:

void function_name ()
/* toolflow directives */
{
    function body
          .
          .
          .
}

To make the function a command accessible from the TinySH command prompt use:

void function_name (int argc, char **argv)
/* command = "command_name"                                              */
/* help    = "command description displayed with '?'"                    */
/* params  = "<list> <of> <arguments> <to> <be> <passed> <to> <command>" */
{
    .
    .
    .
}

To have the function called at power-up initialization use:

/* init */

To have the function loop continuously use:

/* repeat */

Where do I locate the Matlab script to retrieve data from/send data to the serial port ?

There are two functions, called write_xps and read_xps in the xps_library directory, they are what you want. They are in the path, so you can use them directly.

syntax:

write_xps(<data>, <exact block name as it appears in simulink>, <com port>); 
read_xps(<exact block name as it appears in simulink>, <com port>);

for example:
write_xps(uint32(3), 'my register', 'COM1'); will write 3 to "my register" read_xps('my register', 'COM1'); will read from "my register"

data has to be a uint32 array with the correct length (you can use the uint32 function to convert an array of double to this format). Your design has to be the current system (the last simulink design that had the focus).


What does the following error suggest ?

''ERROR:MDT - :MapLib:661 - LUT2 symbol 
   "opb_adcinterface_0/opb_adcinterface_0/USER_LOGIC_I/adcreset_sig1" (output 
   signal=opb_adcinterface_0/opb_adcinterface_0/USER_LOGIC_I/adcreset_sig) 
   has input signal "opb_adcinterface_0_adc_usr_ddr_rst" which will be trimmed. 
 
See the trim report for details about why the input signal will become undriven. 

Error found in mapping process, exiting... 
Errors found during the mapping phase.''

This error happens if you put Xilinx input gateways in your design. Only XPS GPIO blocks should be used as inputs to guarantee that the boundary between the Xilinx part of the design (synthesized part) and the simulation part is clean. The version 1 of the toolflow enforces this constraint and gives you an error in the early stage of the compilation. Output gateways can be used.


Why do I get the following error when the base system is extracted from the zip file ?

Warning: Directory Y:\BEE\temp\test\XPS_iBOB_base\system.mhs could not be removed.
Warning: Directory Y:\BEE\temp\test\XPS_iBOB_base\system.mhs.bac could not be removed.
Warning: Directory Y:\BEE\temp\test\XPS_iBOB_base could not be removed.
replace XPS_iBOB_base/system.mhs? [y]es, [n]o, [A]ll, [N]one, [r]ename:

Matlab has the bad habit of not closing files properly when a script crashes. Unfortunately, once Matlab has locked the file, the only way to unlock it is to restart Matlab. You should restart Matlab when this error occurs. In addition to that, the unzip program used to unzip the base system can keep running in the background, even if Matlab was closed. This process, called "unzip.exe" should be manually killed when this happens.


Where do I find the mapping of IP base addresses accessible from the PowerPC ?

The IP address mappings visible to the PowerPC can be found in the xparameters.h file located, from the directory where your Simulink model is, in project_name\XPS_iBOB_base\ppc405_0\include.

The new revision of the toolflow, released December 8, 2005, also builds it directly into the software compiled for the PowerPC. Using the listdev command at the TinySH prompt will give all of the PPC-accessible blocks, listed by their Simulink design name, and PPC memory address.


Why does System Generator crash with a "no match" error ?

This has not been seen since the ver_2_1_0 release of astro_library, and is considered fixed. If you encounter it while using that or newer versions of the library, please e-mail the bee2-mssge list and let us know.

This is one of the secret mysteries of Simulink/SysGen, but there is a temporary workaround that seems to be successful. There is presumably a setting somewhere within one of the blocks in the signal processing libraries that Simulink and System Generator can't agree on. If your XSG generation fails with a no match statement, and projectname\sysgen\sysgen.log complains about an output block having no driver, then this fix might work.

Simply delete the offending block and drag in a new one from the library. DO NOT do a CTRL-D or use the "Update System" option from bee_xps. If you find that you need to update the design, delete the block and put it back in again right before you try to compile. So far the fft block is known to need this workaround.


MssgeFaq (last edited 2006-09-28 21:32:47 by hchen05)