#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "db.h"
#include "defines.h"
#include "exclude.h"
#include "func_iter.h"
#include "func_unit.h"
#include "instance.h"
#include "link.h"
#include "obfuscate.h"
#include "ovl.h"
#include "report.h"
#include "search.h"
#include "util.h"
#include "vector.h"
Defines | |
#define | OVL_ASSERT_NUM 27 |
Functions | |
static bool | ovl_is_assertion_name (const char *name) |
bool | ovl_is_assertion_module (const func_unit *funit) |
Returns TRUE if specified functional unit is an OVL assertion module. | |
bool | ovl_is_coverage_point (const expression *exp) |
Returns TRUE if specified expression corresponds to a functional coverage point. | |
void | ovl_add_assertions_to_no_score_list (bool rm_tasks) |
Adds all assertion modules to no score list. | |
void | ovl_get_funit_stats (const func_unit *funit, unsigned int *hit, unsigned int *excluded, unsigned int *total) |
Gathers the OVL assertion coverage summary statistics for the given functional unit. | |
static char * | ovl_get_coverage_point (statement *stmt) |
void | ovl_display_verbose (FILE *ofile, const func_unit *funit, rpt_type rtype) |
void | ovl_collect (func_unit *funit, int cov, char ***inst_names, int **excludes, unsigned int *inst_size) |
Finds the instance names of all uncovered and covered assertions in the specified functional unit. | |
void | ovl_get_coverage (const func_unit *funit, const char *inst_name, char **assert_mod, str_link **cp_head, str_link **cp_tail) |
Gets missed coverage points for the given assertion. | |
Variables | |
db ** | db_list |
unsigned int | curr_db |
bool | flag_check_ovl_assertions |
bool | report_covered |
bool | report_instance |
bool | flag_output_exclusion_ids |
static char * | ovl_assertions [OVL_ASSERT_NUM] |
#define OVL_ASSERT_NUM 27 |
Specifies the number of assertion modules that need to exist in the ovl_assertions string array.
Referenced by ovl_add_assertions_to_no_score_list(), and ovl_is_assertion_name().
void ovl_add_assertions_to_no_score_list | ( | bool | rm_tasks | ) |
Adds all assertion modules to no score list.
anonymous | search_add_no_score_funit search_add_no_score_funit search_add_no_score_funit search_add_no_score_funit |
Adds all OVL assertions to the no_score list.
rm_tasks | Removes extraneous tasks only that are not used for coverage |
References OVL_ASSERT_NUM, ovl_assertions, PROFILE, PROFILE_END, and search_add_no_score_funit().
Referenced by score_parse_args().
00152 { PROFILE(OVL_ADD_ASSERTIONS_TO_NO_SCORE_LIST); 00153 00154 int i; /* Loop iterator */ 00155 char tmp[4096]; /* Temporary string holder */ 00156 00157 for( i=0; i<OVL_ASSERT_NUM; i++ ) { 00158 if( rm_tasks ) { 00159 unsigned int rv; 00160 rv = snprintf( tmp, 4096, "%s.ovl_error_t", ovl_assertions[i] ); 00161 assert( rv < 4096 ); 00162 (void)search_add_no_score_funit( tmp ); 00163 rv = snprintf( tmp, 4096, "%s.ovl_finish_t", ovl_assertions[i] ); 00164 assert( rv < 4096 ); 00165 (void)search_add_no_score_funit( tmp ); 00166 rv = snprintf( tmp, 4096, "%s.ovl_init_msg_t", ovl_assertions[i] ); 00167 assert( rv < 4096 ); 00168 (void)search_add_no_score_funit( tmp ); 00169 } else { 00170 (void)search_add_no_score_funit( ovl_assertions[i] ); 00171 } 00172 } 00173 00174 PROFILE_END; 00175 00176 }
void ovl_collect | ( | func_unit * | funit, | |
int | cov, | |||
char *** | inst_names, | |||
int ** | excludes, | |||
unsigned int * | inst_size | |||
) |
Finds the instance names of all uncovered and covered assertions in the specified functional unit.
Populates the uncovered or covered string arrays with the instance names of child modules that match the respective coverage level.
funit | Pointer to functional unit to gather uncovered/covered assertion instances from | |
cov | Specifies if uncovered (0) or covered (1) assertions should be gathered | |
inst_names | Pointer to array of uncovered instance names in the specified functional unit | |
excludes | Pointer to array of integers indicating exclusion of associated uncovered instance name | |
inst_size | Number of valid elements in the uncov_inst_names array |
References funit_inst_s::child_head, curr_db, ESUPPL_EXCLUDED, expression_s::exec_num, statement_s::exp, FALSE, func_iter_dealloc(), func_iter_get_next_statement(), func_iter_init(), funit_inst_s::funit, FUNIT_MODULE, inst_head, inst_link_find_by_funit(), funit_inst_s::name, funit_inst_s::next, ovl_is_assertion_module(), ovl_is_coverage_point(), PROFILE, PROFILE_END, realloc_safe, strdup_safe, expression_s::suppl, TRUE, and func_unit_s::type.
Referenced by assertion_collect().
00388 { PROFILE(OVL_COLLECT); 00389 00390 funit_inst* funiti; /* Pointer to found functional unit instance containing this functional unit */ 00391 funit_inst* curr_child; /* Current child of this functional unit's instance */ 00392 int ignore = 0; /* Number of functional units to ignore */ 00393 unsigned int total = 0; /* Total number of coverage points for a given assertion module */ 00394 unsigned int hit = 0; /* Number of hit coverage points for a given assertion module */ 00395 int exclude_found = 0; /* Set to a value of 1 if at least one excluded coverage point was found */ 00396 00397 /* Get one instance of this module from the design */ 00398 funiti = inst_link_find_by_funit( funit, db_list[curr_db]->inst_head, &ignore ); 00399 assert( funiti != NULL ); 00400 00401 /* Find all child instances of this module that are assertion modules */ 00402 curr_child = funiti->child_head; 00403 while( curr_child != NULL ) { 00404 00405 /* If this child instance module type is an assertion module, get its assertion information */ 00406 if( (curr_child->funit->type == FUNIT_MODULE) && ovl_is_assertion_module( curr_child->funit ) ) { 00407 00408 func_iter fi; 00409 statement* stmt; 00410 00411 /* Initialize the total and hit values */ 00412 total = 0; 00413 hit = 0; 00414 00415 /* Initialize the functional unit iterator */ 00416 func_iter_init( &fi, curr_child->funit, TRUE, FALSE ); 00417 00418 while( (stmt = func_iter_get_next_statement( &fi )) != NULL ) { 00419 00420 /* If this statement is a task call to the task "ovl_cover_t", get its total and hit information */ 00421 if( ovl_is_coverage_point( stmt->exp ) ) { 00422 total = total + 1; 00423 if( (stmt->exp->exec_num > 0) || (ESUPPL_EXCLUDED( stmt->exp->suppl ) == 1) ) { 00424 hit++; 00425 exclude_found |= ESUPPL_EXCLUDED( stmt->exp->suppl ); 00426 } 00427 } 00428 00429 } 00430 00431 /* Deallocate functional unit iterator */ 00432 func_iter_dealloc( &fi ); 00433 00434 /* If there are uncovered coverage points, add this instance to the uncov array */ 00435 if( (cov == 0) && (hit < total) ) { 00436 *inst_names = (char**)realloc_safe( *inst_names, (sizeof( char** ) * (*inst_size)), (sizeof( char** ) * (*inst_size + 1)) ); 00437 *excludes = (int*) realloc_safe( *excludes, (sizeof( int ) * (*inst_size)), (sizeof( int ) * (*inst_size + 1)) ); 00438 (*inst_names)[*inst_size] = strdup_safe( curr_child->name ); 00439 (*excludes)[*inst_size] = 0; 00440 (*inst_size)++; 00441 00442 /* Otherwise, populate the cov array */ 00443 } else { 00444 if( (cov == 0) && (exclude_found == 1) ) { 00445 *inst_names = (char**)realloc_safe( *inst_names, (sizeof( char** ) * (*inst_size)), (sizeof( char** ) * (*inst_size + 1)) ); 00446 *excludes = (int*) realloc_safe( *excludes, (sizeof( int ) * (*inst_size)), (sizeof( int ) * (*inst_size + 1)) ); 00447 (*inst_names)[*inst_size] = strdup_safe( curr_child->name ); 00448 (*excludes)[*inst_size] = 1; 00449 (*inst_size)++; 00450 } else if( cov == 1 ) { 00451 *inst_names = (char**)realloc_safe( *inst_names, (sizeof( char** ) * (*inst_size)), (sizeof( char** ) * (*inst_size + 1)) ); 00452 (*inst_names)[*inst_size] = strdup_safe( curr_child->name ); 00453 (*inst_size)++; 00454 } 00455 } 00456 00457 } 00458 00459 /* Advance child pointer to next child instance */ 00460 curr_child = curr_child->next; 00461 00462 } 00463 00464 PROFILE_END; 00465 00466 }
Displays the verbose hit/miss information to the given output file for the given functional unit.
ofile | Pointer to output file to display verbose information to | |
funit | Pointer to module containing assertions that were not covered | |
rtype | Specifies the type of report to generate |
References funit_inst_s::child_head, curr_db, db_gen_exclusion_id(), db_get_exclusion_id_size(), exclude_find_exclude_reason(), esuppl_u::excluded, expression_s::exec_num, statement_s::exp, FALSE, flag_output_exclusion_ids, free_safe, func_iter_dealloc(), func_iter_get_next_statement(), func_iter_init(), funit_inst_s::funit, funit_flatten_name(), FUNIT_MODULE, gen_char_string(), expression_s::id, inst_head, inst_link_find_by_funit(), funit_inst_s::name, funit_inst_s::next, obf_funit, obf_inst, ovl_get_coverage_point(), ovl_is_assertion_module(), ovl_is_coverage_point(), esuppl_u::part, PROFILE, PROFILE_END, exclude_reason_s::reason, report_covered, report_output_exclusion_reason(), RPT_TYPE_EXCL, RPT_TYPE_HIT, expression_s::suppl, TRUE, and func_unit_s::type.
Referenced by assertion_display_verbose().
00283 { PROFILE(OVL_DISPLAY_VERBOSE); 00284 00285 funit_inst* funiti; /* Pointer to functional unit instance found for this functional unit */ 00286 int ignore = 0; /* Specifies that we do not want to ignore any modules */ 00287 funit_inst* curr_child; /* Pointer to current child instance of this module */ 00288 char* cov_point; /* Pointer to name of current coverage point */ 00289 func_iter fi; /* Functional unit iterator */ 00290 statement* stmt; /* Pointer to current statement */ 00291 unsigned int eid_size = 1; /* Number of characters needed to store an exclusion ID */ 00292 char tmp[30]; /* Temporary string */ 00293 00294 fprintf( ofile, " " ); 00295 if( flag_output_exclusion_ids && (rtype != RPT_TYPE_HIT) ) { 00296 eid_size = db_get_exclusion_id_size(); 00297 gen_char_string( tmp, ' ', (eid_size - 2) ); 00298 fprintf( ofile, "EID%s ", tmp ); 00299 } 00300 fprintf( ofile, "Instance Name Assertion Name Coverage Point" ); 00301 if( rtype == RPT_TYPE_HIT ) { 00302 fprintf( ofile, " # of hits" ); 00303 } 00304 fprintf( ofile, "\n" ); 00305 gen_char_string( tmp, '-', (eid_size - 1) ); 00306 fprintf( ofile, " %s---------------------------------------------------------------------------------------------------------\n", tmp ); 00307 00308 /* Get one instance of this module from the design */ 00309 funiti = inst_link_find_by_funit( funit, db_list[curr_db]->inst_head, &ignore ); 00310 assert( funiti != NULL ); 00311 00312 /* Find all child instances of this module that are assertion modules */ 00313 curr_child = funiti->child_head; 00314 while( curr_child != NULL ) { 00315 00316 /* If this child instance module type is an assertion module, check its assertion information */ 00317 if( (curr_child->funit->type == FUNIT_MODULE) && ovl_is_assertion_module( curr_child->funit ) ) { 00318 00319 /* Initialize the functional unit iterator */ 00320 func_iter_init( &fi, curr_child->funit, TRUE, FALSE ); 00321 00322 while( (stmt = func_iter_get_next_statement( &fi )) != NULL ) { 00323 00324 if( ((((stmt->exp->exec_num > 0) ? 1 : 0) == report_covered) && (stmt->exp->suppl.part.excluded == 0) && (rtype != RPT_TYPE_EXCL)) || 00325 ((stmt->exp->suppl.part.excluded == 1) && (rtype == RPT_TYPE_EXCL)) ) { 00326 00327 /* If this statement is a task call to the task "ovl_cover_t", get its total and hit information */ 00328 if( ovl_is_coverage_point( stmt->exp ) ) { 00329 00330 /* Get coverage point name */ 00331 cov_point = ovl_get_coverage_point( stmt ); 00332 00333 /* Output the coverage verbose results to the specified output file */ 00334 if( (stmt->exp->exec_num == 0) && (rtype != RPT_TYPE_HIT) ) { 00335 if( flag_output_exclusion_ids ) { 00336 exclude_reason* er; 00337 fprintf( ofile, " (%s) %-26s %-22s \"%-38s\"\n", db_gen_exclusion_id( 'A', stmt->exp->id ), 00338 obf_inst( curr_child->name ), obf_funit( funit_flatten_name( curr_child->funit ) ), cov_point ); 00339 if( (rtype == RPT_TYPE_EXCL) && ((er = exclude_find_exclude_reason( 'A', stmt->exp->id, curr_child->funit )) != NULL) ) { 00340 report_output_exclusion_reason( ofile, (12 + (db_get_exclusion_id_size() - 1)), er->reason, TRUE ); 00341 } 00342 } else { 00343 exclude_reason* er; 00344 fprintf( ofile, " %-26s %-22s \"%-38s\"\n", 00345 obf_inst( curr_child->name ), obf_funit( funit_flatten_name( curr_child->funit ) ), cov_point ); 00346 if( (rtype == RPT_TYPE_EXCL) && ((er = exclude_find_exclude_reason( 'A', stmt->exp->id, curr_child->funit )) != NULL) ) { 00347 report_output_exclusion_reason( ofile, (8 + (db_get_exclusion_id_size() - 1)), er->reason, TRUE ); 00348 } 00349 } 00350 } else if( (stmt->exp->exec_num > 0) && (rtype == RPT_TYPE_HIT) ) { 00351 fprintf( ofile, " %-26s %-22s \"%-38s\" %9u\n", 00352 obf_inst( curr_child->name ), obf_funit( funit_flatten_name( curr_child->funit ) ), cov_point, stmt->exp->exec_num ); 00353 } 00354 00355 /* Deallocate the coverage point */ 00356 free_safe( cov_point, (strlen( cov_point ) + 1) ); 00357 00358 } 00359 00360 } 00361 00362 } 00363 00364 /* Deallocate functional unit iterator */ 00365 func_iter_dealloc( &fi ); 00366 00367 } 00368 00369 /* Advance child pointer to next child instance */ 00370 curr_child = curr_child->next; 00371 00372 } 00373 00374 PROFILE_END; 00375 00376 }
void ovl_get_coverage | ( | const func_unit * | funit, | |
const char * | inst_name, | |||
char ** | assert_mod, | |||
str_link ** | cp_head, | |||
str_link ** | cp_tail | |||
) |
Gets missed coverage points for the given assertion.
Retrieves the coverage point strings and execution counts from the specified assertion module.
funit | Pointer to functional unit to get assertion information from | |
inst_name | Name of assertion instance to get coverage points from | |
assert_mod | Pointer to the assertion module name and filename of instance being retrieved | |
cp_head | Pointer to head of coverage point list | |
cp_tail | Pointer to tail of coverage point list |
References funit_inst_s::child_head, curr_db, ESUPPL_EXCLUDED, exclude_find_exclude_reason(), expression_s::exec_num, statement_s::exp, FALSE, func_unit_s::filename, func_iter_dealloc(), func_iter_get_next_statement(), func_iter_init(), funit_inst_s::funit, expression_s::id, inst_head, inst_link_find_by_funit(), malloc_safe, func_unit_s::name, funit_inst_s::name, funit_inst_s::next, ovl_get_coverage_point(), ovl_is_coverage_point(), PROFILE, PROFILE_END, exclude_reason_s::reason, str_link_add(), strdup_safe, expression_s::suppl, str_link_s::suppl, and TRUE.
Referenced by assertion_get_coverage().
00477 { PROFILE(OVL_GET_COVERAGE); 00478 00479 funit_inst* funiti; /* Pointer to found functional unit instance */ 00480 funit_inst* curr_child; /* Pointer to current child functional instance */ 00481 int ignore = 0; /* Number of functional units to ignore */ 00482 func_iter fi; /* Functional unit iterator to iterate through statements */ 00483 statement* stmt; /* Pointer to current statement */ 00484 int str_size; /* Size of assert_mod string needed for memory allocation */ 00485 unsigned int rv; /* Return value */ 00486 00487 /* Get one instance of this module from the design */ 00488 funiti = inst_link_find_by_funit( funit, db_list[curr_db]->inst_head, &ignore ); 00489 assert( funiti != NULL ); 00490 00491 /* Find child instance */ 00492 curr_child = funiti->child_head; 00493 while( (curr_child != NULL) && (strcmp( curr_child->name, inst_name ) != 0) ) { 00494 curr_child = curr_child->next; 00495 } 00496 assert( curr_child != NULL ); 00497 00498 /* Get the module name and store it in assert_mod */ 00499 str_size = strlen( curr_child->funit->name ) + 1 + strlen( curr_child->funit->filename ) + 1; 00500 *assert_mod = (char*)malloc_safe( str_size ); 00501 rv = snprintf( *assert_mod, str_size, "%s %s", curr_child->funit->name, curr_child->funit->filename ); 00502 assert( rv < str_size ); 00503 00504 /* Initialize the functional unit iterator */ 00505 func_iter_init( &fi, curr_child->funit, TRUE, FALSE ); 00506 00507 /* Gather all missed coverage points */ 00508 while( (stmt = func_iter_get_next_statement( &fi )) != NULL ) { 00509 00510 /* If this statement is a task call to the task "ovl_cover_t", get its total and hit information */ 00511 if( ovl_is_coverage_point( stmt->exp ) ) { 00512 00513 exclude_reason* er; 00514 00515 /* Store the coverage point string and execution count */ 00516 (void)str_link_add( ovl_get_coverage_point( stmt ), cp_head, cp_tail ); 00517 (*cp_tail)->suppl = stmt->exp->exec_num; 00518 (*cp_tail)->suppl2 = stmt->exp->id; 00519 (*cp_tail)->suppl3 = ESUPPL_EXCLUDED( stmt->exp->suppl ); 00520 00521 /* If the toggle is currently excluded, check to see if there's a reason associated with it */ 00522 if( (ESUPPL_EXCLUDED( stmt->exp->suppl ) == 1) && ((er = exclude_find_exclude_reason( 'A', stmt->exp->id, curr_child->funit )) != NULL) ) { 00523 (*cp_tail)->str2 = strdup_safe( er->reason ); 00524 } else { 00525 (*cp_tail)->str2 = NULL; 00526 } 00527 00528 } 00529 00530 } 00531 00532 /* Deallocate functional unit iterator */ 00533 func_iter_dealloc( &fi ); 00534 00535 PROFILE_END; 00536 00537 PROFILE_END; 00538 00539 }
static char* ovl_get_coverage_point | ( | statement * | stmt | ) | [static] |
Finds the task call parameter that specifies the name of the coverage point and returns this string value to the calling function.
stmt | Pointer to statement of task call to coverage task |
References ESUPPL_STATIC_BASE, statement_s::exp, EXP_OP_PASSIGN, EXP_OP_STATIC, FALSE, expression_s::left, expression_s::op, PROFILE, PROFILE_END, QSTRING, expression_s::right, expression_s::suppl, expression_s::value, and vector_to_string().
Referenced by ovl_display_verbose(), and ovl_get_coverage().
00251 { PROFILE(OVL_GET_COVERAGE_POINT); 00252 00253 char* cpoint; /* Return value for this function */ 00254 00255 /* 00256 We are going to make a lot of assumptions about the structure of the statement, so just 00257 do a lot of assertions to make sure that our assumptions are correct. 00258 */ 00259 assert( stmt != NULL ); 00260 assert( stmt->exp != NULL ); 00261 assert( stmt->exp->left != NULL ); 00262 assert( stmt->exp->left->op == EXP_OP_PASSIGN ); 00263 assert( stmt->exp->left->right != NULL ); 00264 assert( stmt->exp->left->right->op == EXP_OP_STATIC ); 00265 assert( ESUPPL_STATIC_BASE( stmt->exp->left->right->suppl ) == QSTRING ); 00266 00267 cpoint = vector_to_string( stmt->exp->left->right->value, ESUPPL_STATIC_BASE( stmt->exp->left->right->suppl ), FALSE, 0 ); 00268 00269 PROFILE_END; 00270 00271 return( cpoint ); 00272 00273 }
void ovl_get_funit_stats | ( | const func_unit * | funit, | |
unsigned int * | hit, | |||
unsigned int * | excluded, | |||
unsigned int * | total | |||
) |
Gathers the OVL assertion coverage summary statistics for the given functional unit.
Gathers the total and hit assertion coverage information for the specified functional unit and stores this information in the total and hit pointers.
funit | Pointer to functional unit to gather OVL assertion coverage information for | |
hit | Pointer to the number of assertions hit in the given module during simulation | |
excluded | Pointer to the number of excluded assertions | |
total | Pointer to the total number of assertions in the given module |
References funit_inst_s::child_head, curr_db, ESUPPL_EXCLUDED, expression_s::exec_num, statement_s::exp, FALSE, func_iter_dealloc(), func_iter_get_next_statement(), func_iter_init(), funit_inst_s::funit, FUNIT_MODULE, inst_head, inst_link_find_by_funit(), funit_inst_s::next, ovl_is_assertion_module(), ovl_is_coverage_point(), PROFILE, PROFILE_END, expression_s::suppl, TRUE, and func_unit_s::type.
Referenced by assertion_get_funit_summary(), and assertion_get_stats().
00187 { PROFILE(OVL_GET_FUNIT_STATS); 00188 00189 funit_inst* funiti; /* Pointer to found functional unit instance containing this functional unit */ 00190 funit_inst* curr_child; /* Current child of this functional unit's instance */ 00191 int ignore = 0; /* Number of functional units to ignore */ 00192 func_iter fi; /* Functional unit iterator */ 00193 statement* stmt; /* Pointer to current statement */ 00194 00195 /* If the current functional unit is not an OVL module, get the statistics */ 00196 if( !ovl_is_assertion_module( funit ) ) { 00197 00198 /* Get one instance of this module from the design */ 00199 funiti = inst_link_find_by_funit( funit, db_list[curr_db]->inst_head, &ignore ); 00200 assert( funiti != NULL ); 00201 00202 /* Find all child instances of this module that are assertion modules */ 00203 curr_child = funiti->child_head; 00204 while( curr_child != NULL ) { 00205 00206 /* If this child instance module type is an assertion module, get its assertion information */ 00207 if( (curr_child->funit->type == FUNIT_MODULE) && ovl_is_assertion_module( curr_child->funit ) ) { 00208 00209 /* Initialize the functional unit iterator */ 00210 func_iter_init( &fi, curr_child->funit, TRUE, FALSE ); 00211 00212 while( (stmt = func_iter_get_next_statement( &fi )) != NULL ) { 00213 00214 /* If this statement is a task call to the task "ovl_cover_t", get its total and hit information */ 00215 if( ovl_is_coverage_point( stmt->exp ) ) { 00216 *total = *total + 1; 00217 if( (stmt->exp->exec_num > 0) || (ESUPPL_EXCLUDED( stmt->exp->suppl ) == 1) ) { 00218 (*hit)++; 00219 if( ESUPPL_EXCLUDED( stmt->exp->suppl ) == 1 ) { 00220 (*excluded)++; 00221 } 00222 } 00223 } 00224 00225 } 00226 00227 /* Deallocate functional unit iterator */ 00228 func_iter_dealloc( &fi ); 00229 00230 } 00231 00232 /* Advance child pointer to next child instance */ 00233 curr_child = curr_child->next; 00234 00235 } 00236 00237 } 00238 00239 PROFILE_END; 00240 00241 }
Returns TRUE if specified functional unit is an OVL assertion module.
funit | Pointer to the functional unit to check |
References FALSE, funit_link_s::funit, FUNIT_TASK, func_unit_s::name, funit_link_s::next, ovl_is_assertion_name(), PROFILE, PROFILE_END, func_unit_s::tf_head, and func_unit_s::type.
Referenced by assertion_funit_summary(), assertion_instance_summary(), bind_signal(), combination_funit_summary(), combination_instance_summary(), exclude_expr_assign_and_recalc(), fsm_funit_summary(), fsm_instance_summary(), line_funit_summary(), line_instance_summary(), memory_ae_funit_summary(), memory_ae_instance_summary(), memory_toggle_funit_summary(), memory_toggle_instance_summary(), ovl_collect(), ovl_display_verbose(), ovl_get_funit_stats(), race_check_modules(), report_gather_funit_stats(), report_gather_instance_stats(), toggle_funit_summary(), and toggle_instance_summary().
00105 { PROFILE(OVL_IS_ASSERTION_MODULE); 00106 00107 bool retval = FALSE; /* Return value for this function */ 00108 funit_link* funitl; /* Pointer to current functional unit link */ 00109 00110 if( (funit != NULL) && ovl_is_assertion_name( funit->name ) ) { 00111 00112 /* 00113 If the module matches in name, check to see if the ovl_cover_t task exists (this 00114 will tell us if coverage was enabled for this module. 00115 */ 00116 funitl = funit->tf_head; 00117 while( (funitl != NULL) && ((strcmp( funitl->funit->name, "ovl_cover_t" ) != 0) || (funitl->funit->type != FUNIT_TASK)) ) { 00118 funitl = funitl->next; 00119 } 00120 retval = (funitl == NULL); 00121 00122 } 00123 00124 PROFILE_END; 00125 00126 return( retval ); 00127 00128 }
static bool ovl_is_assertion_name | ( | const char * | name | ) | [static] |
name | Name of assertion module to check |
References OVL_ASSERT_NUM, ovl_assertions, PROFILE, and PROFILE_END.
Referenced by ovl_is_assertion_module().
00079 { PROFILE(OVL_IS_ASSERTION_NAME); 00080 00081 int i = OVL_ASSERT_NUM; /* Loop iterator */ 00082 00083 /* Rule out the possibility if the first 7 characters does not start with "assert" */ 00084 if( strncmp( name, "assert_", 7 ) == 0 ) { 00085 00086 i = 0; 00087 while( (i < OVL_ASSERT_NUM) && (strncmp( (name + 7), (ovl_assertions[i] + 7), strlen( ovl_assertions[i] + 7 ) ) != 0) ) { 00088 i++; 00089 } 00090 00091 } 00092 00093 PROFILE_END; 00094 00095 return( i < OVL_ASSERT_NUM ); 00096 00097 }
bool ovl_is_coverage_point | ( | const expression * | exp | ) |
Returns TRUE if specified expression corresponds to a functional coverage point.
exp | Pointer to expression to check |
References EXP_OP_TASK_CALL, expression_s::name, expression_s::op, PROFILE, and PROFILE_END.
Referenced by exclude_expr_assign_and_recalc(), ovl_collect(), ovl_display_verbose(), ovl_get_coverage(), and ovl_get_funit_stats().
00135 { PROFILE(OVL_IS_COVERAGE_POINT); 00136 00137 bool retval = (exp->op == EXP_OP_TASK_CALL) && (strcmp( exp->name, "ovl_cover_t" ) == 0); 00138 00139 PROFILE_END; 00140 00141 return( retval ); 00142 00143 }
unsigned int curr_db |
Index of current database in db_list array that is being handled.
Outputs the exclusion ID for an output coverage point. The exclusion ID can be used by the exclude command for excluding/including coverage points.
char* ovl_assertions[OVL_ASSERT_NUM] [static] |
{ "assert_change", "assert_cycle_sequence", "assert_decrement", "assert_delta", "assert_even_parity", "assert_fifo_index", "assert_frame", "assert_handshake", "assert_implication", "assert_increment", "assert_never_unknown", "assert_next", "assert_no_overflow", "assert_no_transition", "assert_no_underflow", "assert_odd_parity", "assert_one_cold", "assert_one_hot", "assert_range", "assert_time", "assert_transition", "assert_unchange", "assert_width", "assert_win_change", "assert_window", "assert_win_unchange", "assert_zero_one_hot" }
Specifies the module names of all OVL assertions that contain functional coverage task calls.
Referenced by ovl_add_assertions_to_no_score_list(), and ovl_is_assertion_name().
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, 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.