Trying to build up a model to match what is happening with the FIR IP in Xilinx. I am stuck on a few things.
-
Building the main tap of the FIR I use a DLR, delay, and sum block. I am not sure how to model the finite characteristics with the DLR such as input and coefficient bits.
-
There are many taps so what is the best way to convey that from scilab as variables?
-
After building out the a tap I convert it to a super block. Is it best to save at that point as an xcos file and then add that to the pallet to build out the string of taps? I find the wiring start to get a little wonky even trying to follow the output to input methodology.
-
After building out nested super blocks, I am not sure how to best pass variables. In each context for each super block? Gets pretty intense and hard to track.
Has anyone done this before and could help clear up a few things?
Building the main tap of the FIR I use a DLR, delay, and sum block. I am not sure how to model the finite characteristics with the DLR such as input and coefficient bits.
In Xcos, the standard FIR is supposed to be DLR only. The delay block is very specific to some usage. What do you model with it?
Maybe converting your FIR to ABCD representation and using DLSS or TCLSS (with a reset) will be more appropriate.
There are many taps so what is the best way to convey that from scilab as variables?
I don’t get it, what’s a tap? Please explain or paste an example 
After building out the a tap I convert it to a super block. Is it best to save at that point as an xcos file and then add that to the pallet to build out the string of taps? I find the wiring start to get a little wonky even trying to follow the output to input methodology.
Correct, to manage a diagram with many sub-systems, save it as an Xcos file and copy/paste it (same as adding it to the palette). An alternative is to define a Scilab macro to create your own custom block, which contains the super-block logic.
Note: there is a work-in-progress block to link super-block content to a file, feel free to check it Draft: xcos: introduce a REFERENCE_FILE block (!445) · Merge requests · scilab / scilab · GitLab
After building out nested super blocks, I am not sure how to best pass variables. In each context for each super block? Gets pretty intense and hard to track.
As said in another answer, GOTO/FROM can help you do that. The referenced tag can be local/scoped or global. If you variable are parameters, you can use a companion script where you define Scilab values and use them in your super-blocks.
A tap is a multiply/add operation followed by a delay as is used in a FIR filter. The location of each coefficient is considered a tap. Thus a FIR filter that has 32 coefficients is said to be composed of 32 taps.
I guess I could do this using scifunc block. Just figure that out now. Let you know how it goes.
I was able to figure out how to use the DLSS block to model my FPGA FIR implementation and it works well and is much faster than the discrete model.
1 Like