update monitor
This commit is contained in:
@@ -73,13 +73,13 @@ class cpu_monitor #(
|
||||
// reads?
|
||||
|
||||
if (!pending_read) begin
|
||||
pending_read = 1'b1;
|
||||
pending_read_addr = cpuVif.cb.addr;
|
||||
end
|
||||
|
||||
if (cpuVif.cb.rready) begin
|
||||
if (window_of(cpuVif.cb.addr) == WIN_REG) begin
|
||||
if (cpuVif.cb.rready) send(XBAR_READ, pending_read_addr, cpuVif.cb.rdata);
|
||||
end else pending_read = 1;
|
||||
end else if (cpuVif.cb.rready) begin
|
||||
send(XBAR_READ, pending_read_addr, cpuVif.cb.rdata);
|
||||
pending_read = 1'b0;
|
||||
pending_read = 0;
|
||||
end
|
||||
endtask : observe_external_read
|
||||
|
||||
@@ -90,8 +90,29 @@ class cpu_monitor #(
|
||||
// even if the request stays active during an SRAM wait. Clear saved state
|
||||
// after the request ends.
|
||||
|
||||
if (load_in_flight) begin
|
||||
// pack into correct window + offset
|
||||
send(CPU_LOAD, {2'b01, load_addr, 2'b00}, cpuVif.cb.dsram_rdata);
|
||||
load_in_flight = 0;
|
||||
end
|
||||
|
||||
$fatal(1, "Implement cpu_monitor.observe_cpu_memory");
|
||||
if (cpuVif.cb.cpu_active && cpuVif.cb.dsram_en) begin
|
||||
if (cpuVif.cb.dsram_write_en) begin
|
||||
// sw
|
||||
send(CPU_STORE, {2'b01, cpuVif.cb.dsram.addr, 2'b00}, cpuVif.cb.dsram_wdata, 1'b1);
|
||||
prev_load_valid = 0;
|
||||
end else begin
|
||||
// lw
|
||||
if (!prev_load_valid || cpuVif.cb.dsram_addr != prev_load_addr) begin
|
||||
load_in_flight = 1;
|
||||
load_addr = cpuVif.cb.dsram_addr;
|
||||
end
|
||||
prev_load_valid = 1;
|
||||
load_addr = cpuVif.cb.dsram_addr;
|
||||
end
|
||||
end else begin
|
||||
prev_load_valid = 0;
|
||||
end
|
||||
endtask : observe_cpu_memory
|
||||
|
||||
// Monitor the DUT once per clock and pass new events to the scoreboard
|
||||
|
||||
Reference in New Issue
Block a user