ucb-bar / hwacha-template

Template for projects using the Hwacha data-parallel accelerator
http://hwacha.org/
Other
34 stars 10 forks source link

Vector Atomic Memory Instructions #10

Open roychen1998 opened 4 years ago

roychen1998 commented 4 years ago

What is the behavior for AMO instruction when vreg[rs1][i+1] is the same value with vreg[rs1][i] as in below pseudocode? Will vreg[vd][i+1] pick the updated value in memory?

for (int i=0; i<vl; ++i) if ([!]preg[p][i]) atomic { temp = mem[s1 ? vreg[rs1][i] : sreg[rs1]]; mem[s1 ? vreg[rs1][i] : sreg[rs1]] = amoop(temp, s2 ? vreg[rs2][i] : sreg[rs2]); vreg[vd][i] = temp; }

Actually AMO instruction cannot be run in hwacha template now. How can I verify AMO instruction in this stage?