Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-v6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
lustre-v6
Commits
c00f92da
Commit
c00f92da
authored
10 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
soc2c: fix the generation _ext.ch files in the stack (default!) mode.
parent
98e81cb0
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/soc2c.ml
+1
-2
1 addition, 2 deletions
src/soc2c.ml
src/soc2cExtern.ml
+8
-12
8 additions, 12 deletions
src/soc2cExtern.ml
test/lus2lic.sum
+12
-12
12 additions, 12 deletions
test/lus2lic.sum
test/lus2lic.time
+7
-7
7 additions, 7 deletions
test/lus2lic.time
with
28 additions
and
33 deletions
src/soc2c.ml
+
1
−
2
View file @
c00f92da
(* Time-stamp: <modified the 20/03/2015 (at 15:4
8
) by Erwan Jahier> *)
(* Time-stamp: <modified the 20/03/2015 (at 15:
5
4) by Erwan Jahier> *)
(* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *)
(* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *)
...
@@ -368,7 +368,6 @@ let (gen_main_wcet_file : Soc.t -> string -> Soc.tbl -> unit) =
...
@@ -368,7 +368,6 @@ let (gen_main_wcet_file : Soc.t -> string -> Soc.tbl -> unit) =
putc
(
"
putc
(
"
#include <stdlib.h>
#include <stdlib.h>
#include
\"
"
^
base
^
".h
\"
#include
\"
"
^
base
^
".h
\"
int main(){"
^
(
int main(){"
^
(
match
io_transmit_mode
()
with
match
io_transmit_mode
()
with
|
Lv6MainArgs
.
Stack
->
|
Lv6MainArgs
.
Stack
->
...
...
This diff is collapsed.
Click to expand it.
src/soc2cExtern.ml
+
8
−
12
View file @
c00f92da
(* Time-stamp: <modified the 2
6
/0
2
/2015 (at 1
1:23
) by Erwan Jahier> *)
(* Time-stamp: <modified the 2
0
/0
3
/2015 (at 1
7:31
) by Erwan Jahier> *)
open
Soc2cIdent
open
Soc2cIdent
...
@@ -120,13 +120,11 @@ let (gen_files : Soc.t -> Soc.tbl -> LicPrg.t -> string -> string-> string -> bo
...
@@ -120,13 +120,11 @@ let (gen_files : Soc.t -> Soc.tbl -> LicPrg.t -> string -> string-> string -> bo
let
ext_och
=
open_out
ext_hfile
in
let
ext_och
=
open_out
ext_hfile
in
output_string
ext_och
(
type_decl
licprg
);
output_string
ext_och
(
type_decl
licprg
);
(* output_string ext_och (cpy_decl licprg); *)
(* output_string ext_och (cpy_decl licprg); *)
List
.
iter
(
fun
(
sm
,
soc
)
->
List
.
iter
(
fun
(
sm
,
soc
)
->
let
sname
=
Soc2cDep
.
step_name
soc
.
key
sm
.
name
in
let
sname
=
Soc2cDep
.
step_name
soc
.
key
sm
.
name
in
if
SocUtils
.
ctx_is_global
soc
then
let
proto_decl
,_
=
Soc2cDep
.
get_step_prototype
sm
soc
in
output_string
ext_och
(
Printf
.
sprintf
"void %s();
\n
"
sname
)
output_string
ext_och
proto_decl
;
else
let
ctx
=
get_ctx_name
soc
.
key
in
output_string
ext_och
(
Printf
.
sprintf
"void %s(%s*);
\n
"
sname
ctx
)
)
extern_steps
;
)
extern_steps
;
close_out
ext_och
;
close_out
ext_och
;
print_string
(
Printf
.
sprintf
"%s has been generated.
\n
"
ext_hfile
);
print_string
(
Printf
.
sprintf
"%s has been generated.
\n
"
ext_hfile
);
...
@@ -140,15 +138,13 @@ let (gen_files : Soc.t -> Soc.tbl -> LicPrg.t -> string -> string-> string -> bo
...
@@ -140,15 +138,13 @@ let (gen_files : Soc.t -> Soc.tbl -> LicPrg.t -> string -> string-> string -> bo
output_string
ext_occ
(
const_def
licprg
);
output_string
ext_occ
(
const_def
licprg
);
List
.
iter
(
fun
(
sm
,
soc
)
->
List
.
iter
(
fun
(
sm
,
soc
)
->
let
sname
=
Soc2cDep
.
step_name
soc
.
key
sm
.
name
in
let
sname
=
Soc2cDep
.
step_name
soc
.
key
sm
.
name
in
if
SocUtils
.
ctx_is_global
soc
then
let
_
,
proto_begin
=
Soc2cDep
.
get_step_prototype
sm
soc
in
output_string
ext_occ
(
Printf
.
sprintf
"void %s(){
\n
/* finish me! */
\n
}
\n
"
sname
)
output_string
ext_occ
proto_begin
;
else
output_string
ext_occ
(
Printf
.
sprintf
" /* finish me! */
\n
}
\n
"
)
let
ctx
=
get_ctx_name
soc
.
key
in
output_string
ext_occ
(
Printf
.
sprintf
"void %s(%s* ctx){
\n
\\\\
finish me!
\n
}
\n
"
sname
ctx
)
)
extern_steps
;
)
extern_steps
;
close_out
ext_occ
;
close_out
ext_occ
;
print_string
(
Printf
.
sprintf
"%s has been generated.
\n
"
ext_cfile
);
print_string
(
Printf
.
sprintf
"%s has been generated.
\n
"
ext_cfile
);
);
);
needs_cfile
,
needs_hfile
needs_cfile
,
needs_hfile
This diff is collapsed.
Click to expand it.
test/lus2lic.sum
+
12
−
12
View file @
c00f92da
==> lus2lic0.sum <==
==> lus2lic0.sum <==
Test Run By jahier on
Wed
Mar
18
17:
03:49
Test Run By jahier on
Fri
Mar
20
17:
38:52
Native configuration is x86_64-unknown-linux-gnu
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic0 tests ===
=== lus2lic0 tests ===
...
@@ -63,7 +63,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte
...
@@ -63,7 +63,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte
XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
==> lus2lic1.sum <==
==> lus2lic1.sum <==
Test Run By jahier on
Wed
Mar
18
17:
0
3:5
3
Test Run By jahier on
Fri
Mar
20
17:3
8
:5
7
Native configuration is x86_64-unknown-linux-gnu
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic1 tests ===
=== lus2lic1 tests ===
...
@@ -397,7 +397,7 @@ PASS: gcc -o multipar.exec multipar_multipar.c multipar_multipar_loop.c
...
@@ -397,7 +397,7 @@ PASS: gcc -o multipar.exec multipar_multipar.c multipar_multipar_loop.c
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {}
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {}
==> lus2lic2.sum <==
==> lus2lic2.sum <==
Test Run By jahier on
Wed
Mar
18
17:
04
:3
2
Test Run By jahier on
Fri
Mar
20
17:
39
:3
6
Native configuration is x86_64-unknown-linux-gnu
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic2 tests ===
=== lus2lic2 tests ===
...
@@ -727,7 +727,7 @@ PASS: gcc -o zzz2.exec zzz2_zzz2.c zzz2_zzz2_loop.c
...
@@ -727,7 +727,7 @@ PASS: gcc -o zzz2.exec zzz2_zzz2.c zzz2_zzz2_loop.c
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {}
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {}
==> lus2lic3.sum <==
==> lus2lic3.sum <==
Test Run By jahier on
Wed
Mar
18
17:
05:38
Test Run By jahier on
Fri
Mar
20
17:
40:42
Native configuration is x86_64-unknown-linux-gnu
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic3 tests ===
=== lus2lic3 tests ===
...
@@ -1230,7 +1230,7 @@ PASS: ./myec2c {-o multipar.c multipar.ec}
...
@@ -1230,7 +1230,7 @@ PASS: ./myec2c {-o multipar.c multipar.ec}
PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <==
==> lus2lic4.sum <==
Test Run By jahier on
Wed
Mar
18
17:
06:15
Test Run By jahier on
Fri
Mar
20
17:
41:22
Native configuration is x86_64-unknown-linux-gnu
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic4 tests ===
=== lus2lic4 tests ===
...
@@ -1727,13 +1727,13 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
...
@@ -1727,13 +1727,13 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
===============================
===============================
# Total number of failures: 14
# Total number of failures: 14
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 4 seconds
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 4 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 3
9
seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 3
8
seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 66 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 66 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 3
7
seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 3
8
seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 7
9
seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 7
5
seconds
* Ref time:
* Ref time:
0.0
4
user 0.02system 3:45.6
8
elapsed 0%CPU (0avgtext+0avgdata 5
120
maxresident)k
0.0
3
user 0.02system 3:45.
2
6elapsed 0%CPU (0avgtext+0avgdata 5
064
maxresident)k
160inputs+0outputs (0major+55
02
minor)pagefaults 0swaps
160inputs+0outputs (0major+55
34
minor)pagefaults 0swaps
* Quick time (-j 4):
* Quick time (-j 4):
0.03user 0.02system 1:2
5
.4
3
elapsed 0%CPU (0avgtext+0avgdata 51
28
maxresident)k
0.03user 0.02system 1:
3
2.4
7
elapsed 0%CPU (0avgtext+0avgdata 51
04
maxresident)k
160inputs+0outputs (0major+55
64
minor)pagefaults 0swaps
160inputs+0outputs (0major+55
90
minor)pagefaults 0swaps
This diff is collapsed.
Click to expand it.
test/lus2lic.time
+
7
−
7
View file @
c00f92da
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 4 seconds
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 4 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 3
9
seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 3
8
seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 66 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 66 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 3
7
seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 3
8
seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 7
9
seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 7
5
seconds
* Ref time:
* Ref time:
0.0
4
user 0.02system 3:45.6
8
elapsed 0%CPU (0avgtext+0avgdata 5
120
maxresident)k
0.0
3
user 0.02system 3:45.
2
6elapsed 0%CPU (0avgtext+0avgdata 5
064
maxresident)k
160inputs+0outputs (0major+55
02
minor)pagefaults 0swaps
160inputs+0outputs (0major+55
34
minor)pagefaults 0swaps
* Quick time (-j 4):
* Quick time (-j 4):
0.03user 0.02system 1:2
5
.4
3
elapsed 0%CPU (0avgtext+0avgdata 51
28
maxresident)k
0.03user 0.02system 1:
3
2.4
7
elapsed 0%CPU (0avgtext+0avgdata 51
04
maxresident)k
160inputs+0outputs (0major+55
64
minor)pagefaults 0swaps
160inputs+0outputs (0major+55
90
minor)pagefaults 0swaps
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment