llvm / llvm/circt

[LTL] Add property/sequence declaration op

Open
#5,286 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

Properties and sequences currently form an expression tree that is emitted wholly inline in the output Verilog. It would be beneficial to have a declaration op for properties and sequences that allows for an expression to be given a name. Emission would then move the expression into a `property foo; ... endproperty` or `sequence bar; ... endsequence` declaration and refer to them by the name `foo` or `bar`. The name on the declaration should be optional, such that ExportVerilog can pick a unique one if necessary. PrepareForEmission should then do a prepass over the IR and find properties and sequences that are used multiple times (or a sufficient number of times), and move those behind a declaration.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the property and sequence IR definitions, then trace ExportVerilog and PrepareForEmission. Determine how declaration operations would represent optional names and repeated expressions. Done means repeated properties or sequences can be emitted as named declarations and referenced by name, while unnamed declarations receive unique names.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.