|
From: Stephen W. <st...@ic...> - 2014-11-12 16:58:43
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Great. So you are working out getting dynamic arrays into and out of VPI based functions so that you can implement your cast in a VPI function. That has the added benefit that dynamic arrays become accessible to user VPI code as well. I got that right? On 11/12/2014 08:53 AM, Maciej Sumiński wrote: > Thank you for the prompt response. The big plan is to have a way > to translate VHDL functions that work with std_logic_vectors of > undefined size, that do not have a direct counterpart in > SystemVerilog. > > To address this issue I would like to cast vectors to dynamic > arrays and the other way round. Such casting is permitted by the SV > standard and functions may take and return dynamic arrays, so it is > a twisted way to handle the problem. > > As a warm-up, I have already written code for casting between > strings and vectors in ivl [1]. It makes use of VPI, and I would > like to follow the same route with dynamic arrays. I know the > branch is not approved yet, but I hope there are no show-stoppers > that could not be treated with a few small patches. > > Regards, Orson > > 1. https://github.com/orsonmmz/iverilog/tree/sv_cast > > On 11/12/2014 05:38 PM, Stephen Williams wrote: > >> I think vvp/vpi_darray.c is safe enough for you to work in right >> now. Remind me what specifically you are trying to add? I >> remember that I approved of what you're doing, but a quick >> reminder what that is exactly will help me. > >> Sometime soon, I'm going to want to merge the vec4-stack branch >> into the master branch, so that may turn my distraction into >> everybody's distraction;-) > >> On 11/12/2014 08:31 AM, Maciej Sumiński wrote: >>> Hi Steve, > >>> As far as I could see, there are no VPI functions to access >>> dynamic arrays contents and that is a dependency for my further >>> work. I have already started implementing the missing bits, >>> ending up with code that resembles the part that handles >>> standard arrays. To avoid code duplication, I would like to use >>> templates for a few functions or create a common ancestor >>> class. > >>> You have recently mentioned that you are in the middle of vvp >>> rework. I do not want to cause too many conflicts, therefore I >>> ask - do you think it is safe to modify vvp/vpi_darray.c & >>> vvp/vpi_priv.h? For the time being they seem to be untouched in >>> vec4-stack branch, but I would rather get a green light from >>> you. > >>> Regards, Orson > - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlRjkbcACgkQrPt1Sc2b3imaWACeJB+S8lQJjZnAjadVGwxEE7ku 6MQAn3MNnVKSwVHhG1jPx6Oe4TfRzKoE =iaXO -----END PGP SIGNATURE----- |