|
From: Jon T. <dos...@gm...> - 2015-06-10 22:33:54
|
Hi all, I am the author of Controlix, an operating system written in vhdl. I am currently developing it using GHDL as the compiler, and the system interface uses vhpi calls. Works OK on top of POSIX, but Icarus' vpp is written in c instead of in ada, making a static linkage job for bare metal targeting much more feasible. Afaics from perusing the sources, neither vhpi or vpp are currently supported by vhdlpp. If someone is already looking into writing support for this, I'd be happy to test, otherwise I might be able to take a crack at it myself (I have the coding time available). Jon |
|
From: Martin W. <mai...@ma...> - 2015-06-22 19:38:46
|
Jon Taylor wrote: > Hi all, > > I am the author of Controlix, an operating system written in vhdl. I am > currently developing it using GHDL as the compiler, and the system > interface uses vhpi calls. Works OK on top of POSIX, but Icarus' vpp is > written in c instead of in ada, making a static linkage job for bare metal > targeting much more feasible. > > Afaics from perusing the sources, neither vhpi or vpp are currently > supported by vhdlpp. If someone is already looking into writing support for > this, I'd be happy to test, otherwise I might be able to take a crack at it > myself (I have the coding time available). > Hello Jon, Sorry nobody has replied to you sooner. As far as I know nobody is working on supporting VHPI - hopefully Steve or Orson will chime in if I'm wrong. I'm not familiar with VHPI myself, but at a quick glance it seems very similar to VPI. This means support would need to be added to the simulator runtime (vvp). This may not be a big deal in itself, but I suspect the problem you will run into is that vhdlpp is just a preprocessor that converts VHDL to SystemVerilog, so some knowledge of the original code may get lost on the way. Furthermore, quite a lot of knowledge about SystemVerilog types are also lost during compilation, and vvp's support for VPI is far from complete... But having said that, I don't want to discourage you from having a crack at it! By vpp, do you mean the VHDL preprocessor? Martin |
|
From: Jon T. <dos...@gm...> - 2015-06-22 23:07:42
|
On Mon, Jun 22, 2015 at 12:38 PM, Martin Whitaker <mai...@ma...> wrote: > Jon Taylor wrote: >> Hi all, >> >> I am the author of Controlix, an operating system written in vhdl. I am >> currently developing it using GHDL as the compiler, and the system >> interface uses vhpi calls. Works OK on top of POSIX, but Icarus' vpp is >> written in c instead of in ada, making a static linkage job for bare metal >> targeting much more feasible. >> >> Afaics from perusing the sources, neither vhpi or vpp are currently >> supported by vhdlpp. If someone is already looking into writing support for >> this, I'd be happy to test, otherwise I might be able to take a crack at it >> myself (I have the coding time available). >> > Hello Jon, > > Sorry nobody has replied to you sooner. As far as I know nobody is working on > supporting VHPI - hopefully Steve or Orson will chime in if I'm wrong. > > I'm not familiar with VHPI myself, but at a quick glance it seems very similar > to VPI. Yes, although the full spec is a lot more complex than a simple function-binding strategy. However, most of the time you don't end up needing to implement the full spec - GHDL doesn't, all it implements is procedure and function calls. > This means support would need to be added to the simulator runtime > (vvp). Yes again. What I am researching now is whether I can piggyback the VHPI interface on top of the VPI interface in VVP - that is, if %vpi_call() calls can be generated by vhdlpp from VHPIDIRECT functions and procedures. > This may not be a big deal in itself, but I suspect the problem you > will run into is that vhdlpp is just a preprocessor that converts VHDL to > SystemVerilog, so some knowledge of the original code may get lost on the way. I think that as long as the end product .vpi code contains the necessary %vpi_call()s, this shouldn't be a problem. All I will need at that point is a .c file to link into vpp to map a VHPIDIRECT string to a symbol in the object file. I think libDL can do that. [snip] > By vpp, do you mean the VHDL preprocessor? No, sorry I meant VVP, not vpp. |-> Jon |
|
From: Cary R. <cy...@ya...> - 2015-06-22 23:48:29
|
Would adding functionality for the SystemVerilog DPI functionality be enough? Can you give us a quick overview of the VHPI you are hoping to translate.
Cary
On Monday, June 22, 2015 4:08 PM, Jon Taylor <dos...@gm...> wrote:
On Mon, Jun 22, 2015 at 12:38 PM, Martin Whitaker
<mai...@ma...> wrote:
> Jon Taylor wrote:
>> Hi all,
>>
>> I am the author of Controlix, an operating system written in vhdl. I am
>> currently developing it using GHDL as the compiler, and the system
>> interface uses vhpi calls. Works OK on top of POSIX, but Icarus' vpp is
>> written in c instead of in ada, making a static linkage job for bare metal
>> targeting much more feasible.
>>
>> Afaics from perusing the sources, neither vhpi or vpp are currently
>> supported by vhdlpp. If someone is already looking into writing support for
>> this, I'd be happy to test, otherwise I might be able to take a crack at it
>> myself (I have the coding time available).
>>
> Hello Jon,
>
> Sorry nobody has replied to you sooner. As far as I know nobody is working on
> supporting VHPI - hopefully Steve or Orson will chime in if I'm wrong.
>
> I'm not familiar with VHPI myself, but at a quick glance it seems very similar
> to VPI.
Yes, although the full spec is a lot more complex than a simple
function-binding strategy.
However, most of the time you don't end up needing to implement the
full spec - GHDL
doesn't, all it implements is procedure and function calls.
> This means support would need to be added to the simulator runtime
> (vvp).
Yes again. What I am researching now is whether I can piggyback the
VHPI interface
on top of the VPI interface in VVP - that is, if %vpi_call() calls can
be generated by
vhdlpp from VHPIDIRECT functions and procedures.
> This may not be a big deal in itself, but I suspect the problem you
> will run into is that vhdlpp is just a preprocessor that converts VHDL to
> SystemVerilog, so some knowledge of the original code may get lost on the way.
I think that as long as the end product .vpi code contains the
necessary %vpi_call()s,
this shouldn't be a problem. All I will need at that point is a .c
file to link into
vpp to map a VHPIDIRECT string to a symbol in the object file. I think
libDL can do that.
[snip]
> By vpp, do you mean the VHDL preprocessor?
No, sorry I meant VVP, not vpp. |->
Jon
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Iverilog-devel mailing list
Ive...@li...
https://lists.sourceforge.net/lists/listinfo/iverilog-devel
|
|
From: Jon T. <dos...@gm...> - 2015-06-23 01:50:13
|
Hi Cary,
Sorry, I forgot to answer your first question. So:
VHDL VHPIDIRECT function call ->
SystemVerilog DPI function call ->
VPP %vpi_call("VHPIDIRECT", "printf", ...) function call ->
VHPI.c VHPIDIRECT(...) function call ->
Linked native object file dlsym() entry point
Something like that?
Jon
On Mon, Jun 22, 2015 at 4:44 PM, Cary R. <cy...@ya...> wrote:
> Would adding functionality for the SystemVerilog DPI functionality be
> enough? Can you give us a quick overview of the VHPI you are hoping to
> translate.
>
> Cary
>
>
>
> On Monday, June 22, 2015 4:08 PM, Jon Taylor <dos...@gm...> wrote:
>
>
> On Mon, Jun 22, 2015 at 12:38 PM, Martin Whitaker
> <mai...@ma...> wrote:
>> Jon Taylor wrote:
>>> Hi all,
>>>
>>> I am the author of Controlix, an operating system written in vhdl. I am
>>> currently developing it using GHDL as the compiler, and the system
>>> interface uses vhpi calls. Works OK on top of POSIX, but Icarus' vpp is
>>> written in c instead of in ada, making a static linkage job for bare
>>> metal
>>> targeting much more feasible.
>>>
>>> Afaics from perusing the sources, neither vhpi or vpp are currently
>>> supported by vhdlpp. If someone is already looking into writing support
>>> for
>>> this, I'd be happy to test, otherwise I might be able to take a crack at
>>> it
>>> myself (I have the coding time available).
>>>
>> Hello Jon,
>>
>> Sorry nobody has replied to you sooner. As far as I know nobody is working
>> on
>> supporting VHPI - hopefully Steve or Orson will chime in if I'm wrong.
>>
>> I'm not familiar with VHPI myself, but at a quick glance it seems very
>> similar
>> to VPI.
>
> Yes, although the full spec is a lot more complex than a simple
> function-binding strategy.
> However, most of the time you don't end up needing to implement the
> full spec - GHDL
> doesn't, all it implements is procedure and function calls.
>
>> This means support would need to be added to the simulator runtime
>> (vvp).
>
> Yes again. What I am researching now is whether I can piggyback the
> VHPI interface
> on top of the VPI interface in VVP - that is, if %vpi_call() calls can
> be generated by
> vhdlpp from VHPIDIRECT functions and procedures.
>
>> This may not be a big deal in itself, but I suspect the problem you
>> will run into is that vhdlpp is just a preprocessor that converts VHDL to
>> SystemVerilog, so some knowledge of the original code may get lost on the
>> way.
>
> I think that as long as the end product .vpi code contains the
> necessary %vpi_call()s,
> this shouldn't be a problem. All I will need at that point is a .c
> file to link into
> vpp to map a VHPIDIRECT string to a symbol in the object file. I think
> libDL can do that.
>
> [snip]
>
>> By vpp, do you mean the VHDL preprocessor?
>
> No, sorry I meant VVP, not vpp. |->
>
>
> Jon
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
> _______________________________________________
> Iverilog-devel mailing list
> Ive...@li...
> https://lists.sourceforge.net/lists/listinfo/iverilog-devel
>
>
|
|
From: Kevin C. <iv...@gr...> - 2015-06-23 02:26:38
|
Brave man Jon! I hear gHDL is making good progress these days. Actually I suspect using VHDL for an OS is possibly better use than hardware description ;-) Given that it's impossible to persuade everybody to use the same language or the same simulator, I recommend using an OO API for boundary elements between systems. The boundary elements in electronics are the wires that connect things, the objects that connect the processes to the wires are drivers and receivers (Verilog-AMS parlance), so you need an API for connecting drivers and receivers to wires in other simulations/partitions. I would handle the resolution process for multiple types connected to a wire outside the HDLs because although it's not particularly difficult the standards bodies have not got their heads round it in the last 2+ decades, and I'm not expecting any sudden enlightenment. Also, you want to handle scheduling (for NBAs) as well as resolution within the objects representing the wires. You can do a large chunk of that with C and DPI calls in SystemVerilog resolution functions for user defined types, but I'm not up to speed on where Icarus is with SV support. Likewise I haven't used gHDL in years and don't know where it stands. Kev. On 06/10/2015 03:33 PM, Jon Taylor wrote: > > Hi all, > > I am the author of Controlix, an operating system written in vhdl. I am currently developing it using GHDL as the compiler, and the system interface uses vhpi calls. Works OK on top of POSIX, but Icarus' vpp is written in c instead of in ada, making a static linkage job for bare metal targeting much more feasible. > > Afaics from perusing the sources, neither vhpi or vpp are currently supported by vhdlpp. If someone is already looking into writing support for this, I'd be happy to test, otherwise I might be able to take a crack at it myself (I have the coding time available). > > Jon > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Iverilog-devel mailing list > Ive...@li... > https://lists.sourceforge.net/lists/listinfo/iverilog-devel |