Index: sid/component/sched/compSched.cxx =================================================================== RCS file: /cvs/src/src/sid/component/sched/compSched.cxx,v retrieving revision 1.9 diff -c -p -r1.9 compSched.cxx *** sid/component/sched/compSched.cxx 6 Feb 2003 20:29:20 -0000 1.9 --- sid/component/sched/compSched.cxx 29 Aug 2003 16:02:54 -0000 *************** operator << (ostream& o, const scheduler *** 1215,1224 **** --- 1215,1226 ---- o << "scheduler-state " << it.enable_threshold << " " << it.enable_p << " " + << it.active_p << " " << it.yield_host_time_threshold << " " << it.yield_host_time_p << " " << it.sched.step_cycle_limit << " " // this is a component attribute << it.advance_count << " " + << it.active_pin << " " << it.yield_pin << " " << it.advance_pin << endl; *************** operator >> (istream& i, scheduler_compo *** 1260,1269 **** --- 1262,1273 ---- { i >> it.enable_threshold >> it.enable_p + >> it.active_p >> it.yield_host_time_threshold >> it.yield_host_time_p >> it.sched.step_cycle_limit >> it.advance_count + >> it.active_pin >> it.yield_pin >> it.advance_pin; *************** class scheduler_component: public schedu *** 1333,1344 **** --- 1337,1350 ---- int enable_p; int yield_host_time_threshold; int yield_host_time_p; + bool active_p; host_int_8 advance_count; callback_pin advance_pin; callback_pin time_query_pin; callback_pin yield_pin; output_pin time_low_pin; output_pin time_high_pin; + output_pin active_pin; public: *************** protected: *** 1392,1400 **** --- 1398,1422 ---- << " yield_host_time_threshold==" << this->yield_host_time_threshold << endl; #endif + // Drive the active pin if the threshold has been crossed. + if (UNLIKELY(! this->active_p)) + { + this->active_pin.drive (1); + this->active_p = true; + } + this->advance_count ++; this->sched.advance (this->yield_host_time_p >= this->yield_host_time_threshold); } + else + { + // Drive the active pin if the threshold has been crossed. + if (UNLIKELY(this->active_p)) + { + this->active_pin.drive (0); + this->active_p = false; + } + } } *************** public: *** 1431,1436 **** --- 1453,1459 ---- clients(0), num_clients(0), enable_threshold(1), + active_p (false), enable_p(1), yield_host_time_threshold(1), yield_host_time_p(0), *************** scheduler_component::schedule *** 1457,1462 **** --- 1480,1486 ---- add_pin ("time-high", & this->time_high_pin); add_pin ("time-low", & this->time_low_pin); add_pin ("yield", & this->yield_pin); + add_pin ("active", & this->active_pin); add_attribute ("yield", & this->yield_pin, "pin"); add_attribute ("enable-threshold", & this->enable_threshold, "setting"); add_attribute ("enabled?", & this->enable_p, "setting"); Index: sid/component/sched/sid-sched.txt =================================================================== RCS file: /cvs/src/src/sid/component/sched/sid-sched.txt,v retrieving revision 1.5 diff -c -p -r1.5 sid-sched.txt *** sid/component/sched/sid-sched.txt 8 Jan 2003 03:42:16 -0000 1.5 --- sid/component/sched/sid-sched.txt 29 Aug 2003 16:02:56 -0000 *************** Functionality: *** 148,154 **** | | driving the N-event output pins | | | with some value. A counter | | | accessed by the advance-count | ! | | attribute is incremented. | | | | | | Whether any particular N-event | | | pin is driven depends on the | --- 148,167 ---- | | driving the N-event output pins | | | with some value. A counter | | | accessed by the advance-count | ! | | attribute is incremented. If | ! | | the attribute enabled? has been | ! | | changed from a value below | ! | | enable-threshold to a value | ! | | greater than or equal to | ! | | enable-threshold, then the pin | ! | | active will be driven with the | ! | | value 1. If the attribute | ! | | enabled? has been changed from | ! | | a value grater than or equal to | ! | | enable-threshold to a value | ! | | less than enable-threshold, | ! | | then the pin active will be | ! | | driven with the value 0. | | | | | | Whether any particular N-event | | | pin is driven depends on the | *************** Component Reference: *** 245,250 **** --- 258,265 ---- |----------+---------+---------------+------------| |yield |in |any |advancing | |----------+---------+---------------+------------| + |active |out |boolean |advancing | + |----------+---------+---------------+------------| |N-event |out |no value |advancing | |----------+---------+---------------+------------| |N-control |in |coded value |subscription| *************** Component Reference: *** 288,296 **** |-------------------------+--------+--------+----------------+-------------|| |yield |pin |- |- |advancing || |-------------------------+--------+--------+----------------+-------------|| ! |enable-theshold |setting |numeric |'1' |advancing || |-------------------------+--------+--------+----------------+-------------|| ! |enabled? |setting |numeric |enable-threshold|advancing || |-------------------------+--------+--------+----------------+-------------|| |yield-host-time-threshold|setting |numeric |'1' |timing || |-------------------------+--------+--------+----------------+-------------|| --- 303,311 ---- |-------------------------+--------+--------+----------------+-------------|| |yield |pin |- |- |advancing || |-------------------------+--------+--------+----------------+-------------|| ! |enabled? |setting |numeric |'1' |advancing || |-------------------------+--------+--------+----------------+-------------|| ! |enable-threshold |setting |numeric |'1' |advancing || |-------------------------+--------+--------+----------------+-------------|| |yield-host-time-threshold|setting |numeric |'1' |timing || |-------------------------+--------+--------+----------------+-------------|| Index: sid/component/sched/sid-sched.xml =================================================================== RCS file: /cvs/src/src/sid/component/sched/sid-sched.xml,v retrieving revision 1.4 diff -c -p -r1.4 sid-sched.xml *** sid/component/sched/sid-sched.xml 8 Jan 2003 03:42:16 -0000 1.4 --- sid/component/sched/sid-sched.xml 29 Aug 2003 16:02:56 -0000 *************** *** 8,13 **** --- 8,14 ---- + *************** *** 26,33 **** ! ! --- 27,34 ---- ! ! *************** *** 136,149 ****

When you have disabled the scheduler by setting the ! enabled? attribute to a value less than enable-threshold, advancing as described below, does not occur.

Whenever the advance input pin is driven, the scheduler may dispatch one or more signals by driving the N-event output pins with some value. A counter accessed by the advance-count ! attribute is incremented.

Whether any particular N-event pin is driven depends on --- 137,157 ----

When you have disabled the scheduler by setting the ! enabled? attribute to a value less than enable-threshold, advancing as described below, does not occur.

Whenever the advance input pin is driven, the scheduler may dispatch one or more signals by driving the N-event output pins with some value. A counter accessed by the advance-count ! attribute is incremented. If the attribute enabled? has ! been changed from a value below enable-threshold to a value ! greater than or equal to enable-threshold, then the pin ! active will be driven with the value 1. If the attribute ! enabled? has been changed from a value grater than or equal to ! enable-threshold to a value less than ! enable-threshold, then the pin ! active will be driven with the value 0.

Whether any particular N-event pin is driven depends on