#[repr(C)]pub struct CpuCols<T: Copy> {Show 23 fields
pub shard: T,
pub nonce: T,
pub clk: T,
pub clk_16bit_limb: T,
pub clk_8bit_limb: T,
pub pc: T,
pub next_pc: T,
pub instruction: InstructionCols<T>,
pub selectors: OpcodeSelectorCols<T>,
pub op_a_access: MemoryReadWriteCols<T>,
pub op_b_access: MemoryReadCols<T>,
pub op_c_access: MemoryReadCols<T>,
pub opcode_specific_columns: OpcodeSpecificCols<T>,
pub is_real: T,
pub branching: T,
pub not_branching: T,
pub mem_value_is_neg_not_x0: T,
pub mem_value_is_pos_not_x0: T,
pub unsigned_mem_val: Word<T>,
pub unsigned_mem_val_nonce: T,
pub ecall_mul_send_to_table: T,
pub ecall_range_check_operand: T,
pub is_sequential_instr: T,
}Expand description
The column layout for the CPU.
Fields§
§shard: TThe current shard.
nonce: T§clk: TThe clock cycle value. This should be within 24 bits.
clk_16bit_limb: TThe least significant 16 bit limb of clk.
clk_8bit_limb: TThe most significant 8 bit limb of clk.
pc: TThe program counter value.
next_pc: TThe expected next program counter value.
instruction: InstructionCols<T>Columns related to the instruction.
selectors: OpcodeSelectorCols<T>Selectors for the opcode.
op_a_access: MemoryReadWriteCols<T>Operand values, either from registers or immediate values.
op_b_access: MemoryReadCols<T>§op_c_access: MemoryReadCols<T>§opcode_specific_columns: OpcodeSpecificCols<T>§is_real: TSelector to label whether this row is a non padded row.
branching: TThe branching column is equal to:
is_beq & a_eq_b || is_bne & (a_lt_b | a_gt_b) || (is_blt | is_bltu) & a_lt_b || (is_bge | is_bgeu) & (a_eq_b | a_gt_b)
not_branching: TThe not branching column is equal to:
is_beq & !a_eq_b || is_bne & !(a_lt_b | a_gt_b) || (is_blt | is_bltu) & !a_lt_b || (is_bge | is_bgeu) & !(a_eq_b | a_gt_b)
mem_value_is_neg_not_x0: TFlag for load mem instructions where the value is negative and not writing to x0. More formally, it is
(is_lb | is_lh) & (most_sig_byte_decomp[7] == 1) & (not writing to x0)
mem_value_is_pos_not_x0: TFlag for load mem instructions where the value is positive and not writing to x0. More formally, it is
( ((is_lb | is_lh) & (most_sig_byte_decomp[7] == 0)) | is_lbu | is_lhu | is_lw ) & (not writing to x0)
unsigned_mem_val: Word<T>The unsigned memory value is the value after the offset logic is applied. Used for the load memory opcodes (i.e. LB, LH, LW, LBU, and LHU).
unsigned_mem_val_nonce: T§ecall_mul_send_to_table: TThe result of selectors.is_ecall * the send_to_table column for the ECALL opcode.
ecall_range_check_operand: TThe result of selectors.is_ecall * (is_halt || is_commit_deferred_proofs)
is_sequential_instr: TThis is true for all instructions that are not jumps, branches, and halt. Those instructions may move the program counter to a non sequential instruction.
Implementations§
Trait Implementations§
Source§impl<T: Copy> BorrowMut<CpuCols<T>> for [T]
impl<T: Copy> BorrowMut<CpuCols<T>> for [T]
Source§fn borrow_mut(&mut self) -> &mut CpuCols<T>
fn borrow_mut(&mut self) -> &mut CpuCols<T>
impl<T: Copy + Copy> Copy for CpuCols<T>
Auto Trait Implementations§
impl<T> Freeze for CpuCols<T>where
T: Freeze,
impl<T> RefUnwindSafe for CpuCols<T>where
T: RefUnwindSafe,
impl<T> Send for CpuCols<T>where
T: Send,
impl<T> Sync for CpuCols<T>where
T: Sync,
impl<T> Unpin for CpuCols<T>where
T: Unpin,
impl<T> UnwindSafe for CpuCols<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more