WARPLab 7 Example: EEPROM User Extension

Script File: user_extension_script.m Class File: user_extension_example_class.m

Note: the example class and the example script must be in the same directory as one another so that MATLAB can identify the location of the example class once the example script is run.

This example shows how custom commands can be added to the WARPLab Reference Design via a custom user extension class. Specifically, this script (with its corresponding user extension class) are capable of writing an arbitrary string to a WARP board's EEPROM. This memory is non-volatile, so this custom string will survive in memory across loss of power (e.g. reprogramming) on the board.



To run this example, you must set up your experiment as follows:

  1. Power on the WARP v3 node
  2. Set the DIP switch on the WARP v3 board to 0000.
  3. Download the 2RF WARPLab reference bitstream to the board. The board should boot, and show "01" on the hex display.
  4. Run the user_extension_script.m example script.


The first time this script is run, it will produce the following output on the MATLAB command line:

Current EEPROM Contents:
Node 1: ''
Node 2: ''

Writing EEPROM Contents:'Hello World'

Before this script is run, the contents of the sections of EEPROM used by this example are empty. This is why the current EEPROM contents show a blank string. When run a second time, the following output can be seen on the MATLAB command line:

Current EEPROM Contents:
Node 1: 'Hello World'
Node 2: 'Hello World'

Writing EEPROM Contents:'Hello World'

This time, "Hello World" was read from the board.

Note: This user extension example relies on some code in the wl_user.c file that is included in the stock WARPLab Reference Design releases. Users must modify the design that runs on the board to deal with any custom commands that get sent from the WARPLab MATLAB framework.

Last modified 11 years ago Last modified on May 22, 2013, 3:39:54 PM