def mkMain(): # input variiable x = stream.Variable('xdata') y = stream.Variable('ydata') # stream definition z = x + y # set output attribute z.output('zdata') st = stream.Stream(z) m = st.to_module('main') return m
def mkMain(): # input variiable x = stream.Variable('xdata') y = stream.Variable('ydata') # stream definition z = x + y z = stream.Iadd(z) # set output attribute z.output('zdata') st = stream.Stream(z, ivalid='ivalid', ovalid='ovalid') m = st.to_module('main') return m
def mkMain(): # input variiable x = stream.Variable('xdata') y = stream.Variable('ydata') # stream definition z = stream.SraRound(x, y) # set output attribute z.output('zdata') st = stream.Stream(z) m = st.to_module('main') # st.draw_graph() return m, st.pipeline_depth()
def mkMain(): # input variiable x = stream.Variable('xdata') y = stream.Variable('ydata') # stream definition z = x + y z, v = stream.ReduceAddValid(z, 8) # set output attribute z.output('zdata') v.output('vdata') st = stream.Stream(z, v, ivalid='ivalid', ovalid='ovalid') m = st.to_module('main') return m
def mkMain(): # input variiable x = stream.Variable('xdata') y = stream.Variable('ydata') vars = [x + i for i in range(10)] # stream definition v = stream.AddTree(*vars) z = v + y # set output attribute z.output('zdata') st = stream.Stream(z) m = st.to_module('main') return m
def mkMain(): # input variiable x = stream.Variable('xdata') y = stream.Variable('ydata') e = stream.Variable('edata') # stream definition z = x + y z, v = stream.RegionAdd(z, 8, enable=e) # set output attribute z.output('zdata') v.output('vdata') st = stream.Stream(z, v) m = st.to_module('main') return m
def mkMain(): # input variiable x = stream.Variable('xdata') y = stream.Variable('ydata') # stream definition z = stream.Div(x, y) # set output attribute z.output('zdata') st = stream.Stream(z, ivalid='ivalid', ovalid='ovalid', iready='iready', oready='oready') m = st.to_module('main') return m
def mkMain(): # input variiable x = stream.Variable('xdata') y = stream.Variable('ydata') x = stream.Cast(x, 64, 8) y = stream.Cast(y, 64, 8) # stream definition z = x + y z = stream.Cast(z, 32, 0) # set output attribute z.output('zdata') st = stream.Stream(z) m = st.to_module('main') return m