stanford-ppl / spatial

Spatial: "Specify Parameterized Accelerators Through Inordinately Abstract Language"
https://spatial.stanford.edu
MIT License
274 stars 32 forks source link

DefiningBlk not defined outside accel and inside IfAndElse #121

Closed yaqiz01 closed 6 years ago

yaqiz01 commented 6 years ago

The hierarchical dot backend use sym.blk.s and bound.parent.s to keep track of the "parent" sym to draw the hierarchical graph. But both are not defined outside accel scope and inside IfAndElse. I added DefiningBlk for nodes inside IfAndElse and outside accel in 9d09bd4ec15c6dac1500d7ded6511b73c10a89ec. Just wanna make sure this is okay. Also for bound syms outside accel, there doesn't seems to be anything linking itself to its definition sym. For example

x978 = ArrayMap(array=x974,apply=Lambda2(inputA=x974,inputB=b9),func=Lambda1(input=x977))

It'd be nice to have something link b9 to x978. I was wondering if it's okay to define Block or Ctrl on b9, or I can use new metadata to keep track of this.

yaqiz01 commented 6 years ago

Passed regression