Main Content

SoC Software Architecture Template

To create a System Composer™ model that defines a set of tasks in an SoC Blockset™ application, use the SoC Software Architecture template. You can create a model from this template and use it to determine whether the application tasks can run without overrunning their schedules.

To create a Simulink® project using the SoC Software Architecture template, follow the steps in Create SoC Model Using SoC Blockset Template. The generated project includes a System Composer model with components representing SoC Blockset tasks, as shown in this image.

Software Architecture template top model

Template Structure

The template model includes two periodic and two aperiodic tasks. Use the template model as a guide and remove or add tasks as required for your application. Once you define the properties of your tasks, you can analyze the schedulability of the task set.

The template model implements the task behavior as a pass-through. To run a behavioral simulation from this template model, add a Simulink behavior to each task. To simulate the hardware and the software effects and to deploy the model to hardware, create an equivalent SoC Blockset model by clicking the Create SoC Blockset model block in the architecture model.

Set Task Properties

Select periodicTask1 in the architecture model. Then, open the Property Inspector: On the Modeling tab, in the Design gallery, select Property Inspector.

You can now set the values of the task properties. The task properties correspond to the task properties in the SoC Blockset Task Manager block.

Property inspector showing the task properties for the periodic task

Open the property inspector for periodic task2 and for the two aperiodic tasks, and set their respective properties.

Analyze Task Schedulability

After defining task properties, you can analyze whether the task set is schedulable, that is, whether all tasks can run in real-time without overruns. Performing this analysis at this time allows you to discover potential problems before deploying the model to hardware. Use the socTaskSchedulability function to analyze your model.

Create SoC Blockset Model

After you define the software architecture of your application, you can simulate the hardware and the software effects of the application before you deploy the model to your hardware. To create an SoC Blockset model, click the Create SoC Blockset model block in the architecture model. For example, for the default architecture model, the result is an SoC Blockset model with two aperiodic tasks, two periodic tasks, and a Task Manager block.

Model resulting from the default architecture template

See Also

Blocks

Apps

Functions

Related Topics