/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished proprietary information of BroadOn Communications Corp.,
 *  and are protected by federal copyright law. They may not be disclosed
 *  to third parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 *  Description:
 *      Notes regarding the implementation of the flash design verification
 *      (DV) test cases
 *
 */


Source Code
------------

- fl_utils.h: Utility functions
- fl_utils.c: Utility functions
- fl_ops.h: Shared constants and declarations
- fl_ops.c: Basic flash operations
- fl_ops_test.c: Test cases for basic flash operations
- fl_ecc_test.c: Test cases for ECC computation
- fl_bitwalking_test.c: Test cases for bit walking specific registers
- fl_access_test.c: Test cases for register and memory access control
- fl_performance_test.c: Test cases for flash performance
- fl_misc_test.c: Test cases for miscellaneous items not covered
- fl_stress_test.c: Test cases for applying stress

Public header file flash.h is located in sw/sc/include/.


Testing
-------

To run the regression tests, follow the steps below:

    1) Set environment variables NCV, NCV_LIB_PATH, LD_LIBRARY_PATH, and
       CDS_LIBC_FILE as specified in the DV environment document
    2) Set SIMDEFS to "+define+SAk9f1g08" to use the Samsung 128MB flash.
       Substitute SAk9f1g08 with SAk9f1208 to use the Samsung 64MB flash.
       To use the fast flash option, add "+FASTFLASH" to SIMDEFS
    3) In the same session where the SIMDEFS is set, do "make ipc" in
       hw/chip/sim to start the ncverilog simulator
    4) To start the basic operation test, run "./fl_ops_test -c cpu0"
    5) To start the ECC computation test, run "./fl_ecc_test -c cpu0"
    6) To start the bit walking test, run "./fl_bitwalking_test -c cpu0"
    7) To start the access control test, run "./fl_access_test -c cpu0"
    8) To start the flash performance test, run "./fl_performance_test -c cpu0"
    9) To start the miscellaneous tests, run "./fl_misc_test -c cpu0"
    10) To start the stress test, run "./fl_stress_test -c cpu0"

If something went wrong, the tests should stop immediately and return an error.
Check the output for any error messages.
