Add Formal Verification and Fix Bug #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Good day,
I added formal verification using the open source symbiyosys. There was a bug found: when the overall parity bit itself is corrupted, the sb_err flag is not triggered. The updated code fixed this error on
ecc_dec.sv.The formal verification can be run by just running
./run_formal.shinside the./formaldirectory. Just make sure the symbiyosys tool is installed on your system (recommended way is to install the OSS-CAD-SUITE : https://github.com/YosysHQ/oss-cad-suite-build/releases). Shown below is the summary report at the end:The formal verification runs a set of tasks (shown on
ecc.sby), where K is 8, 16,32, and 64. Proof for K=64 takes the longest time reaching almost one and a half hour.The actual formal properties are very simple and is elaborated on
ecc_formal.v. Basically, the main rule is that the information input received by ecc_enc must be the same as the information output from ecc_dec (in case of 0 or 1 flipped bits). If 2 flipped bits, then the db_err must be high.I also added cover statement so we can have a sample waveform of this working design.
Thank you!
Kind regards,
Angelo
ps: Awesome project by the way! The design is very simple but flexible! I'm planning to use this ECC for my open source DDR3 controller UberDDR3: https://github.com/AngeloJacobo/UberDDR3
ps: Included on these commits are the same ones from my PR:
Fix failing VIvado Simulationsince that PR is not yet accepted