|
From: Maciej S. <mac...@ce...> - 2014-11-12 19:03:20
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Yes, that is the exact plan. The other part is type casting, but it is a smaller change. Icarus already knows how transfer data between some of the types, I am just adding a few new ones. Regards, Orson On 11/12/2014 05:58 PM, Stephen Williams wrote: > > 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 > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUY673AAoJEBRwGu1hpbJ1gVcH+wSGCjRnN9wdEs/AFuTTVXy6 g8A//m1OwqYsNG+vFvyjAFgrIXXHmhGQ59BM9S26XpI4fNUhLcr19kABtAxO44cl xFHrbneHAdmdxyWUYn/ybV79scJbfwoxP/KjjPFBrr1UdBg/i9qVvbYwnaLdajwJ oX5zQbUazlYzD3MwtArFrA6y59edkZgvJYlKM2QkzevPPMQV8Paga+S0zYpaK7VQ SKob5dvgT/kOtxqJe2CrHGIDMbMAgWtd/lFK0WOHns5aT2tWWEaj6KuJa3GrlifJ FdhoxOr13qrNfsA568hIoMI0qvAg/sCjymYQk8R770Gpz9xKLT0qZBaPBkVA/kk= =vu12 -----END PGP SIGNATURE----- |