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.

FIFO -read and write fixed point data

Status
Not open for further replies.

fanwel

Full Member level 3
Joined
May 26, 2011
Messages
178
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,878
Hi all,

I try to write and read data into FIFO with vhdl. Can FIFO accept fixed point package as their input/output?
I just know that FIFO accept only integer type. Need helps,thank you..
 

what is an integer?

integer is just 32 bits

fixed point is also some number of bits which you can choose to be any number

think in terms of bits not in terms of data types. This will help.
 

The FIFO doesnt care what the data is. What FIFO are you using? the Xilinx and Altera ones have just a std_logic_vector input, so you just do a type convert on the way in and out. Otherwise its quite easy to build a custom fifo that takes fixed point (for a single clock). On a dual clock system, its easier to stick with the altera/xilinx IP versions (they do not use integer).
 

Hi all,

I use Megafunction of Altera FIFO and as Tricky said the data type is std_logic_vector. I want to write/read fixed point package.
So, know I need to write code for a type conversion from fixed point to std_logic_vector (on the way in and out) right? Thanks for reply..

---------- Post added at 01:24 ---------- Previous post was at 01:22 ----------

fixed point to std_logic_vector (on the way in) and std_logic_vector to fixed point (on the way out) ?
 

there are conversion functions in the fixed point package.
to_slv and to_ufixed/sfixed
 
  • Like
Reactions: fanwel

    fanwel

    Points: 2
    Helpful Answer Positive Rating
Hi TrickyDicky,

Yes you right. I use to_sfixed function to make the conversion.
Thanks for your helps..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top