Esempio n. 1
0
def unaryOps_v(name,
               Not,
               Invert,
               UnaryAdd,
               UnarySub,
               arg):
   return setupCosimulation(**locals())
Esempio n. 2
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())
Esempio n. 3
0
def multiOps_v( name,
                Bitand,
                Bitor,
                Bitxor,
                And,
                Or,
                argm, argn, argp):

    return setupCosimulation(**locals())
Esempio n. 4
0
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
Esempio n. 5
0
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
Esempio n. 6
0
def augmOps_v(  name,
                Bitand,
                Bitor,
                Bitxor,
                FloorDiv,
                LeftShift,
                Mod,
                Mul,
                RightShift,
                Sub,
                Sum,
                left, right):
    return setupCosimulation(**locals())
Esempio n. 7
0
def augmOps_v(
        name,
        ##                 Bitand,
        ##                 Bitor,
        ##                 Bitxor,
        ##                 FloorDiv,
        LeftShift,
        ##                 Mod,
        Mul,
        RightShift,
        Sub,
        Sum,
        left,
        right):
    return setupCosimulation(**locals())
Esempio n. 8
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())
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())
Esempio n. 10
0
    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()
Esempio n. 11
0
    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()
Esempio n. 12
0
def GrayIncReg_v(name, graycnt, enable, clock, reset, width):
    return setupCosimulation(**locals())
Esempio n. 13
0
def Infertest_v(name, a, out):
    return setupCosimulation(**locals())
Esempio n. 14
0
def ConstWire_v(name, p, q):
    return setupCosimulation(**locals())
Esempio n. 15
0
def multiOps_v(name, Bitand, Bitor, Bitxor, And, Or, argm, argn, argp):

    return setupCosimulation(**locals())
Esempio n. 16
0
def design_v(name, a, b, c, d, p, q, r):
    return setupCosimulation(**locals())
Esempio n. 17
0
def expressions_v(a, b, clk):
    return setupCosimulation(**locals())
Esempio n. 18
0
def unaryOps_v(name, Not, Invert, UnaryAdd, UnarySub, arg):
    return setupCosimulation(**locals())
Esempio n. 19
0
def expressions_v(a, b, clk):
   return setupCosimulation(**locals())
Esempio n. 20
0
def HecCalculator_v(name, hec, header):
    return setupCosimulation(**locals())
Esempio n. 21
0
def FramerCtrl_v(name, SOF, state, syncFlag, clk, reset_n):
    return setupCosimulation(**locals())
Esempio n. 22
0
def design_v(name, a, b, c, d, p, q, r):
    return setupCosimulation(**locals())
Esempio n. 23
0
def HecCalculator_v(name, hec, header):
    return setupCosimulation(**locals())
Esempio n. 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())
Esempio n. 25
0
def Infertest_v(name, a, out):
    return setupCosimulation(**locals())
Esempio n. 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())
Esempio n. 27
0
def edge_v(name, flag, sig, clock):
    return setupCosimulation(**locals())
Esempio n. 28
0
def GrayIncReg_v(name, graycnt, enable, clock, reset, width):
    return setupCosimulation(**locals())
Esempio n. 29
0
def beh_v(name, count, enable, clock, reset):
    return setupCosimulation(**locals())
Esempio n. 30
0
def rom_v(name, dout, addr, clk):
    return setupCosimulation(**locals())
Esempio n. 31
0
def ConstWire_v(name, p, q):
    return setupCosimulation(**locals())
Esempio n. 32
0
def bin2gray_v(name, B, G):
    return setupCosimulation(**locals())
Esempio n. 33
0
def FramerCtrl_v(name, SOF, state, syncFlag, clk, reset_n):
    return setupCosimulation(**locals())
Esempio n. 34
0
def beh_v(name, count, enable, clock, reset):
    return setupCosimulation(**locals())
Esempio n. 35
0
def LoopTest_v(name, a, out):
    return setupCosimulation(**locals())
Esempio n. 36
0
def LoopTest_v(name, a, out):
    return setupCosimulation(**locals())
Esempio n. 37
0
def Ignorecode_v(name, a, b, c):
    return setupCosimulation(**locals())
def bin2gray_v(name, B, G):
    return setupCosimulation(**locals())
Esempio n. 39
0
def ram_v(name, dout, din, addr, we, clk, depth=4):
    return setupCosimulation(**locals())
Esempio n. 40
0
def ram_v(name, dout, din, addr, we, clk, depth=4):
    return setupCosimulation(**locals())
Esempio n. 41
0
def Ignorecode_v(name, a, b, c):
    return setupCosimulation(**locals())
Esempio n. 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())
Esempio n. 43
0
def rom_v(name, dout, addr, clk):
    return setupCosimulation(**locals())