def stimulus(self, d, clk, reset): reset.next = ACTIVE_LOW yield negedge(clk) reset.next = INACTIVE_HIGH for v in self.vals: d.next = v yield negedge(clk) raise StopSimulation
def stimulus(self, enable, clock, reset): reset.next = ACTIVE_LOW yield negedge(clock) reset.next = INACTIVE_HIGH for i in range(1000): enable.next = min(1, randrange(5)) yield negedge(clock) raise StopSimulation
def stimulus(self, clk, phase, cos): phase.next = 0x18a9c71c for i in range(32): yield negedge(clk) cosa = np.zeros(16384) for i in range(16384): cosa[i] = cos >> 2 yield clk.negedge np.save("cosa", cosa) raise StopSimulation
def stimulus(self, clk, phase, cos): phase.next = 0x18a9c71c for i in range(32): yield negedge(clk) cosa = np.zeros(16384) for i in range(16384): cosa[i] = cos >> 2 yield clk.negedge np.save("cosa",cosa) raise StopSimulation