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

Support string conversion to unpacked array #2674

Closed
wsnyder opened this issue Dec 6, 2020 · 1 comment
Closed

Support string conversion to unpacked array #2674

wsnyder opened this issue Dec 6, 2020 · 1 comment
Labels
effort: hours Expect this issue to require roughly hours of invested effort to resolve resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@wsnyder
Copy link
Member

wsnyder commented Dec 6, 2020

sv-tests 5.9-string-word-assignment.sv checks IEEE 5.9 conversion from string to packed arrays. Only Aldec seems to correctly support this, but would be good to get a green box for this. Should only need V3Width::iterateCheck improvements.

module t();
   bit [8 * 3 - 1 : 0] a = "hi0";
   // Note as of January 2020 several commercial simulators do not support unpacked byte
   // assignment from strings:
   byte                bb[3 : 0];
   byte                bl[0 : 3];
   initial begin
      bb = "hi2";
      bl = "lo3";
      $display("bb=%p [0]=%x", bb, bb[0]);
      $display("bl=%p [0]=%x", bl, bl[0]);
      if (bb[3] != "h") $stop;
      if (bb[2] != "i") $stop;
      if (bb[1] != "2") $stop;
      if (bb[0] != 0) $stop;
      if (bl[0] != "l") $stop;
      if (bl[1] != "o") $stop;
      if (bl[2] != "3") $stop;
      if (bl[3] != 0) $stop;
   end
endmodule

@wsnyder wsnyder added effort: hours Expect this issue to require roughly hours of invested effort to resolve status: ready Issue is ready for someone to fix; then goes to 'status: assigned' type: feature-IEEE Request to add new feature, described in IEEE 1800 labels Dec 6, 2020
@wsnyder wsnyder added resolution: fixed Closed; fixed and removed status: ready Issue is ready for someone to fix; then goes to 'status: assigned' labels Dec 16, 2022
@wsnyder
Copy link
Member Author

wsnyder commented Dec 16, 2022

Added in 5.002 4f4c263

@wsnyder wsnyder closed this as completed Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: hours Expect this issue to require roughly hours of invested effort to resolve resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

1 participant