Compare commits

..

No commits in common. "73e4806e650b80b7a3b3f970fbc132c2090cff5b" and "0ef6d2f40f15ec494b672adfca7eeeb11417d350" have entirely different histories.

3 changed files with 3 additions and 52 deletions

View File

@ -299,8 +299,6 @@ static GList *append_cell(GList *curr_list, struct gds_cell **cell_ptr)
cell->graphic_objs = NULL;
cell->name[0] = 0;
cell->parent_library = NULL;
cell->checks.unresolved_child_count = GDS_CELL_CHECK_NOT_RUN;
cell->checks.affected_by_reference_loop = GDS_CELL_CHECK_NOT_RUN;
} else
return NULL;
/* return cell */

View File

@ -34,53 +34,10 @@
*/
#include "gds-tree-checker.h"
#include <stdio.h>
int gds_tree_check_cell_references(struct gds_library *lib)
{
GList *cell_iter;
struct gds_cell *cell;
GList *instance_iter;
struct gds_cell_instance *cell_inst;
int total_unresolved_count = 0;
if (!lib)
return -1;
/* Iterate over all cells in library */
for (cell_iter = lib->cells; cell_iter != NULL; cell_iter = g_list_next(cell_iter)) {
cell = (struct gds_cell *)cell_iter->data;
/* Check if this list element is broken. This should never happen */
if (!cell) {
fprintf(stderr, "Broken cell list item found. Will continue.\n");
continue;
}
/* Reset the unresolved cell reference counter to 0 */
cell->checks.unresolved_child_count = 0;
/* Iterate through all child cell references and check if the references are set */
for (instance_iter = cell->child_cells; instance_iter != NULL;
instance_iter = g_list_next(instance_iter)) {
cell_inst = (struct gds_cell_instance *)instance_iter->data;
/* Check if broken. This should also not happen */
if (!cell_inst) {
fprintf(stderr, "Broken cell list item found in cell %s. Will continue.\n",
cell->name);
continue;
}
/* Check if instance is valid; else increment "error" counter of cell */
if (!cell_inst->cell_ref) {
total_unresolved_count++;
cell->checks.unresolved_child_count++;
}
}
}
return total_unresolved_count;
return 0;
}
int gds_tree_check_reference_loops(struct gds_library *lib)

View File

@ -40,10 +40,6 @@
#define MIN(a,b) (((a) < (b)) ? (a) : (b)) /**< @brief Return smaller number */
#define MAX(a,b) (((a) > (b)) ? (a) : (b)) /**< @brief Return bigger number */
/** @brief Defintion of check counter default value
* that indicates that the corresponding check has not yet been executed */
enum {GDS_CELL_CHECK_NOT_RUN = -1};
/** @brief Types of graphic objects */
enum graphics_type
{
@ -69,8 +65,8 @@ struct gds_point {
* @brief Stores the result of the cell checks.
*/
struct gds_cell_checks {
int unresolved_child_count; /**< @brief Number of unresolved cell instances inside this cell. Default: GDS_CELL_CHECK_NOT_RUN */
int affected_by_reference_loop; /**< @brief 1 if the cell is affected by a reference loop and therefore not renderable. Default: GDS_CELL_CHECK_NOT_RUN*/
int unresolved_child_count; /**< @brief Number of unresolved cell instances inside this cell */
int affected_by_reference_loop; /**< @brief 1 if the cell is affected by a reference loop and therefore not renderable */
/**
* @brief For the internal use of the checker.
* @warning Do not use this structure and its contents!