Main Content

MATLAB to SystemC Code Conversion Options

MATLAB to SystemC Code Conversion

The MATLAB to SystemC Workflow task in the HDL Workflow Advisor generates SystemC code from fixed-point MATLAB® code. It simulates and verifies the SystemC against the fixed-point algorithm.

SystemC Code Generation: Target Tab

Select target hardware and language and required outputs.

Input Parameters

Check HDL Conformance

Enable HDL conformance checking.

Default: Off

SystemC Code Generation: Coding Style Tab

Parameters that affect the style of the generated code.

Input Parameters

Preserve MATLAB code comments

Include MATLAB code comments in generated code.

Default: On

Include MATLAB source code as comments

Include MATLAB source code as comments in the generated code. The comments precede the associated generated code. Includes the function signature in the function banner.

Default: On

Generate Report

Enable a code generation report.

Default: Off

Emit time/date stamp in the header

Enable to include time and date in output file header..

Default: Off

Comment in header

Specify comment lines in header of generated SystemC and test bench files.

Default: None

Text entered in this field as a character vector generates a comment line in the header of the generated code. The code generator adds leading comment characters for the target language. When newlines or linefeeds are included in the text, the code generator emits single-line comments for each newline.

Complex real part postfix

Specify a character vector to append to the real part of complex signal names.

Default: '_re'

Complex imaginary part postfix

Specify a character vector to append to the imaginary part of complex signal names.

Default: '_im'

Reserved word postfix

Specify a character vector to append to value names, postfix values, or labels that are SystemC reserved words.

Default: '_rsvd'

SystemC Code Generation: Optimizations Tab

Optimization settings

Input Parameters

Map persistent array variables to RAMs

Select to map persistent array variables to RAMs instead of mapping to shift registers.

Default: Off

Dependencies:

  • RAM Mapping Threshold

  • Persistent variable names for RAM Mapping

RAM Mapping Threshold

Specify the minimum RAM size required for mapping persistent array variables to RAMs.

Default: 256

Initialize Block Ram

Enable to initialize the RAM elements to zero.

Default: off