Skip to content

Commit

Permalink
[dv,dma] DMA-enabled memory range checks
Browse files Browse the repository at this point in the history
Check even fixed FIFO src/dest address lies within the
DMA-enabled memory range; applies to all accesses except
the 'clear interrupt' write traffic.

Signed-off-by: Adrian Lees <[email protected]>
  • Loading branch information
alees24 authored and marnovandermaas committed Dec 7, 2023
1 parent 4a6f7c8 commit fcaf4d9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hw/ip/dma/dv/env/dma_scoreboard.sv
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ class dma_scoreboard extends cip_base_scoreboard #(
`DV_CHECK(addr >= aligned_start_addr && addr < range_end,
$sformatf("0x%0x not in %s addr range [0x%0x,0x%0x)", addr, check_type,
aligned_start_addr, range_end))
end

// Check that this address lies within the DMA-enabled memory range, where applicable.
if (restricted) begin
`DV_CHECK(addr >= dma_config.mem_range_base && addr < dma_config.mem_range_limit,
$sformatf("%s addr 0x%0x does not lie within the DMA-enabled range [0x%0x,0x%0x)",
check_type, addr, dma_config.mem_range_base,
dma_config.mem_range_limit))
end
// Check that this address lies within the DMA-enabled memory range, where applicable.
if (restricted) begin
`DV_CHECK(addr >= dma_config.mem_range_base && addr < dma_config.mem_range_limit,
$sformatf("%s addr 0x%0x does not lie within the DMA-enabled range [0x%0x,0x%0x)",
check_type, addr, dma_config.mem_range_base,
dma_config.mem_range_limit))
end

// Is this request to the address we expected?
Expand Down

0 comments on commit fcaf4d9

Please sign in to comment.