cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
322 stars 92 forks source link

[API][Utils] Debug mode for VHLS runtime #228

Closed chhzh123 closed 4 years ago

chhzh123 commented 4 years ago

This PR fixes the remaining issues in #215 .

  1. Add a "debug" mode to VHLS runtime, which is used to inspect the generated host code and kernel code.
    target.config(compile="vivado_hls", mode="debug")
    code = hcl.build(s, target)
    print(code)
  2. Change APIs.
    • Remove argument in f.report().
    • Rename "tcl" argument in .config to "script". Users can pass in customized Tcl script via
      tcl = open("run.tcl","r").read()
      target.config(compile="vivado_hls", script=tcl)
    • Remove misleading "vivado" backend argument. Users should use target.config(compile="vivado_hls",mode="impl") instead of compile="vivado" to run the whole synthesis & implementation process.
  3. Fix HLS report output.
zhangzhiru commented 4 years ago

@Hecmay can you review this PR?

chhzh123 commented 4 years ago

Please ignore this PR. The rebased one is in #229 .