Project

General

Profile

Download (65.9 KB) Statistics
| Branch: | Tag: | Revision:
1
open Vhdl_ast
2

    
3
let rec (pp_vhdl_cst_val_t :
4
          Format.formatter -> vhdl_cst_val_t -> Ppx_deriving_runtime.unit)
5
  =
6
  ((let open! Ppx_deriving_runtime in
7
      fun fmt  ->
8
        function
9
        | CstInt a0 ->
10
             (Format.fprintf fmt "%d") a0;
11
        | CstStdLogic a0 ->
12
             (Format.fprintf fmt "%S") a0;
13
        | CstLiteral a0 ->
14
             (Format.fprintf fmt "%s") a0;)
15
  [@ocaml.warning "-A"])
16

    
17
and show_vhdl_cst_val_t : vhdl_cst_val_t -> Ppx_deriving_runtime.string =
18
  fun x  -> Format.asprintf "%a" pp_vhdl_cst_val_t x
19

    
20
let rec pp_vhdl_type_t :
21
  Format.formatter -> vhdl_type_t -> Ppx_deriving_runtime.unit =
22
  let __4 () = pp_vhdl_name_t
23
  
24
  and __3 () = pp_vhdl_element_declaration_t
25
  
26
  and __2 () = pp_vhdl_subtype_indication_t
27
  
28
  and __1 () = pp_vhdl_constraint_t
29
  
30
  and __0 () = pp_vhdl_name_t
31
in
32
  ((let open! Ppx_deriving_runtime in
33
      fun fmt  ->
34
        function
35
        | Base a0 ->
36
             (Format.fprintf fmt "%s") a0;
37
        | Range (a0,a1,a2) ->
38
             ((
39
               (Format.fprintf fmt "%d") a1);
40
               ((function
41
                 | None  -> Format.pp_print_string fmt ""
42
                 | Some x ->
43
                      (Format.fprintf fmt "%s") x;
44
                      )) a0;
45
              (Format.fprintf fmt "%d") a2);
46
        | Bit_vector (a0,a1) ->
47
             (Format.fprintf fmt "array (%d,%d) of bit") a0 a1;
48
        | Array
49
            { indexes = aindexes; const = aconst; definition = adefinition }
50
            ->
51
            Format.fprintf fmt "array";
52
            (match aindexes with
53
            | [] -> Format.fprintf fmt "";
54
            | _ ->
55
              Format.fprintf fmt "(@[<v>";
56
              ((fun x  ->
57
                ignore
58
                (List.fold_left
59
                  (fun sep  ->
60
                    fun x  ->
61
                      if sep then Format.fprintf fmt ",@ ";
62
                      ((__0 ()) fmt) x;
63
                      Format.fprintf fmt " range <>";
64
                      true) false x)) aindexes);
65
              Format.fprintf fmt ")@]");
66
            (function
67
              | None  -> Format.pp_print_string fmt ""
68
              | Some x ->
69
                ((__1 ()) fmt) x) aconst;
70
            Format.fprintf fmt " of ";
71
            ((__2 ()) fmt) adefinition;
72
        | Record a0 ->
73
            Format.fprintf fmt "@[<v 2>record@;";
74
            (fun x  ->
75
              ignore
76
                (List.fold_left
77
                  (fun sep  ->
78
                    fun x  ->
79
                      if sep then ();
80
                        ((__3 ()) fmt) x;
81
                        Format.fprintf fmt ";@;";
82
                        true) false x);
83
              Format.fprintf fmt "@]end record") a0;
84
        | Enumerated a0 ->
85
            (Format.fprintf fmt "(";
86
            ((fun x  ->
87
              ignore
88
              (List.fold_left
89
                (fun sep  ->
90
                  fun x  ->
91
                    if sep then Format.fprintf fmt ",@ ";
92
                      ((__4 ()) fmt) x;
93
                    true) false x))) a0;
94
             Format.fprintf fmt ")");
95
        | Void  -> Format.pp_print_string fmt "")
96
    [@ocaml.warning "-A"])
97

    
98
and show_vhdl_type_t : vhdl_type_t -> Ppx_deriving_runtime.string =
99
  fun x  -> Format.asprintf "%a" pp_vhdl_type_t x
100

    
101
and pp_vhdl_element_declaration_t :
102
  Format.formatter -> vhdl_element_declaration_t -> Ppx_deriving_runtime.unit
103
  =
104
  let __1 () = pp_vhdl_subtype_indication_t
105
  
106
  and __0 () = pp_vhdl_name_t
107
   in
108
  ((let open! Ppx_deriving_runtime in
109
      fun fmt  ->
110
        fun x  ->
111
            (fun x  ->
112
                ignore
113
                  (List.fold_left
114
                     (fun sep  ->
115
                        fun x  ->
116
                          if sep then Format.fprintf fmt ", ";
117
                          ((__0 ()) fmt) x;
118
                          true) false x)) x.ed_names;
119
           Format.fprintf fmt ": ";
120
           ((__1 ()) fmt) x.definition)
121
    [@ocaml.warning "-A"])
122

    
123
and show_vhdl_element_declaration_t :
124
  vhdl_element_declaration_t -> Ppx_deriving_runtime.string =
125
  fun x  -> Format.asprintf "%a" pp_vhdl_element_declaration_t x
126

    
127
and pp_vhdl_subtype_indication_t :
128
  Format.formatter -> vhdl_subtype_indication_t -> Ppx_deriving_runtime.unit
129
  =
130
  let __2 () = pp_vhdl_constraint_t
131
  
132
  and __1 () = pp_vhdl_name_t
133
  
134
  and __0 () = pp_vhdl_name_t
135
   in
136
  ((let open! Ppx_deriving_runtime in
137
      fun fmt  ->
138
        fun x  ->
139
          ((__0 ()) fmt) x.si_name;
140
          ((__1 ()) fmt) x.functionName;
141
          (match x.const with
142
            | NoConstraint -> Format.fprintf fmt "";
143
            | _ -> Format.fprintf fmt " ";
144
                   ((__2 ()) fmt) x.const))
145
    [@ocaml.warning "-A"])
146

    
147
and show_vhdl_subtype_indication_t :
148
  vhdl_subtype_indication_t -> Ppx_deriving_runtime.string =
149
  fun x  -> Format.asprintf "%a" pp_vhdl_subtype_indication_t x
150

    
151
and pp_vhdl_discrete_range_t :
152
  Format.formatter -> vhdl_discrete_range_t -> Ppx_deriving_runtime.unit =
153
  let __3 () = pp_vhdl_expr_t
154
  
155
  and __2 () = pp_vhdl_expr_t
156
  
157
  and __1 () = pp_vhdl_name_t
158
  
159
  and __0 () = pp_vhdl_subtype_indication_t
160
   in
161
  ((let open! Ppx_deriving_runtime in
162
      fun fmt  ->
163
        function
164
        | SubDiscreteRange a0 ->
165
             ((__0 ()) fmt) a0;
166
        | NamedRange a0 ->
167
             ((__1 ()) fmt) a0;
168
        | DirectedRange { direction = adirection; from = afrom; _to = a_to }
169
            ->
170
               ((__2 ()) fmt) afrom;
171
               (Format.fprintf fmt " %s ") adirection;
172
               ((__3 ()) fmt) a_to;
173
    )
174
    [@ocaml.warning "-A"])
175

    
176
and show_vhdl_discrete_range_t :
177
  vhdl_discrete_range_t -> Ppx_deriving_runtime.string =
178
  fun x  -> Format.asprintf "%a" pp_vhdl_discrete_range_t x
179

    
180
(* TODO Adapt for: ArrayConstraint, RecordConstraint *)
181
and pp_vhdl_constraint_t :
182
  Format.formatter -> vhdl_constraint_t -> Ppx_deriving_runtime.unit =
183
  let __4 () = pp_vhdl_constraint_t
184
  
185
  and __3 () = pp_vhdl_discrete_range_t
186
  
187
  and __2 () = pp_vhdl_discrete_range_t
188
  
189
  and __1 () = pp_vhdl_discrete_range_t
190
  
191
  and __0 () = pp_vhdl_name_t
192
   in
193
  ((let open! Ppx_deriving_runtime in
194
      fun fmt  ->
195
        function
196
        | RefConstraint { ref_name = aref_name } ->
197
             (Format.fprintf fmt "(";
198
              ((__0 ()) fmt) aref_name;
199
              Format.fprintf fmt ")");
200
        | RangeConstraint { range = arange } ->
201
             (Format.fprintf fmt "(";
202
              ((__1 ()) fmt) arange;
203
              Format.fprintf fmt ")");
204
        | IndexConstraint { ranges = aranges } ->
205
            Format.fprintf fmt "(";
206
            ((fun x  ->
207
                ignore
208
                  (List.fold_left
209
                     (fun sep  ->
210
                        fun x  ->
211
                          if sep then Format.fprintf fmt ", ";
212
                          ((__2 ()) fmt) x;
213
                          true) false x))) aranges;
214
            Format.fprintf fmt ")";
215
        | ArrayConstraint { ranges = aranges; sub = asub } ->
216
            (Format.fprintf fmt "@[<2>ArrayConstraint {@,";
217
             ((Format.fprintf fmt "@[%s =@ " "ranges";
218
               ((fun x  ->
219
                   Format.fprintf fmt "@[<2>[";
220
                   ignore
221
                     (List.fold_left
222
                        (fun sep  ->
223
                           fun x  ->
224
                             if sep then Format.fprintf fmt ";@ ";
225
                             ((__3 ()) fmt) x;
226
                             true) false x);
227
                   Format.fprintf fmt "@,]@]")) aranges;
228
               Format.fprintf fmt "@]");
229
              Format.fprintf fmt ";@ ";
230
              Format.fprintf fmt "@[%s =@ " "sub";
231
              ((__4 ()) fmt) asub;
232
              Format.fprintf fmt "@]");
233
             Format.fprintf fmt "@]}")
234
        | RecordConstraint  -> Format.pp_print_string fmt ""
235
        | NoConstraint  -> Format.pp_print_string fmt "")
236
    [@ocaml.warning "-A"])
237

    
238
and show_vhdl_constraint_t : vhdl_constraint_t -> Ppx_deriving_runtime.string
239
  = fun x  -> Format.asprintf "%a" pp_vhdl_constraint_t x
240

    
241
and pp_vhdl_definition_t :
242
  Format.formatter -> vhdl_definition_t -> Ppx_deriving_runtime.unit =
243
  let __3 () = pp_vhdl_subtype_indication_t
244
  
245
  and __2 () = pp_vhdl_name_t
246
  
247
  and __1 () = pp_vhdl_type_t
248
  
249
  and __0 () = pp_vhdl_name_t
250
   in
251
  ((let open! Ppx_deriving_runtime in
252
      fun fmt  ->
253
        function
254
        | Type { name = aname; definition = adefinition } ->
255
            Format.fprintf fmt "type ";
256
            ((__0 ()) fmt) aname;
257
            Format.fprintf fmt " is ";
258
            ((__1 ()) fmt) adefinition;
259
        | Subtype { name = aname; typ = atyp } ->
260
            Format.fprintf fmt "subtype ";
261
            ((__2 ()) fmt) aname;
262
            Format.fprintf fmt " is ";
263
            ((__3 ()) fmt) atyp;
264
   )
265
    [@ocaml.warning "-A"])
266

    
267
and show_vhdl_definition_t : vhdl_definition_t -> Ppx_deriving_runtime.string
268
  = fun x  -> Format.asprintf "%a" pp_vhdl_definition_t x
269

    
270
(* TODO adapt for Op (more than 2 operand), Time, Sig, suffixMod *)
271
and pp_vhdl_expr_t :
272
  Format.formatter -> vhdl_expr_t -> Ppx_deriving_runtime.unit =
273
  let __11 () = pp_vhdl_expr_t
274
  
275
  and __10 () = pp_vhdl_element_assoc_t
276
  
277
  and __9 () = pp_vhdl_name_t
278
  
279
  and __8 () = pp_vhdl_element_assoc_t
280
  
281
  and __7 () = pp_vhdl_suffix_selection_t
282
  
283
  and __6 () = pp_vhdl_expr_t
284
  
285
  and __5 () = pp_vhdl_signal_attributes_t
286
  
287
  and __4 () = pp_vhdl_name_t
288
  
289
  and __3 () = pp_vhdl_expr_t
290
  
291
  and __2 () = pp_vhdl_name_t
292
  
293
  and __1 () = pp_vhdl_cst_val_t
294
  
295
  and __0 () = pp_vhdl_name_t
296
   in
297
  ((let open! Ppx_deriving_runtime in
298
      fun fmt  ->
299
        function
300
        | Call a0 ->
301
             ((__0 ()) fmt) a0;
302
        | Cst { value = avalue; unit_name = aunit_name } ->
303
             ((__1 ()) fmt) avalue;
304
             (function
305
                | None  -> Format.pp_print_string fmt ""
306
                | Some x ->
307
                    Format.fprintf fmt " ";
308
                    ((__2 ()) fmt) x) aunit_name;
309
        | Op { id = aid; args = aargs } ->
310
            (match aargs with
311
            | [] -> (Format.fprintf fmt "%s") aid;
312
            | hd::[] ->
313
               (Format.fprintf fmt "%s ") aid;
314
               ((__3 ()) fmt) hd
315
            | hd::(hd2::[]) ->
316
               Format.fprintf fmt "(";
317
               ((__3 ()) fmt) hd;
318
               (Format.fprintf fmt " %s ") aid;
319
               ((__3 ()) fmt) hd2;
320
               Format.fprintf fmt ")"
321
            | _ ->
322
            (Format.fprintf fmt "@[<2>Op {@,";
323
             ((Format.fprintf fmt "@[%s =@ " "id";
324
               (Format.fprintf fmt "%S") aid;
325
               Format.fprintf fmt "@]");
326
              Format.fprintf fmt ";@ ";
327
              Format.fprintf fmt "@[%s =@ " "args";
328
              ((fun x  ->
329
                  Format.fprintf fmt "@[<2>[";
330
                  ignore
331
                    (List.fold_left
332
                       (fun sep  ->
333
                          fun x  ->
334
                            if sep then Format.fprintf fmt ";@ ";
335
                            ((__3 ()) fmt) x;
336
                            true) false x);
337
                  Format.fprintf fmt "@,]@]")) aargs;
338
              Format.fprintf fmt "@]");
339
             Format.fprintf fmt "@]}"))
340
        | IsNull  -> Format.pp_print_string fmt ""
341
        | Time { value = avalue; phy_unit = aphy_unit } ->
342
            (Format.fprintf fmt "@[<2>Time {@,";
343
             ((Format.fprintf fmt "@[%s =@ " "value";
344
               (Format.fprintf fmt "%d") avalue;
345
               Format.fprintf fmt "@]");
346
              Format.fprintf fmt ";@ ";
347
              Format.fprintf fmt "@[%s =@ " "phy_unit";
348
              (Format.fprintf fmt "%S") aphy_unit;
349
              Format.fprintf fmt "@]");
350
             Format.fprintf fmt "@]}")
351
        | Sig { name = aname; att = aatt } ->
352
            (Format.fprintf fmt "--@[<2>Sig {@,";
353
             ((Format.fprintf fmt "@[%s =@ " "name";
354
               ((__4 ()) fmt) aname;
355
               Format.fprintf fmt "@]");
356
              Format.fprintf fmt ";@ ";
357
              Format.fprintf fmt "@[%s =@ " "att";
358
              ((function
359
                | None  -> Format.pp_print_string fmt "None"
360
                | Some x ->
361
                    (Format.pp_print_string fmt "(Some ";
362
                     ((__5 ()) fmt) x;
363
                     Format.pp_print_string fmt ")"))) aatt;
364
              Format.fprintf fmt "@]");
365
             Format.fprintf fmt "@]}")
366
        | SuffixMod { expr = aexpr; selection = aselection } ->
367
            (Format.fprintf fmt "--@[<2>SuffixMod {@,";
368
             ((Format.fprintf fmt "@[%s =@ " "expr";
369
               ((__6 ()) fmt) aexpr;
370
               Format.fprintf fmt "@]");
371
              Format.fprintf fmt ";@ ";
372
              Format.fprintf fmt "@[%s =@ " "selection";
373
              ((__7 ()) fmt) aselection;
374
              Format.fprintf fmt "@]");
375
             Format.fprintf fmt "@]}")
376
        | Aggregate { elems = aelems } ->
377
            (match aelems with
378
            | [] -> Format.fprintf fmt "";
379
            | _ ->
380
              (Format.fprintf fmt "(@[";
381
              ((fun x  ->
382
                  ignore
383
                    (List.fold_left
384
                       (fun sep  ->
385
                          fun x  ->
386
                            if sep then Format.fprintf fmt ", ";
387
                            ((__8 ()) fmt) x;
388
                            true) false x))) aelems;
389
              Format.fprintf fmt ")@]");)
390
        | QualifiedExpression
391
            { type_mark = atype_mark; aggregate = aaggregate;
392
              expression = aexpression }
393
            ->
394
              ((__9 ()) fmt) atype_mark;
395
              Format.fprintf fmt "'";
396
              (match aaggregate with
397
              | [] -> Format.fprintf fmt "";
398
              | _ -> 
399
                Format.fprintf fmt "(@[<v>";
400
                ((fun x  ->
401
                   ignore
402
                     (List.fold_left
403
                        (fun sep  ->
404
                           fun x  ->
405
                             if sep then Format.fprintf fmt ",@ ";
406
                             ((__10 ()) fmt) x;
407
                             true) false x))) aaggregate;
408
              Format.fprintf fmt ")@]");
409
              (match aexpression with
410
              | None  -> Format.pp_print_string fmt ""
411
              | Some x ->
412
                  Format.fprintf fmt "(@[<v>";
413
                  ((__11 ()) fmt) x;
414
                  Format.fprintf fmt ")@]");
415
        | Others  -> Format.pp_print_string fmt "others")
416
    [@ocaml.warning "-A"])
417

    
418
and show_vhdl_expr_t : vhdl_expr_t -> Ppx_deriving_runtime.string =
419
  fun x  -> Format.asprintf "%a" pp_vhdl_expr_t x
420

    
421
and pp_vhdl_name_t :
422
  Format.formatter -> vhdl_name_t -> Ppx_deriving_runtime.unit =
423
  let __9 () = pp_vhdl_assoc_element_t
424
  
425
  and __8 () = pp_vhdl_name_t
426
  
427
  and __7 () = pp_vhdl_expr_t
428
  
429
  and __6 () = pp_vhdl_name_t
430
  
431
  and __5 () = pp_vhdl_name_t
432
  
433
  and __4 () = pp_vhdl_discrete_range_t
434
  
435
  and __3 () = pp_vhdl_name_t
436
  
437
  and __2 () = pp_vhdl_expr_t
438
  
439
  and __1 () = pp_vhdl_name_t
440
  
441
  and __0 () = pp_vhdl_name_t
442
   in
443
  ((let open! Ppx_deriving_runtime in
444
      fun fmt  ->
445
        function
446
        | Simple a0 ->
447
             (Format.fprintf fmt "%s") a0;
448
        | Identifier a0 ->
449
             (Format.fprintf fmt "%s") a0;
450
        | Selected a0 ->
451
             ((fun x  ->
452
                 ignore
453
                   (List.fold_left
454
                      (fun sep  ->
455
                         fun x  ->
456
                           if sep then Format.fprintf fmt ".";
457
                           ((__0 ()) fmt) x;
458
                           true) false x);) a0;)
459
        | Index { id = aid; exprs = aexprs } ->
460
            ((__1 ()) fmt) aid;
461
            Format.fprintf fmt "(";
462
            (fun x  ->
463
                ignore
464
                (List.fold_left
465
                  (fun sep  ->
466
                    fun x  ->
467
                      if sep then Format.fprintf fmt ",@ ";
468
                                  ((__2 ()) fmt) x;
469
                                  true
470
                  ) false x);
471
            ) aexprs;
472
            Format.fprintf fmt ")";
473
        | Slice { id = aid; range = arange } ->
474
              ((__3 ()) fmt) aid;
475
              Format.fprintf fmt "(";
476
              ((__4 ()) fmt) arange;
477
              Format.fprintf fmt ")";
478
        | Attribute { id = aid; designator = adesignator; expr = aexpr } ->
479
              ((__5 ()) fmt) aid;
480
              Format.fprintf fmt "\'";
481
              ((__6 ()) fmt) adesignator;
482
              (match aexpr with
483
              | IsNull -> Format.fprintf fmt "";
484
              | _ ->
485
                Format.fprintf fmt "(";
486
                ((__7 ()) fmt) aexpr;
487
                Format.fprintf fmt ")")
488
        | Function { id = aid; assoc_list = aassoc_list } ->
489
            (((__8 ()) fmt) aid;
490
            Format.fprintf fmt "(";
491
            ((fun x  ->
492
              Format.fprintf fmt "@[";
493
              ignore
494
                (List.fold_left
495
                   (fun sep  ->
496
                      fun x  ->
497
                        if sep then Format.fprintf fmt ",@ ";
498
                        ((__9 ()) fmt) x;
499
                        true) false x);
500
            Format.fprintf fmt "@]")) aassoc_list;
501
            Format.fprintf fmt ")";)
502
        | Open -> Format.pp_print_string fmt "open"
503
        | NoName  -> Format.pp_print_string fmt "")
504
    [@ocaml.warning "-A"])
505

    
506
and show_vhdl_name_t : vhdl_name_t -> Ppx_deriving_runtime.string =
507
  fun x  -> Format.asprintf "%a" pp_vhdl_name_t x
508

    
509
and pp_vhdl_assoc_element_t :
510
  Format.formatter -> vhdl_assoc_element_t -> Ppx_deriving_runtime.unit =
511
  let __4 () = pp_vhdl_expr_t
512
  
513
  and __3 () = pp_vhdl_name_t
514
  
515
  and __2 () = pp_vhdl_name_t
516
  
517
  and __1 () = pp_vhdl_name_t
518
  
519
  and __0 () = pp_vhdl_name_t
520
   in
521
  ((let open! Ppx_deriving_runtime in
522
      fun fmt  ->
523
        fun x  ->
524
          (match x.formal_name with
525
          | None -> Format.pp_print_string fmt ""
526
          | Some NoName -> Format.pp_print_string fmt ""
527
          | Some a -> 
528
              (((__0 ()) fmt) a;
529
              (match x.formal_arg with
530
              | None -> Format.pp_print_string fmt ""
531
              | Some b -> ((__1 ()) fmt) b);
532
              Format.fprintf fmt " => "));
533
          (match x.actual_name with
534
          | None -> 
535
              ((match x.actual_designator with
536
              | None -> Format.pp_print_string fmt ""
537
              | Some NoName -> Format.pp_print_string fmt ""
538
              | Some b -> ((__3 ()) fmt) b);
539
              (match x.actual_expr with
540
              | None -> Format.pp_print_string fmt ""
541
              | Some IsNull -> Format.pp_print_string fmt ""
542
              | Some c -> ((__4 ()) fmt) c);)
543
          | Some a -> 
544
              (((__2 ()) fmt) a;
545
              (match a with
546
              | NoName -> ()
547
              | _ -> Format.fprintf fmt "(");
548
              (match x.actual_designator with
549
              | None -> Format.pp_print_string fmt ""
550
              | Some b -> ((__3 ()) fmt) b);
551
              (match x.actual_expr with
552
              | None -> Format.pp_print_string fmt ""
553
              | Some IsNull -> Format.pp_print_string fmt ""
554
              | Some c -> ((__4 ()) fmt) c);
555
              (match a with
556
              | NoName -> ()
557
              | _ -> Format.fprintf fmt ")")));)
558
    [@ocaml.warning "-A"])
559

    
560
and show_vhdl_assoc_element_t :
561
  vhdl_assoc_element_t -> Ppx_deriving_runtime.string =
562
  fun x  -> Format.asprintf "%a" pp_vhdl_assoc_element_t x
563

    
564
and pp_vhdl_element_assoc_t :
565
  Format.formatter -> vhdl_element_assoc_t -> Ppx_deriving_runtime.unit =
566
  let __1 () = pp_vhdl_expr_t
567
  
568
  and __0 () = pp_vhdl_expr_t
569
   in
570
  ((let open! Ppx_deriving_runtime in
571
      fun fmt  ->
572
        fun x  ->
573
            (match x.choices with
574
            | [] -> Format.fprintf fmt "";
575
            | _ -> 
576
              (((fun x  ->
577
                ignore
578
                  (List.fold_left
579
                     (fun sep  ->
580
                        fun x  ->
581
                          if sep then Format.fprintf fmt "|@ ";
582
                          ((__0 ()) fmt) x;
583
                          true) false x))) x.choices;
584
              Format.fprintf fmt " => ";));
585
           ((__1 ()) fmt) x.expr)
586
    [@ocaml.warning "-A"])
587

    
588
and show_vhdl_element_assoc_t :
589
  vhdl_element_assoc_t -> Ppx_deriving_runtime.string =
590
  fun x  -> Format.asprintf "%a" pp_vhdl_element_assoc_t x
591

    
592
(* TODO *)
593
and (pp_vhdl_array_attributes_t :
594
      Format.formatter ->
595
        vhdl_array_attributes_t -> Ppx_deriving_runtime.unit)
596
  =
597
  ((let open! Ppx_deriving_runtime in
598
      fun fmt  ->
599
        function
600
        | AAttInt { id = aid; arg = aarg } ->
601
            (Format.fprintf fmt "@[<2>AAttInt {@,";
602
             ((Format.fprintf fmt "@[%s =@ " "id";
603
               (Format.fprintf fmt "%S") aid;
604
               Format.fprintf fmt "@]");
605
              Format.fprintf fmt ";@ ";
606
              Format.fprintf fmt "@[%s =@ " "arg";
607
              (Format.fprintf fmt "%d") aarg;
608
              Format.fprintf fmt "@]");
609
             Format.fprintf fmt "@]}")
610
        | AAttAscending  -> Format.pp_print_string fmt "AAttAscending")
611
  [@ocaml.warning "-A"])
612

    
613
and show_vhdl_array_attributes_t :
614
  vhdl_array_attributes_t -> Ppx_deriving_runtime.string =
615
  fun x  -> Format.asprintf "%a" pp_vhdl_array_attributes_t x
616

    
617
(* TODO *)
618
and (pp_vhdl_signal_attributes_t :
619
      Format.formatter ->
620
        vhdl_signal_attributes_t -> Ppx_deriving_runtime.unit)
621
  =
622
  ((let open! Ppx_deriving_runtime in
623
      fun fmt  ->
624
        function
625
        | SigAtt a0 ->
626
            (Format.fprintf fmt "(@[<2>SigAtt@ ";
627
             (Format.fprintf fmt "%S") a0;
628
             Format.fprintf fmt "@])"))
629
  [@ocaml.warning "-A"])
630

    
631
and show_vhdl_signal_attributes_t :
632
  vhdl_signal_attributes_t -> Ppx_deriving_runtime.string =
633
  fun x  -> Format.asprintf "%a" pp_vhdl_signal_attributes_t x
634

    
635
(* TODO *)
636
and (pp_vhdl_string_attributes_t :
637
      Format.formatter ->
638
        vhdl_string_attributes_t -> Ppx_deriving_runtime.unit)
639
  =
640
  ((let open! Ppx_deriving_runtime in
641
      fun fmt  ->
642
        function
643
        | StringAtt a0 ->
644
            (Format.fprintf fmt "(@[<2>StringAtt@ ";
645
             (Format.fprintf fmt "%S") a0;
646
             Format.fprintf fmt "@])"))
647
  [@ocaml.warning "-A"])
648

    
649
and show_vhdl_string_attributes_t :
650
  vhdl_string_attributes_t -> Ppx_deriving_runtime.string =
651
  fun x  -> Format.asprintf "%a" pp_vhdl_string_attributes_t x
652

    
653
(* TODO *)
654
and (pp_vhdl_suffix_selection_t :
655
      Format.formatter ->
656
        vhdl_suffix_selection_t -> Ppx_deriving_runtime.unit)
657
  =
658
  ((let open! Ppx_deriving_runtime in
659
      fun fmt  ->
660
        function
661
        | Idx a0 ->
662
            (Format.fprintf fmt "(@[<2>Idx@ ";
663
             (Format.fprintf fmt "%d") a0;
664
             Format.fprintf fmt "@])")
665
        | SuffixRange (a0,a1) ->
666
            (Format.fprintf fmt "(@[<2>SuffixRange (@,";
667
             ((Format.fprintf fmt "%d") a0;
668
              Format.fprintf fmt ",@ ";
669
              (Format.fprintf fmt "%d") a1);
670
             Format.fprintf fmt "@,))@]"))
671
  [@ocaml.warning "-A"])
672

    
673
and show_vhdl_suffix_selection_t :
674
  vhdl_suffix_selection_t -> Ppx_deriving_runtime.string =
675
  fun x  -> Format.asprintf "%a" pp_vhdl_suffix_selection_t x
676

    
677
(*
678
(* TODO *)
679
let rec pp_vhdl_type_attributes_t
680
  =
681
  ((let open! Ppx_deriving_runtime in
682
      fun poly_basetype  ->
683
        fun fmt  ->
684
          function
685
          | TAttNoArg { id = aid } ->
686
              (Format.fprintf fmt "@[<2>TAttNoArg {@,";
687
               (Format.fprintf fmt "@[%s =@ " "id";
688
                (Format.fprintf fmt "%S") aid;
689
                Format.fprintf fmt "@]");
690
               Format.fprintf fmt "@]}")
691
          | TAttIntArg { id = aid; arg = aarg } ->
692
              (Format.fprintf fmt "@[<2>TAttIntArg {@,";
693
               ((Format.fprintf fmt "@[%s =@ " "id";
694
                 (Format.fprintf fmt "%S") aid;
695
                 Format.fprintf fmt "@]");
696
                Format.fprintf fmt ";@ ";
697
                Format.fprintf fmt "@[%s =@ " "arg";
698
                (Format.fprintf fmt "%d") aarg;
699
                Format.fprintf fmt "@]");
700
               Format.fprintf fmt "@]}")
701
          | TAttValArg { id = aid; arg = aarg } ->
702
              (Format.fprintf fmt "@[<2>TAttValArg {@,";
703
               ((Format.fprintf fmt "@[%s =@ " "id";
704
                 (Format.fprintf fmt "%S") aid;
705
                 Format.fprintf fmt "@]");
706
                Format.fprintf fmt ";@ ";
707
                Format.fprintf fmt "@[%s =@ " "arg";
708
                (poly_basetype fmt) aarg;
709
                Format.fprintf fmt "@]");
710
               Format.fprintf fmt "@]}")
711
          | TAttStringArg { id = aid; arg = aarg } ->
712
              (Format.fprintf fmt "@[<2>TAttStringArg {@,";
713
               ((Format.fprintf fmt "@[%s =@ " "id";
714
                 (Format.fprintf fmt "%S") aid;
715
                 Format.fprintf fmt "@]");
716
                Format.fprintf fmt ";@ ";
717
                Format.fprintf fmt "@[%s =@ " "arg";
718
                (Format.fprintf fmt "%S") aarg;
719
                Format.fprintf fmt "@]");
720
               Format.fprintf fmt "@]}"))
721
  [@ocaml.warning "-A"])
722

    
723
and show_vhdl_type_attributes_t  =
724
  fun poly_basetype  ->
725
    fun x  ->
726
      Format.asprintf "%a" (pp_vhdl_type_attributes_t poly_basetype) x
727
*)
728

    
729
let rec pp_vhdl_parameter_t :
730
  Format.formatter -> vhdl_parameter_t -> Ppx_deriving_runtime.unit =
731
  let __2 () = pp_vhdl_cst_val_t
732
  
733
  and __1 () = pp_vhdl_subtype_indication_t
734
  
735
  and __0 () = pp_vhdl_name_t
736
   in
737
  ((let open! Ppx_deriving_runtime in
738
      fun fmt  ->
739
        fun x  ->
740
          ((fun x  ->
741
             ignore
742
               (List.fold_left
743
                 (fun sep  ->
744
                   fun x  ->
745
                     if sep then Format.fprintf fmt ", ";
746
                       ((__0 ()) fmt) x;
747
                       true) false x))) x.parameter_names;
748
          Format.fprintf fmt ": ";
749
          ((fun x  ->
750
             ignore
751
               (List.fold_left
752
                 (fun sep  ->
753
                   fun x  ->
754
                     if sep then Format.fprintf fmt "";
755
                       Format.fprintf fmt "%s " x;
756
                       true) false x))) x.parameter_mode;
757
          ((__1 ()) fmt) x.parameter_typ;
758
          (match x.init_val with
759
           | None  -> Format.pp_print_string fmt ""
760
           | Some x ->
761
                 (Format.pp_print_string fmt " := ";
762
                 ((__2 ()) fmt) x));)
763
    [@ocaml.warning "-A"])
764

    
765
and show_vhdl_parameter_t : vhdl_parameter_t -> Ppx_deriving_runtime.string =
766
  fun x  -> Format.asprintf "%a" pp_vhdl_parameter_t x
767

    
768
let rec pp_vhdl_subprogram_spec_t :
769
  Format.formatter -> vhdl_subprogram_spec_t -> Ppx_deriving_runtime.unit =
770
  let __1 () = pp_vhdl_parameter_t
771
  
772
  and __0 () = pp_vhdl_name_t
773
   in
774
  ((let open! Ppx_deriving_runtime in
775
      fun fmt  ->
776
        fun x  ->
777
          (match x.subprogram_type with
778
          | "function" -> 
779
              if (x.isPure) then
780
                Format.fprintf fmt "pure %s %s" x.subprogram_type x.ss_name
781
              else
782
                Format.fprintf fmt "impure %s %s" x.subprogram_type x.ss_name
783
          | "procedure" ->
784
              Format.fprintf fmt "%s %s" x.subprogram_type x.ss_name);
785
          (match x.parameters with
786
          | [] -> Format.fprintf fmt "";
787
          | _ -> 
788
            Format.fprintf fmt "(@[";
789
            ((fun x  ->
790
                ignore
791
                  (List.fold_left
792
                     (fun sep  ->
793
                        fun x  ->
794
                          if sep then Format.fprintf fmt ";@ ";
795
                          ((__1 ()) fmt) x;
796
                          true) false x))) x.parameters;
797
            Format.fprintf fmt "@])");
798
          (match x.typeMark with
799
          | NoName -> Format.fprintf fmt "";
800
          | _ -> 
801
              Format.fprintf fmt "return ";
802
              ((__0 ()) fmt) x.typeMark))
803
   [@ocaml.warning "-A"])
804

    
805
and show_vhdl_subprogram_spec_t :
806
  vhdl_subprogram_spec_t -> Ppx_deriving_runtime.string =
807
  fun x  -> Format.asprintf "%a" pp_vhdl_subprogram_spec_t x
808

    
809
let rec pp_vhdl_waveform_element_t :
810
  Format.formatter -> vhdl_waveform_element_t -> Ppx_deriving_runtime.unit =
811
  let __1 () = pp_vhdl_expr_t
812
  
813
  and __0 () = pp_vhdl_expr_t
814
   in
815
  ((let open! Ppx_deriving_runtime in
816
      fun fmt  ->
817
        fun x  ->
818
          (match x.value with
819
          | None -> Format.fprintf fmt "";
820
          | Some IsNull -> Format.fprintf fmt "null";
821
          | Some v -> ((__0 ()) fmt) v);
822
          (match x.we_delay with
823
          | None -> Format.fprintf fmt "";
824
          | Some v -> 
825
              Format.fprintf fmt " after ";
826
              ((__1 ()) fmt) v))
827
    [@ocaml.warning "-A"])
828

    
829
and show_vhdl_waveform_element_t :
830
  vhdl_waveform_element_t -> Ppx_deriving_runtime.string =
831
  fun x  -> Format.asprintf "%a" pp_vhdl_waveform_element_t x
832

    
833
let rec pp_vhdl_sequential_stmt_t :
834
  Format.formatter -> vhdl_sequential_stmt_t -> Ppx_deriving_runtime.unit =
835
  let __23 () = pp_vhdl_expr_t
836
  
837
  and __22 () = pp_vhdl_name_t
838
  
839
  and __21 () = pp_vhdl_name_t
840
  
841
  and __20 () = pp_vhdl_assoc_element_t
842
  
843
  and __19 () = pp_vhdl_name_t
844
  
845
  and __18 () = pp_vhdl_name_t
846
  
847
  and __17 () = pp_vhdl_expr_t
848
  
849
  and __16 () = pp_vhdl_expr_t
850
  
851
  and __15 () = pp_vhdl_expr_t
852
  
853
  and __14 () = pp_vhdl_name_t
854
  
855
  and __13 () = pp_vhdl_expr_t
856
  
857
  and __12 () = pp_vhdl_name_t
858
  
859
  and __11 () = pp_vhdl_case_item_t
860
  
861
  and __10 () = pp_vhdl_expr_t
862
  
863
  and __9 () = pp_vhdl_name_t
864
  
865
  and __8 () = pp_vhdl_sequential_stmt_t
866
  
867
  and __7 () = pp_vhdl_if_case_t
868
  
869
  and __6 () = pp_vhdl_name_t
870
  
871
  and __5 () = pp_vhdl_waveform_element_t
872
  
873
  and __4 () = pp_vhdl_name_t
874
  
875
  and __3 () = pp_vhdl_name_t
876
  
877
  and __2 () = pp_vhdl_expr_t
878
  
879
  and __1 () = pp_vhdl_name_t
880
  
881
  and __0 () = pp_vhdl_name_t
882
  in
883
  ((let open! Ppx_deriving_runtime in
884
      fun fmt  ->
885
        function
886
        | VarAssign { label = alabel; seqs_lhs = alhs; rhs = arhs } ->
887
            (match alabel with
888
              | None -> ();
889
              | Some a -> (((__0 ()) fmt) a;
890
                     Format.fprintf fmt ": ")
891
            );
892
            ((__1 ()) fmt) alhs;
893
            Format.fprintf fmt " := ";
894
            ((__2 ()) fmt) arhs;
895
(* TODO: Check
896
            (Format.fprintf fmt "@[<2>VarAssign {@,";
897
             (((Format.fprintf fmt "@[%s =@ " "label";
898
                ((__0 ()) fmt) alabel;
899
                Format.fprintf fmt "@]");
900
               Format.fprintf fmt ";@ ";
901
               Format.fprintf fmt "@[%s =@ " "lhs";
902
               ((__1 ()) fmt) alhs;
903
               Format.fprintf fmt "@]");
904
              Format.fprintf fmt ";@ ";
905
              Format.fprintf fmt "@[%s =@ " "rhs";
906
              ((__2 ()) fmt) arhs;
907
              Format.fprintf fmt "@]");
908
             Format.fprintf fmt "@]}") *)
909
        | SigSeqAssign { label = alabel; seqs_lhs = alhs; rhs = arhs } ->
910
            (match alabel with
911
              | None -> ();
912
              | Some a -> (((__3 ()) fmt) a;
913
                     Format.fprintf fmt ":@ ")
914
            );
915
            Format.fprintf fmt "@[<2>";
916
            ((__4 ()) fmt) alhs;
917
            Format.fprintf fmt "@ <=@ ";
918
            ((fun x  ->
919
               Format.fprintf fmt "@[";
920
               ignore
921
                 (List.fold_left
922
                   (fun sep  ->
923
                     fun x  ->
924
                       if sep then Format.fprintf fmt ", ";
925
                        ((__5 ()) fmt) x;
926
                        true) false x);
927
            Format.fprintf fmt "@]@]")) arhs;
928
        | If { label = alabel; if_cases = aif_cases; default = adefault } ->
929
            (match alabel with
930
              | None -> ();
931
              | Some a -> (((__6 ()) fmt) a;
932
                     Format.fprintf fmt ":@ ")
933
            );
934
            Format.fprintf fmt "@[<v>if";
935
            ((fun x ->
936
               ignore
937
               (List.fold_left
938
                 (fun sep  ->
939
                   fun x  ->
940
                           if sep then Format.fprintf fmt "@;elsif";
941
                                ((__7 ()) fmt) x;
942
                                true
943
                 ) false x);
944
             )) aif_cases;
945
             (match adefault with
946
              | [] -> Format.fprintf fmt "";
947
              | _  -> (Format.fprintf fmt "@;else";
948
                      ((fun x  ->
949
                          Format.fprintf fmt "@;<0 2>";
950
                          ignore
951
                            (List.fold_left
952
                              (fun sep  ->
953
                                fun x  ->
954
                                        if sep then Format.fprintf fmt "";
955
                          ((__8 ()) fmt) x;
956
                          Format.fprintf fmt ";";
957
                          true) false x))) adefault));
958
            Format.fprintf fmt "@;end if@]"
959
        | Case { label = alabel; guard = aguard; branches = abranches } ->
960
            (match alabel with
961
              | None -> ();
962
              | Some a -> (((__9 ()) fmt) a;
963
                     Format.fprintf fmt ":@ ")
964
            );
965
            Format.fprintf fmt "@[<v>case ";
966
            ((__10 ()) fmt) aguard;
967
            Format.fprintf fmt " is";
968
            ((fun x  ->
969
                ignore
970
                  (List.fold_left
971
                     (fun sep  ->
972
                        fun x  ->
973
                          if sep then Format.fprintf fmt "";
974
                          ((__11 ()) fmt) x;
975
                          true) false x);)) abranches;
976
            Format.fprintf fmt "@;end case@]";
977
        | Exit
978
            { label = alabel; loop_label = aloop_label;
979
              condition = acondition }
980
            ->
981
            (match alabel with
982
              | None -> ();
983
              | Some a -> (((__12 ()) fmt) a;
984
                     Format.fprintf fmt ":@ ")
985
            );
986
            Format.fprintf fmt "exit";
987
            (match aloop_label with
988
               | None  -> Format.pp_print_string fmt ""
989
               | Some x -> (Format.fprintf fmt "@ %s@ ") x);
990
            ((function
991
               | None  -> Format.pp_print_string fmt ""
992
               | Some x ->
993
                   (Format.pp_print_string fmt "when@ ";
994
                    ((__13 ()) fmt) x;))) acondition;
995
        | Assert
996
            { label = alabel; cond = acond; report = areport;
997
              severity = aseverity }
998
            ->
999
            Format.fprintf fmt "@[<v 2>";
1000
            (match alabel with
1001
              | None -> ();
1002
              | Some a -> (((__14 ()) fmt) a;
1003
                     Format.fprintf fmt ":@ ")
1004
            );
1005
            Format.fprintf fmt "assert ";
1006
            ((__15 ()) fmt) acond;
1007
            (match areport with
1008
            | IsNull -> Format.fprintf fmt "";
1009
            | _ -> 
1010
                Format.fprintf fmt "@;report ";
1011
                ((__16 ()) fmt) areport);
1012
            (match aseverity with
1013
            | IsNull -> Format.fprintf fmt "";
1014
            | _ -> 
1015
                Format.fprintf fmt "@;severity ";
1016
                ((__17 ()) fmt) aseverity);
1017
            Format.fprintf fmt "@]";
1018
        | ProcedureCall { label = alabel; name = aname; assocs = aassocs } ->
1019
            (match alabel with
1020
              | None -> ();
1021
              | Some a -> (((__18 ()) fmt) a;
1022
                     Format.fprintf fmt ":@ ")
1023
            );
1024
            ((__19 ()) fmt) aname;
1025
            (match aassocs with
1026
            | [] -> Format.fprintf fmt "";
1027
            | _ ->
1028
               Format.fprintf fmt "(@[<v>";
1029
               ((fun x  ->
1030
                ignore
1031
                  (List.fold_left
1032
                     (fun sep  ->
1033
                        fun x  ->
1034
                          if sep then Format.fprintf fmt ",@ ";
1035
                          ((__20 ()) fmt) x;
1036
                          true) false x))) aassocs;
1037
               Format.fprintf fmt "@])");
1038
        | Wait  -> Format.pp_print_string fmt "wait"
1039
        | Null { label = alabel } ->
1040
            (match alabel with
1041
              | None -> ();
1042
              | Some a -> (((__18 ()) fmt) a;
1043
                     Format.fprintf fmt ":@ ")
1044
            );
1045
            Format.fprintf fmt "null";
1046
        | Return { label = alabel; expr = aexpr } ->
1047
            (match alabel with
1048
              | None -> ();
1049
              | Some a -> (((__19 ()) fmt) a;
1050
                     Format.fprintf fmt ":@ ")
1051
            );
1052
            Format.fprintf fmt "return";
1053
            (match aexpr with
1054
                | None  -> ()
1055
                | Some a ->
1056
                     ((__23 ()) fmt) a);)
1057
    [@ocaml.warning "-A"])
1058

    
1059
and show_vhdl_sequential_stmt_t :
1060
  vhdl_sequential_stmt_t -> Ppx_deriving_runtime.string =
1061
  fun x  -> Format.asprintf "%a" pp_vhdl_sequential_stmt_t x
1062

    
1063
and pp_vhdl_if_case_t :
1064
  Format.formatter -> vhdl_if_case_t -> Ppx_deriving_runtime.unit =
1065
  let __1 () = pp_vhdl_sequential_stmt_t
1066
  
1067
  and __0 () = pp_vhdl_expr_t
1068
   in
1069
  ((let open! Ppx_deriving_runtime in
1070
      fun fmt  ->
1071
        fun x  ->
1072
          Format.fprintf fmt " (";
1073
          ((__0 ()) fmt) x.if_cond;
1074
          Format.fprintf fmt ") then@;<0 2>";
1075
          ((fun x  ->
1076
             ignore
1077
               (List.fold_left
1078
                  (fun sep  ->
1079
                     fun x  ->
1080
                             if sep then Format.fprintf fmt "@;<0 2>";
1081
                       ((__1 ()) fmt) x;
1082
                       Format.fprintf fmt ";";
1083
                       true) false x);
1084
          )) x.if_block;)
1085
    [@ocaml.warning "-A"])
1086

    
1087
and show_vhdl_if_case_t : vhdl_if_case_t -> Ppx_deriving_runtime.string =
1088
  fun x  -> Format.asprintf "%a" pp_vhdl_if_case_t x
1089

    
1090
and pp_vhdl_case_item_t :
1091
  Format.formatter -> vhdl_case_item_t -> Ppx_deriving_runtime.unit =
1092
  let __1 () = pp_vhdl_sequential_stmt_t
1093
  
1094
  and __0 () = pp_vhdl_expr_t
1095
   in
1096
  ((let open! Ppx_deriving_runtime in
1097
      fun fmt  ->
1098
        fun x  ->
1099
                Format.fprintf fmt "@;@[<v 2>when ";
1100
            ((fun x  ->
1101
                ignore
1102
                  (List.fold_left
1103
                     (fun sep  ->
1104
                        fun x  ->
1105
                          if sep then Format.fprintf fmt "@ |@ ";
1106
                          ((__0 ()) fmt) x;
1107
                          true) false x);)) x.when_cond;
1108
           Format.fprintf fmt " => ";
1109
           (fun x  ->
1110
               ignore
1111
                 (List.fold_left
1112
                    (fun sep  ->
1113
                       fun x  ->
1114
                         if sep then Format.fprintf fmt "@;";
1115
                         ((__1 ()) fmt) x;
1116
                         Format.fprintf fmt ";";
1117
                         true) ((List.length x) > 1) x);) x.when_stmt;
1118
           Format.fprintf fmt "@]")
1119
    [@ocaml.warning "-A"])
1120

    
1121
and show_vhdl_case_item_t : vhdl_case_item_t -> Ppx_deriving_runtime.string =
1122
  fun x  -> Format.asprintf "%a" pp_vhdl_case_item_t x
1123

    
1124
let rec (pp_vhdl_port_mode_t :
1125
          Format.formatter -> vhdl_port_mode_t -> Ppx_deriving_runtime.unit)
1126
  =
1127
  ((let open! Ppx_deriving_runtime in
1128
      fun fmt  ->
1129
        function
1130
        | InPort  -> Format.pp_print_string fmt "in"
1131
        | OutPort  -> Format.pp_print_string fmt "out"
1132
        | InoutPort  -> Format.pp_print_string fmt "inout"
1133
        | BufferPort  -> Format.pp_print_string fmt "buffer")
1134
  [@ocaml.warning "-A"])
1135

    
1136
and show_vhdl_port_mode_t : vhdl_port_mode_t -> Ppx_deriving_runtime.string =
1137
  fun x  -> Format.asprintf "%a" pp_vhdl_port_mode_t x
1138

    
1139

    
1140
let rec pp_vhdl_port_t :
1141
  Format.formatter -> vhdl_port_t -> Ppx_deriving_runtime.unit =
1142
  let __3 () = pp_vhdl_expr_t
1143
  
1144
  and __2 () = pp_vhdl_subtype_indication_t
1145
  
1146
  and __1 () = pp_vhdl_port_mode_t
1147
  
1148
  and __0 () = pp_vhdl_name_t
1149
   in
1150
  ((let open! Ppx_deriving_runtime in
1151
      fun fmt  ->
1152
        fun x  ->
1153
          Format.fprintf fmt "@[";
1154
          ((((
1155
              ((fun x  ->
1156
                  Format.fprintf fmt "@[";
1157
                  ignore
1158
                    (List.fold_left
1159
                       (fun sep  ->
1160
                          fun x  ->
1161
                            if sep then Format.fprintf fmt ",@ ";
1162
                            ((__0 ()) fmt) x;
1163
                            true) false x);
1164
                  Format.fprintf fmt "@,@]")) x.port_names;
1165
              );
1166
             Format.fprintf fmt ": ";
1167
             ((__1 ()) fmt) x.port_mode;
1168
             );
1169
             Format.fprintf fmt " ";
1170
            ((__2 ()) fmt) x.port_typ;
1171
            );
1172
          (match x.port_expr with
1173
           | IsNull -> Format.fprintf fmt "";
1174
           | _ -> (Format.fprintf fmt "@[:= ";
1175
                   ((__3 ()) fmt) x.port_expr;
1176
                   Format.fprintf fmt "@]"));
1177
          Format.fprintf fmt "@]"))
1178
    [@ocaml.warning "-A"])
1179

    
1180
and show_vhdl_port_t : vhdl_port_t -> Ppx_deriving_runtime.string =
1181
  fun x  -> Format.asprintf "%a" pp_vhdl_port_t x
1182

    
1183
let rec pp_vhdl_declaration_t :
1184
  Format.formatter -> vhdl_declaration_t -> Ppx_deriving_runtime.unit =
1185
  let __14 () = pp_vhdl_sequential_stmt_t
1186
  
1187
  and __13 () = pp_vhdl_declaration_t
1188
  
1189
  and __12 () = pp_vhdl_subprogram_spec_t
1190

    
1191
  and __11 () = pp_vhdl_port_t
1192
  
1193
  and __10 () = pp_vhdl_port_t
1194
  
1195
  and __9 () = pp_vhdl_name_t
1196
  
1197
  and __8 () = pp_vhdl_expr_t
1198
  
1199
  and __7 () = pp_vhdl_subtype_indication_t
1200
  
1201
  and __6 () = pp_vhdl_name_t
1202
  
1203
  and __5 () = pp_vhdl_expr_t
1204
  
1205
  and __4 () = pp_vhdl_subtype_indication_t
1206
  
1207
  and __3 () = pp_vhdl_name_t
1208
  
1209
  and __2 () = pp_vhdl_expr_t
1210
  
1211
  and __1 () = pp_vhdl_subtype_indication_t
1212
  
1213
  and __0 () = pp_vhdl_name_t
1214
   in
1215
  ((let open! Ppx_deriving_runtime in
1216
      fun fmt  ->
1217
        function
1218
        | VarDecl { names = anames; typ = atyp; init_val = ainit_val } ->
1219
            (Format.fprintf fmt "variable ";
1220
             ((((fun x  ->
1221
                    ignore
1222
                      (List.fold_left
1223
                         (fun sep  ->
1224
                            fun x  ->
1225
                              if sep then Format.fprintf fmt ",";
1226
                              ((__0 ()) fmt) x;
1227
                              true) false x);)) anames;
1228
               Format.fprintf fmt " : ";
1229
               ((__1 ()) fmt) atyp;
1230
               (match ainit_val with
1231
                | IsNull  -> Format.pp_print_string fmt ""
1232
                | _ ->
1233
                    (Format.fprintf fmt ":=";
1234
                     ((__2 ()) fmt) ainit_val;))));)
1235
        | CstDecl { names = anames; typ = atyp; init_val = ainit_val } ->
1236
            (Format.fprintf fmt "constant ";
1237
             ((((fun x  ->
1238
                    ignore
1239
                      (List.fold_left
1240
                         (fun sep  ->
1241
                            fun x  ->
1242
                              if sep then Format.fprintf fmt ",";
1243
                              ((__3 ()) fmt) x;
1244
                              true) false x);)) anames;
1245
              Format.fprintf fmt " : ";
1246
              ((__4 ()) fmt) atyp;
1247
              Format.fprintf fmt " := ";
1248
              ((__5 ()) fmt) ainit_val)))
1249
        | SigDecl { names = anames; typ = atyp; init_val = ainit_val } ->
1250
            (Format.fprintf fmt "signal ";
1251
            ((fun x  ->
1252
              ignore
1253
              (List.fold_left
1254
                (fun sep  ->
1255
                  fun x  ->
1256
                    if sep then Format.fprintf fmt ",";
1257
                                ((__6 ()) fmt) x;
1258
                                true) false x);
1259
              )) anames;
1260
            Format.fprintf fmt " : ";
1261
            ((__7 ()) fmt) atyp;
1262
            (match ainit_val with
1263
              | IsNull  -> Format.pp_print_string fmt ""
1264
              | _ ->
1265
                  (Format.fprintf fmt ":=";
1266
                  ((__8 ()) fmt) ainit_val;)))
1267
        | ComponentDecl
1268
            { name = aname; generics = agenerics; ports = aports } ->
1269
            Format.fprintf fmt "@[<v 2>component ";
1270
            ((__9 ()) fmt) aname;
1271
            Format.fprintf fmt " is@;";
1272
            (match agenerics with
1273
            | [] -> ()
1274
            | _ ->
1275
                Format.fprintf fmt "generic (@[<v>";
1276
                ((fun x  ->
1277
                  ignore
1278
                    (List.fold_left
1279
                      (fun sep  ->
1280
                        fun x  ->
1281
                          if sep then Format.fprintf fmt ";@;";
1282
                            ((__10 ()) fmt) x;
1283
                            true) false x))) agenerics;
1284
                Format.fprintf fmt "@]);");
1285
            (match aports with
1286
            | [] -> ()
1287
            | _ ->
1288
                Format.fprintf fmt "port (@[<v>";
1289
                ((fun x  ->
1290
                  ignore
1291
                    (List.fold_left
1292
                      (fun sep  ->
1293
                        fun x  ->
1294
                          if sep then Format.fprintf fmt ";@;";
1295
                            ((__11 ()) fmt) x;
1296
                            true) false x))) aports;
1297
                Format.fprintf fmt "@]);");
1298
            Format.fprintf fmt "@]@;end component";
1299
        | Subprogram
1300
            { spec = aspec; decl_part = adecl_part; stmts = astmts }
1301
            ->
1302
              Format.fprintf fmt "@[<v 2>";
1303
              ((__12 ()) fmt) aspec;
1304
              Format.fprintf fmt " is";
1305
              (match adecl_part with
1306
              | [] -> Format.fprintf fmt "";
1307
              | _ ->
1308
                ((fun x  ->
1309
                  ignore
1310
                    (List.fold_left
1311
                      (fun sep  ->
1312
                         fun x  ->
1313
                           if sep then Format.fprintf fmt "";
1314
                             Format.fprintf fmt "@;";
1315
                             ((__13 ()) fmt) x;
1316
                             Format.fprintf fmt ";";
1317
                             true) false x))) adecl_part);
1318
              Format.fprintf fmt "@]@;";
1319
              Format.fprintf fmt "@[<v 2>begin@;";
1320
              ((fun x  ->
1321
                  ignore
1322
                    (List.fold_left
1323
                       (fun sep  ->
1324
                          fun x  ->
1325
                            if sep then Format.fprintf fmt "@;";
1326
                            ((__14 ()) fmt) x;
1327
                            Format.fprintf fmt ";";
1328
                            true) false x))) astmts;
1329
              Format.fprintf fmt "@]@;end";)
1330
    [@ocaml.warning "-A"])
1331

    
1332
and show_vhdl_declaration_t :
1333
  vhdl_declaration_t -> Ppx_deriving_runtime.string =
1334
  fun x  -> Format.asprintf "%a" pp_vhdl_declaration_t x
1335

    
1336
let rec pp_vhdl_load_t :
1337
  Format.formatter -> vhdl_load_t -> Ppx_deriving_runtime.unit =
1338
  let __1 () = pp_vhdl_name_t
1339
  
1340
  and __0 () = pp_vhdl_name_t
1341
   in
1342
  ((let open! Ppx_deriving_runtime in
1343
      fun fmt  ->
1344
        function
1345
        | Library a0 ->
1346
            (Format.fprintf fmt "library ";
1347
             ((fun x  ->
1348
                 ignore
1349
                   (List.fold_left
1350
                      (fun sep  ->
1351
                         fun x  ->
1352
                           if sep then Format.fprintf fmt ",";
1353
                           ((__0 ()) fmt) x;
1354
                           true) false x))) a0);
1355
        | Use a0 ->
1356
            (Format.fprintf fmt "use ";
1357
             ((fun x  ->
1358
                 ignore
1359
                   (List.fold_left
1360
                      (fun sep  ->
1361
                         fun x  ->
1362
                           if sep then Format.fprintf fmt ".";
1363
                           ((__1 ()) fmt) x;
1364
                           true) false x))) a0))
1365
    [@ocaml.warning "-A"])
1366

    
1367
and show_vhdl_load_t : vhdl_load_t -> Ppx_deriving_runtime.string =
1368
  fun x  -> Format.asprintf "%a" pp_vhdl_load_t x
1369

    
1370
let rec pp_vhdl_declarative_item_t :
1371
  Format.formatter -> vhdl_declarative_item_t -> Ppx_deriving_runtime.unit =
1372
  let __2 () = pp_vhdl_definition_t
1373
  
1374
  and __1 () = pp_vhdl_declaration_t
1375
  
1376
  and __0 () = pp_vhdl_load_t
1377
   in
1378
  ((let open! Ppx_deriving_runtime in
1379
      fun fmt  ->
1380
        fun x  ->
1381
          (match x.use_clause with
1382
          | None -> Format.fprintf fmt "";
1383
          | Some e -> ((__0 ()) fmt) e);
1384
          (match x.di_declaration with
1385
          | None -> Format.fprintf fmt "";
1386
          | Some e -> ((__1 ()) fmt) e);
1387
          (match x.di_definition with
1388
          | None -> Format.fprintf fmt "";
1389
          | Some e -> ((__2 ()) fmt) e);)
1390
    [@ocaml.warning "-A"])
1391

    
1392
and show_vhdl_declarative_item_t :
1393
  vhdl_declarative_item_t -> Ppx_deriving_runtime.string =
1394
  fun x  -> Format.asprintf "%a" pp_vhdl_declarative_item_t x
1395

    
1396
let rec pp_vhdl_signal_condition_t :
1397
  Format.formatter -> vhdl_signal_condition_t -> Ppx_deriving_runtime.unit =
1398
  let __1 () = pp_vhdl_expr_t
1399
  
1400
  and __0 () = pp_vhdl_waveform_element_t
1401
   in
1402
  ((let open! Ppx_deriving_runtime in
1403
      fun fmt  ->
1404
        fun x  ->
1405
          ((fun x  ->
1406
                ignore
1407
                  (List.fold_left
1408
                     (fun sep  ->
1409
                        fun x  ->
1410
                          if sep then Format.fprintf fmt ",@,";
1411
                          ((__0 ()) fmt) x;
1412
                          true) false x))) x.sc_expr;
1413
          (match x.cond with
1414
          | None -> Format.fprintf fmt "";
1415
          | Some e -> Format.fprintf fmt " when ";
1416
                 ((__1 ()) fmt) e);)
1417
    [@ocaml.warning "-A"])
1418

    
1419
and show_vhdl_signal_condition_t :
1420
  vhdl_signal_condition_t -> Ppx_deriving_runtime.string =
1421
  fun x  -> Format.asprintf "%a" pp_vhdl_signal_condition_t x
1422

    
1423
let rec pp_vhdl_signal_selection_t :
1424
  Format.formatter -> vhdl_signal_selection_t -> Ppx_deriving_runtime.unit =
1425
  let __1 () = pp_vhdl_expr_t
1426
  
1427
  and __0 () = pp_vhdl_waveform_element_t
1428
   in
1429
  ((let open! Ppx_deriving_runtime in
1430
      fun fmt  ->
1431
        fun x  ->
1432
          ((fun x  ->
1433
            ignore
1434
              (List.fold_left
1435
                (fun sep  ->
1436
                  fun x  ->
1437
                    if sep then Format.fprintf fmt "@ ";
1438
                      ((__0 ()) fmt) x;
1439
                      true) false x))) x.ss_expr;
1440
          Format.fprintf fmt " when ";
1441
          ((fun x  ->
1442
            ignore
1443
              (List.fold_left
1444
                (fun sep  ->
1445
                  fun x  ->
1446
                    if sep then Format.fprintf fmt "|@ ";
1447
                      ((__1 ()) fmt) x;
1448
                      true) false x))) x.when_sel)
1449
    [@ocaml.warning "-A"])
1450

    
1451
and show_vhdl_signal_selection_t :
1452
  vhdl_signal_selection_t -> Ppx_deriving_runtime.string =
1453
  fun x  -> Format.asprintf "%a" pp_vhdl_signal_selection_t x
1454

    
1455
let rec pp_vhdl_conditional_signal_t :
1456
  Format.formatter -> vhdl_conditional_signal_t -> Ppx_deriving_runtime.unit
1457
  =
1458
  let __3 () = pp_vhdl_expr_t
1459
  
1460
  and __2 () = pp_vhdl_signal_condition_t
1461
  
1462
  and __1 () = pp_vhdl_name_t
1463
  
1464
  and __0 () = pp_vhdl_name_t
1465
   in
1466
  ((let open! Ppx_deriving_runtime in
1467
      fun fmt  ->
1468
        fun x  ->
1469
          (match x.cs_label with
1470
            | None -> ();
1471
            | Some a -> (((__0 ()) fmt) a;
1472
                   Format.fprintf fmt ":@ ")
1473
          );
1474
          if (x.cs_postponed) then Format.fprintf fmt "postponed@ ";
1475
          ((__1 ()) fmt) x.cs_lhs;
1476
          Format.fprintf fmt " <= ";
1477
          (match x.cs_delay with
1478
            | IsNull -> Format.fprintf fmt "";
1479
            | _ -> ((__3 ()) fmt) x.cs_delay;
1480
                   Format.fprintf fmt " ");
1481
          ((fun x  ->
1482
             Format.fprintf fmt "@[";
1483
             ignore
1484
               (List.fold_left
1485
                 (fun sep  ->
1486
                   fun x  ->
1487
                     if sep then Format.fprintf fmt " else ";
1488
                      ((__2 ()) fmt) x;
1489
                      true) false x);
1490
          Format.fprintf fmt "@]")) x.rhs;
1491
          Format.fprintf fmt ";")
1492
   [@ocaml.warning "-A"])
1493

    
1494
and show_vhdl_conditional_signal_t :
1495
  vhdl_conditional_signal_t -> Ppx_deriving_runtime.string =
1496
  fun x  -> Format.asprintf "%a" pp_vhdl_conditional_signal_t x
1497

    
1498
let rec pp_vhdl_process_t :
1499
  Format.formatter -> vhdl_process_t -> Ppx_deriving_runtime.unit =
1500
  let __3 () = pp_vhdl_sequential_stmt_t
1501
  
1502
  and __2 () = pp_vhdl_name_t
1503
  
1504
  and __1 () = pp_vhdl_declarative_item_t
1505
  
1506
  and __0 () = pp_vhdl_name_t
1507
   in
1508
  ((let open! Ppx_deriving_runtime in
1509
      fun fmt  ->
1510
        fun x  ->
1511
          Format.fprintf fmt "@[<v 2>";
1512
          (match x.id with
1513
          | NoName -> Format.fprintf fmt "";
1514
          | _ -> 
1515
              ((__0 ()) fmt) x.id;
1516
              Format.fprintf fmt ": ");
1517
          Format.fprintf fmt "process ";
1518
          (match x.active_sigs with
1519
          | [] -> Format.fprintf fmt "";
1520
          | _ -> Format.fprintf fmt "(";
1521
                 ((fun x  ->
1522
                    ignore
1523
                      (List.fold_left
1524
                         (fun sep  ->
1525
                            fun x  ->
1526
                              if sep then Format.fprintf fmt ",";
1527
                              ((__2 ()) fmt) x;
1528
                              true) false x))) x.active_sigs;
1529
                 Format.fprintf fmt ")");
1530
          Format.fprintf fmt " is";
1531
          (match x.p_declarations with
1532
          | [] -> Format.fprintf fmt "";
1533
          | _ -> 
1534
              (Format.fprintf fmt "@;";
1535
              ((fun x  ->
1536
                ignore
1537
                (List.fold_left
1538
                  (fun sep  ->
1539
                    fun x  ->
1540
                      if sep then Format.fprintf fmt "@;";
1541
                        ((__1 ()) fmt) x;
1542
                        Format.fprintf fmt ";";
1543
                        true) false x))) x.p_declarations));
1544
          Format.fprintf fmt "@]@;@[<v 2>begin@;";
1545
          ((fun x  ->
1546
               ignore
1547
                 (List.fold_left
1548
                    (fun sep  ->
1549
                       fun x  ->
1550
                         if sep then Format.fprintf fmt "@;";
1551
                         ((__3 ()) fmt) x;
1552
                         Format.fprintf fmt ";";
1553
                         true) false x);)) x.p_body;
1554
          Format.fprintf fmt "@]@;end process;")
1555
    [@ocaml.warning "-A"])
1556

    
1557
and show_vhdl_process_t : vhdl_process_t -> Ppx_deriving_runtime.string =
1558
  fun x  -> Format.asprintf "%a" pp_vhdl_process_t x
1559

    
1560
let rec pp_vhdl_selected_signal_t : (* FIXME Missing ss_postponed attribute *)
1561
  Format.formatter -> vhdl_selected_signal_t -> Ppx_deriving_runtime.unit =
1562
  let __4 () = pp_vhdl_expr_t
1563
  
1564
  and __3 () = pp_vhdl_signal_selection_t
1565
  
1566
  and __2 () = pp_vhdl_expr_t
1567
  
1568
  and __1 () = pp_vhdl_name_t
1569
  
1570
  and __0 () = pp_vhdl_name_t
1571
   in
1572
  ((let open! Ppx_deriving_runtime in
1573
      fun fmt  ->
1574
        fun x  ->
1575
          Format.fprintf fmt "@[<v 2>";
1576
          (match x.ss_label with
1577
            | None -> ();
1578
            | Some a -> (((__0 ()) fmt) a;
1579
                   Format.fprintf fmt ":@ ")
1580
          );
1581
          Format.fprintf fmt "with ";
1582
          ((__2 ()) fmt) x.sel;
1583
          Format.fprintf fmt " select@;";
1584
          ((__1 ()) fmt) x.ss_lhs;
1585
          Format.fprintf fmt " <= ";
1586
          ((function
1587
            | None  -> Format.pp_print_string fmt ""
1588
            | Some x ->
1589
               ((__4 ()) fmt) x)) x.ss_delay;
1590
          ((fun x  ->
1591
            ignore
1592
              (List.fold_left
1593
                (fun sep  ->
1594
                  fun x  ->
1595
                    if sep then Format.fprintf fmt ",@ ";
1596
                      ((__3 ()) fmt) x;
1597
                      true) false x))) x.branches;
1598
          Format.fprintf fmt ";@]";)
1599
    [@ocaml.warning "-A"])
1600

    
1601
and show_vhdl_selected_signal_t :
1602
  vhdl_selected_signal_t -> Ppx_deriving_runtime.string =
1603
  fun x  -> Format.asprintf "%a" pp_vhdl_selected_signal_t x
1604

    
1605
let rec pp_vhdl_component_instantiation_t :
1606
  Format.formatter ->
1607
    vhdl_component_instantiation_t -> Ppx_deriving_runtime.unit
1608
  =
1609
  let __4 () = pp_vhdl_assoc_element_t
1610
  
1611
  and __3 () = pp_vhdl_assoc_element_t
1612
  
1613
  and __2 () = pp_vhdl_name_t
1614
  
1615
  and __1 () = pp_vhdl_name_t
1616
  
1617
  and __0 () = pp_vhdl_name_t
1618
   in
1619
  ((let open! Ppx_deriving_runtime in
1620
      fun fmt  ->
1621
        fun x  ->
1622
          Format.fprintf fmt "@[<v 2>";
1623
          ((__0 ()) fmt) x.ci_name;
1624
          Format.fprintf fmt " : ";
1625
          Format.fprintf fmt "%s " x.inst_unit_type;
1626
          ((__1 ()) fmt) x.inst_unit;
1627
          ((function
1628
             | None  -> Format.pp_print_string fmt ""
1629
             | Some x ->
1630
                 (Format.fprintf fmt "(";
1631
                 ((__2 ()) fmt) x;
1632
                 Format.fprintf fmt ")@;"))) x.archi_name;
1633
          (match x.generic_map with
1634
          | [] -> Format.fprintf fmt "";
1635
          | _ ->
1636
            (Format.fprintf fmt " generic map (@[";
1637
            ((fun x  ->
1638
            ignore
1639
            (List.fold_left
1640
               (fun sep  ->
1641
                 fun x  ->
1642
                   if sep then Format.fprintf fmt ",@ ";
1643
                   ((__3 ()) fmt) x;
1644
                   true) false x))) x.generic_map;
1645
            Format.fprintf fmt ")@]@;"));
1646
          (match x.port_map with
1647
          | [] -> Format.fprintf fmt ";";
1648
          | _ ->
1649
            (Format.fprintf fmt " port map (@[";
1650
            ((fun x  ->
1651
            ignore
1652
            (List.fold_left
1653
               (fun sep  ->
1654
                 fun x  ->
1655
                   if sep then Format.fprintf fmt ",@ ";
1656
                   ((__4 ()) fmt) x;
1657
                   true) false x))) x.port_map;
1658
            Format.fprintf fmt ")@];"));
1659
          Format.fprintf fmt "@]")
1660
    [@ocaml.warning "-A"])
1661

    
1662
and show_vhdl_component_instantiation_t :
1663
  vhdl_component_instantiation_t -> Ppx_deriving_runtime.string =
1664
  fun x  -> Format.asprintf "%a" pp_vhdl_component_instantiation_t x
1665

    
1666
let rec pp_vhdl_concurrent_stmt_t :
1667
  Format.formatter -> vhdl_concurrent_stmt_t -> Ppx_deriving_runtime.unit =
1668
  let __3 () = pp_vhdl_component_instantiation_t
1669
  
1670
  and __2 () = pp_vhdl_selected_signal_t
1671
  
1672
  and __1 () = pp_vhdl_process_t
1673
  
1674
  and __0 () = pp_vhdl_conditional_signal_t
1675
   in
1676
  ((let open! Ppx_deriving_runtime in
1677
      fun fmt  ->
1678
        function
1679
        | SigAssign a0 ->
1680
             ((__0 ()) fmt) a0;
1681
        | Process a0 ->
1682
             ((__1 ()) fmt) a0;
1683
        | SelectedSig a0 ->
1684
             ((__2 ()) fmt) a0;
1685
        | ComponentInst a0 ->
1686
             ((__3 ()) fmt) a0;
1687
    )
1688
    [@ocaml.warning "-A"])
1689

    
1690
and show_vhdl_concurrent_stmt_t :
1691
  vhdl_concurrent_stmt_t -> Ppx_deriving_runtime.string =
1692
  fun x  -> Format.asprintf "%a" pp_vhdl_concurrent_stmt_t x
1693

    
1694
let rec pp_vhdl_entity_t :
1695
  Format.formatter -> vhdl_entity_t -> Ppx_deriving_runtime.unit =
1696
  let __4 () = pp_vhdl_concurrent_stmt_t
1697
  
1698
  and __3 () = pp_vhdl_declarative_item_t
1699
  
1700
  and __2 () = pp_vhdl_port_t
1701
  
1702
  and __1 () = pp_vhdl_port_t
1703
  
1704
  and __0 () = pp_vhdl_name_t
1705
   in
1706
  ((let open! Ppx_deriving_runtime in
1707
      fun fmt  ->
1708
        fun x  ->
1709
          ((__0 ()) fmt) x.e_name;
1710
          Format.fprintf fmt " is@;";
1711
          (match x.generics with
1712
          | [] -> Format.fprintf fmt "";
1713
          | _ -> 
1714
              Format.fprintf fmt "generic (@[";
1715
              ((fun x  ->
1716
                ignore
1717
                (List.fold_left
1718
                  (fun sep  ->
1719
                    fun x  ->
1720
                      if sep then Format.fprintf fmt ";@ ";
1721
                        ((__1 ()) fmt) x;
1722
                        true) false x))) x.generics;
1723
              Format.fprintf fmt "@]);");
1724
          (match x.ports with
1725
          | [] -> Format.fprintf fmt "";
1726
          | _ -> 
1727
              Format.fprintf fmt "port (@[";
1728
              ((fun x  ->
1729
                 ignore
1730
                   (List.fold_left
1731
                      (fun sep  ->
1732
                         fun x  ->
1733
                           if sep then Format.fprintf fmt ";@ ";
1734
                           ((__2 ()) fmt) x;
1735
                           true) false x))) x.ports;
1736
              Format.fprintf fmt "@]);");
1737
          (match x.e_declaration with
1738
          | [] -> Format.fprintf fmt "";
1739
          | _ ->
1740
              Format.fprintf fmt "@;";
1741
              ((fun x  ->
1742
                ignore
1743
                  (List.fold_left
1744
                     (fun sep  ->
1745
                        fun x  ->
1746
                          if sep then Format.fprintf fmt ";@;";
1747
                          ((__3 ()) fmt) x;
1748
                          true) false x))) x.e_declaration;
1749
              Format.fprintf fmt ";");
1750
          (match x.stmts with
1751
          | [] -> Format.fprintf fmt "";
1752
          | _ ->
1753
              Format.fprintf fmt "@;@[<v 2>begin@;";
1754
              ((fun x  ->
1755
                ignore
1756
                  (List.fold_left
1757
                    (fun sep  ->
1758
                       fun x  ->
1759
                         if sep then Format.fprintf fmt ";@;";
1760
                         ((__4 ()) fmt) x;
1761
                         true) false x))) x.stmts;
1762
              Format.fprintf fmt ";@]");)
1763
    [@ocaml.warning "-A"])
1764

    
1765
and show_vhdl_entity_t : vhdl_entity_t -> Ppx_deriving_runtime.string =
1766
  fun x  -> Format.asprintf "%a" pp_vhdl_entity_t x
1767

    
1768
let rec pp_vhdl_package_t :
1769
  Format.formatter -> vhdl_package_t -> Ppx_deriving_runtime.unit =
1770
  let __3 () = pp_vhdl_load_t
1771
  
1772
  and __2 () = pp_vhdl_declaration_t
1773
  
1774
  and __1 () = pp_vhdl_definition_t
1775
  
1776
  and __0 () = pp_vhdl_name_t
1777
   in
1778
  ((let open! Ppx_deriving_runtime in
1779
      fun fmt  ->
1780
        fun x  ->
1781
          ((__0 ()) fmt) x.p_name;
1782
          Format.fprintf fmt " is";
1783
          ((fun x  ->
1784
             ignore
1785
               (List.fold_left
1786
                  (fun sep  ->
1787
                     fun x  ->
1788
                       Format.fprintf fmt "@;";
1789
                       if sep then Format.fprintf fmt "";
1790
                       ((__1 ()) fmt) x;
1791
                       Format.fprintf fmt ";";
1792
                       true) false x))) x.shared_defs;
1793
          ((fun x  ->
1794
               ignore
1795
                 (List.fold_left
1796
                    (fun sep  ->
1797
                       fun x  ->
1798
                         Format.fprintf fmt "@;";
1799
                         if sep then Format.fprintf fmt "";
1800
                         ((__2 ()) fmt) x;
1801
                         Format.fprintf fmt ";";
1802
                         true) false x))) x.shared_decls;
1803
          ((fun x  ->
1804
               ignore
1805
                 (List.fold_left
1806
                    (fun sep  ->
1807
                       fun x  ->
1808
                         Format.fprintf fmt "@;";
1809
                         if sep then Format.fprintf fmt "";
1810
                         ((__3 ()) fmt) x;
1811
                         Format.fprintf fmt ";";
1812
                         true) false x))) x.shared_uses;)
1813
    [@ocaml.warning "-A"])
1814

    
1815
and show_vhdl_package_t : vhdl_package_t -> Ppx_deriving_runtime.string =
1816
  fun x  -> Format.asprintf "%a" pp_vhdl_package_t x
1817

    
1818
let rec pp_vhdl_architecture_t :
1819
  Format.formatter -> vhdl_architecture_t -> Ppx_deriving_runtime.unit =
1820
  let __3 () = pp_vhdl_concurrent_stmt_t
1821
  
1822
  and __2 () = pp_vhdl_declarative_item_t
1823
  
1824
  and __1 () = pp_vhdl_name_t
1825
  
1826
  and __0 () = pp_vhdl_name_t
1827
   in
1828
  ((let open! Ppx_deriving_runtime in
1829
      fun fmt  ->
1830
        fun x  ->
1831
          ((__0 ()) fmt) x.a_name;
1832
          Format.fprintf fmt " of ";
1833
          ((__1 ()) fmt) x.entity;
1834
          Format.fprintf fmt " is@;";
1835
            ((fun x  ->
1836
             ignore
1837
               (List.fold_left
1838
                  (fun sep  ->
1839
                     fun x  ->
1840
                       if sep then Format.fprintf fmt "@;";
1841
                       ((__2 ()) fmt) x;
1842
                       Format.fprintf fmt ";";
1843
                       true) false x))) x.a_declarations;
1844
          Format.fprintf fmt "@.";
1845
          Format.fprintf fmt "@[<v 2>begin@;";
1846
          (match x.a_body with
1847
            | [] -> Format.fprintf fmt "";
1848
            | _ ->
1849
               ((fun x  ->
1850
               ignore
1851
                 (List.fold_left
1852
                    (fun sep  ->
1853
                       fun x  ->
1854
                         if sep then Format.fprintf fmt "@;";
1855
                         ((__3 ()) fmt) x;
1856
                         true) false x))) x.a_body);
1857
          Format.fprintf fmt "@]")
1858
    [@ocaml.warning "-A"])
1859

    
1860
and show_vhdl_architecture_t :
1861
  vhdl_architecture_t -> Ppx_deriving_runtime.string =
1862
  fun x  -> Format.asprintf "%a" pp_vhdl_architecture_t x
1863

    
1864

    
1865
let rec (pp_vhdl_configuration_t :
1866
          Format.formatter ->
1867
            vhdl_configuration_t -> Ppx_deriving_runtime.unit)
1868
  =
1869
  ((let open! Ppx_deriving_runtime in
1870
      fun fmt  -> fun ()  -> Format.pp_print_string fmt "()")
1871
  [@ocaml.warning "-A"])
1872

    
1873
and show_vhdl_configuration_t :
1874
  vhdl_configuration_t -> Ppx_deriving_runtime.string =
1875
  fun x  -> Format.asprintf "%a" pp_vhdl_configuration_t x
1876

    
1877

    
1878
let rec pp_vhdl_library_unit_t :
1879
  Format.formatter -> vhdl_library_unit_t -> Ppx_deriving_runtime.unit =
1880
  let __3 () = pp_vhdl_configuration_t
1881
  
1882
  and __2 () = pp_vhdl_architecture_t
1883
  
1884
  and __1 () = pp_vhdl_entity_t
1885
  
1886
  and __0 () = pp_vhdl_package_t
1887
   in
1888
  ((let open! Ppx_deriving_runtime in
1889
      fun fmt  ->
1890
        function
1891
        | Package a0 ->
1892
            (Format.fprintf fmt "@[<v 2>package ";
1893
             ((__0 ()) fmt) a0;
1894
             Format.fprintf fmt "@.end;@]")
1895
        | Entities a0 ->
1896
            (Format.fprintf fmt "@[<v 2>entity ";
1897
             ((__1 ()) fmt) a0;
1898
             Format.fprintf fmt "@.end;@]")
1899
        | Architecture a0 ->
1900
            (Format.fprintf fmt "@[<v 2>architecture ";
1901
             ((__2 ()) fmt) a0;
1902
             Format.fprintf fmt "@.end;")
1903
        | Configuration a0 ->
1904
            (Format.fprintf fmt "@[<v 2>configuration ";
1905
             ((__3 ()) fmt) a0;
1906
             Format.fprintf fmt "@.end;@]"))
1907
    [@ocaml.warning "-A"])
1908

    
1909
and show_vhdl_library_unit_t :
1910
  vhdl_library_unit_t -> Ppx_deriving_runtime.string =
1911
  fun x  -> Format.asprintf "%a" pp_vhdl_library_unit_t x
1912

    
1913
let rec pp_vhdl_design_unit_t :
1914
  Format.formatter -> vhdl_design_unit_t -> Ppx_deriving_runtime.unit =
1915
  let __1 () = pp_vhdl_library_unit_t
1916
  
1917
  and __0 () = pp_vhdl_load_t
1918
   in
1919
  ((let open! Ppx_deriving_runtime in
1920
      fun fmt  ->
1921
        fun x  ->
1922
           (match x.contexts with
1923
           | [] -> Format.fprintf fmt "";
1924
           | _ -> 
1925
            ((fun x  ->
1926
                ignore
1927
                  (List.fold_left
1928
                     (fun sep  ->
1929
                        fun x  ->
1930
                          if sep then Format.fprintf fmt "@.";
1931
                          ((__0 ()) fmt) x;
1932
                          Format.fprintf fmt ";";
1933
                          true) false x);
1934
                )) x.contexts;
1935
           Format.fprintf fmt "@.";);
1936
           ((__1 ()) fmt) x.library;)
1937
    [@ocaml.warning "-A"])
1938

    
1939
and show_vhdl_design_unit_t :
1940
  vhdl_design_unit_t -> Ppx_deriving_runtime.string =
1941
  fun x  -> Format.asprintf "%a" pp_vhdl_design_unit_t x
1942

    
1943
let rec pp_vhdl_design_file_t :
1944
  Format.formatter -> vhdl_design_file_t -> Ppx_deriving_runtime.unit =
1945
  let __0 () = pp_vhdl_design_unit_t  in
1946
  ((let open! Ppx_deriving_runtime in
1947
      fun fmt  ->
1948
        fun x  ->
1949
           ((fun x  ->
1950
               ignore
1951
                 (List.fold_left
1952
                    (fun sep  ->
1953
                       fun x  ->
1954
                         if sep then Format.fprintf fmt "@.";
1955
                         ((__0 ()) fmt) x;
1956
                         true) false x);
1957
             )) x.design_units)
1958
    [@ocaml.warning "-A"])
1959

    
1960
and show_vhdl_design_file_t :
1961
  vhdl_design_file_t -> Ppx_deriving_runtime.string =
1962
  fun x  -> Format.asprintf "%a" pp_vhdl_design_file_t x
1963

    
1964
let rec pp_vhdl_file_t :
1965
  Format.formatter -> vhdl_file_t -> Ppx_deriving_runtime.unit =
1966
  let __0 () = pp_vhdl_design_file_t  in
1967
  ((let open! Ppx_deriving_runtime in
1968
      fun fmt  ->
1969
        fun x  ->
1970
           ((__0 ()) fmt) x.design_file;
1971
   )
1972
    [@ocaml.warning "-A"])
1973

    
1974
and show_vhdl_file_t : vhdl_file_t -> Ppx_deriving_runtime.string =
1975
  fun x  -> Format.asprintf "%a" pp_vhdl_file_t x
1976

    
(7-7/10)