Skip to content

Commit

Permalink
Merge branch 'main' into morgan/verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
morganthomas committed Feb 15, 2024
2 parents 15842da + d5ece10 commit 514c0c3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,15 @@ where
let mem_addr = fp + ops.a();

// Read from the advice tape into memory
let advice_byte = advice.get_advice().expect("No more advice");
let advice_opt = advice.get_advice();
let advice_byte = match advice_opt {
Some(advice) => Word::from_u8(advice),
// eof
None => Word::from(u32::MAX),
};
state
.mem_mut()
.write(clk, mem_addr as u32, Word::from_u8(advice_byte), true);
.write(clk, mem_addr as u32, advice_byte, true);

state.cpu_mut().pc += 1;
state.cpu_mut().push_op(
Expand Down

0 comments on commit 514c0c3

Please sign in to comment.