stanford-ppl / spatial

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

Stricter Lockstep Check #122

Closed mattfel1 closed 6 years ago

mattfel1 commented 6 years ago

Right now, we consider it lockstep as long as the nIters are fixed and it is not a stream controller. Really, we want it to be considered lockstep also if the start/stop/step come from RegReads not enclosed by a relative control. For example

'LOOP1.Foreach(M by 1 par 2){i => 
  val x = reg.value
  'LOOP2.Foreach(N by 1 par 2){j => 
    'LOCKSTEP.Foreach(x by 1){k => ...}
  }
}

LOCKSTEP should be true if we look relative to LOOP2 but false if we look relative to LOOP1

Working on this now

mattfel1 commented 6 years ago

has been made stricter. Now it will consider lockstep if the controller is not a stream or FSM and if one of the following is true