Skip to content

Commit 3717991

Browse files
Update Memory.scala
1 parent 3a1bdc9 commit 3717991

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/scala/RISCV/Memory.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ class Memory() extends Module {
3737
io.write_vga := isVGA && io.write_1
3838
io.write_value_vga := io.write_value_1
3939

40-
when(isVGA) {
40+
when(io.write_value_1 && isVGA) {
4141
printf(
4242
"Writing to VGA! Address: %b Data: %b\n",
4343
io.address_1 - 0b1000000000000.U,
4444
io.write_value_1
4545
);
4646
}.otherwise {
4747
printf(
48-
"Writing to VGA! Memory: %b Data: %b\n",
48+
"Writing to Memory! Address: %b Data: %b\n",
4949
io.address_1 - 0b1000000000000.U,
5050
io.write_value_1
5151
);

0 commit comments

Comments
 (0)