Changes between Version 83 and Version 84 of sysgen2opb
- Timestamp:
- Mar 22, 2007, 1:50:15 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
sysgen2opb
v83 v84 1 1 = sysgen2opb Peripheral Conversion Tool = 2 'sysgen2opb' is a MATLAB script which converts a model built in Xilinx System Generator into an OPB-compliant peripheral for use with the embedded PowerPCs. The script replaces all the model's gateways in/out with memory mapped registers. It also creates the necessary address decode logic and a C header file with the resulting register map. 3 There are two options in running the script: 4 1. Simple Gateways Script - This script is exactly what is described on the above. 5 1. From/To Registers Extension Script - Uses Simple Registers Script except that it uses From/To Registers instead of Gateways In/Out 2 'sysgen2opb' is a MATLAB script which converts a model built in Xilinx System Generator into an OPB-compliant peripheral for use with the embedded PowerPCs. The script replaces all the model's From/To Registers with memory mapped registers. It also creates the necessary address decode logic and a C header file with the resulting register map. 6 3 7 In addition, there are two options to turn on/off 8 1. Shared Memory Extension Script - This script is the Simple Registers Script with the Shared Memory extension. The Shared Memory support requires the usage of Dual Port RAM's. 9 1. Configurable Subsystem Extension Script - This script is the Simple Registers Script with the Configurable Subsystem Extension. It will take the gateway's/FromTo Registers and register's and store them into a library of Configurable Subsystems. 4 Alternatively, if an addressable dual-port storage block is used within a System Generator model, the storage element may be mapped directly into the OPB memory space. This functionality, termed the Shared Memory Extension, permits higher throughput when accessing shared storage elements. This extension can be turned on/off. This extension requires the usage of Dual Port RAM's. 10 5 11 6 The [source:/PlatformSupport/sysgen2opb/ latest copy of this tool] is available in the repository. … … 13 8 A copy of [wiki:OPBExportTool Xilinx's OPB Export tool] is needed to use the models generated by sysgen2opb. 14 9 15 [source:/PlatformSupport/sysgen2opb/examples Example unconverted and converted models] are also available. `orig` refers to original script example files. `smro` refers to Shared Memory read only example files. `smwo` refers to Shared Memory write only example files. 'confsubsys' refers to Configurable Subsystem Extension script example files.16 17 10 == Using sysgen2opb == 18 1. Prepend `"no_reg_"` to a gateway's name to prevent its being converted to a register. These gateways will become top-level HDL ports in the exported peripheral. 19 1. The Simple Gateway Script is supported for System Generator version 7.1 and 8.1. Shared Memory Extension, Configurable Subsystem Extension, and From/To Registers Extension Script are only supported for System Generator version 8.1. 11 1. The script is only supported for use with Xilinx System Generator 8.1 and 8.2. 20 12 1. Copy the conversion script (''sysgen2opb.m'') and its required skelton peripheral model (''skeleton_periph_model.mdl'') to the same directory as your model. 21 1. Make sure MATLAB's current working directory is the folder containing your model, the sysgen2opb script and skeleton model. Run the script on the MATLAB command line like: `sysgen2opb('yourModelName', 'yourS criptChoice', 'yourSMChoice', 'yourCSChoice', 'yourAppend')`13 1. Make sure MATLAB's current working directory is the folder containing your model, the sysgen2opb script and skeleton model. Run the script on the MATLAB command line like: `sysgen2opb('yourModelName', 'yourSMChoice')` 22 14 1. Replace 'yourModelName' with your Simulink model's name without the .mdl extension. 23 1. Replace 'yourScriptChoice' with one of the following:24 1. 'gw' which will run the Simple Gateways Script25 1. 'ftreg' which will run the From/To Registers Extension Script26 15 1. Replace 'yourSMChoice' with one of the following: 27 16 1. 'smon' which will turn on the Shared Memory Extension Script 28 17 1. 'smoff' which will turn off the Shared Memory Extension Script 29 1. Replace 'yourCSChoice' with one of the following: 30 1. 'cson' which will turn on the Configurable Subsystem Extension Script 31 1. 'csoff' which will turn off the Configurable Subsystem Extension Script 32 1. For Simple Gateways, From/To Registers, Shared Memory Extension, and Configurable Subsystem Extension Script, replace 'yourAppend' with a string which will replace the "no_reg_" prefix attached to unconverted gateways. 18 33 19 1. Additional Options 34 1. If you want to run the From/To register script with no shared memory extension, no configurable subsystem extension, and a blank string to strip away the "no_reg_" prefix, run: `sysgen2opb('yourModelName')` 35 1. If you want to run the simple gateway script with no shared memory extension, no configurable subsystem extension, and a blank string to strip away the "no_reg_" prefix, run: `sysgen2opb('yourModelName', 'gw')` 36 1. If you want to run the simple gateway script or From/To Register script with your choice on shared memory, no configurable subsystem extension, and a blank string to strip away the "no_reg_" prefix, run: `sysgen2opb('yourModelName', 'yourScriptChoice', 'yourSMChoice')` 37 1. If you want to run the simple gateway script or From/To Register script with your choice on shared memory, with your choice on configurable subsystem extension, and a blank string to strip away the "no_reg_" prefix, run: `sysgen2opb('yourModelName', 'yourScriptChoice', 'yourSMChoice','yourCSChoice');` 38 20 1. If you want to run the original script that utilizes From/To Registers with no shared memory extension, run: `sysgen2opb('yourModelName')` 39 21 40 22 == Current Limitations == 41 23 * The script (''sysgen2opb.m'') and skeleton peripheral model (''skeleton_periph_model.mdl'') must in the same directory as the model you wish to convert. 42 * The model you're converting must contain at least one Gateway In and one Gateway Out which will become registers.24 * The model you're converting must contain at least one From Register and one To Register. 43 25 * The base address and memory size of the resulting OPB peripheral cannot be changed dynamically in XPS. These parameters must be entered manually in XPS and locked before autogenerating addresses for other peripherals. 44 26 * All gateways which become registers must be clocked at the system sample period.