This Section explains how to configure SC_REX, assuming it has been already built and installed as explained in Section [Install].
The XML file of the architecture is located in /etc/screx/architecture.xml and describes the underlying architecture (i.e., the set of reconfigurable devices, their properties, the files to access memories and to modify each property).
The XML file has a structure similar to the following example:
<?xml version="1.0" encoding="utf-8"?> <architecture> <reconf_processor type="mycpu" name="0"> <reconf_proc_instances> <reconf_instance data_memory_file="/dev/mycpu.0-dmemory.0" instruction_memory_file="/dev/mycpu.0-imemory.0" control_file="/dev/mycpu.0-ctrl.0" interrupt_file="/dev/mycpu.0-interrupt.0" /> </reconf_proc_instances> <reconf_properties> <property name="issuewidth" file="/dev/..." initial_setting="4"/> <property name="cache_size" file="/dev/..." initial_setting="512"/> </reconf_properties> </reconf_processor> </architecture> <architecture>
Note that in this example:
This file must be written based on files/values exported by your specific kernel driver, of course. The file is read by the Supervisor only once, during the boot.
The XML file for the reconfiguration allows to understand the new configuration for each property of each reconfigurable device given the information about QoS and phase received at run-time by the application. It's a sort of "big table" written in XML. The XML file has a structure similar to the following example:
<?xml version="1.0" encoding="utf-8"?> <!-- #define PHASE_QOS_SMALL 0 --> <!-- #define PHASE_QOS_MEDIUM 1 --> <!-- #define PHASE_QOS_HIGH 2 --> <!-- #define PHASE_NOTYPE 0 << 0 // No type specified --> <!-- #define PHASE_PARALLEL 1 << 0 // Potentially parallel --> <!-- #define PHASE_STRIDED 1 << 1 // Strided --> <!-- #define PHASE_MANY_REFS 1 << 2 // Many data references --> <!-- #define PHASE_LOOP 1 << 3 // Intensive loop --> <!-- QOS = 0 (QOS_SMALL) PHASE_TYPE = 0 (PHASE_NOTYPE) --> <configurationtable> <configuration qos="0" phase_type="0"> <power_consumption value="low"> <reconf_processor type="vex"> <property name="forwarding" value="0"/> <property name="issuewidth" value="1"/> <property name="registerfile" value="100"/> <property name="cache_size" value="0"/> <property name="cache_blocksize" value="14"/> </reconf_processor> </power_consumption> <power_consumption value="medium"> <reconf_processor type="vex"> <property name="forwarding" value="0"/> <property name="issuewidth" value="1"/> <property name="registerfile" value="100"/> <property name="cache_size" value="0"/> <property name="cache_blocksize" value="14"/> </reconf_processor> </power_consumption> <power_consumption value="high"> <reconf_processor type="vex"> <property name="forwarding" value="0"/> <property name="issuewidth" value="1"/> <property name="registerfile" value="100"/> <property name="cache_size" value="0"/> <property name="cache_blocksize" value="14"/> </reconf_processor> </power_consumption> </configuration>
Some examples of these files can be found inside the /etc/screx/ directory. The absolute path of the file is communicated by the application whenever it sends a request for a new task to the supervisor.