def METHOD_NAME(self):
    """fill and write ys script.
    """
    read_files = self._import_sources()
    format_dict = {
        "build_name"  : self._build_name,
        "read_files"  : read_files,
        "synth_opts"  : self._yosys_opts,
        "target"      : self._target,
        "synth_fmt"   : self._synth_format,
        "write_fmt"   : "verilog" if self._synth_format[0] == "v" else self._synth_format,
        "write_opts"  : "-pvector bra -attrprop" if self._synth_format == "edif" else "",
        "output_name" : self._output_name,
    }
    yosys_cmds = [l.format(**format_dict) for l in self._yosys_cmds]
    format_dict["yosys_cmds"] = "\n".join(yosys_cmds)
    ys = [l.format(**format_dict) for l in self._template]
    tools.write_to_file(self._build_name + ".ys", "\n".join(ys))