hocl
hocl copied to clipboard
[Preesm backend] configuration actors not recognized
[Issue initially mentionned by ggauthie by PM]
Configuration actors -- i.e. actors having an output port with type t param
are not handled correctly by the Preesm backend.
For example, this actor:
node selector
in ()
out (value: int param) actor
preesm(loop_fn="selector", incl_file="Code/include/selector.h", src_file="Code/src/selector.cpp")
end;
gives the following code in the generated .pi
file:
<node id="selector_18" kind="actor" period="0">
<data key="graph_desc">Code/include/selector.h</data>
<loop name="selector">
<param direction="OUT" isConfig="false" name="value" type="int"/>
</loop>
<port kind="output" name="value" expr="1" annotation=""/>
</node>
whereas it should give:
<node id="selector_17" kind="actor">
<data key="graph_desc">Code/include/selector.h</data>
<loop name="selector">
<param direction="OUT" isConfig="true" name="value" type="int"/>
</loop>
<port annotation="NONE" kind="cfg_output" name="value"/>
</node>
Note the isConfig
field set to true
and the port kind set to cfg_output
.
Associated to this issue is another one : the output port of a configuration actor cannot be connected directly to a configuration input port of another actor. There must be a parameter node in between.
Fixed in current source tree (will be in release 1.2.3)