forked from libre-chip/fayalite
properly bound with StaticValue or StaticType<MaskType: StaticType>
This commit is contained in:
parent
2dce478d48
commit
cd99dbc849
8 changed files with 37 additions and 45 deletions
|
@ -13,7 +13,7 @@ use fayalite::{
|
|||
module::transform::simplify_enums::{simplify_enums, SimplifyEnumsKind},
|
||||
reset::{SyncReset, ToReset},
|
||||
source_location::SourceLocation,
|
||||
ty::{StaticType, Value},
|
||||
ty::{StaticValue, Value},
|
||||
};
|
||||
use serde_json::json;
|
||||
|
||||
|
@ -195,7 +195,7 @@ circuit check_array_repeat_1:
|
|||
#[hdl_module(outline_generated)]
|
||||
pub fn check_skipped_generics<T, #[hdl(skip)] U, const N: usize, #[hdl(skip)] const M: usize>(v: U)
|
||||
where
|
||||
T: Value<Type: StaticType<Value = T>>,
|
||||
T: StaticValue,
|
||||
U: std::fmt::Display,
|
||||
{
|
||||
dbg!(M);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
// See Notices.txt for copyright information
|
||||
use fayalite::{int::UInt, ty::Value};
|
||||
use fayalite::{
|
||||
int::UInt,
|
||||
ty::{StaticValue, Value},
|
||||
};
|
||||
|
||||
#[derive(Value, Clone, Hash, PartialEq, Eq, Debug)]
|
||||
#[hdl(outline_generated)]
|
||||
|
@ -21,3 +24,9 @@ pub enum E<T> {
|
|||
G(T),
|
||||
H(T, UInt<1>),
|
||||
}
|
||||
|
||||
#[derive(Value, Clone, Hash, PartialEq, Eq, Debug)]
|
||||
#[hdl(outline_generated, static, where(T: StaticValue))]
|
||||
pub struct S2<T> {
|
||||
pub v: E<T>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue