use spefparse::SPEF; use std::env; #[cfg(not(target_env = "msvc"))] use tikv_jemallocator::Jemalloc; #[cfg(not(target_env = "msvc"))] #[global_allocator] static GLOBAL: Jemalloc = Jemalloc; fn main() { clilog::init_stderr_color_debug(); let args: Vec = env::args().collect(); assert!(args.len() == 2, "Usage: {} ", args[0]); clilog::info!("SPEF file {}", args[1]); let spef = match SPEF::parse_file(&args[1]) { Ok(spef) => spef, Err(e) => panic!("{}", e) }; clilog::info!("*DESIGN {:?}, *VENDOR {:?}", spef.header.design, spef.header.vendor); clilog::info!("# Ports = {}", spef.top_ports.len()); clilog::info!("# Nets = {}", spef.nets.len()); clilog::info!( "# Net Points = {}", spef.nets.iter() .map(|n| n.caps.len()) .sum::()); drop(spef); clilog::info!("cleaned up, exiting..") }