Project

General

Profile

Revision ef776f2f src/compiler_stages.ml

View differences:

src/compiler_stages.ml
182 182
  let prog = Normalization.normalize_prog params prog in
183 183
  Log.report ~level:2 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@," Printers.pp_prog prog);
184 184

  
185
  (* Postprocessing for VHDL backend *)
186
  let prog =
187
    match !Options.output with
188
    | "vhdl" ->
189
       Vhdl_normalization.post_process prog       
190
    | _ -> prog
191
  in
185
  (* (\* Removed. Is it used ? TODO *\)
186
   * (\* Postprocessing for VHDL backend *\)
187
   * let prog =
188
   *   match !Options.output with
189
   *   | "vhdl" ->
190
   *      Vhdl_normalization.post_process prog       
191
   *   | _ -> prog
192
   * in *)
192 193
  
193 194
  let prog =
194 195
    if !Options.mpfr
......
309 310
       EMF_backend.translate fmt basename prog machine_code;
310 311
       ()
311 312
     end
312

  
313
  | "vhdl" ->
314
     begin
315
       let destname = !Options.dest_dir ^ "/" ^ basename in
316
       let source_file = destname ^ ".vhd" in (* Could be changed *)
317
       let source_out = open_out source_file in
318
       let fmt = formatter_of_out_channel source_out in
319
       Vhdl_backend.translate fmt basename prog machine_code;
320
       ()
321
     end
313
  (* TODO Faut-il remettre *)
314
  (* | "vhdl" ->
315
   *    begin
316
   *      let destname = !Options.dest_dir ^ "/" ^ basename in
317
   *      let source_file = destname ^ ".vhd" in (\* Could be changed *\)
318
   *      let source_out = open_out source_file in
319
   *      let fmt = formatter_of_out_channel source_out in
320
   *      Vhdl_backend.translate fmt basename prog machine_code;
321
   *      ()
322
   *    end *)
322 323
       
323 324
     
324 325
  | _ -> assert false

Also available in: Unified diff