Implement cell statistics command line interface
This commit is contained in:
@@ -71,6 +71,14 @@ int command_line_convert_gds(const char *gds_name,
|
||||
gboolean tex_layers,
|
||||
double scale);
|
||||
|
||||
/**
|
||||
* @brief Analyze the given GDS file
|
||||
* @param format Output format of the analysis result
|
||||
* @param gds_name GDS file name
|
||||
* @return 0 if successful
|
||||
*/
|
||||
int command_line_analyze_lib(const char *format, const char *gds_name);
|
||||
|
||||
#endif /* _COMMAND_LINE_H_ */
|
||||
|
||||
/** @} */
|
||||
|
78
include/gds-render/gds-utils/gds-statistics.h
Normal file
78
include/gds-render/gds-utils/gds-statistics.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* GDSII-Converter
|
||||
* Copyright (C) 2018 Mario Hüttel <mario.huettel@gmx.net>
|
||||
*
|
||||
* This file is part of GDSII-Converter.
|
||||
*
|
||||
* GDSII-Converter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* GDSII-Converter is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file gds-parser.h
|
||||
* @brief Header file for the GDS statistics
|
||||
* @author Mario Hüttel <mario.huettel@gmx.net>
|
||||
*/
|
||||
|
||||
#ifndef _GDS_STATISTICS_H_
|
||||
#define _GDS_STATISTICS_H_
|
||||
|
||||
/**
|
||||
* @addtogroup GDS-Utilities
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <gds-render/gds-utils/gds-types.h>
|
||||
|
||||
struct gds_cell_statistics {
|
||||
size_t gfx_count;
|
||||
size_t vertex_count;
|
||||
size_t reference_count;
|
||||
const struct gds_cell *cell;
|
||||
};
|
||||
|
||||
struct gds_lib_statistics {
|
||||
size_t gfx_count;
|
||||
size_t vertex_count;
|
||||
size_t reference_count;
|
||||
size_t cell_count;
|
||||
GList *cell_statistics;
|
||||
const struct gds_library *library;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Calculate statistics of a single cell
|
||||
* @param[in] cell GDS cell
|
||||
* @param[out] stat Statistics output
|
||||
*/
|
||||
void gds_statistics_calc_cell(const struct gds_cell *cell,
|
||||
struct gds_cell_statistics *stat);
|
||||
|
||||
/**
|
||||
* @brief Calc statistic information for library
|
||||
* @param[in] library_list List containing all libraries
|
||||
* @param[in,out] lib_stat_list Statistic list
|
||||
*/
|
||||
void gds_statistics_calc_library(GList * library_list,
|
||||
GList ** lib_stat_list);
|
||||
|
||||
/**
|
||||
* @brief Free library statistics GList
|
||||
* @param[in,out] lib_stat_list List to free
|
||||
*/
|
||||
void gds_statistics_free_lib_stat_list(GList ** lib_stat_list);
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* _GDS_STATISTICS_H_ */
|
Reference in New Issue
Block a user