Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

configuration a spartan 3 with FX2LP in C++

Status
Not open for further replies.

JAVADHABIBI

Newbie level 6
Joined
Dec 9, 2016
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
125

Your requirement is not clear to me.
Do you want to build a s/w application such that a bit file stored in a PC is downloaded to the Spartan3 FPGA vis this Cypress chip providing USB connectivity?

but i want to configure a file in spartan 3 first and then transfer data.
Doesn't make much sense to me.
 

I'm not sure but I think the OP is trying to program the FX2LP firmware, as describe in the documentation at the link. Not sure why they are having a problem the app note seens pretty good to me. If they are yrying to program the firmware this question is not about FPGAs and should be moved.
 

yes, the c++ program will be application software.i want to create a single C++ program and when user run it,at first a .bit file will be prog in spartan-3 and then data transfer is started. i can transfer data in c++ .but i don't know how to prog spartan-3 in c++.
the sample application of cypress is in c#.is there any sample code for C++ or any other guide?
thanks:roll:
 

You don't program the FPGA in C++ unless you buy a high level synthesis package.

You seem to be confused between the firmware running on the embedded processor of the FX2LP USB interface chip and an FPGA that interfaces with the FX2LP to give the FPGA an interface with a USB port.

The FPGA is usually developed separately from the firmware/software and is done in VHDL or Verilog.

I get the impression you've never worked with FPGAs before, and are perhaps are not very versed in digital design. Lacking either or both of these skills will make doing this project very difficult (maybe even impossible).
 

thank U, but the problem is not vhdl code.it is a method that dosent use any EEprom for FPGA to not saving any VHDL source on the board. it called soft-programing.
is there any solution?
 

is there any solution?

If you cannot explain your requirement and environment in clear and distinct way then members will just speculate and you can never find what you are looking for.

- - - Updated - - -

i want to create a single C++ program and when user run it, at first a .bit file will be prog in spartan-3 and then data transfer is started. i can transfer data in c++ .but i don't know how to prog spartan-3 in c++.

Most FPGA developers use Xilinx tools (Altera users use Altear tools) to send a .bit file from PC HDD to the connected FPGA. Rarely do we use a 3rd party s/w. So I guess you should contact the FPGA vendor to know the details of how a .bit file is sent over an USB interface (if they are willing to give the info).

Alternatively a TCL script or a Python script might be used to download a .bit in to the FPGA. But again the Xilinx/Altera tools are indirectly used.

I am again speculating, so I might be wrong!
 

You certainly can use microcontrollers or ARM processors for command and control purposes. I'm not familiar enough with the FX line to say if they can do thing alone.
 

Thanks All.
Excuse Me if my question isn't clearly ٍExpressed.
:oops:
 

From your Cypress link:

This is an Obsolete Application Note
The document AN63620 - Configuring a Xilinx Spartan-3E FPGA Over USB Using EZ-USB FX2LP™ has been marked as obsolete. The obsolete version of this application note is still available with the below description but may not be complete or valid any longer. If you have any questions or require support in regards to the below application note content, please click here and create a technical support case.


I would contact Cypress and find out why it is obsolete (since July) before trying to use it.

Also, scroll down the page to a link for code examples, under the heading 'Code Examples'...
 

very very thanks bking!
because you understand me!:razz:
the example code that cypress offers in that link, is a C# code.but my rest of project (a logic analyzer) is in Qt.
do you see any C++ or specifically Qt code example?
 

the example code that cypress offers in that link, is a C# code.but my rest of project (a logic analyzer) is in Qt.
do you see any C++ or specifically Qt code example?

Is it really that hard to read the C# code and write your own Qt or C++ version of it? Most people...would have already done that around December 10th and been done with it by the 11th and had everything working before now (December 21)...

How about picking up some new knowledge and perhaps get at minimum the ability to read C# code.

very very thanks bking!
because you understand me!:razz:
Nobody could understand you, your first post and all subsequent posts make no sense what so ever. It was just an observation made by bking on the state of the application note and that you kept asking about C++ (i.e. code), so they mentioned the app note has a link to code.
 

hi ads-ee , there is no Quarrel!
i need your help.
learning c# is possible.but libraries is not available for me in Qt.
it is the page 8 of first link app.note:
Capture.PNG
thanks for replying soon.
 
Last edited:

Your problem is not a FPGA problem but is a problem with how to link libraries from a different language, which I'm pretty sure is possible (I'm not a software programmer). A DLL should work for any language that uses calls from it. I've only heard of issues with these kinds of things when there is some issue with endianess or other incompatibility at the lowest levels that wasn't handled.

You really need to be asking this in the microcontroller or software sections.

Specifically: How do I call a DLL library (that I think was written in C#) from a Qt/C++ program?

searching for that yields stuff like:
https://stackoverflow.com/questions/13293888/how-to-call-a-c-sharp-library-from-native-c-using-c-cli-and-ijw
or
https://stackoverflow.com/questions/778590/calling-c-sharp-code-from-c
both links go way beyond my software knowledge.
 

It looks like there is also cyapi. It looks like they have static libs for old versions of visual studio, but provide the source. You might be able to compile a newer lib or a dll. Or maybe a dll already exists.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top