BoringUtils: tapAndRead of literal throws error

オープン
#4,663 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
scala
領域
embedded-iot

調査の方向性

まず BoringUtils.scala の 230、328、422-423 行付近のスタックトレースの箇所から始め、次に BoringUtils.tapAndRead を 5.U に対して使用して、提供された Scala の再現コードを実行します。完了条件は、例が NoSuchElementException なしで CHIRRTL を出力し、BoringUtils がリテラルで動作することです。

索引モデルが issue の本文から書いたものです。

説明

Type of issue: Bug Report

Please provide the steps to reproduce the problem:

Use BoringUtils.tapAndRead on a literal, example:

//> using repository "sonatype-s01:snapshots"
//> using scala "2.13.14"
//> using dep "org.chipsalliance::chisel:7.0.0-M2+317-62ca9bdc-SNAPSHOT"
//> using plugin "org.chipsalliance:::chisel-plugin:7.0.0-M2+317-62ca9bdc-SNAPSHOT"
//> using options "-unchecked", "-deprecation", "-language:reflectiveCalls", "-feature", "-Xcheckinit", "-Xfatal-warnings", "-Ywarn-dead-code", "-Ywarn-unused", "-Ymacro-annotations"

import chisel3._
import circt.stage.ChiselStage
import chisel3.util.experimental.BoringUtils

class Foo extends RawModule {
  val x = 5.U
  val y = BoringUtils.tapAndRead(x)
}

object Main extends App {
  println(ChiselStage.emitCHIRRTL(new Foo, Array("--full-stacktrace")))
}

What is the current behavior?

Exception in thread "main" java.util.NoSuchElementException: None.get
	at scala.None$.get(Option.scala:627)
	at scala.None$.get(Option.scala:626)
	at chisel3.util.experimental.BoringUtils$.parent$1(BoringUtils.scala:230)
	at chisel3.util.experimental.BoringUtils$.boreOrTap(BoringUtils.scala:328)
	at chisel3.util.experimental.BoringUtils$.$anonfun$tapAndRead$3(BoringUtils.scala:423)
	at chisel3.experimental.skipPrefix$.apply(prefix.scala:102)
	at chisel3.util.experimental.BoringUtils$.$anonfun$tapAndRead$2(BoringUtils.scala:423)
	at chisel3.experimental.prefix$.apply(prefix.scala:50)
	at chisel3.util.experimental.BoringUtils$.$anonfun$tapAndRead$1(BoringUtils.scala:422)
	at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
	at chisel3.util.experimental.BoringUtils$.tapAndRead(BoringUtils.scala:422)
	at Foo.$anonfun$y$2(bore-literal.scala:13)
(snip)

What is the expected behavior?

Ability to use BoringUtils with literals.

Please tell us about your environment:

Other Information

What is the use case for changing the behavior?

Building library code using BoringUtils.

主要言語
Scala
スター
4.8k
フォーク
669
平均マージ
1日 12時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

chipsalliance/chisel のほかの issue

chipsalliance/chisel の issue をすべて見る

似ている issue

Scala の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。