diff --git a/crates/celox-design/src/lib.rs b/crates/celox-design/src/lib.rs
index 56f9142a095..62994649eaa 100644
--- a/crates/celox-design/src/lib.rs
+++ b/crates/celox-design/src/lib.rs
@@ -880,10 +880,12 @@ pub struct RuntimeSchema {
/// Width of [`SchedulerSlots::limit`], [`SchedulerSlots::now`],
/// [`SchedulerSlots::exit_arg`], [`SchedulerSlots::count`],
-/// [`SchedulerSlots::current`], [`SchedulerSlots::levels`] and every [`SchedulerSlots::wake`] object.
+/// [`SchedulerSlots::current`], [`SchedulerSlots::levels`],
+/// [`SchedulerSlots::ready`] and every [`SchedulerSlots::wake`] object.
pub const SCHEDULER_TIME_WIDTH: usize = 64;
/// Width of [`SchedulerSlots::exit`], [`SchedulerSlots::finish`],
-/// [`SchedulerSlots::cont`] and every [`SchedulerSlots::waiting`] object.
+/// [`SchedulerSlots::cont`] and every [`SchedulerSlots::waiting`] and
+/// [`SchedulerSlots::baseline`] object.
pub const SCHEDULER_FLAG_WIDTH: usize = 8;
/// Hidden state objects through which a compiled scheduler and the runtime
@@ -911,11 +913,16 @@ pub struct SchedulerSlots {
/// The levels of the event signals at the start of the last slot, one
/// bit per event in event order.
pub levels: A,
+ /// The kernels ready to run in the current slot, one bit per kernel in
+ /// kernel order.
+ pub ready: A,
/// The time each process kernel resumes at, in kernel order, valid
/// where [`Self::waiting`] is set.
pub wake: Vec,
- /// Whether each process kernel waits for its wake time.
+ /// Whether each process kernel waits for its wake time or event.
pub waiting: Vec,
+ /// The level a kernel waiting for an event last saw its signal at.
+ pub baseline: Vec,
}
impl SchedulerSlots {
@@ -930,8 +937,10 @@ impl SchedulerSlots {
count: map(self.count),
current: map(self.current),
levels: map(self.levels),
+ ready: map(self.ready),
wake: self.wake.into_iter().map(&mut map).collect(),
- waiting: self.waiting.into_iter().map(map).collect(),
+ waiting: self.waiting.into_iter().map(&mut map).collect(),
+ baseline: self.baseline.into_iter().map(map).collect(),
}
}
@@ -947,10 +956,12 @@ impl SchedulerSlots {
&self.count,
&self.current,
&self.levels,
+ &self.ready,
]
.into_iter()
.chain(&self.wake)
.chain(&self.waiting)
+ .chain(&self.baseline)
}
}
diff --git a/crates/celox-frontend-core/src/symbolic/assembly.rs b/crates/celox-frontend-core/src/symbolic/assembly.rs
index 93bbcbc0acf..8022c93abd2 100644
--- a/crates/celox-frontend-core/src/symbolic/assembly.rs
+++ b/crates/celox-frontend-core/src/symbolic/assembly.rs
@@ -2266,12 +2266,16 @@ fn declare_scheduler_slots(
count: declare("count".into(), TIME),
current: declare("current".into(), TIME),
levels: declare("levels".into(), TIME),
+ ready: declare("ready".into(), TIME),
wake: (0..process_count)
.map(|index| declare(format!("wake[{index}]"), TIME))
.collect(),
waiting: (0..process_count)
.map(|index| declare(format!("waiting[{index}]"), FLAG))
.collect(),
+ baseline: (0..process_count)
+ .map(|index| declare(format!("baseline[{index}]"), FLAG))
+ .collect(),
})
}
diff --git a/crates/celox-runtime/src/schedule.rs b/crates/celox-runtime/src/schedule.rs
index e7d4af37815..73f9bf955f7 100644
--- a/crates/celox-runtime/src/schedule.rs
+++ b/crates/celox-runtime/src/schedule.rs
@@ -59,9 +59,18 @@ pub(crate) struct SchedulerRefs {
pub(crate) count: SignalRef,
pub(crate) current: SignalRef,
pub(crate) levels: SignalRef,
- /// The wake and waiting slots of each kernel the scheduler runs, by
- /// process index.
+ pub(crate) ready: SignalRef,
+ /// The wake and waiting slots of each kernel the scheduler runs that
+ /// only delays, by process index.
pub(crate) wake: Vec