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

[MooreToCore] LSB and MSB support in moore dialect #7925

Open
AndreyVV-100 opened this issue Nov 29, 2024 · 0 comments
Open

[MooreToCore] LSB and MSB support in moore dialect #7925

AndreyVV-100 opened this issue Nov 29, 2024 · 0 comments

Comments

@AndreyVV-100
Copy link
Contributor

Hi! I tried using circt-verilog and ran into problems.

module Mod(input clk, input [4:3] a, output logic b);
always_ff @(posedge clk) begin
    b <= a[3];
end
endmodule
module Mod(input [1:0] a, output logic b);
always @(posedge a)
    b <= a[0];
endmodule

In first case lowering fro Moore to Core dialect fails due to there are no information about range ([4:3]) in Moore dialect and out-of-range error occurs. Second case isn't implemented now (see corresponding todo). According to 9.4.2 IEEE 1800-2017, an edge event shall be detected only on the LSB of the expression. For this reason LSB information is needed for this todo.

I would help CIRCT project and implement support for these cases. Is it good idea to add LSB and MSB as attribute? Are there other possible solutions to this problem?

Thank you in advance!

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

No branches or pull requests

1 participant