Skip to content

Commit

Permalink
Update tuple test
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Nov 8, 2019
1 parent b774cec commit 8100f3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_type/test_tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def definition(io):

def test_tuple_nested_tuple_value():
def IFC0(params):
return m.Tuple(**{
return m.Product.from_fields("IFC0", {
"port0": m.In(m.Bits[params['param0']]),
"port1": m.In(m.Bits[params['param0']]),
"port2": m.In(m.Array[params['param0'], m.Bits[2]]),
Expand All @@ -188,15 +188,15 @@ def IFC0(params):
"port8": m.In(m.Bit),
"port9": m.In(m.Bit),
"port10": m.In(m.Bits[m.bitutils.clog2(params['param0'])]),
})
}, cache=True)

def IFC1(params):
dictOut = {"port4": m.Out(m.Bit)}
return m.Tuple(**dictOut)
return m.Product.from_fields("IFC1", dictOut)

def DefineMyCircuit(params):
class MyCircuit(m.Circuit):
IO = ["IFC0", IFC0(params).flip()]
IO = ["IFC0", m.Flip(IFC0(params))]
return MyCircuit

def DefineTop(params):
Expand Down

0 comments on commit 8100f3d

Please sign in to comment.