Handle both asynchronous set and reset.
This commit is contained in:
parent
b997de63a5
commit
9468f3d06f
28
synth2.cc
28
synth2.cc
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: synth2.cc,v 1.39.2.9 2005/12/14 00:54:30 steve Exp $"
|
#ident "$Id: synth2.cc,v 1.39.2.10 2005/12/14 01:53:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -802,7 +802,6 @@ bool NetCondit::synth_sync(Design*des, NetScope*scope, NetFF*ff,
|
||||||
NetNet*nex_map, NetNet*nex_out,
|
NetNet*nex_map, NetNet*nex_out,
|
||||||
const svector<NetEvProbe*>&events_in)
|
const svector<NetEvProbe*>&events_in)
|
||||||
{
|
{
|
||||||
DEBUG_SYNTH2_ENTRY("NetCondit")
|
|
||||||
/* First try to turn the condition expression into an
|
/* First try to turn the condition expression into an
|
||||||
asynchronous set/reset. If the condition expression has
|
asynchronous set/reset. If the condition expression has
|
||||||
inputs that are included in the sensitivity list, then it
|
inputs that are included in the sensitivity list, then it
|
||||||
|
|
@ -892,12 +891,22 @@ bool NetCondit::synth_sync(Design*des, NetScope*scope, NetFF*ff,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(events_in.count() == 1);
|
|
||||||
assert(else_ != 0);
|
assert(else_ != 0);
|
||||||
flag = else_->synth_sync(des, scope, ff, nex_map,
|
|
||||||
nex_out, svector<NetEvProbe*>(0))
|
/* Create a new NetEvProbe list that does not include
|
||||||
&& flag;
|
the current probe that we've absorbed into this
|
||||||
DEBUG_SYNTH2_EXIT("NetCondit",flag)
|
input. */
|
||||||
|
assert(events_in.count() >= 1);
|
||||||
|
svector<NetEvProbe*> events_tmp (events_in.count() - 1);
|
||||||
|
unsigned count_events = 0;
|
||||||
|
for (unsigned tmp = 0 ; tmp < events_in.count() ; tmp += 1) {
|
||||||
|
if (tmp == idx) continue;
|
||||||
|
events_tmp[count_events++] = events_in[tmp];
|
||||||
|
}
|
||||||
|
|
||||||
|
flag = flag && else_->synth_sync(des, scope, ff, nex_map,
|
||||||
|
nex_out, events_tmp);
|
||||||
|
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -963,7 +972,6 @@ bool NetCondit::synth_sync(Design*des, NetScope*scope, NetFF*ff,
|
||||||
flag = else_->synth_sync(des, scope, ff, nex_map,
|
flag = else_->synth_sync(des, scope, ff, nex_map,
|
||||||
nex_out, svector<NetEvProbe*>(0))
|
nex_out, svector<NetEvProbe*>(0))
|
||||||
&& flag;
|
&& flag;
|
||||||
DEBUG_SYNTH2_EXIT("NetCondit",flag)
|
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1034,7 +1042,6 @@ bool NetCondit::synth_sync(Design*des, NetScope*scope, NetFF*ff,
|
||||||
|
|
||||||
bool flag = if_->synth_sync(des, scope, ff, nex_map, nex_out, events_in);
|
bool flag = if_->synth_sync(des, scope, ff, nex_map, nex_out, events_in);
|
||||||
|
|
||||||
DEBUG_SYNTH2_EXIT("NetCondit",flag)
|
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1231,6 +1238,9 @@ void synth2(Design*des)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: synth2.cc,v $
|
* $Log: synth2.cc,v $
|
||||||
|
* Revision 1.39.2.10 2005/12/14 01:53:39 steve
|
||||||
|
* Handle both asynchronous set and reset.
|
||||||
|
*
|
||||||
* Revision 1.39.2.9 2005/12/14 00:54:30 steve
|
* Revision 1.39.2.9 2005/12/14 00:54:30 steve
|
||||||
* Account for sync vs async muxes.
|
* Account for sync vs async muxes.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue