When checking for stop, remember to reschedule.
This commit is contained in:
parent
94914382c2
commit
2935e28ffb
|
|
@ -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: vthread.cc,v 1.102 2003/02/22 02:52:06 steve Exp $"
|
#ident "$Id: vthread.cc,v 1.103 2003/02/22 06:26:58 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vthread.h"
|
# include "vthread.h"
|
||||||
|
|
@ -1425,7 +1425,12 @@ bool of_JMP(vthread_t thr, vvp_code_t cp)
|
||||||
keeps going to the next instruction. However, if there was
|
keeps going to the next instruction. However, if there was
|
||||||
a $stop or vpiStop, returning false here can break the
|
a $stop or vpiStop, returning false here can break the
|
||||||
simulation out of a hung loop. */
|
simulation out of a hung loop. */
|
||||||
return ! schedule_stopped();
|
if (schedule_stopped()) {
|
||||||
|
schedule_vthread(thr, 0, false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool of_JMP0(vthread_t thr, vvp_code_t cp)
|
bool of_JMP0(vthread_t thr, vvp_code_t cp)
|
||||||
|
|
@ -1437,7 +1442,12 @@ bool of_JMP0(vthread_t thr, vvp_code_t cp)
|
||||||
keeps going to the next instruction. However, if there was
|
keeps going to the next instruction. However, if there was
|
||||||
a $stop or vpiStop, returning false here can break the
|
a $stop or vpiStop, returning false here can break the
|
||||||
simulation out of a hung loop. */
|
simulation out of a hung loop. */
|
||||||
return ! schedule_stopped();
|
if (schedule_stopped()) {
|
||||||
|
schedule_vthread(thr, 0, false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool of_JMP0XZ(vthread_t thr, vvp_code_t cp)
|
bool of_JMP0XZ(vthread_t thr, vvp_code_t cp)
|
||||||
|
|
@ -1449,7 +1459,12 @@ bool of_JMP0XZ(vthread_t thr, vvp_code_t cp)
|
||||||
keeps going to the next instruction. However, if there was
|
keeps going to the next instruction. However, if there was
|
||||||
a $stop or vpiStop, returning false here can break the
|
a $stop or vpiStop, returning false here can break the
|
||||||
simulation out of a hung loop. */
|
simulation out of a hung loop. */
|
||||||
return ! schedule_stopped();
|
if (schedule_stopped()) {
|
||||||
|
schedule_vthread(thr, 0, false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool of_JMP1(vthread_t thr, vvp_code_t cp)
|
bool of_JMP1(vthread_t thr, vvp_code_t cp)
|
||||||
|
|
@ -1461,7 +1476,12 @@ bool of_JMP1(vthread_t thr, vvp_code_t cp)
|
||||||
keeps going to the next instruction. However, if there was
|
keeps going to the next instruction. However, if there was
|
||||||
a $stop or vpiStop, returning false here can break the
|
a $stop or vpiStop, returning false here can break the
|
||||||
simulation out of a hung loop. */
|
simulation out of a hung loop. */
|
||||||
return ! schedule_stopped();
|
if (schedule_stopped()) {
|
||||||
|
schedule_vthread(thr, 0, false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2501,7 +2521,15 @@ bool of_VPI_CALL(vthread_t thr, vvp_code_t cp)
|
||||||
{
|
{
|
||||||
// printf("thread %p: %%vpi_call\n", thr);
|
// printf("thread %p: %%vpi_call\n", thr);
|
||||||
vpip_execute_vpi_call(thr, cp->handle);
|
vpip_execute_vpi_call(thr, cp->handle);
|
||||||
return (schedule_finished() || schedule_stopped())? false : true;
|
|
||||||
|
if (schedule_stopped()) {
|
||||||
|
if (! schedule_finished())
|
||||||
|
schedule_vthread(thr, 0, false);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return schedule_finished()? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2636,6 +2664,9 @@ bool of_CALL_UFUNC(vthread_t thr, vvp_code_t cp)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vthread.cc,v $
|
* $Log: vthread.cc,v $
|
||||||
|
* Revision 1.103 2003/02/22 06:26:58 steve
|
||||||
|
* When checking for stop, remember to reschedule.
|
||||||
|
*
|
||||||
* Revision 1.102 2003/02/22 02:52:06 steve
|
* Revision 1.102 2003/02/22 02:52:06 steve
|
||||||
* Check for stopped flag in certain strategic points.
|
* Check for stopped flag in certain strategic points.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue