mirror of
https://github.com/SpinalHDL/SpinalTemplateSbt.git
synced 2025-10-23 08:08:43 +08:00
refactor: simplify project structure
This commit is contained in:
24
hw/spinal/projectname/MyTopLevelFormal.scala
Normal file
24
hw/spinal/projectname/MyTopLevelFormal.scala
Normal file
@@ -0,0 +1,24 @@
|
||||
package projectname
|
||||
|
||||
import spinal.core._
|
||||
import spinal.core.formal._
|
||||
|
||||
// You need SymbiYosys to be installed.
|
||||
// See https://spinalhdl.github.io/SpinalDoc-RTD/master/SpinalHDL/Formal%20verification/index.html#installing-requirements
|
||||
object MyTopLevelFormal extends App {
|
||||
FormalConfig
|
||||
.withBMC(10)
|
||||
.doVerify(new Component {
|
||||
val dut = FormalDut(MyTopLevel())
|
||||
|
||||
// Ensure the formal test start with a reset
|
||||
assumeInitial(clockDomain.isResetActive)
|
||||
|
||||
// Provide some stimulus
|
||||
anyseq(dut.io.cond0)
|
||||
anyseq(dut.io.cond1)
|
||||
|
||||
// Check the state initial value and increment
|
||||
assert(dut.io.state === past(dut.io.state + U(dut.io.cond0)).init(0))
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user