Esempio n. 1
0
File: vcd.py Progetto: zyp/litescope
 def generate_dumpvars(self):
     r = "$dumpvars\n"
     for v in self.variables:
         v.current_value = "x"
         r += "b"
         r += dec2bin(v.current_value, v.width)
         r += " "
         r += v.code
         r += "\n"
     r += "$end\n"
     return r
Esempio n. 2
0
 def generate_dumpvars(self):
     r = "$dumpvars\n"
     for v in self.variables:
         v.current_value = "x"
         r += "b"
         r += dec2bin(v.current_value, v.width)
         r += " "
         r += v.vcd_id
         r += "\n"
     r += "$end\n"
     return r
Esempio n. 3
0
File: csv.py Progetto: zyp/litescope
 def generate_dumpvars(self):
     r = ""
     for i in range(len(self)):
         for variable in self.variables:
             try:
                 variable.current_value = variable.values[i]
             except:
                 pass
             if variable.current_value == "x":
                 r += "x"
             else:
                 r += dec2bin(variable.current_value, variable.width)
             r += ", "
         r += "\n"
     return r
Esempio n. 4
0
 def generate_dumpvars(self):
     r = ""
     for i in range(len(self)):
         for variable in self.variables:
             try:
                 variable.current_value = variable.values[i]
             except:
                 pass
             if variable.current_value == "x":
                 r += "x"
             else:
                 r += dec2bin(variable.current_value, variable.width)
             r += ", "
         r += "\n"
     return r
Esempio n. 5
0
File: vcd.py Progetto: zyp/litescope
 def change(self):
     r = ""
     c = ""
     for v in self.variables:
         try:
             if v.values[self.cnt + 1] != v.current_value:
                 c += "b"
                 c += dec2bin(v.values[self.cnt + 1], v.width)
                 c += " "
                 c += v.code
                 c += "\n"
         except:
             pass
     if c != "":
         r += "#"
         r += str(self.cnt + 1)
         r += "\n"
         r += c
     return r
Esempio n. 6
0
 def change(self):
     r = ""
     c = ""
     for v in self.variables:
         try:
             if v.values[self.cnt + 1] != v.current_value:
                 c += "b"
                 c += dec2bin(v.values[self.cnt + 1], v.width)
                 c += " "
                 c += v.vcd_id
                 c += "\n"
         except:
             pass
     if c != "":
         r += "#"
         r += str(self.cnt+1)
         r += "\n"
         r += c
     return r