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.

Please help me out with VHDL code for sine wave with proper explanation

Status
Not open for further replies.

mohit1108

Newbie level 2
Joined
Mar 31, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
I am an electrical engineering student and working on the speed control of PMSM motor using FPGA kit SPARTAN 3E. I need sine wave generator code for 2-3 phase converter application

ia = sin θ. iq
ib = sin (θ-2Π/3). iq
ic = sin (θ+ 2Π/3). iq


iq= 8 bit input and θ is also a 8 bit input
ia,ib,ic are all 8 bit outputs. I need the VHDL code for getting ia,ib,ic
 

This is most commonly solved using a DDS/LUT. Normally, the table would be compressed, but that isn't needed here. You can use a single BRAM to store all 256 samples of phase A, and even all 256 samples of phase B (which are slightly offset from phase A). Phase C can be constructed from phase A and phase B. from here, the built in 18x18 multipliers can be used, followed by your choice of rounding scheme.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top