Resource Sharing of Subsystems and Floating-Point IPs - MATLAB & Simulink (original) (raw)

Resource sharing is an area optimization in which HDL Coder™ identifies multiple functionally equivalent resources and replaces them with a single resource. The data is time-multiplexed over the shared resource to perform the same operations. To learn more about how resource sharing works, see Resource Sharing.

You can follow these guidelines to learn how to use the resource sharing optimization effectively for subsystems such as atomic subsystems and MATLAB Function blocks, and with floating-point IPs. Each guideline has a severity level that indicates the level of compliance requirements. To learn more, see HDL Modeling Guidelines Severity Levels.

General Considerations for Sharing of Subsystems

Guideline ID

3.1.5

Severity

Recommended

Description

To share resources for identical subsystems, such as when groupingProduct, Add, and Delay blocks to map to one DSP slice, the subsystems to be shared must be Atomic Subsystem blocks, Virtual Subsystem blocks, orMATLAB Function blocks.

Use MATLAB Datapath Architecture for Sharing with MATLAB Function Blocks

Guideline ID

3.1.6

Severity

Recommended

Description

HDL Coder shares MATLAB Function blocks that have:

Make sure that the blocks do not use:

By using the MATLAB Datapath architecture, you can share resources inside the MATLAB Function block and across theMATLAB Function block with other blocks in your Simulink model. When you use this architecture, the code generator treats the MATLAB Function block like a regular Subsystem block. This capability enables you to more widely apply various speed and area optimizations with MATLAB Function blocks. See HDL Optimizations Across MATLAB Function Block Boundary Using MATLAB Datapath Architecture.

Sharing of Subsystems

Guideline ID

3.1.7

Severity

Recommended

Description

HDL Coder can share Subsystem blocks that have the same Simulink checksum and the same HDL block properties.

To share Subsystem blocks, the state elements that the blocks can contain are:

The state elements must have the Initial condition parameter set to 0.

Sharing of subsystems inside enabled subsystems with synchronous semantics is not supported. To share resources, use enabled subsystems with classic semantics.

You cannot share subsystems that contain the following blocks or block implementations:

Limitations

Resource sharing of atomic subsystems might cause a mismatch in the initialization cycles of the validation model if your model has:

Resource Sharing of Floating-Point IPs

Guideline ID

3.1.8

Severity

Recommended

Description

To share multiple:

See also Modeling with Native Floating Point.

See Also

Topics