Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Output a VHDL Floating Point through Spartan 3AN

Status
Not open for further replies.

Mohammed Sheere

Newbie level 1
Joined
May 12, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
13
Helloo every one,

I'm working on a VHDL project, where i need to output a small (about 10 sec) audio file from Spartan 3AN board. I'm using ISE Xilinx 14.1.

i have the audio file, i did decompressed it and got the samples that i need with the size of each sample and i know the rate of outputing those sample to get the right sound. I even got all the voltage values of those samples.

All what's left is storing those values in a RAM and output them through the audio jack built in the board.

the Problem is, all those voltages values are ranging from -5.0 to 5.0 , and most of them have floating points like (-2.246821). i looked up in the internet and tried to find a solution on is there any floating point packages and i found this site http://www.vhdl.org/fphdl/index.html , BUT i don't know how to make them WORK !!!

IF anyone can please provide me with the steps of how to make those packages actually work, and make them give me the ability to actually use the (float) type deceleration in my design so i can output those voltage value in a FLOAT type , Please Help me !
 

ads-ee

Super Moderator
Staff member
Joined
Sep 10, 2013
Messages
7,655
Helped
1,774
Reputation
3,556
Reaction score
1,724
Trophy points
1,393
Location
USA
Activity points
57,835
You don't need to output floating point, I'm pretty sure the DAC that the board uses doesn't take in something like IEEE 754 (floating point). I also highly doubt the DAC accepts fixed point data either.

Usually DACs either take in offset binary or 2's complement binary. So what you want to do is scale the values of -5.0 to 5.0 to the -(2^N) to (2^N)-1 range (N being the bit width of the DAC). So what you want is a multiplier and truncate/round off the least significant bits to obtain N-bits that are sent to the DAC.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top