mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
update trng tester
This commit is contained in:
parent
b85650f5a6
commit
995ebdccc5
2 changed files with 21 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#![cfg_attr(target_os = "none", no_std)]
|
||||
#![cfg_attr(target_os = "none", no_main)]
|
||||
|
||||
use log::{error, info};
|
||||
use log::info;
|
||||
|
||||
pub enum WhichMessible {
|
||||
One,
|
||||
|
|
@ -142,6 +142,7 @@ mod implementation {
|
|||
WhichMessible::Two => self.messible2_csr.wfo(utra::messible2::IN_IN, value as u32),
|
||||
}
|
||||
}
|
||||
#[allow(dead_code)]
|
||||
pub fn messible_get(&mut self, which: WhichMessible) -> u8 {
|
||||
match which {
|
||||
WhichMessible::One => self.messible_csr.rf(utra::messible::OUT_OUT) as u8,
|
||||
|
|
@ -233,9 +234,8 @@ fn xmain() -> ! {
|
|||
use crate::implementation::Trng;
|
||||
|
||||
log_server::init_wait().unwrap();
|
||||
|
||||
let log_server_id = xous::SID::from_bytes(b"xous-log-server ").unwrap();
|
||||
let log_conn = xous::connect(log_server_id).unwrap();
|
||||
log::set_max_level(log::LevelFilter::Info);
|
||||
info!("my PID is {}", xous::process::id());
|
||||
|
||||
let ticktimer = ticktimer_server::Ticktimer::new().expect("Couldn't connect to Ticktimer");
|
||||
|
||||
|
|
@ -243,8 +243,8 @@ fn xmain() -> ! {
|
|||
let mut trng = Trng::new();
|
||||
trng.init();
|
||||
// just create buffers out of pointers. Definitely. Unsafe.
|
||||
let mut buff_a = trng.get_buff_a() as *mut u32;
|
||||
let mut buff_b = trng.get_buff_b() as *mut u32;
|
||||
let buff_a = trng.get_buff_a() as *mut u32;
|
||||
let buff_b = trng.get_buff_b() as *mut u32;
|
||||
|
||||
for i in 0..TRNG_BUFF_LEN / 4 {
|
||||
// buff_a[i] = trng.get_data_eager();
|
||||
|
|
|
|||
|
|
@ -90,6 +90,19 @@ fn try_main() -> Result<(), DynError> {
|
|||
"cb-test-c1",
|
||||
"cb-test-c2",
|
||||
];
|
||||
let trng_pkgs = [
|
||||
"gam",
|
||||
"ime-frontend",
|
||||
"ime-plugin-shell",
|
||||
"trng-tester",
|
||||
"graphics-server",
|
||||
"ticktimer-server",
|
||||
"log-server",
|
||||
"com",
|
||||
"xous-names",
|
||||
"keyboard",
|
||||
"trng",
|
||||
];
|
||||
let task = env::args().nth(1);
|
||||
match task.as_deref() {
|
||||
Some("renode-image") => renode_image(false, &hw_pkgs)?,
|
||||
|
|
@ -104,6 +117,7 @@ fn try_main() -> Result<(), DynError> {
|
|||
Some("fcc-agent") => build_hw_image(false, env::args().nth(2), &fcc_pkgs)?,
|
||||
Some("minimal") => build_hw_image(false, env::args().nth(2), &minimal_pkgs)?,
|
||||
Some("cbtest") => build_hw_image(false, env::args().nth(2), &cbtest_pkgs)?,
|
||||
Some("trng-test") => build_hw_image(false, env::args().nth(2), &trng_pkgs)?,
|
||||
Some("debug") => run(true, &hw_pkgs)?,
|
||||
_ => print_help(),
|
||||
}
|
||||
|
|
@ -123,6 +137,7 @@ benchmark [soc.svd] builds a benchmarking image for real hardware
|
|||
fcc-agent [soc.svd] builds a version suitable for FCC testing
|
||||
minimal [soc.svd] builds a minimal image for API testing
|
||||
cbtest builds an image for callback testing
|
||||
trng-test [soc.svd] builds an image for TRNG testing
|
||||
"
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue