Hi, I'm looking to integrate a FPGA based program into a PC based application. I understand i need to write a serial interfacing code on the FPGA side and an API on the PC side,considering i intend to use a RS 232 serial interface bet'n the PC and the FPGA board. I need help regarding the PC side API programming.I'll be using a 'C' program and would like to call the FPGA based functions. Can anyone suggest how i go about this?any references? TIA. Srinivas
interfacing a PC based program with a FPGA
Started by ●October 21, 2004
Reply by ●October 21, 20042004-10-21
"Srinivas" <srinivaserj@gmail.com> wrote in message news:18bc100b.0410210301.265232ef@posting.google.com...> Hi, > I'm looking to integrate a FPGA based program into a PC based > application. > I understand i need to write a serial interfacing code on the FPGA > side and an API on the PC side,considering i intend to use a RS 232 > serial interface bet'n the PC and the FPGA board. > I need help regarding the PC side API programming.I'll be using a 'C' > program and would like to call the FPGA based functions. > Can anyone suggest how i go about this?any references? > > TIA. > SrinivasAs I understand you need help writing a program in C to communicate with the serial port?! Then you'd better ask this question on a newsgroup related to the software programming not a FPGA or Verilog news group! Also you will need to provide some more information; at least the OS under which you are going to run your program. Regards Arash
Reply by ●October 21, 20042004-10-21
Srinivas wrote:> > Hi, > I'm looking to integrate a FPGA based program into a PC based > application. > I understand i need to write a serial interfacing code on the FPGA > side and an API on the PC side,considering i intend to use a RS 232 > serial interface bet'n the PC and the FPGA board. > I need help regarding the PC side API programming.I'll be using a 'C' > program and would like to call the FPGA based functions. > Can anyone suggest how i go about this?any references?You may want to find a good terminal emulator program rather than trying to write your own. The last time I write code for a serial port (under windows) it was a real PITA. But then you may be using a decent OS. But under any OS, you will be talking to the driver, not the serial port. If you have to write a program, try searching on the web for source code for a terminal emulator or similar project. There are lots of open source projects out there. -- Rick "rickman" Collins rick.collins@XYarius.com Ignore the reply address. To email me use the above address with the XY removed. Arius - A Signal Processing Solutions Company Specializing in DSP and FPGA design URL http://www.arius.com 4 King Ave 301-682-7772 Voice Frederick, MD 21701-3110 301-682-7666 FAX
Reply by ●October 21, 20042004-10-21
On Thu, 2004-10-21 at 04:01 -0700, Srinivas wrote:> Hi, > I'm looking to integrate a FPGA based program into a PC based > application. > I understand i need to write a serial interfacing code on the FPGA > side and an API on the PC side,considering i intend to use a RS 232 > serial interface bet'n the PC and the FPGA board. > I need help regarding the PC side API programming.I'll be using a 'C' > program and would like to call the FPGA based functions. > Can anyone suggest how i go about this?any references? > > TIA. > SrinivasIt would depend on your operating system. If it is Windows, then there are a couple helpful documents in Microsoft's MDSN site. Search for "Serial Communications C" or something like that. It will probably take 2 to 3 pages of code to setup the serial channel.
Reply by ●October 21, 20042004-10-21
Coding serial communication for DOS is simple since you can control the port registers directly, however it's not easy task in windows unless you familiar with C/C++, win32 API, MFC...if you own a VSC++ develope studio, there's some good examples, check for the project TTY
Reply by ●October 21, 20042004-10-21
Srinivas wrote:> Hi, > I'm looking to integrate a FPGA based program into a PC based > application. > I understand i need to write a serial interfacing code on the FPGA > side and an API on the PC side,considering i intend to use a RS 232 > serial interface bet'n the PC and the FPGA board. > I need help regarding the PC side API programming.I'll be using a 'C' > program and would like to call the FPGA based functions. > Can anyone suggest how i go about this?any references?Is serial interface a must? There are relatively cheap development boards available with either Ethernet or USB interface. Might be easier to start with and lot more bandwidth, too! Depends of course on your requirements, hobby project? Just my $0.02, HTH J.S.> TIA. > Srinivas
Reply by ●October 21, 20042004-10-21
Srinivas wrote:> Hi, > I'm looking to integrate a FPGA based program into a PC based > application. > I understand i need to write a serial interfacing code on the FPGA > side and an API on the PC side,considering i intend to use a RS 232 > serial interface bet'n the PC and the FPGA board. > I need help regarding the PC side API programming.I'll be using a 'C' > program and would like to call the FPGA based functions. > Can anyone suggest how i go about this?any references? > > TIA. > SrinivasSrinivas, Are you referring to programming the serial port under windows? Then see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp Oh, and try the big web secret >>www.google.com<< If you are asking this question, then do you have a Windows toolset? MicroShaft does have a free compiler available http://msdn.microsoft.com/visualc/vctoolkit2003/ However, I think the debugging facilities are not there. Here's an open sourced project that has a debugger included. http://www.openwatcom.org/product/features_content.html There are others, like cygwin. Or are you referring to distributed computing, e.g. RPC (Remote Procedure Call). In which case, I can't find references specific to FPGAs. Nor have I heard of formal RPC implementations WRT FPGAs. Hopefully, someone else has and thus give you a better answer if this is your question. If your application is simple enough, you should be able to derive some simple message passing on the serial line to call your FPGA C routines. Done that one many a time myself. HTH, Steve
Reply by ●October 21, 20042004-10-21
Srinivas wrote:> Hi, > I'm looking to integrate a FPGA based program into a PC based > application. > I understand i need to write a serial interfacing code on the FPGA > side and an API on the PC side,considering i intend to use a RS 232 > serial interface bet'n the PC and the FPGA board. > I need help regarding the PC side API programming.I'll be using a 'C' > program and would like to call the FPGA based functions. > Can anyone suggest how i go about this?any references? > > TIA. > SrinivasDepends on what OS you are running on the PC. If Linux look for ioperm (just google), if windows look for inpout32.dll. There are probably a lot of other choices, but these worked for me. The downside is that a Linux program using ioperm has to be run as root or setuid root, which of couse is a security risc. /NS
Reply by ●October 21, 20042004-10-21
Srinivas wrote:> Hi, > I'm looking to integrate a FPGA based program into a PC based > application. > I understand i need to write a serial interfacing code on the FPGA > side and an API on the PC side,considering i intend to use a RS 232 > serial interface bet'n the PC and the FPGA board. > I need help regarding the PC side API programming.I'll be using a 'C' > program and would like to call the FPGA based functions. > Can anyone suggest how i go about this?any references? > > TIA. > SrinivasGoto LCC for Windows web page: http://www.cs.virginia.edu/~lcc-win32/ In Free download section you can find the Windows API Documentation. I havn't check if this document have the API descriptions for serial port but I guess it should be in it. Even if it doesn't it is still a good reference for Windows programming. Note: Not suitable for .NET environment. Joe
Reply by ●October 22, 20042004-10-22
> Hi, > I'm looking to integrate a FPGA based program into a PC based > application.... ... Hello, is serial communication a must? If not you could use the PC parallel port (parport macro and associated software) and transfer data at 500KBytes/sec, no special semiconductors needed. Free sources available. see: http://www.xilinx.com/publications/xcellonline/xcell_45/xc_pdf/xc_seng45.pdf http://www.seng.de/dlk_interface_.html http://www.seng.de/dlk_.html with best regards, Peter Seng ############################# SENG digitale Systeme GmbH Im Bruckwasen 35 D 73037 Goeppingen Germany tel +7161-75245 fax +7161-72965 eMail p.seng@seng.de net http://www.seng.de #############################






