docs: def addVar(self, sig: object, name: str, sigType: VCD_SIG_TYPE, width: int,
                 valueFormatter: Callable[["Value"], str]):
          """
          Add variable to scope
  
          :ivar sig: user specified object to keep track of VcdVarInfo in change() 
          :ivar sigType: vcd type name
          :ivar valueFormatter: value which converts new value in change() to vcd string
          """
          vInf = self._writer._idScope.registerVariable(sig, name, self, width,
                                                        sigType, valueFormatter)
          self.children[vInf.name] = vInf
          self._writer._oFile.write("$var %s %d %s %s $end\n" % (
              sigType, vInf.width, vInf.vcdId, vInf.name))