chipsalliance / chipsalliance/chisel

Verification Statements do not support Printable

Open
#2,350 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
4.8k
Forks
658
Avg merge
18h 59m
Merged PRs (30d)
14

Description

**Type of issue**: feature request

**Impact**: API addition (no impact on existing code)

Currently the Verification Statements (i.e. `assert` and `assume`) can take additional arguments that will result in a message being printed when the condition is violated. However, it only supports the "C"-style printing, i.e.: `assert(a, "a=%d", a)`. In addition it would be nice if it also supported the Scala/Python style of printing like `printf` already does, i.e. `assert(a, p"a=$a")`.

Contributor guide

Open the contributing guide

Research direction

Start with the implementations or entry points for the assert and assume verification statements, then compare their message handling with printf's existing Printable support. Done means both statements accept Scala/Python-style Printable expressions such as p"a=$a" while preserving the existing C-style arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.