chipsalliance / chipsalliance/chisel

suffix always be "sv"

Open
#5,231 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**: Bug Report

**Please provide the steps to reproduce the problem:**
```
object Test extends App {
val firtoolOptions = Array(
"--verilog", // <=== **NO effect**
"--default-layer-specialization=enable",
"--verification-flavor=immediate",
"--strip-debug-info",
"--strip-fir-debug-info",
"--disable-all-randomization",
"--lowering-options=" + List(
"disallowLocalVariables",
"disallowPackedArrays",
"locationInfoStyle=wrapInAtSquareBracket"
).reduce(_ + "," + _)
)

val commonArgs = Array(
"--target", "verilog", // <=== **NO effect**
"--target-dir", "out/verilog",
"--split-verilog"
)

circt.stage.ChiselStage.emitSystemVerilogFile(new MyTest(), args ++ commonArgs, firtoolOptions)
}
```
**What is the current behavior?**
generating verilog named "MyTest.sv"

**What is the expected behavior?**
generating verilog named "MyTest.v", i.e. file extension name should be "v" when target is verilog, and be "sv" when target is systemverilog.

**Please tell us about your environment:**

WSL-ubuntu 24, chisel:7.7.0 , mill-0.12.11

**Other Information**

**What is the use case for changing the behavior?**

Contributor guide

Open the contributing guide

Research direction

Start at circt.stage.ChiselStage.emitSystemVerilogFile and reproduce the reported invocation with --target verilog and --verilog. Trace how the target selects the generated filename extension, then verify that verilog output ends in .v while systemverilog output remains .sv.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.