-
Notifications
You must be signed in to change notification settings - Fork 140
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
Add shift_register_gated #170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @qian-gu for this PR. To avoid code fragmentation, could you adapt shift_reg such that it instantiates this module, tying valid_i
to 1'b1
and leaving valid_o
open? Furthermore, could you update the following files with this module:
Bender.yml
README.md
src_files.yml
Finally, please rebase to master (we updated the CI last night)
src/shift_reg_gated.sv
Outdated
// | ||
// Description: A Simple shift register with ICG for arbitrary depth and types. | ||
|
||
`default_nettype none |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? If not, please remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This directive is added to ensure all internal variables are declared explicitly by designer. I will remove it to keep consistent with other modules.
src/shift_reg_gated.sv
Outdated
|
||
endmodule | ||
|
||
`default_nettype wire |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here as L13
src/shift_reg_gated.sv
Outdated
logic [Depth-1 : 0] valid_d; | ||
logic [Depth-1 : 0] valid_q; | ||
dtype [Depth-1 : 0] data_d; | ||
dtype [Depth-1 : 0] data_q; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adapt this to our coding convention
logic [Depth-1 : 0] valid_d; | |
logic [Depth-1 : 0] valid_q; | |
dtype [Depth-1 : 0] data_d; | |
dtype [Depth-1 : 0] data_q; | |
logic [Depth-1:0] valid_d, valid_q; | |
dtype [Depth-1:0] data_d, data_q; |
A shift register with clock gating
update commits have been pushed, but the CI command
gives an error message:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! The CI is failing since you don't have access to the required github secrets... we're working on a solution for future PRs.
A shift register with clock gating