Jump to: navigation, search

Difference between revisions of "DSDP/RTSC - xdc.platform.ICpuDataSheet"

Line 80: Line 80:
[http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/platform/package.html RTSC Platform Model Reference] - the reference API for the current platform model<br>  
[http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/platform/package.html RTSC Platform Model Reference] - the reference API for the current platform model<br>  
[[Image:Soc.zip|Soc.zip]] - full PSP example text  
[[Media:Soc.zip|Soc.zip]] - full PSP example text  

Revision as of 21:16, 20 July 2009


The current RTSC platform model contains a description of the hardware (HW) as a part of the configuration model.  This part of the model - accessible via Program.cpu - allows portable XDCscript code to reflect on the specific HW and conditionally generate results that are platform-specific.

Although the current HW model provides specific device information and a complete memory map as seen by executing applications, it does not currently provide a way to identify peripherals that are part of the device; e.g., what types of peripherals (timers, serial ports, ADCs, etc.) are present, how many exist, their base addresses, and any device specific attributes associated with these peripherals).


Extend the platform model to include a notion of a "peripheral" and augment the existing platform packages to include sufficient information to enable "automatic" configuration of peripheral drivers.  Automatic configuration implies:

  • user rarely needs to add device specific configuration statements
  • peripheral drivers can get information from the platform model (that is "implied" by the HW platform) sufficient to eliminate the need for internal tables of specific devices
  • the ability to detect conflicting/overlapping "ownership" of peripherals by separate runtime packages ensuring all software drivers operate properly without conflict


Automatic configuration of

  • ti.sysbios timers and
  • ti.sdo.ipc.Sem


PSP drivers maintain this monster table which is referenced in the Mod.xs files. All this information probably belongs in the catalog.

Here is an example from Uart.xs.

var soc = xdc.loadCapsule("ti/psp/cslr/soc.xs");

 *  ======== module$use ========
function module$use()
    Uart = this;
    IDriver = xdc.module("ti.sdo.io.IDriver");
    DriverTypes = xdc.useModule("ti.sdo.io.DriverTypes");
    Semaphore = xdc.useModule("ti.sysbios.ipc.Semaphore");
    if (!(Program.cpu.deviceName in soc.deviceTable)) {

        Uart.$logError("Unsupported device",this, Program.cpu.deviceName);
    else {
        var uarts = soc.deviceTable[Program.cpu.deviceName].uarts;
        Uart.numInstances = uarts.length;
        Uart.defaultDeviceInfo.length = uarts.length;

        for (var i = 0; i < Uart.numInstances; i++) {   
            Uart.defaultDeviceInfo[i].baseAddress = uarts[i].baseAddress;
            Uart.defaultDeviceInfo[i].cpuEventNumber = uarts[i].cpuEventNumber;
            Uart.defaultDeviceInfo[i].rxDmaEventNumber = uarts[i].rxDmaEventNumber;
            Uart.defaultDeviceInfo[i].txDmaEventNumber = uarts[i].txDmaEventNumber;
            Uart.defaultDeviceInfo[i].inputFrequency =  uarts[i].inputFrequency;


The following notes sketch the current thinking.

ICpuDataSheet would include a map of peripherals, say xdc.platform.IPlatform.Peripheral, were each peripheral would be a structure containing a name, base address, and an arbitrary hash of device specific attributes.

  • name would name a RTSC module that identifies the HW peripheral
  • the base address would be a device
  • the attrs hash would contain attributes such as interrupt id
  • a instance of the named module

The keys of the peripheral map might be the device-specific names for the peripherials.

Since each peripheral is an instance of a module, it can maintain "ownership" information and enforce the constraint that only one package may claim control of the peripheral.  This will prevent applications from trying to use HW already managed by high-level packages.


RTSC Platform Model Reference - the reference API for the current platform model

Soc.zip - full PSP example text