Formal Verification for SDRAM Controller Generator
Gary Mejia
December 9, 2024
[options]
mode bmc
depth 20
[engines]
smtbmc yices
[script]
read -formal SDRAMController.sv
prep -top SDRAMController
[files]
SDRAMController.sv
assert property (@(posedge clock) disable iff (reset) io_state_out == 3 |=> ##5 (io_state_out == 6 | io_state_out== 7) )
is(ControllerState.idle) {
state := ControllerState.idle
read_state_counter.reset()
write_state_counter.reset()
val go_to_active =
io.read_start | io.write_start
sdram_commands.NOP()
io.read_data_valid := false.B
io.write_data_valid := false.B
when(refresh_outstanding) {
sdram_commands.Refresh()
refresh_outstanding := false.B
}.elsewhen(go_to_active) {
state := ControllerState.active
val row_and_bank = io.read_row_address
sdram_commands.Active(row_and_bank)
cas_counter.reset()
when(io.read_start) {
started_read := true.B
}.elsewhen(io.write_start) {
started_write := true.B
}
}
}
assume property (@(posedge clock) disable iff (reset) (started_read | started_write))
Assumption created new counter-example: active to rw counter can be in the middle of counting
assume property (@(posedge clock) disable iff (reset) (active_to_rw_counter_value == 0))
https://github.com/gmejiamtz/sdram_controller_generator
No tool installation required due to Github Codespaces!