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.

Fix point Arithmetic

Status
Not open for further replies.

sheikh

Advanced Member level 4
Joined
Sep 10, 2007
Messages
104
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
2,008
Hello Dear
I want to use some arithmetic operations such as (+,_,*) in my design. The design is fix point. Could you please tell me, If I use (+,_,*) symbols in my vhdl code, is it synthesize correctly or not? Or I need to design the units ( n_bit full adder, for instance) then write the code structurally. ( consider it that, I don't start to coding, because I'm not sure about the true way)
Regards
Mostafa
 

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,300
+ - * are synthesizable - the performance between one device to another will vary because of the actual implementation of the synthesis tool , different architecture and available "hardened" logic components on the silicon die...

Division however, is synthesizable for constants and 2^n numbers only...you'll have to built your own logic if you want to do division
 
Last edited:
  • Like
Reactions: sheikh

    sheikh

    Points: 2
    Helpful Answer Positive Rating

sheikh

Advanced Member level 4
Joined
Sep 10, 2007
Messages
104
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
2,008
Thanks Dear shaiko
Could you please tell me which one is better for a design?
1_ using structural coding. 2_ using symbols ( I mean, using "+", instead of an adder unit)
Thanks in advance
Mostafa
 

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,300
Unless you're required to use specific logic components that may be inaccessible with the regular arithmetical operators - I see no point to use structural coding.

- - - Updated - - -

Even more, VHDL gives you a great tool (functions) to implement any pure combinatorial logic without resulting to structural coding.
 

sheikh

Advanced Member level 4
Joined
Sep 10, 2007
Messages
104
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
2,008
Thanks a lot
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,065
Helped
2,077
Reputation
4,171
Reaction score
2,030
Trophy points
1,393
Activity points
39,117
no need to write your own divider. both altera and xilinx provide divider ip cores.

also have a look at the new fixed point vhdl packages. for 93 compatible versions see WWW.vhdl.org/fphdl
 

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,300
TrickyDicky,
using IP's means that the user will have to result to structural coding...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top