Select BM1362 work encoding for captured replay
main-release-gate / verify-and-release (push) Canceled after 0s
main-release-gate / verify-and-release (push) Canceled after 0s
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//! Exercise the SDK's host-only BM13xx HAL simulator with a captured job.
|
||||
|
||||
use alkane_os::hal_wire::HalClient;
|
||||
use alkane_os::miner::Bm1366Miner;
|
||||
use alkane_os::miner::{Bm1366Miner, ChipModel};
|
||||
use std::error::Error;
|
||||
use std::io;
|
||||
|
||||
@@ -38,16 +38,14 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
if args.next().is_some() {
|
||||
return Err("unexpected argument".into());
|
||||
}
|
||||
let (header, nonce) = match chip.as_str() {
|
||||
"BM1366" => (HEADER, 0xedad_ff38),
|
||||
"BM1362" => (bm1362_header()?, 0x630b_2533),
|
||||
let (header, nonce, model) = match chip.as_str() {
|
||||
"BM1366" => (HEADER, 0xedad_ff38, ChipModel::Bm1366),
|
||||
"BM1362" => (bm1362_header()?, 0x630b_2533, ChipModel::Bm1362),
|
||||
_ => return Err("unsupported captured chip".into()),
|
||||
};
|
||||
let mut backend = HalClient::connect(path)?;
|
||||
// BM1362 and BM1366 share the observed 88-byte job and 11-byte report
|
||||
// framing exercised by this miner. Chip initialization is outside this
|
||||
// host-only check.
|
||||
let mut miner = Bm1366Miner::new(&mut backend, 0, 0, 0, 100, 80_000)
|
||||
// Chip initialization is outside this host-only check.
|
||||
let mut miner = Bm1366Miner::new_for_chip(&mut backend, model, 0, 0, 0, 100, 80_000)
|
||||
.ok_or("invalid simulator probe configuration")?;
|
||||
miner.start()?;
|
||||
let mut target = [0_u8; 32];
|
||||
|
||||
Reference in New Issue
Block a user