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
dc44269b
Commit
dc44269b
authored
8 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
-2c: override the enum mode when generating C code as the default (AsEnum)
generates unvalid C code.
parent
4508ea9f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
_oasis
+1
-1
1 addition, 1 deletion
_oasis
src/lv6MainArgs.ml
+20
-13
20 additions, 13 deletions
src/lv6MainArgs.ml
src/lv6version.ml
+2
-2
2 additions, 2 deletions
src/lv6version.ml
with
23 additions
and
16 deletions
_oasis
+
1
−
1
View file @
dc44269b
OASISFormat: 0.4
Name: lustre-v6
Version: 1.66
0
Version: 1.66
1
Synopsis: The Lustre V6 Verimag compiler
Description: This package contains:
(1) lus2lic: the (current) name of the compiler (and interpreter via -exec).
...
...
This diff is collapsed.
Click to expand it.
src/lv6MainArgs.ml
+
20
−
13
View file @
dc44269b
(* Time-stamp: <modified the 05/09/2016 (at 1
0:28
) by Erwan Jahier> *)
(* Time-stamp: <modified the 05/09/2016 (at 1
1:02
) by Erwan Jahier> *)
(*
Le manager d'argument adapt de celui de lutin, plus joli
N.B. solution un peu batarde : les options sont stockes, comme avant, dans Global,
...
...
@@ -247,6 +247,14 @@ let set_ec_options opt =
opt
.
expand_nodes
<-
true
;
()
let
set_c_options
opt
=
opt
.
gen_c
<-
true
;
(
match
global_opt
.
expand_enums
with
|
AsEnum
->
global_opt
.
expand_enums
<-
AsInt
;
(* only override the default in this case *)
|
AsInt
|
AsConst
|
AsBool
->
()
);
()
(*** USER OPTIONS TAB **)
let
mkoptab
(
opt
:
t
)
:
unit
=
(
mkopt
opt
...
...
@@ -270,15 +278,12 @@ let mkoptab (opt:t) : unit = (
;
mkopt
opt
[
"-2c"
;
"--to-c"
]
(
Arg
.
Unit
(
fun
_
->
opt
.
gen_c
<-
true
;
global_opt
.
expand_enums
<-
AsInt
;
))
(
Arg
.
Unit
(
fun
_
->
set_c_options
opt
))
[
"generate C code"
]
;
mkopt
opt
~
doc_level
:
Basic
[
"-cc"
;
"--compile-generated-c"
]
(
Arg
.
Unit
(
fun
i
->
opt
.
gen_c
<-
true
;
opt
.
launch_cc
<-
true
))
(
Arg
.
Unit
(
fun
i
->
set_c_options
opt
;
opt
.
launch_cc
<-
true
))
[
"Try to compile the generated C files (force -2c)"
]
;
mkopt
opt
...
...
@@ -392,12 +397,12 @@ let mkoptab (opt:t) : unit = (
;
mkopt
opt
~
doc_level
:
Advanced
[
"-2cil"
;
"--2c-inline-loop"
]
(
Arg
.
Unit
(
fun
i
->
global_opt
.
soc2c_inline_loops
<-
true
;
opt
.
gen_c
<-
true
))
(
Arg
.
Unit
(
fun
i
->
global_opt
.
soc2c_inline_loops
<-
true
;
set_c_options
opt
))
[
"inline loops (that come from array iterators)"
]
;
mkopt
opt
~
doc_level
:
Advanced
[
"-2cgc"
;
"--2c-global-ctx"
]
(
Arg
.
Unit
(
fun
i
->
global_opt
.
soc2c_global_ctx
<-
true
;
opt
.
gen_c
<-
true
))
(
Arg
.
Unit
(
fun
i
->
global_opt
.
soc2c_global_ctx
<-
true
;
set_c_options
opt
))
[
"node context allocated as global variable (no
\"
new_ctx
\"
method)"
]
;
...
...
@@ -454,24 +459,26 @@ let mkoptab (opt:t) : unit = (
mkopt
opt
~
doc_level
:
Advanced
[
"-2cw7"
;
"--2c-wcet"
]
(
Arg
.
Unit
(
fun
i
->
opt
.
gen_c
<-
true
;
opt
.
gen_wcet
<-
true
;
global_opt
.
soc2c_global_ctx
<-
true
))
(
Arg
.
Unit
(
fun
i
->
set_c_options
opt
;
opt
.
gen_wcet
<-
true
;
global_opt
.
soc2c_global_ctx
<-
true
))
[
"generates a main file for computing the wcet (force -2c -2cgc)"
]
;
mkopt
opt
~
doc_level
:
Dev
[
"-2cs"
;
"--2c-stack"
]
(
Arg
.
Unit
(
fun
i
->
opt
.
gen_c
<-
true
;
global_opt
.
io_transmit_mode
<-
Stack
))
(
Arg
.
Unit
(
fun
i
->
set_c_options
opt
;
global_opt
.
io_transmit_mode
<-
Stack
))
[
"Soc I/O are transmitted as params of the step functions (force -2c)"
]
;
mkopt
opt
~
doc_level
:
Dev
[
"-2ch"
;
"--2c-heap"
]
(
Arg
.
Unit
(
fun
i
->
opt
.
gen_c
<-
true
;
global_opt
.
io_transmit_mode
<-
Heap
))
(
Arg
.
Unit
(
fun
i
->
set_c_options
opt
;
global_opt
.
io_transmit_mode
<-
Heap
))
[
"Soc I/O are transmitted via a ctx structure in the heap (force -2c)"
]
;
mkopt
opt
~
doc_level
:
Dev
[
"-2chs"
;
"--2c-heap-and-stack"
]
(
Arg
.
Unit
(
fun
i
->
opt
.
gen_c
<-
true
;
global_opt
.
io_transmit_mode
<-
HeapStack
))
(
Arg
.
Unit
(
fun
i
->
set_c_options
opt
;
global_opt
.
io_transmit_mode
<-
HeapStack
))
[
"I/O of memoryless soc are transmitted via the stack, and the heap otherwise (force -2c)"
]
;
...
...
This diff is collapsed.
Click to expand it.
src/lv6version.ml
+
2
−
2
View file @
dc44269b
(** Automatically generated from Makefile *)
let
tool
=
"lus2lic"
let
branch
=
"master"
let
commit
=
"66
0
"
let
sha_1
=
"
9c822b3b5e15c279cb863183108cc3a9598abae4
"
let
commit
=
"66
1
"
let
sha_1
=
"
4508ea9fa98a3e651c3c3039d1525255d50ef17b
"
let
str
=
(
branch
^
"."
^
commit
^
" ("
^
sha_1
^
")"
)
let
maintainer
=
"jahier@imag.fr"
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