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

Support multiple triggers on flops #42

Closed
mkorbel1 opened this issue Nov 5, 2021 · 4 comments · Fixed by #65
Closed

Support multiple triggers on flops #42

mkorbel1 opened this issue Nov 5, 2021 · 4 comments · Fixed by #65
Labels
enhancement New feature or request

Comments

@mkorbel1
Copy link
Contributor

mkorbel1 commented Nov 5, 2021

Is your feature request related to a problem? Please describe.
Support multiple triggers for flops, like in SystemVerilog:

always_ff @(posedge clk or posedge reset)

Describe the solution you'd like
The FF and FlipFlop should have a syntax that accepts a list of signals instead of a single clk signal.

Describe alternatives you've considered
Using something like clk | reset is insufficient because there could be a rising edge of reset during a clock high period.

@mkorbel1 mkorbel1 added the enhancement New feature or request label Nov 5, 2021
@wswongat
Copy link
Contributor

wswongat commented Dec 4, 2021

@mkorbel1 Is it possible to support negative edge trigger as well?
It seems like the rohd only support the positive edge single trigger with current version.

} else if (LogicValue.isPosedge(_preTickClkValue!, clk.bit)) {

@mkorbel1
Copy link
Contributor Author

mkorbel1 commented Dec 4, 2021

@wswongat it wouldn't be too hard to add that, but I figured it wasn't really needed as a separate feature since you could always just use the posedge of an inverted signal, for example:

FF(clk, [...]); //posedge of clk
FF(~clk, [...]); // negedge of clk

Do you think that meets your needs or can you elaborate why you think a separate negedge trigger would be beneficial beyond this?

@wswongat
Copy link
Contributor

wswongat commented Dec 4, 2021

@mkorbel1 Your suggestion looks good. Looks like we need to find some way to support multiple triggers on flops

@mkorbel1
Copy link
Contributor Author

mkorbel1 commented Dec 6, 2021

@wswongat #65 should address this issue and provide support for multiple triggers on flops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants