The @fir_compiler_v7_2_bitacc class handles the create/destroy semantics on the C model. The class provides objects for each of the data, configuration and control structures, defined for the C model and previously described in Structures. All structure elements have MATLAB type double. MATLAB arrays are used with the mapping of types as in the following table.
C Model Type | MATLAB Type |
---|---|
xip_uint32 | uint32 |
xip_complex | complex double |
xip_real | double |
Constructor
[model]=fir_compiler_v7_2_bitacc
[model]=fir_compiler_v7_2_bitacc(config)
[model]=fir_compiler_v7_2_bitacc(field, value [, field,value]*)
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 specifies 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 previously described for the C model in Structures.
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 Filter function. Otherwise, the model is Resets after the filtered 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, see Reset Model Object for further details.
Send CONFIG Packet
[model]=config_send(model,cnfg_packet)
This function passes a configuration packet (see Table 2), to the model. See Send CONFIG Packet for further details.
Send RELOAD Packet
[model]=reload_send(model,rld_packet)
This function passes a reload packet (see Table 3), to the model. See Send RELOAD Packet for further details.
Filter
[model,data_out]=filter(model,data_in)
This function passes a MATLAB double array to the model and returns the filtered output. data_in can be a 1, 2 or 3 dimensional array:
- A 1-D array is only supported by a single channel, single path filter configuration.
- A 2-D array is only supported by a multichannel, single path filter configuration.
- All filter configurations support a 3-D array.
See Send DATA Packet and Figure 1 for further details on the data array structure.