suffix always be "sv"

Open
#5,231 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

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?

Dominant language
Scala
Stars
4.8k
Forks
669
Avg merge
1d 12h
Merged PRs (30d)
25

Getting set up

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.

More from chipsalliance/chisel

All issues in chipsalliance/chisel

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.