From c51de6f6929e0ba5ae323e3dfe3f47a2b4d857d5 Mon Sep 17 00:00:00 2001 From: Jithesh Vijay <123816521+JitheshVijay@users.noreply.github.com> Date: Sat, 8 Jun 2024 17:05:54 +0530 Subject: [PATCH] Delete test_qspi_flash.py --- test_qspi_flash.py | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 test_qspi_flash.py diff --git a/test_qspi_flash.py b/test_qspi_flash.py deleted file mode 100644 index eb23fea..0000000 --- a/test_qspi_flash.py +++ /dev/null @@ -1,46 +0,0 @@ -import cocotb -from cocotb.triggers import Timer -from qspi_flash_api import QSPIFlash # Import the QSPIFlash class from qspi_flash_api module - -# Test to write data to and read data from QSPI flash memory -@cocotb.test() -async def test_qspi_flash_write_read(dut): - flash = QSPIFlash(dut) # Initialize QSPIFlash object with the DUT - - await flash.initialize() # Initialize the QSPI flash device - - # Write data to QSPI flash memory - address = 0x00 # Address to write data to - data_to_write = 0xA5 # Data to be written - await flash.write(address, data_to_write) # Call write method to write data - await Timer(10, units='ns') # Wait for 10 ns - - # Read data from QSPI flash memory - read_data = await flash.read(address) # Call read method to read data - - # Verify the read data matches the data that was written - assert read_data == data_to_write, f"Data mismatch: {read_data} != {data_to_write}" - -# Test to erase data from QSPI flash memory -@cocotb.test() -async def test_qspi_flash_erase(dut): - flash = QSPIFlash(dut) # Initialize QSPIFlash object with the DUT - - await flash.initialize() # Initialize the QSPI flash device - - # Write data to QSPI flash memory - address = 0x00 # Address to write data to - data_to_write = 0x5A # Data to be written - await flash.write(address, data_to_write) # Call write method to write data - await Timer(10, units='ns') # Wait for 10 ns - - # Erase data from QSPI flash memory - await flash.erase(address) # Call erase method to erase data - await Timer(10, units='ns') # Wait for 10 ns - - # Read data from QSPI flash memory after erase - read_data = await flash.read(address) # Call read method to read data - - # After erase, the default state of the memory should be 0xFF - assert read_data == 0xFF, f"Data after erase mismatch: {read_data} != 0xFF" -