move FormalMode to crate::testing and add to prelude
This commit is contained in:
parent
3e5b2f126a
commit
b6e4cd0614
5 changed files with 41 additions and 52 deletions
|
|
@ -2,19 +2,7 @@
|
|||
// See Notices.txt for copyright information
|
||||
//! Formal tests in Fayalite
|
||||
|
||||
use fayalite::{
|
||||
build::formal::FormalMode,
|
||||
clock::{Clock, ClockDomain},
|
||||
expr::{CastTo, HdlPartialEq},
|
||||
firrtl::ExportOptions,
|
||||
formal::{any_const, any_seq, formal_reset, hdl_assert, hdl_assume},
|
||||
hdl, hdl_module,
|
||||
int::{Bool, DynSize, Size, UInt, UIntType},
|
||||
module::{connect, connect_any, instance, memory, reg_builder, wire},
|
||||
reset::ToReset,
|
||||
testing::assert_formal,
|
||||
ty::StaticType,
|
||||
};
|
||||
use fayalite::prelude::*;
|
||||
|
||||
/// Test hidden state
|
||||
///
|
||||
|
|
@ -119,7 +107,7 @@ mod hidden_state {
|
|||
FormalMode::Prove,
|
||||
16,
|
||||
None,
|
||||
ExportOptions::default(),
|
||||
Default::default(),
|
||||
);
|
||||
// here a couple of cycles is enough
|
||||
assert_formal(
|
||||
|
|
@ -128,7 +116,7 @@ mod hidden_state {
|
|||
FormalMode::Prove,
|
||||
2,
|
||||
None,
|
||||
ExportOptions::default(),
|
||||
Default::default(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -242,7 +230,7 @@ mod memory {
|
|||
#[hdl]
|
||||
let wr: WritePort<DynSize> = wire(WritePort[n]);
|
||||
connect(wr.addr, any_seq(UInt[n]));
|
||||
connect(wr.data, any_seq(UInt::<8>::TYPE));
|
||||
connect(wr.data, any_seq(UInt::<8>::new_static()));
|
||||
connect(wr.en, any_seq(Bool));
|
||||
#[hdl]
|
||||
let dut = instance(example_sram(n));
|
||||
|
|
@ -289,7 +277,7 @@ mod memory {
|
|||
FormalMode::Prove,
|
||||
2,
|
||||
None,
|
||||
ExportOptions::default(),
|
||||
Default::default(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue