2014-07-23 22:39:29 +02:00
|
|
|
#ifndef IVL_sdf_priv_h
|
|
|
|
|
#define IVL_sdf_priv_h
|
2007-11-19 02:36:03 +01:00
|
|
|
/*
|
2023-06-26 05:11:38 +02:00
|
|
|
* Copyright (c) 2007-2023 Stephen Williams (steve@icarus.com)
|
2007-11-19 02:36:03 +01:00
|
|
|
*
|
|
|
|
|
* This source code is free software; you can redistribute it
|
|
|
|
|
* and/or modify it in source code form under the terms of the GNU
|
|
|
|
|
* General Public License as published by the Free Software
|
|
|
|
|
* Foundation; either version 2 of the License, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program 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 this program; if not, write to the Free Software
|
2012-08-29 03:41:23 +02:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2007-11-19 02:36:03 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
# include <stdio.h>
|
2023-09-02 15:57:04 +02:00
|
|
|
# include <stdbool.h>
|
2007-11-19 02:36:03 +01:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Invoke the parser to parse the opened SDF file. The fd is the SDF
|
|
|
|
|
* file already opened and ready for reading. The path is the path to
|
|
|
|
|
* the file and is only used for error messages.
|
|
|
|
|
*/
|
|
|
|
|
extern void sdf_process_file(FILE*fd, const char*path);
|
|
|
|
|
|
2007-11-23 03:22:46 +01:00
|
|
|
extern int sdf_flag_warning;
|
|
|
|
|
extern int sdf_flag_inform;
|
2007-11-21 07:20:22 +01:00
|
|
|
|
2010-03-18 02:48:11 +01:00
|
|
|
extern int sdf_min_typ_max;
|
|
|
|
|
|
2007-11-21 07:20:22 +01:00
|
|
|
/* ****
|
|
|
|
|
* These functions are called by the parser to process the SDF file as
|
|
|
|
|
* it is parsed.
|
|
|
|
|
*/
|
2007-11-23 02:34:51 +01:00
|
|
|
|
2009-02-10 04:21:50 +01:00
|
|
|
struct sdf_delay_s {
|
|
|
|
|
int defined;
|
|
|
|
|
double value;
|
|
|
|
|
};
|
|
|
|
|
|
2007-11-23 02:34:51 +01:00
|
|
|
struct sdf_delval_list_s {
|
|
|
|
|
int count;
|
2009-02-10 04:21:50 +01:00
|
|
|
struct sdf_delay_s val[12];
|
2007-11-23 02:34:51 +01:00
|
|
|
};
|
|
|
|
|
|
2023-07-13 12:32:49 +02:00
|
|
|
struct port_with_edge_s {
|
|
|
|
|
int vpi_edge;
|
|
|
|
|
char*string_val;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct interconnect_port_s {
|
|
|
|
|
char* name;
|
2023-09-02 15:57:04 +02:00
|
|
|
bool has_index;
|
|
|
|
|
int index; // invalid if has_index is false
|
2023-07-13 12:32:49 +02:00
|
|
|
};
|
|
|
|
|
|
2023-06-26 05:11:38 +02:00
|
|
|
extern void sdf_select_instance(const char*celltype, const char*inst,
|
|
|
|
|
const int sdf_lineno);
|
2023-08-17 16:09:20 +02:00
|
|
|
|
2007-12-14 05:42:06 +01:00
|
|
|
extern void sdf_iopath_delays(int vpi_edge, const char*src, const char*dst,
|
2023-06-26 05:11:38 +02:00
|
|
|
const struct sdf_delval_list_s*delval,
|
|
|
|
|
const int sdf_lineno);
|
2007-11-21 07:20:22 +01:00
|
|
|
|
2023-08-17 16:09:20 +02:00
|
|
|
extern void sdf_interconnect_delays(struct interconnect_port_s port1,
|
|
|
|
|
struct interconnect_port_s port2,
|
|
|
|
|
const struct sdf_delval_list_s*delval_list,
|
|
|
|
|
const int sdf_lineno);
|
2023-07-19 15:02:20 +02:00
|
|
|
|
2014-07-23 22:39:29 +02:00
|
|
|
#endif /* IVL_sdf_priv_h */
|
2023-07-19 15:02:20 +02:00
|
|
|
|