-
Notifications
You must be signed in to change notification settings - Fork 52
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
1 parent
95e85da
commit 3150ceb
Showing
10 changed files
with
106 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#[macro_export] | ||
macro_rules! useless_ffi_backend { | ||
(init $dut:ident; $($port:ident),*) => { | ||
println!("useless_ffi_backend init"); | ||
}; | ||
(deinit $dut:ident; $($port:ident),*) => { | ||
println!("useless_ffi_backend deinit"); | ||
}; | ||
(reset $dut:ident; $($port:ident),*) => { | ||
println!("useless_ffi_backend reset"); | ||
$dut.done = 0; | ||
$dut.reset = 1; | ||
for i in 0..5 { | ||
$dut.tick(); | ||
} | ||
$dut.reset = 0; | ||
}; | ||
(tick $dut:ident; $($port:ident),*) => { | ||
println!("useless_ffi_backend tick"); | ||
if $dut.done == 1 { | ||
$dut.done = 0; | ||
} | ||
}; | ||
(go $dut:ident; $($port:ident),*) => { | ||
println!("useless_ffi_backend go"); | ||
$dut.go = 1; | ||
$dut.go = 0; | ||
$dut.done = 1; | ||
$dut.tick(); | ||
}; | ||
} |
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,2 +1,4 @@ | ||
pub use super::{CalyxFFI, CalyxFFIComponent, CalyxFFIComponentRef}; | ||
pub use super::{ | ||
useless_ffi_backend, CalyxFFI, CalyxFFIComponent, CalyxFFIComponentRef, | ||
}; | ||
pub use calyx_ffi_macro::{calyx_ffi, calyx_ffi_test, calyx_ffi_tests}; |
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