Ejemplo n.º 1
0
Archivo: vcd.py Proyecto: 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
Ejemplo 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
Ejemplo n.º 3
0
Archivo: csv.py Proyecto: 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
Ejemplo 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
Ejemplo n.º 5
0
Archivo: vcd.py Proyecto: 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
Ejemplo 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