Changes between Version 78 and Version 79 of sysgen2opb


Ignore:
Timestamp:
Aug 5, 2006, 12:57:32 PM (18 years ago)
Author:
elliotng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • sysgen2opb

    v78 v79  
    22'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.
    33There are three options in running the script:
    4  1. Simple Registers Script - This script is exactly what is described on the above.
    5  1. Shared Memory Extension Script - This script is the Original Script with the Shared Memory extension. The Shared Memory support requires the usage of Dual Port RAM's.
    6  1. Configurable Subsystem Extension Script - This script is the Simple Registers Script with the Configurable Subsystem Extension. It will take the gateway's and register's and store them into a library of Configurable Subsystems.
     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
     6 1. Memory Reinitialization -  This script will reinitialize the base address and the high address
     7
     8In addition, there are two options to turn on/off:
     9 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.
     10 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.
    711
    812The [source:/PlatformSupport/sysgen2opb/ latest copy of this tool] is available in the repository.
     
    1216[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.
    1317
    14 A [source:Documentation/sysgen2opb%20Reference%20Design/ full pdf documentation] is available.
    15 
    1618== Using sysgen2opb ==
    1719 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.
    18  1. The original script is supported for System Generator version 7.1 and 8.1. The Shared Memory Extension Script and the Configurable Subsystem Extension Script are only supported for System Generator version 8.1.
     20 1. The Simple Gateway Script and Memory Reinitialization Script are 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.
    1921 1. Copy the conversion script (''sysgen2opb.m'') and its required skelton peripheral model (''skeleton_periph_model.mdl'') to the same directory as your model.
    20  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', hex2dec('yourBaseAddress'), 'yourSelection', 'newPrefix')`.
     22 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', hex2dec('yourBaseAddress'),'yourScriptChoice', 'yourSMChoice', 'yourCSChoice', 'yourAppend')`.
    2123   1. Replace 'yourModelName' with your Simulink model's name without the `.mdl` extension.
    2224   1. Replace 'yourBaseAddress' with a 32-bit memory address in hexidecimal notation. `FF100000` is usually a safe choice.
    23    1. Replace 'yourSelection' with one of the following:
    24       1. 'orig' which will run the Simple Registers Script
    25       1. 'sm' which will run the Shared Memory Extension Script
    26       1. 'confsubsys' which will run the Configurable Subsystem Extension Script
    27    1. Replace 'newPrefix' with a string which will replace the `"no_reg_"` prefix attached to unconverted gateways.
    28    1. If you want to run the Simple Registers Script with a blank string to strip  away the "no_reg_" prefix, run:
    29       `sysgen2opb('yourModelName', hex2dec('yourBaseAddress'))`
    30    1. If you want to run one of the scripts with a blank strip to strip away the "no_reg_" prefix, run:
    31       `sysgen2opb('yourModelName', hex2dec('yourBaseAddress'), 'yourSelection')`
     25   1. Replace 'yourScriptChoice' with one of the following:
     26     1. 'gw' which will run the Simple Gateways Script
     27     1. 'ftreg' which will run the From/To Registers Extension Script
     28     1. 'reinitmem' which will reinitialize the base and high address
     29   1. Replace 'yourSMChoice' with one of the following:
     30     1. 'smon' which will turn on the Shared Memory Extension Script
     31     1. 'smoff' which will turn off the Shared Memory Extension Script
     32   1. Replace 'yourCSChoice' with one of the following:
     33     1. 'cson' which will turn on the Configurable Subsystem Extension Script
     34     1. 'csoff' which will turn off the Configurable Subsystem Extension Script
     35   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. For Memory Reinitialization, 'yourAppend' will append the string to the name of the system.
     36   1. Additional options:
     37     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', hex2dec('yourBaseAddress'))`
     38     1. If you want to run the Memory Reinitialization Script, run: `sysgen2opb('yourModelName', hex2dec('yourBaseAddress'), 'reinitmem')`
     39     1. If you want to run the Memory Reinitialization Script, with a string appended to the model name, run: `sysgen2opb('yourModelName', hex2dec('yourBaseAddress'), 'reinitmem', 'yourAppend')`
     40     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', hex2dec('yourBaseAddress'), 'ftreg')`
     41     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', hex2dec('yourBaseAddress'), 'yourScriptChoice', 'yourSMChoice')`
     42     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', hex2dec('yourBaseAddress'), 'yourScriptChoice', 'yourSMChoice', 'yourCSChoice')`
    3243
    3344== Current Limitations ==