Skip to content

为什么在声明Wire/Reg的时候需要考虑Bundle的方向?(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?) #1997

Answered by sequencer
qinjun-li asked this question in Q&A
Discussion options

You must be logged in to vote

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 internals
It’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 something
We could do this automatical…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sequencer
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by qinjun-li
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants