stanford-ppl / spatial

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

Delay Line Type Doesn't Match Its Input Type #139

Closed mattfel1 closed 6 years ago

mattfel1 commented 6 years ago

Found this in RegFileMultiWrite. We delay val value_1 = rf(p, k) by 1, and k is parallelized by 2. Because of iteration analysis, it splits the vectorized read into 2 separate reads. The retime transformer is delaying the first one, which is a vec with 1 element but the DelayLine has type vec of size 2.

mattfel1 commented 6 years ago

This specific issue was because I was using the same implicit vT regardless of iteration difference segmentation in the unroller. I found some other problems with really complicated iteration difference cases but those are now also fixed and test cases added to IterationDiffs app