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.
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.
- Python 3.10+ recommended
- OpenAI API key
Install dependencies:
python3 -m pip install -r requirements.txtCreate a .env file in the repo root or export the key in your shell:
OPENAI_API_KEY=sk-...
python charge.py \
--cwe CWE-226 \
--rtl HACK@DAC21/aes0_wrapper.svOptional arguments:
--model: OpenAI model name, defaultgpt-4.1--temperature: model temperature, default0--output-dir: directory for generated outputs, defaultoutputs
For target CWE CWE-226, the pipeline writes:
outputs/asset_226_identified.jsonoutputs/behavior_226_expected.txtoutputs/assertion_226_generated.svoutputs/step1_226_llm.txtoutputs/step2_226_llm.txtoutputs/step3_226_llm.txt
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}, }
