Closed fhuemer closed 1 year ago
The specification of the dataflow sublanguage at (https://avlsi.csl.yale.edu/act/doku.php?id=language:langs:dflow) states that if the number of buffer stages in brackets is not specified the default value is 1.
From that I would conclude that test1 and test2 should be semantically equivalent:
test1
test2
defproc test1(chan?(int<1>) a; chan!(int<1>) b) { dataflow { a -> b } } defproc test2(chan?(int<1>) a; chan!(int<1>) b) { dataflow { a -> [1] b } }
However, when converted to CHP there is a difference. test1 looks fine with func_0W1W1 containing the buffer.
func_0W1W1
defproc func_0W1W1(chan?(int<1>)in0; chan!(int<1>) out0) { int<1> x0; int<1> res0; /* out */ chp { *[ in0?x0; log("receive (", x0, ")"); res0 := x0; out0!res0; log("send (", res0, ",", ")") ] } } defproc test1 (chan(int<1>)? a; chan(int<1>)! b) { func_0W1W1 b_inst(a, b); }
However, test2 gets two buffers. One in func_0W1W1 and another one in the actual test2 process.
defproc test2 (chan(int<1>)? a; chan(int<1>)! b) { chan(int<1>) b_bufIn; func_0W1W1 b_bufIn_inst(a, b_bufIn); lib::onebuf<1> b_inst(b_bufIn, b); }
Did I misunderstand the documentation or is this actually a bug? If its bot a bug, I think, it would be a good idea to clarify the difference in the documentation.
Thank you for catching this! I've updated dflowmap; if this is still an issue, please let me know.
Thank you for the quick fix! It seems to work now.
The specification of the dataflow sublanguage at (https://avlsi.csl.yale.edu/act/doku.php?id=language:langs:dflow) states that if the number of buffer stages in brackets is not specified the default value is 1.
From that I would conclude that
test1
andtest2
should be semantically equivalent:However, when converted to CHP there is a difference.
test1
looks fine withfunc_0W1W1
containing the buffer.However,
test2
gets two buffers. One infunc_0W1W1
and another one in the actualtest2
process.Did I misunderstand the documentation or is this actually a bug? If its bot a bug, I think, it would be a good idea to clarify the difference in the documentation.