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.

Communication FPGA and µC

Status
Not open for further replies.

hannachifaten

Member level 2
Member level 2
Joined
May 1, 2013
Messages
44
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,769
hello every one , i need help :sad:
i have to use communication between a FPGA and µC STM32, so i must send a PWM signal from µC to the FPGA card , but i need to know how i can recieve this signal into the spartan6 and what type of signal that must be sent .thanks

knowing that i'm beggner in FPGA ,
also i have another question , how to use chipsocope XILINX to see a sine wave like a sinusoidal signal of voltage ,
any help or suggestion please ,
thanks
 

i must send a PWM signal from µC to the FPGA card , but i need to know how i can recieve this signal into the spartan6 and what type of signal that must be sent

You have to use the same I/O protocol that your MCU uses.
For example, if the PWM signal from the CPU card is 0-3.3 volts - so you must use an FPGA bank that works with 3.3V

I don't really understand what you want to do with the PWM signal...suppose the FPGA gets the signal, what next ??

Code:
also i have another question , how to use chipsocope XILINX to see a sine wave like a sinusoidal signal of voltage

You don't. FPGA's are digital devices (square waves). A sinus wave is a good example of an analog signal.
 

You have to use the same I/O protocol that your MCU uses.
For example, if the PWM signal from the CPU card is 0-3.3 volts - so you must use an FPGA bank that works with 3.3V

I don't really understand what you want to do with the PWM signal...suppose the FPGA gets the signal, what next ??

Code:
also i have another question , how to use chipsocope XILINX to see a sine wave like a sinusoidal signal of voltage

You don't. FPGA's are digital devices (square waves). A sinus wave is a good example of an analog signal.

- i have a model of an alternator in my FPGA ( code VHDL) : Xilinx Spartan-6 XC6SLX16-2CSG324C so i must use an µController send a PWM to the excitation circuit ( hacheur buck ) , so i have to send a PWM from the µC to the XC6SLX16 , i don't know how can i use the interface between this card and the µC ,

- for the I/O of FPGA i have to use an adapater to make the voltatge the same 3.3V !!
- chipscope : yes, the FPGA is numeric but after the use of the CORDIC algorithm, I would like
* visualize the sine output of my FPGA on the ChipScope, but I do not know how,( i read that therse a possibility to see waves into Chipscope .... )
 

What MCU card are you using?
What FPGA card are you using ?

You can use any algorithm you wish - the output of your FPGA I/O's will forever be digital - either '0' of '1'...
 

What MCU card are you using?
What FPGA card are you using ?

You can use any algorithm you wish - the output of your FPGA I/O's will forever be digital - either '0' of '1'...

ok thanks a lot ,
i'm using STM32F217 , and i wish send a PWM signal to my FPGA , :cry:
or can i get the data out from FPGA as excel file or MATLAB file ?? my question how can i see my data out from FPGA :roll:
have you any documentation or videos for using chipscope for debugging my simulation
Also i have another question can i use kind of memeroy like DDR3 to stock the code between µC and FPGA ?
 

if you are sending a PWM signal to a pin of your FPGA, then you'll have to interprete this signal in your FPGA:
- make a counter to find out the frequency of the PWM
- a second counter starts when it sees a rising edge (start of 'up' time of the PWM signal) and stop at the falling edge.

The ratio of the two counters can be fed to the rest of your model

or can i get the data out from FPGA as excel file or MATLAB file
no

have you any documentation or videos for using chipscope for debugging my simulation
or you simulate your design in modelsim, active HDL or similar simulator, or you implement your design in an FPGA, and then you can start using chipscope to debug.
In both cases you'll need a good understanding of what you are doing and what you want to achieve (I have the impression you don't).

Also i have another question can i use kind of memeroy like DDR3 to stock the code between µC and FPGA
why would you do that?

the output of your FPGA I/O's will forever be digital - either '0' of '1'
true for the current existing FPGA's. We don't know what future will bring to us, but I assume they (Xilinx, Altera, ..) don't have ADC/DAC on their roadmap
 

if you are sending a PWM signal to a pin of your FPGA, then you'll have to interprete this signal in your FPGA:
- make a counter to find out the frequency of the PWM
- a second counter starts when it sees a rising edge (start of 'up' time of the PWM signal) and stop at the falling edge.

The ratio of the two counters can be fed to the rest of your model

no

or you simulate your design in modelsim, active HDL or similar simulator, or you implement your design in an FPGA, and then you can start using chipscope to debug.
In both cases you'll need a good understanding of what you are doing and what you want to achieve (I have the impression you don't).

why would you do that?


true for the current existing FPGA's. We don't know what future will bring to us, but I assume they (Xilinx, Altera, ..) don't have ADC/DAC on their roadmap

or you simulate your design in modelsim, active HDL or similar simulator, or you implement your design in an FPGA, and then you can start using chipscope to debug.
In both cases you'll need a good understanding of what you are doing and what you want to achieve (I have the impression you don't).
to answer to this question : in fact , i have a model of alternoter i must simulate this model in chipscope to get the sinus wave of the voltatge , after that i will connect this out put to my µC , this is the other part of my project :
- the first one is to send a PWM from µC to FPGA : thank u i'll try it
- the second one getting the out put from the FPGA to µC , i guess that i make an out put signal from FPGA and connect it to an ADC PORT of µC ( after using an adaptater of voltatge ( 5v to 3.3v )
you understand what i want to do ?
by the way i find how to visualize the sin wave in chipscop ;)
 

I think you are confused: you can't simulate in chipscope. Chipscope is used to look at DIGITAL signals inside a Xilinx FPGA.

Assuming you have a digital model of your alternator, I guess you could simulate the complete µC - 3phase driver - alternator system in a simulation environment.

by the way i find how to visualize the sin wave in chipscop ;)
Great!! - Could you make a printscreen an publish here? I would love to learn how. After 10 years of FPGA design and debugging with chipscope, I'm never too old to learn how I could do that.
 

I think you are confused: you can't simulate in chipscope. Chipscope is used to look at DIGITAL signals inside a Xilinx FPGA.

Assuming you have a digital model of your alternator, I guess you could simulate the complete µC - 3phase driver - alternator system in a simulation environment.


Great!! - Could you make a printscreen an publish here? I would love to learn how. After 10 years of FPGA design and debugging with chipscope, I'm never too old to learn how I could do that.

View attachment sin-wave.doc
that is the curve that i tried to create from FPGA with chipscope
 

oke - that's something different.
You have used a bus plot which is actually a representation of a series of digital signals.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top