-
Notifications
You must be signed in to change notification settings - Fork 346
Expand file tree
/
Copy pathfence.rs
More file actions
35 lines (28 loc) · 989 Bytes
/
Copy pathfence.rs
File metadata and controls
35 lines (28 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use crate::zkvm::instruction::NUM_INSTRUCTION_FLAGS;
use tracer::instruction::{fence::FENCE, RISCVCycle};
use crate::zkvm::lookup_table::LookupTables;
use super::{CircuitFlags, Flags, InstructionLookup, LookupQuery, NUM_CIRCUIT_FLAGS};
impl<const XLEN: usize> InstructionLookup<XLEN> for FENCE {
fn lookup_table(&self) -> Option<LookupTables<XLEN>> {
None
}
}
impl Flags for FENCE {
fn circuit_flags(&self) -> [bool; NUM_CIRCUIT_FLAGS] {
let mut flags = [false; NUM_CIRCUIT_FLAGS];
flags[CircuitFlags::IsFirstInSequence] = self.is_first_in_sequence;
flags[CircuitFlags::IsCompressed] = self.is_compressed;
flags
}
fn instruction_flags(&self) -> [bool; NUM_INSTRUCTION_FLAGS] {
[false; NUM_INSTRUCTION_FLAGS]
}
}
impl<const XLEN: usize> LookupQuery<XLEN> for RISCVCycle<FENCE> {
fn to_instruction_inputs(&self) -> (u64, i128) {
(0, 0)
}
fn to_lookup_output(&self) -> u64 {
0
}
}