Ignore:
Timestamp:
Jan 13, 2012, 6:32:51 PM (12 years ago)
Author:
cecile
Message:

Fault candidates OK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vis_dev/vis-2.3/src/debug/debugAbnormal.c

    r41 r42  
    4444  with a new table including the abnormal predicate.
    4545  For a combinatorial node n is tranformed into (abn_n)?i_n:n
    46   If the abnormal predicate is activ then n is replaced by a free input]
     46  If the abnormal predicate is active then n is replaced by a free input.
     47  We assume that the combinatorial gate at on one bit only.]
    4748
    4849  SideEffects [fill the abnormal structure]
     
    6768
    6869                Tbl_Table_t    *table =  Ntk_NodeReadTable(node);
    69                 (void) fprintf(vis_stdout, "** old table\n");
    70                 Tbl_TableWriteBlifMvToFile(table,2,vis_stdout);
     70        if(abnormal->verbose){
     71                  (void) fprintf(vis_stdout, "** old table\n");
     72                  Tbl_TableWriteBlifMvToFile(table,2,vis_stdout);
     73        }
    7174                // Build new variables abnormal  and  input
    7275                Ntk_Node_t * abnNode = Dbg_CreateNewNode(ntk,node,"abn");
     
    8184                Tbl_TableAddColumn(table,i,0);
    8285                int iIndex = Tbl_TableReadVarIndex(table, i, 0);
    83 
    84                 //For each row already there in the table
     86       
    8587                int rowNum;
    8688                for(rowNum = 0; rowNum <  Tbl_TableReadNumRows(table);rowNum++){
     
    9496                //the new row
    9597                int r = Tbl_TableAddRow(table);
    96 
     98       
    9799                int colNum;
    98100            for (colNum = 0; colNum < Tbl_TableReadNumInputs(table); colNum++) {
     
    104106                    Tbl_TableSetEntry(table, entry, r, colNum, 0);
    105107                }
     108        int defaultVal = Dbg_GetDefaultValue(table);
     109        if(defaultVal == -1)
     110        {
     111                (void) fprintf(vis_stdout, "Error default value of the table \
     112            of node %s\n", nodeName);
     113            return;
     114        }
     115        int outVal = (defaultVal +1 )% 2;
     116        if(abnormal->verbose)
     117                (void) fprintf(vis_stdout, "Default value : %d\n",defaultVal);
    106118                for (colNum = 0; colNum < Tbl_TableReadNumOutputs(table); colNum++){
    107119                        Tbl_Entry_t * entry = Tbl_EntryAlloc(Tbl_EntryNormal_c);
    108                         Tbl_EntrySetValue(entry,1,1);
     120                        Tbl_EntrySetValue(entry,outVal,outVal);
    109121                    Tbl_TableSetEntry(table, entry, r, colNum, 1);
    110122                }
     123        if(abnormal->verbose){
    111124                 printf("---------------\n");
    112125                 Tbl_TableWriteBlifMvToFile(table,0,vis_stdout);
     126        }
    113127          }
    114128        }
Note: See TracChangeset for help on using the changeset viewer.