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

Multidimensional array banking is incorrect #175

Closed
rachitnigam opened this issue Apr 11, 2019 · 0 comments
Closed

Multidimensional array banking is incorrect #175

rachitnigam opened this issue Apr 11, 2019 · 0 comments

Comments

@rachitnigam
Copy link
Member

The compiler flattens all array declarations of the form:

decl a: bit<32>[4 bank 2][4 bank 2];

into

int[10][10] a;
#... partition cyclic factor = 2*2

The banking structure it produces is:

0 1 2 3
0 1 2 3

However, logically, it should've produced the banking structure:

0 1 0 1
2 3 2 3

To fix this, three things need to be done:

  • Stop flattening all array accesses.
  • Generate dim based banking pragmas for the arrays
  • If SDSoC doesn't allow for multidimensional arrays on interfaces, write a library to pack and unpack single dimensional arrays into multidimensional ones.
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