chipsalliance / chipsalliance/chisel

Hierarchy API does not support @public on `val`s in constructors

Open
#2,388 5 comments 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)

**Development Phase**: request

**Other information**

This is pretty easy to work around, but it might be nice to have support for this.

https://scastie.scala-lang.org/debs-sifive/zAVcJfvxTnGqhKLbTa7sUw/51

This does not work:
```scala
@instantiable
class PassThrough(@public val hello: String) extends Module {
...
```

Workaround:
```scala
@instantiable
class PassThrough(val hello: String) extends Module {
@public val hello = hello
...
```

**Please tell us about your environment:** See Scastie.

**What is the use case for changing the behavior?** Less typing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.