Git Product home page Git Product logo

orcc's Introduction

Open RVC-CAL Compiler

Build Status

Orcc is a development environment under BSD license dedicated to dataflow programming. Its primary purpose is to provide developers with a compiler infrastructure to allow several languages (software and hardware) to be generated from the same description composed of RVC-CAL actors and XDF networks. Orcc does not generate assembly or executable code directly, rather it generates source code that must be compiled by another tool.

Documentation

Applications

Applications are available in the Open RVC-CAL Applications project : https://github.com/orcc/orc-apps

Backends

The current status of the existing back-ends is summed up in the following table :

MPEG-4 Part 2 SP MPEG-4 Part 10 MPEG-H Part 2 JPEG
C OK OK OK OK
HLS OK NOK NOK N/A
Jade OK OK OK N/A
LLVM OK OK OK N/A
Promela OK N/A N/A N/A
Simulator OK OK NOK OK
TTA OK NOK OK N/A
Xronos OK NOK N/A OK
DAL N/A N/A N/A N/A

orcc's People

Contributors

alejoar avatar alexandresanchez avatar alorence avatar casalebrunet avatar clementgguy avatar damdsj avatar drenzi avatar endrix avatar gcocherel avatar gorinje avatar groquier avatar hooklee avatar hyviquel avatar jamesguthrie avatar jboutell avatar jersfolk avatar kdesnos avatar kjerbi avatar matt2xu avatar mpelcat avatar mraulet avatar plagalaye avatar robstewart57 avatar yasetov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orcc's Issues

(LLVM) NullPointerException during code generation

When the debug mode is activated, a NullPointerException is raised on the InstancePrinter.

15:16:28 DEBUG : Debug mode is enabled
15:16:28 : *********************************************************************************
15:16:28 : * Orcc version : 1.2.1.qualifier
15:16:28 : * Backend : LLVM
15:16:28 : * Project : Research
15:16:28 : * Network : org.sc29.wg11.mpeg4.part2.sp.Top_mpeg4_part2_SP_decoder
15:16:28 : * Output folder : /home/hyviquel/Workspaces/experimental/rvc/llvm
15:16:28 : *********************************************************************************

Boolean Operation with array

Huston, we have had a problem.

Suppose an array of 10 elements and a counter that can go from 0 to N>10. Try to simulate this code:

if( idx < 10 && array[idx]!=0) then
  // wannagannaway
end

If your idx >= 10, then you'll thrown an exception: Array out of bound, more precisely. Why? Simple, because before evaluating the if condition (the same if you have a while) there is a temp load of both idx and array[idx](also if idx > = 10)

Source Actor and Display

Hello, two question concerning the source actor(s) and one concerning the display(s).

A) SOURCE ACTOR
A.1 Actually we have many different source actors. Mainly of two kinds: the first that send a single uint(size=8) bit and the second that send a Byte (i.e. 8 uint(size=8)). Since the simulator now can support unconnected output ports what do you think to merge the two actors in one that has 2 output ports (e.g. bit and BYTE)?
A.2 It is not possible to make a multi input design, in the sense that only a single input file can be defined (i.e. the stimulus file option for the simulator). What about defining the input path where the stimulus files must be taken as an option and defining as an actor's parameter the input file name? (One objection could be: why we can not define the entire path of the file as an actor's parameter? The main problem of defining the entire path is that could be very frustrating for MS Windows users.)

I have already implemented and used this new multi source actor so I can put it on orc-apps System and modify the simulator. However all the projects that make use of a source actor must be updated.

B) DISPLAY
B.1 What about making possible to define more than one display in a single design?

Cheers

Problem with for generators

Duplicated from old SF ticket 10, originally posted by Damien de Saint Jorre

When we use for generator and if the second value is inferior to the first one, orcc generates an error. Orcc should create a decreasing loop.

Simulator's halt is almost broken

The behavior of the simulator halt should be improved/debug:

  • it should stop when we stop the process from the console
  • it should stop when the display is closed
  • the logger/console should be kept after its halt

Bugs with the Actor merger

Description : org.sc29.wg11.mpeg4.part2.sp.Top_mpeg4_part2_SP_decoder
Option : Classification with SMT solver (z3 v4.1.2)

After merging of the static actors, the generated C code compiles but the application does not decode any video (nothing display).

LLVM backend generate a bad HEVC decoder

When LLVM backend (or another derivated one) is used to generate devel.org.sc29.wg11.mpegh.part2.Top_mpegh_part2_main, resulting decoder does not display anything. It stuck before the first tokens reach display actor.

Printf with TTA backend

It seems to have a problem when the 'printf' function is used in the same actor than a native function.

Short circuit evaluation

The HEVC decoder description makes the assumption of short circuit evaluation in if statement/expression. The simulator does not support it right now, then errors occur. As far as I know, it is not defined in the standard. Does CAL guarantee short circuit evaluation?

CastAdder Cast exception

I have a problem with the castAdder after the last push, some actors are throwing the following exception:
example actor parser_parseheaders on RVC

failed to compile: net.sf.orcc.ir.impl.InstAssignImpl cannot be cast to net.sf.orcc.backends.ir.InstCast

Multi2MonoToken Tranformation errors

Apparently the Multi2MonoToken does not create all the necessary states and the transformations fails even is C. Also the defineWriteBody it adds instructions after the InstReturn...

C++ / MPEG-4 Part 10

The build of the MPEG-4 Part 10 PHP description fails.
(org.sc29.wg11.mpeg4.part10.php.Top_mpeg4_part10_PHP_decoder)

17:24:45 : *********************************************************************************
17:24:45 : * Orcc version : 1.2.1.201211291608
17:24:45 : * Backend : C++
17:24:45 : * Project : RVC
17:24:45 : * Network : org.sc29.wg11.mpeg4.part10.php.Top_mpeg4_part10_PHP_decoder
17:24:45 : * Output folder : /usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output
17:24:45 : *********************************************************************************
17:24:45 : Export libraries sources into /usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/libs... OK
17:24:45 : Lists actors...
17:24:50 : Instantiating... done
17:24:50 : Transforming actors...
17:24:51 : Printing instances...
17:24:52 : Done in 1.331s
17:24:52 : Printing network...
17:24:52 : Orcc backend done.
MODULE: /usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace
Build   dir  : /usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/build
Source  dir  : /usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output
Install dir  : 
[.jenkins] $ cmake -version
cmake version 2.8.7
CMake call : cmake  -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug  "/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output" 
[build] $ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug /usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/build
[build] $ make
Scanning dependencies of target TinyXml
[  6%] Building CXX object libs/CMakeFiles/TinyXml.dir/tinyxml/src/tinystr.cpp.o
[ 13%] Building CXX object libs/CMakeFiles/TinyXml.dir/tinyxml/src/tinyxml.cpp.o
[ 20%] Building CXX object libs/CMakeFiles/TinyXml.dir/tinyxml/src/tinyxmlerror.cpp.o
[ 26%] Building CXX object libs/CMakeFiles/TinyXml.dir/tinyxml/src/tinyxmlparser.cpp.o
Linking CXX static library libTinyXml.a
[ 26%] Built target TinyXml
Scanning dependencies of target Yace
[ 33%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/condition.cpp.o
[ 40%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/config_parser.cpp.o
[ 46%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/display.cpp.o
[ 53%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/ethernet.cpp.o
[ 60%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/get_opt.cpp.o
[ 66%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/mutex.cpp.o
[ 73%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/source.cpp.o
[ 80%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/timer.cpp.o
[ 86%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/thread.cpp.o
[ 93%] Building CXX object libs/CMakeFiles/Yace.dir/yace/src/writer.cpp.o
Linking CXX static library libYace.a
[ 93%] Built target Yace
Scanning dependencies of target Top_mpeg4_part10_PHP_decoder
[100%] Building CXX object CMakeFiles/Top_mpeg4_part10_PHP_decoder.dir/Top_mpeg4_part10_PHP_decoder.cpp.o
In file included from /usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/Top_mpeg4_part10_PHP_decoder.cpp:17:0:
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h: In member function ‘void AVCDecoder_Syn_Parser_Algo_Synp::renormD(short unsigned int*, short unsigned int*, short unsigned int*)’:
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:27411:22: erreur: invalid conversion from ‘unsigned int*’ to ‘int*’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:26602:7: erreur:   initializing argument 3 of ‘void AVCDecoder_Syn_Parser_Algo_Synp::vld_u(unsigned char, short unsigned int*, int*)’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h: In member function ‘void AVCDecoder_Syn_Parser_Algo_Synp::decodeBypass(short unsigned int*, short unsigned int*, unsigned char*, short unsigned int*)’:
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:27503:21: erreur: invalid conversion from ‘unsigned int*’ to ‘int*’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:26602:7: erreur:   initializing argument 3 of ‘void AVCDecoder_Syn_Parser_Algo_Synp::vld_u(unsigned char, short unsigned int*, int*)’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h: In member function ‘void AVCDecoder_Syn_Parser_Algo_Synp::getMvd(short unsigned int*, short unsigned int*, short unsigned int*, short unsigned int*, int*, bool, unsigned char, unsigned char, unsigned char, short int, bool, unsigned char, unsigned char, unsigned char, short int, bool, bool)’:
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:27959:94: erreur: invalid conversion from ‘int*’ to ‘unsigned int*’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:27866:7: erreur:   initializing argument 5 of ‘void AVCDecoder_Syn_Parser_Algo_Synp::debinTU(unsigned int, unsigned char, unsigned char, unsigned char*, unsigned int*, unsigned char*)’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h: In member function ‘void AVCDecoder_Syn_Parser_Algo_Synp::decodeInit(short unsigned int*, short unsigned int*, short unsigned int*)’:
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:28526:23: erreur: invalid conversion from ‘unsigned int*’ to ‘int*’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:26597:7: erreur:   initializing argument 3 of ‘void AVCDecoder_Syn_Parser_Algo_Synp::getBits(unsigned char, short unsigned int*, int*)’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h: In member function ‘void AVCDecoder_Syn_Parser_Algo_Synp::more_rbsp_data()’:
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:30199:37: erreur: invalid conversion from ‘unsigned int*’ to ‘int*’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:26535:7: erreur:   initializing argument 3 of ‘void AVCDecoder_Syn_Parser_Algo_Synp::showBits(unsigned char, short unsigned int*, int*)’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h: In member function ‘void AVCDecoder_Syn_Parser_Algo_Synp::vld_ce_coeff_token()’:
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:30251:53: erreur: invalid conversion from ‘unsigned int*’ to ‘int*’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h:26606:7: erreur:   initializing argument 3 of ‘void AVCDecoder_Syn_Parser_Algo_Synp::vld_u_name(unsigned char, short unsigned int*, int*, std::string)’ [-fpermissive]
/usr/share/tomcat7/.jenkins/jobs/backend-cpp-mpeg4-part10-php/workspace/output/AVCDecoder_Syn_Parser_Algo_Synp.h: In member function ‘void AVCDecoder_Syn_Parser_Algo_S

[...] a long list with same errors

make[2]: *** [CMakeFiles/Top_mpeg4_part10_PHP_decoder.dir/Top_mpeg4_part10_PHP_decoder.cpp.o] Erreur 1
make[1]: *** [CMakeFiles/Top_mpeg4_part10_PHP_decoder.dir/all] Erreur 2
make: *** [all] Erreur 2
Build step 'CMake Build' marked build as failure
[WARNINGS] Skipping publisher since build result is FAILURE
Finished: FAILURE

Multiple same annotation causing the editor to an error.

Hello all,

Here at EPFL, we modified the inliner so that is possible to inline a procedure/function inside the action of a body.

Example:

... //some code
procedure proc5()
do
   a := 5;
end

procedure proc10()
do
   b := 10;
end

action ==>
    ... //some code

    @inline
    proc5();
    ... //some code

    @inline
    proc10();
    ... //some code
end

... //some code

Adding the annotation @inline two times in the action cause the editor to give an error "Duplicated AST annotation", even thought there is some code in between.

Another observation :

action ==>
... //some code

    @inline
    proc5();
    ... //some code
    foreach int i in 0 .. 4 do
       @inline
       proc10();
       ....
    end
end
....

Here the editor is not going to complain. By this observation I suppose only a single annotation is accepted for the same block body.

Bug with float division

There is a bug in float division,
For example
In actor ABC
If there is float assignment like that
float a = 1.0/17.0;

after orcc compilation, there is not ir file generated for actor ABC and the generated C file of actor ABC will be empty.

But if we do it like that
float a = 0.05882
everything works well.

(C) Smarter scheduler (Mesh topology) + mapping file => Segfault

When an application is built with the C backend and the Smarter Scheduler option enabled (w/ Mesh topology), the binary produced works only on mono-core.

If a valid mapping file (*.xcf) is given as command-line option to the decoder, and if it defines a mapping for more than 1 core, application crash at startup displaying a "Segmentation fault".

This issue has been reproduced with HEVC and AVC (part10 CBP)

List of lists support

Duplicated from old SF ticket 4, originally posted by Hervé Yviquel

It seems that Orcc cannot handle list of lists as expected. Define "S" as follows:

List(type:List(type:uint(size=1), size=4), size=64) S := …

Then the following use of "S" in an output expression will cause Orcc simulator to abort:

action ==> OP:[ S[0] ] repeat 4

The error message is as follows:

Exception in thread "Thread-66" java.lang.NullPointerException
at net.sf.orcc.interpreter.NodeInterpreter.visit(NodeInterpreter.java:421)
at net.sf.orcc.ir.instructions.Write.accept(Write.java:58)
at net.sf.orcc.interpreter.NodeInterpreter.visit(NodeInterpreter.java:125)
at net.sf.orcc.ir.nodes.BlockNode.accept(BlockNode.java:159)
at net.sf.orcc.interpreter.ActorInterpreter.interpretProc(ActorInterpreter.java:314)
at net.sf.orcc.interpreter.ActorInterpreter.execute(ActorInterpreter.java:168)
at net.sf.orcc.simulators.interpreter.InterpreterSimuActor.runAllSchedulableAction(InterpreterSimuActor.java:338)
at net.sf.orcc.simulators.interpreter.InterpreterSimulatorImpl.runNetwork(InterpreterSimulatorImpl.java:181)
at net.sf.orcc.simulators.AbstractSimulator.run(AbstractSimulator.java:652)
at java.lang.Thread.run(Unknown Source)

Changing the code to the following can solve this problem:

action ==> OP:[ [S[0][i]: for int i in 0 .. 3] ] repeat 4

But the above code seems redundant since S[0] itself is equal to [S[0][i]: for int i in 0 .. 3].

Refactoring problems

Duplicated from old SF ticket 2, originally posted by Hervé Yviquel

For example :

<Class name="org.mpeg4.part10.cbp.Residual.Algo_IT4x4_1d"/> 
<Clorg.sc29.wg11.mpeg4.part10.cbp.Residual.Algo_IT4x4_1do_IT4x4_1d"/>

Problem with run configuration

Duplicated from old SF ticket 14, originally posted by Damien de Saint Jorre

We can't add parameters in run configuration anymore.

bug of classify actors

Because of float computation,
the follow actor cannot be classified as SDF.

actor aggregation1()
    float Cost_in, uint(size=8) L_rgb,  uint(size=8) R_rgb ==> float Cost_out:

        //const
    int max_rd = 60;
    int max_iter_time = 7;
    float gamaP = 36.0;
    float R_gama = 0.05882;
    int height = 375;
    int width = 450;

    //variable
    int offset[max_iter_time];float N_distance[max_iter_time];
    float r0;
    float g0;
    float b0;
    float r;
    float g;
    float b;
    float wm;
    float wp;
    float w0;
    float cm;
    float cp;
    float c0;
    int dj := 0;

    //sqrt function
    float mid;
    float last; 
    float low;
    float up; 
    float val:=0.0;

    /******************************************************************************
    * Abs function
    *****************************************************************************/
    function abs(float x)
                -->
            float
        :
            if(x > 0.0)then
                x
            else
                -x
            end
        end
    /******************************************
     * Sqrt funtion procedure
     ******************************************/
    procedure sqrt (float x)
    begin
        float last:=0;
        last := val;
        val :=(val + x/val) / 2;
        while abs(val-last) > 2.718282 do
            last := val;
            val :=(val + x/val) / 2;
        end
    end 

    procedure aggregation_V(int offset, float Ndistance, float R_gamaC, float imageL_rgb [height*width*3+15], float src[height*width*max_rd], float dst[height*width*max_rd])
    begin
        foreach int j in 0 .. height-1
        do
            foreach int i in 0 .. width-1
            do
                dj:=0;
                r0 := imageL_rgb[j*width + 3*i + 15];
                g0 := imageL_rgb[j*width + 3*i + 1 + 15];
                b0 := imageL_rgb[j*width + 3*i + 2 + 15];

                r := imageL_rgb[max((j-offset),0) *width + 3*i + 15];
                g := imageL_rgb[max((j-offset),0) *width + 3*i + 1 + 15];
                b := imageL_rgb[max((j-offset),0) *width + 3*i + 2 + 15];

                //sqrt functions procedures 
                //val := sqrt(val);
                val := ((r0-r)*(r0-r) + (g0-g)*(g0-g) + (b0-b)*(b0-b));
                wm :=  val * R_gamaC;

                r := imageL_rgb[min((j+offset),height-1)*width + 3*i + 15];
                g := imageL_rgb[min((j+offset),height-1)*width + 3*i + 1 + 15];
                b := imageL_rgb[min((j+offset),height-1)*width + 3*i + 2 + 15];

                //sqrt functions procedures 
                //sqrt(((r0-r)*(r0-r) + (g0-g)*(g0-g) + (b0-b)*(b0-b)));
                val := ((r0-r)*(r0-r) + (g0-g)*(g0-g) + (b0-b)*(b0-b));
                wp := val * R_gamaC;

                // no math functions for exp
                //wm = exp(Ndistance-wm);
                //wp = exp(Ndistance-wp);

                // normalization
                w0 := 1/(wm+wp+1);
                wm := wm*w0;
                wp := wp*w0;

                foreach int rd in 0 .. max_rd-1
                do
                    c0 := src[dj*width + i];
                    cm := src[(dj+max(0,j-offset))*width + i];
                    cp := src[(dj+min(height-1,j+offset))*width + i];

                    dst[(dj+j)*width + i] := wm*cm + w0*c0 + wp*cp;
                    dj := dj + height;
                end

            end
        end
    end

    procedure aggregation_H(int offset, float Ndistance, float R_gamaC, float imageL_rgb [height*width*3+15], float src[height*width*max_rd], float dst[height*width*max_rd])
    begin
        foreach int j in 0 .. height-1
        do 
            foreach int i in 0 .. width-1
            do
                dj:=0;
                r0 := imageL_rgb[j*width + 3*i + 15];
                g0 := imageL_rgb[j*width + 3*i + 1 + 15];
                b0 := imageL_rgb[j*width + 3*i + 2 + 15];

                r := imageL_rgb[j*width + 3*(max(0,i-offset)) + 15];
                g := imageL_rgb[j*width + 3*(max(0,i-offset)) + 1 + 15];
                b := imageL_rgb[j*width + 3*(max(0,i-offset)) + 2 + 15];

                //sqrt functions procedures 
                //sqrt(((r0-r)*(r0-r) + (g0-g)*(g0-g) + (b0-b)*(b0-b)));
                val := ((r0-r)*(r0-r) + (g0-g)*(g0-g) + (b0-b)*(b0-b));
                wm :=  val * R_gamaC;

                r := imageL_rgb[j*width + 3*(min(width,i+offset)) + 15];
                g := imageL_rgb[j*width + 3*(min(width,i+offset)) + 1 + 15];
                b := imageL_rgb[j*width + 3*(min(width,i+offset)) + 2 + 15];

                //sqrt functions procedures 
                //sqrt(((r0-r)*(r0-r) + (g0-g)*(g0-g) + (b0-b)*(b0-b)));
                val := ((r0-r)*(r0-r) + (g0-g)*(g0-g) + (b0-b)*(b0-b));
                wp :=  val * R_gamaC;

                // no math functions for exp
                //wm = exp(Ndistance-wm);
                //wp = exp(Ndistance-wp);

                // normalization
                w0 := 1/(wm+wp+1);
                wm := wm*w0;
                wp := wp*w0;

                foreach int rd in 0 .. max_rd-1
                do
                    c0 := src[dj*width + i];
                    cm := src[dj*width + max(0,i-offset)];
                    cp := src[dj*width + min(width-1,i+offset)];

                    dst[(dj+j)*width + i] := wm*cm + w0*c0 + wp*cp;
                    dj := dj + height;
                end
            end
        end

    end

    CostAggregation:action  L_rgb:[left] repeat (width*height*3 + 15) , R_rgb:[right] repeat (width*height*3 + 15), Cost_in:[err] repeat height*width*max_rd ==> Cost_out:[err] repeat height*width*max_rd
    var
        List (type :float, size = height*width*max_rd) err_out
    do
        foreach int i in 0 .. 6
        do 
            aggregation_V((i*i) mod 33, offset[i]/gamaP, R_gama, left, err, err_out);
            aggregation_H((i*i) mod 33, offset[i]/gamaP, R_gama, left, err_out, err);
        end 
    end
end

This actor locate in the folder ..\Stereo\src\stereo
After compilation, there is one warning.
WARNING : An exception occurred when classifying actor (java.lang.Byte cannot be cast to java.lang.Float)

Non-standard CAL features

Hi All,

I am looking into compiling the ORC-Apps with an alternative tool chain and run into a number of issues related to use of non standard functions and/or syntax (or maybe some has become standard and I am just out of sync).

i) The use of the built-in function println is causing incompatibilities. I seem to remember a standardization effort to address printing, so maybe you can show me how it shall look. I am sure at least that it is not part of the language, as it seems to be in ORCC.
I propose that you move println() to the system project.

ii) Array declarations using C-style notation is commonly used. Is that standardized yet? If not, I would propose a slightly modified syntax placing the brackets with the type, and not with variable, i.e. like

int[a][3] X;

The syntax for variable declarations in CAL is " ", and as far as I am concerned the array dimensions are part of the type.

iii) The keyword 'elsif' is introduced to address the ugly problem with nested 'if'-loops. I think this is something that needs fixing, but maybe not this way.What is the status with this in the RVC standard. If not done yet, I propose we bring this up for discussion.

[edit] Next 2 points have been fixed in 73e953b
iv) ORCC do not require variables to be declared in the 'var' section of functions, procedures, action etc. and instead allow declarations in the beginning of the body.

v) Semicolon for separation of declarations is allowed in ORCC. I think this is welcome addition, but needs to be added to the standard. The semicolon following the last declaration should be optional. I believe this is connected to #iv)

vi) The type "String" is with capital letters. All other basic types are with lower case and I believe string should be as well. Is this standardized?

Cheers,
Johan

Problem when actor's parameter is a list

If there is a list for an actor's parameter when we open an xdf file thanks to graphiti, it will display :
actorParameter : {value1, value2} instead of : actorParameter : [value1, value2].
If we want to save this network, it displays an error :
net.sf.orcc.OrccRuntimeException The expression "{value1, value2}" associated with parameter "actorParameter" is not valid.
For being able to save again the xdf file, we have to replace brackets with square brackets.

Support unconnected outputs ports on backends

If an application contains an actor's instance with some out ports not connected to another instance(s), the resulting generated sources does not work, because no FIFO can store output data's (if any) and the actor become stuck.

A solution could be writing a transformation which add a ghost actor which read datas on it's input(s) port(s) and do nothing with it.

LLVM Backend / Clang 3.3: Many decoding errors

Using LLVM backend to generate Top_mpeg4_part10_CBP_decoder (RVC/org.sc29.wg11.mpeg4.part10.cbp) on the CI server, if we use LLVM version 3.0 to 3.2 co compile generated application, everything works fine (as expected). If we switch to LLVM 3.3, many decoding errors appears at runtime. Below an example on the job.

_With Clang 3.2:_

Try to decode AVC/CAVLC/general/AVCNL-1/NL1_Sony_D.jsv and check consistency with AVC/CAVLC/general/AVCNL-1/NL1_Sony_D.yuv:
Frame number 0; no error detected !
Frame number 1; no error detected !
Frame number 2; no error detected !
Frame number 3; no error detected !
Frame number 4; no error detected !
Frame number 5; no error detected !
Frame number 6; no error detected !
Frame number 7; no error detected !
Frame number 8; no error detected !
Frame number 9; no error detected !
Frame number 10; no error detected !
Frame number 11; no error detected !
Frame number 12; no error detected !
Frame number 13; no error detected !
Frame number 14; no error detected !
15 images in 1.019000 seconds: 14.720314 FPS
Try to decode AVC/CAVLC/MMCO/AVCMR-11/HCBP1_HHI_A.264 and check consistency with AVC/CAVLC/MMCO/AVCMR-11/HCBP1_HHI_A.yuv:
Frame number 0; no error detected !
Frame number 1; no error detected !
Frame number 2; no error detected !
Frame number 3; no error detected !
Frame number 4; no error detected !
Frame number 5; no error detected !
Frame number 6; no error detected !
1.583531 images/sec
Frame number 7; no error detected !
Frame number 8; no error detected !
Frame number 9; no error detected !
Frame number 10; no error detected !
Frame number 11; no error detected !
Frame number 12; no error detected !
Frame number 13; no error detected !
Frame number 14; no error detected !
Frame number 15; no error detected !
Frame number 16; no error detected !
Frame number 17; no error detected !
Frame number 18; no error detected !
Frame number 19; no error detected !
Frame number 20; no error detected !
Frame number 21; no error detected !
Frame number 22; no error detected !
Frame number 23; no error detected !
Frame number 24; no error detected !
Frame number 25; no error detected !
Frame number 26; no error detected !
Frame number 27; no error detected !
4.106375 images/sec
Frame number 28; no error detected !
Frame number 29; no error detected !
Frame number 30; no error detected !

_With Clang 3.3:_

Try to decode AVC/CAVLC/general/AVCNL-1/NL1_Sony_D.jsv and check consistency with AVC/CAVLC/general/AVCNL-1/NL1_Sony_D.yuv:

error   0 instead of  31 at position : mb=(0;0) , loc_in_mb=(0;4) , blk: 2
error   0 instead of 134 at position : mb=(0;0) , loc_in_mb=(1;4) , blk: 2
error   0 instead of 219 at position : mb=(0;0) , loc_in_mb=(2;4) , blk: 2
error   0 instead of 226 at position : mb=(0;0) , loc_in_mb=(3;4) , blk: 2
error   0 instead of 220 at position : mb=(0;0) , loc_in_mb=(4;4) , blk: 3
error   0 instead of 213 at position : mb=(0;0) , loc_in_mb=(5;4) , blk: 3
error   0 instead of 219 at position : mb=(0;0) , loc_in_mb=(6;4) , blk: 3
error   0 instead of 208 at position : mb=(0;0) , loc_in_mb=(7;4) , blk: 3
error   0 instead of 199 at position : mb=(0;0) , loc_in_mb=(8;4) , blk: 6
error   8 instead of 216 at position : mb=(0;0) , loc_in_mb=(9;4) , blk: 6
error   2 instead of 210 at position : mb=(0;0) , loc_in_mb=(10;4) , blk: 6
error   0 instead of 187 at position : mb=(0;0) , loc_in_mb=(11;4) , blk: 6
error   0 instead of 151 at position : mb=(0;0) , loc_in_mb=(12;4) , blk: 7
error   0 instead of 151 at position : mb=(0;0) , loc_in_mb=(13;4) , blk: 7
error  19 instead of 159 at position : mb=(0;0) , loc_in_mb=(14;4) , blk: 7
error  34 instead of 175 at position : mb=(0;0) , loc_in_mb=(15;4) , blk: 7
error   0 instead of  31 at position : mb=(0;0) , loc_in_mb=(0;5) , blk: 2
error   0 instead of 134 at position : mb=(0;0) , loc_in_mb=(1;5) , blk: 2
error   0 instead of 219 at position : mb=(0;0) , loc_in_mb=(2;5) , blk: 2
error   0 instead of 226 at position : mb=(0;0) , loc_in_mb=(3;5) , blk: 2
error   9 instead of 235 at position : mb=(0;0) , loc_in_mb=(4;5) , blk: 3
error   0 instead of 222 at position : mb=(0;0) , loc_in_mb=(5;5) , blk: 3
error   0 instead of 196 at position : mb=(0;0) , loc_in_mb=(6;5) , blk: 3
error   0 instead of 157 at position : mb=(0;0) , loc_in_mb=(7;5) , blk: 3
error   0 instead of 150 at position : mb=(0;0) , loc_in_mb=(8;5) , blk: 6
error  31 instead of 188 at position : mb=(0;0) , loc_in_mb=(9;5) , blk: 6
error   6 instead of 163 at position : mb=(0;0) , loc_in_mb=(10;5) , blk: 6
error   0 instead of 149 at position : mb=(0;0) , loc_in_mb=(11;5) , blk: 6
error  10 instead of 150 at position : mb=(0;0) , loc_in_mb=(12;5) , blk: 7
error  24 instead of 165 at position : mb=(0;0) , loc_in_mb=(13;5) , blk: 7
error  43 instead of 185 at position : mb=(0;0) , loc_in_mb=(14;5) , blk: 7
error  47 instead of 196 at position : mb=(0;0) , loc_in_mb=(15;5) , blk: 7
error   0 instead of  31 at position : mb=(0;0) , loc_in_mb=(0;6) , blk: 2
error   0 instead of 134 at position : mb=(0;0) , loc_in_mb=(1;6) , blk: 2
error   0 instead of 219 at position : mb=(0;0) , loc_in_mb=(2;6) , blk: 2
error   0 instead of 226 at position : mb=(0;0) , loc_in_mb=(3;6) , blk: 2
error   0 instead of 222 at position : mb=(0;0) , loc_in_mb=(4;6) , blk: 3
error   0 instead of 196 at position : mb=(0;0) , loc_in_mb=(5;6) , blk: 3
error   0 instead of 162 at position : mb=(0;0) , loc_in_mb=(6;6) , blk: 3
error   0 instead of 130 at position : mb=(0;0) , loc_in_mb=(7;6) , blk: 3
error   0 instead of 107 at position : mb=(0;0) , loc_in_mb=(8;6) , blk: 6
error  11 instead of 141 at position : mb=(0;0) , loc_in_mb=(9;6) , blk: 6
error  16 instead of 146 at position : mb=(0;0) , loc_in_mb=(10;6) , blk: 6
error  38 instead of 168 at position : mb=(0;0) , loc_in_mb=(11;6) , blk: 6
error  47 instead of 189 at position : mb=(0;0) , loc_in_mb=(12;6) , blk: 7
error  48 instead of 197 at position : mb=(0;0) , loc_in_mb=(13;6) , blk: 7
error  51 instead of 206 at position : mb=(0;0) , loc_in_mb=(14;6) , blk: 7
error  52 instead of 207 at position : mb=(0;0) , loc_in_mb=(15;6) , blk: 7
error   0 instead of  31 at position : mb=(0;0) , loc_in_mb=(0;7) , blk: 2
24640 error(s) in Y Component !!!

error   2 instead of  38 at position : mb=(0;0) , loc_in_mb=(0;4) , blk: 2
error   0 instead of 130 at position : mb=(0;0) , loc_in_mb=(1;4) , blk: 2
error   0 instead of 208 at position : mb=(0;0) , loc_in_mb=(2;4) , blk: 2
error   0 instead of 221 at position : mb=(0;0) , loc_in_mb=(3;4) , blk: 2
error   0 instead of 213 at position : mb=(0;0) , loc_in_mb=(4;4) , blk: 3
error   0 instead of 164 at position : mb=(0;0) , loc_in_mb=(5;4) , blk: 3
error   0 instead of 124 at position : mb=(0;0) , loc_in_mb=(6;4) , blk: 3
error   0 instead of 166 at position : mb=(0;0) , loc_in_mb=(7;4) , blk: 3
error  35 instead of 178 at position : mb=(0;0) , loc_in_mb=(8;4) , blk: 6
error  16 instead of 150 at position : mb=(0;0) , loc_in_mb=(9;4) , blk: 6
error  28 instead of 153 at position : mb=(0;0) , loc_in_mb=(10;4) , blk: 6
error  36 instead of 164 at position : mb=(0;0) , loc_in_mb=(11;4) , blk: 6
error  52 instead of 182 at position : mb=(0;0) , loc_in_mb=(12;4) , blk: 7
error  61 instead of 193 at position : mb=(0;0) , loc_in_mb=(13;4) , blk: 7
error  71 instead of 203 at position : mb=(0;0) , loc_in_mb=(14;4) , blk: 7
error  71 instead of 204 at position : mb=(0;0) , loc_in_mb=(15;4) , blk: 7
error   0 instead of  33 at position : mb=(0;0) , loc_in_mb=(0;5) , blk: 2
error   5 instead of 141 at position : mb=(0;0) , loc_in_mb=(1;5) , blk: 2
error   4 instead of 220 at position : mb=(0;0) , loc_in_mb=(2;5) , blk: 2
error   0 instead of 217 at position : mb=(0;0) , loc_in_mb=(3;5) , blk: 2
error   0 instead of 171 at position : mb=(0;0) , loc_in_mb=(4;5) , blk: 3
error   0 instead of 163 at position : mb=(0;0) , loc_in_mb=(5;5) , blk: 3
error   0 instead of 123 at position : mb=(0;0) , loc_in_mb=(6;5) , blk: 3
error   0 instead of 120 at position : mb=(0;0) , loc_in_mb=(7;5) , blk: 3
error  24 instead of 149 at position : mb=(0;0) , loc_in_mb=(8;5) , blk: 6
error  26 instead of 154 at position : mb=(0;0) , loc_in_mb=(9;5) , blk: 6
error  50 instead of 181 at position : mb=(0;0) , loc_in_mb=(10;5) , blk: 6
error  62 instead of 194 at position : mb=(0;0) , loc_in_mb=(11;5) , blk: 6
error  74 instead of 206 at position : mb=(0;0) , loc_in_mb=(12;5) , blk: 7
error  74 instead of 207 at position : mb=(0;0) , loc_in_mb=(13;5) , blk: 7
error  75 instead of 208 at position : mb=(0;0) , loc_in_mb=(14;5) , blk: 7
error  72 instead of 205 at position : mb=(0;0) , loc_in_mb=(15;5) , blk: 7
error   0 instead of  27 at position : mb=(0;0) , loc_in_mb=(0;6) , blk: 2
error   0 instead of 125 at position : mb=(0;0) , loc_in_mb=(1;6) , blk: 2
error   0 instead of 186 at position : mb=(0;0) , loc_in_mb=(2;6) , blk: 2
error   0 instead of 173 at position : mb=(0;0) , loc_in_mb=(3;6) , blk: 2
error   0 instead of 140 at position : mb=(0;0) , loc_in_mb=(4;6) , blk: 3
error   5 instead of 148 at position : mb=(0;0) , loc_in_mb=(5;6) , blk: 3
error   4 instead of 137 at position : mb=(0;0) , loc_in_mb=(6;6) , blk: 3
error   0 instead of 129 at position : mb=(0;0) , loc_in_mb=(7;6) , blk: 3
error  35 instead of 166 at position : mb=(0;0) , loc_in_mb=(8;6) , blk: 6
error  57 instead of 189 at position : mb=(0;0) , loc_in_mb=(9;6) , blk: 6
error  68 instead of 201 at position : mb=(0;0) , loc_in_mb=(10;6) , blk: 6
error  73 instead of 206 at position : mb=(0;0) , loc_in_mb=(11;6) , blk: 6
error  80 instead of 213 at position : mb=(0;0) , loc_in_mb=(12;6) , blk: 7
error  77 instead of 210 at position : mb=(0;0) , loc_in_mb=(13;6) , blk: 7
error  75 instead of 208 at position : mb=(0;0) , loc_in_mb=(14;6) , blk: 7
error  75 instead of 208 at position : mb=(0;0) , loc_in_mb=(15;6) , blk: 7
error   0 instead of  26 at position : mb=(0;0) , loc_in_mb=(0;7) , blk: 2
24640 error(s) in Y Component !!!

error   0 instead of  32 at position : mb=(0;0) , loc_in_mb=(0;4) , blk: 2
error   0 instead of 141 at position : mb=(0;0) , loc_in_mb=(1;4) , blk: 2
error   0 instead of 171 at position : mb=(0;0) , loc_in_mb=(2;4) , blk: 2
error   0 instead of 168 at position : mb=(0;0) , loc_in_mb=(3;4) , blk: 2
error   0 instead of 138 at position : mb=(0;0) , loc_in_mb=(4;4) , blk: 3
error   0 instead of 124 at position : mb=(0;0) , loc_in_mb=(5;4) , blk: 3
error   0 instead of 127 at position : mb=(0;0) , loc_in_mb=(6;4) , blk: 3
error   4 instead of 154 at position : mb=(0;0) , loc_in_mb=(7;4) , blk: 3
error  21 instead of 179 at position : mb=(0;0) , loc_in_mb=(8;4) , blk: 6
error  26 instead of 191 at position : mb=(0;0) , loc_in_mb=(9;4) , blk: 6
error  32 instead of 202 at position : mb=(0;0) , loc_in_mb=(10;4) , blk: 6
error  37 instead of 208 at position : mb=(0;0) , loc_in_mb=(11;4) , blk: 6
error  35 instead of 207 at position : mb=(0;0) , loc_in_mb=(12;4) , blk: 7
error  35 instead of 208 at position : mb=(0;0) , loc_in_mb=(13;4) , blk: 7
error  36 instead of 209 at position : mb=(0;0) , loc_in_mb=(14;4) , blk: 7
error  35 instead of 208 at position : mb=(0;0) , loc_in_mb=(15;4) , blk: 7
error   0 instead of  26 at position : mb=(0;0) , loc_in_mb=(0;5) , blk: 2
error   0 instead of 116 at position : mb=(0;0) , loc_in_mb=(1;5) , blk: 2
error   0 instead of 156 at position : mb=(0;0) , loc_in_mb=(2;5) , blk: 2
error   0 instead of 132 at position : mb=(0;0) , loc_in_mb=(3;5) , blk: 2
error   2 instead of 142 at position : mb=(0;0) , loc_in_mb=(4;5) , blk: 3
error   0 instead of 133 at position : mb=(0;0) , loc_in_mb=(5;5) , blk: 3
error   0 instead of 152 at position : mb=(0;0) , loc_in_mb=(6;5) , blk: 3
error  19 instead of 186 at position : mb=(0;0) , loc_in_mb=(7;5) , blk: 3
error  30 instead of 200 at position : mb=(0;0) , loc_in_mb=(8;5) , blk: 6
error  35 instead of 206 at position : mb=(0;0) , loc_in_mb=(9;5) , blk: 6
error  40 instead of 213 at position : mb=(0;0) , loc_in_mb=(10;5) , blk: 6
error  42 instead of 215 at position : mb=(0;0) , loc_in_mb=(11;5) , blk: 6
error  39 instead of 212 at position : mb=(0;0) , loc_in_mb=(12;5) , blk: 7
error  38 instead of 211 at position : mb=(0;0) , loc_in_mb=(13;5) , blk: 7
error  37 instead of 210 at position : mb=(0;0) , loc_in_mb=(14;5) , blk: 7
error  36 instead of 209 at position : mb=(0;0) , loc_in_mb=(15;5) , blk: 7
error   8 instead of  41 at position : mb=(0;0) , loc_in_mb=(0;6) , blk: 2
error   0 instead of 101 at position : mb=(0;0) , loc_in_mb=(1;6) , blk: 2
error   0 instead of 141 at position : mb=(0;0) , loc_in_mb=(2;6) , blk: 2
error   0 instead of 147 at position : mb=(0;0) , loc_in_mb=(3;6) , blk: 2
error   0 instead of 144 at position : mb=(0;0) , loc_in_mb=(4;6) , blk: 3
error   2 instead of 169 at position : mb=(0;0) , loc_in_mb=(5;6) , blk: 3
error  23 instead of 196 at position : mb=(0;0) , loc_in_mb=(6;6) , blk: 3
error  27 instead of 200 at position : mb=(0;0) , loc_in_mb=(7;6) , blk: 3
error  35 instead of 208 at position : mb=(0;0) , loc_in_mb=(8;6) , blk: 6
error  37 instead of 210 at position : mb=(0;0) , loc_in_mb=(9;6) , blk: 6
error  40 instead of 213 at position : mb=(0;0) , loc_in_mb=(10;6) , blk: 6
error  40 instead of 213 at position : mb=(0;0) , loc_in_mb=(11;6) , blk: 6
error  42 instead of 215 at position : mb=(0;0) , loc_in_mb=(12;6) , blk: 7
error  41 instead of 214 at position : mb=(0;0) , loc_in_mb=(13;6) , blk: 7
error  40 instead of 213 at position : mb=(0;0) , loc_in_mb=(14;6) , blk: 7
error  40 instead of 213 at position : mb=(0;0) , loc_in_mb=(15;6) , blk: 7
error   4 instead of  37 at position : mb=(0;0) , loc_in_mb=(0;7) , blk: 2
24640 error(s) in Y Component !!!

Better Docs

Hi,

Can you give better docs on the CAL language on the page.

Suminda

smart scheduler option broken in C back-end

When we run Top_mpegh_part2_main with the "smart scheduler", we have this exception : C backend could not generate code
net.sf.orcc.df.impl.ActorImpl cannot be cast to net.sf.orcc.df.Instance

Constant state variable depending on Actor parameters: incoherence ?

Duplicated from old SF ticket 9, originally posted by Karol Desnos

If a constant state variable of an actor gets its value from an actor parameter, then :

  1. Orcc requires the definition of a default value for the actor parameter in the actor code. (else, "error: Cannot use the variable par in this context because it has no initial value").
  2. In the generated C code, the parameter and the const state variable have different values if the actor is instanciated with a non-default parameter value.

Is this a desired behavior ?
Actor Example:

actor toto(int par = 3) int in ==> int out :
    int CONST_VAR = par;

    process: action in:[ x ] ==> out:[ y ]
    var
        int y,
    do
        y := x + par;
    end
end

If the actor is instanciated with parameter value "par=7", C Backend will generate:

/////////////////////////////////////////////////////////////////////////
// Parameter values of the instance
#define par 7

/////////////////////////////////////////////////////////////////////////
// State variables of the actor
#define CONST_VAR 3

Wrong CSDF classification

The following actor is wrongly classified as CSDF... The error comes from guard that depend of variable initialized by input data...
One way to solve this bug is the building of a dependency graph for the actor in order to better detect data-dependent condition.

actor FrameDelayBorder()
    uint(size=16) PictSize,
    uint(size=8)  Block_in
        ==>
    uint(size=8)  Block_out
        :


    uint(size=8) pictureBuffer[3][PICT_WIDTH][PICT_HEIGHT];

    uint(size=6)  picSizeInCu[2];
    uint(size=6)  xCu := 0;
    uint(size=6)  yCu := 0;

    isNewPict: action 
        PictSize:[picWidthInPix, picHeightInPix]==>
    do
        picSizeInCu := [(picWidthInPix+63)/64, (picHeightInPix+63)/64];
    end


    getCuPix.launch: action Block_in:[samp] repeat 64*64 + 32*32*2 ==>
    guard
        yCu < picSizeInCu[1]
    var
        uint(size=16) offset,
        uint(size=16) xPic,
        uint(size=16) yPic
    do
        xPic := xCu<<6;
        yPic := yCu<<6;

        foreach uint y in 0 .. 63
        do
            foreach uint x in 0 .. 63
            do
                pictureBuffer[0][xPic+x][yPic+y] := samp[x + y*64]; 
            end
        end

        xPic := xPic>>1;
        yPic := yPic>>1;
        offset := 64*64;
        foreach uint cIdx in 1 .. 2
        do
            foreach uint y in 0 .. 31
            do
                foreach uint x in 0 .. 31
                do
                    pictureBuffer[cIdx][xPic+x][yPic+y] := samp[x + y*32 +offset]; 
                end
            end
            offset := offset + 32*32;
        end
        nextLcuAddress();
    end

    getCuPix.done: action ==>
    guard
        yCu = picSizeInCu[1]
    do
        xCu := 0;
        yCu := 0;
    end

    sendSamples.launch: action ==> Block_out:[sampleOut] repeat 64*64 + 2* 32*32
    guard
        yCu < picSizeInCu[1]
    var
        uint tokenOffset,
        uint(size=8) sampleOut[64*64+2*32*32],
        uint(size=16) blkAddrX, uint(size=16) blkAddrY
    do
        blkAddrX := xCu*64;
        blkAddrY := yCu*64;
        foreach uint y in 0 .. 63
        do
            foreach uint x in 0 .. 63
            do
                    sampleOut[x+y*64] := pictureBuffer[0][blkAddrX+x][blkAddrY+y];
            end
        end

        blkAddrX := blkAddrX>>1;
        blkAddrY := blkAddrY>>1;
        tokenOffset:= 64*64;
        foreach uint comp in 1 .. 2
        do
            foreach uint y in 0 .. 31
            do
                foreach uint x in 0 .. 31
                do
                        sampleOut[x+y*32 + tokenOffset] := pictureBuffer[comp][blkAddrX+x][blkAddrY+y];
                end
            end
            tokenOffset:= tokenOffset + 32*32;
        end

        nextLcuAddress();
    end

    sendSamples.done: action ==>
    guard
        yCu = picSizeInCu[1]
    do
        xCu := 0;
        yCu := 0;
    end

    schedule fsm IsNewPict:
        IsNewPict (isNewPict )--> GetCuPix;

        GetCuPix (getCuPix.launch )--> GetCuPix;
        GetCuPix (getCuPix.done   )--> SendSamples;

        SendSamples (sendSamples.launch )--> SendSamples;
        SendSamples (sendSamples.done   )--> IsNewPict;
    end
end

Errors during the classification

Duplicated from old SF ticket 3, originally posted by Hervé Yviquel

There are some errors displayed in the first eclipse during the classification

(LLVM) Bug with print

There is an error in the generated code of IT_Splitter due to the multiple use of the same state variable in a print. For example, the following code:

println("Test = " + sizeOfTU + ", " + sizeOfTU)

Will generate the following compilation error

[ 58%] Building LLVM object HevcDecoder_xIT_IT_Splitter.ll.o
/home/hyviquel/Workspaces/experimental/rvc/llvm/src/HevcDecoder_xIT_IT_Splitter.ll:564:2: error: multiple definition of local value named 'sizeOfTU_32_1'
[ 60%]         %sizeOfTU_32_1 = zext i8 %sizeOfTU_1 to i32
        ^
1 error generated.

Problem with graphtiti in Orcc

When we add an new instance without refering to any actor, if we save the file and close it, it's impossible to reopen the file.

Wrong classification due to parameter

The classification goes wrong if the behavior of the actor is dependent of a parameter.

For example:
org.sc29.wg11.mpeg4.part10.cbp.Residual.Algo_IQ_QSAndSLAndIDCTScaler_4x4
CSDF behavior depending of the parameter.

A solution is to instantiate all actors but it implies the support of instantiate network in the backend (an instantiate network does not contain any instances, only actors).

IR serialization with float operations does not work every time

When using Orcc, writing a very simple actor like that :

actor intFloatTest()  ==> :
    float my_var = 2.0/3;
end

produce an OrccRuntimeException (with an annoying popup), prevent IR to be serialized, and finally does not produce correct target code, since the backend could not find serialized IR at compile time. We must replace 3 by 3.0 to prevent this.

After debugging on the issue,it appears net.sf.orcc.core/net.sf.orcc.ir.util.ValueUtil is the responsible. All methods like divide(), add(), subtract(), etc. check that each of 2 terms in the operation have the same type (BigInteger or BigDecimal). If both terms have not the same type, an OrccRuntimeException is thrown.

It could be possible to fix that by checking all the possibie types combinations (int + float, float + int, int + int, float + float) but it could drastically change the behaviour of ValueUtil class. So I want to ask other developpers if you think this update can be done safely ?

Multi2Mono transformation seems broken

When compiling an application (MPEG 4 Part 2 SP for example) with C backend in 2 different folders, one with Multi2Mono token transformation applied, one without, we can see the application build with M2m is stuck in the beginning of its execution. No image displayed, no output printed, decoder never stop.

On application built without the transformation, everything works fine.

Refactoring problems (top network path)

Duplicated from old SF ticket 19, originally posted by Damien de Saint Jorre

If we run a compilation with a description where the top xdf has been moved, we have a null pointer exception.

Problem with units imports

Duplicated from old SF ticket 17, originally posted by Damien de Saint Jorre

When the same constant is present in two units, if you import these units and try to use the constant, there is the following error : couldn't resolve reference to ...

Problem with actor's parameter in C back-end

If we declare a variable toto as a parameter of an actor, then we declare a procedure's parameter which is named toto as well, there is a problem during the compilation of the C code.
Indeed the actor's parameter is declared as a macro, so when the pre-processor "see" the procedure's parameter, it replaces the name totot by the actor's parameter value.

Action merger problem

MPEG-4 SP / AVC are not compilable anymore after merging of their static actions.

VM Definition, Meta Programming & Language Extensibility

Hi,

It would be nice to have the following features:

  1. VM definition - Ability to define an execution environment in terms of instruction or hardware. E.g. define a new TTA or VLIW processor architecture.
  2. Generate test code against the VM
  3. Ability to define High Level Languages
  4. Ability to compile the HLL to the different VMs
  5. Ability to extract Dataflow / Functional specification against any existing language. E.g. C/C++ to dataflow and functional representation and vice versa to be able to optimally target code to VM features. Control Flow VM, Stack VM, Process VM, Dataflow VM, Functional VM, Hybrid VM.

Perhaps Xtext and ANTRL may help.

Suminda

Orcc compile without warning if there is errors in cal files

Duplicated from old SF ticket 16, originally posted by Antoine Lorence

When errors are detected by the code editor, the corresponding .ir file is not deleted. Because of that, it is possible to compile a design even if CAL files have errors using outdated IR files.
To fix that, the ActorBuilder should be removed and replaced by the nicer native Xtext "generator" feature.

Compilation failed with Windows 64 bits

Duplicated from old SF ticket 24, originally posted by Khaled Jerbi

After C code generation with orcc and Cmake solution generation, compilation errors were found during compilation with visual studio 2008 (find errors below). we think it is related to the fact that sdl libraries are set to 32bits while the OS is a win 64 bits. Are there sdl libraries for 64 bits?

Linking...
4>Top_E.obj : error LNK2019: unresolved external symbol _compareErrors referenced in function _main
4>Top_E.obj : error LNK2019: unresolved external symbol _init_orcc referenced in function _main
4>Top_E.obj : error LNK2019: unresolved external symbol _find_actor referenced in function _launcher
4>Top_E.obj : error LNK2019: unresolved external symbol _sched_init referenced in function _launcher
4>Top_E___.obj : error LNK2019: unresolved external symbol _map_actors referenced in function _launcher
4>source.obj : error LNK2019: unresolved external symbol _source_init referenced in function _untagged_0
4>decoder_motion_U_framebuff.obj : error LNK2019: unresolved external symbol _wait_for_key referenced in function _decoder_motion_U_framebuff_initialize
4>decoder_motion_V_add.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_motion_V_framebuff.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_V_DCRecontruction_invpred.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_motion_Y_add.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_motion_Y_framebuff.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_motion_U_add.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_U_DCRecontruction_invpred.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_V_IAP.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_V_IQ.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_V_DCRecontruction_addressing.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_Y_DCRecontruction_invpred.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_U_IAP.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_U_IQ.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_U_DCRecontruction_addressing.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_parser_splitter_420_B.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_Y_IAP.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_Y_IQ.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_texture_Y_DCRecontruction_addressing.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_parser_mvseq.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_parser_mvrecon.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_parser_splitter_BTYPE.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_parser_splitter_MV.obj : error LNK2001: unresolved external symbol _wait_for_key
4>source.obj : error LNK2001: unresolved external symbol _wait_for_key
4>display.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_Merger420.obj : error LNK2001: unresolved external symbol _wait_for_key
4>decoder_parser_parseheaders.obj : error LNK2001: unresolved external symbol _wait_for_key
4>source.obj : error LNK2019: unresolved external symbol _source_sizeOfFile referenced in function _getFileSize
4>source.obj : error LNK2019: unresolved external symbol _source_readNBytes referenced in function _readNBytes
4>source.obj : error LNK2019: unresolved external symbol _source_rewind referenced in function _readFileDone
4>source.obj : error LNK2019: unresolved external symbol _source_decrementNbLoops referenced in function _readFileDone
4>source.obj : error LNK2019: unresolved external symbol _source_isMaxLoopsReached referenced in function _isSchedulable_readFileDone
4>display.obj : error LNK2001: unresolved external symbol _source_isMaxLoopsReached
4>display.obj : error LNK2019: unresolved external symbol _fpsPrintInit referenced in function _untagged_0
4>display.obj : error LNK2019: unresolved external symbol _compareYUV_init referenced in function _untagged_0
4>display.obj : error LNK2019: unresolved external symbol _displayYUV_init referenced in function _untagged_0
4>display.obj : error LNK2019: unresolved external symbol _displayYUV_getFlags referenced in function _untagged_0
4>display.obj : error LNK2019: unresolved external symbol _compareYUV_comparePicture referenced in function _displayPicture
4>display.obj : error LNK2019: unresolved external symbol _displayYUV_displayPicture referenced in function _displayPicture
4>display.obj : error LNK2019: unresolved external symbol _fpsPrintNewPicDecoded referenced in function _displayPicture

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.