Stage 10: test not passing

This commit is contained in:
2025-11-08 18:56:19 +01:00
parent 43a11c865b
commit 60d57b69bf
5 changed files with 24 additions and 61 deletions

View File

@@ -17,9 +17,9 @@ class CUInterface extends Bundle {
val is_jump = Output(Bool())
// DMem connections
val memory_size = Input(DMemSize())
val memory_en = Input(Bool())
val memory_we = Input(Bool())
val memory_size = Output(DMemSize())
val memory_en = Output(Bool())
val memory_we = Output(Bool())
// Muxers
// The naming convention is as follows : mux_xxx_yyy.

View File

@@ -33,8 +33,8 @@ class DMem extends Module {
(io.addr(1) * 8.U)
}
is(DMemSize.Half) {
bytes_enabled(io.addr(1) * 2.U(2.W)) := true.B
bytes_enabled(io.addr(1) * 2.U(2.W) + 1.U(2.W)) := true.B
bytes_enabled((io.addr(1) * 2.U(2.W))(1, 0)) := true.B
bytes_enabled((io.addr(1) * 2.U(2.W) + 1.U(2.W))(1, 0)) := true.B
data := io.data_in << (io.addr(1) * 16.U)
}
is(DMemSize.Word) {
@@ -47,4 +47,6 @@ class DMem extends Module {
io.dbus.be := bytes_enabled
io.dbus.wdata := data
io.data_out := 0.U
}

View File

@@ -48,6 +48,8 @@ class dpram( // nom identique à celui du verilog
val doutB = Output(UInt(DATA_WIDTH.W))
val dinB = Input(UInt(DATA_WIDTH.W))
val weB = Input(UInt(NUM_COL.W))
val ram_block = Output(UInt(DATA_WIDTH.W))
})
}
@@ -134,6 +136,8 @@ class IDMem(sim: Boolean, addrWidth: Int, memFile: String = "") extends Module {
)
)
dontTouch(unifiedRam.io.ram_block)
unifiedRam.io.clkA := io.clki
unifiedRam.io.clkB := io.clkd
// instructions sur le port a