6.1.2. Resources section

The resources section describes the resources, including registers, memories, states, and other variables, of the component. In addition to annotated resources such as REGISTER and MEMORY, variable definitions can also be used.

The doubler component only requires a single variable that indicates if the current character sequence follows an escape character:

  1. Select the Source tab in the Workspace for the file SerialCharDoubler.lisa.

  2. Add the resources section to the code as shown in Example 6.1.

Example 6.1. Resource section with marker

// This file was generated by System Generator Canvas
// --------------------------------------------------
component SerialCharDoubler
{
    composition
    {
    }
    connection
    {
    }
    resources
    {
    // remember whether we are inside an escape sequence
    // which came through 'in'
       bool inEscape;
    }
}

Copyright © 2007-2009 ARM Limited. All rights reserved.ARM DUI 0370H
Non-Confidential