SystemC Development with CapsimTMK

Getting Started

SystemC Development

 

Getting Started

Download

Blocks

Sample Applications

SystemC Resources

Getting Started

The first step is to download CapsimTMK for your platform, install it and make sure it is up and running.

The SystemC Block Diagram Modeling and Editing System is independent of platform and consists of a package of XSLT and PERL scripts and BASH scripts. These scripts are all in a single directory and are all ASCII files. They are all GNU General Public License as published by the Free Software Foundation.

When you download these scripts they will reside in a directory called CapsimSysC in the TOOLS directory.

There are two environment variables that need to be set. One pionts to where CapsimTMK resides, for example:

export CAPSIM=/usr/local/CapsimTMK

and the other points to where CapsimSysC resides:

export CAPSIM_SC=/usr/local/CapsimSysC

After you build SystemC and test the examples, you will notice that the Makefiles to create SystemC executables are tangled up with other files. We provide a Makefile in the download you can modify for creating SystemC executables.

You will have to set the following environment variable (pointing to your SystemC installation):

export SYSTEMC= /usr/local/systemc-2.1.v1

You may modify the Makefile we provide for SystemC to match your installation. For example setting:

TARGET_ARCH = macosx

Other than the usuall hassle with setting up SystemC the rest is straight forward.

Here are the steps to get the simple example up and running.

1- Create a test directory. Call it WORKSC.

2- Change directory to WORKSC.

3- Execute the shell command (This is done only once).

bash $CAPSIM_SC/TOOLS/precapsim_sc.sh

4- All the necessary directories and files will be created and copied over, In particular the BLOCKS directory and the Makefile in the WORKSC directory. In addtion the file syscgen is copied over. The directory SYSTEMC is created. This is where the generated SystemC code main.cpp will be placed. Also a Makefile for SystemC is copied to this directory ( you may need to edit it for your SystemC installation).

5- To get the example up and running cd to the BLOCKS directory and type:

cd BLOCKS

cp $CAPSIM_SC/BLOCKS/*.s .

6- Change directory back to WORKSC

cd ..

7- Type make TWICE. Check for errors.

8- The Capsim executable capim should be created.

9- You can run capsim and create the topology. Or you can copy the example topology. To check that the SystemC blocks have been added to Capsim type:

capsim -b

Then type display s to see the list of blcoks. You should see sinesc,gainsc, and printsc.

10- To copy the example topology:

cp $CAPSIM_SC/TOPS/example.t

 

11- To generate the SystemC main.cpp code type:

./syscgen example.t

The file main.cpp is generated and placed in the SYSTEMC sub directory.

 

12 Change directory to SystemC

cd SYSTEMC

 

13.- Create the SYSTEMC executable (called capsim) and run it using

make check

Thats it.

Use the example blocks as a template to create new blocks. Create all blocks in the BLOCKS directory. Next cd to the top directory and type make twice for new added blocks to add the block to Capsim.

 

 

Contact | ©2007 Silcon DSP Corporation , Portland, Oregon