google / google/xls

Coverage-fuzzing-by-proxy for XLS designs with a GRM a la SiliFuzz

Open
#1,117 0 comments 0 reactions 0 assignees View on GitHub
verification
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

Something we've been discussing for a few days -- when we have a GRM (Golden Reference Model) that is written in a substrate that we can do coverage-guided-fuzzing on (e.g. a C++ model) we can put it alongside the XLS IR simulation, and presumably coverage-guided fuzzing of paths in the GRM could correspond to interesting paths in the XLS DUT. It's a little unclear how much things will alias in the XLS IR interpreter (since it's an interpreter), and it's clear things like overflow are not surfaced via branches when bits are silently discarded (or left untouched as flags registers). We think we can ameliorate this by detecting overflow in the IR interpreter and setting a bit in a coverage map if it occurs, which will let the coverage guided fuzzer observe that effect via a control path.

This could be a meaningful quality of life improvement vs needing to hand construct histograms to exercise edge cases if they're already encoded in GRM logic. Of course property-based testing on the DUT without needing a GRM is an ideal we like to strive for, but if you're gonna have a second implementation to fabricate an oracle, might as well get good mileage out of it!

SiliFuzz paper: https://github.com/google/silifuzz/blob/main/paper/silifuzz.pdf

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.