Salta al contenuto
Note per Studenti Formulario · Digital Systems Report

FormularioDigital Systems: definizioni, teoremi e formule delle note, in ordine di capitolo

In questa pagina 5

III. Sequential Logic

Sequential Systems - State, Latches and Flip-Flops

Formula (characteristic equation of the D flip-flop). Q(t+1)=D(t)Q(t+1)=D(t), evaluated at the active edge.

Timing of Sequential Systems - Setup, Hold and Maximum Clock Frequency

Formula (minimum clock period). Adding a safety margin tslackt_{slack}: T ≥ tpd,FF+tCOMB+ts,FF+tslack,fmax=1Tmin.T\ \ge\ t_{pd,FF}+t_{COMB}+t_{s,FF}+t_{slack},\qquad f_{max}=\frac1{T_{min}} .

Formula (hold constraint). Output changes of a flip-flop must not reach another flip-flop (or itself) too early. With the minimum delays of flip-flop and network: tpd,FF,min⁡+tCOMB,min⁡ ≥ th.t_{pd,FF,\min}+t_{COMB,\min}\ \ge\ t_h .

Finite State Machines - Synthesis

Formula (bits to encode the states). To represent mm states we need n=⌈log⁡2m⌉n=\lceil\log_2m\rceil bits (2n≥m2^n\ge m). There are many possible encodings; fewer bits (fewer flip-flops) does not always mean lower cost: the combinational network matters too. Optimal encoding is a hard problem solved with heuristics. Two encodings are compared.

IV. Technologies, Registers and RTL

Implementation Technologies - CMOS Gates and Technology Parameters

Formula (transistor count). An nn-input NAND or NOR has 2n2n transistors (nn pMOS and nn nMOS); an inverter has 2; an AND (== NAND ++ inverter) has 2n+22n+2. This is why AND and OR cost more than NAND and NOR, which are also faster, and circuits are usually built with NAND/NOR.

Memories - ROM, RAM, SRAM and DRAM

Formula (RAM capacity). Capacity is the number of words 2k2^k times the bits per word: size=2k×n\text{size}=2^k\times n bits. Addresses go from 00 to 2k−12^k-1. The number of address bits kk is independent of nn.

Microoperations and RTL

Formula (arithmetic microoperations). Addition (++), subtraction (−-), increment (+1+1), decrement (−1-1), complement. Multiplication and division are not elementary: they are sequences of basic microoperations. An adder-subtractor with control signals XX (0 add, 1 subtract) and K1K_1: X‾K1: R1←R1+R2,XK1: R1←R1+R2‾+1.\overline X K_1:\ R_1\leftarrow R_1+R_2,\qquad XK_1:\ R_1\leftarrow R_1+\overline{R_2}+1 .

Datapath and Control Unit

Formula (flip-flop input with three logic microoperations). Di=Ai‾Bi C1+AiBi‾ C2+AiBi C3,C1=EXOR+OR, C2=EXOR+OR+H, C3=AND+OR+H.D_i=\overline{A_i}B_i\,C_1+A_i\overline{B_i}\,C_2+A_iB_i\,C_3,\quad C_1=EXOR+OR,\ C_2=EXOR+OR+H,\ C_3=AND+OR+H .

V. VHDL

VHDL - Entity, Architecture, Types and Description Levels

Formula (2-bit A>BA>B). A>B=A1B1‾+A0B1‾ B0‾+A1A0B0‾.A>B=A_1\overline{B_1}+A_0\overline{B_1}\,\overline{B_0}+A_1A_0\overline{B_0}.

VI. Computer Organization and Architecture

Simple Computer - Datapath, ALU and Register File

Formula (arithmetic part). An adder (nn full adders in cascade) with an input logic on BB producing YY and a carry-in CinC_{in}: G=A+Y+CinG=A+Y+C_{in}.

Simple Computer - Instruction Set, Single-Cycle and Multi-Cycle Control

Formula (single-cycle clock period). The period must be at least the sum of the delays of all blocks along the critical path, since in one cycle the signal crosses them in sequence.

block PC instr. memory register file (read) MUX B function unit or data memory MUX D register file (write)
delay (ns) 0.2 4 0.6 0.2 4 0.2 0.6

Sum =0.2+4+0.6+0.2+4+0.2+0.6=9.8=0.2+4+0.6+0.2+4+0.2+0.6=9.8 ns, so fmax≈102f_{max}\approx102 MHz.

Pipelining and Hazards

Formula (cycles for NN instructions). In the first k−1k-1 cycles not all stages are busy (the pipeline fills), likewise at the end (it empties). NN instructions need k+N−1k+N-1 cycles: 7 instructions on 4 stages take 1010 cycles. A single instruction on a 6-stage pipeline takes 66 cycles (the latency). In steady state one instruction completes per cycle, with at most kk instructions in flight.

VII. Memory and Input-Output

Main Memory - RAM, ROM and Chip Organisation

Formula (RAM capacity). size=2k×n\text{size}=2^k\times n bits: 2k2^k words of nn bits; addresses run from 00 to 2k−12^k-1. The number of address bits kk is independent of nn.

Memory Hierarchy and Cache Memory

Formula (average access time). The CPU should find the data in the cache as often as possible: cache hit = data in the cache; hit rate = percentage of hits. Otherwise a cache miss occurs (miss rate) and the data are fetched as a block from the other memories. A standard model is tavg=thit+miss rate⋅tpenaltyt_{avg}=t_{hit}+\text{miss rate}\cdot t_{\text{penalty}}: for thit=1t_{hit}=1 ns, miss rate 5%5\% and penalty 5050 ns, 1+0.05⋅50=3.51+0.05\cdot50=3.5 ns.