Add ivl_event_scope, and better document ivl_event_X methods.
This commit is contained in:
parent
59566158c4
commit
5eb25e44e1
62
ivl_target.h
62
ivl_target.h
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: ivl_target.h,v 1.128 2004/12/15 17:10:40 steve Exp $"
|
||||
#ident "$Id: ivl_target.h,v 1.129 2004/12/18 18:56:18 steve Exp $"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -425,17 +425,35 @@ extern unsigned ivl_const_width(ivl_net_const_t net);
|
|||
* Events are a unification of named events and implicit events
|
||||
* generated by the @ statements.
|
||||
*
|
||||
* FUNCTION SUMMARY
|
||||
*
|
||||
* ivl_event_name (Obsolete)
|
||||
* ivl_event_basename
|
||||
* Return the name of the event. The basename is the name within
|
||||
* the scope, as declared by the user.
|
||||
* the scope, as declared by the user or generated by elaboration.
|
||||
*
|
||||
* ivl_event_edge
|
||||
* Return the edge type for the event. If this is a named event
|
||||
* that has no network input, then the edge is IVL_EDGE_NONE.
|
||||
* ivl_event_scope
|
||||
* All events exist within a scope.
|
||||
*
|
||||
* SEMANTICS NOTES
|
||||
*
|
||||
* Named events (i.e. event objects declared by the Verilog
|
||||
* declaration "event foo") are recognized by the fact that they have
|
||||
* no edge sources. The name of the event as given in the Verilog
|
||||
* source is available from the ivl_event_basename function.
|
||||
*
|
||||
* Named events are referenced in trigger statements.
|
||||
*
|
||||
* Edge events are created implicitly by the @(...) Verilog syntax to
|
||||
* watch for the correct type of edge for the functor being
|
||||
* watched. The nodes to watch are collected into groups based on the
|
||||
* type of edge to be watched for on that node. For example, nodes to
|
||||
* be watched for positive edges are accessed via the ivl_event_npos
|
||||
* and ivl_event_pos functions.
|
||||
*/
|
||||
extern const char* ivl_event_name(ivl_event_t net);
|
||||
extern const char* ivl_event_basename(ivl_event_t net);
|
||||
extern ivl_scope_t ivl_event_scope(ivl_event_t net);
|
||||
|
||||
extern unsigned ivl_event_nany(ivl_event_t net);
|
||||
extern ivl_nexus_t ivl_event_any(ivl_event_t net, unsigned idx);
|
||||
|
|
@ -1194,6 +1212,11 @@ extern ivl_statement_type_t ivl_statement_type(ivl_statement_t net);
|
|||
* this. The code generator may need to know this in order to
|
||||
* handle disable statements.
|
||||
*
|
||||
* ivl_stmt_events
|
||||
* ivl_stmt_nevent
|
||||
* Statements that have event arguments (TRIGGER and WAIT) make
|
||||
* those event objects available through these methods.
|
||||
*
|
||||
* ivl_stmt_lval
|
||||
* ivl_stmt_lvals
|
||||
* Return the number of l-values for an assignment statement, or
|
||||
|
|
@ -1206,7 +1229,13 @@ extern ivl_statement_type_t ivl_statement_type(ivl_statement_t net);
|
|||
* that is to be calculated and assigned to the l-value in all the
|
||||
* assignment statements.
|
||||
*
|
||||
* SOME INTERESTING SPECIAL CASES:
|
||||
* ivl_stmt_sub_stmt
|
||||
* Some statements contain a single, subordinate statement. An
|
||||
* example is the IVL_ST_WAIT, which contains the statement to be
|
||||
* executed after the wait completes. This method retrieves that
|
||||
* sub-statement.
|
||||
*
|
||||
* SEMANTIC NOTES:
|
||||
*
|
||||
* - Assignments: IVL_ST_ASSIGN, IVL_ST_ASSIGN_NB, IVL_CASSIGN, IVL_ST_FORCE
|
||||
*
|
||||
|
|
@ -1232,6 +1261,24 @@ extern ivl_statement_type_t ivl_statement_type(ivl_statement_t net);
|
|||
* - IVL_ST_FORCE
|
||||
* This is very much like IVL_ST_CASSIGN, but adds that l-values can
|
||||
* include nets (tri, wire, etc).
|
||||
*
|
||||
* - IVL_ST_TRIGGER
|
||||
* This represents the "-> name" statement that sends a trigger to a
|
||||
* named event. The ivl_stmt_nevent function should always return 1,
|
||||
* and the ivl_stmt_events(net,0) function returns the target event,
|
||||
* as an ivl_event_t. The only behavior of this statement is to send a
|
||||
* "trigger" to the target event.
|
||||
*
|
||||
* - IVL_ST_WAIT
|
||||
* This is the edge sensitive wait (for event) statement. The
|
||||
* statement contains an array of events that are to be tested, and a
|
||||
* single statement that is to be executed when any of the array of
|
||||
* events triggers.
|
||||
*
|
||||
* the ivl_stmt_events function accesses the array of events to wait
|
||||
* for, and the ivl_stmt_sub_stmt function gets the sub-statement,
|
||||
* which may be null, that is to be executed when an event
|
||||
* triggers. The statement waits even if the sub-statement is nul.
|
||||
*/
|
||||
|
||||
/* IVL_ST_BLOCK, IVL_ST_FORK */
|
||||
|
|
@ -1324,6 +1371,9 @@ _END_DECL
|
|||
|
||||
/*
|
||||
* $Log: ivl_target.h,v $
|
||||
* Revision 1.129 2004/12/18 18:56:18 steve
|
||||
* Add ivl_event_scope, and better document ivl_event_X methods.
|
||||
*
|
||||
* Revision 1.128 2004/12/15 17:10:40 steve
|
||||
* Fixup force statement elaboration.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: t-dll-api.cc,v 1.110 2004/12/15 17:10:40 steve Exp $"
|
||||
#ident "$Id: t-dll-api.cc,v 1.111 2004/12/18 18:56:18 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -176,6 +176,10 @@ extern "C" const char* ivl_event_basename(ivl_event_t net)
|
|||
return net->name;
|
||||
}
|
||||
|
||||
extern "C" ivl_scope_t ivl_event_scope(ivl_event_t net)
|
||||
{
|
||||
return net->scope;
|
||||
}
|
||||
|
||||
extern "C" unsigned ivl_event_nany(ivl_event_t net)
|
||||
{
|
||||
|
|
@ -1942,6 +1946,9 @@ extern "C" ivl_variable_type_t ivl_variable_type(ivl_variable_t net)
|
|||
|
||||
/*
|
||||
* $Log: t-dll-api.cc,v $
|
||||
* Revision 1.111 2004/12/18 18:56:18 steve
|
||||
* Add ivl_event_scope, and better document ivl_event_X methods.
|
||||
*
|
||||
* Revision 1.110 2004/12/15 17:10:40 steve
|
||||
* Fixup force statement elaboration.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue