Skip to content

feat(parser): support PERIOD timing checks#7

Merged
KelvinChung2000 merged 1 commit into
masterfrom
feat/period-check
Jun 10, 2026
Merged

feat(parser): support PERIOD timing checks#7
KelvinChung2000 merged 1 commit into
masterfrom
feat/period-check

Conversation

@KelvinChung2000

Copy link
Copy Markdown
Collaborator

Summary

OpenSTA emits (PERIOD port value) timing checks for cells whose liberty defines a minimum clock period (e.g. gf180mcu_fd_sc_mcu7t5v0__dffq), and the grammar rejected them with an UnexpectedToken error. PERIOD is a standard SDF timing check (IEEE 1497).

This adds the PERIOD check across the stack, mirroring the existing WIDTH handling (single port + single value):

  • grammar: period_check rule, included in t_check
  • model: EntryType.PERIOD and the Period dataclass
  • transformer: period_check (single port, nominal value)
  • builder: CellBuilder.add_period
  • SDF writer template: single-port rendering like width
  • annotate: $period(...) specify rendering

Tests

  • Parse OpenSTA-style PERIOD checks (plain and edge-qualified ports)
  • Emit round-trip: emitted file re-parses with both PERIOD entries intact
  • Builder add_period in the all-entry-types test
  • entries_to_specify mapping and $period specify-block rendering

330 tests pass, 98% coverage.

OpenSTA emits (PERIOD port value) timing checks for cells whose liberty
defines a minimum clock period (e.g. gf180mcu dffq), and the grammar
rejected them. Add the PERIOD check across the stack, mirroring WIDTH:

- grammar: period_check rule, included in t_check
- model: EntryType.PERIOD and the Period dataclass
- transformer: period_check (single port, nominal value)
- builder: CellBuilder.add_period
- SDF writer template: single-port rendering like width
- annotate: $period(...) specify rendering
@KelvinChung2000 KelvinChung2000 merged commit 0920f9c into master Jun 10, 2026
10 checks passed
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.

1 participant