Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 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
Exemplo n.º 5
0
    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
Exemplo n.º 6
0
    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