예제 #1
0
파일: bitsVal.py 프로젝트: kermit0124/hwt
 def __floordiv__(self, other) -> "Bits3val":
     other = toHVal(other)
     if isinstance(self, Value) and isinstance(other, Value):
         return Bits3val.__floordiv__(self, other)
     else:
         return Operator.withRes(AllOps.MUL, [self, other],
                                 self._dtype.__copy__())
예제 #2
0
파일: bitsVal.py 프로젝트: saislam/hwt
 def __floordiv__(self, other) -> "Bits3val":
     other = toHVal(other, suggestedType=self._dtype)
     if isinstance(self, HValue) and isinstance(other, HValue):
         return Bits3val.__floordiv__(self, other)
     else:
         if not isinstance(other._dtype, self._dtype.__class__):
             raise TypeError()
         return Operator.withRes(AllOps.DIV, [self, other],
                                 self._dtype.__copy__())