System Objects

Predefined and user-defined System object™ support for HDL code generation

Classes

matlab.System Base class for System objects
matlab.system.mixin.Nondirect Nondirect feedthrough mixin class
matlab.system.StringSet Set of valid character vector values

System Objects

hdl.RAM Single, simple dual, or dual-port RAM for memory read/write access
hdl.BlackBox Black box for including custom HDL code

Examples and How To

HDL Code Generation Support

HDL Code Generation from System Objects

This example shows how to generate HDL code from MATLAB® code that contains System objects.

Generate Code for User-Defined System Objects

To create a user-defined System object and generate code:

Model State with Persistent Variables and System Objects

This example shows how to use persistent variables and System objects to model state and delays in a MATLAB® design for HDL code generation.

Integrate Custom HDL Code Into MATLAB Design

Include pre-existing HDL code in your MATLAB® design

System Object Basics

Define Basic System Objects

This example shows how to create a basic System object that increments a number by one.

Insert System Object Code Using MATLAB Editor

Instructions for inserting code for properties, methods, inputs and outputs, and states using the System object editing options in MATLAB Editor.

Analyze System Object Code

Use the Analyzer to view and navigate your System object code.

Change Number of Inputs or Outputs

This example shows how to specify two inputs and two outputs to a System object .

Initialize Properties and Setup One-Time Calculations

This example shows how to write code to initialize and set up a System object.

Define Property Attributes

This example shows how to specify property attributes.

Use Update and Output for Nondirect Feedthrough

This example shows how to implement nondirect feedthrough for a System object using the updateImpl, outputImpl and isInputDirectFeedthroughImpl methods.

Define Composite System Objects

This example shows how to define System objects that include other System objects.

Define System Object for Use in Simulink

Develop System block and interactively preview block dialog box (with Simulink® only).

Concepts

HDL Code Generation Support

HDL Code Generation for System Objects

System object support for HDL code generation

Predefined System Objects Supported for HDL Code Generation

List of predefined System objects for HDL code generation

System Object Basics

What Are System Objects?

Defines System objects and key uses

Analyze System Object Code

Use the Analyzer to view and navigate your System object code.

System Objects vs. MATLAB Functions

How to determine whether to use System objects or MATLAB functions

System Object Methods

Using methods to process or obtain information on System objects

Methods Timing

Order in which methods are called and executed

System Design in MATLAB Using System Objects

Steps for designing systems using System objects

Best Practices for Defining System Objects

System objects best practices

System Objects in Simulink

How to include System objects in Simulink models

What Are Mixin Classes?

Mixin classes description

Was this topic helpful?