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

Wrong value read from little-endian array #2795

Closed
atorregrosa-smd opened this issue Feb 19, 2021 · 1 comment
Closed

Wrong value read from little-endian array #2795

atorregrosa-smd opened this issue Feb 19, 2021 · 1 comment
Labels
area: data-types Issue involves data-types area: wrong runtime result Issue involves an incorrect runtine result from Verilated model effort: minutes Expect this issue to require less than an hour of invested effort to resolve resolution: fixed Closed; fixed

Comments

@atorregrosa-smd
Copy link
Contributor

Verilator version:
4.108 (issue appears after fix for #2499)

Testcase

module top;
   initial begin
      logic [0:4][31:0] test  = '{0, 1, 2, 3, 4};
      logic [4:0][31:0] test2 = test;

      $display(test[1]);
      $display(test2[1]);
      $finish;
   end
endmodule

Verilator displays values 3,1, when other simulators show the correct sequence 1,3. Older Verilator versions showed 1,1 which is also wrong.

I'll be glad to submit a fix if you give me some guidance.

@atorregrosa-smd atorregrosa-smd added the new New issue not seen by maintainers label Feb 19, 2021
@wsnyder wsnyder added area: data-types Issue involves data-types area: wrong runtime result Issue involves an incorrect runtine result from Verilated model effort: minutes Expect this issue to require less than an hour of invested effort to resolve resolution: fixed Closed; fixed and removed new New issue not seen by maintainers labels Feb 21, 2021
@wsnyder
Copy link
Member

wsnyder commented Feb 21, 2021

Thanks for the report and offer to fix, simple enough so just fixed it, had lo/hi instead of left/right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: data-types Issue involves data-types area: wrong runtime result Issue involves an incorrect runtine result from Verilated model effort: minutes Expect this issue to require less than an hour of invested effort to resolve resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants