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

Subversion Repositories a-z80

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

Go to most recent revision | 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 prepares ModelSim *.mpf files for committing to git
# This script prepares ModelSim *.mpf files for committing to git
#
#
# Why is this necessary?
# Why is this necessary?
#
#
Line 82... Line 82...
                    for k,v in sorted(pf.items()):
                    for k,v in sorted(pf.items()):
                        g.write("Project_File_{0} = {1}".format(i, k))
                        g.write("Project_File_{0} = {1}".format(i, k))
                        g.write("Project_File_P_{0} = {1}".format(i, v))
                        g.write("Project_File_P_{0} = {1}".format(i, v))
                        i = i + 1
                        i = i + 1
                    in_file_section = 0
                    in_file_section = 0
                g.write(line)
                g.write(line.strip() + "\n") # Trim whitespaces that ModelSim sometimes adds randomly
        # Lastly, replace old mpf file with the new one
        # Lastly, replace old mpf file with the new one
        os.remove(file)
        os.remove(file)
        os.rename(file+".new", file)
        os.rename(file+".new", file)
 
 
# Return to our current directory after each module has been visited
# Return to our current directory after each module has been visited
Line 112... Line 112...
 
 
os.chdir("cpu/toplevel/simulation/modelsim")
os.chdir("cpu/toplevel/simulation/modelsim")
fixup()
fixup()
os.chdir(dname)
os.chdir(dname)
 
 
os.chdir("host/basic/simulation/modelsim")
os.chdir("host/basic_de1/simulation/modelsim")
fixup()
 
os.chdir(dname)
 
 
 
os.chdir("host/basic/uart/modelsim")
 
fixup()
fixup()
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.