mem_tasks.v
425 Bytes
// mem_tasks.v v1 Frank Berndt
// main memory tasks;
// configure main memory;
task mem_config;
begin
$display("%t: config memory", $time);
// XXX for now just wait 8 clocks;
repeat(8) @(posedge sysclk);
// write an ri register;
vsim.bb.cpu.swrite(BUS_ADDRESS_RI + 'h12345, `CPU_SIZE_4, 'h76543210);
// read an ri register;
vsim.bb.cpu.sread(BUS_ADDRESS_RI + 'h5af0, `CPU_SIZE_4, data[0]);
end
endtask