update todos

This commit is contained in:
2026-10-06 01:06:49 -04:00
parent 681985322e
commit 79246e7d3b
2 changed files with 148 additions and 148 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
../../src/verilog/memory_controller.sv
../../src/verilog/chip_top.sv
// TODO: Your CPU RTL. Update this section with your added files.
// Your CPU RTL. Update this section with your added files.
../../src/verilog/cpu/cpu_pkg.sv
../../src/verilog/cpu/reg_file.sv
../../src/verilog/cpu/fetch.sv
+12 -12
View File
@@ -3,7 +3,10 @@
* driver through xbar_box. The sequencer describes intent but never drives or
* observes the DUT directly.
*/
class cpu_sequencer #(int DataSize=32, int AddrSize=14);
class cpu_sequencer #(
int DataSize = 32,
int AddrSize = 14
);
mailbox #(cpu_xbar_item #(DataSize, AddrSize)) xbar_box;
@@ -32,9 +35,8 @@ class cpu_sequencer #(int DataSize=32, int AddrSize=14);
int prog_len;
if ((num < 0) || (num >= ISRAM_WORDS)) begin
$fatal(1,
"%0t Seq: program needs 0..%0d random instructions, got %0d",
$time, ISRAM_WORDS - 1, num);
$fatal(1, "%0t Seq: program needs 0..%0d random instructions, got %0d", $time,
ISRAM_WORDS - 1, num);
end
prog_len = num + 1; // +1 for the ebreak
@@ -49,19 +51,16 @@ class cpu_sequencer #(int DataSize=32, int AddrSize=14);
instr.reg_snapshot[r] = shadow.regs[r];
end
if (!instr.randomize()) begin
$fatal(1, "%0t Seq: state-aware randomization failed for instruction %0d",
$time, i);
$fatal(1, "%0t Seq: state-aware randomization failed for instruction %0d", $time, i);
end
// Keep this independent diagnostic while c_mem_align is a member
// TODO. If it fires, the generated instruction violated the
// If it fires, the generated instruction violated the
// effective-address contract described on that constraint.
if (instr.op inside {OP_LW, OP_SW}) begin
effective_addr = instr.reg_snapshot[instr.rs1] + instr.imm;
if ((effective_addr[1:0] != 2'b00) ||
(effective_addr > ((DSRAM_WORDS * 4) - 4))) begin
$fatal(1,
"%0t Seq: illegal effective byte address 0x%08x for %s; complete c_mem_align",
if ((effective_addr[1:0] != 2'b00) || (effective_addr > ((DSRAM_WORDS * 4) - 4))) begin
$fatal(1, "%0t Seq: illegal effective byte address 0x%08x for %s; complete c_mem_align",
$time, effective_addr, instr.asm());
end
end
@@ -99,7 +98,8 @@ class cpu_sequencer #(int DataSize=32, int AddrSize=14);
shadow.step();
end
if (!shadow.halted) begin
$fatal(1,
$fatal(
1,
"%0t Seq: generated control flow missed the final ebreak (pc=0x%08x); complete c_branch_target",
$time, shadow.pc);
end