Пример #1
0
def main():
    run('tdes_top.aag', [],
        K=4,
        performCheck=True,
        verboseFlag=False,
        synthesizedFileName='tdes_top.aag',
        parameterFileName='tdes_top.par')
Пример #2
0
def main():
    try:
        run('mult16bit.vhd', ['treeMult4b.vhd'],
            K=4,
            performCheck=True,
            verboseFlag=False)
    except Exception as e:
        print >> sys.stderr, e
        exit(1)
Пример #3
0
def main():
    try:
        run('mult.v',
            K=4,
            performCheck=True,
            generateImplementationFilesFlag=False,
            verboseFlag=False)
    except Exception as e:
        print >> sys.stderr, e
        exit(1)
Пример #4
0
def main():
    try:
        run('treeMult4b.vhd',
            K=4,
            performCheck=True,
            verboseFlag=False,
            qsfFileName='treeMult4b.qsf')
    except Exception as e:
        print >> sys.stderr, e
        exit(1)
Пример #5
0
def main():
    try:
        run('subst_row_mem.vhd',
            K=4,
            performCheck=True,
            resynthesizeFlag=True,
            verboseFlag=False)
    except Exception as e:
        print >> sys.stderr, e
        exit(1)
Пример #6
0
def main():
    try:
        run('subst_row_mem.vhd',
            K=4,
            performCheck=True,
            verboseFlag=False,
            virtexFamily='virtex2pro',
            generateImplementationFilesFlag=True)
    except Exception as e:
        print >> sys.stderr, e
        exit(1)
Пример #7
0
def main():
    try:
        run('firTree32tap.vhd', ['mult8bit.vhd', 'treeMult4b.vhd'], K=4, performCheck=True,verboseFlag=False)
    except Exception as e:
        print >>sys.stderr, e
        exit(1)
Пример #8
0
def main():
    try:
        opts, args = getopt.getopt(sys.argv[1:], "hv", ["help", "verbose"])
    except getopt.GetoptError as err:
        print err
        usage()
        sys.exit(2)
    verboseFlag = False
    for o, a in opts:
        if o in ("-h", "--help"):
            usage()
            sys.exit()
        elif o in ("-v", "--verbose"):
            verboseFlag = True
        #elif o in ("-w", "--workDir"):
        ##    baseWorkDir = a
        else:
            assert False, "unhandled option"
    designDir = args[0]
    hdlDir = args[1]
    softwareDir = args[2]
    virtexFamily = args[3]

    baseWorkDir = designDir + "/work"

    try:
        #make paths absolute
        baseDir = os.getcwd()
        if not designDir.startswith('/'): designDir = baseDir + '/' + designDir
        if not baseWorkDir.startswith('/'):
            baseWorkDir = baseDir + '/' + baseWorkDir
        if not hdlDir.startswith('/'): hdlDir = baseDir + '/' + hdlDir
        if not softwareDir.startswith('/'):
            softwareDir = baseDir + '/' + softwareDir

        if verboseFlag:
            print 'designDir: %s\nhdlDir: %s\nsoftwareDir: %s' % (
                designDir, hdlDir, softwareDir)

        assert not os.system('mkdir -p ' + hdlDir)
        assert not os.system('mkdir -p ' + softwareDir)

        os.chdir(designDir)

        vhdFileList = glob.glob('*.vhd*')
        vhdFileList = [f for f in vhdFileList if not f.endswith('~')]

        notExcludedFileList = []
        for file in vhdFileList:
            if checkFileXilinx(file) or checkFileNoTmap(file):
                createRelativeLink("%s/%s" % (designDir, file),
                                   "%s/%s" % (hdlDir, file))
                #shutil.copy(file, hdlDir)
            else:
                notExcludedFileList.append(file)

        for file in notExcludedFileList:
            if checkFileTmap(file):
                basename, ext = os.path.splitext(file)
                workDir = baseWorkDir + '/' + basename
                lstcpy = [item for item in notExcludedFileList if item != file]

                run(file,
                    lstcpy,
                    performCheck=True,
                    verboseFlag=verboseFlag,
                    virtexFamily=virtexFamily,
                    generateImplementationFilesFlag=True)

                #copy results
                os.system("rm -f %s/%s.vhd" % (hdlDir, basename))
                shutil.copy("%s/%s-simpletmap.vhd" % (workDir, basename),
                            "%s/%s.vhd" % (hdlDir, basename))
                shutil.copy("%s/%s.c" % (workDir, basename), softwareDir)
                shutil.copy("%s/%s.h" % (workDir, basename), softwareDir)
            else:
                createRelativeLink("%s/%s" % (designDir, file),
                                   "%s/%s" % (hdlDir, file))
                #shutil.copy(file, hdlDir)

    except Exception as e:
        print >> sys.stderr, e
        if verboseFlag:
            raise
        exit(1)
Пример #9
0
def main():
    try:
        run('rom.vhd', K=6, performCheck=True, verboseFlag=False)
    except Exception as e:
        print >> sys.stderr, e
        exit(1)
Пример #10
0
def main():
    run('k_AES.aag', [], K=4, performCheck=True, verboseFlag=False, synthesizedFileName='k_AES.aag', parameterFileName='k_AES.par')
Пример #11
0
def main():
    try:
        run('subst_row_mem.vhd', K=4, performCheck=True, resynthesizeFlag=True, verboseFlag=False)
    except Exception as e:
        print >>sys.stderr, e
        exit(1)
Пример #12
0
def main():
    try:
        run('tcam.vhd',['pkg.vhd'], K=4, performCheck=True, verboseFlag=False)
    except Exception as e:
        print >>sys.stderr, e
        exit(1)
Пример #13
0
def main():
    try:
        run("rom.vhd", K=6, performCheck=True, verboseFlag=False)
    except Exception as e:
        print >>sys.stderr, e
        exit(1)
Пример #14
0
def main():
    try:
        run('tcam.vhd', ['pkg.vhd'], K=4, performCheck=True, verboseFlag=False)
    except Exception as e:
        print >> sys.stderr, e
        exit(1)
Пример #15
0
def main():
    try:
        run('mult.v', K=4, performCheck=True, generateImplementationFilesFlag=False, verboseFlag=False)
    except Exception as e:
        print >>sys.stderr, e
        exit(1)
Пример #16
0
def main():
    run('rom.vhd', performCheck=True, verboseFlag=False, generateImplementationFilesFlag=True, virtexFamily='virtex5')
    assert not os.system('xst -ifn rom_xst.scr')
Пример #17
0
def main():
    try:
        run('treeMult4b.vhd', K=4, performCheck=True, verboseFlag=False, qsfFileName='treeMult4b.qsf')
    except Exception as e:
        print >>sys.stderr, e
        exit(1)
Пример #18
0
def main():
    try:
        run('subst_row_mem.vhd', K=4, performCheck=True, verboseFlag=False, virtexFamily='virtex2pro', generateImplementationFilesFlag=True)
    except Exception as e:
        print >>sys.stderr, e
        exit(1)