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

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

    return setupCosimulation(**locals())
def design_v(name, a, b, c, d, p, q, r):
    return setupCosimulation(**locals())
Beispiel #17
0
def expressions_v(a, b, clk):
    return setupCosimulation(**locals())
Beispiel #18
0
def unaryOps_v(name, Not, Invert, UnaryAdd, UnarySub, arg):
    return setupCosimulation(**locals())
def expressions_v(a, b, clk):
   return setupCosimulation(**locals())
Beispiel #20
0
def HecCalculator_v(name, hec, header):
    return setupCosimulation(**locals())
Beispiel #21
0
def FramerCtrl_v(name, SOF, state, syncFlag, clk, reset_n):
    return setupCosimulation(**locals())
Beispiel #22
0
def design_v(name, a, b, c, d, p, q, r):
    return setupCosimulation(**locals())
Beispiel #23
0
def HecCalculator_v(name, hec, header):
    return setupCosimulation(**locals())
Beispiel #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())
Beispiel #25
0
def Infertest_v(name, a, out):
    return setupCosimulation(**locals())
def RandomScrambler_v(name,
                      o7, o6, o5, o4, o3, o2, o1, o0,
                      i7, i6, i5, i4, i3, i2, i1, i0):
    return setupCosimulation(**locals())
Beispiel #27
0
def edge_v(name, flag, sig, clock):
    return setupCosimulation(**locals())
Beispiel #28
0
def GrayIncReg_v(name, graycnt, enable, clock, reset, width):
    return setupCosimulation(**locals())
Beispiel #29
0
def beh_v(name, count, enable, clock, reset):
    return setupCosimulation(**locals())
Beispiel #30
0
def rom_v(name, dout, addr, clk):
    return setupCosimulation(**locals())
Beispiel #31
0
def ConstWire_v(name, p, q):
    return setupCosimulation(**locals())
Beispiel #32
0
def bin2gray_v(name, B, G):
    return setupCosimulation(**locals())
Beispiel #33
0
def FramerCtrl_v(name, SOF, state, syncFlag, clk, reset_n):
    return setupCosimulation(**locals())
Beispiel #34
0
def beh_v(name, count, enable, clock, reset):
    return setupCosimulation(**locals())
def LoopTest_v(name, a, out):
    return setupCosimulation(**locals())
Beispiel #36
0
def LoopTest_v(name, a, out):
    return setupCosimulation(**locals())
Beispiel #37
0
def Ignorecode_v(name, a, b, c):
    return setupCosimulation(**locals())
def bin2gray_v(name, B, G):
    return setupCosimulation(**locals())
Beispiel #39
0
def ram_v(name, dout, din, addr, we, clk, depth=4):
    return setupCosimulation(**locals())
Beispiel #40
0
def ram_v(name, dout, din, addr, we, clk, depth=4):
    return setupCosimulation(**locals())
Beispiel #41
0
def Ignorecode_v(name, a, b, c):
    return setupCosimulation(**locals())
Beispiel #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())
Beispiel #43
0
def rom_v(name, dout, addr, clk):
    return setupCosimulation(**locals())