Altera Forum






Threads: 19,055
Posts: 77,930
Members: 29,419
Welcome to our newest member, The_General
User
Reputation
9142
7620
5941
4200
3030
2197
2056
1706
1388
1300




 
Register
Quick Search
 
  Altera Forums > Device and Tools Related > FPGA, Hardcopy, and CPLD Discussion

Real Implementation

Reply
 
Thread Tools Display Modes
  #1  
Old February 8th, 2010, 10:34 AM
cLaRe cLaRe is offline
Altera Teacher
 
Join Date: Jul 2008
Posts: 136
Rep Power: 853
cLaRe is on a distinguished road
Default Real Implementation

Hi,

Say I have two architectures, A and B with A having complexity of 36 ANDs, 99 XORs. Meanwhile B having complexity of 37 ANDs, 105 XORs. The complexity here is derived directly from its arithmetic properties.

When I compiled both architectures in Quartus, is there any possibility that the architecture A actually requires more LE and Registers compared to architecture B???

thanks
Reply With Quote
  #2  
Old February 8th, 2010, 10:56 AM
FvM FvM is online now
Altera Guru
 
Join Date: Dec 2007
Location: Bochum Germany
Posts: 3,288
Rep Power: 7223
FvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guruFvM is a guru
Default Re: Real Implementation

Is it a real problem? Do you mean AND and XOR with only two inputs each? Depending on the actual logic expression, they are combined by Quartus to a smaller amount of either four- or six-input LUTs (depending on the FPGA family). So the required number of LEs can be different. You didn't talk about registers at all.
Reply With Quote
  #3  
Old February 8th, 2010, 01:00 PM
BadOmen's Avatar
BadOmen BadOmen is offline
Super Moderator
 
Join Date: Aug 2004
Location: San Jose
Posts: 795
Rep Power: 3077
BadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to all
Default Re: Real Implementation

On a Cyclone device for example (4 input LUT) you could have something like this consume a single logic element:

assign x = a & b;
assign y = c & d;
assign z = x & y;

The reason why is in the end z is just a & b & c & d which fits into a 4 input lookup table. FPGAs treat the inputs a-d as the address of the lookup table in the logic element. When you program the FPGA the table has all 16 addresses programmed with the various combinations of a-d. So in the example above addresses 0-14 would be '0' and address 15 would store a '1'. Then when a-d are all high they hit address 15 and a '1' comes out of a LUT.

Like FvM said the results can vary depending on the lookup table size and the logic function you attempt to implement (and what synthesis decides works best). The Stratix II and beyond line of FPGAs include ALUTs which can be split into two lookup tables of various sizes with two registers as well. The logic footprint of FPGAs doesn't directly map to what you would expect from an ASIC since the logic functions are implemented in memory and not gates.

Page 3 of this document gives you a pretty good idea what an logic element looks like: http://www.altera.com/literature/lit-cyc2.jsp
Reply With Quote
  #4  
Old February 8th, 2010, 06:42 PM
cLaRe cLaRe is offline
Altera Teacher
 
Join Date: Jul 2008
Posts: 136
Rep Power: 853
cLaRe is on a distinguished road
Default Re: Real Implementation

Quote:
Originally Posted by FvM View Post
Is it a real problem? Do you mean AND and XOR with only two inputs each? Depending on the actual logic expression, they are combined by Quartus to a smaller amount of either four- or six-input LUTs (depending on the FPGA family). So the required number of LEs can be different. You didn't talk about registers at all.

The input is just a one byte std_logic_vector and the architecture performs several simple arithmetic using only AND gates and XOR gates.
Reply With Quote
  #5  
Old February 8th, 2010, 06:48 PM
cLaRe cLaRe is offline
Altera Teacher
 
Join Date: Jul 2008
Posts: 136
Rep Power: 853
cLaRe is on a distinguished road
Default Re: Real Implementation

Quote:
Originally Posted by BadOmen View Post
On a Cyclone device for example (4 input LUT) you could have something like this consume a single logic element:

assign x = a & b;
assign y = c & d;
assign z = x & y;

The reason why is in the end z is just a & b & c & d which fits into a 4 input lookup table. FPGAs treat the inputs a-d as the address of the lookup table in the logic element. When you program the FPGA the table has all 16 addresses programmed with the various combinations of a-d. So in the example above addresses 0-14 would be '0' and address 15 would store a '1'. Then when a-d are all high they hit address 15 and a '1' comes out of a LUT.

Like FvM said the results can vary depending on the lookup table size and the logic function you attempt to implement (and what synthesis decides works best). The Stratix II and beyond line of FPGAs include ALUTs which can be split into two lookup tables of various sizes with two registers as well. The logic footprint of FPGAs doesn't directly map to what you would expect from an ASIC since the logic functions are implemented in memory and not gates.

Page 3 of this document gives you a pretty good idea what an logic element looks like: http://www.altera.com/literature/lit-cyc2.jsp
Thanks! so the logic footprint of FPGA doesnt directly map to what we will obtain from ASIC, how to I justify the real size / throughput achievable from my design?

another question, in FPGA, both AND and XOR utilize the same hardware area and critical path. what in ASIC implementation?
Reply With Quote
  #6  
Old February 8th, 2010, 08:13 PM
BadOmen's Avatar
BadOmen BadOmen is offline
Super Moderator
 
Join Date: Aug 2004
Location: San Jose
Posts: 795
Rep Power: 3077
BadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to all
Default Re: Real Implementation

I'm not sure of a good way to compare the two design types. You could probably estimate the gate count for an ASIC which would be similar to how I count the LE usage for small blocks of hardware in an FPGA.

In an ASIC I would expect the XOR gate to be larger and slower due to the additional transistors required when compared to an AND gate. Oddly enough I have never implemented an ASIC so I might be oversimplifying things. Just like with FPGAs the sythesis tools may change the footprint to optimize for speed, area, and power.
Reply With Quote
  #7  
Old February 8th, 2010, 08:21 PM
cLaRe cLaRe is offline
Altera Teacher
 
Join Date: Jul 2008
Posts: 136
Rep Power: 853
cLaRe is on a distinguished road
Default Re: Real Implementation

Quote:
Originally Posted by BadOmen View Post
I'm not sure of a good way to compare the two design types. You could probably estimate the gate count for an ASIC which would be similar to how I count the LE usage for small blocks of hardware in an FPGA.

In an ASIC I would expect the XOR gate to be larger and slower due to the additional transistors required when compared to an AND gate. Oddly enough I have never implemented an ASIC so I might be oversimplifying things. Just like with FPGAs the sythesis tools may change the footprint to optimize for speed, area, and power.
Thanks very much! Now I understand much better =)
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
real time running Fab_83 FPGA, Hardcopy, and CPLD Discussion 0 July 15th, 2009 10:12 AM
Real Type tkpro General Altera Discussion 8 April 9th, 2009 03:18 AM
Real number luis.nakamura General Altera Discussion 2 August 13th, 2008 02:02 AM
How to use real values in Altera ramakrishnan1987 Shared Material 1 February 6th, 2008 12:24 AM
Real time patch MFM Linux Forum 2 April 8th, 2006 07:21 AM


All times are GMT -8. The time now is 11:35 AM.