OpenCores
URL https://opencores.org/ocsvn/a-z80/a-z80/trunk

Subversion Repositories a-z80

[/] [a-z80/] [trunk/] [modelsim_setup.py] - Diff between revs 3 and 8

Show entire file | Details | Blame | View Log

Rev 3 Rev 8
Line 1... Line 1...
#!/usr/bin/env python
#!/usr/bin/env python3
#
#
# This script sets up the environment to run ModelSim on each module.
# This script sets up the environment to run ModelSim on each module.
#
#
# It sets up a relative path to your specific directory mapping by creating
# It sets up a relative path to your specific directory mapping by creating
# a file "mgc_location_map". We use the loction mapping so all paths to source
# a file "mgc_location_map". We use the loction mapping so all paths to source
Line 27... Line 27...
    # $ROOT/<block>/<module>/simulation/modelsim/work/<this script>.py
    # $ROOT/<block>/<module>/simulation/modelsim/work/<this script>.py
    with open("mgc_location_map", "w") as f:
    with open("mgc_location_map", "w") as f:
        f.write("$ROOT\n")
        f.write("$ROOT\n")
        path = os.path.abspath("../../../.")
        path = os.path.abspath("../../../.")
        f.write(os.path.dirname(path))
        f.write(os.path.dirname(path))
 
        print ("Setting up", os.getcwd())
 
 
# Return to our current directory after each module has been visited
# Return to our current directory after each module has been visited
abspath = os.path.abspath(__file__)
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
dname = os.path.dirname(abspath)
 
 
Line 53... Line 54...
 
 
os.chdir("cpu/toplevel/simulation/modelsim")
os.chdir("cpu/toplevel/simulation/modelsim")
setup()
setup()
os.chdir(dname)
os.chdir(dname)
 
 
os.chdir("host/basic/simulation/modelsim")
os.chdir("host/basic_de1/simulation/modelsim")
setup()
 
os.chdir(dname)
 
 
 
os.chdir("host/basic/uart/modelsim")
 
setup()
setup()
os.chdir(dname)
os.chdir(dname)
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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