Discrete buffer generator block
Add here a paragraph of the function description.
- Size of outputs :
Type 'vec' of size 1. The parameter description 1.
- Size of memory word :
Type 'vec' of size 1. The parameter description 2.
- Initial discrete state :
Type 'vec' of size -1. The parameter description 3.
- Accepted herited (0/1)? :
Type 'vec' of size 1. The parameter description 4.
Example
- always active: no
- direct-feedthrough: no
- zero-crossing: no
- mode: no
- number/sizes of inputs: 0 /
- number/sizes of outputs: 1 / 16
- number/sizes of activation inputs: 1 / 1
- number/sizes of activation outputs: 0 /
- continuous-time state: no
- discrete-time state: yes
- name of computational function: z_gen
ZGEN_f.sci
/* z_buf Scicos discret memory block
* Type 4 simulation function ver 1.0 - scilab-3.0
* 17 janvier 2005 - IRCOM GROUP - Author : A.Layec
*/
/* REVISION HISTORY :
* $Log$
*/
#include "scicos_block.h"
/* ipar[0] : taille du mot mémoire
* z[0..ipar[0]-1] : mot mémoire
* z[ipar[0]] : compteur
*/
void z_gen(scicos_block *block,int flag)
{
int i,j;
if(flag==1)
{
j=(int)block->z[block->ipar[0]];
for(i=0;i<block->outsz[0];i++) block->outptr[0][i]=block->z[j+i];
j=j+block->outsz[0];
if(j>=block->ipar[0]) j=0;
block->z[block->ipar[0]]=j;
}
}
IRCOM Group
generate_xml