-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add circuit reports to riscv_opcodes example (#585)
implement circuit statistics
- Loading branch information
Showing
11 changed files
with
446 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use std::collections::BTreeMap; | ||
|
||
use ceno_zkvm::{ | ||
instructions::riscv::Rv32imConfig, | ||
stats::{StaticReport, TraceReport}, | ||
structs::ZKVMConstraintSystem, | ||
}; | ||
use goldilocks::GoldilocksExt2; | ||
type E = GoldilocksExt2; | ||
fn main() { | ||
let mut zkvm_cs = ZKVMConstraintSystem::default(); | ||
|
||
let _ = Rv32imConfig::<E>::construct_circuits(&mut zkvm_cs); | ||
let static_report = StaticReport::new(&zkvm_cs); | ||
let report = TraceReport::new(&static_report, BTreeMap::new(), "no program"); | ||
report.save_table("riscv_stats.txt"); | ||
println!("INFO: generated riscv_stats.txt"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.