WARPLab 7
- Downloads
Getting Started
- Sample Buffer Sizes
- Automatic Gain Control
- Examples
- Extending WARPLab
- Debugging Errors
- Porting Code
- Benchmarks
WARPLab 7 Framework
WARPLab 7 Reference Design
Reference Design Modules
- Node
Interface Group
Baseband
Transport
Trigger Manager
Hardware
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.
Requirements:
- WARPLab reference design 7.1.0 or later
- 1 WARP v3 node
Setup
To run this example, you must set up your experiment as follows:
- Power on the WARP v3 node
- Set the DIP switch on the WARP v3 board to 0000.
- Download the 2RF WARPLab reference bitstream to the board. The board should boot, and show "01" on the hex display.
- Run the user_extension_script.m example script.
Observations
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.