- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sir i use fixed-pkg to represent fraction bits,but when the output is 0.05118,whose binary representation is something like 0.00001101,in waveform i get only 0.should i use float_pkg to get the correct output?:cry:
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
do you have enough fractional bits in your signal?
and no, don't use float. without seeing the rest of your code we cant say what's wrong.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do you know in which step of the calculation the result is set to zero? I can't guess without knowing the component code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code has several length matching errors and doesn't compile. Also, what's the fpdiv component?
Assignments with length msimatch: p<= to_sfixed(i)*data_in; b<= (i*Pi); cv_q<=to_slv(b);- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ fvm sir,
ihave taken i (2 downto 0,data_in (14 bits),so in multiplication result is 16 bits. as i take i an ufixednumber,so i convert in in sfixed. now i take pi (ufixed(2 downto -7) ) so after multiplication it should be 6 downto -7,but i take b(b:ufixed(8 downto -8);) to match with the fixed point division 16 bit inputs. yep there is error,u r right,i will use correct range, other else.............. sir.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page