rspdma_tasks.v
1.3 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 ........"); //XXX
mem_config;
// IMEM/DMEM/RDRAM pre-loaded. Set SU PC and go XXX
$display(" IDMEM_DMA: starting RSP ........");
swrite(BUS_ADDRESS_SP_PC, 3, 32'b0);
swrite(BUS_ADDRESS_SP_STATUS, 3, 32'b0010_1101);
// wait for SU halt/broke
$display(" IDMEM_DMA: running RSP DMA test ........");
sread(BUS_ADDRESS_SP_STATUS, 3, data[0]);
while (!(data[0] & 'b1)) begin
repeat(300) @(posedge sysclk);
sread(BUS_ADDRESS_SP_STATUS, 3, data[0]);
`ifdef RSP_DMA_REGRESSION
$display(" IDMEM_DMA: ... PC = 0x%h, r1 = 0x%h, Stat = 0x%h",
{ vsim.bcp.rsp.su.suctl.pc, 2'b0 },
vsim.bcp.rsp.su.sudp.suRFile_i.mem[1],
data[0]);
`endif
end
// display result
`ifdef RSP_DMA_REGRESSION
$display(" IDMEM_DMA: done... r1 = 0x%h\n",
vsim.bcp.rsp.su.sudp.suRFile_i.mem[1]);
`endif
$finish;
end
endtask
/************************************************************************
END OF RSP DMA TESTS/TASK
************************************************************************/