Process delay paths in second path over signals.
This commit is contained in:
parent
34b5a31ff4
commit
21522c90bc
16
emit.cc
16
emit.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: emit.cc,v 1.87 2006/06/18 04:15:50 steve Exp $"
|
||||
#ident "$Id: emit.cc,v 1.88 2006/11/10 05:44:44 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -344,6 +344,17 @@ void NetScope::emit_scope(struct target_t*tgt) const
|
|||
tgt->signal(cur);
|
||||
cur = cur->sig_next_;
|
||||
} while (cur != signals_->sig_next_);
|
||||
|
||||
/* Run the signals again, but this time to connect the
|
||||
delay paths. This is done as a second pass because
|
||||
the paths reference other signals that may be later
|
||||
in the list. We can do it here becase delay paths are
|
||||
always connected within the scope. */
|
||||
cur = signals_->sig_next_;
|
||||
do {
|
||||
tgt->signal_paths(cur);
|
||||
cur = cur->sig_next_;
|
||||
} while (cur != signals_->sig_next_);
|
||||
}
|
||||
|
||||
if (memories_) {
|
||||
|
|
@ -529,6 +540,9 @@ int emit(const Design*des, const char*type)
|
|||
|
||||
/*
|
||||
* $Log: emit.cc,v $
|
||||
* Revision 1.88 2006/11/10 05:44:44 steve
|
||||
* Process delay paths in second path over signals.
|
||||
*
|
||||
* Revision 1.87 2006/06/18 04:15:50 steve
|
||||
* Add support for system functions in continuous assignments.
|
||||
*
|
||||
|
|
|
|||
82
t-dll.cc
82
t-dll.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: t-dll.cc,v 1.160 2006/10/15 03:25:58 steve Exp $"
|
||||
#ident "$Id: t-dll.cc,v 1.161 2006/11/10 05:44:45 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -2174,9 +2174,51 @@ void dll_target::signal(const NetNet*net)
|
|||
break;
|
||||
}
|
||||
|
||||
/* Collect the delay paths for this signal. */
|
||||
/* Initialize the path fields to be filled in later. */
|
||||
obj->npath = 0;
|
||||
if (net->delay_paths() > 0) {
|
||||
obj->path = 0;
|
||||
|
||||
obj->data_type = net->data_type();
|
||||
obj->nattr = net->attr_cnt();
|
||||
obj->attr = fill_in_attributes(net);
|
||||
|
||||
|
||||
/* Get the nexus objects for all the pins of the signal. If
|
||||
the signal has only one pin, then write the single
|
||||
ivl_nexus_t object into n.pin_. Otherwise, make an array of
|
||||
ivl_nexus_t cookies.
|
||||
|
||||
When I create an ivl_nexus_t object, store it in the
|
||||
t_cookie of the Nexus object so that I find it again when I
|
||||
next encounter the nexus. */
|
||||
|
||||
const Nexus*nex = net->pin(0).nexus();
|
||||
if (nex->t_cookie()) {
|
||||
obj->pin_ = (ivl_nexus_t)nex->t_cookie();
|
||||
nexus_sig_add(obj->pin_, obj, 0);
|
||||
|
||||
} else {
|
||||
ivl_nexus_t tmp = nexus_sig_make(obj, 0);
|
||||
tmp->name_ = strings_.add(nex->name());
|
||||
nex->t_cookie(tmp);
|
||||
obj->pin_ = tmp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool dll_target::signal_paths(const NetNet*net)
|
||||
{
|
||||
/* Nothing to do if there are no paths for this signal. */
|
||||
if (net->delay_paths() == 0)
|
||||
return true;
|
||||
|
||||
ivl_signal_t obj = find_signal(des_, net);
|
||||
assert(obj);
|
||||
|
||||
/* We cannot have already set up the paths for this signal. */
|
||||
assert(obj->npath == 0);
|
||||
assert(obj->path == 0);
|
||||
|
||||
/* Figure out how many paths there really are. */
|
||||
for (unsigned idx = 0 ; idx < net->delay_paths() ; idx += 1) {
|
||||
const NetDelaySrc*src = net->delay_path(idx);
|
||||
|
|
@ -2208,36 +2250,7 @@ void dll_target::signal(const NetNet*net)
|
|||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
obj->path = 0;
|
||||
}
|
||||
|
||||
obj->data_type = net->data_type();
|
||||
obj->nattr = net->attr_cnt();
|
||||
obj->attr = fill_in_attributes(net);
|
||||
|
||||
|
||||
/* Get the nexus objects for all the pins of the signal. If
|
||||
the signal has only one pin, then write the single
|
||||
ivl_nexus_t object into n.pin_. Otherwise, make an array of
|
||||
ivl_nexus_t cookies.
|
||||
|
||||
When I create an ivl_nexus_t object, store it in the
|
||||
t_cookie of the Nexus object so that I find it again when I
|
||||
next encounter the nexus. */
|
||||
|
||||
const Nexus*nex = net->pin(0).nexus();
|
||||
if (nex->t_cookie()) {
|
||||
obj->pin_ = (ivl_nexus_t)nex->t_cookie();
|
||||
nexus_sig_add(obj->pin_, obj, 0);
|
||||
|
||||
} else {
|
||||
ivl_nexus_t tmp = nexus_sig_make(obj, 0);
|
||||
tmp->name_ = strings_.add(nex->name());
|
||||
nex->t_cookie(tmp);
|
||||
obj->pin_ = tmp;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
extern const struct target tgt_dll = { "dll", &dll_target_obj };
|
||||
|
|
@ -2245,6 +2258,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
|
|||
|
||||
/*
|
||||
* $Log: t-dll.cc,v $
|
||||
* Revision 1.161 2006/11/10 05:44:45 steve
|
||||
* Process delay paths in second path over signals.
|
||||
*
|
||||
* Revision 1.160 2006/10/15 03:25:58 steve
|
||||
* More detailed internal error message.
|
||||
*
|
||||
|
|
|
|||
6
t-dll.h
6
t-dll.h
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: t-dll.h,v 1.133 2006/09/23 04:57:19 steve Exp $"
|
||||
#ident "$Id: t-dll.h,v 1.134 2006/11/10 05:44:45 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "target.h"
|
||||
|
|
@ -96,6 +96,7 @@ struct dll_target : public target_t, public expr_scan_t {
|
|||
bool process(const NetProcTop*);
|
||||
void scope(const NetScope*);
|
||||
void signal(const NetNet*);
|
||||
bool signal_paths(const NetNet*);
|
||||
void memory(const NetMemory*);
|
||||
|
||||
ivl_dll_t dll_;
|
||||
|
|
@ -679,6 +680,9 @@ struct ivl_statement_s {
|
|||
|
||||
/*
|
||||
* $Log: t-dll.h,v $
|
||||
* Revision 1.134 2006/11/10 05:44:45 steve
|
||||
* Process delay paths in second path over signals.
|
||||
*
|
||||
* Revision 1.133 2006/09/23 04:57:19 steve
|
||||
* Basic support for specify timing.
|
||||
*
|
||||
|
|
|
|||
10
target.cc
10
target.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: target.cc,v 1.78 2006/06/18 04:15:50 steve Exp $"
|
||||
#ident "$Id: target.cc,v 1.79 2006/11/10 05:44:45 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -41,6 +41,11 @@ void target_t::event(const NetEvent*ev)
|
|||
<< "): Unhandled event <" << ev->full_name() << ">." << endl;
|
||||
}
|
||||
|
||||
bool target_t::signal_paths(const NetNet*)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void target_t::memory(const NetMemory*)
|
||||
{
|
||||
cerr << "target (" << typeid(*this).name() << "): "
|
||||
|
|
@ -438,6 +443,9 @@ void expr_scan_t::expr_binary(const NetEBinary*ex)
|
|||
|
||||
/*
|
||||
* $Log: target.cc,v $
|
||||
* Revision 1.79 2006/11/10 05:44:45 steve
|
||||
* Process delay paths in second path over signals.
|
||||
*
|
||||
* Revision 1.78 2006/06/18 04:15:50 steve
|
||||
* Add support for system functions in continuous assignments.
|
||||
*
|
||||
|
|
|
|||
6
target.h
6
target.h
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: target.h,v 1.75 2006/06/18 04:15:50 steve Exp $"
|
||||
#ident "$Id: target.h,v 1.76 2006/11/10 05:44:45 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "netlist.h"
|
||||
|
|
@ -64,6 +64,7 @@ struct target_t {
|
|||
|
||||
/* Output a signal (called for each signal) */
|
||||
virtual void signal(const NetNet*) =0;
|
||||
virtual bool signal_paths(const NetNet*);
|
||||
|
||||
/* Output a memory (called for each memory object) */
|
||||
virtual void memory(const NetMemory*);
|
||||
|
|
@ -171,6 +172,9 @@ extern const struct target *target_table[];
|
|||
|
||||
/*
|
||||
* $Log: target.h,v $
|
||||
* Revision 1.76 2006/11/10 05:44:45 steve
|
||||
* Process delay paths in second path over signals.
|
||||
*
|
||||
* Revision 1.75 2006/06/18 04:15:50 steve
|
||||
* Add support for system functions in continuous assignments.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue