示例#1
0
def run(design):
    os.chdir(design.path)
    shutil.copyfile(
        os.path.join(paths.getScriptsDir(), "ModelsimListener.tcl"),
        "ModelsimListener.tcl")

    fp = open("Inspect.config", "w")
    fp.write("ModelsimPath=" +
             os.path.split(modelsim.Modelsim.getVsimPath())[0] + os.sep + "\n")
    fp.write("LegUpPath=" + paths.getLegUpDir() + os.sep + "\n")
    fp.write("ExamplePath=" + design.path + os.sep + "\n")
    fp.write("ExampleFile=" + design.name + "\n")
    fp.write("DBHost=localhost\n")
    fp.write("DBUser=root\n")
    fp.write("DBPass=letmein\n")
    fp.write("DBName=inspect_db\n")
    fp.close()

    #         discrepancyBinPath = "/home/jgoeders/Dropbox/linux/legup-repo/InspectDebugger/Inspect/InspectDebugger"

    #         self.process = subprocess.Popen([discrepancyBinPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE)

    # By default when you call a new terminal it returns immediately (even if you don't use '&')
    # --disable-factory forces it to run blocking
    p = subprocess.Popen(
        ["gnome-terminal", "--disable-factory", "-x",
         binPath()])
    p.wait()
示例#2
0
 def run(self):
     
     vsimPath = self.getVsimPath()
     
     listenerScriptPath = os.path.join(paths.getScriptsDir(), "ModelsimListener.tcl")
     remoteFileLoadCommand = listenerScriptPath
     FNULL = open(os.devnull, 'w')
     self.process = subprocess.Popen([vsimPath, "-c", "-do", remoteFileLoadCommand], stdout = FNULL, stderr = FNULL)
     
     success = False
     self.sock = socket.socket()
     for _ in range(15):
         try:
             self.sock.connect(("127.0.0.1", 2000,))
         except ConnectionRefusedError:
             time.sleep(1)
         else:
             success = True
             break
         
     assert success
     print (self.getSocketData())
     self.socketClosed = False
示例#3
0
def run(design):
    os.chdir(design.path)
    shutil.copyfile(os.path.join(paths.getScriptsDir(), "ModelsimListener.tcl"), "ModelsimListener.tcl")

    fp = open("Inspect.config", "w")
    fp.write("ModelsimPath=" + os.path.split(modelsim.Modelsim.getVsimPath())[0] + os.sep + "\n")
    fp.write("LegUpPath=" + paths.getLegUpDir() + os.sep + "\n")
    fp.write("ExamplePath=" + design.path + os.sep + "\n")
    fp.write("ExampleFile=" + design.name + "\n")
    fp.write("DBHost=localhost\n")
    fp.write("DBUser=root\n")
    fp.write("DBPass=letmein\n")
    fp.write("DBName=inspect_db\n")
    fp.close()

    #         discrepancyBinPath = "/home/jgoeders/Dropbox/linux/legup-repo/InspectDebugger/Inspect/InspectDebugger"

    #         self.process = subprocess.Popen([discrepancyBinPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE)

    # By default when you call a new terminal it returns immediately (even if you don't use '&')
    # --disable-factory forces it to run blocking
    p = subprocess.Popen(["gnome-terminal", "--disable-factory", "-x", binPath()])
    p.wait()