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.

Fixed_package Optimization

Status
Not open for further replies.

Taher_Selim

Member level 5
Member level 5
Joined
Mar 26, 2008
Messages
83
Helped
11
Reputation
22
Reaction score
4
Trophy points
1,298
Location
Egypt
Activity points
1,801
Hello,
I had to use fixed_package in VHDL. In synthesis, alot of logic produced in my circuit. I have read in user guide of fixed_package that some generics can be changed in order to optimize the logic. it is mentioned typically that we can use the following as a package:


Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
package my_opt_fixed is
  new ieee.fixed_generic_pkg
  generic map (
     -- Truncate, don't round
    fixed_round_style    => IEEE.fixed_float_types.fixed_truncate,
    -- wrap, don't saturate
    fixed_overflow_style => IEEE.fixed_float_types.fixed_wrap,
    fixed_guard_bits     => 0,     -- Don't need the extra guard bits
    no_warning           => true   -- turn warnings off 
);


I created this package in separate file. In my design file I used "use work.my_opt_fixed.all;" instead of "use ieee.fixed_pkg.all;"
My problem is that synthesis tool (precision) can't recognize my_opt_fixed , it gives an error.

Do u have an idea how to control these generics?
I will be grateful also if you give me some hints about optimizing synthesis logic for fixed point operations.

Thanks in advance,
 
Last edited by a moderator:

If precision doesn't have a vhdl2008 option, you are out of luck. Genetics on packages are avhdl2008 option. Synth told don't generally support 2008 very well
 

Actually my design was synthesized without any errors. I wanted to make more optimization for the generated logic; I found in fixed_pkg user guide that some generics (overflow, rounding,..) are consuming much logic so I wanted to disable it as suggested in the user guide. however I am not quite sure how to change generics of a package. I will be grateful if someone can guide me
 

You create the package correctly. Did you compile it somewhere with your code?
If you did compile it, precision cant find the library.
 

I am newbie with precision, do u have idea how to direct precision to include my work library.
in Precision: I created new project, then added my code file and my package file and compiled both together. So I am not sure if you mean another linkage should be added.

P.S as a workaround: I am calling fixed point functions with generics that I need. for example I am calling resize as : resized_sig<=resize(orig_sig, 16, -15,fixed_wrap, fixed_truncate); this significantly reduces produced logic (it reduced around 130 Slice LUT).

Also Thanks for your prompt response and interest for help
 

I have never used precision - but you just need to include your package like any any other of your source files.
 

You should take a look into the precisionsyn_ref.pdf where you will find all the necessary commands. Spend a couple of hours going through the commands as it would enable you to efficiently write a synth script.

-work <library_name>
Specifies the name of the work library for compiling the content of the file. If not specified, then the work library name work is assumed.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top