-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.ml
60 lines (55 loc) · 2.43 KB
/
options.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
(* ----------------------------------------------------------------------------
* SchedMCore - A MultiCore Scheduling Framework
* Copyright (C) 2012, ONERA, Toulouse, FRANCE
*
* This file is part of Interlude
*
* Interlude is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Prelude is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*---------------------------------------------------------------------------- *)
open Printf
let version = "0.1"
let outname = ref "main"
let outdir = ref ""
let inname = ref ""
let cores = ref 48
let tile_cores = ref 2
let mpb_size = ref 16384
let cache_size = ref 262144
let cont = ref 18
let verbose = ref false
let hypers = ref 1
let addoff = ref 0
let options =
[ "-out", Arg.Set_string outname, " Specifies the name for output files";
"-d", Arg.Set_string outdir, " Specifies the directory for output files";
"-hypers", Arg.Set_int hypers, " Number of hyper periods to schedule (default: 1)";
"-addoff", Arg.Set_int addoff, " Additional hyperperiods at start of schedule (default: 0)";
"-maxcont", Arg.Set_int cont, " Maximum allowed contention (default: 18)";
"-cores", Arg.Set_int cores, " Number of cores (default: 48)";
"-tilecores", Arg.Set_int tile_cores, " Number of cores per tile (default: 2)";
"-mpbsize", Arg.Set_int mpb_size, " Number of bytes per message passing buffer (default: 16384)";
"-cachesize", Arg.Set_int cache_size, " Cache size in bytes (default: 262144)";
"-verbose", Arg.Set verbose, " Output detailed messages about what the compiler is doing";
"-version", Arg.Unit (fun () -> print_endline (Sys.argv.(0) ^ " " ^ version); exit 0), " Display the version" ]
let usage = Sys.argv.(0) ^ " <options> [<file>]"
let parse =
Arg.parse options
(fun x ->
if !inname = "" then
inname := x
else
raise (Arg.Bad "Cannot handle more than one input file"))
usage