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.

real to fixed point conversion

Status
Not open for further replies.

ammassk

Member level 2
Joined
Jul 19, 2012
Messages
43
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,606
Dear all,

I need to write a code for real numbers to bit vector conversion as the first step for the implementation of LDPC decoder. I have an array of real numbers that i want to convert into binary.I thought to write code for fixed point format. I used library ieee_proposed and the packages associated with this from the informations that i had got from the forums.Can anybody guide me to write code for these? Please send me a sample code of these if anybody has it?
 

Re: real to fixed poin tconversion

Where are these real numbers coming from? you cannot use real types in a design unless they are for constants or pre-synthesis setup. You cannot have real signals.

but to convert a real type, you need to use the to_ufixed(value, highbit, lowbit) and to_sfixed(value, highbit, lowbit) functions:

eg:
signal a : sfixed(9 downto -20);

a <= to_sfixed(-12.677, 9, -20); --convert -12.677 to fixed point signed with 10 integer bits and 20 fraction bits

or you could write:

a <= to_sfixed(-12.677, a) --uses size information from signal "a"

signal b : ufixed(7 downto -7);

b <= to_ufixed(1.887645372, 7, -7);
 

Yes I used the same functions. but lots errors came and ieee_proposed was not linked with the source. So what all packages I have to add for make it error free?


In LDPC decoder the input of the decoder is from the communication channel where noise is mixed with the code word after BPSK.So this will be represented as a matrix of real numbers. codewords after BPSK become matrix of 1 and -1 values. And noise is a random function.So before taking this into decoder I should convert it into bit vectors. What method I should follow for this?
 

yes i visited this site.From that only i got the idea about ieee_proposed library and associated packages. What are the packages and libraries I should include for making it error free?
 

you need only those library and packages. The code will be simulatable, but many tools wont support them at synthesis stage.
 

I need to implement in fpga. So for my project what should I do?
 

I believe some people refer to it as "work".
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top