We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For magma functions, like the one in #1213, how would one provide type annotation?
# inside a circuit definition out = m.Register(m.UInt[32])() count = m.Register(m.UInt[8])() config(out.I, count.O) # end circuit definition def config(reg: ???, count: ???): with m.when(count == 0): reg @= m.uint(1, 32) with m.elsewhen(count == 1): reg @= m.uint(5, 32)
The text was updated successfully, but these errors were encountered:
In general, magma values are instances of m.Type, so like this:
m.Type
def config(reg: m.Type, count: m.Type):
In this case, we could be more precise and say
def config(reg: m.UInt[32], count:m.UInt[8]):
Since m.UInt (and it's parameterized versions) are subclass of m.Type
Sorry, something went wrong.
No branches or pull requests
For magma functions, like the one in #1213, how would one provide type annotation?
The text was updated successfully, but these errors were encountered: