Try Orcc

The following material assumes that you have already install Orcc on your computer and set up a bunch of applications in the workspace of your eclipse.

Running a simulation

Simulating an application is only a couple of mouse clicks away!

  1. Right-click on a top-level XDF network.
  2. Choose Run As > Orcc Simulation
  3. A wizard will ask you an input stimulus to simulate your application.
  4. Wait for the simulation to complete.

 

Generating source code

Now, because the simulation of complex application can take a very long time, the next section describe the way to generate source code from your description.

The primary goal of Orcc is to generate code for any platform, including hardware (VHDL), software (C, Java), reconfigurable software (with the JIT Adaptive Engine, based on LLVM), and heterogeneous platforms (multi-softcore platform or hardware/software co-design) from a platform-agnostic, high-level design. We are still working towards that goal, and at the moment Orcc is capable of generating code with the following code generators (called back-ends):

  • The C back-end produces an application described in portable ANSI C (Windows, Linux, Mac) with multi-core ability.
  • The Java back-end generates class-based Java code that has the advantage of being used seamlessly within the Eclipse environment.
  • The Jade back-end produces LLVM assembly code targeted to be used by the JIT Adaptive Decoder Engine (Jade), which provides reconfigurability for software that runs as fast as the code generated by the C back-end.
  • The TTA backend implements a full co-design to design a multi-softcore platform based on the Transport-Trigger Architecture and generates the software code executed on the processors using the TTA-based Co-design Environment (TCE).
  • The Verilog back-end generates Verilog description using the OpenForge tools.
  • The Promela back-end generates Promela code that can be used with the SPIN model-checker to analyze properties of RVC-CAL applications.

Generate an application from a RVC-CAL description is quite easy:

  1. Right-click on a top-level XDF network
  2. Choose Run As > Orcc Compilation
  3. A wizard will ask you the output folder, you should choose a different folder than the source folder.
  4. The wizard will then ask you the back-end to use, this is the target language that you want your application to be translated to.
  5. Wait for code generation to complete. Depending on the application, the back-end chosen, and your setup, this may last between less than a second and ten seconds or so.

That's it! If you have gotten so far (and nothing bad happened), you have just generate your first application with Orcc.

Now, because Orcc generates source code, you will need to compile/synthesize/interpret this code with another toolchain. For instance, if you have chosen the C back-end, you are likely to need a C compiler in the next couple of minutes.

Try the C backend

The C backend can be considered as the main backend of Orcc. In fact, this backend is used by the most part of the developpers for the development of new application.

Generate the Code

  1. Right-click on a top-level XDF network and choose Run As > Orcc Compilation.
  2. A wizard will ask you the output folder: choose your <working folder>.
  3. Then it will ask you the back-end to use, just choose C then OK and wait for code generation to complete (this should take a few seconds at most).

Build the Code

First, be sure that SDL library is installed on your system:

  • On windows, you have nothing to do: the SDL libraries are directly embedded into the Orcc library.
  • On linux and mac, you need to install SDL by yourself. For instance, you can directly install it on Ubuntu using its package manager by executing the following command:
    sudo apt-get install libsdl-dev 
    Remember to install the '-dev' versions of the packages in order to get the library headers which are needed to compile client code against them.

Then, build your project by graphical or command-line interface using CMake. CMake is a unified build system that is able to generate Makefiles for most platforms as well as project files for major IDEs, including Eclipse CDT, KDevelop, Microsoft Visual Studio, Xcode. You can get the latest version from the website or from your package manager. On ubuntu, just run the command sudo apt-get install cmake

If you prefer the graphical interface, known as cmake-gui, launch it and:

  1. You first need to set the source path to the folder where you have generated the files (<your working folder>), and the output build path to <working folder>/build/.
  2. Then, hit Configure. If you see an error complaining about mismatched folders delete the cache with File > Delete cache and re-run Configure.
  3. Choose the generator you would like to use (KDevelop, Microsoft Visual Studio, MSYS Makefiles, Unix Makefiles, etc).
  4. Open the newly created project with your favorite IDE and use it to build the application.

If you prefer the commande line,

  1. Execute CMake from the 'build' folder using the one of the following commands according to the profile of compilation you expect:
    cmake ..  or
    cmake .. -DCMAKE_BUILD_TYPE=Debug or
    cmake .. -DCMAKE_BUILD_TYPE=Release
  2. Build directly your application with the command make
  3. That's all ;-)

Running your program

The executable file of your application should be available in <your working folder>/bin. You can execute it like any program on your computer. The following parameters are available:

  • -i <path to input file> to set an input file to your application, such as a video sequence in case of a video decoder.
  • -o <path to YUV file> to check the validity of a decoded video.
  • -m <path to mapping file> to use the multi-core ability of your processor, the mapping file corresponds to an XCF file associating each core of your processor to a set of actors (an example of mapping file is generated in the source folder). 
  • -l <number_of_loops> the number of times the input file is read. This option prevent application to run infinitely.

Quick install

Install Orcc from the update site http://orcc.sf.net/eclipse/
More information

Contact

Whether you need (or want to offer) help or advice, or if you just want to discuss/chat about Orcc, feel free to contact us!

Most of the team is based in Europe, so you might expect people to be connected and answer mail during the day (GMT+1).


This website is hosted by Get Open RVC-CAL Compiler at SourceForge.net