add a simulator #3

Merged
programmerjake merged 58 commits from adding-simulator into master 2024-12-16 04:06:48 +00:00
Showing only changes of commit 15bc304bb6 - Show all commits

View file

@ -3,7 +3,7 @@
use crate::{
array::Array,
bundle::{Bundle, BundleField},
expr::Flow,
expr::{Expr, Flow, ToExpr},
intern::{Intern, Interned},
memory::{DynPortType, MemPort},
module::{Instance, ModuleIO, TargetName},
@ -195,6 +195,16 @@ macro_rules! impl_target_base {
}
}
}
impl ToExpr for $TargetBase {
type Type = CanonicalType;
fn to_expr(&self) -> Expr<Self::Type> {
match self {
$(Self::$Variant(v) => Expr::canonical(v.to_expr()),)*
}
}
}
};
}