pub enum RiscvAir<F: PrimeField32> {
Show 27 variants
Program(ProgramChip),
Cpu(CpuChip),
Add(AddSubChip),
Bitwise(BitwiseChip),
Mul(MulChip),
DivRem(DivRemChip),
Lt(LtChip),
ShiftLeft(ShiftLeft),
ShiftRight(ShiftRightChip),
ByteLookup(ByteChip<F>),
MemoryInit(MemoryChip),
MemoryFinal(MemoryChip),
ProgramMemory(MemoryProgramChip),
Sha256Extend(ShaExtendChip),
Sha256Compress(ShaCompressChip),
Ed25519Add(EdAddAssignChip<EdwardsCurve<Ed25519Parameters>>),
Ed25519Decompress(EdDecompressChip<Ed25519Parameters>),
K256Decompress(WeierstrassDecompressChip<SwCurve<Secp256k1Parameters>>),
Secp256k1Add(WeierstrassAddAssignChip<SwCurve<Secp256k1Parameters>>),
Secp256k1Double(WeierstrassDoubleAssignChip<SwCurve<Secp256k1Parameters>>),
KeccakP(KeccakPermuteChip),
Bn254Add(WeierstrassAddAssignChip<SwCurve<Bn254Parameters>>),
Bn254Double(WeierstrassDoubleAssignChip<SwCurve<Bn254Parameters>>),
Bls12381Add(WeierstrassAddAssignChip<SwCurve<Bls12381Parameters>>),
Bls12381Double(WeierstrassDoubleAssignChip<SwCurve<Bls12381Parameters>>),
Uint256Mul(Uint256MulChip),
Bls12381Decompress(WeierstrassDecompressChip<SwCurve<Bls12381Parameters>>),
}Expand description
An AIR for encoding RISC-V execution.
This enum contains all the different AIRs that are used in the Sp1 RISC-V IOP. Each variant is a different AIR that is used to encode a different part of the RISC-V execution, and the different AIR variants have a joint lookup argument.
Variants§
Program(ProgramChip)
An AIR that containts a preprocessed program table and a lookup for the instructions.
Cpu(CpuChip)
An AIR for the RISC-V CPU. Each row represents a cpu cycle.
Add(AddSubChip)
An AIR for the RISC-V Add and SUB instruction.
Bitwise(BitwiseChip)
An AIR for RISC-V Bitwise instructions.
Mul(MulChip)
An AIR for RISC-V Mul instruction.
DivRem(DivRemChip)
An AIR for RISC-V Div and Rem instructions.
Lt(LtChip)
An AIR for RISC-V Lt instruction.
ShiftLeft(ShiftLeft)
An AIR for RISC-V SLL instruction.
ShiftRight(ShiftRightChip)
An AIR for RISC-V SRL and SRA instruction.
ByteLookup(ByteChip<F>)
A lookup table for byte operations.
MemoryInit(MemoryChip)
A table for initializing the memory state.
MemoryFinal(MemoryChip)
A table for finalizing the memory state.
ProgramMemory(MemoryProgramChip)
A table for initializing the program memory.
Sha256Extend(ShaExtendChip)
A precompile for sha256 extend.
Sha256Compress(ShaCompressChip)
A precompile for sha256 compress.
Ed25519Add(EdAddAssignChip<EdwardsCurve<Ed25519Parameters>>)
A precompile for addition on the Elliptic curve ed25519.
Ed25519Decompress(EdDecompressChip<Ed25519Parameters>)
A precompile for decompressing a point on the Edwards curve ed25519.
K256Decompress(WeierstrassDecompressChip<SwCurve<Secp256k1Parameters>>)
A precompile for decompressing a point on the K256 curve.
Secp256k1Add(WeierstrassAddAssignChip<SwCurve<Secp256k1Parameters>>)
A precompile for addition on the Elliptic curve secp256k1.
Secp256k1Double(WeierstrassDoubleAssignChip<SwCurve<Secp256k1Parameters>>)
A precompile for doubling a point on the Elliptic curve secp256k1.
KeccakP(KeccakPermuteChip)
A precompile for the Keccak permutation.
Bn254Add(WeierstrassAddAssignChip<SwCurve<Bn254Parameters>>)
A precompile for addition on the Elliptic curve bn254.
Bn254Double(WeierstrassDoubleAssignChip<SwCurve<Bn254Parameters>>)
A precompile for doubling a point on the Elliptic curve bn254.
Bls12381Add(WeierstrassAddAssignChip<SwCurve<Bls12381Parameters>>)
A precompile for addition on the Elliptic curve bls12_381.
Bls12381Double(WeierstrassDoubleAssignChip<SwCurve<Bls12381Parameters>>)
A precompile for doubling a point on the Elliptic curve bls12_381.
Uint256Mul(Uint256MulChip)
A precompile for uint256 mul.
Bls12381Decompress(WeierstrassDecompressChip<SwCurve<Bls12381Parameters>>)
A precompile for decompressing a point on the BLS12-381 curve.
Implementations§
source§impl<F: PrimeField32> RiscvAir<F>
impl<F: PrimeField32> RiscvAir<F>
pub fn machine<SC: StarkGenericConfig<Val = F>>( config: SC, ) -> StarkMachine<SC, Self>
Trait Implementations§
source§impl<F: PrimeField32, AB: PairBuilder + SP1AirBuilder<F = F>> Air<AB> for RiscvAir<F>
impl<F: PrimeField32, AB: PairBuilder + SP1AirBuilder<F = F>> Air<AB> for RiscvAir<F>
source§impl<F: PrimeField32> BaseAir<F> for RiscvAir<F>
impl<F: PrimeField32> BaseAir<F> for RiscvAir<F>
fn preprocessed_trace(&self) -> Option<RowMajorMatrix<F>>
source§impl<F: PrimeField32> Hash for RiscvAir<F>
impl<F: PrimeField32> Hash for RiscvAir<F>
source§impl<F: PrimeField32> MachineAir<F> for RiscvAir<F>
impl<F: PrimeField32> MachineAir<F> for RiscvAir<F>
§type Record = ExecutionRecord
type Record = ExecutionRecord
type Program = Program
source§fn preprocessed_width(&self) -> usize
fn preprocessed_width(&self) -> usize
source§fn generate_preprocessed_trace(
&self,
program: &Program,
) -> Option<RowMajorMatrix<F>>
fn generate_preprocessed_trace( &self, program: &Program, ) -> Option<RowMajorMatrix<F>>
source§fn generate_trace(
&self,
input: &ExecutionRecord,
output: &mut ExecutionRecord,
) -> RowMajorMatrix<F>
fn generate_trace( &self, input: &ExecutionRecord, output: &mut ExecutionRecord, ) -> RowMajorMatrix<F>
source§fn generate_dependencies(
&self,
input: &ExecutionRecord,
output: &mut ExecutionRecord,
)
fn generate_dependencies( &self, input: &ExecutionRecord, output: &mut ExecutionRecord, )
source§impl<F: PrimeField32> PartialEq for RiscvAir<F>
impl<F: PrimeField32> PartialEq for RiscvAir<F>
impl<F: PrimeField32> Eq for RiscvAir<F>
Auto Trait Implementations§
impl<F> Freeze for RiscvAir<F>
impl<F> RefUnwindSafe for RiscvAir<F>where
F: RefUnwindSafe,
impl<F> Send for RiscvAir<F>
impl<F> Sync for RiscvAir<F>
impl<F> Unpin for RiscvAir<F>where
F: Unpin,
impl<F> UnwindSafe for RiscvAir<F>where
F: 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> 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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