Changes between Version 80 and Version 81 of sysgen2opb


Ignore:
Timestamp:
Oct 18, 2006, 10:48:22 PM (18 years ago)
Author:
elliotng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • sysgen2opb

    v80 v81  
    11= 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 three options in running the script:
     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.
     3There are two options in running the script:
    44 1. Simple Gateways Script - This script is exactly what is described on the above.
    55 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
    76
    8 In addition, there are two options to turn on/off:
     7In addition, there are two options to turn on/off
    98 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.
    109 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.
     
    1817== Using sysgen2opb ==
    1918 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.
    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.
     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.
    2120 1. Copy the conversion script (''sysgen2opb.m'') and its required skelton peripheral model (''skeleton_periph_model.mdl'') to the same directory as your model.
    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')`.
    23    1. Replace 'yourModelName' with your Simulink model's name without the `.mdl` extension.
    24    1. Replace 'yourBaseAddress' with a 32-bit memory address in hexidecimal notation. `FF100000` is usually a safe choice.
     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', 'yourScriptChoice', 'yourSMChoice', 'yourCSChoice', 'yourAppend')`
     22
     23   1. Replace 'yourModelName' with your Simulink model's name without the .mdl extension.
    2524   1. Replace 'yourScriptChoice' with one of the following:
    2625     1. 'gw' which will run the Simple Gateways Script
    2726     1. 'ftreg' which will run the From/To Registers Extension Script
    28      1. 'reinitmem' which will reinitialize the base and high address
    2927   1. Replace 'yourSMChoice' with one of the following:
    3028     1. 'smon' which will turn on the Shared Memory Extension Script
     
    3331     1. 'cson' which will turn on the Configurable Subsystem Extension Script
    3432     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')`
     33   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.
     34   1. Additional Options
     35     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')`
     36     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')`
     37     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')`
     38     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');`
     39
    4340
    4441== Current Limitations ==