Skip to content

Repository files navigation

CHARGE: Leveraging CWE Hierarchies for Hardware Security SystemVerilog Assertion Generation

CHARGE framework

Status

This repository currently contains the core CHARGE pipeline and CWE-related artifacts used in our evaluation. It does not yet include all supported CWEs described in the paper. We will continuously update the repository.

Files

  • charge.py: main assertion-generation pipeline.
  • cwe_scope.json: supported target CWEs and prompt.
  • asset_*.json: CWE subtree inputs used by the pipeline.
  • requirements.txt: Python dependencies.

Requirements

  • Python 3.10+ recommended
  • OpenAI API key

Install dependencies:

python3 -m pip install -r requirements.txt

Create a .env file in the repo root or export the key in your shell:

OPENAI_API_KEY=sk-...

Usage

python charge.py \
  --cwe CWE-226 \
  --rtl HACK@DAC21/aes0_wrapper.sv

Optional arguments:

  • --model: OpenAI model name, default gpt-4.1
  • --temperature: model temperature, default 0
  • --output-dir: directory for generated outputs, default outputs

Output files

For target CWE CWE-226, the pipeline writes:

  • outputs/asset_226_identified.json
  • outputs/behavior_226_expected.txt
  • outputs/assertion_226_generated.sv
  • outputs/step1_226_llm.txt
  • outputs/step2_226_llm.txt
  • outputs/step3_226_llm.txt

Citation

The official conference paper will appear in the proceedings of IEEE/ACM ICCAD 2026. An extended version of this work is available on arXiv: https://arxiv.org/abs/2607.27776. Until the proceedings version becomes available, please cite the arXiv paper:

@misc{tan2026chargeleveragingcwehierarchies, title={CHARGE: Leveraging CWE Hierarchies for Hardware Security SystemVerilog Assertion Generation}, author={Xiao Tan and Cynthia Sturton}, year={2026}, eprint={2607.27776}, archivePrefix={arXiv}, primaryClass={cs.CR}, url={https://arxiv.org/abs/2607.27776}, }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages