简体   繁体   English

Chisel3:如何删除 Bundle 定义中的 Input 和 Output

[英]Chisel3: How can I remove Input and Output in Bundle definition

If I have如果我有

class ios extends Bundle{
  val wen = Input(Bool())
  val wdata = Input(UInt(8.W))
  val rdata = Output(UInt(8.W))
}

With Flipped I can get something like使用 Flipped 我可以得到类似的东西

class flipped_ios extends Bundle{
  val wen = Output(Bool())
  val wdata = Output(UInt(8.W))
  val rdata = Input(UInt(8.W))
}

Can I gain something like我能得到类似的东西吗

class plain_ios extends Bundle{
  val wen = Bool()
  val wdata = UInt(8.W)
  val rdata = UInt(8.W)
}

without copying, pasting and deleting the code?无需复制、粘贴和删除代码?

You can apply Output and Input to a bundle, just like Flipped .您可以将OutputInput应用于捆绑包,就像Flipped一样。 Output will make all wires in the bundle outputs. Output将使捆绑输出中的所有电线。 Since output is the default, afaik, applying Output to your bundle should bring everything back to default orientation.由于 output 是默认值,afaik,将Output应用到您的包中应该会将所有内容恢复为默认方向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM