-
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.
Work on adding compile time port widths
- Loading branch information
1 parent
33b9686
commit a2ba4ac
Showing
15 changed files
with
135 additions
and
115 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
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 |
---|---|---|
@@ -1,17 +1,26 @@ | ||
pub use super::{CalyxFFI, CalyxFFIComponent, CalyxFFIComponentRef}; | ||
pub use super::{ | ||
value_from_u64, CalyxFFI, CalyxFFIComponent, CalyxFFIComponentRef, Value, | ||
}; | ||
pub use calyx_ffi_macro::{calyx_ffi, calyx_ffi_test, calyx_ffi_tests}; | ||
pub use calyx_ir; | ||
pub use interp; | ||
|
||
#[macro_export] | ||
macro_rules! declare_calyx_ffi_interface { | ||
($name:ident($($input:ident),*) -> ($($output:ident),*)) => { | ||
pub trait $name: CalyxFFIComponent { | ||
$( | ||
fn $input(&mut self) -> &mut u64; | ||
)* | ||
$( | ||
fn $output(&self) -> u64; | ||
)* | ||
macro_rules! declare_interface { | ||
($name:ident($($input:ident: $input_width:literal),*) -> ($($output:ident: $output_width:literal),*)) => { | ||
paste::paste! { | ||
pub trait $name: CalyxFFIComponent { | ||
$( | ||
fn [<$input _bits>](&mut self) -> &mut calyx_ffi::Value<$input_width>; | ||
|
||
fn [<set_ $input>](&mut self, value: u64); | ||
)* | ||
$( | ||
fn [<$output _bits>](&self) -> &calyx_ffi::Value<$output_width>; | ||
|
||
fn $output(&self) -> u64; | ||
)* | ||
} | ||
} | ||
}; | ||
} |
File renamed without changes.
Oops, something went wrong.