OpenCores
URL https://opencores.org/ocsvn/turbo8051/turbo8051/trunk

Subversion Repositories turbo8051

[/] [turbo8051/] [trunk/] [verif/] [testcase/] [spi_test1.v] - Blame information for rev 24

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 dinesha
/*****************************************************
2
  Verify the Read/Write in ST Flash
3
*****************************************************/
4
 
5
 
6
task spi_test1;
7
 
8
 
9
 $display("############################################");
10
 $display("   Testing ST Flash Read/Write Access       ");
11
 $display("############################################");
12
 
13
 
14
  tb_top.spi_init(); // SPI Tb Init
15
  tb_top.spi_chip_no = 2'b00; // Select the Chip Select to zero
16
  // Write Enable command
17
  tb_top.spi_write_byte(8'h6); // Write Enable instruction
18
  tb_top.spi_sector_errase(24'h00);
19
  tb_top.spi_wait_busy;
20
 
21
  // Page Write
22
  tb_top.spi_write_byte(8'h6); // Write Enable instruction
23
  tb_top.spi_page_write(24'h00);
24
  tb_top.spi_wait_busy;
25
 
26
  // Page Read
27
  tb_top.spi_page_read_verify(24'h00); // Read and verify 256 Bytes
28
 
29
 
30
  tb_top.spi_tb_status(); // SPI Tb Init
31
endtask

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.