INOS
|
The COP .xml files are used to describe and configure hardware on the basis of the COP technology.
Data between COP peripherals and bus masters is exchanged using so called ports. A peripheral can define what ports is has and the master then sets up the communication, port handlers and process image channels according to the peripheral module's description.
As the module knows best what features it has and what ports are available it contains these definitions in a compressed xml file which is read by the bus master upon scanning the bus for modules. With this information the card is already useable after scanning with its default names and values.
However customers would like to give the channels meaningful names, adjust some values etc. To make this possible the user can provide a second xml config file that includes the changes. For the COPBus each card has its own user file. These files are then merged with the card's scanned configuration files and overwrite the default values. The resulting files are then used to setup the ports and channels with the changed values.
The files needed for a COP config depend on the hardware, mainly on the COP bus master. A passive COP master needs a different config as an active or standalone master. An active master has its own operating system with config files for the connected modules. A passive master has no system therefore the complete COP configuration must be in the GinLink master.
After a COP module has been found on the bus it's necessary to determine its type and ports to setup the communication and process image. If the module has a valid EEPROM then the product id is taken from here and used to find the best matching xml config.
First a system xml has to be found that fully describes all the card's properties, especially all the used ports and image channels. Normally such a file that also matches the used FPGA is burned into the hardware. It is then read and used with a possibly available user config file.
If no system file is found in the hardware then a basic but possibly not exactly matching file is taken from the inos library. The selection is based on the product id. If this is not available (no EEPROM or invalid) then the FPGA type is taken as criteria. This is not a full match but should be enough to communicate with the card.
In both cases (system file from hardware or from inos library) it's possible to override the file with a file contained in the project. It should be named as productid.xml and of course be a valid xml file describing the hardware. If there is more than one module of the same type then this project xml file will be used for all modules of this type.
After finding the system xml it's possible to adjust some values with a user config file as described in the introduction.
If it is an active node with an own system then the xml config consists of one file per COP module. Templates can be found in the directory \indel\share\inosconfig\cop, the files starting with xcfg-.
Example of a module user config file:
The comment in the beginning is necessary as Trans32 will use this name to create the database table name in the target. This is used to recognize user config files and distinguish them from system config files. The type is fixed, the name can be adjusted.
Each COP module can have a different file. The name can be adjusted as well as the address which needs to be the value of the address switch. The modules also work if there is no user configuration. In this case the standard channel names and settings are used as the card defines them itself.
A passive COP master has no system and no configuration. Instead all scanned COP modules are forwarded to the GinLink master which needs to setup the ports and channels and use an existing user configuration. As there may be more than one COP node on the GinLink the format for the xml configuration is slightly changed. Instead of one xml file per COP module there must be one xml file describing the whole COP node. It's a hierarchical file that in itself contains the xml configs for the COP modules on this node. A template can again be found in the above mentioned directory, the file named mycop-node-0.xml
Example of a node user config file:
The address of the COP node is the MAC address (lower 4 bytes) as visible if the node is used without any user configuration. The node and modules are still found and used with their default values und accessible as GinLink subtarget.
Additionally to the xml config a COP node also needs an entry in the device-map.xml file.
See xml user configuration for more information about the xml files.