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

Bundle assignments of same length #422

Open
gabizon103 opened this issue Feb 28, 2024 · 1 comment
Open

Bundle assignments of same length #422

gabizon103 opened this issue Feb 28, 2024 · 1 comment
Labels
C: language Component: the Filament language

Comments

@gabizon103
Copy link
Collaborator

gabizon103 commented Feb 28, 2024

If a and b are bundles of length N, the assignment a = b will cause the compiler to throw an unassigned bundle location error, where it'll say indices 1, 2, ..., N-1 are unassigned. You need to instead do a{0..N} = b{0..N}. Similarly if we have a module Foo that takes as input a bundle of length N, the invocation Foo<'G>(a) will not type check because the compiler thinks a is a bundle of length 1. You need to do Foo<'G>(a{0..N}) instead.

Not a super high priority but would be nice to fix.

@gabizon103 gabizon103 added the C: language Component: the Filament language label Feb 28, 2024
@rachitnigam
Copy link
Member

I think long term maybe we want this to be explicit (a{..}) and have a better error message? I thin the a = b syntax is a little tricky because a and b could either be individual ports or complete bundles. The unwieldy thing there is that multi-dimensional assignments start looking really ugly (a{..}{..} = b{..})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: language Component: the Filament language
Projects
None yet
Development

No branches or pull requests

2 participants