Project

General

Profile

Revision bd1f1929

View differences:

src/backends/VHDL/mini_vhdl_ast.ml
41 41
      label: vhdl_name_t option;
42 42
      name: vhdl_name_t;
43 43
      assocs: vhdl_assoc_element_t list }
44
  | MiniWait
44
  | MiniWait of { 
45
      sensitivity: vhdl_name_t list }
45 46
  | MiniNull of {
46 47
      label: vhdl_name_t option}
47 48
  | MiniReturn of {
......
140 141
    packages: mini_vhdl_package_t list;
141 142
  }
142 143
(*[@@deriving show { with_path = false }]*)
143
[@@deriving visitors { variety = "iter"; name = "mini_vhdl_iter"; ancestors = ["vhdl_iter"]; polymorphic = true }]
144
[@@deriving visitors { variety = "iter"; name = "mini_vhdl_iter"; ancestors = ["vhdl_iter"]; polymorphic = true },
145
            visitors { variety = "map"; name = "mini_vhdl_map"; ancestors = ["vhdl_map"]; polymorphic = true }];;
src/backends/VHDL/mini_vhdl_ast_pp.ml
264 264
                          ((__29 ()) fmt) x;
265 265
                          true) false x))) aassocs;
266 266
               Format.fprintf fmt "@])");
267
        | MiniWait  -> Format.pp_print_string fmt "wait"
267
        | MiniWait { sensitivity = sensit_list } -> 
268
            Format.pp_print_string fmt "wait";
269
            (match sensit_list with
270
            | [] -> ();
271
            | _ ->
272
               Format.fprintf fmt "(@[<v>";
273
               ((fun x  ->
274
                ignore
275
                  (List.fold_left
276
                     (fun sep  ->
277
                        fun x  ->
278
                          if sep then Format.fprintf fmt ",@ ";
279
                          ((__28 ()) fmt) x;
280
                          true) false x))) sensit_list;
281
               Format.fprintf fmt "@])");
268 282
        | MiniNull { label = alabel } ->
269 283
            (match alabel with
270 284
              | None -> ();
src/backends/VHDL/vhdl_2_mini_vhdl_map.ml
646 646
            let assocs = self#list self#vhdl_assoc_element_t assocs  in
647 647
            (* TODO: get procedure declaration and map assoc_elements *)
648 648
            MiniProcedureCall { label; name; assocs }
649
        | Wait  -> MiniWait
649
        | Wait { sensitivity } -> MiniWait { sensitivity }
650 650
        | Null { label } ->
651 651
            let label = self#option self#lower_vhdl_name_t label in
652 652
            MiniNull { label }
src/backends/VHDL/vhdl_ast.ml
162 162
  | Exit of { label: vhdl_name_t option [@yojson.default None]; loop_label: string option [@yojson.default Some ""]; condition: vhdl_expr_t option [@yojson.default Some IsNull]} [@yojson.name "EXIT_STATEMENT"]
163 163
  | Assert of { label: vhdl_name_t option [@yojson.default None]; cond: vhdl_expr_t; report: vhdl_expr_t [@yojson.default IsNull]; severity: vhdl_expr_t [@yojson.default IsNull]} [@yojson.name "ASSERTION_STATEMENT"]
164 164
  | ProcedureCall of { label: vhdl_name_t option [@yojson.default None]; name: vhdl_name_t; assocs: vhdl_assoc_element_t list [@yojson.default []] } [@yojson.name "PROCEDURE_CALL_STATEMENT"]
165
  | Wait [@yojson.name "WAIT_STATEMENT"]
165
  | Wait of { sensitivity: vhdl_name_t list [@yojson.default []] } [@yojson.name "WAIT_STATEMENT"]
166 166
  | Null of { label: vhdl_name_t option [@yojson.default None]} [@yojson.name "NULL_STATEMENT"]
167 167
  | Return of { label: vhdl_name_t option [@yojson.default None]; expr: vhdl_expr_t option [@yojson.default None]} [@yojson.name "RETURN_STATEMENT"]
168 168
and vhdl_if_case_t = 
src/backends/VHDL/vhdl_ast_fold_sensitivity.ml
277 277
              let acc = self#vhdl_name_t name acc  in
278 278
              let acc = self#list self#vhdl_assoc_element_t assocs acc  in
279 279
              acc
280
          | Wait  -> acc
280
          | Wait { sensitivity } -> sensitivity@acc
281 281
          | Null { label } -> acc
282 282
          | Return { label; expr } ->
283 283
              let acc = self#option self#vhdl_expr_t expr acc  in acc
src/backends/VHDL/vhdl_ast_pp.ml
1035 1035
                          ((__20 ()) fmt) x;
1036 1036
                          true) false x))) aassocs;
1037 1037
               Format.fprintf fmt "@])");
1038
        | Wait  -> Format.pp_print_string fmt "wait"
1038
        | Wait { sensitivity = sensit_list } -> 
1039
            Format.pp_print_string fmt "wait";
1040
            (match sensit_list with
1041
            | [] -> ();
1042
            | _ ->
1043
               Format.fprintf fmt "(@[<v>";
1044
               ((fun x  ->
1045
                ignore
1046
                  (List.fold_left
1047
                     (fun sep  ->
1048
                        fun x  ->
1049
                          if sep then Format.fprintf fmt ",@ ";
1050
                          ((__19 ()) fmt) x;
1051
                          true) false x))) sensit_list;
1052
               Format.fprintf fmt "@])");
1039 1053
        | Null { label = alabel } ->
1040 1054
            (match alabel with
1041 1055
              | None -> ();

Also available in: Unified diff