memory.c File Reference

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "db.h"
#include "defines.h"
#include "exclude.h"
#include "func_iter.h"
#include "func_unit.h"
#include "link.h"
#include "memory.h"
#include "obfuscate.h"
#include "ovl.h"
#include "report.h"
#include "vector.h"
#include "vsignal.h"
#include "util.h"

Functions

void memory_get_stat (vsignal *sig, unsigned int *wr_hit, unsigned int *rd_hit, unsigned int *ae_total, unsigned int *tog01_hit, unsigned int *tog10_hit, unsigned int *tog_total, unsigned int *excluded, bool *cov_found, bool ignore_excl)
 Calculates the memory coverage numbers for a given memory signal.
void memory_get_stats (func_unit *funit, unsigned int *wr_hit, unsigned int *rd_hit, unsigned int *ae_total, unsigned int *tog01_hit, unsigned int *tog10_hit, unsigned int *tog_total, unsigned int *excluded, bool *cov_found)
 Calculates memory coverage numbers for the specified signal list.
void memory_get_funit_summary (func_unit *funit, unsigned int *hit, unsigned int *excluded, unsigned int *total)
 Gets memory summary information for a GUI request.
void memory_get_inst_summary (funit_inst *inst, unsigned int *hit, unsigned int *excluded, unsigned int *total)
 Gets memory summary information for a GUI request.
static void memory_create_pdim_bit_array (char **str, vsignal *sig, char *prefix, unsigned int dim)
static void memory_get_mem_coverage (char **mem_str, vsignal *sig, int offset, char *prefix, unsigned int dim, unsigned int parent_dim_width)
void memory_get_coverage (func_unit *funit, const char *signame, char **pdim_str, char **pdim_array, char **udim_str, char **memory_info, int *excluded, char **reason)
 Gets coverage information for the specified memory.
void memory_collect (func_unit *funit, int cov, sig_link **head, sig_link **tail)
 Collects all signals that are memories and match the given coverage metric for the given functional unit.
static bool memory_display_toggle_instance_summary (FILE *ofile, const char *name, int hits01, int hits10, int total)
static bool memory_toggle_instance_summary (FILE *ofile, funit_inst *root, char *parent_inst, int *hits01, int *hits10, int *total)
static bool memory_display_ae_instance_summary (FILE *ofile, char *name, int wr_hit, int rd_hit, int total)
static bool memory_ae_instance_summary (FILE *ofile, funit_inst *root, char *parent_inst, int *wr_hits, int *rd_hits, int *total)
static bool memory_display_toggle_funit_summary (FILE *ofile, const char *name, const char *fname, int hit01, int hit10, int total)
static bool memory_toggle_funit_summary (FILE *ofile, funit_link *head, int *hits01, int *hits10, int *total)
static bool memory_display_ae_funit_summary (FILE *ofile, const char *name, const char *fname, int wr_hits, int rd_hits, int total)
static bool memory_ae_funit_summary (FILE *ofile, funit_link *head, int *wr_hits, int *rd_hits, int *total)
static void memory_display_memory (FILE *ofile, vsignal *sig, int offset, char *prefix, unsigned int dim, unsigned int parent_dim_width)
static void memory_display_verbose (FILE *ofile, func_unit *funit, rpt_type rtype)
static void memory_instance_verbose (FILE *ofile, funit_inst *root, char *parent_inst)
static void memory_funit_verbose (FILE *ofile, funit_link *head)
void memory_report (FILE *ofile, bool verbose)
 Generates report output for line coverage.

Variables

db ** db_list
unsigned int curr_db
bool report_covered
bool report_instance
isuppl info_suppl
bool report_exclusions
unsigned int exclusion_id_size
bool flag_output_exclusion_ids

Detailed Description

Author:
Trevor Williams (phase1geo@gmail.com)
Date:
9/24/2006

Function Documentation

static bool memory_ae_funit_summary ( FILE *  ofile,
funit_link head,
int *  wr_hits,
int *  rd_hits,
int *  total 
) [static]
Returns:
Returns TRUE if any bits were found to be untoggled; otherwise, returns FALSE.

Iterates through the functional unit list displaying the memory toggle coverage summary for each functional unit.

Parameters:
ofile Pointer to file to display coverage results to
head Pointer to head of functional unit list to parse
wr_hits Pointer to number of bits in memory toggled from 0 -> 1
rd_hits Pointer to number of bits in memory toggled from 1 -> 0
total Pointer to total number of bits in memories

References isuppl_u::assert_ovl, FALSE, func_unit_s::filename, free_safe, funit_link_s::funit, funit_flatten_name(), funit_is_unnamed(), get_basename(), statistic_s::mem_ae_total, statistic_s::mem_rd_hit, statistic_s::mem_wr_hit, memory_display_ae_funit_summary(), funit_link_s::next, obf_file, ovl_is_assertion_module(), isuppl_u::part, PROFILE, PROFILE_END, scope_gen_printable(), statistic_s::show, and func_unit_s::stat.

Referenced by memory_report().

00865   { PROFILE(MEMORY_AE_FUNIT_SUMMARY);
00866 
00867   bool  miss_found = FALSE;  /* Set to TRUE if missing toggles were found */
00868   char* pname;               /* Printable version of the functional unit name */
00869 
00870   while( head != NULL ) {
00871 
00872     /* If this is an assertion module, don't output any further */
00873     if( head->funit->stat->show && !funit_is_unnamed( head->funit ) &&
00874         ((info_suppl.part.assert_ovl == 0) || !ovl_is_assertion_module( head->funit )) ) {
00875 
00876       /* Get printable version of functional unit name */
00877       pname = scope_gen_printable( funit_flatten_name( head->funit ) );
00878 
00879       miss_found |= memory_display_ae_funit_summary( ofile, pname, get_basename( obf_file( head->funit->filename ) ),
00880                                                      head->funit->stat->mem_wr_hit, head->funit->stat->mem_rd_hit, head->funit->stat->mem_ae_total );
00881 
00882       /* Update accumulated information */
00883       *wr_hits += head->funit->stat->mem_wr_hit;
00884       *rd_hits += head->funit->stat->mem_rd_hit;
00885       *total   += head->funit->stat->mem_ae_total; 
00886 
00887       free_safe( pname, (strlen( pname ) + 1) );
00888 
00889     }
00890 
00891     head = head->next;
00892 
00893   }
00894 
00895   PROFILE_END;
00896 
00897   return( miss_found );
00898 
00899 }

static bool memory_ae_instance_summary ( FILE *  ofile,
funit_inst root,
char *  parent_inst,
int *  wr_hits,
int *  rd_hits,
int *  total 
) [static]
Returns:
Returns TRUE if any bits were found to be not toggled; otherwise, returns FALSE.

Displays the memory instance summarization to the specified file. Recursively iterates through functional unit instance tree, outputting the toggle information that is found at that instance.

Parameters:
ofile File to output coverage information to
root Instance node in the functional unit instance tree being evaluated
parent_inst Name of parent instance
wr_hits Pointer to accumulated number of addressable elements written
rd_hits Pointer to accumulated number of addressable elements read
total Pointer to the total number of addressable elements

References isuppl_u::assert_ovl, funit_inst_s::child_head, db_is_unnamed_scope(), FALSE, free_safe, funit_inst_s::funit, funit_is_unnamed(), statistic_s::mem_ae_total, statistic_s::mem_rd_hit, statistic_s::mem_wr_hit, memory_display_ae_instance_summary(), funit_inst_s::name, funit_inst_s::name_diff, funit_inst_s::next, ovl_is_assertion_module(), isuppl_u::part, PROFILE, PROFILE_END, scope_gen_printable(), statistic_s::show, funit_inst_s::stat, and funit_inst_s::suppl.

Referenced by memory_report().

00690   { PROFILE(MEMORY_AE_INSTANCE_SUMMARY);
00691 
00692   funit_inst* curr;                /* Pointer to current child functional unit instance of this node */
00693   char        tmpname[4096];       /* Temporary name holder for instance */
00694   char*       pname;               /* Printable version of instance name */
00695   bool        miss_found = FALSE;  /* Set to true if a coverage type was missed */
00696 
00697   assert( root != NULL );
00698   assert( root->stat != NULL );
00699 
00700   /* Get printable version of this instance */
00701   pname = scope_gen_printable( root->name );
00702   if( db_is_unnamed_scope( pname ) || root->suppl.name_diff ) {
00703     strcpy( tmpname, parent_inst );
00704   } else if( strcmp( parent_inst, "*" ) == 0 ) {
00705     strcpy( tmpname, pname );
00706   } else {
00707     unsigned int rv = snprintf( tmpname, 4096, "%s.%s", parent_inst, pname );
00708     assert( rv < 4096 );
00709   }
00710 
00711   free_safe( pname, (strlen( pname ) + 1) );
00712 
00713   if( (root->funit != NULL) && root->stat->show && !funit_is_unnamed( root->funit ) &&
00714       ((info_suppl.part.assert_ovl == 0) || !ovl_is_assertion_module( root->funit )) ) {
00715 
00716     miss_found |= memory_display_ae_instance_summary( ofile, tmpname, root->stat->mem_wr_hit, root->stat->mem_rd_hit, root->stat->mem_ae_total );
00717 
00718     /* Update accumulated stats */
00719     *wr_hits += root->stat->mem_wr_hit;
00720     *rd_hits += root->stat->mem_rd_hit;
00721     *total   += root->stat->mem_ae_total;
00722 
00723   } 
00724 
00725   /* If this is an assertion module, don't output any further */
00726   if( (info_suppl.part.assert_ovl == 0) || !ovl_is_assertion_module( root->funit ) ) {
00727 
00728     curr = root->child_head;
00729     while( curr != NULL ) {
00730       miss_found |= memory_ae_instance_summary( ofile, curr, tmpname, wr_hits, rd_hits, total );
00731       curr = curr->next;
00732     }
00733 
00734   }
00735 
00736   PROFILE_END;
00737 
00738   return( miss_found );
00739 
00740 }

void memory_collect ( func_unit funit,
int  cov,
sig_link **  head,
sig_link **  tail 
)

Collects all signals that are memories and match the given coverage metric for the given functional unit.

Collects all signals that are memories and match the given coverage type and stores them in the given signal list.

Parameters:
funit Pointer to functional unit
cov Set to 0 to get uncovered memories or 1 to get covered memories
head Pointer to head of signal list containing retrieved signals
tail Pointer to tail of signal list containing retrieved signals

References FALSE, func_iter_dealloc(), func_iter_get_next_signal(), func_iter_init(), memory_get_stat(), ssuppl_u::part, PROFILE, PROFILE_END, sig_link_add(), SSUPPL_TYPE_MEM, vsignal_s::suppl, TRUE, and ssuppl_u::type.

00506   { PROFILE(MEMORY_COLLECT);
00507 
00508   func_iter    fi;             /* Functional unit iterator */
00509   vsignal*     sig;            /* Pointer to current signal */
00510   unsigned int wr_hit    = 0;  /* Total number of addressable elements written */
00511   unsigned int rd_hit    = 0;  /* Total number of addressable elements read */
00512   unsigned int ae_total  = 0;  /* Total number of addressable elements */
00513   unsigned int hit01     = 0;  /* Number of bits that toggled from 0 to 1 */
00514   unsigned int hit10     = 0;  /* Number of bits that toggled from 1 to 0 */
00515   unsigned int tog_total = 0;  /* Total number of toggle bits */
00516   unsigned int excluded  = 0;  /* Number of excluded memory coverage points */
00517   bool         cov_found;
00518 
00519   func_iter_init( &fi, funit, FALSE, TRUE );
00520 
00521   while( (sig = func_iter_get_next_signal( &fi )) != NULL ) {
00522 
00523     if( sig->suppl.part.type == SSUPPL_TYPE_MEM ) {
00524 
00525       ae_total = 0;
00526    
00527       memory_get_stat( sig, &ae_total, &wr_hit, &rd_hit, &tog_total, &hit01, &hit10, &excluded, &cov_found, TRUE );
00528 
00529       /* If this signal meets the coverage requirement, add it to the signal list */
00530       if( ((cov == 1) && (wr_hit > 0) && (rd_hit > 0) && (hit01 == tog_total) && (hit10 == tog_total)) ||
00531           ((cov == 0) && ((wr_hit == 0) || (rd_hit == 0) || (hit01 < tog_total) || (hit10 < tog_total))) ) {
00532 
00533         sig_link_add( sig, head, tail );
00534 
00535       }
00536 
00537     }
00538 
00539   }
00540 
00541   func_iter_dealloc( &fi );
00542 
00543   PROFILE_END;
00544 
00545 }

static void memory_create_pdim_bit_array ( char **  str,
vsignal sig,
char *  prefix,
unsigned int  dim 
) [static]

Creates a string array for each bit in the given signal corresponding to its position in the packed array portion.

Parameters:
str Pointer to string array to populate with packed dimension information
sig Pointer to signal that we are solving for
prefix Prefix string to append to the beginning of the newly created string
dim Current dimension to solve for

References vsignal_s::dim, dim_range_s::lsb, dim_range_s::msb, vsignal_s::pdim_num, PROFILE, PROFILE_END, realloc_safe, and vsignal_s::udim_num.

Referenced by memory_get_coverage().

00210   { PROFILE(MEMORY_CREATE_PDIM_BIT_ARRAY);
00211 
00212   char name[4096];  /* Temporary string */
00213   int  i;           /* Loop iterator */
00214   bool last_dim;    /* Specifies if this is the final dimension */
00215 
00216   /* Calculate final dimension */
00217   last_dim = (dim + 1) == (sig->pdim_num + sig->udim_num);
00218 
00219   if( sig->dim[dim].msb > sig->dim[dim].lsb ) {
00220 
00221     for( i=sig->dim[dim].lsb; i<=sig->dim[dim].msb; i++ ) {
00222       if( last_dim ) {
00223         unsigned int rv = snprintf( name, 4096, "%d", i );
00224         assert( rv < 4096 );
00225         *str = (char*)realloc_safe( *str, (strlen( *str ) + 1), (strlen( *str ) + strlen( prefix ) + strlen( name ) + 4) );
00226         strcat( *str, prefix );
00227         strcat( *str, "[" );
00228         strcat( *str, name );
00229         strcat( *str, "] " );
00230       } else {
00231         unsigned int rv = snprintf( name, 4096, "%s[%d]", prefix, i );
00232         assert( rv < 4096 );
00233         memory_create_pdim_bit_array( str, sig, name, (dim + 1) );
00234       }
00235     }
00236 
00237   } else {
00238 
00239     for( i=sig->dim[dim].lsb; i>=sig->dim[dim].msb; i-- ) {
00240       if( last_dim ) {
00241         unsigned int rv = snprintf( name, 4096, "%d", i );
00242         assert( rv < 4096 );
00243         *str = (char*)realloc_safe( *str, (strlen( *str ) + 1), (strlen( *str ) + strlen( prefix ) + strlen( name ) + 4) );
00244         strcat( *str, prefix );
00245         strcat( *str, "[" );
00246         strcat( *str, name );
00247         strcat( *str, "] " );
00248       } else {
00249         unsigned int rv = snprintf( name, 4096, "%s[%d]", prefix, i );
00250         assert( rv < 4096 );
00251         memory_create_pdim_bit_array( str, sig, name, (dim + 1) );
00252       }
00253     }
00254 
00255   }
00256 
00257   PROFILE_END;
00258 
00259 }

static bool memory_display_ae_funit_summary ( FILE *  ofile,
const char *  name,
const char *  fname,
int  wr_hits,
int  rd_hits,
int  total 
) [static]
Returns:
Returns TRUE if at least one addressable memory element was not written or read during simulation; otherwise, returns FALSE.

Calculates and outputs the summary addressable memory element coverage information for a given functional unit.

Parameters:
ofile Pointer to output file that will be written
name Name of functional unit being reported
fname Filename containing the given functional unit being reported
wr_hits Number of addressable memory elements that were written in this functional unit during simulation
rd_hits Number of addressable memory elements that were read in this functional unit during simulation
total Number of addressable memory elements in the given functional unit

References calc_miss_percent(), PROFILE, and PROFILE_END.

Referenced by memory_ae_funit_summary(), and memory_report().

00834   { PROFILE(MEMORY_DISPLAY_AE_FUNIT_SUMMARY);
00835 
00836   float wr_percent;  /* Percentage of addressable elements that were written */
00837   float rd_percent;  /* Percentage of addressable elements that were read */
00838   int   wr_miss;     /* Number of addressable elements that were not written */
00839   int   rd_miss;     /* Number of addressable elements that were not read */
00840 
00841   calc_miss_percent( wr_hits, total, &wr_miss, &wr_percent );
00842   calc_miss_percent( rd_hits, total, &rd_miss, &rd_percent );
00843 
00844   fprintf( ofile, "  %-20.20s    %-20.20s   %5d/%5d/%5d      %3.0f%%         %5d/%5d/%5d      %3.0f%%\n",
00845            name, fname, wr_hits, wr_miss, total, wr_percent, rd_hits, rd_miss, total, rd_percent );
00846 
00847   PROFILE_END;
00848 
00849   return( (wr_miss > 0) || (rd_miss > 0) );
00850 
00851 }

static bool memory_display_ae_instance_summary ( FILE *  ofile,
char *  name,
int  wr_hit,
int  rd_hit,
int  total 
) [static]
Returns:
Returns TRUE if at least one miss was found; otherwise, returns FALSE.

Calculates the miss and hit percentage statistics for the given instance and outputs this information to the given output file.

Parameters:
ofile Pointer to file to output coverage summary information to
name Name of instance being displayed
wr_hit Number of addressable elements that were written
rd_hit Number of addressable elements that were read
total Number of all addressable elements

References calc_miss_percent(), PROFILE, and PROFILE_END.

Referenced by memory_ae_instance_summary(), and memory_report().

00656   { PROFILE(MEMORY_DISPLAY_AE_INSTANCE_SUMMARY);
00657 
00658   float wr_percent;  /* Percentage of addressable elements written */
00659   float rd_percent;  /* Percentage of addressable elements read */
00660   int   wr_miss;     /* Number of addressable elements that were not written */
00661   int   rd_miss;     /* Number of addressable elements that were not read */
00662 
00663   calc_miss_percent( wr_hit, total, &wr_miss, &wr_percent );
00664   calc_miss_percent( rd_hit, total, &rd_miss, &rd_percent );
00665 
00666   /* Output toggle information */
00667   fprintf( ofile, "  %-43.43s    %5d/%5d/%5d      %3.0f%%         %5d/%5d/%5d      %3.0f%%\n",
00668            name, wr_hit, wr_miss, total, wr_percent, rd_hit, rd_miss, total, rd_percent );
00669 
00670   PROFILE_END;
00671 
00672   return( (wr_miss > 0) || (rd_miss > 0) );
00673 
00674 }

static void memory_display_memory ( FILE *  ofile,
vsignal sig,
int  offset,
char *  prefix,
unsigned int  dim,
unsigned int  parent_dim_width 
) [static]

Outputs the contents of the given memory in verbose output format.

Parameters:
ofile Pointer to output file
sig Pointer to the current memory element to output
offset Bit offset of signal vector value to start interrogating
prefix String containing memory prefix to output (initially this will be just the signal name)
dim Current dimension index (initially this will be 0)
parent_dim_width Bit width of parent dimension (initially this will be the width of the signal)

References vsignal_s::dim, FALSE, dim_range_s::lsb, dim_range_s::msb, PROFILE, PROFILE_END, TRUE, vsignal_s::udim_num, vector_s::ul, vector_s::value, vsignal_s::value, VDATA_UL, vector_copy_range(), vector_create(), vector_dealloc(), vector_display_toggle01_ulong(), vector_display_toggle10_ulong(), vector_mem_rw_count(), vector_toggle_count(), VTYPE_MEM, and vector_s::width.

Referenced by memory_display_verbose().

00911   { PROFILE(MEMORY_DISPLAY_MEMORY);
00912 
00913   char         name[4096];  /* Contains signal name */
00914   int          msb;         /* MSB of current dimension */
00915   int          lsb;         /* LSB of current dimension */
00916   int          be;          /* Big endianness of current dimension */
00917   int          i;           /* Loop iterator */
00918   unsigned int dim_width;   /* Bit width of current dimension */
00919 
00920   assert( sig != NULL );
00921   assert( prefix != NULL );
00922   assert( dim < sig->udim_num );
00923 
00924   /* Calculate MSB, LSB and big endianness of current dimension */
00925   if( sig->dim[dim].msb > sig->dim[dim].lsb ) {
00926     msb = sig->dim[dim].msb;
00927     lsb = sig->dim[dim].lsb;
00928     be  = FALSE;
00929   } else {
00930     msb = sig->dim[dim].lsb;
00931     lsb = sig->dim[dim].msb;
00932     be  = TRUE;
00933   }
00934 
00935   /* Calculate current dimensional width */
00936   dim_width = parent_dim_width / ((msb - lsb) + 1);
00937 
00938   /* Only output memory contents if we have reached the lowest dimension */
00939   if( (dim + 1) == sig->udim_num ) {
00940 
00941     vector*      vec = vector_create( dim_width, VTYPE_MEM, VDATA_UL, TRUE );
00942     unsigned int tog01;
00943     unsigned int tog10;
00944     unsigned int wr;
00945     unsigned int rd;
00946 
00947     /* Iterate through each addressable element in the current dimension */
00948     for( i=0; i<((msb - lsb) + 1); i++ ) {
00949 
00950       if( be ) {
00951         vector_copy_range( vec, sig->value, ((dim_width * ((msb - lsb) - i)) + offset) );
00952       } else {
00953         vector_copy_range( vec, sig->value, ((dim_width * i) + offset) );
00954       }
00955 
00956       /* Get toggle information */
00957       tog01 = 0;
00958       tog10 = 0;
00959       vector_toggle_count( vec, &tog01, &tog10 );
00960 
00961       /* Get write/read information */
00962       wr = 0;
00963       rd = 0;
00964       vector_mem_rw_count( vec, 0, (int)(vec->width - 1), &wr, &rd );
00965 
00966       /* Output the addressable memory element if it is found to be lacking in coverage */
00967       if( (tog01 < dim_width) || (tog10 < dim_width) || (wr == 0) || (rd == 0) ) {
00968 
00969         unsigned int j;
00970         unsigned int rv = snprintf( name, 4096, "%s[%d]", prefix, i );
00971         assert( rv < 4096 );
00972 
00973         fprintf( ofile, "        %s  Written: %d  0->1: ", name, ((wr == 0) ? 0 : 1) );
00974         vector_display_toggle01_ulong( vec->value.ul, vec->width, ofile );
00975         fprintf( ofile, "\n" );
00976         fprintf( ofile, "        " );
00977         for( j=0; j<strlen( name ); j++ ) {
00978           fprintf( ofile, "." );
00979         }
00980         fprintf( ofile, "  Read   : %d  1->0: ", ((rd == 0) ? 0 : 1) );
00981         vector_display_toggle10_ulong( vec->value.ul, vec->width, ofile );
00982         fprintf( ofile, " ...\n" );
00983       }
00984 
00985     } 
00986 
00987     /* Deallocate the vector */
00988     vector_dealloc( vec );
00989 
00990   /* Otherwise, go down one level */
00991   } else {
00992 
00993     /* Iterate through each entry in the current dimesion */
00994     for( i=0; i<((msb - lsb) + 1); i++ ) {
00995 
00996       /* Create new prefix */
00997       unsigned int rv = snprintf( name, 4096, "%s[%d]", prefix, i );
00998       assert( rv < 4096 );
00999 
01000       if( be ) {
01001         memory_display_memory( ofile, sig, (offset + (dim_width * ((msb - lsb) - i))), name, (dim + 1), dim_width );
01002       } else {
01003         memory_display_memory( ofile, sig, (offset + (dim_width * i)),                 name, (dim + 1), dim_width );
01004       }
01005 
01006     }
01007 
01008   }
01009 
01010   PROFILE_END;
01011 
01012 }

static bool memory_display_toggle_funit_summary ( FILE *  ofile,
const char *  name,
const char *  fname,
int  hit01,
int  hit10,
int  total 
) [static]
Returns:
Returns TRUE if at least one bit was found to not have transitioned during simulation.

Calculates and outputs the toggle coverage for all memories in the given functional unit.

Parameters:
ofile Pointer to file to output functional unit summary results
name Name of functional unit being reported
fname Filename containing the functional unit being reported
hit01 Number of memory bits that transitioned from a value of 0 to a value of 1 during simulation for this functional unit
hit10 Number of memory bits that transitioned from a value of 1 to a value of 0 during simulation for this functional unit
total Number of total memory bits in the given functional unit

References calc_miss_percent(), PROFILE, and PROFILE_END.

Referenced by memory_report(), and memory_toggle_funit_summary().

00754   { PROFILE(MEMORY_DISPLAY_TOGGLE_FUNIT_SUMMARY);
00755 
00756   float percent01;  /* Percentage of bits that toggled from 0 to 1 */
00757   float percent10;  /* Percentage of bits that toggled from 1 to 0 */
00758   int   miss01;     /* Number of bits that did not toggle from 0 to 1 */
00759   int   miss10;     /* Number of bits that did not toggle from 1 to 0 */
00760 
00761   calc_miss_percent( hit01, total, &miss01, &percent01 );
00762   calc_miss_percent( hit10, total, &miss10, &percent10 );
00763 
00764   fprintf( ofile, "  %-20.20s    %-20.20s   %5d/%5d/%5d      %3.0f%%         %5d/%5d/%5d      %3.0f%%\n",
00765            name, fname, hit01, miss01, total, percent01, hit10, miss10, total, percent10 );
00766 
00767   PROFILE_END;
00768 
00769   return( (miss01 > 0) || (miss10 > 0) );
00770 
00771 }

static bool memory_display_toggle_instance_summary ( FILE *  ofile,
const char *  name,
int  hits01,
int  hits10,
int  total 
) [static]
Returns:
Returns TRUE if any bits were found to be untoggled; otherwise, returns FALSE.

Calculates and outputs the memory toggle summary coverage results for a given instance.

Parameters:
ofile Pointer to file to display coverage results to
name Name of instance being reported
hits01 Pointer to number of bits in memory toggled from 0 -> 1
hits10 Pointer to number of bits in memory toggled from 1 -> 0
total Pointer to total number of bits in memories

References calc_miss_percent(), PROFILE, and PROFILE_END.

Referenced by memory_report(), and memory_toggle_instance_summary().

00558   { PROFILE(MEMORY_DISPLAY_TOGGLE_INSTANCE_SUMMARY);
00559 
00560   float percent01;    /* Percentage of bits toggling from 0 -> 1 */
00561   float percent10;    /* Percentage of bits toggling from 1 -> 0 */
00562   int   miss01  = 0;  /* Number of bits that did not toggle from 0 -> 1 */
00563   int   miss10  = 0;  /* Number of bits that did not toggle from 1 -> 0 */
00564 
00565   calc_miss_percent( hits01, total, &miss01, &percent01 );
00566   calc_miss_percent( hits10, total, &miss10, &percent10 );
00567 
00568   /* Output toggle information */
00569   fprintf( ofile, "  %-43.43s    %5d/%5d/%5d      %3.0f%%         %5d/%5d/%5d      %3.0f%%\n",
00570            name, hits01, miss01, total, percent01, hits10, miss10, total, percent10 );
00571 
00572   PROFILE_END;
00573 
00574   return( (miss01 > 0) || (miss10 > 0) );
00575 
00576 }

static void memory_display_verbose ( FILE *  ofile,
func_unit funit,
rpt_type  rtype 
) [static]

Displays the memories that did not achieve 100% toggle coverage and/or 100% write/read coverage to standard output from the specified signal list.

Parameters:
ofile Pointer to file to output results to
funit Pointer to the current functional unit
rtype Report type to generate

References db_gen_exclusion_id(), vsignal_s::dim, exclude_find_exclude_reason(), ssuppl_u::excluded, FALSE, flag_output_exclusion_ids, free_safe, func_iter_dealloc(), func_iter_get_next_signal(), func_iter_init(), vsignal_s::id, dim_range_s::lsb, memory_display_memory(), dim_range_s::msb, vsignal_s::name, ssuppl_u::part, PROFILE, PROFILE_END, exclude_reason_s::reason, report_output_exclusion_reason(), RPT_TYPE_EXCL, RPT_TYPE_HIT, RPT_TYPE_MISS, scope_gen_printable(), SSUPPL_TYPE_MEM, vsignal_s::suppl, TRUE, ssuppl_u::type, vsignal_s::udim_num, vsignal_s::value, vector_toggle_count(), and vector_s::width.

Referenced by memory_funit_verbose(), and memory_instance_verbose().

01022   { PROFILE(MEMORY_DISPLAY_VERBOSE);
01023 
01024   func_iter    fi;     /* Functional unit iterator */
01025   vsignal*     sig;    /* Pointer to current signal */
01026   unsigned int hit01;  /* Number of bits that toggled from 0 to 1 */
01027   unsigned int hit10;  /* Number of bits that toggled from 1 to 0 */
01028   char*        pname;  /* Printable version of signal name */
01029   unsigned int i;      /* Loop iterator */
01030 
01031   switch( rtype ) {
01032     case RPT_TYPE_HIT  :  fprintf( ofile, "    Memories getting 100%% coverage\n\n" );      break;
01033     case RPT_TYPE_MISS :  fprintf( ofile, "    Memories not getting 100%% coverage\n\n" );  break;
01034     case RPT_TYPE_EXCL :  fprintf( ofile, "    Memories excluded from coverage\n\n" );      break;
01035   }
01036 
01037   func_iter_init( &fi, funit, FALSE, TRUE );
01038 
01039   while( (sig = func_iter_get_next_signal( &fi )) != NULL ) {
01040 
01041     hit01 = 0;
01042     hit10 = 0;
01043 
01044     /* Get printable version of the signal name */
01045     pname = scope_gen_printable( sig->name );
01046 
01047     if( sig->suppl.part.type == SSUPPL_TYPE_MEM ) {
01048 
01049       if( ((sig->suppl.part.excluded == 0) && (rtype != RPT_TYPE_EXCL)) ||
01050           ((sig->suppl.part.excluded == 1) && (rtype == RPT_TYPE_EXCL)) ) {
01051 
01052         fprintf( ofile, "      ---------------------------------------------------------------------------------------------------------\n" );
01053         fprintf( ofile, "      " );
01054         if( flag_output_exclusion_ids && (rtype != RPT_TYPE_HIT) ) {
01055           fprintf( ofile, "(%s)  ", db_gen_exclusion_id( 'M', sig->id ) );
01056         }
01057         fprintf( ofile, "Memory name:  %s", pname );
01058         for( i=0; i<sig->udim_num; i++ ) {
01059           fprintf( ofile, "[%d:%d]", sig->dim[i].msb, sig->dim[i].lsb );
01060         }
01061         fprintf( ofile, "\n" );
01062         fprintf( ofile, "      ---------------------------------------------------------------------------------------------------------\n" );
01063 
01064         vector_toggle_count( sig->value, &hit01, &hit10 );
01065 
01066         if( rtype == RPT_TYPE_HIT ) {
01067           if( (hit01 == sig->value->width) && (hit10 == sig->value->width) ) {
01068             fprintf( ofile, "      %-24s\n", pname );
01069           }
01070         } else {
01071           exclude_reason* er;
01072           memory_display_memory( ofile, sig, 0, sig->name, 0, sig->value->width );
01073           if( (rtype == RPT_TYPE_EXCL) && ((er = exclude_find_exclude_reason( 'M', sig->id, funit )) != NULL) ) {
01074             report_output_exclusion_reason( ofile, 10, er->reason, TRUE );
01075           }
01076         }
01077 
01078       }
01079 
01080     }
01081 
01082     free_safe( pname, (strlen( pname ) + 1) );
01083 
01084   }
01085 
01086   func_iter_dealloc( &fi );
01087 
01088   fprintf( ofile, "\n" );
01089 
01090   PROFILE_END;
01091 
01092 }

static void memory_funit_verbose ( FILE *  ofile,
funit_link head 
) [static]

Displays the verbose memory coverage results to the specified output stream on a functional unit basis (combining functional units that are instantiated multiple times). The verbose memory coverage includes the signal names, the bits that did not receive 100% toggle, and the addressable elements that did not receive 100% write/read coverage during simulation.

Parameters:
ofile Pointer to file to display coverage results to
head Pointer to head of functional unit list to parse

References func_unit_s::filename, funit_link_s::funit, FUNIT_AFUNCTION, FUNIT_ANAMED_BLOCK, FUNIT_ATASK, funit_flatten_name(), FUNIT_FUNCTION, funit_is_unnamed(), FUNIT_MODULE, FUNIT_NAMED_BLOCK, FUNIT_TASK, statistic_s::mem_ae_total, statistic_s::mem_cov_found, statistic_s::mem_excluded, statistic_s::mem_rd_hit, statistic_s::mem_tog01_hit, statistic_s::mem_tog10_hit, statistic_s::mem_tog_total, statistic_s::mem_wr_hit, memory_display_verbose(), funit_link_s::next, obf_file, obf_funit, PROFILE, PROFILE_END, report_covered, report_exclusions, RPT_TYPE_EXCL, RPT_TYPE_HIT, RPT_TYPE_MISS, func_unit_s::stat, and func_unit_s::type.

Referenced by memory_report().

01184   { PROFILE(MEMORY_FUNIT_VERBOSE);
01185 
01186   while( head != NULL ) {
01187 
01188     if( !funit_is_unnamed( head->funit ) &&
01189         ((((head->funit->stat->mem_tog01_hit < head->funit->stat->mem_tog_total) ||
01190            (head->funit->stat->mem_tog10_hit < head->funit->stat->mem_tog_total) ||
01191            (head->funit->stat->mem_wr_hit    < head->funit->stat->mem_ae_total)  ||
01192            (head->funit->stat->mem_rd_hit    < head->funit->stat->mem_ae_total)) && !report_covered) ||
01193          (head->funit->stat->mem_cov_found && report_covered) ||
01194          ((head->funit->stat->mem_excluded > 0) && report_exclusions)) ) {
01195 
01196       fprintf( ofile, "\n" );
01197       switch( head->funit->type ) {
01198         case FUNIT_MODULE       :  fprintf( ofile, "    Module: " );       break;
01199         case FUNIT_ANAMED_BLOCK :
01200         case FUNIT_NAMED_BLOCK  :  fprintf( ofile, "    Named Block: " );  break;
01201         case FUNIT_AFUNCTION    :
01202         case FUNIT_FUNCTION     :  fprintf( ofile, "    Function: " );     break;
01203         case FUNIT_ATASK        :
01204         case FUNIT_TASK         :  fprintf( ofile, "    Task: " );         break;
01205         default                 :  fprintf( ofile, "    UNKNOWN: " );      break;
01206       }
01207       fprintf( ofile, "%s, File: %s\n", obf_funit( funit_flatten_name( head->funit ) ), obf_file( head->funit->filename ) );
01208       fprintf( ofile, "    -------------------------------------------------------------------------------------------------------------\n" );
01209 
01210       if( (((head->funit->stat->mem_tog01_hit < head->funit->stat->mem_tog_total) ||
01211             (head->funit->stat->mem_tog10_hit < head->funit->stat->mem_tog_total) ||
01212             (head->funit->stat->mem_wr_hit    < head->funit->stat->mem_ae_total)  ||
01213             (head->funit->stat->mem_rd_hit    < head->funit->stat->mem_ae_total)) && !report_covered) || 
01214          (head->funit->stat->mem_cov_found && report_covered) ) {
01215         memory_display_verbose( ofile, head->funit, (report_covered ? RPT_TYPE_HIT : RPT_TYPE_MISS) );
01216       }
01217       if( report_exclusions && (head->funit->stat->mem_excluded > 0) ) {
01218         memory_display_verbose( ofile, head->funit, RPT_TYPE_EXCL );
01219       }
01220 
01221     }
01222 
01223     head = head->next;
01224 
01225   }
01226 
01227   PROFILE_END;
01228 
01229 }

void memory_get_coverage ( func_unit funit,
const char *  signame,
char **  pdim_str,
char **  pdim_array,
char **  udim_str,
char **  memory_info,
int *  excluded,
char **  reason 
)

Gets coverage information for the specified memory.

Retrieves memory coverage information for the given signal in the specified functional unit.

Parameters:
funit Pointer to functional unit
signame Name of signal to find memory coverage information for
pdim_str Pointer to string to store packed dimensional information
pdim_array Pointer to string to store packed dimensional array
udim_str Pointer to string to store unpacked dimensional information
memory_info Pointer to string to store memory information into
excluded Pointer to excluded indicator to store
reason Pointer to reason for exclusion

References vsignal_s::dim, exclude_find_exclude_reason(), ssuppl_u::excluded, FALSE, func_iter_dealloc(), func_iter_get_next_signal(), func_iter_init(), vsignal_s::id, dim_range_s::lsb, malloc_safe, memory_create_pdim_bit_array(), memory_get_mem_coverage(), dim_range_s::msb, vsignal_s::name, ssuppl_u::part, vsignal_s::pdim_num, PROFILE, PROFILE_END, realloc_safe, exclude_reason_s::reason, strdup_safe, vsignal_s::suppl, TRUE, vsignal_s::udim_num, vsignal_s::value, and vector_s::width.

00413   { PROFILE(MEMORY_GET_COVERAGE);
00414 
00415   func_iter       fi;        /* Functional unit iterator */
00416   vsignal*        sig;       /* Pointer to current signal */
00417   unsigned int    i;         /* Loop iterator */
00418   char            tmp1[20];  /* Temporary string holder */
00419   char            tmp2[20];  /* Temporary string holder */
00420   unsigned int    rv;        /* Return value */
00421   exclude_reason* er;
00422 
00423   /* Find the signal in the functional unit */
00424   func_iter_init( &fi, funit, FALSE, TRUE );
00425   while( ((sig = func_iter_get_next_signal( &fi )) != NULL) && (strcmp( sig->name, signame ) != 0) );
00426   func_iter_dealloc( &fi );
00427   assert( sig != NULL );
00428 
00429   /* Allocate and populate the pdim_array and pdim_width parameters */
00430   *pdim_array = (char*)malloc_safe( 1 );
00431   (*pdim_array)[0] = '\0';
00432   memory_create_pdim_bit_array( pdim_array, sig, "", sig->pdim_num );
00433 
00434   /* Allocate and populate the pdim_str string */
00435   *pdim_str = NULL;
00436   for( i=sig->udim_num; i<(sig->pdim_num + sig->udim_num); i++ ) {
00437     unsigned int slen;
00438     rv = snprintf( tmp1, 20, "%d", sig->dim[i].msb );
00439     assert( rv < 20 );
00440     rv = snprintf( tmp2, 20, "%d", sig->dim[i].lsb );
00441     assert( rv < 20 );
00442     slen = strlen( tmp1 ) + strlen( tmp2 ) + 4;
00443     *pdim_str = (char*)realloc_safe( *pdim_str, (strlen( *pdim_str ) + 1), slen );
00444     if( i == sig->udim_num ) {
00445       rv = snprintf( *pdim_str, slen, "[%s:%s]", tmp1, tmp2 );
00446       assert( rv < slen );
00447     } else {
00448       strcat( *pdim_str, "[" );
00449       strcat( *pdim_str, tmp1 );
00450       strcat( *pdim_str, ":" );
00451       strcat( *pdim_str, tmp2 );
00452       strcat( *pdim_str, "]" );
00453     }
00454   }
00455 
00456   /* Allocate and populate the udim_info string */
00457   *udim_str = NULL;
00458   for( i=0; i<sig->udim_num; i++ ) {
00459     unsigned int slen;
00460     rv = snprintf( tmp1, 20, "%d", sig->dim[i].msb );
00461     assert( rv < 20 );
00462     rv = snprintf( tmp2, 20, "%d", sig->dim[i].lsb );
00463     assert( rv < 20 );
00464     slen = strlen( tmp1 ) + strlen( tmp2 ) + 4;
00465     *udim_str = (char*)realloc_safe( *udim_str, (strlen( *udim_str ) + 1), slen );
00466     if( i == 0 ) {
00467       rv = snprintf( *udim_str, slen, "[%s:%s]", tmp1, tmp2 );
00468       assert( rv < slen );
00469     } else {
00470       strcat( *udim_str, "[" );
00471       strcat( *udim_str, tmp1 );
00472       strcat( *udim_str, ":" );
00473       strcat( *udim_str, tmp2 );
00474       strcat( *udim_str, "]" );
00475     }
00476   }
00477 
00478   /* Populate the memory_info string */
00479   *memory_info = (char*)malloc_safe( 1 );
00480   (*memory_info)[0] = '\0';
00481   memory_get_mem_coverage( memory_info, sig, 0, "", 0, sig->value->width );
00482 
00483   /* Populate the excluded value */
00484   *excluded = sig->suppl.part.excluded;
00485 
00486   /* Populate the exclusion reason */
00487   if( (*excluded == 1) && ((er = exclude_find_exclude_reason( 'M', sig->id, funit )) != NULL) ) {
00488     *reason = strdup_safe( er->reason );
00489   } else {
00490     *reason = NULL;
00491   }
00492   
00493   PROFILE_END;
00494 
00495 }

void memory_get_funit_summary ( func_unit funit,
unsigned int *  hit,
unsigned int *  excluded,
unsigned int *  total 
)

Gets memory summary information for a GUI request.

Retrieves memory summary information for a given functional unit made by a GUI request.

Parameters:
funit Pointer to found functional unit
hit Pointer to number of memories that received 100% coverage of all memory metrics
excluded Pointer to number of excluded memory coverage points
total Pointer to total number of memories in the given functional unit

References statistic_s::mem_ae_total, statistic_s::mem_excluded, statistic_s::mem_rd_hit, statistic_s::mem_tog01_hit, statistic_s::mem_tog10_hit, statistic_s::mem_tog_total, statistic_s::mem_wr_hit, PROFILE, PROFILE_END, and func_unit_s::stat.

00173   { PROFILE(MEMORY_GET_FUNIT_SUMMARY);
00174 
00175   *hit      = funit->stat->mem_wr_hit + funit->stat->mem_rd_hit + funit->stat->mem_tog01_hit + funit->stat->mem_tog10_hit;
00176   *excluded = funit->stat->mem_excluded;
00177   *total    = (funit->stat->mem_ae_total * 2) + (funit->stat->mem_tog_total * 2);
00178 
00179   PROFILE_END;
00180 
00181 }

void memory_get_inst_summary ( funit_inst inst,
unsigned int *  hit,
unsigned int *  excluded,
unsigned int *  total 
)

Gets memory summary information for a GUI request.

Retrieves memory summary information for a given functional unit instance made by a GUI request.

Parameters:
inst Pointer to found functional unit instance
hit Pointer to number of memories that received 100% coverage of all memory metrics
excluded Pointer to number of excluded memory coverage points
total Pointer to total number of memories in the given functional unit instance

References statistic_s::mem_ae_total, statistic_s::mem_excluded, statistic_s::mem_rd_hit, statistic_s::mem_tog01_hit, statistic_s::mem_tog10_hit, statistic_s::mem_tog_total, statistic_s::mem_wr_hit, PROFILE, PROFILE_END, and funit_inst_s::stat.

00191   { PROFILE(MEMORY_GET_INST_SUMMARY);
00192 
00193   *hit      = inst->stat->mem_wr_hit + inst->stat->mem_rd_hit + inst->stat->mem_tog01_hit + inst->stat->mem_tog10_hit;
00194   *excluded = inst->stat->mem_excluded;
00195   *total    = (inst->stat->mem_ae_total * 2) + (inst->stat->mem_tog_total * 2);
00196   
00197   PROFILE_END; 
00198   
00199 }

static void memory_get_mem_coverage ( char **  mem_str,
vsignal sig,
int  offset,
char *  prefix,
unsigned int  dim,
unsigned int  parent_dim_width 
) [static]

Creates memory array structure for Tcl and stores it into the mem_str parameter.

Parameters:
mem_str String containing memory information
sig Pointer to signal to get memory coverage for
offset Bit offset of signal vector to start retrieving information from
prefix String containing memory prefix to output (initially this will be just the signal name)
dim Current dimension index (initially this will be 0)
parent_dim_width Bit width of parent dimension (initially this will be the width of the signal)

References vsignal_s::dim, FALSE, free_safe, dim_range_s::lsb, malloc_safe, dim_range_s::msb, PROFILE, PROFILE_END, realloc_safe, TRUE, vsignal_s::udim_num, vector_s::ul, vector_s::value, vsignal_s::value, VDATA_UL, vector_copy_range(), vector_create(), vector_dealloc(), vector_get_toggle01_ulong(), vector_get_toggle10_ulong(), vector_mem_rw_count(), vector_toggle_count(), VTYPE_MEM, and vector_s::width.

Referenced by memory_get_coverage().

00271   { PROFILE(MEMORY_GET_MEM_COVERAGE);
00272 
00273   char         name[4096];  /* Contains signal name */
00274   int          msb;         /* MSB of current dimension */
00275   int          lsb;         /* LSB of current dimension */
00276   int          be;          /* Big endianness of current dimension */
00277   int          i;           /* Loop iterator */
00278   unsigned int dim_width;   /* Bit width of current dimension */
00279 
00280   assert( sig != NULL );
00281   assert( prefix != NULL );
00282   assert( dim < sig->udim_num );
00283 
00284   /* Calculate MSB, LSB and big endianness of current dimension */
00285   if( sig->dim[dim].msb > sig->dim[dim].lsb ) {
00286     msb = sig->dim[dim].msb;
00287     lsb = sig->dim[dim].lsb;
00288     be  = FALSE;
00289   } else {
00290     msb = sig->dim[dim].lsb;
00291     lsb = sig->dim[dim].msb;
00292     be  = TRUE;
00293   }
00294 
00295   /* Calculate current dimensional width */
00296   dim_width = parent_dim_width / ((msb - lsb) + 1);
00297 
00298   /* Only output memory contents if we have reached the lowest dimension */
00299   if( (dim + 1) == sig->udim_num ) {
00300 
00301     vector*      vec = vector_create( dim_width, VTYPE_MEM, VDATA_UL, TRUE );
00302     unsigned int tog01;
00303     unsigned int tog10;
00304     unsigned int wr;
00305     unsigned int rd;
00306     char*        tog01_str;
00307     char*        tog10_str;
00308     char         hit_str[2];
00309     char         int_str[20];
00310     char*        dim_str;
00311     char*        entry_str;
00312 
00313     /* Iterate through each addressable element in the current dimension */
00314     for( i=0; i<((msb - lsb) + 1); i++ ) {
00315 
00316       unsigned int rv;
00317       unsigned int slen;
00318 
00319       /* Re-initialize the vector */
00320       if( be ) {
00321         vector_copy_range( vec, sig->value, ((dim_width * ((msb - lsb) - i)) + offset) );
00322       } else {
00323         vector_copy_range( vec, sig->value, ((dim_width * i) + offset) );
00324       }
00325 
00326       /* Create dimension string */
00327       rv = snprintf( int_str, 20, "%d", i );
00328       assert( rv < 20 );
00329       slen    = strlen( prefix ) + strlen( int_str ) + 5;
00330       dim_str = (char*)malloc_safe( slen );
00331       rv = snprintf( dim_str, slen, "%s\\[%d\\]", prefix, i );
00332       assert( rv < slen );
00333 
00334       /* Get toggle information */
00335       tog01 = 0;
00336       tog10 = 0;
00337       vector_toggle_count( vec, &tog01, &tog10 );
00338 
00339       /* Get toggle strings */
00340       tog01_str = vector_get_toggle01_ulong( vec->value.ul, vec->width );
00341       tog10_str = vector_get_toggle10_ulong( vec->value.ul, vec->width );
00342 
00343       /* Get write/read information */
00344       wr = 0;
00345       rd = 0;
00346       vector_mem_rw_count( vec, 0, (int)(vec->width - 1), &wr, &rd );
00347 
00348       /* Output the addressable memory element if it is found to be lacking in coverage */
00349       if( (tog01 < dim_width) || (tog10 < dim_width) || (wr == 0) || (rd == 0) ) {
00350         strcpy( hit_str, "0" );
00351       } else {
00352         strcpy( hit_str, "1" );
00353       }
00354 
00355       /* Create a string list for this entry */
00356       slen      = strlen( dim_str ) + strlen( hit_str ) + strlen( tog01_str ) + strlen( tog10_str ) + 10;
00357       entry_str = (char*)malloc_safe( slen );
00358       rv = snprintf( entry_str, slen, "{%s %s %d %d %s %s}",
00359                 dim_str, hit_str, ((wr == 0) ? 0 : 1), ((rd == 0) ? 0 : 1), tog01_str, tog10_str );
00360       assert( rv < slen );
00361 
00362       *mem_str = (char*)realloc_safe( *mem_str, (strlen( *mem_str ) + 1), (strlen( *mem_str ) + strlen( entry_str ) + 2) );
00363       strcat( *mem_str, " " );
00364       strcat( *mem_str, entry_str );
00365 
00366       /* Deallocate memory */
00367       free_safe( dim_str, (strlen( dim_str ) + 1) );
00368       free_safe( tog01_str, (strlen( tog01_str ) + 1) );
00369       free_safe( tog10_str, (strlen( tog10_str ) + 1) );
00370       free_safe( entry_str, (strlen( entry_str ) + 1) );
00371 
00372     }
00373 
00374     /* Deallocate vector */
00375     vector_dealloc( vec );
00376 
00377   /* Otherwise, go down one level */
00378   } else {
00379 
00380     /* Iterate through each entry in the current dimesion */
00381     for( i=0; i<((msb - lsb) + 1); i++ ) {
00382 
00383       /* Create new prefix */
00384       unsigned int rv = snprintf( name, 4096, "%s[%d]", prefix, i );
00385       assert( rv < 4096 );
00386 
00387       if( be ) {
00388         memory_get_mem_coverage( mem_str, sig, (offset + (dim_width * ((msb - lsb) - i))), name, (dim + 1), dim_width );
00389       } else {
00390         memory_get_mem_coverage( mem_str, sig, (offset + (dim_width * i)),                 name, (dim + 1), dim_width );
00391       }
00392 
00393     }
00394 
00395   }
00396  
00397   PROFILE_END;
00398 
00399 }

void memory_get_stat ( vsignal sig,
unsigned int *  wr_hit,
unsigned int *  rd_hit,
unsigned int *  ae_total,
unsigned int *  tog01_hit,
unsigned int *  tog10_hit,
unsigned int *  tog_total,
unsigned int *  excluded,
bool cov_found,
bool  ignore_excl 
)

Calculates the memory coverage numbers for a given memory signal.

Calculates the total and hit memory coverage information for the given memory signal.

Parameters:
sig Pointer to signal list to traverse for memories
wr_hit Pointer to total number of addressable elements written
rd_hit Pointer to total number of addressable elements read
ae_total Pointer to total number of addressable elements
tog01_hit Pointer to total number of bits toggling from 0->1
tog10_hit Pointer to total number of bits toggling from 1->0
tog_total Pointer to total number of bits in memories that can be toggled
excluded Pointer to total number of excluded memory coverage points
cov_found Pointer to value that is set to TRUE if at least one memory was found to be fully covered
ignore_excl If set to TRUE, ignores the current value of the excluded bit

References vsignal_s::dim, ssuppl_u::excluded, FALSE, dim_range_s::lsb, dim_range_s::msb, ssuppl_u::part, vsignal_s::pdim_num, PROFILE, PROFILE_END, vsignal_s::suppl, TRUE, vsignal_s::udim_num, vsignal_s::value, vector_mem_rw_count(), vector_toggle_count(), and vector_s::width.

Referenced by exclude_sig_assign_and_recalc(), memory_collect(), and memory_get_stats().

00065   { PROFILE(MEMORY_GET_STAT);
00066 
00067   unsigned int i;                      /* Loop iterator */
00068   unsigned int pwidth;                 /* Width of packed portion of memory */
00069   bool         ae_cov_found  = TRUE;   /* Set to TRUE if wr/rd hits equals the total */
00070   bool         tog_cov_found = FALSE;  /* Set to TRUE if tog01/10 hits equals the total */
00071 
00072   /* Calculate width of smallest addressable element */
00073   pwidth = 1;
00074   for( i=(sig->udim_num); i<(sig->udim_num + sig->pdim_num); i++ ) {
00075     if( sig->dim[i].msb > sig->dim[i].lsb ) {
00076       pwidth *= (sig->dim[i].msb - sig->dim[i].lsb) + 1;
00077     } else {
00078       pwidth *= (sig->dim[i].lsb - sig->dim[i].msb) + 1;
00079     }
00080   }
00081 
00082   /* Calculate total number of addressable elements and their write/read information */
00083   for( i=0; i<sig->value->width; i+=pwidth ) {
00084     if( (sig->suppl.part.excluded == 1) && !ignore_excl ) {
00085       (*wr_hit)++;
00086       (*rd_hit)++;
00087       *excluded += 2;
00088     } else {
00089       unsigned int wr = 0;
00090       unsigned int rd = 0;
00091       vector_mem_rw_count( sig->value, (int)i, (int)((i + pwidth) - 1), &wr, &rd );
00092       if( wr > 0 ) {
00093         (*wr_hit)++;
00094       }
00095       if( rd > 0 ) {
00096         (*rd_hit)++;
00097       }
00098       ae_cov_found &= (wr > 0) && (rd > 0);
00099     }
00100     (*ae_total)++;
00101   }
00102 
00103   /* Calculate toggle coverage information for the memory */
00104   *tog_total += sig->value->width;
00105   if( (sig->suppl.part.excluded == 1) && !ignore_excl ) {
00106     *tog01_hit += sig->value->width;
00107     *tog10_hit += sig->value->width;
00108     *excluded  += (sig->value->width * 2);
00109   } else {
00110     unsigned int hit01 = 0;
00111     unsigned int hit10 = 0;
00112     vector_toggle_count( sig->value, &hit01, &hit10 );
00113     *tog01_hit += hit01;
00114     *tog10_hit += hit10;
00115     tog_cov_found = (hit01 == sig->value->width) && (hit10 == sig->value->width);
00116   }
00117 
00118   *cov_found |= ae_cov_found && tog_cov_found;
00119 
00120   PROFILE_END;
00121 
00122 }

void memory_get_stats ( func_unit funit,
unsigned int *  wr_hit,
unsigned int *  rd_hit,
unsigned int *  ae_total,
unsigned int *  tog01_hit,
unsigned int *  tog10_hit,
unsigned int *  tog_total,
unsigned int *  excluded,
bool cov_found 
)

Calculates memory coverage numbers for the specified signal list.

Gathers memory statistics for the memories in the given signal list.

Parameters:
funit Pointer to current functional unit
wr_hit Pointer to total number of addressable elements written
rd_hit Pointer to total number of addressable elements read
ae_total Pointer to total number of addressable elements
tog01_hit Pointer to total number of bits toggling from 0->1
tog10_hit Pointer to total number of bits toggling from 1->0
tog_total Pointer to total number of bits in memories that can be toggled
excluded Pointer to total number of excluded memory coverage points
cov_found Pointer to value indicating that at least one memory was found to be fully covered

References FALSE, func_iter_dealloc(), func_iter_get_next_signal(), func_iter_init(), funit_is_unnamed(), memory_get_stat(), ssuppl_u::part, PROFILE, PROFILE_END, SSUPPL_TYPE_MEM, vsignal_s::suppl, TRUE, ssuppl_u::type, and vsignal_s::udim_num.

Referenced by report_gather_funit_stats(), and report_gather_instance_stats().

00137   { PROFILE(MEMORY_GET_STATS);
00138 
00139   if( !funit_is_unnamed( funit ) ) {
00140 
00141     func_iter fi;
00142     vsignal*  sig;
00143 
00144     func_iter_init( &fi, funit, FALSE, TRUE );
00145    
00146     while( (sig = func_iter_get_next_signal( &fi )) != NULL ) {
00147 
00148       /* Calculate only for memory elements (must contain one or more unpacked dimensions) */
00149       if( (sig->suppl.part.type == SSUPPL_TYPE_MEM) && (sig->udim_num > 0) ) {
00150 
00151         memory_get_stat( sig, wr_hit, rd_hit, ae_total, tog01_hit, tog10_hit, tog_total, excluded, cov_found, FALSE );
00152 
00153       }
00154 
00155     }
00156 
00157     func_iter_dealloc( &fi );
00158 
00159   }
00160 
00161   PROFILE_END;
00162 
00163 }

static void memory_instance_verbose ( FILE *  ofile,
funit_inst root,
char *  parent_inst 
) [static]

Displays the verbose memory coverage results to the specified output stream on an instance basis. The verbose memory coverage includes the signal names, the bits that did not receive 100% toggle and addressable elements that did not receive 100% write/read coverage during simulation.

Parameters:
ofile Pointer to file to display coverage results to
root Pointer to root of instance functional unit tree to parse
parent_inst Name of parent instance

References funit_inst_s::child_head, db_is_unnamed_scope(), func_unit_s::filename, free_safe, funit_inst_s::funit, FUNIT_AFUNCTION, FUNIT_ANAMED_BLOCK, FUNIT_ATASK, funit_flatten_name(), FUNIT_FUNCTION, funit_is_unnamed(), FUNIT_MODULE, FUNIT_NAMED_BLOCK, FUNIT_TASK, statistic_s::mem_ae_total, statistic_s::mem_cov_found, statistic_s::mem_excluded, statistic_s::mem_rd_hit, statistic_s::mem_tog01_hit, statistic_s::mem_tog10_hit, statistic_s::mem_tog_total, statistic_s::mem_wr_hit, memory_display_verbose(), funit_inst_s::name, funit_inst_s::name_diff, funit_inst_s::next, obf_file, PROFILE, PROFILE_END, report_covered, report_exclusions, RPT_TYPE_EXCL, RPT_TYPE_HIT, RPT_TYPE_MISS, scope_gen_printable(), funit_inst_s::stat, funit_inst_s::suppl, and func_unit_s::type.

Referenced by memory_report().

01104   { PROFILE(MEMORY_INSTANCE_VERBOSE);
01105 
01106   funit_inst* curr_inst;      /* Pointer to current instance being evaluated */
01107   char        tmpname[4096];  /* Temporary name holder of instance */
01108   char*       pname;          /* Printable version of the name */
01109 
01110   assert( root != NULL );
01111 
01112   /* Get printable version of the signal */
01113   pname = scope_gen_printable( root->name );
01114 
01115   if( db_is_unnamed_scope( pname ) || root->suppl.name_diff ) {
01116     strcpy( tmpname, parent_inst );
01117   } else if( strcmp( parent_inst, "*" ) == 0 ) {
01118     strcpy( tmpname, pname );
01119   } else {
01120     unsigned int rv = snprintf( tmpname, 4096, "%s.%s", parent_inst, pname );
01121     assert( rv < 4096 );
01122   }
01123 
01124   free_safe( pname, (strlen( pname ) + 1) );
01125 
01126   if( (root->funit != NULL) && !funit_is_unnamed( root->funit ) &&
01127       ((((root->stat->mem_tog01_hit < root->stat->mem_tog_total) ||
01128          (root->stat->mem_tog10_hit < root->stat->mem_tog_total) ||
01129          (root->stat->mem_wr_hit    < root->stat->mem_ae_total)  ||
01130          (root->stat->mem_rd_hit    < root->stat->mem_ae_total)) && !report_covered) ||
01131        (root->stat->mem_cov_found && report_covered) ||
01132        ((root->stat->mem_excluded > 0) && report_exclusions)) ) {
01133 
01134     pname = scope_gen_printable( funit_flatten_name( root->funit ) );
01135 
01136     fprintf( ofile, "\n" );
01137     switch( root->funit->type ) {
01138       case FUNIT_MODULE       :  fprintf( ofile, "    Module: " );       break;
01139       case FUNIT_ANAMED_BLOCK :
01140       case FUNIT_NAMED_BLOCK  :  fprintf( ofile, "    Named Block: " );  break;
01141       case FUNIT_AFUNCTION    :
01142       case FUNIT_FUNCTION     :  fprintf( ofile, "    Function: " );     break;
01143       case FUNIT_ATASK        :
01144       case FUNIT_TASK         :  fprintf( ofile, "    Task: " );         break;
01145       default                 :  fprintf( ofile, "    UNKNOWN: " );      break;
01146     }
01147     fprintf( ofile, "%s, File: %s, Instance: %s\n", pname, obf_file( root->funit->filename ), tmpname );
01148     fprintf( ofile, "    -------------------------------------------------------------------------------------------------------------\n" );
01149     free_safe( pname, (strlen( pname ) + 1) );
01150 
01151     if( (((root->stat->mem_tog01_hit < root->stat->mem_tog_total) ||
01152           (root->stat->mem_tog10_hit < root->stat->mem_tog_total) ||
01153           (root->stat->mem_wr_hit    < root->stat->mem_ae_total)  ||
01154           (root->stat->mem_rd_hit    < root->stat->mem_ae_total)) && !report_covered) || 
01155         (root->stat->mem_cov_found && report_covered) ) {
01156       memory_display_verbose( ofile, root->funit, (report_covered ? RPT_TYPE_HIT : RPT_TYPE_MISS) );
01157     }
01158     if( report_exclusions && (root->stat->mem_excluded > 0) ) {
01159       memory_display_verbose( ofile, root->funit, RPT_TYPE_EXCL );
01160     }
01161 
01162   }
01163 
01164   curr_inst = root->child_head;
01165   while( curr_inst != NULL ) {
01166     memory_instance_verbose( ofile, curr_inst, tmpname );
01167     curr_inst = curr_inst->next;
01168   }
01169 
01170   PROFILE_END;
01171 
01172 }

void memory_report ( FILE *  ofile,
bool  verbose 
)

Generates report output for line coverage.

Outputs the memory portion of the report to the given output stream.

Parameters:
ofile Pointer to output file to write
verbose Specifies if verbose coverage information should be output

References curr_db, FALSE, funit_head, inst_link_s::inst, db_s::inst_head, memory_ae_funit_summary(), memory_ae_instance_summary(), memory_display_ae_funit_summary(), memory_display_ae_instance_summary(), memory_display_toggle_funit_summary(), memory_display_toggle_instance_summary(), memory_funit_verbose(), memory_instance_verbose(), memory_toggle_funit_summary(), memory_toggle_instance_summary(), funit_inst_s::name_diff, inst_link_s::next, PROFILE, PROFILE_END, report_covered, report_exclusions, report_instance, and funit_inst_s::suppl.

Referenced by report_generate().

01237   { PROFILE(MEMORY_REPORT);
01238 
01239   bool       missed_found  = FALSE;  /* If set to TRUE, indicates that untoggled bits were found */
01240   inst_link* instl;                  /* Pointer to current instance link */
01241   int        acc_hits01    = 0;      /* Accumulated hits 0 -> 1 count */
01242   int        acc_hits10    = 0;      /* Accumulated hits 1 -> 0 count */
01243   int        acc_tog_total = 0;      /* Accumulated bit toggle count */
01244   int        acc_wr_hits   = 0;      /* Accumulated number of addressable elements written */
01245   int        acc_rd_hits   = 0;      /* Accumulated number of addressable elements read */
01246   int        acc_ae_total  = 0;      /* Accumulated number of addressable elements */
01247 
01248   fprintf( ofile, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" );
01249   fprintf( ofile, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   MEMORY COVERAGE RESULTS   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" );
01250   fprintf( ofile, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" );
01251 
01252   if( report_instance ) {
01253 
01254     fprintf( ofile, "                                                           Toggle 0 -> 1                       Toggle 1 -> 0\n" );
01255     fprintf( ofile, "Instance                                           Hit/ Miss/Total    Percent hit      Hit/ Miss/Total    Percent hit\n" );
01256     fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01257 
01258     instl = db_list[curr_db]->inst_head;
01259     while( instl != NULL ) {
01260       missed_found |= memory_toggle_instance_summary( ofile, instl->inst, (instl->inst->suppl.name_diff ? "<NA>" : "*"), &acc_hits01, &acc_hits10, &acc_tog_total );
01261       instl = instl->next;
01262     }
01263     fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01264     (void)memory_display_toggle_instance_summary( ofile, "Accumulated", acc_hits01, acc_hits10, acc_tog_total );
01265 
01266     fprintf( ofile, "\n" );
01267     fprintf( ofile, "                                                    Addressable elements written         Addressable elements read\n" );
01268     fprintf( ofile, "                                                   Hit/ Miss/Total    Percent hit      Hit/ Miss/Total    Percent hit\n" );
01269     fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01270 
01271     instl = db_list[curr_db]->inst_head;
01272     while( instl != NULL ) {
01273       missed_found |= memory_ae_instance_summary( ofile, instl->inst, (instl->inst->suppl.name_diff ? "<NA>" : "*"), &acc_wr_hits, &acc_rd_hits, &acc_ae_total );
01274       instl = instl->next;
01275     }
01276     fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01277     (void)memory_display_ae_instance_summary( ofile, "Accumulated", acc_wr_hits, acc_rd_hits, acc_ae_total );
01278 
01279     if( verbose && (missed_found || report_covered || report_exclusions) ) {
01280       fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01281       instl = db_list[curr_db]->inst_head;
01282       while( instl != NULL ) {
01283         memory_instance_verbose( ofile, instl->inst, (instl->inst->suppl.name_diff ? "<NA>" : "*") );
01284         instl = instl->next;
01285       }
01286     }
01287 
01288   } else {
01289 
01290     fprintf( ofile, "                                                           Toggle 0 -> 1                       Toggle 1 -> 0\n" );
01291     fprintf( ofile, "Module/Task/Function      Filename                 Hit/ Miss/Total    Percent hit      Hit/ Miss/Total    Percent hit\n" );
01292     fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01293 
01294     missed_found |= memory_toggle_funit_summary( ofile, db_list[curr_db]->funit_head, &acc_hits01, &acc_hits10, &acc_tog_total );
01295     fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01296     (void)memory_display_toggle_funit_summary( ofile, "Accumulated", "", acc_hits01, acc_hits10, acc_tog_total );
01297 
01298     fprintf( ofile, "\n" );
01299     fprintf( ofile, "                                                    Addressable elements written         Addressable elements read\n" );
01300     fprintf( ofile, "                                                   Hit/ Miss/Total    Percent hit      Hit/ Miss/Total    Percent hit\n" );
01301     fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01302 
01303     missed_found |= memory_ae_funit_summary( ofile, db_list[curr_db]->funit_head, &acc_wr_hits, &acc_rd_hits, &acc_ae_total );
01304     fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01305     (void)memory_display_ae_funit_summary( ofile, "Accumulated", "", acc_wr_hits, acc_rd_hits, acc_ae_total );
01306 
01307     if( verbose && (missed_found || report_covered || report_exclusions) ) {
01308       fprintf( ofile, "---------------------------------------------------------------------------------------------------------------------\n" );
01309       memory_funit_verbose( ofile, db_list[curr_db]->funit_head );
01310     }
01311 
01312   }
01313 
01314   fprintf( ofile, "\n\n" );
01315 
01316   PROFILE_END;
01317 
01318 }

static bool memory_toggle_funit_summary ( FILE *  ofile,
funit_link head,
int *  hits01,
int *  hits10,
int *  total 
) [static]
Returns:
Returns TRUE if any bits were found to be untoggled; otherwise, returns FALSE.

Iterates through the functional unit list displaying the memory toggle coverage summary for each functional unit.

Parameters:
ofile Pointer to file to display coverage results to
head Pointer to head of functional unit list to parse
hits01 Pointer to number of bits in memory toggled from 0 -> 1
hits10 Pointer to number of bits in memory toggled from 1 -> 0
total Pointer to total number of bits in memories

References isuppl_u::assert_ovl, FALSE, func_unit_s::filename, free_safe, funit_link_s::funit, funit_flatten_name(), funit_is_unnamed(), get_basename(), statistic_s::mem_tog01_hit, statistic_s::mem_tog10_hit, statistic_s::mem_tog_total, memory_display_toggle_funit_summary(), funit_link_s::next, obf_file, ovl_is_assertion_module(), isuppl_u::part, PROFILE, PROFILE_END, scope_gen_printable(), statistic_s::show, and func_unit_s::stat.

Referenced by memory_report().

00785   { PROFILE(MEMORY_TOGGLE_FUNIT_SUMMARY);
00786 
00787   bool  miss_found = FALSE;  /* Set to TRUE if missing toggles were found */
00788   char* pname;               /* Printable version of the functional unit name */
00789 
00790   while( head != NULL ) {
00791 
00792     /* If this is an assertion module, don't output any further */
00793     if( head->funit->stat->show && !funit_is_unnamed( head->funit ) &&
00794         ((info_suppl.part.assert_ovl == 0) || !ovl_is_assertion_module( head->funit )) ) {
00795 
00796       /* Get printable version of functional unit name */
00797       pname = scope_gen_printable( funit_flatten_name( head->funit ) );
00798 
00799       miss_found |= memory_display_toggle_funit_summary( ofile, pname, get_basename( obf_file( head->funit->filename ) ),
00800                                                          head->funit->stat->mem_tog01_hit, head->funit->stat->mem_tog10_hit, head->funit->stat->mem_tog_total );
00801 
00802       /* Update accumulated information */
00803       *hits01 += head->funit->stat->mem_tog01_hit;
00804       *hits10 += head->funit->stat->mem_tog10_hit;
00805       *total  += head->funit->stat->mem_tog_total;
00806 
00807       free_safe( pname, (strlen( pname ) + 1) );
00808 
00809     }
00810 
00811     head = head->next;
00812 
00813   }
00814 
00815   PROFILE_END;
00816 
00817   return( miss_found );
00818 
00819 }

static bool memory_toggle_instance_summary ( FILE *  ofile,
funit_inst root,
char *  parent_inst,
int *  hits01,
int *  hits10,
int *  total 
) [static]
Returns:
Returns TRUE if any bits were found to be not toggled; otherwise, returns FALSE.

Displays the memory instance summarization to the specified file. Recursively iterates through functional unit instance tree, outputting the toggle information that is found at that instance.

Parameters:
ofile File to output coverage information to
root Instance node in the functional unit instance tree being evaluated
parent_inst Name of parent instance
hits01 Pointer to accumulated toggle 0 -> 1 hit count
hits10 Pointer to accumulated toggle 1 -> 0 hit count
total Pointer to total number of memory bits

References isuppl_u::assert_ovl, funit_inst_s::child_head, db_is_unnamed_scope(), FALSE, free_safe, funit_inst_s::funit, funit_is_unnamed(), statistic_s::mem_tog01_hit, statistic_s::mem_tog10_hit, statistic_s::mem_tog_total, memory_display_toggle_instance_summary(), funit_inst_s::name, funit_inst_s::name_diff, funit_inst_s::next, ovl_is_assertion_module(), isuppl_u::part, PROFILE, PROFILE_END, scope_gen_printable(), statistic_s::show, funit_inst_s::stat, and funit_inst_s::suppl.

Referenced by memory_report().

00592   { PROFILE(MEMORY_TOGGLE_INSTANCE_SUMMARY);
00593 
00594   funit_inst* curr;                /* Pointer to current child functional unit instance of this node */
00595   char        tmpname[4096];       /* Temporary name holder for instance */
00596   char*       pname;               /* Printable version of instance name */
00597   bool        miss_found = FALSE;  /* Set to TRUE if at least one bit is found to not be toggled */
00598 
00599   assert( root != NULL );
00600   assert( root->stat != NULL );
00601 
00602   /* Get printable version of this instance */
00603   pname = scope_gen_printable( root->name );
00604   if( db_is_unnamed_scope( pname ) || root->suppl.name_diff ) {
00605     strcpy( tmpname, parent_inst );
00606   } else if( strcmp( parent_inst, "*" ) == 0 ) {
00607     strcpy( tmpname, pname );
00608   } else {
00609     unsigned int rv = snprintf( tmpname, 4096, "%s.%s", parent_inst, pname );
00610     assert( rv < 4096 );
00611   }
00612 
00613   free_safe( pname, (strlen( pname ) + 1) );
00614 
00615   if( (root->funit != NULL) && root->stat->show && !funit_is_unnamed( root->funit ) &&
00616       ((info_suppl.part.assert_ovl == 0) || !ovl_is_assertion_module( root->funit )) ) {
00617 
00618     miss_found |= memory_display_toggle_instance_summary( ofile, tmpname, root->stat->mem_tog01_hit, root->stat->mem_tog10_hit, root->stat->mem_tog_total );
00619 
00620     /* Update accumulated coverage information */
00621     *hits01 += root->stat->mem_tog01_hit;
00622     *hits10 += root->stat->mem_tog10_hit;
00623     *total  += root->stat->mem_tog_total;
00624 
00625   } 
00626 
00627   /* If this is an assertion module, don't output any further */
00628   if( (info_suppl.part.assert_ovl == 0) || !ovl_is_assertion_module( root->funit ) ) {
00629 
00630     curr = root->child_head;
00631     while( curr != NULL ) {
00632       miss_found |= memory_toggle_instance_summary( ofile, curr, tmpname, hits01, hits10, total );
00633       curr = curr->next;
00634     }
00635 
00636   }
00637 
00638   PROFILE_END;
00639 
00640   return( miss_found );
00641 
00642 }


Variable Documentation

unsigned int curr_db

Index of current database in db_list array that is being handled.

Array of database pointers storing all currently loaded databases.

unsigned int exclusion_id_size

Outputs the exclusion ID for an output coverage point. The exclusion ID can be used by the exclude command for excluding/including coverage points.

Informational line for the CDD file.

If set to a boolean value of TRUE, displays covered logic for a particular CDD file. By default, Covered will display uncovered logic. Must be used in conjunction with the -d v|d (verbose output) option.

If set to a boolean value of TRUE, displays excluded coverage points for a particular CDD file. By default, Covered will not display excluded coverage points. This can be useful when used in conjunction with the -x option for including excluded coverage points. Must be used in conjunction with the -d v|d (verbose output) option.

If set to a boolean value of TRUE, provides a coverage information for individual functional unit instances. If set to a value of FALSE, reports coverage information on a functional unit basis, merging results from all instances of same functional unit.

Generated on Sun Nov 21 00:55:40 2010 for Covered by  doxygen 1.6.3