Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Portable TCP/IP socket library

 
Thread Tools Search this Thread
Old 06-05-2007, 05:10 PM   #1
Default Portable TCP/IP socket library


Anyone has a good pointer to a portable (Windows, *nix) TCP/IP socket
library that can be used with VHDL FLI, Verilog PLI/VPI, SystemC, or
SystemVerilog DPI?

-- Amal



Amal
  Reply With Quote
Old 06-05-2007, 05:16 PM   #2
cs_posting@hotmail.com
 
Posts: n/a
Default Re: Portable TCP/IP socket library
On Jun 5, 11:10 am, Amal <akhailt...@gmail.com> wrote:
> Anyone has a good pointer to a portable (Windows, *nix) TCP/IP socket
> library that can be used with VHDL FLI, Verilog PLI/VPI, SystemC, or
> SystemVerilog DPI?


Have you tried just using the common (BSD-derived I suppose) socket
calls and found them not to work on both platforms, or somehow
incompatible with the simulation interfaces you mention?

I would think that if you just avoid vendor/os -specific extensions
you should be fine.




cs_posting@hotmail.com
  Reply With Quote
Old 06-05-2007, 07:59 PM   #3
HT-Lab
 
Posts: n/a
Default Re: Portable TCP/IP socket library

<> wrote in message
news: ups.com...
> On Jun 5, 11:10 am, Amal <akhailt...@gmail.com> wrote:
>> Anyone has a good pointer to a portable (Windows, *nix) TCP/IP socket
>> library that can be used with VHDL FLI, Verilog PLI/VPI, SystemC, or
>> SystemVerilog DPI?

>
> Have you tried just using the common (BSD-derived I suppose) socket
> calls and found them not to work on both platforms, or somehow
> incompatible with the simulation interfaces you mention?
>
> I would think that if you just avoid vendor/os -specific extensions
> you should be fine.
>


I believe that you should pay attention to OS specific examples, thus if
you use sockets on Modelsim's FLI running under windows then follow the
winsock examples, if you are running SystemC under Cygwin then follow the
libc/bsd coding style. In general they are very close and pragmas can make
your code portable. These example might help you out:

http://www.ht-lab.com/howto/fli_demo...i/uart2fli.htm
http://www.ht-lab.com/howto/fli_demo...mo/socket.html

Hans.
www.ht-lab.com





HT-Lab
  Reply With Quote
Old 06-06-2007, 01:24 PM   #4
EdA
 
Posts: n/a
Default Re: Portable TCP/IP socket library
On Jun 5, 12:10 pm, Amal <akhailt...@gmail.com> wrote:
> Anyone has a good pointer to a portable (Windows, *nix) TCP/IP socket
> library that can be used with VHDL FLI, Verilog PLI/VPI, SystemC, or
> SystemVerilog DPI?


Amal,

Try this link: http://www.sutherland-hdl.com/pli_book_examples.html

"David Roberts, of Cadence Design Systems, has provided a great
example using sockets to communicate between a PLI application and an
independently running C program. David has provided this example with
no restrictions on usage, under the GNU freeware license agreement."

Allegedly it works on Linux and Windows.

Enjoy,
/Ed



EdA
  Reply With Quote
Old 06-06-2007, 10:59 PM   #5
cs_posting@hotmail.com
 
Posts: n/a
Default Re: Portable TCP/IP socket library
On Jun 6, 7:24 am, EdA <ed.art...@gmail.com> wrote:

> Try this link:http://www.sutherland-hdl.com/pli_book_examples.html
>
> "David Roberts, of Cadence Design Systems, has provided a great
> example using sockets to communicate between a PLI application and an
> independently running C program. David has provided this example with
> no restrictions on usage, under the GNU freeware license agreement."
>
> Allegedly it works on Linux and Windows.


Yeah, and it's pretty simple. I did something like that a few years
back - I'd built a soft-core processor (at that point only in verilog
simulation), and wanted to write a debug monitor that could run on
it. So I grafted in some registers to make a little "dummy uart"
device that some pli code would monitor, and proxy the data to/from a
local tcp socket. Then I connected to that socket with hyperterminal
and "used" my simulated computer.



cs_posting@hotmail.com
  Reply With Quote
Old 06-07-2007, 07:24 PM   #6
Amal
 
Posts: n/a
Default Re: Portable TCP/IP socket library
On Jun 6, 8:24 am, EdA <ed.art...@gmail.com> wrote:
> On Jun 5, 12:10 pm, Amal <akhailt...@gmail.com> wrote:
>
> > Anyone has a good pointer to a portable (Windows, *nix) TCP/IP socket
> > library that can be used with VHDL FLI, Verilog PLI/VPI, SystemC, or
> > SystemVerilog DPI?

>
> Amal,
>
> Try this link:http://www.sutherland-hdl.com/pli_book_examples.html
>
> "David Roberts, of Cadence Design Systems, has provided a great
> example using sockets to communicate between a PLI application and an
> independently running C program. David has provided this example with
> no restrictions on usage, under the GNU freeware license agreement."
>
> Allegedly it works on Linux and Windows.
>
> Enjoy,
> /Ed


Ed,

I tried this library, but I am having problem with sending and
receiving data. I am not sure if Modelsim is doing something wrong,
but when I setup a server on the SystemVerilog side using DPI and send
data through a TCL client, the server keeps on one line of data and
keeps spitting out only the first line of data.

I wonder if anyone else has used this example?

-- Amal



Amal
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SFX Sound Effects Libraries - Cheap!! Barbara DVD Video 1 11-11-2006 12:23 PM
Socket Error and virtual memory Question BigDummy General Help Related Topics 1 10-12-2006 02:33 PM
Zalman CNPS9500-AM2 Socket AM2 Low Noise Heatsink Review Silverstrand Front Page News 0 05-26-2006 01:13 PM
Portable DVD Player John.P.McDevitt@gmail.com DVD Video 3 02-27-2006 12:34 AM
Connecting portable DVD player with Playstation 2? BigHeadAche DVD Video 1 01-07-2004 04:27 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46