Fixed problem in clocking

Tuple of consts should have one clock var per 
element. Added a new function const_skeleton to
create this kind of clock.
This commit is contained in:
Cédric Pasteur 2010-07-26 15:34:46 +02:00
parent aa61865b9e
commit e3676d1e3c
3 changed files with 6 additions and 3 deletions

View File

@ -95,6 +95,10 @@ let rec skeleton ck = function
| Tprod ty_list -> Cprod (List.map (skeleton ck) ty_list)
| Tarray _ | Tid _ -> Ck ck
let rec const_skeleton se = match se.se_desc with
| Stuple se_list -> Cprod (List.map const_skeleton se_list)
| _ -> Ck (new_var ())
let ckofct = function | Ck ck -> ck_repr ck | Cprod ct_list -> Cbase

View File

@ -31,12 +31,11 @@ let err_message exp = function
raise Error
let typ_of_name h x = Env.find x h
let rec typing h e =
let ct = match e.e_desc with
| Econst se -> skeleton (new_var ()) se.se_ty
| Econst se -> const_skeleton se
| Evar x -> Ck (typ_of_name h x)
| Efby (c, e) -> typing h e
| Eapp({a_op = op}, args, r) ->

View File

@ -11,7 +11,7 @@ open Compiler_utils
let compile pp p =
(* Clocking *)
(*let p = do_silent_pass Clocking.program "Clocking" p true in*)
let p = do_silent_pass Clocking.program "Clocking" p true in
(* Check that the dataflow code is well initialized *)
(*let p = do_silent_pass Init.program "Initialization check" p !init in *)