In Estimating Execution Time Before Writing RTL, I described why the clock period matters. For many architecture choices, however, I first focus on the total number of cycles. If the clock periods are similar, the area–time product (AT) is closely related to the amount of computation and the hardware needed to perform it.

Reducing the amount of computation

Suppose we need to add 16 values. We could build one adder and reuse it over many cycles, or build four adders and finish in fewer cycles. Ignoring clock-period differences and extra control or storage overhead, these choices can have similar AT products.

But what if the input data has a useful property?

Imagine the 16 values are symmetric: the first equals the last, the second equals the second-to-last, and so on. We now need to sum only eight unique values and double the result. The amount of addition work can be reduced substantially, which can also improve AT.

This is a simple example of a general rule: remove unnecessary computation before optimizing the hardware that performs it.

Sharing idle hardware

Real algorithms usually use several kinds of operations: addition, subtraction, multiplication, division, and storage. Reducing the operation count is only the first step.

Suppose our design has two stages, A and B. The diagram shows when each functional unit is active.

Hardware usage before sharing resources between stages

In RTL, we often write separate algorithms as separate modules. This makes the design easier to organize, but it may also lead to dedicated hardware that sits idle for part of the execution.

For example, if stage A no longer needs its multiplier when stage B starts, we may be able to reuse A’s multiplier for B. A multiplexer selects the correct inputs at each stage.

Registers are also worth sharing

Register sharing can be just as important, and sometimes even more valuable.

We often store many intermediate values, but some of them are no longer needed after a particular stage. Instead of allocating another register bank for stage B, we can reuse storage from stage A when their live ranges do not overlap.

This requires additional selection logic and careful control of data lifetimes. Still, registers occupy real area. As I discussed in Estimating Hardware Area Before Synthesis, storage is not free and can be comparable to arithmetic units in some rough architectural estimates.

Hardware usage after sharing idle resources

My approach

When optimizing AT under a timing requirement, I usually proceed in this order:

  1. Reduce the computation: exploit mathematical properties and eliminate redundant operations.
  2. Reuse idle resources: share functional units and registers when their active periods do not overlap.

Sharing does add multiplexers and can affect timing, so I still need to check the actual synthesis results. But these two ideas are a useful starting point before writing a large amount of RTL.