2

I've got a few VHDL files, which I can compile with ghdl on Debian. The same files have been adapted by some for an ASIC implementation. There's one "large area" implementation and one "compact" implementation for an algorithm. I'd like to write some more implementations, but to evaluate them I'd need to be able to compare how much area the different implementations would take.

I'd like to do the evaluation without installing any proprietary compilers or obtaining any hardware. A sufficient evaluation criteria would be an estimation of GE (gate equivalent) area, or the number of logic slices needed by some FPGA implementation.

nguthrie
  • 2,615
  • 6
  • 26
  • 43
Nakedible
  • 4,067
  • 7
  • 34
  • 40

2 Answers2

7

Start by counting the flip-flops (FFs). Their number is (almost) uniquely defined by the RTL code that you have written. With some experience, you can get this number by inspecting the code.

Typically, there is a good correlation between the #FFs and the overall area. An old rule of thumb is that for many designs, the combinatorial area will be about the same as the sequential area. For example, suppose the area count of a flip-flop is 10 gates in a gate array technology, then #FFs * 20 would give you an initial estimation.

Of course, the design characteristics have a significant influence. For datapath-oriented designs, the combinatorial area will be relatively larger. For control-oriented designs, the opposite is true. For standard-cell designs, the sequential area may be smaller because FFs are more efficient. For timing-critical designs, the combinatorial area may be much larger as a result of timing optimization by the synthesis tool.

Therefore, the remaining issue is to find out what a good multiplication factor is for your type of designs and target technology. The strategy could be to carry out some experiments, or to look at prior design results, or to ask others. From then on, estimating is a matter of multiplying the #FFs, known from your code, with that factor.

Jan Decaluwe
  • 2,405
  • 19
  • 18
  • It would seem I would have to start by attempting to understand your answer ;-) However, I don't need absolute values, I just need values I can compare to other implementations, so I don't need to estimate that much. Your explanations seems like a good guide in estimating the area needed by just looking at the code. However, I would hope to get some actual tool which would give me *some* concrete numbers, although the numbers obviously differ for each platform. – Nakedible May 30 '11 at 20:58
  • Then just start by comparing the #FFs. If you need a tool to come up with the #FFs, you're probably not yet qualified to write meaningful RTL code :-) – Jan Decaluwe May 30 '11 at 21:50
  • I'm definitely not qualified :-) But since it's an existing implementation I'm modifying, I can actually get stuff done without understanding it all that much. – Nakedible May 31 '11 at 05:35
  • I thought you said that you wanted to write some other implementations yourself. Anyway, understanding the FF count from your code is probably the easiest and most effective way to quickly get the insight you are looking for. – Jan Decaluwe May 31 '11 at 07:22
3

I'd like to do the evaluation without installing any proprietary compilers or obtaining any hardware.

Inspection will give you a rough idea but with all the optimisations that occur during synthesis you may find this level of accuracy too far removed from the end result.

I would suggest that you re-examine your reasons for avoiding "proprietary compilers" to perform the evaluation. I'm unaware of any non-proprietary synthesis tools for VHDL (though it has been discussed). The popular FPGA vendors provide free versions of their software for Windows and Linux which you could use to obtain accurate counts of resource usage. It should be feasible to translate the FPGA resource usage into something more meaningful for your target technology.

I'm not very familiar with the ASIC world but again there may be free (but proprietary) tools available for you to use.

Chiggs
  • 2,824
  • 21
  • 31
  • Actually yes, I could use a free tool from an FPGA vendor, if there are no non-proprietary alternatives. I would just need it to be a command-line program running on Linux not containing Eclipse or other such things just to compile VHDL. I will have to look around for such an offering. – Nakedible Jun 03 '11 at 09:44
  • @Nakedible I can only speak for Xilinx and Altera but both suites can run command-line only on Linux and are easily driven via Makefiles - refer to [this guide](http://www.altera.com/literature/hb/qts/qts_qii52002.pdf) to get you started. I assume that the free versions also play nicely but I've not tried using them so YMMV – Chiggs Jun 03 '11 at 15:41