File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1339,10 +1339,10 @@ \subsection{Mem}
1339
1339
\begin {scala }
1340
1340
val ram1p =
1341
1341
Mem(UInt(width = 32), 1024, seqRead = true)
1342
- val reg_raddr = Reg(UInt())
1343
- when (wen) { ram1p(waddr ) := wdata }
1344
- .elsewhen (ren) { reg_raddr := raddr }
1345
- val rdata = ram1p(reg_raddr )
1342
+ val reg_addr = Reg(UInt())
1343
+ when (wen) { ram1p(addr ) := wdata }
1344
+ .elsewhen (ren) { reg_addr := addr }
1345
+ val rdata = ram1p(reg_addr )
1346
1346
\end {scala }
1347
1347
1348
1348
If the same \code {Mem} address is both written and sequentially read on the same clock
Original file line number Diff line number Diff line change @@ -1278,10 +1278,10 @@ \subsection{Mem}
1278
1278
1279
1279
\begin {scala }
1280
1280
val ram1p = Mem(1024, UInt(32.W))
1281
- val reg_raddr = Reg(UInt())
1282
- when (wen) { ram1p(waddr ) := wdata }
1283
- .elsewhen (ren) { reg_raddr := raddr }
1284
- val rdata = ram1p(reg_raddr )
1281
+ val reg_addr = Reg(UInt())
1282
+ when (wen) { ram1p(addr ) := wdata }
1283
+ .elsewhen (ren) { reg_addr := addr }
1284
+ val rdata = ram1p(reg_addr )
1285
1285
\end {scala }
1286
1286
1287
1287
If the same \code {Mem} address is both written and sequentially read on the same clock
You can’t perform that action at this time.
0 commit comments