+2002-05-30 Frank Ch. Eigler <fche@redhat.com>
+
+ * compConfig.cxx (stop): Store incoming code in new "stop-code"
+ attribute.
+ * sid-control-cfgroot.xml: Document this.
+ * sid-control-cfgroot.txt: Regenerated.
+
2001-08-27 Jeff Johnston <jjohnstn@redhat.com>
* libltdl/ltdl.c (lt_dlinit): Initialize loaders to 0.
// compConfig.cxx - The cfgroot component: configuration parsing, root
// of component creation and management. -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001 Red Hat.
+// Copyright (C) 1999, 2000, 2001, 2002 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
protected:
host_int_8 activity_count;
bool running;
+ host_int_4 stop_code;
void run (host_int_4); // run top-level simulation loop
void stop (host_int_4); // stop top-level simulation loop
cfgroot_component::cfgroot_component():
recursion_limited ("running", 1),
running (false),
+ stop_code (0),
config_file ("<none>"),
line_num(1),
run_pin(this, & cfgroot_component::run),
add_attribute_ro ("running", & this->running, "register");
add_attribute_ro ("activity-count", & this->activity_count, "register");
+ add_attribute_ro ("stop-code", & this->stop_code, "register");
add_pin("stop!", & this->stop_pin);
add_attribute("stop!", & this->stop_pin, "pin");
void
-cfgroot_component::stop(host_int_4)
+cfgroot_component::stop (host_int_4 code)
{
this->running = false;
+ this->stop_code = code;
}
// Set this flag first, so that if someone during
// starting_pin.drive() clears it, it has effect.
this->running = true;
+ this->stop_code = 0;
this->starting_pin.drive (1);
while (LIKELY(this->running))
{
| | during the initial starting |
| | signal, in which case this |
| | inner loop will not be entered |
- | | at all.) After the inner loop |
- | | exits, the stopping output pin |
- | | is driven. |
+ | | at all.) The value driven on |
+ | | the stop! is stored in the |
+ | | stop-code attribute. After the |
+ | | inner loop exits, the stopping |
+ | | output pin is driven. |
+-------------------------------------------------+
+-------------------------------------------------+
|-------------------+--------+------+-------+--------------||
|activity-count |register|- |- |main loop ||
|-------------------+--------+------+-------+--------------||
+ |stop-code |register|- |- |main loop ||
+ |-------------------+--------+------+-------+--------------||
|perform-activity |pin |- |- |main loop ||
|-------------------+--------+------+-------+--------------||
|stop! |pin |- |- |main loop ||
<defattribute name="starting" category="pin" behaviors="main loop" />
<defattribute name="running" category="register" default="boolean" behaviors="main loop" />
<defattribute name="activity-count" category="register" default="number" behaviors="main loop" />
+ <defattribute name="stop-code" category="register" default="number" behaviors="main loop" />
<defattribute name="perform-activity" category="pin" behaviors="main loop" />
<defattribute name="stop!" category="pin" behaviors="main loop" />
<defattribute name="stopping" category="pin" behaviors="main loop" />
driven. This loop runs until the <pin>stop!</pin> input pin is
driven. (This could happen during the initial
<pin>starting</pin> signal, in which case this inner loop will
- not be entered at all.) After the inner loop exits, the
- <pin>stopping</pin> output pin is driven.
+ not be entered at all.) The value driven on the <pin>stop!</pin>
+ is stored in the <attribute>stop-code</attribute> attribute.
+ After the inner loop exits, the <pin>stopping</pin> output pin is driven.
</behavior>
<convention name="supervisory" supported="true"/>