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

[MLIR] Tuple (integer) key names not allowed #1252

Closed
leonardt opened this issue Mar 22, 2023 · 1 comment
Closed

[MLIR] Tuple (integer) key names not allowed #1252

leonardt opened this issue Mar 22, 2023 · 1 comment

Comments

@leonardt
Copy link
Collaborator

import magma as m


class Foo(m.Circuit):
    T = m.Tuple[m.Bit, m.Bits[8]]
    io = m.IO(I=m.In(T), O=m.Out(T))
    io.O[0] @= ~io.I[0]
    io.O[1] @= io.I[1] ^ 0xFF


m.compile("build/Foo", Foo, output="mlir-verilog")
<stdin>:2:35: error: expected valid keyword
    hw.module @Foo(%I: !hw.struct<0: i1, 1: i8>) -> (O: !hw.struct<0: i1, 1: i8>) {
                                  ^

CIRCT doesn't support integer key names for generating verilog

@rsetaluri rsetaluri changed the title [MLIR] invalid key name when flatten_all_tuples=False [MLIR] Invalid key name when flatten_all_tuples=False Apr 6, 2023
@rsetaluri rsetaluri changed the title [MLIR] Invalid key name when flatten_all_tuples=False [MLIR] Tuple (integer) key names not allowed Apr 6, 2023
rsetaluri added a commit that referenced this issue Apr 6, 2023
rsetaluri added a commit that referenced this issue Apr 13, 2023
* [MLIR] Prefix tuple field keys with _

See #1252.

* [MLIR] Factor out magma tuple key to string logic
@rsetaluri
Copy link
Collaborator

Fixed by #1260

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

2 participants