Verified Commit 0e8288d6 authored by Minyong Li's avatar Minyong Li 💬
Browse files

core.{Data,Program}Memory: fix Read-After-Write behavior

Now Read-After-Write gives old data (Read-First). Quartus does not
give warnings. No bypass logic is implemented.
parent 42cde0e2
Pipeline #7476 passed with stage
in 53 seconds
......@@ -16,7 +16,7 @@ class DataMemory(implicit cfg: CanCoreConfiguration) extends MultiIOModule {
private val mem =
if (cfg.syncReadMemory)
SyncReadMem(cfg.dataMemoryWords, UInt(512.W))
SyncReadMem(cfg.dataMemoryWords, UInt(512.W), SyncReadMem.ReadFirst)
else
Mem(cfg.dataMemoryWords, UInt(512.W))
......
......@@ -24,7 +24,11 @@ class ProgramMemory(implicit cfg: CanCoreConfiguration) extends MultiIOModule {
private val mem =
if (cfg.syncReadMemory)
SyncReadMem(cfg.programMemoryWords, UInt(cwWidth.W))
SyncReadMem(
cfg.programMemoryWords,
UInt(cwWidth.W),
SyncReadMem.ReadFirst
)
else
Mem(cfg.programMemoryWords, UInt(cwWidth.W))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment