However, the case of SystemC is particular. The language defines classes (mainly SystemC modules), but the instances of those classes are actually static: They are built during an elaboration phase, and can not change during simulation. In Pinapa, we consider the instanciation of the modules and the way they are bound together as part of the static information to be extracted by a front-end.
More details are available in the paper Pinapa: The Extraction Tool for SystemC descriptions of Systems-on-a-Chip, to be published in proceedings of EMSOFT'05.
Pinapa is a library that only makes sense associated to a back-end. If you're interested in Pinapa, I suppose you want to write a back-end for it.
at lists.sourceforge.net.The mailing list has online archives. Before asking, check if the answer to your question isn't already in those archives. Questions and anwsers using personal email benefit only to one person, while information exchange on the mailing list benefit to all the subscribers, and potentially to anyone in the future browsing the archives. Therefore, I will not answer any technical question sent to me personnaly!
You'll need 900Mb of disk space and probably more than one hour of CPU time to compile it (Yes, GCC is deadly long to compile ...).
http://greensocs.sourceforge.net/pinapa/download/
First of all, get the example from Pinapa download page:
bzr branch http://greensocs.sourceforge.net/pinapa/download/bzr/pinapa-expl-sc-2.1.v1/
or alternatively (if you don't have bzr installed):
wget http://greensocs.sourceforge.net/pinapa/download/files/pinapa-expl-sc-2.1.v1-snapshot.tar.gz tar xzvf pinapa-expl-sc-2.1.v1-snapshot.tar.gz
This example uses SystemC 2.1.v1. If you want to use SystemC 2.0.1, replace pinapa-expl-sc-2.1.v1 by pinapa-expl in the previous commands.
Then, all you should have to do is to run
cd pinapa-expl-sc-2.1.v1 ./build.sh
Another little bit more complete example of use for Pinapa: SPinapa. It's a prototype (understand this as "half finished" if you wish) of SPIRIT backend for Pinapa. Currently, it just reads a platform with one module, and generate the SPIRIT description for the module and its registers, if the module complies with some coding standards.
The tool can hardly be usefull by itself, but it's an example of usage of Pinapa, it can be interesting for you. You can get it via
bzr branch http://greensocs.sourceforge.net/pinapa/download/bzr/spinapa/
If build.sh doesn't work for you, then you can either
bzr and wget commands can be replaced by appropriate cp). You have an option --lazy to avoid restarting the script from scratch each time. See build.sh --lazy for details.My advice clearly goes for the second one (and please, send your modified version to the mailing list afterwards).
./build.sh --help
The build.sh script will end telling you to run make run in the build directory. Then, read the source. There's only one file for the example, it is the best starting point to learn how to use Pinapa.
build.sh script of the example runs the build.sh script of Pinapa, so, if you followed the previous steps, you probably compiled Pinapa already.
You're encourraged to read the script build.sh (there is one in the example, and one in Pinapa itself) to understand the build process.
The build.sh script mainly does:
The build system have been designed for two use-cases: Library as a developer version, and library as an installed version. Both use autoconf, automake, and libtool (Have a look at the autobook if you haven't done so already).
Use this scenario if you think you may have to modify and recompile Pinapa while you write your back-end. Pinapa will be a subdirectory of your project, the configure script and the Makefiles of your project will call the one of Pinapa recursively.
This is the mode used by the example if you installed it with the build.sh script.
In this scenario, Pinapa is compiled and installed once and for all. You will use it as any other system library. To use this scenario, use the build.sh script of Pinapa, with the options --config-args --prefix /path/to/pinapa/inst, then, run
make install
pinapa/build.tmp by default).The example can then be built with
cd /path/to/example mkdir build.tmp cd build.tmp ../configure --with-pinapa=install --with-pinapa-inst=/path/to/pinapa/inst make run
baz register-archive Matthieu.Moy@imag.fr--arch https://moy@www-verimag.imag.fr/webdav/moy/arch # You'll need a password for that. ./scripts/install-tlmobjs.sh ./build.sh --config-args --prefix=/path/to/pinapa --enable-tlm-basic --enable-tlm-tac cd build.tmp make install
In the version currently used, a bug in the makefile prevents tlmobjs directory to be installed. You have to copy it manually. Get back in pinapa-src directory:
cd .. cp -R tlmobjs /path/to/pinapa
It is possible to gain some disk space by removing unnecessary gcc/systemc objects files:
find /path/to/pinapa -name "*.o" -exec rm {} \;
tla get Matthieu.Moy@imag.fr--pinapa/pinapa-expl--main--0 pinapa-example
Generate configure:
cd pinapa-example ./autogen.sh
Then, configure:
mkdir build.tmp cd build.tmp ../configure --with-pinapa=install --with-pinapa-inst=/path/to/pinapa
Then you can make:
make
Then, launch the example backend:
make run