set bytesel in dcache store
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 12 Sep 2020 08:36:13 +0000 (09:36 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 12 Sep 2020 08:36:13 +0000 (09:36 +0100)
src/soc/experiment/dcache.py

index 00c83795b62a4821749341f118eb9032fc003bec..2d5f6692904d45d2172585267c8a1605681dc27c 100644 (file)
@@ -1665,10 +1665,12 @@ def dcache_store(dut, addr, data, nc=0):
     yield dut.d_in.load.eq(0)
     yield dut.d_in.nc.eq(nc)
     yield dut.d_in.data.eq(data)
+    yield dut.d_in.byte_sel.eq(~0)
     yield dut.d_in.addr.eq(addr)
     yield dut.d_in.valid.eq(1)
     yield
     yield dut.d_in.valid.eq(0)
+    yield dut.d_in.byte_sel.eq(0)
     yield
     while not (yield dut.d_out.valid):
         yield
@@ -1716,17 +1718,10 @@ def dcache_sim(dut):
         f"data @%x=%x expected 0000004100000040" % (addr, data)
 
     # Store at address 30
-    yield from dcache_store(dut, 0x30, 0x12345678)
-
-    yield
-    yield
-    yield
-    yield
+    yield from dcache_store(dut, 0x30, 0x121)
 
-    yield
-    yield
-    yield
-    yield
+    # Store at address 30
+    yield from dcache_store(dut, 0x30, 0x12345678)
 
     # 3nd Cacheable read of address 30
     data = yield from dcache_load(dut, 0x30)