forked from libre-chip/fayalite
fix handling of const and size type generics when generating Index impls
This commit is contained in:
parent
2c1afd1cd6
commit
9887d70f41
5 changed files with 519 additions and 212 deletions
|
@ -1,16 +1,22 @@
|
|||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
// See Notices.txt for copyright information
|
||||
use fayalite::{
|
||||
array::ArrayType,
|
||||
hdl,
|
||||
int::{IntType, Size, UInt},
|
||||
};
|
||||
use fayalite::prelude::*;
|
||||
|
||||
#[hdl(outline_generated)]
|
||||
pub struct S<T: IntType, Len: Size> {
|
||||
pub struct S<T, Len: Size, T2> {
|
||||
pub a: T,
|
||||
b: UInt<3>,
|
||||
pub(crate) c: ArrayType<UInt<1>, Len>,
|
||||
pub d: T2,
|
||||
}
|
||||
|
||||
//#[cfg(todo)]
|
||||
#[hdl(outline_generated)]
|
||||
pub struct S3<const LEN: usize, T> {
|
||||
pub a: T,
|
||||
b: UInt<3>,
|
||||
pub(crate) c: Array<UInt<1>, LEN>,
|
||||
pub d: S<T, ConstUsize<LEN>, ()>,
|
||||
}
|
||||
|
||||
#[hdl(outline_generated)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue