Ignore:
Timestamp:
Nov 25, 1999, 2:35:30 PM (26 years ago)
Author:
ansari
Message:

archediab 27

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archediab.old/archediab.sources/c/bit_block.c

    r643 r645  
    99#include "archeops.h"
    1010#include "bit_block.h"
     11#include "choix_param.h"
     12#include "structure.h"
     13#include "tm.h"
     14#include "tache.h"
     15#include "bolo.h"
     16#include "carte_acqui.h"
     17#include "carte_pci.h"
     18 
    1119
    12 
    13 
     20#define cadence_taux    16
     21#define mode_acquisition        0x00    //0xff en mode inverse, 0x00 en mode normal
    1422unsigned long   buffer;
    1523int     llgg,somme,type_du_block,numero;
    1624int     deb;    /*deb vaut zero si aucun debut n'a encore ete trouve*/
    1725int     compteur;
    18 int cpt_cherche_debut;
     26int     cpt_cherche_debut;
     27unsigned long   taux;
     28unsigned long   Nvide, Nplein;
    1929def_long_block
    2030
     
    2535{
    2636        int     i,m,bit;
     37       
    2738//      unsigned char   bit;    /*c'est le bit lu*/
    2839       
    29         bit=un_bit();
     40        bit=un_bit()^mode_acquisition;
    3041        switch(bit)
    3142                {
     
    3849                }
    3950       
     51       
    4052        compteur++;
    4153        i=compteur%32;
    4254
    43                
     55       
     56       
    4457       
    4558        switch(deb)
     
    108121                                                if(pbk->mot[m] == fin_block_mesure)
    109122                                                {
     123                                                        /*
    110124                                                        if(calcul_somme_block(pbk,llgg)!=somme)
    111125                                                        {
    112126                                                                ecrit_erreur_bit(erreur_somme);
    113127                                                               
    114                                                                 /*on continue quand meme*/
     128                                                               
    115129                                                        }
     130                                                        */
     131                                                       
    116132//                                                      else    ecrit_erreur_bit(bloc_correct);
    117133                                                               
    118134                                                        deb=0;
    119 
     135                                                        Nplein=compteur+1;
     136                                                        compteur=0;
     137                                                        //Calcul du taux de remplissage
     138                                                        taux=taux+(((0xffff-taux)*Nplein)>>cadence_taux);
     139                                                        tt->nb_lec_fofo_ext=((taux*1000)>>cadence_taux);
    120140                                                        return(lit_bit_un_block);
    121141                                                                               
     
    129149                                                }
    130150                                               
     151                                       
     152                                               
     153                                               
    131154                                               
    132155                                        }
    133                                 }               
     156                                       
     157                                }
     158                               
     159                                               
    134160                        }
    135161                        break;
     
    138164                default :
    139165               
    140                                
     166                        if(compteur>1000)
     167                        {
     168                                Nvide=compteur;
     169                                compteur=0;
     170                                taux=taux-((taux*Nvide)>>cadence_taux);
     171                                tt->nb_lec_fofo_ext=((taux*1000)>>cadence_taux);
     172                        }       
    141173                        if(buffer==debut_block_mesure)
    142174                        {
    143175                                deb=1;
     176                                Nvide=compteur-32;
    144177                                compteur=31;
    145178                                pbk->debut=buffer;
Note: See TracChangeset for help on using the changeset viewer.