|
|
|
@ -10,7 +10,7 @@ import math
@@ -10,7 +10,7 @@ import math
|
|
|
|
|
|
|
|
|
|
import numpy as np |
|
|
|
|
|
|
|
|
|
from . import numba, logic, hr_bytes, sim, eng |
|
|
|
|
from . import numba, logic, hr_bytes, sim, eng, cdiv |
|
|
|
|
from .circuit import Circuit |
|
|
|
|
|
|
|
|
|
class LogicSim(sim.SimOps): |
|
|
|
@ -28,7 +28,7 @@ class LogicSim(sim.SimOps):
@@ -28,7 +28,7 @@ class LogicSim(sim.SimOps):
|
|
|
|
|
self.m = m |
|
|
|
|
self.mdim = math.ceil(math.log2(m)) |
|
|
|
|
self.sims = sims |
|
|
|
|
nbytes = (sims - 1) // 8 + 1 |
|
|
|
|
nbytes = cdiv(sims, 8) |
|
|
|
|
|
|
|
|
|
self.c = np.zeros((self.c_len, self.mdim, nbytes), dtype=np.uint8) |
|
|
|
|
self.s = np.zeros((2, self.s_len, 3, nbytes), dtype=np.uint8) |
|
|
|
|