コード例 #1
0
ファイル: test_ops.py プロジェクト: Alisa-lisa/uni-stuff
def unaryOps_v(name,
               Not,
               Invert,
               UnaryAdd,
               UnarySub,
               arg):
   return setupCosimulation(**locals())
コード例 #2
0
ファイル: test_signed.py プロジェクト: ywong587/myhdl
def binaryOps_v(
        name,
        ##                Bitand,
        ##                 Bitor,
        ##                 Bitxor,
        ##                 FloorDiv,
        LeftShift,
        ##                 Mod,
        Mul,
        ##                 Pow,
        RightShift,
        Sub,
        Sum,
        Sum1,
        Sum2,
        Sum3,
        EQ,
        NE,
        LT,
        GT,
        LE,
        GE,
        And,
        Or,
        left,
        right,
        bit):
    return setupCosimulation(**locals())
コード例 #3
0
ファイル: test_ops.py プロジェクト: Alisa-lisa/uni-stuff
def multiOps_v( name,
                Bitand,
                Bitor,
                Bitxor,
                And,
                Or,
                argm, argn, argp):

    return setupCosimulation(**locals())
コード例 #4
0
ファイル: test_inc_initial.py プロジェクト: Thomasb81/myhdl
def top(name, count, enable, clock, reset, n, arch="myhdl"):
    if arch == "verilog":
        return setupCosimulation(**locals())
        if path.exists(objfile):
            os.remove(objfile)
        os.system(analyze_cmd)
        return Cosimulation(simulate_cmd, **locals())
    else:
        inc_initial_inst = inc_initial(count, enable, clock, reset, n)
        return inc_initial_inst
コード例 #5
0
ファイル: test_inc_initial.py プロジェクト: Cadavis8/myhdl
def top(name, count, enable, clock, reset, n, arch="myhdl"):
    if arch == "verilog":
        return setupCosimulation(**locals())
        if path.exists(objfile):
            os.remove(objfile)
        os.system(analyze_cmd)
        return Cosimulation(simulate_cmd, **locals())
    else:
        inc_initial_inst = inc_initial(count, enable, clock, reset, n)
        return inc_initial_inst
コード例 #6
0
ファイル: test_ops.py プロジェクト: Alisa-lisa/uni-stuff
def augmOps_v(  name,
                Bitand,
                Bitor,
                Bitxor,
                FloorDiv,
                LeftShift,
                Mod,
                Mul,
                RightShift,
                Sub,
                Sum,
                left, right):
    return setupCosimulation(**locals())
コード例 #7
0
ファイル: test_signed.py プロジェクト: ywong587/myhdl
def augmOps_v(
        name,
        ##                 Bitand,
        ##                 Bitor,
        ##                 Bitxor,
        ##                 FloorDiv,
        LeftShift,
        ##                 Mod,
        Mul,
        RightShift,
        Sub,
        Sum,
        left,
        right):
    return setupCosimulation(**locals())
コード例 #8
0
ファイル: test_ops.py プロジェクト: Alisa-lisa/uni-stuff
def binaryOps_v(name,
                Bitand,
                Bitor,
                Bitxor,
                FloorDiv,
                LeftShift,
                Mod,
                Mul,
                Pow,
                RightShift,
                Sub,
                Sum,
                EQ,
                NE,
                LT,
                GT,
                LE,
                GE,
                And,
                Or,
                left, right):
    return setupCosimulation(**locals())
コード例 #9
0
def binaryOps_v(name,
##                Bitand,
##                 Bitor,
##                 Bitxor,
##                 FloorDiv,
                LeftShift,
##                 Mod,
                Mul,
##                 Pow,
                RightShift,
                Sub,
                Sum, Sum1, Sum2, Sum3,
                EQ,
                NE,
                LT,
                GT,
                LE,
                GE,
                And,
                Or,
                left, right, bit):
    return setupCosimulation(**locals())
コード例 #10
0
ファイル: test_tristate.py プロジェクト: ywong587/myhdl
    def bench(self, obuf=None):
        if obuf:
            toVerilog(tristate_obuf_i, obuf)
            A, Y, OE = obuf.interface()
        else:
            Y = TristateSignal(True)
            A = Signal(True)
            OE = Signal(False)
            toVerilog(tristate_obuf, A, Y, OE)

        inst = setupCosimulation(name='tristate_obuf', **toVerilog.portmap)
        #inst = tristate_obuf(A, Y, OE)

        @instance
        def stimulus():
            yield delay(1)
            #print now(), A, OE, Y
            self.assertEqual(Y, None)

            OE.next = True
            yield delay(1)
            #print now(), A, OE, Y
            self.assertEqual(Y, A)

            A.next = not A
            yield delay(1)
            #print now(), A, OE, Y
            self.assertEqual(Y, A)

            OE.next = False
            yield delay(1)
            #print now(), A, OE, Y
            self.assertEqual(Y, None)

            raise StopSimulation

        return instances()
コード例 #11
0
ファイル: test_tristate.py プロジェクト: Cadavis8/myhdl
    def bench(self, obuf=None):
        if obuf:
            toVerilog(tristate_obuf_i, obuf)
            A, Y, OE = obuf.interface()
        else:
            Y  = TristateSignal(True)
            A  = Signal(True)
            OE = Signal(False)
            toVerilog(tristate_obuf, A, Y, OE)

        inst = setupCosimulation(name='tristate_obuf', **toVerilog.portmap)
        #inst = tristate_obuf(A, Y, OE)

        @instance
        def stimulus():
            yield delay(1)
            #print now(), A, OE, Y
            self.assertEqual(Y, None)

            OE.next = True
            yield delay(1)
            #print now(), A, OE, Y
            self.assertEqual(Y, A)

            A.next = not A
            yield delay(1)
            #print now(), A, OE, Y
            self.assertEqual(Y, A)

            OE.next = False
            yield delay(1)
            #print now(), A, OE, Y
            self.assertEqual(Y, None)

            raise StopSimulation
        return instances()
コード例 #12
0
def GrayIncReg_v(name, graycnt, enable, clock, reset, width):
    return setupCosimulation(**locals())
コード例 #13
0
def Infertest_v(name, a, out):
    return setupCosimulation(**locals())
コード例 #14
0
ファイル: test_misc.py プロジェクト: Alisa-lisa/uni-stuff
def ConstWire_v(name, p, q):
    return setupCosimulation(**locals())
コード例 #15
0
def multiOps_v(name, Bitand, Bitor, Bitxor, And, Or, argm, argn, argp):

    return setupCosimulation(**locals())
コード例 #16
0
def design_v(name, a, b, c, d, p, q, r):
    return setupCosimulation(**locals())
コード例 #17
0
ファイル: test_signed.py プロジェクト: ywong587/myhdl
def expressions_v(a, b, clk):
    return setupCosimulation(**locals())
コード例 #18
0
ファイル: test_signed.py プロジェクト: ywong587/myhdl
def unaryOps_v(name, Not, Invert, UnaryAdd, UnarySub, arg):
    return setupCosimulation(**locals())
コード例 #19
0
def expressions_v(a, b, clk):
   return setupCosimulation(**locals())
コード例 #20
0
def HecCalculator_v(name, hec, header):
    return setupCosimulation(**locals())
コード例 #21
0
ファイル: test_fsm.py プロジェクト: Alisa-lisa/uni-stuff
def FramerCtrl_v(name, SOF, state, syncFlag, clk, reset_n):
    return setupCosimulation(**locals())
コード例 #22
0
ファイル: test_always_comb.py プロジェクト: ywong587/myhdl
def design_v(name, a, b, c, d, p, q, r):
    return setupCosimulation(**locals())
コード例 #23
0
ファイル: test_hec.py プロジェクト: Alisa-lisa/uni-stuff
def HecCalculator_v(name, hec, header):
    return setupCosimulation(**locals())
コード例 #24
0
def binaryOps_v(name, Bitand, Bitor, Bitxor, FloorDiv, LeftShift, Mod, Mul,
                Pow, RightShift, Sub, Sum, EQ, NE, LT, GT, LE, GE, And, Or,
                left, right):
    return setupCosimulation(**locals())
コード例 #25
0
ファイル: test_infer.py プロジェクト: Cadavis8/myhdl
def Infertest_v(name, a, out):
    return setupCosimulation(**locals())
コード例 #26
0
def RandomScrambler_v(name,
                      o7, o6, o5, o4, o3, o2, o1, o0,
                      i7, i6, i5, i4, i3, i2, i1, i0):
    return setupCosimulation(**locals())
コード例 #27
0
def edge_v(name, flag, sig, clock):
    return setupCosimulation(**locals())
コード例 #28
0
ファイル: test_GrayInc.py プロジェクト: Cadavis8/myhdl
def GrayIncReg_v(name, graycnt, enable, clock, reset, width):
    return setupCosimulation(**locals())
コード例 #29
0
ファイル: test_beh.py プロジェクト: Alisa-lisa/uni-stuff
def beh_v(name, count, enable, clock, reset):
    return setupCosimulation(**locals())
コード例 #30
0
ファイル: test_rom.py プロジェクト: Alisa-lisa/uni-stuff
def rom_v(name, dout, addr, clk):
    return setupCosimulation(**locals())
コード例 #31
0
ファイル: test_misc.py プロジェクト: Alisa-lisa/uni-stuff
def ConstWire_v(name, p, q):
    return setupCosimulation(**locals())
コード例 #32
0
ファイル: test_bin2gray.py プロジェクト: ywong587/myhdl
def bin2gray_v(name, B, G):
    return setupCosimulation(**locals())
コード例 #33
0
ファイル: test_fsm.py プロジェクト: Cadavis8/myhdl
def FramerCtrl_v(name, SOF, state, syncFlag, clk, reset_n):
    return setupCosimulation(**locals())
コード例 #34
0
ファイル: test_beh.py プロジェクト: Cadavis8/myhdl
def beh_v(name, count, enable, clock, reset):
    return setupCosimulation(**locals())
コード例 #35
0
def LoopTest_v(name, a, out):
    return setupCosimulation(**locals())
コード例 #36
0
ファイル: test_loops.py プロジェクト: Alisa-lisa/uni-stuff
def LoopTest_v(name, a, out):
    return setupCosimulation(**locals())
コード例 #37
0
ファイル: test_misc.py プロジェクト: Alisa-lisa/uni-stuff
def Ignorecode_v(name, a, b, c):
    return setupCosimulation(**locals())
コード例 #38
0
def bin2gray_v(name, B, G):
    return setupCosimulation(**locals())
コード例 #39
0
ファイル: test_ram.py プロジェクト: Alisa-lisa/uni-stuff
def ram_v(name, dout, din, addr, we, clk, depth=4):
    return setupCosimulation(**locals())
コード例 #40
0
ファイル: test_ram.py プロジェクト: Cadavis8/myhdl
def ram_v(name, dout, din, addr, we, clk, depth=4):
    return setupCosimulation(**locals())
コード例 #41
0
ファイル: test_misc.py プロジェクト: Alisa-lisa/uni-stuff
def Ignorecode_v(name, a, b, c):
    return setupCosimulation(**locals())
コード例 #42
0
def RandomScrambler_v(name,
                      o7, o6, o5, o4, o3, o2, o1, o0,
                      i7, i6, i5, i4, i3, i2, i1, i0):
    return setupCosimulation(**locals())
コード例 #43
0
def rom_v(name, dout, addr, clk):
    return setupCosimulation(**locals())