pub(crate) struct InstructionPlan {
cycle: Cycle,
first_port: ExecPortIndex,
second_port: Option<ExecPortIndex>,
}
Expand description
Detailed execution schedule for one instruction
This is defined as either one or two micro-operations scheduled on the same cycle.
Fields§
§cycle: Cycle
The Cycle this whole instruction begins on
first_port: ExecPortIndex
First execution port, always present
second_port: Option<ExecPortIndex>
Optional second execution port ID, for two-uop instructions
Implementations§
Source§impl InstructionPlan
impl InstructionPlan
Sourcepub(crate) fn cycle_issued(&self) -> Cycle
pub(crate) fn cycle_issued(&self) -> Cycle
Get the Cycle this whole instruction begins on.
Sourcepub(crate) fn cycle_retired(&self, op: Opcode) -> Cycle
pub(crate) fn cycle_retired(&self, op: Opcode) -> Cycle
Calculate the cycle this instruction is complete by.
Sourcefn as_micro_plans(&self) -> (MicroOpPlan, Option<MicroOpPlan>)
fn as_micro_plans(&self) -> (MicroOpPlan, Option<MicroOpPlan>)
Convert this InstructionPlan
back to one or two MicroOpPlan
s.
Sourcefn from_micro_plans(
first_op: MicroOpPlan,
second_op: Option<MicroOpPlan>,
) -> Result<Self, ()>
fn from_micro_plans( first_op: MicroOpPlan, second_op: Option<MicroOpPlan>, ) -> Result<Self, ()>
Bundle two MicroOpPlan
s into an InstructionPlan
,
if they are on matching cycles.
Returns Err(())
if the combination is not possible.
Trait Implementations§
Source§impl Clone for InstructionPlan
impl Clone for InstructionPlan
Source§fn clone(&self) -> InstructionPlan
fn clone(&self) -> InstructionPlan
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InstructionPlan
impl Debug for InstructionPlan
Source§impl PartialEq for InstructionPlan
impl PartialEq for InstructionPlan
impl Copy for InstructionPlan
impl Eq for InstructionPlan
impl StructuralPartialEq for InstructionPlan
Auto Trait Implementations§
impl Freeze for InstructionPlan
impl RefUnwindSafe for InstructionPlan
impl Send for InstructionPlan
impl Sync for InstructionPlan
impl Unpin for InstructionPlan
impl UnwindSafe for InstructionPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more