stanford-ppl / spatial-lang

Spatial: "Specify Parameterized Accelerators Through Inordinately Abstract Language"
MIT License
100 stars 11 forks source link

Warn or Error if Trying to Read to ArgOut in Accel #255

Open mattfel1 opened 6 years ago

mattfel1 commented 6 years ago

Physically, we can do this. But shouldn't we throw an error since you should be using a HostIO and not an ArgOut? Currently it won't crash anywhere until chisel compilation

dkoeplin commented 6 years ago

I agree its a bit weird, but by convention so far, ArgOut is just a register that the host can access after Accel executes. HostIO is one that it can access during Accel execution. Effectively that means Accel can do whatever it wants for both ArgOut and HostIO, only the host is limited.

mattfel1 commented 6 years ago

Ok I'll correct the codegen and check it inside one of the other unit tests

mattfel1 commented 6 years ago

There may be an issue when you have a read and write to an argout that is unrolled into multiple parallel accesses. Look into this