Installing and building Gannet
PREREQUISITES:
Essential:
Compilers
- g++ >= 4.0 for compiling the Virtual Machine and the SystemC model
- ghc >= 6.10.3 to compile the Gannet compiler
Dynamic languages
- perl >= 5.8 for various toolchains scripts
- ruby >= 1.8.6 for Garnet, the Gannet reference model
- python >= 2.5.1 for SCons
Build tools
- scons >= 1.2.0 for building the Virtual Machine and the SystemC model
- systemc >= 2.2
- systemc-tlm >= 2.0
Optional:
For the Gannet assembler:
- YAML::Syck from CPAN
For the Scheme back-end Skua:
For the Perl6 back-end Puffin:
For cross-compilation to linux-ppc:
- Crosstool with /gcc-3.4.4-glibc-2.3.3/powerpc-405-linux-gnu/bin
INSTALLATION:
# get the archive (GannetCode-0.1.tgz)
wget www.gannetcode.org/downloads/GannetCode-0.1.tgz
# create a directory Gannet:
mkdir Gannet
# go there
cd Gannet
# unpack the archive
tar -zxvf ../GannetCode-0.1.tgz
The environment variable GANNET_DIR must be set to the above directory. The file etc/gannetrc contains the environment settings for Gannet. Edit this file for your system;
$ vim etc/gannetrc
then source it:
$ . etc/gannetrc
That's it, you can start using Gannet -- although you'll most likely want to build the compiler, Virtual Machine and/or SystemC hardware model. But without building anything, you can write Gannet assembly, generate bytecode with the Gannet Assembler and run it on Garnet, the Ruby version of the Gannet machine.
BUILDING:
Assembler:
The Gannet assembler is written in Perl but you need to install YAML::Syck from CPAN:
$ cpan install YAML::Syck
Compiler:
Unless you're happy writing Gannet assembly, you'll need to build the Gannet compiler. First you need to build the HsSyck dependency (currently the compiler needs an older version of HsSyck, the Cabal version will not work).
$ cd third-party/HsSyck
$ cabal configure
$ cabal build
$ cabal install
(Or if you don't have the cabal command:
$ run-haskell Setup.hs configure --user
$ run-haskell Setup.hs build
$ run-haskell Setup.hs install
Then build the compiler:
$ cd Compiler
$ ./build.pl
Virtual Machine:
$ cd VirtualMachine/build
$ ./build.pl
SystemC Hardware Model:
$ cd HardwareModels/SystemC/build
$ ./build.pl
Using Gannet
To use the Gannet framework, you first build your system as a set of Services. You can use all services in the Gannet ServiceCoreLibrary or create your own services. After you've built your custom Gannet system, you can use it to run tasks. To do so, you write a task in the Gannet language, compile it and run it on the Gannet machine, either the VM or the SystemC hardware model.
Create your services
The easiest way to create a custom service is to copy the source code of one of the Services in the ServiceCoreLibrary and use that as a starting point. For more details, read Creating Services.
Create your system configuration
The Gannet system configuration is a file in YAML format. There are several examples in the SystemConfigurations folder; if you want to know the details, read The Gannet System Configuration
Build your system
To build the system, run the
build.plscript with the appropriate SystemConfiguration file. The build scripts are in thebuildfolder, run./build.pl -hto see the options. The build script will generate the C++ system configuration header file, optionally generate C++ sources from Ruby and buildCreate your task description
In other words, write some Gannet code. For a comprehensive introduction, see Programming Gannet. By convention, Gannet task description programs have the extension
.td. For some examples seeexamplesand the test directoryt.The Gannet compiler
gannetccompiles the code into Gannet bytecode (.tdc) or the target languages for the various backends. A handy wrapper aroundgannetcisguillemot. This wrapper will scan the.tdfile for a comment line with the name of the SystemConfiguration YAML file to use, if none is found it defaults to theSBA.ymlfrom theSystemConfigurationsfolder. It compiles the program to bytecode but can also output Gannet assembly language.Run your task
This is the easy bit. The
bindirectory contains executables for the VM (gannetvm), the hardware model (gannetssoc), the Ruby reference (garnet) and the various other backends. Assuming you want to run the programfact.tdcon the VM, it's simply$ gannetvm fact.tdc
and similar for
gannetsoc. For the VM, you can specify the number of "cycles" it should run before exiting as the 2nd argument. For the SystemC model you can provide the number of microseconds the simulation should run. The executable for the Ruby model,garnet, is a script, i.e. it is not compiled separately. As a result you must pass the path to the SystemConfiguration YAML file on the command line. Also, by default Garnet models the hardware. The hardware does not support all control features available with the VM. To run Garnet in VM mode, specify the-Vflag:$ garnet -Y ../SystemConfigurations/Control.SBA.yml -V fact.tdc
If the SystemConfiguration file is not specified, Garnet will use the default SBA.yml.
Gannet Presentations
The following presentations give an overview of the Gannet project and its evolution.
Conference talks
- Programming the Interface between Communication and Computation: talk given at the "Programming Challenge of Heterogeneous Architectures" Bridging the Gap workshop, Birmingham University, 02/07/2009
- The Gannet Service Manager: a Distributed Dataflow Controller for Heterogeneous Multi-core SoCs: presented at the 3rd NASA/ESA Conference on Adaptive Hardware and Systems, Noordwijk, NL, 22/06/2008.
- Separation of Data flow and Control flow in Reconfigurable Multi-core SoCs using the Gannet Service-based Architecture: presented at the 2nd Conference on Adaptive Hardware and Systems, Edinburgh, UK, 08/08/2007.
- The Gannet Service-based SoC: A Service-level Reconfigurable Architecture: presented at the 1st Conference on Adaptive Hardware and Systems, Istanbul, Turkey, 19/06/2006.
- Gannet: a functional task description language for a service-based SoC architecture: presented at the Symposium on Trends in Functional Programming, Univ. of Nottingham, 18/04/2006.
Seminar talks
- Streaming Semantics for the Gannet Heterogeneous Multicore System-on-Chip: talk given at the University of Birmingham Theory Division Seminar, 21/11/2008
- Gannet: a Service-based Architecture for Reconfigurable SoCs: talk given at the University of Essex, 21/11/2007 and the University of Massachusetts (Lowell, USA), 27/02/2008
- Operational Semantics for the Gannet Machine Language: talk given at the Scottish Programming Languages Seminar, ICMS, Edinburgh, 01/06/2006.
- Gannet: a service-based SoC architecture and task description language: talk given at the Scottish Programming Languages Seminar, Univ. of Strathclyde, 25/10/2005.
- Service-Based Architecture anf Functional Programming: This was the first talk on Gannet, given internally in the Department on 22/06/2005
Gannet Publications
Here are some papers discussing various aspects of the Gannet system:
W. Vanderbauwhede, C. Thirunavukkarasu, P. Mckechnie. "The Gannet Service Manager: a Distributed Dataflow Controller for Heterogeneous Multi-core SoCs." In Third NASA/ESA Conference on Adaptive Hardware and Systems, AHS 2008., pages 301-308. IEEE Computer Society, 2008.
W. Vanderbauwhede. "A Formal Semantics for Control and Data Flow in the Gannet Service-based System-on-Chip Architecture." In The International Conference on Engineering of Reconfigurable Systems and Algorithms, ERSA 2008. CSREA Press, 2008.
W. Vanderbauwhede. "Separation of Data Flow and Control Flow in Reconfigurable Multi-core SoCs using the Gannet Service-based Architecture." In Adaptive Hardware and Systems, 2007. AHS 2007. Second NASA/ESA Conference on, pages 326-333. IEEE Computer Society, 2007.
W. Vanderbauwhede. "Gannet: a Scheme for Task-level Reconfiguration of Service-based Systems-on-Chip." In Proc. 8th ACM Workshop on Scheme and Functional Programming. Universite Laval, CA, 2007.
W. Vanderbauwhede. "Gannet: a Functional Task Description Language for a Service-based SoC Architecture." In Proc. 7th Symposium on Trends in Functional Programming (TFP06), pages 366-377. Nottingham University, UK, 2006.
W. Vanderbauwhede. "The Gannet service-based SoC: A Service-level Reconfigurable Architecture." In Proceedings of 1st NASA/ESA Conference on Adaptive Hardware and Systems (AHS-2006), pages 255-261. IEEE Computer Society Press, 2006.