While you are shopping you run into your supervisor from last year. He is now forming a startup company and is writing up the design guidelines that all of its projects will follow. He asks for your advice on some potential guidelines.
What is your response to each question? What is the justification for your answer? What are the trade-offs between the options?
- Should all projects use an asynchronous reset signal, or should all use a synchronous reset signal, or should each project choose its own technique?
- Should all projects use latches, or should all use flip-flops, or should each project choose its own technique?
- Should all chips have registers on the inputs and outputs, or should chips have the inputs and outputs directly connected to combinational circuitry, or should each project choose its own technique? By "register" we mean either flip-flops or latches, based upon your answer to the previous question. If your answer is different for inputs and outputs, explain why.
- Should all circuit modules on all chips have registers on the inputs and outputs, or should modules have the inputs and outputs directly connected to combinational circuitry, or should each project choose its own technique? If your answer is different for inputs and outputs, explain why.
- Should all projects use tri-state buffers, or should all projects use multiplexers, or should each project choose its own technique?
The answers in brief
A good set of guidelines picks the option that is hardest to get wrong, and allows exceptions only with a reason. For a small company that cannot afford a respin, that usually means:
- Reset: one company-wide reset style. A common choice is an asynchronous reset that is applied asynchronously but released synchronously through a reset synchronizer. A fully synchronous reset is also a sound choice. What matters is consistency and a clean release of reset.
- Latches or flip-flops: flip-flops by default. They are easier to time, supported by every FPGA and cell library, and handled well by all tools. Latches only where a specialist team needs the speed or area.
- Chip inputs and outputs: register them. Board delays and noise are outside your control, and registers at the pins make the chip's timing independent of the board.
- Module inputs and outputs: pick one convention, usually registered outputs, and apply it everywhere. Registering both sides of every module wastes area and latency.
- Tri-states or multiplexers: multiplexers on chip. Tri-state buses depend on careful timing of enables and can short supply to ground during contention. Keep tri-states for chip pins and external buses.
Why consistency matters most
Guidelines are about reducing risk across many projects. When every block follows the same reset style, register convention and bus style, blocks can be reused and connected without surprises, timing can be estimated per block, and new engineers learn one way of working. Most of the choices above trade a little area or speed for a design that works the first time.
Deep dive: the numbers and details
This part holds the detailed reasoning, timing equations and code for each answer. Skip it if the overview is all you need.
1. Synchronous or asynchronous reset
The original answer on this page recommended a synchronous reset, on the grounds that an asynchronous reset that changes near a clock edge can leave some flip-flops reset in one cycle and others in the next, producing illegal state. That risk is real, but it comes from the release of an asynchronous reset, not from using one. Clifford Cummings, Don Mills and Steve Golson, in "Asynchronous and Synchronous Reset Design Techniques, Part Deux" (SNUG Boston 2003), conclude that both styles have distinct advantages and disadvantages and either can be used well, and they recommend that every ASIC using an asynchronous reset include a reset synchronizer.
| Synchronous reset | Asynchronous reset | |
|---|---|---|
| How it acts | Reset is just another data input, sampled on the clock edge | Resets the flip-flop immediately, with or without a clock |
| Strengths | Fully synchronous design; flip-flops can be smaller; glitches on reset are filtered by the clock | Reset logic stays out of the data path; works when the clock is not running |
| Weaknesses | Adds logic to the data path; needs the clock running during reset; reset pulse must be wide enough to be seen | Release near a clock edge can violate recovery and removal times; needs a synchronizer |
A standard reset synchronizer:
module reset_sync (input clk, input rst_n_in, output rst_n_out);
reg r1, r2;
always @(posedge clk or negedge rst_n_in)
if (!rst_n_in) begin r1 <= 1'b0; r2 <= 1'b0; end // assert immediately
else begin r1 <= 1'b1; r2 <= r1; end // release on clock edges
assign rst_n_out = r2;
endmodule
Reset reaches every flip-flop at once when asserted, and its release is aligned to the clock, so static timing analysis can check recovery and removal like any other path.
The original answer also said asynchronous reset needs less hardware. The SNUG paper points the other way for the flip-flop itself: synchronous reset logic can synthesize to smaller flip-flops, although the reset gating adds combinational logic. The difference per flip-flop is a gate or two either way.
2. Latches or flip-flops
A latch is transparent while its enable is active, so data can pass straight through. In a two-phase latch design, the two clock phases must not overlap; if they do, data races through two latches in one phase and arrives a phase early. Flip-flops only capture on an edge, so timing analysis is simpler. Some FPGA families and cell libraries offer limited latch support, while edge-triggered D flip-flops are always available.
The gain from latches is speed and area. A flip-flop is often built as two latches in master-slave form, so a latch is smaller. Latches also allow time borrowing: a slow stage can use part of the next stage's time. For a flip-flop path, the setup check is:
t_clk_to_q + t_logic + t_setup <= T_clk
For example, with t_clk_to_q = 80 ps, t_setup = 40 ps and a 1 GHz clock (1,000 ps), the logic may take at most 880 ps in every stage. With latches, a stage that needs 950 ps can borrow 70 ps from the next stage, as long as the total over the loop fits. That flexibility is why custom processor teams use latches, and why a startup without that expertise should not.
3. Registers at the chip boundary
Registering inputs and outputs at the pins makes the chip's internal clock rate independent of board trace delays and of the other chips' output timing. It also keeps board glitches and noise from reaching internal state machines. For an input that is not synchronous to the chip's clock, a register is not enough; it needs a two-flip-flop synchronizer. The cost is area and one or two cycles of extra latency through the chip.
4. Registers at module boundaries
Wire delay between modules on the same chip is usually much less than a clock period, so registering both sides of every module is rarely needed. Registering one side, typically outputs, gives every module a simple timing contract: whatever a module receives comes straight from a flip-flop, so its input logic has nearly a full cycle. Without such a rule, a combinational path could run through several modules, and the maximum clock rate would only be known after the whole chip is put together.
The cost is area and latency, and it blocks one optimization: merging the output logic of one module with the input logic of the next. Late in a project, teams sometimes move or remove registers between modules to meet timing (retiming or clock borrowing). That makes the low-level design differ from the specification and complicates functional verification and equivalence checking, so it should be a planned exception.
5. Tri-state buffers or multiplexers
A tri-state bus works only if exactly one driver is enabled at a time. During a change of driver, two drivers can briefly overlap and fight, causing bus contention, which draws large current from supply to ground; if no driver is enabled, the bus floats to an unknown level. Both problems depend on analog timing of the enables, which varies with voltage, temperature and process. A multiplexer works purely at the logic level, so it is insensitive to these variations, and synthesis, timing analysis and test tools handle it directly. Many FPGAs have no internal tri-state buses at all.
The original answer here said that "latches" can work incorrectly with voltage fluctuations and that "latches" are smaller and faster than multiplexers; both sentences meant tri-state buffers, and are corrected above. The real trade-off is that for a very wide bus with many sources, a tri-state bus uses one wire per bit, while a multiplexer tree needs more logic and wiring.
Interview angle
There is no single right answer to guideline questions. Interviewers listen for a reasoned default, a clear statement of the trade-off, and when you would allow an exception. Mentioning the reset synchronizer, time borrowing and bus contention shows you know where the real risks are.
Further reading
- Cummings, Mills and Golson: Asynchronous and Synchronous Reset Design Techniques, Part Deux (SNUG Boston 2003, PDF)
- Flip-flops and latches (Wikipedia)
- Tri-state buffer (Wikipedia)


Your comments will be moderated before it appears here.