OSDN Git Service

2002-05-30 Frank Ch. Eigler <fche@redhat.com>
authorfche <fche>
Thu, 30 May 2002 15:23:58 +0000 (15:23 +0000)
committerfche <fche>
Thu, 30 May 2002 15:23:58 +0000 (15:23 +0000)
* compConfig.cxx (stop): Store incoming code in new "stop-code"
attribute.
* sid-control-cfgroot.xml: Document this.
* sid-control-cfgroot.txt: Regenerated.

sid/component/cfgroot/ChangeLog
sid/component/cfgroot/compConfig.cxx
sid/component/cfgroot/sid-control-cfgroot.txt
sid/component/cfgroot/sid-control-cfgroot.xml

index 5ec1d47..4bef1cf 100644 (file)
@@ -1,3 +1,10 @@
+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.
index fe95116..e49abf0 100644 (file)
@@ -1,7 +1,7 @@
 // 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.
 
@@ -94,6 +94,7 @@ public:
 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
 
@@ -556,6 +557,7 @@ cfgroot_component::configure_line(const std::string& line)
 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),
@@ -599,6 +601,7 @@ cfgroot_component::cfgroot_component():
 
   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");
@@ -661,9 +664,10 @@ cfgroot_component::~cfgroot_component() throw()
 
 
 void
-cfgroot_component::stop(host_int_4)
+cfgroot_component::stop (host_int_4 code)
 {
   this->running = false;
+  this->stop_code = code;
 }
 
 
@@ -695,6 +699,7 @@ cfgroot_component::run(host_int_4)
       // 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))
        {
index 87f3031..29ef003 100644 (file)
@@ -234,9 +234,11 @@ Functionality:
    |               | 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.           |
    +-------------------------------------------------+
 
    +-------------------------------------------------+
@@ -308,6 +310,8 @@ Component Reference:
    |-------------------+--------+------+-------+--------------||
    |activity-count     |register|-     |-      |main loop     ||
    |-------------------+--------+------+-------+--------------||
+   |stop-code          |register|-     |-      |main loop     ||
+   |-------------------+--------+------+-------+--------------||
    |perform-activity   |pin     |-     |-      |main loop     ||
    |-------------------+--------+------+-------+--------------||
    |stop!              |pin     |-     |-      |main loop     ||
index 6dfcf23..b3d48d3 100644 (file)
@@ -23,6 +23,7 @@
     <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" />
@@ -270,8 +271,9 @@ rel-name ::= string
       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"/>