Skip to content

Commit 0ea9723

Browse files
committed
Optimize TileWriter
1 parent 7148dcd commit 0ea9723

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/scala/graphics/TileWriter.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ class TileWriter extends Module {
5151
val writing = size >= Tile.nrCols.U
5252
io.outReq.valid := writing
5353
val pix = Wire(Vec(Fb.nrBanks, FbRGB()))
54+
val tile = buf.read(nextFron + nextCol)
5455
for (i <- 0 until Fb.nrBanks) {
55-
pix(i) := buf.read(nextFron + nextCol)(row)(idx << log2Up(Fb.nrBanks) | i.U)
56+
pix(i) := tile(row)(idx << log2Up(Fb.nrBanks) | i.U)
5657
}
5758
io.outReq.bits.pix := pix
5859
when (writing && io.outReq.ready) {

0 commit comments

Comments
 (0)