Beispiel #1
0
 def construct(s):
     s.wire = Wire(Bits32)
     connect(s.wire, Bits32(0))
Beispiel #2
0
 def up_wr_A_b():
     s.A.b = Bits32(123)
Beispiel #3
0
 def __init__(s, foo=42, bar=1):
     s.foo = Bits32(foo)
     s.bar = [Bits32(bar) for _ in range(2)]
     s.c = C()
Beispiel #4
0
 def tv_in(m, tv):
     m.b[0].ifc[0].foo[0].bar[0] = Bits32(tv[0])
Beispiel #5
0
 def construct(s):
     s.in_ = [Bits32(42) for _ in range(5)]
 def tv_out(m, tv):
     assert m.ifc.msg == Bits32(42)
     assert m.ifc.val == Bits1(1)
Beispiel #7
0
 def __init__(s, foo=42):
     s.foo = [Bits32(foo) for _ in range(5)]
Beispiel #8
0
 def tv_in( m, tv ):
   m.in_[0].foo.bar = Bits32(tv[0])
   m.in_[1].foo.bar = Bits32(tv[1])
 def upblk():
   s.ifc.msg = Bits32(42)
   s.ifc.val = Bits1(1)
Beispiel #10
0
 def tv_in( m, tv ):
   m.sel = Bits1(tv[0])
   m.in_[0].msg = Bits32(tv[1])
   m.in_[1].msg = Bits32(tv[2])
Beispiel #11
0
 def tv_out( m, tv ):
   assert m.out[0].msg == Bits32(tv[3])
   assert m.out[1].msg == Bits32(tv[4])
   assert m.out_sel == Bits32(tv[5])
 def upblk():
     x = Bits32(42, 42)
 def upblk():
     s.out = Bits32(s)
Beispiel #14
0
 def _lambda__s_out():
     s.out2 = Bits32(2)
 def tv_in(m, tv):
     m.in_.val = Bits1(tv[0])
     m.in_.msg = Bits32(tv[1])
     m.out.rdy = Bits1(tv[2])
 def tv_in(m, tv):
     m.in_1 = Bits32(tv[0])
     m.in_2 = Bits32(tv[1])
 def tv_out(m, tv):
     assert m.out.val == Bits1(tv[3])
     assert m.out.msg == Bits32(tv[4])
     assert m.in_.rdy == Bits1(tv[5])
 def upblk():
     s.out = concat(Bits32(42), Bits32(0))
Beispiel #19
0
 def up_wr_x():
     s.x = Bits32(123)
 def upblk():
     s.out = concat(s.in_, Bits32(0))
Beispiel #21
0
 def __init__(s, foo=0, bar=42):
     s.foo = Bits32(foo)
     s.bar = [[C() for _ in range(5)] for _ in range(5)]
 def tv_in(m, tv):
     m.in_[0] = Bits32(tv[0])
     m.in_[1] = Bits32(tv[1])
Beispiel #23
0
 def tv_out(m, tv):
     assert m.out == Bits32(0)
 def tv_in(m, tv):
     m.in_ = Bits32(tv[0])
Beispiel #25
0
 def __init__(s, a=0, b=0):
     s.a = int(a)
     s.b = Bits32(b)
 def tv_out(m, tv):
     if tv[1] != '*':
         assert m.out == Bits32(tv[1])
Beispiel #27
0
 def __init__(s, woof=2):
     s.woof = Bits32(woof)
 def __init__( s, bar=42 ):
   s.bar = Bits32(bar)
Beispiel #29
0
 def __init__(s, foo=42):
     s.foo = Bits32(foo)
Beispiel #30
0
 def construct(s):
     s.wire = Wire(SomeMsg1)
     connect(s.wire, Bits32(1))