2004-12-12 19:15:06 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2004 Stephen Williams (steve@icarus.com)
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
2004-12-12 19:15:06 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
# include <ivl_target.h>
|
|
|
|
|
# include <stdio.h>
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This is the output file where the generated result should be
|
|
|
|
|
* written.
|
|
|
|
|
*/
|
|
|
|
|
extern FILE*out;
|
|
|
|
|
|
2005-01-22 02:06:55 +01:00
|
|
|
/*
|
|
|
|
|
* Keep a running count of errors that the stub detects. This will be
|
|
|
|
|
* the error count returned to the ivl_target environment.
|
|
|
|
|
*/
|
|
|
|
|
extern int stub_errors;
|
|
|
|
|
|
2008-05-24 05:53:10 +02:00
|
|
|
/*
|
|
|
|
|
* This function finds the vector width of a signal. It relies on the
|
|
|
|
|
* assumption that all the signal inputs to the nexus have the same
|
|
|
|
|
* width. The ivl_target API should assert that condition.
|
|
|
|
|
*/
|
|
|
|
|
extern unsigned width_of_nexus(ivl_nexus_t nex);
|
|
|
|
|
|
|
|
|
|
extern ivl_variable_type_t type_of_nexus(ivl_nexus_t nex);
|
|
|
|
|
|
2008-11-24 07:38:33 +01:00
|
|
|
extern ivl_discipline_t discipline_of_nexus(ivl_nexus_t nex);
|
|
|
|
|
|
2010-07-19 05:43:42 +02:00
|
|
|
/*
|
|
|
|
|
* Test that a given expression is a valid delay expression, and
|
|
|
|
|
* print an error message if not.
|
|
|
|
|
*/
|
|
|
|
|
extern void test_expr_is_delay(ivl_expr_t expr);
|
|
|
|
|
|
2012-12-01 21:03:01 +01:00
|
|
|
extern void show_class(ivl_type_t net);
|
2010-11-21 00:09:32 +01:00
|
|
|
extern void show_enumerate(ivl_enumtype_t net);
|
|
|
|
|
|
2004-12-12 19:15:06 +01:00
|
|
|
/*
|
|
|
|
|
* Show the details of the expression.
|
|
|
|
|
*/
|
|
|
|
|
extern void show_expression(ivl_expr_t net, unsigned ind);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Show the statement.
|
|
|
|
|
*/
|
|
|
|
|
extern void show_statement(ivl_statement_t net, unsigned ind);
|
|
|
|
|
|
2012-09-23 18:28:49 +02:00
|
|
|
/*
|
|
|
|
|
* Show the type of the signal, in one line.
|
|
|
|
|
*/
|
|
|
|
|
extern void show_type_of_signal(ivl_signal_t);
|
|
|
|
|
|
2008-05-24 05:53:10 +02:00
|
|
|
extern void show_switch(ivl_switch_t net);
|
|
|
|
|
|
2007-01-16 06:44:14 +01:00
|
|
|
/*
|
|
|
|
|
*/
|
|
|
|
|
extern const char*data_type_string(ivl_variable_type_t vtype);
|
2012-12-01 21:03:01 +01:00
|
|
|
|
|
|
|
|
extern void show_net_type(ivl_type_t net_type);
|