|
From: Maciej S. <mac...@ce...> - 2015-12-07 20:49:18
|
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 > |