rspdma_tasks.v
1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/************************************************************************
RSP IMEM/DMEM DMA TESTS
************************************************************************/
task rsp_dma;
begin
test_selected <= HIGH;
$display(" IDMEM_DMA: configuring the RDRAM ........");
config_rdram;
// IMEM/DMEM/RDRAM pre-loaded. Set SU PC and go
$display(" IDMEM_DMA: starting RSP ........");
write_word(BUS_ADDRESS_SP_PC, 3, 32'b0);
write_word(BUS_ADDRESS_SP_STATUS, 3, 32'b0010_1101);
// wait for SU halt/broke
$display(" IDMEM_DMA: running RSP DMA test ........");
read_word(BUS_ADDRESS_SP_STATUS, 3);
while (!(data[0] & 'b1)) begin
repeat(300) @(posedge clock);
read_word(BUS_ADDRESS_SP_STATUS, 3);
`ifdef RSP_DMA_REGRESSION
$display(" IDMEM_DMA: ... PC = 0x%h, r1 = 0x%h, Stat = 0x%h",
{ reality.rcp_0.rsp_0.su.suctl.pc, 2'b0 },
reality.rcp_0.rsp_0.su.sudp.suRFile_i.mem[1],
data[0]);
`endif
end
// display result
`ifdef RSP_DMA_REGRESSION
$display(" IDMEM_DMA: done... r1 = 0x%h\n",
reality.rcp_0.rsp_0.su.sudp.suRFile_i.mem[1]);
`endif
$finish;
end
endtask
/************************************************************************
END OF RSP DMA TESTS/TASK
************************************************************************/