Re: Comments on DirectC


Subject: Re: Comments on DirectC
From: Stuart Sutherland (stuart@sutherland-hdl.com)
Date: Thu Sep 26 2002 - 10:27:54 PDT


At 10:15 PM 9/24/2002, Swapnajit Mittra wrote:
>...
> - The second reason is more pedantic - if DirectC is
> provided as an independent API, it should contain all the
> features of a standard API (like PLI).

[a copy of Swapnajit's full message is below]

I'd like to add my $0.02 worth on this one. I agree that there should be a
mechanism for C functions to call Verilog tasks. However, I strongly
disagree that the DirectC/Cblend-like capability added to SystemVerilog
should do EVERYTHING that can be done with the PLI. That would make the
integration far too convoluted--the goal is to provide a simple way to get
from Verilog to C. The goal IS NOT to provide yet another complicated
API. Trying to replace the PLI would also mean that the CC committee's
work for SystemVerilog 3.1 would not be done by March 31 2003. That March
deadline absolutely MUST be met, or there will be no DirectC/Cblend-like
capability in SystemVerilog 3.1. There is no room for compromise on that
deadline. Indeed, stretching the deadline to March 31 is already a
compromise that is going to make it very difficult for me, the SV LRM
editor, to have a final SystemVerilog 3.1 LRM by the deadlines I have.

In my opinion, the DirectC/Cblend-like capability is to serve three primary
purposes:

1) Provide a SIMPLE way for Verilog procedures and continuous assignments
to call C functions, without the overhead of the PLI.

2) Provide a BASIC interface for Bus Functional Models, so that IP models
in C can exchange data at a port-like boundary, without the overhead of the
PLI.

3) Provide a clean interface between Verilog and SystemC, such that
"modules" from each can co-exist in the same simulation without any
co-simulation overhead. Some limitations may need to be imposed in order
to provide this integration by March 2003.

If the CC committee takes on any more than this for SystemVerilog 3.1, I
would be deeply concerned that the committee will miss its March 2003
deadline. It is fine to leave some doors for future plans, of
course. SystemVerilog will continue to evolve after 3.1.

One more thought regarding Swapnajit's message. I do not think that the
DirectC/Cblend-like capability added to SystemVerilog needs go so far as to
allow mechanisms for event scheduling. That can be handled with the
Verilog HDL. Verilog sensitivity lists and other time controls can control
when C functions are called. If those C functions can call Verilog tasks,
that gives the C functions access to Verilog time controls. Leave anything
more complicated than that to the PLI--at least for SystemVerilog 3.1.

Just my thoughts... I'll keep quite again, now.

Stu

At 10:15 PM 9/24/2002, Swapnajit Mittra wrote:

> Hello all,
>
> Thanks Joao for a great presentations today.
> I have couple of comments on DirectC that I hope
> would not be inappropriate to raise here. Since
> this was my first participation, these issues may have been
> discussed in earlier meetings already. Also, all my
> comments are based on what I have seen in VCS doc.
> for DirectC - I am assuming the main framework will
> remain the same for SV too.
>
> o It appears to me (and somebody pointed this out during
> the meeting too) that in DirectC there is no straightforward
> way of calling a Verilog task from C function. I mention this
> because I run a Verilog PLI related website and I get the
> question on how to call a Verilog task from C function
> (reverse direction of PLI) regularly. I believe CBlend of
> Superlog provides this already. I think we should consider
> providing this feature in SV-CC too.
>
> o Does DirectC provide a callback mechanism (a la
> reason, data etc.) ? According to the DirectC manual
> that I have, it does not. Probably we should consider
> providing that too if DirectC is accepted as part of SV.
> There are two reasons for this:
> - The first reason is practical - as an end user, if I write
> an external application in C, I think I would rather prefer
> to use only one of acc_*, vpi_* or DirectC, but probably
> not a mixture of both of them - acc_ for callback and
> DirectC for fast execution.
> - The second reason is more pedantic - if DirectC is
> provided as an independent API, it should contain all the
> features of a standard API (like PLI).
>
> Comments ?
>--
>Swapnajit Mittra
>http://www.angelfire.com/ca/verilog
>
>________________________________________________________________
>GET INTERNET ACCESS FROM JUNO!
>Juno offers FREE or PREMIUM Internet access for less!
>Join Juno today! For your FREE software, visit:
>http://dl.www.juno.com/get/web/.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stuart Sutherland Sutherland HDL Inc.
stuart@sutherland-hdl.com 22805 SW 92nd Place
phone: 503-692-0898 Tualatin, OR 97062
www.sutherland-hdl.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



This archive was generated by hypermail 2b28 : Thu Sep 26 2002 - 10:34:31 PDT