Description : | Hello Scilab users and developers!
Last time I had to implement some IIR filters in DSP56002 based DSP system.
Of course I wanted to use Scilab to perform this task. To make my project
easier I have created the Scilab's routine for automatic generation of
DSP56002 assembly code.
I don't think it is the best solution. In fact I have noticed strange
behaviour of such automatically generated filters when I fed them with
input samples near to maximum or minimum values. (Probably there is
something wrong with scaling).
However this routine appeared to be useful enough, so I would like to
present them to others.
May be someone else, inspired by it, will create the another one, much
better than mine...
Wojciech Zabolotny
wzab@ipe.pw.edu.pl
================= SUBROUTINE DESCRIPTION ==========================
The genfilt Scilab's routine generates the assembler code implementing
the IIR filter. The generated code is compatible with the assembler
(unfortunately DOS version :-( ) provided with the DSP56002EVM board.
Syntax:
result = genfilt(coeffa, coeffb, filter_name, file_name)
Explanation of parameters:
coeffa : vector containing "a" (denominator) coefficients
coeffb : vector containing "b" (numerator) coefficients
filter_name : name of the filter used for the automatic generation of
different labels.
Let's assume, that the filter_name is 'f1', then vector of
"a" coefficients will be labelled "CoeffA_f1", vector of
"b" coefficients - "CoeffB_f1", macro implementing the filter
routine - "Filtr_f1".
Buffers used by this routine: "FltBufIn_f1","FltBufOut_f1",
"FltInSmpPtr_f1" and "FltOutSmpPtr_f1".
file_name : name of the file, where the assembler code should be written.
The output value - always "1" (there is no error detection at the moment)
|