add atomic LR/SC signal to LDSTCompUnit
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 15 Jan 2022 14:06:44 +0000 (14:06 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 15 Jan 2022 14:06:44 +0000 (14:06 +0000)
src/soc/experiment/compldst_multi.py

index f32282149c3f4803254d01db917cb08658461acc..fdec47b5161b9b5c5d82df16e5e14137bf001e87 100644 (file)
@@ -529,6 +529,7 @@ class LDSTCompUnit(RegSpecAPI, Elaboratable):
         comb += pi.is_ld_i.eq(op_is_ld & busy_o)  # decoded-LD
         comb += pi.is_st_i.eq(op_is_st_or_dcbz & busy_o)  # decoded-ST
         comb += pi.is_dcbz_i.eq(op_is_dcbz & busy_o)  # decoded-DCBZ
+        comb += pi.reserve.eq(oper_r.reserve & busy_o)  # atomic LR/SC
         comb += pi.data_len.eq(oper_r.data_len)  # data_len
         # address: use sync to avoid long latency
         sync += pi.addr.data.eq(addr_r)           # EA from adder