diff options
-rw-r--r-- | eSim.bat | 4 | ||||
-rwxr-xr-x | library/tlv/clk_gate.v (renamed from src/maker/tlv/clk_gate.v) | 0 | ||||
-rwxr-xr-x | library/tlv/lint_off.txt (renamed from src/maker/lint_off.txt) | 0 | ||||
-rwxr-xr-x | library/tlv/pseudo_rand.m4out.tlv (renamed from src/maker/tlv/pseudo_rand.m4out.tlv) | 0 | ||||
-rwxr-xr-x | library/tlv/pseudo_rand.sv (renamed from src/maker/tlv/pseudo_rand.sv) | 0 | ||||
-rwxr-xr-x | library/tlv/pseudo_rand_gen.sv (renamed from src/maker/tlv/pseudo_rand_gen.sv) | 0 | ||||
-rwxr-xr-x | library/tlv/sandpiper.vh (renamed from src/maker/tlv/sandpiper.vh) | 0 | ||||
-rwxr-xr-x | library/tlv/sandpiper_gen.vh (renamed from src/maker/tlv/sandpiper_gen.vh) | 0 | ||||
-rwxr-xr-x | library/tlv/sp_default.vh (renamed from src/maker/tlv/sp_default.vh) | 0 | ||||
-rwxr-xr-x | src/maker/Maker.py | 2 | ||||
-rwxr-xr-x | src/maker/ModelGeneration.py | 31 | ||||
-rwxr-xr-x | src/maker/NgVeri.py | 24 | ||||
-rwxr-xr-x | src/maker/verilated.o | bin | 144712 -> 0 bytes |
13 files changed, 41 insertions, 20 deletions
diff --git a/eSim.bat b/eSim.bat deleted file mode 100644 index 690605d8..00000000 --- a/eSim.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -set HOME=C:\Users\<username>\ -start eSim.exe -cd /d %HOME%
\ No newline at end of file diff --git a/src/maker/tlv/clk_gate.v b/library/tlv/clk_gate.v index 77e9186d..77e9186d 100755 --- a/src/maker/tlv/clk_gate.v +++ b/library/tlv/clk_gate.v diff --git a/src/maker/lint_off.txt b/library/tlv/lint_off.txt index 5d4b7f0a..5d4b7f0a 100755 --- a/src/maker/lint_off.txt +++ b/library/tlv/lint_off.txt diff --git a/src/maker/tlv/pseudo_rand.m4out.tlv b/library/tlv/pseudo_rand.m4out.tlv index cb0d6149..cb0d6149 100755 --- a/src/maker/tlv/pseudo_rand.m4out.tlv +++ b/library/tlv/pseudo_rand.m4out.tlv diff --git a/src/maker/tlv/pseudo_rand.sv b/library/tlv/pseudo_rand.sv index a9988b58..a9988b58 100755 --- a/src/maker/tlv/pseudo_rand.sv +++ b/library/tlv/pseudo_rand.sv diff --git a/src/maker/tlv/pseudo_rand_gen.sv b/library/tlv/pseudo_rand_gen.sv index ec008179..ec008179 100755 --- a/src/maker/tlv/pseudo_rand_gen.sv +++ b/library/tlv/pseudo_rand_gen.sv diff --git a/src/maker/tlv/sandpiper.vh b/library/tlv/sandpiper.vh index ccba8b0e..ccba8b0e 100755 --- a/src/maker/tlv/sandpiper.vh +++ b/library/tlv/sandpiper.vh diff --git a/src/maker/tlv/sandpiper_gen.vh b/library/tlv/sandpiper_gen.vh index d063661a..d063661a 100755 --- a/src/maker/tlv/sandpiper_gen.vh +++ b/library/tlv/sandpiper_gen.vh diff --git a/src/maker/tlv/sp_default.vh b/library/tlv/sp_default.vh index 5e74259a..5e74259a 100755 --- a/src/maker/tlv/sp_default.vh +++ b/library/tlv/sp_default.vh diff --git a/src/maker/Maker.py b/src/maker/Maker.py index f4c696f6..78fd13b2 100755 --- a/src/maker/Maker.py +++ b/src/maker/Maker.py @@ -228,7 +228,7 @@ class Maker(QtWidgets.QWidget): code = code.replace(" reg ", " ") vlog_ex = vlog.VerilogExtractor() vlog_mods = vlog_ex.extract_objects_from_source(code) - lint_off = open("../maker/lint_off.txt").readlines() + lint_off = open(init_path + "library/tlv/lint_off.txt").readlines() string = '''\\TLV_version 1d: tl-x.org\n\\SV\n''' for item in lint_off: string += "/* verilator lint_off " + \ diff --git a/src/maker/ModelGeneration.py b/src/maker/ModelGeneration.py index caafe3c8..e7bbe9c9 100755 --- a/src/maker/ModelGeneration.py +++ b/src/maker/ModelGeneration.py @@ -106,12 +106,15 @@ class ModelGeneration(QtWidgets.QWidget): # This function is call the sandpiper to convert .tlv file to .sv file def sandpiper(self): + init_path = '../../' + if os.name == 'nt': + init_path = '' # Text="Running Sandpiper............" print("Running Sandpiper-Saas for TLV to SV Conversion") - self.cmd = "cp ../maker/tlv/clk_gate.v ../maker/tlv/pseudo_rand.sv \ -../maker/tlv/sandpiper.vh ../maker/tlv/sandpiper_gen.vh \ -../maker/tlv/sp_default.vh ../maker/tlv/pseudo_rand_gen.sv \ -../maker/tlv/pseudo_rand.m4out.tlv " + self.file + " " + self.modelpath + self.cmd = "cp " + init_path + "library/tlv/clk_gate.v " + init_path + "library/tlv/pseudo_rand.sv "\ + + init_path + "library/tlv/sandpiper.vh " + init_path + "library/tlv/sandpiper_gen.vh "\ + + init_path + "library/tlv/sp_default.vh " + init_path + "library/tlv/pseudo_rand_gen.sv "\ + + init_path + "library/tlv/pseudo_rand.m4out.tlv " + self.file + " " + self.modelpath self.process = QtCore.QProcess(self) self.args = ['-c', self.cmd] @@ -790,8 +793,12 @@ and set the load for input ports */ # This function is used to run the Verilator using the verilator commands def run_verilator(self): + init_path = '../../' + if os.name == 'nt': + init_path = '' + self.cur_dir = os.getcwd() - file = open("../maker/lint_off.txt").readlines() + file = open(init_path + "library/tlv/lint_off.txt").readlines() wno = " " for item in file: wno += " -Wno-" + item.strip("\n") @@ -823,10 +830,14 @@ and set the load for input ports */ self.cur_dir = os.getcwd() print("Make Verilator.............") os.chdir(self.modelpath) + + if os.path.exists(self.modelpath + "../verilated.o"): + os.remove(self.modelpath + "../verilated.o") + self.cmd = "make -f V" + self.fname.split('.')[0]\ + ".mk V" + self.fname.split( '.')[0] + "__ALL.a sim_main_" \ - + self.fname.split('.')[0] + ".o verilated.o" + + self.fname.split('.')[0] + ".o ../verilated.o" self.process = QtCore.QProcess(self) self.process.readyReadStandardOutput.connect(self.readAllStandard) self.process.start('sh', ['-c', self.cmd]) @@ -861,9 +872,9 @@ and set the load for input ports */ os.remove(path_icm + "sim_main_" + self.fname.split('.')[0] + ".o") if os.path.exists( self.release_home + - "src/xspice/icm/" + + "src/xspice/icm/Ngveri/" + "verilated.o"): - os.remove(self.release_home + "src/xspice/icm/" + "verilated.o") + os.remove(self.release_home + "src/xspice/icm/Ngveri/" + "verilated.o") if os.path.exists( path_icm + "V" + @@ -886,8 +897,8 @@ and set the load for input ports */ self.termtext("Current Directory: " + self.modelpath) self.termtext("Command: " + self.cmd) self.process.waitForFinished(50000) - self.cmd = "cp verilated.o " + self.release_home \ - + "/src/xspice/icm/" + self.cmd = "cp ../verilated.o " + self.release_home \ + + "/src/xspice/icm/Ngveri/" self.process.start('sh', ['-c', self.cmd]) self.termtext("Command: " + self.cmd) self.process \ diff --git a/src/maker/NgVeri.py b/src/maker/NgVeri.py index d26c9338..5f0e1bcb 100755 --- a/src/maker/NgVeri.py +++ b/src/maker/NgVeri.py @@ -252,6 +252,10 @@ class NgVeri(QtWidgets.QWidget): # This is to remove lint_off comments needed by the verilator warnings # This function writes to the lint_off.txt here in the same folder def lint_off_edit(self, text): + init_path = '../../' + if os.name == 'nt': + init_path = '' + if text == "Edit lint_off": return index = self.entry_var[2].findText(text) @@ -260,17 +264,18 @@ class NgVeri(QtWidgets.QWidget): ret = QtWidgets.QMessageBox.warning( None, "Warning", - '''<b>Do you want to remove the lint off error:''' + + '''<b>Do you want to remove the lint off error: ''' + text, QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Cancel) + if ret == QtWidgets.QMessageBox.Ok: - file = open("../maker/lint_off.txt", 'r') + file = open(init_path + "library/tlv/lint_off.txt", 'r') data = file.readlines() file.close() data.remove(text + "\n") - file = open("../maker/lint_off.txt", 'w') + file = open(init_path + "library/tlv/lint_off.txt", 'w') for item in data: file.write(item) return @@ -281,11 +286,15 @@ class NgVeri(QtWidgets.QWidget): # This is to add lint_off comments needed by the verilator warnings # This function writes to the lint_off.txt here in the same folder def add_lint_off(self): + init_path = '../../' + if os.name == 'nt': + init_path = '' + text = self.entry_var[3].text() if self.entry_var[2].findText(text) == -1: self.entry_var[2].addItem(text) - file = open("../maker/lint_off.txt", 'a+') + file = open(init_path + "library/tlv/lint_off.txt", 'a+') file.write(text + "\n") file.close() self.entry_var[3].setText("") @@ -325,7 +334,12 @@ class NgVeri(QtWidgets.QWidget): self.count += 1 self.entry_var[self.count] = QtWidgets.QComboBox() self.entry_var[self.count].addItem("Edit lint_off") - self.lint_off = open("../maker/lint_off.txt", 'r') + + init_path = '../../' + if os.name == 'nt': + init_path = '' + self.lint_off = open(init_path + "library/tlv/lint_off.txt", 'r') + self.data = self.lint_off.readlines() self.lint_off.close() for item in self.data: diff --git a/src/maker/verilated.o b/src/maker/verilated.o Binary files differdeleted file mode 100755 index db5f1163..00000000 --- a/src/maker/verilated.o +++ /dev/null |