-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tony Wu
committed
Nov 29, 2022
1 parent
ae9fcac
commit 23442f0
Showing
9 changed files
with
126 additions
and
19 deletions.
There are no files selected for viewing
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 @@ | ||
// TODO: |
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
Empty file.
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
pub mod warpshell; | ||
pub mod xilinx_u55n_xdma_std; |
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,5 @@ | ||
pub trait Warpshell { | ||
fn init(&self); | ||
// pub fn print_info(); | ||
fn load_raw_user_image(&self, image: &[u8]); | ||
} |
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 |
---|---|---|
@@ -1,15 +1,30 @@ | ||
use clap::Parser; | ||
use warpshell::{shells::xilinx_u55n_xdma_std::XilinxU55nXdmaStd, modules::xdma::Xdma}; | ||
|
||
#[derive(Parser,Default,Debug)] | ||
struct Args { | ||
command: String | ||
} | ||
|
||
fn main() { | ||
println!("Detecting XDMA..."); | ||
let xdma = Xdma::new(0); | ||
println!("Initializing Warpshell..."); | ||
let shell = XilinxU55nXdmaStd::new(&xdma).unwrap(); | ||
shell.init(); | ||
println!("--[CMS]----------------------------"); | ||
shell.cms.print_info(); | ||
println!("--[CTRL_FIREWALL]------------------"); | ||
shell.dma_firewall.print_status(); | ||
println!("--[DMA_FIREWALL]-------------------"); | ||
shell.dma_firewall.print_status(); | ||
let args = Args::parse(); | ||
match args.command.as_str() { | ||
"load-user-image" => println!("LOAD USER IMAGE"), | ||
"get-fpga-temp" => println!("FPGA TEMP"), | ||
"get-hbm-temp" => println!("HBM TEMP"), | ||
"get-board-power" => println!("BOARD POWER"), | ||
_ => println!("Invalid Command") | ||
} | ||
|
||
// println!("Detecting XDMA..."); | ||
// let xdma = Xdma::new(0); | ||
// println!("Initializing Warpshell..."); | ||
// let shell = XilinxU55nXdmaStd::new(&xdma).unwrap(); | ||
// shell.init(); | ||
// println!("--[CMS]----------------------------"); | ||
// shell.cms.print_info(); | ||
// println!("--[CTRL_FIREWALL]------------------"); | ||
// shell.dma_firewall.print_status(); | ||
// println!("--[DMA_FIREWALL]-------------------"); | ||
// shell.dma_firewall.print_status(); | ||
} |