stanford-ppl / spatial

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

Add Some Kind of DontTouch Annotation #262

Open mattfel1 opened 5 years ago

mattfel1 commented 5 years ago

Would be nice to have a way to guarantee that a particular node won't get DCEd, like DontTouch in chisel. I run into this mostly when writing stream apps where I want a flag FIFO just for tracking state, but I don't actually need to do anything with the flag besides enq/deq it.

For now I just use dummy ArgOuts and read them later, but I suggest we add syntax for something that will ensure we don't drop "unused" nodes. My vote goes to "Write-Only Memory" (WOM[T]) :clown_face: