diff --git a/lib/lv6MainArgs.ml b/lib/lv6MainArgs.ml index f052ffc91c316b2a5e27de1660db0cc9e538da35..98d6f0076b72e107c5e512d3b7fc840f53c4e984 100644 --- a/lib/lv6MainArgs.ml +++ b/lib/lv6MainArgs.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 12/05/2022 (at 09:55) by Erwan Jahier> *) +(* Time-stamp: <modified the 28/06/2022 (at 16:31) by Erwan Jahier> *) (* Le manager d'argument adapté de celui de lutin, plus joli N.B. solution un peu batarde : les options sont stockées, comme avant, dans Global, @@ -70,6 +70,7 @@ type global_opt = { mutable soc2c_inline_loops : bool; mutable soc2c_global_ctx : bool; mutable soc2c_dro : bool; + mutable multi_core : bool; mutable gen_wcet : bool; mutable io_transmit_mode : io_transmit_mode; mutable schedul_mode : schedul_mode; @@ -98,6 +99,7 @@ let (global_opt:global_opt) = soc2c_inline_loops = false; soc2c_global_ctx = false; soc2c_dro = false; + multi_core = false; gen_wcet = false; io_transmit_mode = Stack; schedul_mode = Simple; @@ -525,6 +527,13 @@ let mkoptab (opt:t) : unit = ( global_opt.soc2c_global_ctx <- true)) ["Generate a main file for computing the wcet (force -2c -2cgc)"] ; + mkopt opt ~doc_level:Advanced + ["-2cmc";"--2c-multi-core"] + (Arg.Unit (fun () -> + set_c_options opt; + global_opt.multi_core <- true;)) + ["Generate a yaml file required for multi-core code generation"] + ; mkopt opt ~doc_level:Dev ["-2cs";"--2c-stack"] diff --git a/lib/lv6MainArgs.mli b/lib/lv6MainArgs.mli index 854dc36bbe55dcdd62f4f5b962e230f9d8f6f790..d153f089426a68e8586ad9301df3d7697a8abac8 100644 --- a/lib/lv6MainArgs.mli +++ b/lib/lv6MainArgs.mli @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 12/05/2022 (at 09:53) by Erwan Jahier> *) +(* Time-stamp: <modified the 28/06/2022 (at 16:31) by Erwan Jahier> *) type enum_mode = AsInt (* translate enums into int (for rif-friendlyness *) @@ -75,6 +75,7 @@ type global_opt = { mutable soc2c_inline_loops : bool; mutable soc2c_global_ctx : bool; mutable soc2c_dro : bool; + mutable multi_core : bool; mutable gen_wcet : bool; mutable io_transmit_mode : io_transmit_mode; mutable schedul_mode : schedul_mode; diff --git a/lib/soc2c.ml b/lib/soc2c.ml index 9befee2b53d14a5aac271bb3205821f0b8d7c1ee..4b9b6c411b547f67265a209f1a220e2a683dba53 100644 --- a/lib/soc2c.ml +++ b/lib/soc2c.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 20/06/2022 (at 17:49) by Erwan Jahier> *) +(* Time-stamp: <modified the 28/06/2022 (at 16:51) by Erwan Jahier> *) (* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *) @@ -1037,7 +1037,9 @@ typedef float _float; try Lv6util.entete occ "/*" "*/" ; if Lv6MainArgs.global_opt.Lv6MainArgs.soc2c_dro then () else - if Lv6MainArgs.global_opt.Lv6MainArgs.gen_wcet then ( + if Lv6MainArgs.global_opt.Lv6MainArgs.multi_core then ( + Soc2yaml.f msoc stbl base + ) else if Lv6MainArgs.global_opt.Lv6MainArgs.gen_wcet then ( gen_loop_file4ogensim main_soc base ocl stbl; gen_main_wcet_file main_soc base stbl ) diff --git a/lib/soc2yaml.ml b/lib/soc2yaml.ml new file mode 100644 index 0000000000000000000000000000000000000000..a0ce65df806acdc40e1cbdeb08677a88eb8d05bb --- /dev/null +++ b/lib/soc2yaml.ml @@ -0,0 +1,7 @@ +(* Time-stamp: <modified the 28/06/2022 (at 16:52) by Erwan Jahier> *) + + +let (f : Soc.key -> Soc.tbl -> string -> unit) = fun _soc _stbl basename -> + Printf.printf "%s.yaml file created\n%! " basename + + diff --git a/lib/soc2yaml.mli b/lib/soc2yaml.mli new file mode 100644 index 0000000000000000000000000000000000000000..99cb25a8bac6b862dd1c25d6a2775d14c3fd43ea --- /dev/null +++ b/lib/soc2yaml.mli @@ -0,0 +1,4 @@ + + + +val f : Soc.key -> Soc.tbl -> string -> unit