MATLAB Class Interface - MATLAB Class Interface - 6.0 English - PG141

DDS Compiler LogiCORE IP Product Guide (PG141)

Document_ID
PG141
Release_Date
2024-12-11
Version
6.0 English

The @dds_compiler_v6_0_bitacc class handles the create/destroy semantics on the C model. The class provides objects for each of the data and control structures defined for the C model and described in Data Types. MATLAB arrays are used for the mapping of types as in the following table.

Table 1. C Model Type Mapping
C Model Type MATLAB Type
xip_real double

The class provides the following methods.

Constructor

[model] = dds_compiler_v6_0_bitacc
[model]=dds_compiler_v6_0_bitacc(config)
[model]=dds_compiler_v6_0_bitacc(field, value [, field,value]*)

* indicates an optional parameter.

The first version of the function call constructs a model object using the default configuration. The second version constructs a model object from a structure that specified the configuration parameter values to use. The third version is the same as the second, but allows the configuration to be specified as a series of (parameter name, value) pairs rather than a single structure. The names and valid values of configuration parameters are identical to those described for the C model in Data Types.

The MATLAB configuration structure can contain an additional element, PersistentMemory. When the element is set to TRUE the internal data memory state of the model is retained following a call to the run function. Otherwise, the model is reset after the data is returned. PersistentMemory is set to FALSE by default.

Get Version

[version] = get_version(model)

This method returns the version string of the C model library used.

Get Configuration

[config] = get_configuration(model)

This method returns the current parameters structure of a model object. If the model object is empty the method returns the default configuration. If the model object has been created, the method returns the configuration parameters that were used to create it.

Reset

[model] =reset(model)

This function resets the model.

Config_do

config_do(model, config_pkt)

This method applies new values of PINC and/or POFF to the model, depending on whether Phase Increment and Phase Offset have been configured as programmable. This function only applies if at least one of Phase Increment or Phase Offset have been configured as programmable.

Run

[data_out]=run(model, data_samples)
[data_out]=run(model, data_samples, data_in)

Each of these methods causes the model to be run for the number of cycles specified by the data_samples value.

The first form applies if the model has been configured with neither Phase Increment nor Phase Offset configured as Streaming.

The second form applies an array of values for PINC and/or POFF. Each element of data_in should have a value for PINC (if Phase Increment has been configured as Streaming) and/or POFF (if Phase Offset has been configured as Streaming). The number of elements in data_in should match data_samples.

Data out is an array of output samples. Each element contains a phase, sin and cosine value output depending on the configuration of the model. The number of output elements is the data_samples value.

Destroy

destroy(model)

This method destroys all memory associated with the model.