docstr: Write the TCL/Shell build scripts (project.tcl, build_prj.tcl, vivado_synth.tcl, build_lib.sh)
  
  Args:
      model (ModelGraph): the hls4ml model.
docstr_tok: ["Write","the","TCL\/Shell","build","scripts","(","project.tcl",",","build_prj.tcl",",","vivado_synth.tcl",",","build_lib.sh",")","Args",":","model","(","ModelGraph",")",":","the","hls4ml","model","."]
code: def write_build_script(self, model):
      """Write the TCL/Shell build scripts (project.tcl, build_prj.tcl, vivado_synth.tcl, build_lib.sh)
  
      Args:
          model (ModelGraph): the hls4ml model.
      """
  
      filedir = os.path.dirname(os.path.abspath(__file__))
  
      # project.tcl
      f = open(f"{model.config.get_output_dir()}/project.tcl", "w")
      f.write("variable project_name\n")
      f.write(f'set project_name "{model.config.get_project_name()}"\n')
      f.write("variable backend\n")
      f.write('set backend "vivado"\n')
      f.write("variable part\n")
      f.write(
          'set part "{}"\n'.format(
              model.config.get_config_value("Part")
          )
      )
      f.write("variable clock_period\n")
      f.write(
          "set clock_period {}\n".format(
              model.config.get_config_value("ClockPeriod")
          )
      )
      f.write("variable clock_uncertainty\n")
      f.write(
          "set clock_uncertainty {}\n".format(
              model.config.get_config_value("ClockUncertainty", "12.5%")
          )
      )
      f.write("variable version\n")
      f.write(
          'set version "{}"\n'.format(
              model.config.get_config_value("Version", "1.0.0")
          )
      )
      f.close()
  
      # build_prj.tcl
      srcpath = os.path.join(
          filedir, "../templates/vivado/build_prj.tcl"
      )
      dstpath = f"{model.config.get_output_dir()}/build_prj.tcl"
      copyfile(srcpath, dstpath)
  
      # vivado_synth.tcl
      srcpath = os.path.join(
          filedir, "../templates/vivado/vivado_synth.tcl"
      )
      dstpath = f"{model.config.get_output_dir()}/vivado_synth.tcl"
      copyfile(srcpath, dstpath)
  
      # build_lib.sh
      f = open(
          os.path.join(filedir, "../templates/vivado/build_lib.sh")
      )
      fout = open(f"{model.config.get_output_dir()}/build_lib.sh", "w")
  
      for line in f.readlines():
          line = line.replace(
              "myproject", model.config.get_project_name()
          )
          line = line.replace(
              "mystamp", model.config.get_config_value("Stamp")
          )
  
          fout.write(line)
      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 12 for calling the VivadoWriter obj's underlying member method code with example usage: obj.write_build_script(model) without return types