Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set DontCare for Analog wires using bulk connect (<>) #882

Closed
edwardcwang opened this issue Aug 24, 2018 · 1 comment · Fixed by #1056
Closed

Can't set DontCare for Analog wires using bulk connect (<>) #882

edwardcwang opened this issue Aug 24, 2018 · 1 comment · Fixed by #1056
Assignees
Labels
Milestone

Comments

@edwardcwang
Copy link
Contributor

Type of issue: bug report

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

Development Phase: request

Trying to set an Analog wire to DontCare using <> causes an error. Example:

import chisel3._
import chisel3.experimental._
class AnalogDontCareTestModule extends Module {
 val io = IO(new Bundle {
   val out = Vec(2, Analog(1.W))
   val in = Analog(1.W)
 })
 io.out(0) <> io.in
 io.out(1) := DontCare
 // io.out(1) <> DontCare // <-- doesn't work
}

Error message:

java.lang.RuntimeException: Unexpected port element direction 'Bidirectional(Default)'
  chisel3.core.BindingDirection$.from(Binding.scala:66)
  chisel3.core.BiConnect$.elemConnect(BiConnect.scala:216)
  chisel3.core.BiConnect$.connect(BiConnect.scala:68)
  chisel3.core.Data.bulkConnect(Data.scala:322)
  chisel3.core.Data.$less$greater(Data.scala:366)

This is strange as a user since := is generally verboten for Analog but I'm forced to use := for DontCare on Analog. It seems natural to allow Analogs to be set to DontCare using <>.

@redpanda3
Copy link

I suggest to delete <>, since <> and := are the same function within a data...

@jackkoenig jackkoenig self-assigned this Dec 18, 2018
@jackkoenig jackkoenig added this to the 3.2.0 milestone Dec 18, 2018
@ducky64 ducky64 self-assigned this Mar 29, 2019
@jackkoenig jackkoenig assigned ucbjrl and unassigned ducky64 and jackkoenig Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants