예제 #1
0
def clean_build(env):
    config = utils.read_config(env)
    base_dir = utils.get_project_base()
    build_dir = utils.get_build_directory(config, absolute = True)
    xmsgs_dir = os.path.join(base_dir, "_xmsgs")
    xlnx_auto = os.path.join(base_dir, "xlnx_auto_0_xdb")
    config_log = os.path.join(base_dir, "config.log")
    xdevice_details = os.path.join(base_dir, "xilinx_device_details.xml")
    map_report = "%s_map.xrpt" % config["top_module"]
    map_report = os.path.join(base_dir, map_report)

    par_usage = os.path.join(base_dir, "par_usage_statistics.html")
    par_report = "%s_par.xrpt" % config["top_module"]
    par_report = os.path.join(base_dir, par_report)

    #Coregen
    coregen_log = os.path.join(base_dir, "coregen.log")


    print "Removing Directories/Files:"

    if os.path.exists(build_dir):
        print "\t%s" % build_dir
        shutil.rmtree(build_dir)
    if os.path.exists(xmsgs_dir):
        print "\t%s" % xmsgs_dir
        shutil.rmtree(xmsgs_dir)
    if os.path.exists(xlnx_auto):
        print "\t%s" % xlnx_auto
        shutil.rmtree(xlnx_auto)
    if os.path.exists(config_log):
        print "\t%s" % config_log
        os.remove(config_log)
    if os.path.exists(xdevice_details):
        print "\t%s" % xdevice_details
        os.remove(xdevice_details)
    if os.path.exists(map_report):
        print "\t%s" % map_report
        os.remove(map_report)
    if os.path.exists(par_usage):
        print "\t%s" % par_usage
        os.remove(par_usage)
    if os.path.exists(par_report):
        print "\t%s" % par_report
        os.remove(par_report)
    if os.path.exists(coregen_log):
        print "\t%s" % coregen_log
        os.remove(coregen_log)
예제 #2
0
def get_trace_dir(config, absolute=False):
    """Returns the trace output directory location

    Args:
        config (dictionary): configuration dictionary
        absolute (boolean):
            False (default): Relative to project base
            True: Absolute

    Returns:
        (string): string representation of the path to the output

    Raises:
        Nothing
    """
    build_dir = utils.get_build_directory(config, absolute)
    trace_dir = os.path.join(build_dir, TRACE_DIR)
    return trace_dir
예제 #3
0
def get_bitgen_dir(config, absolute = False):
    """Returns the bitgen output directory location

    Args:
        config (dictionary): configuration dictionary
        absolute (boolean):
            False (default): Relative to project base
            True: Absolute

    Returns:
        (string): string representation of the path to the output

    Raises:
        Nothing
    """
    build_dir = utils.get_build_directory(config, absolute)
    bitgen_dir = os.path.join(build_dir, BITGEN_DIR)
    return bitgen_dir
def get_coregen_temp_dir(config, absolute = False):
    """Returns the temporary coregen directory location

    Args:
        config (dictionary): configuration dictionary
        absolute (boolean):
            False (default): Relative to project base
            True: Absolute

    Return:
        (string): string representation of the path to the output

    Raises:
        Nothing
    """
    build_dir = utils.get_build_directory(config, absolute)
    temp_dir = os.path.join(build_dir, COREGEN_DIR, COREGEN_TEMP_DIR)
    return temp_dir
예제 #5
0
def get_coregen_temp_dir(config, absolute=False):
    """Returns the temporary coregen directory location

    Args:
        config (dictionary): configuration dictionary
        absolute (boolean):
            False (default): Relative to project base
            True: Absolute

    Return:
        (string): string representation of the path to the output

    Raises:
        Nothing
    """
    build_dir = utils.get_build_directory(config, absolute)
    temp_dir = os.path.join(build_dir, COREGEN_DIR, COREGEN_TEMP_DIR)
    return temp_dir
예제 #6
0
def CleanBuild(env, targets):
    import os
    import shutil
    import utils
    if not env.GetOption('clean'):
        return
    # normalize targets to absolute paths
    config = utils.read_config(env)
    base_dir = utils.get_project_base()
    build_dir = utils.get_build_directory(config)
    xmsgs_dir = os.path.join(base_dir, "_xmsgs")

    print "Directories to remove:"
    print "\t%s" % build_dir
    print "\t%s" % xmsgs_dir

    #shutil.rmtree(build_dir)
    #shutil.rmtree(xmsg_dir)
    return 0
def CleanBuild(env, targets):
    import os
    import shutil
    import utils
    if not env.GetOption('clean'):
        return
    # normalize targets to absolute paths
    config = utils.read_config(env)
    base_dir = utils.get_project_base()
    build_dir = utils.get_build_directory(config)
    xmsgs_dir = os.path.join(base_dir, "_xmsgs")

    print "Directories to remove:"
    print "\t%s" % build_dir
    print "\t%s" % xmsgs_dir

    #shutil.rmtree(build_dir)
    #shutil.rmtree(xmsg_dir)
    return 0