|
From: Cary R. <cy...@ya...> - 2015-12-08 06:23:23
|
It should probably be a private (Icarus specific define) like some of the ones in vpi_user.h and I agree it should be in the SV header file. The value should be way outside the range of the other return values to allow SV room to implement this, the two states variables, etc. that SV supports and not conflict.
Cary
On Monday, December 7, 2015 1:56 PM, Stephen Williams <st...@ic...> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hmm... I think the proper answer is to define in the sv_vpi_user.h
a vpiStringFunc that is probably a value like 10 so that it is sure
to not intefere with other declaration. I'd put it in the sv_vpi_user.h
header file instead of the vpi_user.h header file so that it does not
pollute the vpi_user.h name space.
You are right that the SV standard doesn't have a code for string
return values, but I think we want such things, and absent any other
standard on the matter, we can define what we want.
It's either that, or start implementing DPI. Big job.
On 12/07/2015 12:48 PM, Maciej Sumiński wrote:
> True, I prefer to follow this way too. The thing is, $sformatf
> returns a string, which is seemingly impossible with the VPI
> interface. There are function types: vpiSysFuncInt, vpiSysFuncReal,
> vpiSysFuncTime and vpiSysFuncSized. I was wondering if adding
> vpiSysFuncString (in a separate header, so the original one is not
> polluted) is acceptable or is there any better method.
>
> Regards, Orson
>
> On 12/07/2015 07:11 PM, Stephen Williams wrote:
>>
>> First guess, I think the best would be to implement $sformatf. It
>> is something that we would need anyhow. On 12/07/2015 08:52 AM,
>> Maciej Sumi?ski wrote:
>>> Hi,
>>
>>> I am wondering what would be the right way to implement VHDL
>>> 'image attribute, which returns a string representation of a
>>> variable.
>>
>>> The first idea is to use SV $sformatf system function, which
>>> returns a string based on the formatting string (e.g. "%d" and
>>> input data, but it is currently not available in Icarus. I
>>> could add it, but as far as I know, the VPI standard does not
>>> allow to write functions that return strings.
>>
>>> What's your opinion? Should I extend VPI in Icarus to allow
>>> returning strings or is there another, more elegant solution to
>>> the problem?
>>
>>> Regards, Orson
>>
>>
>>
>>> ------------------------------------------------------------------------------
>>
>>
>>
>>>
Go from Idea to Many App Stores Faster with Intel(R) XDK
>>> Give your users amazing mobile app experiences with Intel(R)
>>> XDK. Use one codebase in this all-in-one HTML5 development
>>> environment. Design, debug & build mobile apps & 2D/3D
>>> high-impact games for multiple OSs.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
>>
>>
>>
>>>
>>>
_______________________________________________ Iverilog-devel
>>> mailing list Ive...@li...
>>> https://lists.sourceforge.net/lists/listinfo/iverilog-devel
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>>
Go from Idea to Many App Stores Faster with Intel(R) XDK
>> Give your users amazing mobile app experiences with Intel(R)
>> XDK. Use one codebase in this all-in-one HTML5 development
>> environment. Design, debug & build mobile apps & 2D/3D
>> high-impact games for multiple OSs.
>> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
>> _______________________________________________ Iverilog-devel
>> mailing list Ive...@li...
>> https://lists.sourceforge.net/lists/listinfo/iverilog-devel
>>
>
>
>
> ------------------------------------------------------------------------------
>
>
Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for
> multiple OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
>
>
>
> _______________________________________________ Iverilog-devel
> mailing list Ive...@li...
> https://lists.sourceforge.net/lists/listinfo/iverilog-devel
>
- --
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
iEYEARECAAYFAlZmAIUACgkQrPt1Sc2b3imLYQCgvbkuGBSbOBNIjnw++Yr+foRn
St0AnRWTrvLWJ9nHGkSngBI5xpm+MJuY
=eogv
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
Iverilog-devel mailing list
Ive...@li...
https://lists.sourceforge.net/lists/listinfo/iverilog-devel
|