docstr: Write the main architecture header file (myproject.h)
  
  Args:
      model (ModelGraph): the hls4ml model.
docstr_tok: ["Write","the","main","architecture","header","file","(","myproject.h",")","Args",":","model","(","ModelGraph",")",":","the","hls4ml","model","."]
code: def write_project_header(self, model):
      """Write the main architecture header file (myproject.h)
  
      Args:
          model (ModelGraph): the hls4ml model.
      """
  
      filedir = os.path.dirname(os.path.abspath(__file__))
      f = open(
          os.path.join(
              filedir, "../templates/vivado/firmware/myproject.h"
          )
      )
      fout = open(
          f"{model.config.get_output_dir()}/firmware/{model.config.get_project_name()}.h",
          "w",
      )
  
      model_inputs = model.get_input_variables()
      model_outputs = model.get_output_variables()
      model_brams = [
          var
          for var in model.get_weight_variables()
          if var.storage.lower() == "bram"
      ]
  
      indent = "    "
  
      for line in f.readlines():
          if "MYPROJECT" in line:
              newline = line.replace(
                  "MYPROJECT",
                  format(model.config.get_project_name().upper()),
              )
          elif "myproject" in line:
              newline = line.replace(
                  "myproject", model.config.get_project_name()
              )
          elif "// hls-fpga-machine-learning insert header" in line:
              inputs_str = ", ".join(
                  [
                      i.definition_cpp(as_reference=True)
                      for i in model_inputs
                  ]
              )
              outputs_str = ", ".join(
                  [
                      o.definition_cpp(as_reference=True)
                      for o in model_outputs
                  ]
              )
              brams_str = ", \n".join(
                  [
                      indent + b.definition_cpp(as_reference=False)
                      for b in model_brams
                  ]
              )
  
              newline = ""
              newline += indent + inputs_str + ",\n"
              newline += indent + outputs_str
              if len(model_brams) > 0:
                  newline += ",\n" + brams_str
              newline += "\n"
          else:
              newline = line
          fout.write(newline)
  
      f.close()
      fout.close()
  
imports: import glob
  import os
  import tarfile
  from collections import OrderedDict
  from shutil import copyfile, copytree, rmtree
  import numpy
  import yaml
  from hls4ml.writer.writers import Writer
label_desc: Use image node_id 5 for calling the VivadoWriter obj's underlying member method code with example usage: obj.write_project_header(model) without return types