Exemplo n.º 1
0
def get_bluespec_verilog(env, resultArray = {}, filePath='Verilog'):
    bluespecdir = env['ENV']['BLUESPECDIR']
    
    fileProc = subprocess.Popen(["ls", "-1", bluespecdir + '/' + filePath + '/'], stdout = subprocess.PIPE)
    fileList = fileProc.stdout.read()
    fileArray = model.clean_split(fileList, sep = '\n')
    for file in fileArray:
        ## Skip some Bluespec Verilog files because they cause problems...
        if ((file == 'main.v') or (file == 'ConstrainedRandom.v')):
            continue

        ## The SizedFIFO in Verilog.Vivado tags the memory as distributed.
        ## This caused at least Vivado 2014.4 to crash when building the
        ## VC707 platform.  We will use the standard SizedFIFO without the
        ## tag.  Vivado still infers distributed RAM.
        if ((file == 'SizedFIFO.v') and (filePath == 'Verilog.Vivado')):
            continue

        if (file[-2:] == '.v'):
            resultArray[file] = bluespecdir + '/' + filePath + '/' + file

    fileProc = subprocess.Popen(["ls", "-1", bluespecdir + '/Libraries/'], stdout = subprocess.PIPE)
    fileList = fileProc.stdout.read()
    fileArray = model.clean_split(fileList, sep = '\n')
    for file in fileArray:
        if ((file[-2:] == '.v') and
            (file[:6] != 'xilinx')):
            resultArray[file] = bluespecdir + '/Libraries/' + file

    return resultArray
Exemplo n.º 2
0
Arquivo: BSV.py Projeto: chenm001/leap
    def __bsc_bdir_prune(self, str_in, sep, match):
        t = model.clean_split(str_in, sep)

        # Make the list unique to avoid Bluespec complaints about duplicate paths.
        seen = set()
        t = [e for e in t if e not in seen and not seen.add(e)]

        if (bsv_tool.getBluespecVersion() >= 15480):
            try:
                while 1:
                    i = t.index(match)
                    del t[i]
            except ValueError:
                pass

        return string.join(t, sep)
Exemplo n.º 3
0
Arquivo: BSV.py Projeto: chenm001/leap
    def __bsc_bdir_prune(self, str_in, sep, match):
        t = model.clean_split(str_in, sep)

        # Make the list unique to avoid Bluespec complaints about duplicate paths.
        seen = set()
        t = [e for e in t if e not in seen and not seen.add(e)]

        if (bsv_tool.getBluespecVersion() >= 15480):
            try:
                while 1:
                    i = t.index(match)
                    del t[i]
            except ValueError:
                pass

        return string.join(t, sep)