Esperan - the EDA Training Company
       
Course Menu
   
   
 
 
 
 
 
 
 

SystemC Worked Example

Tutorials > SystemC > Worked Example

SystemC Setup

These instructions assume that you are operating under a Linux environment. Alternatively you can install cygwin on an existing Windows environment. For versions or platform specific information, please refer to the INSTALL file inside the SystemC tar file.
  1. Download the SystemC core
    1. Go to www.systemc.org and create an account
    2. Go to download page and download the version 2.0.1 version of SystemC core, systemc-2.0.1.tgz
    Note if you are using a cygwin based environment you may want to download SystemC version 2.1 instead.
  2. Uncompress the SystemC core
    1. gunzip –d systemc-2.0.1.tgz
    2. tar –xvf systemc-2.0.1.tar
    Note: By default the files will be extracted to directory systemc-2.0.1.
  3. Install SystemC core
    1. Change to the directory systemc-2.0.1.
      cd systemc-2.0.1
    2. Create a temporary directory and change into it
      mkdir objdir
      cd objdir
    3. Set the environment
      setenv CXX g++
    4. Configure the package for your system
      ../configure
    5. Compile the package
      gmake (or make)
    6. Install the package
      gmake install or make install
    7. Remove the temporary directory
      cd ..
      rm –rf objdir

Waveform Viewer Setup

A waveform viewer will allow you to graphically display a VCD trace file from SystemC simulation. Two free-ware VCD viewers are recommended. Other tools are available.
  1. Download Dinotrace or GtkWave
  2. Install the waveform viewer according to its instructions

Workshop Files Setup

  1. Download Esperan’s SystemC workshop file
  2. Uncompress the archive
    gunzip –d sc_tutorial.tgz
    tar –xvf sc_tutorial.tar
    Note: By default the files will be extracted to directory sc_tutorial
  3. Move to the Makefile directory
    cd sc_tutorial
  4. Configure the Makefile for your environment
    1. Edit the file: Makefile.defs
      vi Makefile.defs
    2. Modify the SystemC installation path
      SYSTEMC = put_your_installation_path_here
      e.g. SYSTEMC = /usr/local/SystemC/systemc-2.0.1

Running the SystemC Counter Example

  1. Move to the workshop directory
    cd simpleCounterSC
  2. Compile the counter example
    make –f Makefile.osci
  3. Execute the simulation
    ./run.exe
  4. Examine the results of the simulation
    gtkwave trace.vcd & or alternatively dinotrace trace.vcd &

Back to top


News
 
 
Technical Assets
 
 
 
 
   
Course Schedule
 
 
curve For over 10 years..
  Esperan has been providing VHDL training and Verilog training in UK, US, Canada, Western Europe, South Africa and throughout the world.
 
Esperan contact information US contact information
Phone +44 1344 865436 Fax +44 1344 865347
Email info@esperan.com
Tollfree Tel. 1800 220 8148 Fax. 1888 641 6431
Email US-sales@esperan.com