Code Monkey home page Code Monkey logo

greenlib's Introduction

GreenLib

Overview

Productivity library for SystemC modelling

  • GreenReg : Easy accessible register modeling
  • GreenSocket : More advanced and customized socket
  • GreenSignalSocket : Model all the ports corresponding to different signals in an IP
  • GreenConfig : Flexible configuration and inspection
  • GreenControl : Router that connects user modules with service providers (plugins)
  • GreenMessage : A framework to pass messages from one SystemC module to another
  • GreenSerialSocket : TLM2 based Asynchronous Serial communication protocol which can be used to model industry standard serial interfaces like UART Model
  • GreenScript : SystemC module using python
  • GreenRouter : Connect the IPs using the GreenSocket infrastructure
  • GreenMemory : Implementation of a sparse memory array to simplify the implementation of more complex memories

Code status

build status

Requirements

GreenLib requires :

  • GIT > 1.8.2
  • SystemC1 2.3.0 to 2.3.1
  • CMake > 2.8
  • Boost > 1.34
  • Python
  • Glib2
  • Pixman
  • Lua > 5.1
  • SWIG

OS support :

  • Linux (Debian/Ubuntu, CentOS)
  • Windows2 with MinGW
  • OS X : soon

Install requirements

Linux

Ubuntu / Debian :

$ sudo apt-get install cmake libboost-dev python-dev liblua5.2-dev swig

CentOS / Fedora :

$ sudo yum install cmake boost-devel python-devel lua-devel swig

Windows

Please try to install packages in paths without spaces.

With MinGW Installer, install these following packages :

MinGW

  • gcc
  • gcc-g++

Build

$ cmake [options]

This will result in generating the Makefile to build GreenLib.

Available options are:

  • CMAKE_INSTALL_PREFIX3 : Specify install directory used by install.
  • SYSTEMC_PREFIX : Specify SystemC prefix (Otherwise, CMake will scan SYSTEMC_HOME environment variable)
  • LUA_LIBRARIES : Specify LUA libraries directory (where is located lua.a, lua.dll, ...).
  • LUA_INCLUDE_DIR : Specify LUA header directory (where is located lua.h).
  • BOOST_ROOT : Specify Boost directory.
  • SWIG_DIR : Specify SWIG directory (where is located swig binary).
  • SWIG_EXECUTABLE : Specify SWIG binary path.
  • -G : Specify build tools. Currently, we only support "Unix Makefiles".

Example

Linux

$ cmake -DCMAKE_INSTALL_PREFIX=build -DSYSTEMC_PREFIX=/usr/local/lib/systemc-2.3.0/

(The default value of CMAKE_INSTALL_PREFIX is /usr/local).

Windows

cmake -DCMAKE_INSTALL_PREFIX=build
-DSYSTEMC_PREFIX=/c/Projects/systemc-2.3.1 \
-DLUA_LIBRARIES=/c/Projects/lua-5.2.4/src/liblua.a
-DLUA_INCLUDE_DIR=/c/Projects/lua-5.2.4/src/ \
-DBOOST_ROOT=/c/Projects/boost-1-57-0/ \
-DSWIG_DIR=/c/Projects/swigwin-3.0.5
-DSWIG_EXECUTABLE=/c/Projects/swigwin-3.0.5/swig.exe \
-G"Unix Makefiles"

Then compile:

make -j[Specifies the number of jobs (commands) to run simultaneously]

This action will result in the compilation of GreenLib.

Check

make check

or with parallel jobs:

make check -j[Specifies the number of jobs (commands) to run simultaneously]

This action will compile examples and check output with expected output.

If everything is OK, you should get "100% tests passed" message.

Installation

make install

This action will result in a package of GreenLib where you have defined CMAKE_INSTALL_PREFIX.

Usage

  • Copy the misc/FindGreenLib.cmake file in your project repository.
  • Add the following lines into your CMakeLists.txt:
find_package(GreenLib)
if(GreenLib_FOUND)
	include_directories(${GREENLIB_INCLUDE_DIRS})
   link_directories(${GREENLIB_LIBRARY_DIRS})
else()
	message(FATAL_ERROR "GreenLib not found.")
endif()

Contributing

GreenLib is an open source, community-driven project. If you'd like to contribute, please feel free to fork project and open a merge request or to send us a patch.

GreenLib-logo

Footnotes

  1. On Windows, GreenLib requires SystemC 2.3.1.

  2. Currently, we don't support GreenScript on Windows.

  3. Default value is /usr/local

greenlib's People

Contributors

bkoppelmann avatar jarodw0723 avatar konrad-fred avatar markfoodyburton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.