-
下面两个是我列出来的例子(The following two examples are the ones I listed): 它会报错(It will report an error):
按照它的报错我需要将bundle里面的成员方向全部明确, 就是改成(According to its error, I need to clarify the direction of all the members in the bundle, that is, change it to): class TestBundle extends Bundle {
val testValidIO: ValidIO[UInt] = Valid(UInt(4.W))
val elseData: UInt = Output(UInt(10.W))
} 如果是将bundle声明为一个IO, 是必须要明确所有方向的, 但是在声明 Wire/Reg 的时候是不是可以不需要考虑方向?(If a bundle is declared as an IO, it is necessary to specify all directions, but is it possible to declare Wire/Reg without considering the directions?) Translations are directly copy&paste form DeepL. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I personally think this is reasonable. cc @jackkoenig Maybe it will be possible to move this validation to |
Beta Was this translation helpful? Give feedback.
-
Can't one use something like |
Beta Was this translation helpful? Give feedback.
-
Copy&Paste from answer from @jackkoenig in the dev meeting: Valid(...) is wrong, it assigns directions (Output) when it shouldn’t |
Beta Was this translation helpful? Give feedback.
Copy&Paste from answer from @jackkoenig in the dev meeting:
Valid(...) is wrong, it assigns directions (Output) when it shouldn’t
Would like to fix this but it’s hard
Deprecate and remove (could add chisel3.Valid and deprecate chisel3.util.Valid)
Could add chisel3 internal way of marking “Is output but deprecated” and make Valid use it (basically tells you to wrap it in
Output
when used in directioned Bundles) -- basically could not have to deprecate chisel3.util.Valid but requires hacking on internalsIt’s totally true that it’s weird to have to use Input/Output to coerce directions for an internal wire or reg, we could add
NoDir(...)
or.noDir
or somethingWe could do this automatical…