Obsolete find_symbol and find_event from the Design class.
This commit is contained in:
parent
693794552c
commit
1f0c274e82
57
elaborate.cc
57
elaborate.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: elaborate.cc,v 1.288 2003/09/13 01:01:51 steve Exp $"
|
||||
#ident "$Id: elaborate.cc,v 1.289 2003/09/20 01:05:35 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -1811,22 +1811,6 @@ NetProc* PEventStatement::elaborate_st(Design*des, NetScope*scope,
|
|||
{
|
||||
assert(scope);
|
||||
|
||||
|
||||
/* Handle the special case of an event name as an identifier
|
||||
in an expression. Make a named event reference. */
|
||||
|
||||
if (expr_.count() == 1) {
|
||||
assert(expr_[0]->expr());
|
||||
PEIdent*id = dynamic_cast<PEIdent*>(expr_[0]->expr());
|
||||
NetEvent*ev;
|
||||
if (id && (ev = des->find_event(scope, id->path()))) {
|
||||
NetEvWait*pr = new NetEvWait(enet);
|
||||
pr->add_event(ev);
|
||||
pr->set_line(*this);
|
||||
return pr;
|
||||
}
|
||||
}
|
||||
|
||||
/* Create a single NetEvent and NetEvWait. Then, create a
|
||||
NetEvProbe for each conjunctive event in the event
|
||||
list. The NetEvProbe objects all refer back to the NetEvent
|
||||
|
|
@ -1879,13 +1863,22 @@ NetProc* PEventStatement::elaborate_st(Design*des, NetScope*scope,
|
|||
skip the rest of the expression handling. */
|
||||
|
||||
if (PEIdent*id = dynamic_cast<PEIdent*>(expr_[idx]->expr())) {
|
||||
NetEvent*tmp = des->find_event(scope, id->path());
|
||||
if (tmp) {
|
||||
wa->add_event(tmp);
|
||||
NetNet* sig = 0;
|
||||
NetMemory* mem = 0;
|
||||
NetVariable* var = 0;
|
||||
const NetExpr*par = 0;
|
||||
NetEvent* eve = 0;
|
||||
|
||||
NetScope*found_in = symbol_search(des, scope, id->path(),
|
||||
sig, mem, var, par, eve);
|
||||
|
||||
if (found_in && eve) {
|
||||
wa->add_event(eve);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* So now we have a normal event expression. Elaborate
|
||||
the sub-expression as a net and decide how to handle
|
||||
the edge. */
|
||||
|
|
@ -2361,15 +2354,30 @@ NetProc* PTrigger::elaborate(Design*des, NetScope*scope) const
|
|||
{
|
||||
assert(scope);
|
||||
|
||||
NetEvent*ev = des->find_event(scope, event_);
|
||||
if (ev == 0) {
|
||||
NetNet* sig = 0;
|
||||
NetMemory* mem = 0;
|
||||
NetVariable* var = 0;
|
||||
const NetExpr*par = 0;
|
||||
NetEvent* eve = 0;
|
||||
|
||||
NetScope*found_in = symbol_search(des, scope, event_,
|
||||
sig, mem, var, par, eve);
|
||||
|
||||
if (found_in == 0) {
|
||||
cerr << get_line() << ": error: event <" << event_ << ">"
|
||||
<< " not found." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
NetEvTrig*trig = new NetEvTrig(ev);
|
||||
if (eve == 0) {
|
||||
cerr << get_line() << ": error: <" << event_ << ">"
|
||||
<< " is not a named event." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
NetEvTrig*trig = new NetEvTrig(eve);
|
||||
trig->set_line(*this);
|
||||
return trig;
|
||||
}
|
||||
|
|
@ -2615,6 +2623,9 @@ Design* elaborate(list<const char*>roots)
|
|||
|
||||
/*
|
||||
* $Log: elaborate.cc,v $
|
||||
* Revision 1.289 2003/09/20 01:05:35 steve
|
||||
* Obsolete find_symbol and find_event from the Design class.
|
||||
*
|
||||
* Revision 1.288 2003/09/13 01:01:51 steve
|
||||
* Spelling fixes.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: net_design.cc,v 1.40 2003/09/19 03:50:12 steve Exp $"
|
||||
#ident "$Id: net_design.cc,v 1.41 2003/09/20 01:05:36 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -540,29 +540,6 @@ NetScope* Design::find_task(const hname_t&key)
|
|||
return 0;
|
||||
}
|
||||
|
||||
NetEvent* Design::find_event(NetScope*scope, const hname_t&p)
|
||||
{
|
||||
hname_t path = p;
|
||||
assert(scope);
|
||||
|
||||
char*key = path.remove_tail_name();
|
||||
if (path.peek_name(0))
|
||||
scope = find_scope(scope, path);
|
||||
|
||||
while (scope) {
|
||||
if (NetEvent*ev = scope->find_event(key)) {
|
||||
delete key;
|
||||
return ev;
|
||||
}
|
||||
|
||||
if (scope->type() == NetScope::MODULE)
|
||||
break;
|
||||
scope = scope->parent();
|
||||
}
|
||||
|
||||
delete key;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void Design::add_node(NetNode*net)
|
||||
|
|
@ -640,6 +617,9 @@ void Design::delete_process(NetProcTop*top)
|
|||
|
||||
/*
|
||||
* $Log: net_design.cc,v $
|
||||
* Revision 1.41 2003/09/20 01:05:36 steve
|
||||
* Obsolete find_symbol and find_event from the Design class.
|
||||
*
|
||||
* Revision 1.40 2003/09/19 03:50:12 steve
|
||||
* Remove find_memory method from Design class.
|
||||
*
|
||||
|
|
|
|||
15
netlist.h
15
netlist.h
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: netlist.h,v 1.301 2003/09/19 03:50:12 steve Exp $"
|
||||
#ident "$Id: netlist.h,v 1.302 2003/09/20 01:05:36 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -1747,7 +1747,7 @@ class NetDisable : public NetProc {
|
|||
* The NetEvWait class represents a thread wait for an event. When
|
||||
* this statement is executed, it starts waiting on the
|
||||
* event. Conceptually, it puts itself on the event list for the
|
||||
* referenced event. When the event is triggered, the wit ends its
|
||||
* referenced event. When the event is triggered, the wait ends its
|
||||
* block and starts the associated statement.
|
||||
*
|
||||
* The NetEvTrig class represents trigger statements. Executing this
|
||||
|
|
@ -3214,11 +3214,6 @@ class Design {
|
|||
|
||||
NetNet*find_signal(NetScope*scope, hname_t path);
|
||||
|
||||
/* This is a more general lookup that finds the named signal
|
||||
or memory, whichever is first in the search path. */
|
||||
void find_symbol(NetScope*,const string&key,
|
||||
NetNet*&sig, NetMemory*&mem);
|
||||
|
||||
// Functions
|
||||
NetFuncDef* find_function(NetScope*scope, const hname_t&key);
|
||||
NetFuncDef* find_function(const hname_t&path);
|
||||
|
|
@ -3227,9 +3222,6 @@ class Design {
|
|||
NetScope* find_task(NetScope*scope, const hname_t&name);
|
||||
NetScope* find_task(const hname_t&key);
|
||||
|
||||
// Events
|
||||
NetEvent* find_event(NetScope*scope, const hname_t&path);
|
||||
|
||||
// NODES
|
||||
void add_node(NetNode*);
|
||||
void del_node(NetNode*);
|
||||
|
|
@ -3316,6 +3308,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
|
|||
|
||||
/*
|
||||
* $Log: netlist.h,v $
|
||||
* Revision 1.302 2003/09/20 01:05:36 steve
|
||||
* Obsolete find_symbol and find_event from the Design class.
|
||||
*
|
||||
* Revision 1.301 2003/09/19 03:50:12 steve
|
||||
* Remove find_memory method from Design class.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue