test005.v 811 Bytes
//
// test005	Verify that the least significant three bits of the
//		address and length for DMA reads are ignored.
//

task test005;
  reg		[CBUS_DATA_SIZE-1:0] address;
  reg		[DBUS_DATA_SIZE-1:0] actual_d_data;
  reg		[EBUS_DATA_SIZE-1:0] actual_e_data;
  integer	num_bytes, offset;

  begin 
    address = 0;
    cbus_dma_write(`DMA_UNMASKED, `DMA_UP, address, BUS_DEVICE_MI, -2, 8);
    dbus_put_data(0, 0, -2);

    for (num_bytes = 1; num_bytes < 8; num_bytes = num_bytes + 1)
    begin
      for (offset = 0; offset < 8; offset = offset + 1)
      begin
	cbus_dma_read(`DMA_NOSUBBLOCK, `DMA_UP, address + offset,
		       BUS_DEVICE_MI, 3, num_bytes + offset);

	dbus_get_data(actual_d_data, actual_e_data, 3);
	check_data("test005", 0, actual_d_data, 0, actual_e_data);
      end
    end
  end
endtask