moiri / streamix-c

compiler for Streamix
GNU General Public License v2.0
0 stars 0 forks source link

Decoupling of Ports in Implicitly Spawned Wrapper Routing Nodes #28

Open moiri opened 2 years ago

moiri commented 2 years ago

There is currently no way to specify channel length or output decoupling on wrapper input ports which spawn routing nodes.

In the following example it is not possible to decouple the output ports trigger1 and trigger2 of the routing node.

wrapper GUsbAmp(
    in trigger(trigger1, trigger2),
) {
  Box1 = box box1(in trigger1)
  Box2 = box box1(in trigger2)
  connect Box1 | Box2
} net(
    left in trigger
)

In the above example the channel length could be specified in the box signature but this is no longer possible with nested wrappers.

There should be a syntax which allows to address channels of implicit routing nodes (e.g. make change port renaming to fully fledged port specifications)

moiri commented 2 years ago

This could be solved by spawning routing nodes explicitly like a box.

rn = intern box smx_rn(in trigger1, in trigger2, decoupled out trigger)

The keyword intern would indicate that neither dependencies not include statement would be required here.