 |
Threads: 19,055
Posts: 77,930
Members: 29,419
|
 |
User |
Reputation |
|
9142 |
|
7620 |
|
5941 |
|
4200 |
|
3030 |
|
2197 |
|
2056 |
|
1706 |
|
1388 |
|
1300 |
|
|
|
 |
|
|
 |

February 8th, 2010, 10:34 AM
|
|
Altera Teacher
|
|
Join Date: Jul 2008
Posts: 136
Rep Power: 853
|
|
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
|

February 8th, 2010, 10:56 AM
|
|
Altera Guru
|
|
Join Date: Dec 2007
Location: Bochum Germany
Posts: 3,288
Rep Power: 7223
|
|
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.
|

February 8th, 2010, 01:00 PM
|
 |
Super Moderator
|
|
Join Date: Aug 2004
Location: San Jose
Posts: 795
Rep Power: 3077
|
|
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
|

February 8th, 2010, 06:42 PM
|
|
Altera Teacher
|
|
Join Date: Jul 2008
Posts: 136
Rep Power: 853
|
|
Re: Real Implementation
Quote:
Originally Posted by FvM
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.
|

February 8th, 2010, 06:48 PM
|
|
Altera Teacher
|
|
Join Date: Jul 2008
Posts: 136
Rep Power: 853
|
|
Re: Real Implementation
Quote:
Originally Posted by BadOmen
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?
|

February 8th, 2010, 08:13 PM
|
 |
Super Moderator
|
|
Join Date: Aug 2004
Location: San Jose
Posts: 795
Rep Power: 3077
|
|
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.
|

February 8th, 2010, 08:21 PM
|
|
Altera Teacher
|
|
Join Date: Jul 2008
Posts: 136
Rep Power: 853
|
|
Re: Real Implementation
Quote:
Originally Posted by BadOmen
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 =)
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
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.
|