def METHOD_NAME(reset_address, with_icache, with_dcache, with_muldiv, verilog_filename):
    cli_params = []
    cli_params.append("--reset-addr={}".format(reset_address))
    if with_icache:
        cli_params.append("--with-icache")
    if with_dcache:
        cli_params.append("--with-dcache")
    if with_muldiv:
        cli_params.append("--with-muldiv")
    cli_params.append("generate")
    cli_params.append("--type=v")
    sdir = get_data_mod("cpu", "minerva").data_location
    if subprocess.call(["python3", os.path.join(sdir, "cli.py"), *cli_params],
        stdout=open(verilog_filename, "w")):
        raise OSError("Unable to elaborate Minerva CPU, please check your Amaranth/Yosys install")