Skip to content

formal: add SymbiYosys proof for cc_heaviside#351

Open
briann-bui wants to merge 1 commit into
pulp-platform:masterfrom
briann-bui:formal/cc_heaviside
Open

formal: add SymbiYosys proof for cc_heaviside#351
briann-bui wants to merge 1 commit into
pulp-platform:masterfrom
briann-bui:formal/cc_heaviside

Conversation

@briann-bui

Copy link
Copy Markdown

Summary

Add open-source formal verification for cc_heaviside (Closes #350, subtask of #288).

Changes

New Files

  • ** ormal/cc_heaviside_properties.sv** – Property checker using �ind to automatically attach to every cc_heaviside instance. Contains:
    • Full functional equivalence assertion against a loop-based reference model
    • Bit 0 always-asserted check
    • All-ones boundary check (x_i == Width-1)
    • Single-bit boundary check (x_i == 0)
    • Monotonicity check (bit at position x_i is set)
    • Upper-bits-zero check (bits above x_i are cleared)
  • ** ormal/cc_heaviside_formal.sv** – Elaboration harness instantiating cc_heaviside for widths 1 through 33, covering both power-of-two and non-power-of-two parameterizations.
  • ** ormal/heaviside.sby** – SymbiYosys configuration using smtbmc engine with depth 1 (combinational-only module).

Modified Files

  • ** ormal/Makefile** – Added heaviside.check target to the �ll rule and .PHONY list, following the existing lzc.check convention.

How to Run

\\�ash
cd formal
make heaviside.check
\\

Checklist

  • Properties pass with the documented open-source formal flow
  • Boundary cases (first and final valid indices) are covered
  • Non-power-of-two widths exercised (widths 1-33)
  • Integrated into existing ormal/Makefile
  • Existing formal checks unmodified

Add a formal verification harness and property checker for cc_heaviside.

Properties proven:
- Full functional equivalence against a reference model
- Bit 0 is always asserted for any valid input
- All-ones mask when x_i == Width-1 (upper boundary)
- Only bit 0 set when x_i == 0 (lower boundary)
- Monotonicity: bit at position x_i is always set
- Upper bits (above x_i) are always zero

The elaboration harness (cc_heaviside_formal) exercises widths from 1
to 33 inclusive, covering both power-of-two and non-power-of-two
parametrizations.

The new heaviside.check target is integrated into the existing
formal/Makefile and follows the same conventions as the lzc target.

Closes pulp-platform#350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add formal verification for cc_heaviside

1 participant