コード例 #1
0
def m_serio_ex(clock, reset, sdi, sdo, Np=8):

    pin = [Signal(intbv(0)[8:]) for _ in range(Np)]
    pout = [Signal(intbv(0)[8:]) for _ in range(Np)]

    gserio = m_serio(clock, reset, sdi, sdo, pin, pout)

    @always_seq(clock.posedge, reset=reset)
    def rtl():
        for ii in range(Np):
            pout[ii].next = pin[ii]

    return gserio, rtl
コード例 #2
0
ファイル: convert_serio.py プロジェクト: cfelton/minnesota
def m_serio_ex(clock, reset, sdi, sdo, Np=8):
    
    pin = [Signal(intbv(0)[8:]) for _ in range(Np)]
    pout = [Signal(intbv(0)[8:]) for _ in range(Np)]

    gserio = m_serio(clock, reset, sdi, sdo, pin, pout)

    @always_seq(clock.posedge, reset=reset)
    def rtl():
        for ii in range(Np):
            pout[ii].next = pin[ii]

    return gserio, rtl
コード例 #3
0
ファイル: test_serio.py プロジェクト: rowhit/minnesota
    def _test():
        tbclk = clock.gen()
        tbdut = m_serio(clock, reset, sdi, sdo, pin, pout)

        @instance
        def tbstim():
            yield reset.pulse(13)
            yield clock.posedge

            # @todo: actually test something
            for ii in range(1000):
                yield clock.posedge

            raise StopSimulation

        return tbdut, tbclk, tbstim