On 13 Apr 2013, at 9:28 PM, René Doß <d...@gmx.de> wrote:

> first
> 
>  Davids changed code works. This is nices.
>> 
>> equiv_process:
>>  process
>>  begin
>>  global <= get_global(2);
>>  wait until board_clk'event  and board_clk = '1';
>>  end process equiv_process:
> 
> The wait reactivate the process. The changing is only valid in the next clock 
> cycle. T

You can hand craft a process statement instead, with easier control over order.

> Other question: exist an other posibilty?
> Maybe a other VHPI function type?

A little research shows that the VHPI functionality present in ghdl is the 
subset necessary to support ghdl with IVI (prior to it's transition to 
Eclipse).  You'd think that having more interactivity to foreign software would 
require the ability to interface to a fuller set of objects.  

I recall having worked in a Cadence centric engineering effort at the time VHPI 
came out and playing with it for several days, including constructing some test 
cases.   This would have been around 1997 I think.

For an idea what VHPI in full can do, you can check out section 2.6 of Peter 
Ashenden and Jim Lewis's book 'VHDL 2008 Just the New Stuff' or see sections 17 
through 23 of IEEE Std 1076-2008.  For those interested in UML descriptions see 
the IEEE-SA Supplemental Materials for 1076c-2007 
(http://standards.ieee.org/downloads/1076/1076c-2007/1076c-2007-code-vhpi_uml.zip).

Looking through the included vhpi_user.h you could definitely get the idea that 
VHPI was intended to be portable.

There are two implementations  in ghdl, one to support IVI  VPI and one for 
VHPI.  See grt-vpi.ads, grt-vpi.adb, grt-avhpi.ads and grt-avhpi.adb.  Both are 
limited subsets.

The implementation doesn't seem complete enough to extend functionality for 
what you are trying to do.  I'd consider extending VHPI in ghdl to be one of 
those things that are possible with the requisite and knowledgeable programming 
talent.  There are likely things in ghdl with higher priority.

The ability to use foreign subprograms as currently supported by ghdl is 
sufficient to support functionality provided by VHPI when limiting the scope to 
what's visible in a process statement.   You'd need to write a package 
containing enumeration conversions for types and type signaling to C and would 
be counting on sequential statements invoking function calls for order.  The 
VHDL code would be big and clumsy and would be in effect a subset of VHPI 
functionality in 'user-space'.  The effort might be better used extending 
ghdl's VHPI support although would be a wonderful learning experience.


_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to