| def stream_in(prefix, stream):
return {
f'i_{prefix}_data': stream.data,
f'i_{prefix}_valid': stream.valid,
f'o_{prefix}_ready': stream.ready,
}
def stream_out(prefix, stream):
return {
f'o_{prefix}_data': stream.data,
f'o_{prefix}_valid': stream.valid,
f'i_{prefix}_ready': stream.ready,
}
foo = Stream()
bar = Stream()
baz = Stream()
Instance('module_with_many_streams',
**stream_in('foo', foo),
**stream_in('bar', bar),
**stream_out('baz', baz),
)
|