OpenCores
URL https://opencores.org/ocsvn/tv80/tv80/trunk

Subversion Repositories tv80

[/] [tv80/] [trunk/] [sc_env/] [app_localcfg/] [build.py] - Blame information for rev 102

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 102 ghutchis
#!/usr/bin/python
2
 
3
import os,sys
4
from stat import *
5
 
6
filelist = ["lcfg.v","tv80_alu.v","tv80_core.v",
7
            "tv80_mcode.v","tv80_reg.v","tv80s.v",
8
            "lcfg_cfgo_regs.v","lcfg_memctl.v",
9
            "lcfg_cfgo_driver.v","behave1p_mem.v"]
10
basepath = "../../rtl"
11
command = "verilator --sc --trace -O3"
12
 
13
def walktree (top, target):
14
    found = ""
15
    for f in os.listdir(top):
16
        pathname = os.path.join(top, f)
17
        mode = os.stat(pathname)[ST_MODE]
18
        if S_ISDIR(mode):
19
            found = walktree (pathname, target)
20
            if (found != ''): return found
21
        elif S_ISREG(mode):
22
            if os.path.basename(f) == target:
23
                return pathname
24
        else:
25
            print "Skipping %s" % pathname
26
    return ""
27
 
28
def run_verilator ():
29
    expfilelist = map(lambda x:walktree(basepath,x), filelist)
30
    cmd = command + " " + " ".join(expfilelist)
31
    print "Executing",cmd
32
    os.system (cmd)
33
 
34
#f = walktree (basepath, filelist[0])
35
#print expfilelist
36
#print f
37
 
38
run_verilator()
39
 
40
 
41
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.