re-export bitvec
and add types useful for simulation to the prelude
This commit is contained in:
parent
62058dc141
commit
6929352be7
|
@ -746,7 +746,7 @@ impl ToTokens for ParsedBundle {
|
|||
}
|
||||
fn sim_value_from_bits(
|
||||
&self,
|
||||
bits: &::fayalite::__bitvec::slice::BitSlice,
|
||||
bits: &::fayalite::bitvec::slice::BitSlice,
|
||||
) -> <Self as ::fayalite::ty::Type>::SimValue {
|
||||
#![allow(unused_mut, unused_variables)]
|
||||
let mut v = ::fayalite::bundle::BundleSimValueFromBits::new(*self, bits);
|
||||
|
@ -757,7 +757,7 @@ impl ToTokens for ParsedBundle {
|
|||
fn sim_value_clone_from_bits(
|
||||
&self,
|
||||
value: &mut <Self as ::fayalite::ty::Type>::SimValue,
|
||||
bits: &::fayalite::__bitvec::slice::BitSlice,
|
||||
bits: &::fayalite::bitvec::slice::BitSlice,
|
||||
) {
|
||||
#![allow(unused_mut, unused_variables)]
|
||||
let mut v = ::fayalite::bundle::BundleSimValueFromBits::new(*self, bits);
|
||||
|
@ -766,7 +766,7 @@ impl ToTokens for ParsedBundle {
|
|||
fn sim_value_to_bits(
|
||||
&self,
|
||||
value: &<Self as ::fayalite::ty::Type>::SimValue,
|
||||
bits: &mut ::fayalite::__bitvec::slice::BitSlice,
|
||||
bits: &mut ::fayalite::bitvec::slice::BitSlice,
|
||||
) {
|
||||
#![allow(unused_mut, unused_variables)]
|
||||
let mut v = ::fayalite::bundle::BundleSimValueToBits::new(*self, bits);
|
||||
|
@ -895,7 +895,7 @@ impl ToTokens for ParsedBundle {
|
|||
}
|
||||
fn sim_value_from_bits(
|
||||
&self,
|
||||
bits: &::fayalite::__bitvec::slice::BitSlice,
|
||||
bits: &::fayalite::bitvec::slice::BitSlice,
|
||||
) -> <Self as ::fayalite::ty::Type>::SimValue {
|
||||
#![allow(unused_mut, unused_variables)]
|
||||
let mut v = ::fayalite::bundle::BundleSimValueFromBits::new(*self, bits);
|
||||
|
@ -906,7 +906,7 @@ impl ToTokens for ParsedBundle {
|
|||
fn sim_value_clone_from_bits(
|
||||
&self,
|
||||
value: &mut <Self as ::fayalite::ty::Type>::SimValue,
|
||||
bits: &::fayalite::__bitvec::slice::BitSlice,
|
||||
bits: &::fayalite::bitvec::slice::BitSlice,
|
||||
) {
|
||||
#![allow(unused_mut, unused_variables)]
|
||||
let mut v = ::fayalite::bundle::BundleSimValueFromBits::new(*self, bits);
|
||||
|
@ -915,7 +915,7 @@ impl ToTokens for ParsedBundle {
|
|||
fn sim_value_to_bits(
|
||||
&self,
|
||||
value: &<Self as ::fayalite::ty::Type>::SimValue,
|
||||
bits: &mut ::fayalite::__bitvec::slice::BitSlice,
|
||||
bits: &mut ::fayalite::bitvec::slice::BitSlice,
|
||||
) {
|
||||
#![allow(unused_mut, unused_variables)]
|
||||
let mut v = ::fayalite::bundle::BundleSimValueToBits::new(*self, bits);
|
||||
|
|
|
@ -880,7 +880,7 @@ impl ToTokens for ParsedEnum {
|
|||
}
|
||||
fn sim_value_from_bits(
|
||||
&self,
|
||||
bits: &::fayalite::__bitvec::slice::BitSlice,
|
||||
bits: &::fayalite::bitvec::slice::BitSlice,
|
||||
) -> <Self as ::fayalite::ty::Type>::SimValue {
|
||||
let v = ::fayalite::enum_::EnumSimValueFromBits::new(*self, bits);
|
||||
match v.discriminant() {
|
||||
|
@ -890,7 +890,7 @@ impl ToTokens for ParsedEnum {
|
|||
fn sim_value_clone_from_bits(
|
||||
&self,
|
||||
value: &mut <Self as ::fayalite::ty::Type>::SimValue,
|
||||
bits: &::fayalite::__bitvec::slice::BitSlice,
|
||||
bits: &::fayalite::bitvec::slice::BitSlice,
|
||||
) {
|
||||
let v = ::fayalite::enum_::EnumSimValueFromBits::new(*self, bits);
|
||||
match v.discriminant() {
|
||||
|
@ -900,7 +900,7 @@ impl ToTokens for ParsedEnum {
|
|||
fn sim_value_to_bits(
|
||||
&self,
|
||||
value: &<Self as ::fayalite::ty::Type>::SimValue,
|
||||
bits: &mut ::fayalite::__bitvec::slice::BitSlice,
|
||||
bits: &mut ::fayalite::bitvec::slice::BitSlice,
|
||||
) {
|
||||
let v = ::fayalite::enum_::EnumSimValueToBits::new(*self, bits);
|
||||
match value {
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
extern crate self as fayalite;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use bitvec as __bitvec;
|
||||
#[doc(hidden)]
|
||||
pub use std as __std;
|
||||
|
||||
|
@ -78,6 +76,8 @@ pub use fayalite_proc_macros::hdl_module;
|
|||
#[doc(inline)]
|
||||
pub use fayalite_proc_macros::hdl;
|
||||
|
||||
pub use bitvec;
|
||||
|
||||
/// struct used as a placeholder when applying defaults
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
|
||||
pub struct __;
|
||||
|
|
|
@ -20,7 +20,7 @@ pub use crate::{
|
|||
hdl_cover_with_enable, MakeFormalExpr,
|
||||
},
|
||||
hdl, hdl_module,
|
||||
int::{Bool, DynSize, KnownSize, SInt, SIntType, Size, UInt, UIntType},
|
||||
int::{Bool, DynSize, KnownSize, SInt, SIntType, SIntValue, Size, UInt, UIntType, UIntValue},
|
||||
memory::{Mem, MemBuilder, ReadUnderWrite},
|
||||
module::{
|
||||
annotate, connect, connect_any, incomplete_wire, instance, memory, memory_array,
|
||||
|
@ -29,9 +29,15 @@ pub use crate::{
|
|||
phantom_const::PhantomConst,
|
||||
reg::Reg,
|
||||
reset::{AsyncReset, Reset, SyncReset, ToAsyncReset, ToReset, ToSyncReset},
|
||||
sim::{
|
||||
time::{SimDuration, SimInstant},
|
||||
value::{SimValue, ToSimValue, ToSimValueWithType},
|
||||
ExternModuleSimulationState, Simulation,
|
||||
},
|
||||
source_location::SourceLocation,
|
||||
ty::{AsMask, CanonicalType, Type},
|
||||
util::{ConstUsize, GenericConstUsize},
|
||||
wire::Wire,
|
||||
__,
|
||||
};
|
||||
pub use bitvec::{slice::BitSlice, vec::BitVec};
|
||||
|
|
|
@ -2,12 +2,11 @@
|
|||
// See Notices.txt for copyright information
|
||||
|
||||
use fayalite::{
|
||||
int::UIntValue,
|
||||
memory::{ReadStruct, ReadWriteStruct, WriteStruct},
|
||||
module::{instance_with_loc, reg_builder_with_loc},
|
||||
prelude::*,
|
||||
reset::ResetType,
|
||||
sim::{time::SimDuration, vcd::VcdWriterDecls, Simulation},
|
||||
sim::vcd::VcdWriterDecls,
|
||||
util::RcWriter,
|
||||
};
|
||||
use std::num::NonZeroUsize;
|
||||
|
|
Loading…
Reference in a new issue