<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>EE260 (Spring, 2026) | Yao Zheng@UHM</title><link>https://gustybear.github.io/docs/exams/course_ece260_2026_spring/</link><atom:link href="https://gustybear.github.io/docs/exams/course_ece260_2026_spring/index.xml" rel="self" type="application/rss+xml"/><description>EE260 (Spring, 2026)</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Fri, 08 May 2026 00:00:00 +0000</lastBuildDate><image><url>https://gustybear.github.io/media/logo_hu_d0a0b1783c391ac0.png</url><title>EE260 (Spring, 2026)</title><link>https://gustybear.github.io/docs/exams/course_ece260_2026_spring/</link></image><item><title>Take-Home Midterm Exam: Combinational Logic and Advanced Verilog</title><link>https://gustybear.github.io/docs/exams/course_ece260_2026_spring/miterm_01_game/</link><pubDate>Fri, 27 Feb 2026 00:00:00 +0000</pubDate><guid>https://gustybear.github.io/docs/exams/course_ece260_2026_spring/miterm_01_game/</guid><description>&lt;p>&lt;strong>Scope:&lt;/strong> Number systems, Boolean algebra, multi-level optimization, hazards, arithmetic circuits, encoder/decoder/PLA/ROM, scalable MUX structures, parameterized Verilog&lt;br>
&lt;strong>Duration:&lt;/strong> 48 hours&lt;/p>
&lt;p>&lt;strong>Instructions&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Attempt &lt;strong>all&lt;/strong> questions. Show complete derivations and clearly state assumptions.&lt;/li>
&lt;li>Provide &lt;strong>commented, synthesizable Verilog&lt;/strong> and a &lt;strong>self-checking testbench&lt;/strong> where requested.&lt;/li>
&lt;li>Include timing and area reasoning (gate depth, gate count, or asymptotic arguments).&lt;/li>
&lt;li>No collaboration. Cite any references consulted.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="part-a--multiple-choice-10--3--30-pts">Part A — Multiple Choice (10 × 3 = 30 pts)&lt;/h2>
&lt;p>Select the &lt;strong>best&lt;/strong> answer.&lt;/p>
&lt;p>&lt;strong>Q1.&lt;/strong> Which transformation always preserves functional equivalence but may reduce logic depth?&lt;br>
a) Converting SOP to canonical SOP&lt;br>
b) Algebraic factoring&lt;br>
c) Expanding minterms&lt;br>
d) Adding consensus terms&lt;/p>
&lt;p>&lt;strong>Q2.&lt;/strong> A static-1 hazard occurs when:&lt;br>
a) Output should remain 1 but temporarily glitches to 0&lt;br>
b) Output should remain 0 but glitches to 1&lt;br>
c) Clock frequency is too high&lt;br>
d) Fan-out exceeds limit&lt;/p>
&lt;p>&lt;strong>Q3.&lt;/strong> For an N-bit ripple carry adder, worst-case delay is proportional to:&lt;br>
a) log₂N&lt;br>
b) N&lt;br>
c) √N&lt;br>
d) constant&lt;/p>
&lt;p>&lt;strong>Q4.&lt;/strong> Which gate set is functionally complete?&lt;br>
a) {XOR}&lt;br>
b) {AND, OR}&lt;br>
c) {NAND}&lt;br>
d) {XNOR}&lt;/p>
&lt;p>&lt;strong>Q5.&lt;/strong> In synthesizable combinational Verilog, the safest template is:&lt;br>
a) &lt;code>always @(posedge clk)&lt;/code>&lt;br>
b) &lt;code>always @(*)&lt;/code>&lt;br>
c) &lt;code>initial begin&lt;/code>&lt;br>
d) &lt;code>#5 y = a &amp;amp; b;&lt;/code>&lt;/p>
&lt;p>&lt;strong>Q6.&lt;/strong> A 16→1 multiplexer implemented as a balanced tree of 2→1 MUXes has depth:&lt;br>
a) 4&lt;br>
b) 8&lt;br>
c) 15&lt;br>
d) 16&lt;/p>
&lt;p>&lt;strong>Q7.&lt;/strong> ROM implementation size grows:&lt;br>
a) Linearly with inputs&lt;br>
b) Quadratically with inputs&lt;br>
c) Exponentially with inputs&lt;br>
d) Logarithmically with inputs&lt;/p>
&lt;p>&lt;strong>Q8.&lt;/strong> The consensus term of \(A'B + AC\) is:&lt;br>
a) BC&lt;br>
b) B&amp;rsquo;C&lt;br>
c) AB&lt;br>
d) A&amp;rsquo;C&lt;/p>
&lt;p>&lt;strong>Q9.&lt;/strong> Which operator performs bitwise XNOR in Verilog?&lt;br>
a) &lt;code>~^&lt;/code>&lt;br>
b) &lt;code>^~&lt;/code>&lt;br>
c) Both&lt;br>
d) None&lt;/p>
&lt;p>&lt;strong>Q10.&lt;/strong> A balanced adder tree reduces delay complexity from O(N) to:&lt;br>
a) O(1)&lt;br>
b) O(log N)&lt;br>
c) O(N²)&lt;br>
d) O(N log N)&lt;/p>
&lt;hr>
&lt;h2 id="part-b--design--analysis-10--7--70-pts">Part B — Design &amp;amp; Analysis (10 × 7 = 70 pts)&lt;/h2>
&lt;p>&lt;strong>Problem 1 — Multi-Level Optimization and Cost Analysis&lt;/strong>&lt;br>
Given&lt;br>
\(F(A,B,C,D,E)=\Sigma(1,3,4,7,11,15,16,18,19,23,27,31)\)&lt;/p>
&lt;p>a) Write canonical SOP and POS.&lt;br>
b) Minimize using K-map.&lt;br>
c) Factor to reduce depth.&lt;br>
d) Compare literal count and logic depth between two-level and factored implementations.&lt;/p>
&lt;p>&lt;strong>Problem 2 — Hazard Analysis&lt;/strong>&lt;br>
Given&lt;br>
\(F(A,B,C)=A'B+AC\)&lt;/p>
&lt;p>a) Identify static hazards and show transition causing glitch.&lt;br>
b) Add minimal consensus terms to eliminate hazard.&lt;br>
c) Estimate glitch width assuming uniform 1 ns gate delay.&lt;/p>
&lt;p>&lt;strong>Problem 3 — NAND-Only Realization&lt;/strong>&lt;br>
a) Prove NAND is functionally complete.&lt;br>
b) Implement \(F(A,B,C)=AB+A'C\) using only 2-input NAND gates.&lt;br>
c) Count gates and compute logic depth.&lt;/p>
&lt;p>&lt;strong>Problem 4 — 32→5 Priority Encoder&lt;/strong>&lt;br>
a) Define truth table with D31 highest priority and &lt;code>valid&lt;/code>.&lt;br>
b) Build hierarchically from 4→2 encoders.&lt;br>
c) Structural Verilog implementation.&lt;br>
d) Estimate worst-case delay if each 4→2 block delay = 2 ns.&lt;/p>
&lt;p>&lt;strong>Problem 5 — Shared PLA vs ROM Implementation&lt;/strong>&lt;br>
Given&lt;br>
\(F_1=\Sigma(0,2,5,8,10,13)\)&lt;br>
\(F_2=\Sigma(1,3,6,9,14,15)\)&lt;/p>
&lt;p>a) Minimize jointly and identify shared product terms.&lt;br>
b) Draw PLA matrix (AND plane and OR plane).&lt;br>
c) Determine memory size for equivalent 16×2 ROM.&lt;br>
d) Compare area tradeoffs.&lt;/p>
&lt;p>&lt;strong>Problem 6 — Balanced Adder Tree&lt;/strong>&lt;br>
Sum eight 12-bit numbers.&lt;/p>
&lt;p>a) Serial ripple accumulation: compute depth.&lt;br>
b) Balanced tree: draw structure and compute depth.&lt;br>
c) Determine required output width.&lt;/p>
&lt;p>&lt;strong>Problem 7 — Parameterized ALU&lt;/strong>&lt;/p>
&lt;p>Operations: ADD, SUB, AND, OR, XOR, CMP(==,&amp;gt;,&amp;lt;). Width parameter &lt;code>N&lt;/code>.&lt;/p>
&lt;p>a) Write synthesizable Verilog using &lt;code>unique case&lt;/code>.&lt;br>
b) Implement comparison efficiently (no redundant subtraction).&lt;br>
c) Provide self-checking randomized testbench.&lt;br>
d) Compare resource growth for N=8 and N=32.&lt;/p>
&lt;p>&lt;strong>Problem 8 — Recursive MUX Tree&lt;/strong>&lt;/p>
&lt;p>a) Implement a parameterized &lt;code>mux_tree #(N=16,W=8)&lt;/code> using &lt;code>generate&lt;/code>.&lt;br>
b) Ensure balanced structure.&lt;br>
c) Derive logic depth as function of N.&lt;br>
d) Provide synthesizable code.&lt;/p>
&lt;p>&lt;strong>Problem 9 — Gray/Binary Converters&lt;/strong>&lt;/p>
&lt;p>a) Derive 4-bit Gray→Binary and Binary→Gray equations.&lt;br>
b) Prove composition correctness.&lt;br>
c) Provide parameterized Verilog and exhaustive testbench.&lt;/p>
&lt;p>&lt;strong>Problem 10 — Power-of-Two Detector&lt;/strong>&lt;/p>
&lt;p>Design combinational circuit to detect if a 16-bit input is a power of two.&lt;/p>
&lt;p>a) Derive minimal Boolean condition.&lt;br>
b) Implement structural and behavioral Verilog versions.&lt;br>
c) Compare gate complexity.&lt;/p></description></item><item><title>Take-Home Midterm Exam: Sequential Circuits and Verilog</title><link>https://gustybear.github.io/docs/exams/course_ece260_2026_spring/miterm_02_game/</link><pubDate>Tue, 28 Oct 2025 00:00:00 +0000</pubDate><guid>https://gustybear.github.io/docs/exams/course_ece260_2026_spring/miterm_02_game/</guid><description>&lt;p>&lt;strong>Scope:&lt;/strong> Sequential logic, finite state machines, registers, counters, with Verilog modeling&lt;br>
&lt;strong>Duration:&lt;/strong> 48 hours&lt;br>
&lt;strong>Instructions&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Attempt &lt;strong>all&lt;/strong> questions. Show reasoning, derivations, and clearly state assumptions.&lt;/li>
&lt;li>Provide &lt;strong>commented, synthesizable Verilog&lt;/strong> and a &lt;strong>self‑checking testbench&lt;/strong> where requested.&lt;/li>
&lt;li>Include brief timing/area reasoning (big‑O style or gate/count estimates).&lt;/li>
&lt;li>No collaboration. Cite any external references you consulted.&lt;/li>
&lt;li>Tutorial of Online tools for Verilog simulation can be found
.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="part-a--multiple-choice-10--3-pts--30-pts">Part A — Multiple Choice (10 × 3 pts = 30 pts)&lt;/h2>
&lt;p>Select the &lt;strong>best&lt;/strong> answer.&lt;/p>
&lt;p>&lt;strong>Q1.&lt;/strong> Why are &lt;strong>edge-triggered flip-flops&lt;/strong> preferred over level-sensitive latches in synchronous systems?&lt;br>
A. They reduce power consumption&lt;br>
B. They eliminate race-through conditions&lt;br>
C. They operate at higher frequency inherently&lt;br>
D. They require fewer transistors&lt;/p>
&lt;p>&lt;strong>Q2.&lt;/strong> A setup time violation occurs when:&lt;br>
A. Data arrives too early before the clock edge&lt;br>
B. Data arrives too late before the clock edge&lt;br>
C. Data changes too slowly&lt;br>
D. Clock period is too long&lt;/p>
&lt;p>&lt;strong>Q3.&lt;/strong> Which of the following circuits is most prone to &lt;strong>metastability&lt;/strong>?&lt;br>
A. Combinational logic&lt;br>
B. Single flip-flop sampling asynchronous input&lt;br>
C. Synchronous counter&lt;br>
D. Registered pipeline&lt;/p>
&lt;p>&lt;strong>Q4.&lt;/strong> In a synchronous design, increasing combinational delay between registers will:&lt;br>
A. Increase hold margin&lt;br>
B. Reduce maximum clock frequency&lt;br>
C. Improve timing robustness&lt;br>
D. Eliminate hazards&lt;/p>
&lt;p>&lt;strong>Q5.&lt;/strong> A Moore FSM is generally more stable than a Mealy FSM because:&lt;br>
A. It uses fewer states&lt;br>
B. Outputs depend only on registered state&lt;br>
C. It requires no combinational logic&lt;br>
D. It runs at lower frequency&lt;/p>
&lt;p>&lt;strong>Q6.&lt;/strong> Which condition most directly causes a &lt;strong>hold time violation&lt;/strong>?&lt;br>
A. Data path too slow&lt;br>
B. Data path too fast&lt;br>
C. Clock period too long&lt;br>
D. Setup time too large&lt;/p>
&lt;p>&lt;strong>Q7.&lt;/strong> Consider the Verilog snippet:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-verilog" data-lang="verilog">&lt;span class="line">&lt;span class="cl">&lt;span class="k">always&lt;/span> &lt;span class="p">@(&lt;/span>&lt;span class="k">posedge&lt;/span> &lt;span class="n">clk&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="k">begin&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">q&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">d&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">end&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>What is the main issue?&lt;br>
A. Non-synthesizable&lt;br>
B. Blocking assignment may cause incorrect sequential behavior&lt;br>
C. Missing sensitivity list&lt;br>
D. No issue&lt;/p>
&lt;p>&lt;strong>Q8.&lt;/strong> Consider:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-verilog" data-lang="verilog">&lt;span class="line">&lt;span class="cl">&lt;span class="k">always&lt;/span> &lt;span class="p">@(&lt;/span>&lt;span class="k">posedge&lt;/span> &lt;span class="n">clk&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="k">begin&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">en&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">q&lt;/span> &lt;span class="o">&amp;lt;=&lt;/span> &lt;span class="n">d&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">end&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If en = 0, what happens to q?&lt;br>
A. Becomes 0&lt;br>
B. Becomes unknown&lt;br>
C. Holds previous value&lt;br>
D. Toggles&lt;/p>
&lt;p>&lt;strong>Q9.&lt;/strong> Which Verilog construct correctly models a synchronous reset flip-flop?&lt;br>
A.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-verilog" data-lang="verilog">&lt;span class="line">&lt;span class="cl">&lt;span class="k">always&lt;/span> &lt;span class="p">@(&lt;/span>&lt;span class="k">posedge&lt;/span> &lt;span class="n">clk&lt;/span> &lt;span class="k">or&lt;/span> &lt;span class="k">posedge&lt;/span> &lt;span class="n">rst&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>B.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-verilog" data-lang="verilog">&lt;span class="line">&lt;span class="cl">&lt;span class="k">always&lt;/span> &lt;span class="p">@(&lt;/span>&lt;span class="k">posedge&lt;/span> &lt;span class="n">clk&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>C.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-verilog" data-lang="verilog">&lt;span class="line">&lt;span class="cl">&lt;span class="k">always&lt;/span> &lt;span class="p">@(&lt;/span>&lt;span class="o">*&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>D. Both A and B&lt;/p>
&lt;p>&lt;strong>Q10.&lt;/strong> In FSM coding, separating state register and next-state logic helps:&lt;br>
A. Reduce power only&lt;br>
B. Improve readability and avoid unintended latches&lt;br>
C. Increase clock frequency directly&lt;br>
D. Eliminate combinational logic&lt;/p>
&lt;hr>
&lt;h2 id="part-b--sequential-design-analysis-and-schematic-10--7--70-pts">Part B — Sequential Design, Analysis, and Schematic (10 × 7 = 70 pts)&lt;/h2>
&lt;p>&lt;strong>Problem 1 — Hazard Propagation into Sequential Logic&lt;/strong>&lt;/p>
&lt;p>Given combinational logic feeding a flip-flop:&lt;/p>
&lt;p>\(F = A'B + AB'\)&lt;/p>
&lt;p>a) Determine whether a &lt;strong>static-1 hazard&lt;/strong> exists. Justify using Boolean reasoning&lt;br>
b) Draw a timing diagram where input transitions cause a glitch&lt;br>
c) Explain how this glitch can be &lt;strong>captured by a flip-flop&lt;/strong>&lt;br>
d) Modify the logic to eliminate the hazard and draw the corrected schematic&lt;br>
e) Explain why hazard removal is critical in synchronous pipelines&lt;/p>
&lt;p>&lt;strong>Problem 2 — Multi-Cycle Pulse Generator&lt;/strong>&lt;/p>
&lt;p>Design a synchronous circuit that generates an output pulse of &lt;strong>exactly 4 clock cycles&lt;/strong> upon detecting a rising edge on input &lt;code>x&lt;/code>.&lt;/p>
&lt;p>a) Define the required states and draw the FSM diagram&lt;br>
b) Provide a complete state transition table&lt;br>
c) Derive next-state equations&lt;br>
d) Draw the full schematic (flip-flops + combinational logic)&lt;br>
e) Describe behavior if &lt;code>x&lt;/code> is asserted again during the active pulse&lt;/p>
&lt;p>&lt;strong>Problem 3 — Self-Correcting Mod-6 Counter&lt;/strong>&lt;/p>
&lt;p>Design a synchronous &lt;strong>mod-6 counter (0–5)&lt;/strong> that &lt;strong>recovers automatically from invalid states&lt;/strong>.&lt;/p>
&lt;p>a) Draw the state transition diagram including invalid states&lt;br>
b) Specify recovery transitions&lt;br>
c) Choose a state encoding and justify&lt;br>
d) Derive next-state logic equations&lt;br>
e) Draw the complete schematic&lt;br>
f) Explain why self-correction is important in real hardware&lt;/p>
&lt;p>&lt;strong>Problem 4 — Sequence Detector with Overlap and Reset&lt;/strong>&lt;/p>
&lt;p>Design an FSM that detects the sequence &lt;code>1101&lt;/code> with overlap allowed.&lt;/p>
&lt;p>a) Draw the state diagram (minimal states)&lt;br>
b) Provide the state transition table&lt;br>
c) Derive output logic for a Mealy implementation&lt;br>
d) Convert to a Moore implementation&lt;br>
e) Compare:&lt;/p>
&lt;ul>
&lt;li>output timing&lt;/li>
&lt;li>number of states&lt;br>
f) Add a synchronous reset and explain its effect&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Problem 5 — Timing Closure and Pipeline Insertion&lt;/strong>&lt;/p>
&lt;p>A sequential circuit has:&lt;/p>
&lt;ul>
&lt;li>t_clk-q = 1 ns&lt;/li>
&lt;li>t_comb = 10 ns&lt;/li>
&lt;li>t_setup = 2 ns&lt;/li>
&lt;/ul>
&lt;p>a) Compute the minimum clock period and maximum frequency&lt;br>
b) Determine if the design meets a 100 MHz requirement&lt;br>
c) Insert one pipeline stage and redraw the system&lt;br>
d) Recompute timing after pipelining&lt;br>
e) Discuss:&lt;/p>
&lt;ul>
&lt;li>latency increase&lt;/li>
&lt;li>throughput improvement&lt;/li>
&lt;li>design tradeoffs&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Problem 6 — Serial Pattern Detection: Architecture Comparison&lt;/strong>&lt;/p>
&lt;p>Design a system to detect &lt;strong>five consecutive 1s&lt;/strong> in a serial bitstream.&lt;/p>
&lt;p>a) Implement using a &lt;strong>shift register approach&lt;/strong> (block diagram)&lt;br>
b) Implement using an &lt;strong>FSM approach&lt;/strong> (state diagram)&lt;br>
c) Compare:&lt;/p>
&lt;ul>
&lt;li>hardware cost&lt;/li>
&lt;li>detection latency&lt;/li>
&lt;li>scalability for longer patterns&lt;br>
d) Explain which design is preferred in ASIC vs FPGA contexts&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Problem 7 — Reliable Clock Domain Crossing (CDC)&lt;/strong>&lt;/p>
&lt;p>Design a system to safely transfer an &lt;strong>8-bit data word&lt;/strong> between two clock domains.&lt;/p>
&lt;p>a) Explain why a simple 2-FF synchronizer is insufficient&lt;br>
b) Draw a &lt;strong>handshake-based CDC architecture&lt;/strong>&lt;br>
c) Provide a timing diagram showing req/ack interaction&lt;br>
d) Explain how data integrity and ordering are preserved&lt;br>
e) Discuss limitations of this approach&lt;/p>
&lt;p>&lt;strong>Problem 8 — Glitch-Free Output Design&lt;/strong>&lt;/p>
&lt;p>An FSM controls a critical signal that must &lt;strong>never glitch&lt;/strong>.&lt;/p>
&lt;p>a) Explain why Mealy outputs may produce glitches&lt;br>
b) Convert a Mealy FSM into a glitch-free Moore FSM&lt;br>
c) Draw schematic with registered outputs&lt;br>
d) Analyze timing impact (one-cycle delay, stability)&lt;br>
e) Discuss when Mealy design is still preferred&lt;/p>
&lt;p>&lt;strong>Problem 9 — Sequential Resource Sharing&lt;/strong>&lt;/p>
&lt;p>Design a system to compute:&lt;/p>
&lt;p>\(Y = A + B + C + D\)&lt;/p>
&lt;p>using a &lt;strong>single adder reused over multiple cycles&lt;/strong>.&lt;/p>
&lt;p>a) Draw the datapath (registers, muxes, adder)&lt;br>
b) Design the control FSM (states and transitions)&lt;br>
c) Provide a cycle-by-cycle execution table&lt;br>
d) Compare with parallel implementation:&lt;/p>
&lt;ul>
&lt;li>area&lt;/li>
&lt;li>latency&lt;/li>
&lt;li>throughput&lt;br>
e) Explain when sequential reuse is advantageous&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Problem 10 — Fair Traffic Controller with Priority and Starvation Avoidance&lt;/strong>&lt;/p>
&lt;p>Design a traffic controller with:&lt;/p>
&lt;ul>
&lt;li>Main road (high priority)&lt;/li>
&lt;li>Side road (low priority)&lt;/li>
&lt;li>Pedestrian request input&lt;/li>
&lt;/ul>
&lt;p>a) Define system states and timing requirements&lt;br>
b) Draw FSM diagram&lt;br>
c) Explain how priority is enforced for main road&lt;br>
d) Design a mechanism to prevent starvation of side road and pedestrians&lt;br>
e) Ensure all transitions are safe (no conflicting greens)&lt;br>
f) Discuss how the design can scale to more lanes or intersections&lt;/p>
&lt;hr></description></item><item><title>Practice Final Exam</title><link>https://gustybear.github.io/docs/exams/course_ece260_2026_spring/final_practice/</link><pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate><guid>https://gustybear.github.io/docs/exams/course_ece260_2026_spring/final_practice/</guid><description>&lt;p>weight: 5&lt;/p>
&lt;h1 id="ece-260--practice-final-exam-2-hours">ECE 260 — Practice Final Exam (2 Hours)&lt;/h1>
&lt;p>&lt;strong>Course:&lt;/strong> ECE 260 Introduction to Digital Design&lt;br>
&lt;strong>Duration:&lt;/strong> 2 Hours&lt;br>
&lt;strong>Coverage:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Combinational Logic&lt;/li>
&lt;li>Sequential Logic&lt;/li>
&lt;li>FSM Design&lt;/li>
&lt;li>RTL Design&lt;/li>
&lt;li>Pipelines and Hazards&lt;/li>
&lt;li>Cache and Memory Hierarchy&lt;/li>
&lt;li>RISC Pipelines&lt;/li>
&lt;li>Out-of-Order Processors&lt;/li>
&lt;/ul>
&lt;h1 id="part-a--multiple-choice-15--2-pts--30-pts">Part A — Multiple Choice (15 × 2 pts = 30 pts)&lt;/h1>
&lt;p>Select the &lt;strong>best&lt;/strong> answer.&lt;/p>
&lt;h3 id="q1">Q1.&lt;/h3>
&lt;p>A structural hazard occurs when:&lt;/p>
&lt;ul>
&lt;li>A. Two pipeline stages require the same hardware resource&lt;/li>
&lt;li>B. A branch instruction changes PC&lt;/li>
&lt;li>C. The clock frequency is too high&lt;/li>
&lt;li>D. A cache miss occurs&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> A&lt;br>
Structural hazards occur due to hardware resource conflicts.&lt;/p>
&lt;h3 id="q2">Q2.&lt;/h3>
&lt;p>Which memory technology is typically used for CPU cache?&lt;/p>
&lt;ul>
&lt;li>A. DRAM&lt;/li>
&lt;li>B. SRAM&lt;/li>
&lt;li>C. Flash&lt;/li>
&lt;li>D. EEPROM&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> B&lt;br>
SRAM is faster and used for cache.&lt;/p>
&lt;h3 id="q3">Q3.&lt;/h3>
&lt;p>A Moore FSM output depends on:&lt;/p>
&lt;ul>
&lt;li>A. Inputs only&lt;/li>
&lt;li>B. Current state only&lt;/li>
&lt;li>C. Inputs and outputs&lt;/li>
&lt;li>D. Clock frequency&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> B&lt;/p>
&lt;h3 id="q4">Q4.&lt;/h3>
&lt;p>Forwarding in a pipeline mainly reduces:&lt;/p>
&lt;ul>
&lt;li>A. Structural hazards&lt;/li>
&lt;li>B. RAW hazards&lt;/li>
&lt;li>C. WAR hazards&lt;/li>
&lt;li>D. WAW hazards&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> B&lt;/p>
&lt;h3 id="q5">Q5.&lt;/h3>
&lt;p>Which cache organization generally has the fewest conflict misses?&lt;/p>
&lt;ul>
&lt;li>A. Direct mapped&lt;/li>
&lt;li>B. 2-way set associative&lt;/li>
&lt;li>C. Fully associative&lt;/li>
&lt;li>D. Write-through&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> C&lt;/p>
&lt;h3 id="q6">Q6.&lt;/h3>
&lt;p>A barrel shifter is primarily built from:&lt;/p>
&lt;ul>
&lt;li>A. Adders&lt;/li>
&lt;li>B. Flip-flops&lt;/li>
&lt;li>C. Multiplexers&lt;/li>
&lt;li>D. Decoders&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> C&lt;/p>
&lt;h3 id="q7">Q7.&lt;/h3>
&lt;p>In Verilog, nonblocking assignment uses:&lt;/p>
&lt;ul>
&lt;li>A. =&lt;/li>
&lt;li>B. &amp;lt;=&lt;/li>
&lt;li>C. ==&lt;/li>
&lt;li>D. :=&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> B&lt;/p>
&lt;h3 id="q8">Q8.&lt;/h3>
&lt;p>The maximum clock frequency of a processor is determined by:&lt;/p>
&lt;ul>
&lt;li>A. Shortest path delay&lt;/li>
&lt;li>B. Critical path delay&lt;/li>
&lt;li>C. Number of registers&lt;/li>
&lt;li>D. Cache size&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> B&lt;/p>
&lt;h3 id="q9">Q9.&lt;/h3>
&lt;p>Register renaming primarily removes:&lt;/p>
&lt;ul>
&lt;li>A. RAW hazards&lt;/li>
&lt;li>B. WAR and WAW hazards&lt;/li>
&lt;li>C. Cache hazards&lt;/li>
&lt;li>D. Structural hazards&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> B&lt;/p>
&lt;h3 id="q10">Q10.&lt;/h3>
&lt;p>Which pipeline hazard is caused by branch instructions?&lt;/p>
&lt;ul>
&lt;li>A. RAW&lt;/li>
&lt;li>B. Structural&lt;/li>
&lt;li>C. Control&lt;/li>
&lt;li>D. WAW&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> C&lt;/p>
&lt;h3 id="q11">Q11.&lt;/h3>
&lt;p>A flip-flop updates state on:&lt;/p>
&lt;ul>
&lt;li>A. Logic transitions only&lt;/li>
&lt;li>B. Clock edge&lt;/li>
&lt;li>C. Input enable&lt;/li>
&lt;li>D. Reset signal only&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> B&lt;/p>
&lt;h3 id="q12">Q12.&lt;/h3>
&lt;p>The reorder buffer (ROB) is mainly used in:&lt;/p>
&lt;ul>
&lt;li>A. FSM controllers&lt;/li>
&lt;li>B. Sequential datapaths&lt;/li>
&lt;li>C. Out-of-order processors&lt;/li>
&lt;li>D. SRAM arrays&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> C&lt;/p>
&lt;h3 id="q13">Q13.&lt;/h3>
&lt;p>Spatial locality means:&lt;/p>
&lt;ul>
&lt;li>A. Recently used data reused soon&lt;/li>
&lt;li>B. Nearby memory locations likely accessed&lt;/li>
&lt;li>C. Instructions always sequential&lt;/li>
&lt;li>D. Data stored in cache forever&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> B&lt;/p>
&lt;h3 id="q14">Q14.&lt;/h3>
&lt;p>Which stage performs arithmetic operations in a classic RISC pipeline?&lt;/p>
&lt;ul>
&lt;li>A. IF&lt;/li>
&lt;li>B. ID&lt;/li>
&lt;li>C. EX&lt;/li>
&lt;li>D. WB&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> C&lt;/p>
&lt;h3 id="q15">Q15.&lt;/h3>
&lt;p>Pipeline throughput improves because:&lt;/p>
&lt;ul>
&lt;li>A. Instructions execute simultaneously&lt;/li>
&lt;li>B. Clock frequency becomes zero&lt;/li>
&lt;li>C. Pipeline removes all hazards&lt;/li>
&lt;li>D. Cache misses disappear&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Solution:&lt;/strong> A&lt;/p>
&lt;h1 id="part-b--design-and-analysis-10--7-pts--70-pts">Part B — Design and Analysis (10 × 7 pts = 70 pts)&lt;/h1>
&lt;h1 id="problem-1--sequence-detector-fsm">Problem 1 — Sequence Detector FSM&lt;/h1>
&lt;p>Design a Moore FSM that detects the sequence:&lt;/p>
&lt;p>1011&lt;/p>
&lt;p>Overlapping sequences should be detected.&lt;/p>
&lt;h3 id="a">(a)&lt;/h3>
&lt;p>Draw the state diagram.&lt;/p>
&lt;h3 id="b">(b)&lt;/h3>
&lt;p>Define the state transition table.&lt;/p>
&lt;h3 id="c">(c)&lt;/h3>
&lt;p>Indicate which state produces output = 1.&lt;/p>
&lt;h3 id="d">(d)&lt;/h3>
&lt;p>Explain why a Moore FSM output changes more predictably than a Mealy FSM.&lt;/p>
&lt;h2 id="solution">Solution&lt;/h2>
&lt;h3 id="a-states">(a) States&lt;/h3>
&lt;ul>
&lt;li>S0 = initial&lt;/li>
&lt;li>S1 = detected &lt;code>1&lt;/code>&lt;/li>
&lt;li>S2 = detected &lt;code>10&lt;/code>&lt;/li>
&lt;li>S3 = detected &lt;code>101&lt;/code>&lt;/li>
&lt;li>S4 = detected &lt;code>1011&lt;/code>&lt;/li>
&lt;/ul>
&lt;h3 id="b-example-transitions">(b) Example transitions&lt;/h3>
&lt;ul>
&lt;li>S0 &amp;ndash;1→ S1&lt;/li>
&lt;li>S1 &amp;ndash;0→ S2&lt;/li>
&lt;li>S2 &amp;ndash;1→ S3&lt;/li>
&lt;li>S3 &amp;ndash;1→ S4&lt;/li>
&lt;/ul>
&lt;p>Overlapping:&lt;/p>
&lt;ul>
&lt;li>S4 &amp;ndash;0→ S2&lt;/li>
&lt;li>S4 &amp;ndash;1→ S1&lt;/li>
&lt;/ul>
&lt;h3 id="c-1">(c)&lt;/h3>
&lt;p>Output = 1 only in S4.&lt;/p>
&lt;h3 id="d-1">(d)&lt;/h3>
&lt;p>Moore outputs depend only on registered state, so outputs change only on clock edges.&lt;/p>
&lt;h1 id="problem-2--rtl-datapath-design">Problem 2 — RTL Datapath Design&lt;/h1>
&lt;p>Implement:&lt;/p>
&lt;p>if (SEL == 0)
X ← A + B
else
X ← A − B&lt;/p>
&lt;h3 id="a-1">(a)&lt;/h3>
&lt;p>Draw the datapath.&lt;/p>
&lt;h3 id="b-1">(b)&lt;/h3>
&lt;p>Identify required components.&lt;/p>
&lt;h3 id="c-2">(c)&lt;/h3>
&lt;p>Show control signals.&lt;/p>
&lt;h3 id="d-2">(d)&lt;/h3>
&lt;p>Explain how subtraction can be implemented using an adder.&lt;/p>
&lt;h2 id="solution-1">Solution&lt;/h2>
&lt;h3 id="a-datapath">(a) Datapath&lt;/h3>
&lt;p>Components:&lt;/p>
&lt;ul>
&lt;li>Register A&lt;/li>
&lt;li>Register B&lt;/li>
&lt;li>ALU&lt;/li>
&lt;li>X register&lt;/li>
&lt;li>Control line SEL&lt;/li>
&lt;/ul>
&lt;h3 id="b-2">(b)&lt;/h3>
&lt;p>Required hardware:&lt;/p>
&lt;ul>
&lt;li>Adder/Subtractor&lt;/li>
&lt;li>XOR bank for B inversion&lt;/li>
&lt;li>Carry-in control&lt;/li>
&lt;/ul>
&lt;h3 id="c-3">(c)&lt;/h3>
&lt;ul>
&lt;li>SEL=0 → addition&lt;/li>
&lt;li>SEL=1 → subtraction&lt;/li>
&lt;/ul>
&lt;h3 id="d-3">(d)&lt;/h3>
&lt;p>A - B = A + (~B) + 1&lt;/p>
&lt;p>Uses two’s complement arithmetic.&lt;/p>
&lt;h1 id="problem-3--pipeline-hazard-analysis">Problem 3 — Pipeline Hazard Analysis&lt;/h1>
&lt;p>Given:&lt;/p>
&lt;p>ADD R1,R2,R3
SUB R4,R1,R5
AND R6,R4,R7&lt;/p>
&lt;h3 id="a-2">(a)&lt;/h3>
&lt;p>Identify all RAW hazards.&lt;/p>
&lt;h3 id="b-3">(b)&lt;/h3>
&lt;p>Show where forwarding occurs.&lt;/p>
&lt;h3 id="c-4">(c)&lt;/h3>
&lt;p>Determine if stalls are required.&lt;/p>
&lt;h3 id="d-4">(d)&lt;/h3>
&lt;p>Explain how forwarding improves performance.&lt;/p>
&lt;h2 id="solution-2">Solution&lt;/h2>
&lt;h3 id="a-3">(a)&lt;/h3>
&lt;p>Hazards:&lt;/p>
&lt;ul>
&lt;li>SUB depends on ADD&lt;/li>
&lt;li>AND depends on SUB&lt;/li>
&lt;/ul>
&lt;h3 id="b-4">(b)&lt;/h3>
&lt;p>Forward:&lt;/p>
&lt;ul>
&lt;li>ADD EX/MEM → SUB EX&lt;/li>
&lt;li>SUB EX/MEM → AND EX&lt;/li>
&lt;/ul>
&lt;h3 id="c-5">(c)&lt;/h3>
&lt;p>No stalls if forwarding hardware exists.&lt;/p>
&lt;h3 id="d-5">(d)&lt;/h3>
&lt;p>Forwarding bypasses waiting for WB stage.&lt;/p>
&lt;h1 id="problem-4--cache-design">Problem 4 — Cache Design&lt;/h1>
&lt;p>Compare:&lt;/p>
&lt;ul>
&lt;li>Direct mapped&lt;/li>
&lt;li>2-way set associative&lt;/li>
&lt;li>Fully associative&lt;/li>
&lt;/ul>
&lt;h3 id="a-4">(a)&lt;/h3>
&lt;p>Draw organization of each.&lt;/p>
&lt;h3 id="b-5">(b)&lt;/h3>
&lt;p>Compare hardware complexity.&lt;/p>
&lt;h3 id="c-6">(c)&lt;/h3>
&lt;p>Compare conflict misses.&lt;/p>
&lt;h3 id="d-6">(d)&lt;/h3>
&lt;p>Which provides best performance and why?&lt;/p>
&lt;h2 id="solution-3">Solution&lt;/h2>
&lt;h3 id="direct-mapped">Direct mapped&lt;/h3>
&lt;ul>
&lt;li>Simplest&lt;/li>
&lt;li>Fastest indexing&lt;/li>
&lt;li>Highest conflict misses&lt;/li>
&lt;/ul>
&lt;h3 id="2-way-set-associative">2-way set associative&lt;/h3>
&lt;ul>
&lt;li>Better balance&lt;/li>
&lt;li>Moderate complexity&lt;/li>
&lt;/ul>
&lt;h3 id="fully-associative">Fully associative&lt;/h3>
&lt;ul>
&lt;li>Lowest conflict misses&lt;/li>
&lt;li>Requires many comparators&lt;/li>
&lt;/ul>
&lt;p>Best overall practical choice:
2-way or 4-way associative.&lt;/p>
&lt;h1 id="problem-5--register-file">Problem 5 — Register File&lt;/h1>
&lt;p>Design a register file with:&lt;/p>
&lt;ul>
&lt;li>8 registers&lt;/li>
&lt;li>2 read ports&lt;/li>
&lt;li>1 write port&lt;/li>
&lt;/ul>
&lt;h3 id="a-5">(a)&lt;/h3>
&lt;p>Draw block diagram.&lt;/p>
&lt;h3 id="b-6">(b)&lt;/h3>
&lt;p>Explain read operation.&lt;/p>
&lt;h3 id="c-7">(c)&lt;/h3>
&lt;p>Explain write operation.&lt;/p>
&lt;h3 id="d-7">(d)&lt;/h3>
&lt;p>Describe required decoders and multiplexers.&lt;/p>
&lt;h2 id="solution-4">Solution&lt;/h2>
&lt;h3 id="a-6">(a)&lt;/h3>
&lt;p>Components:&lt;/p>
&lt;ul>
&lt;li>8 registers&lt;/li>
&lt;li>Write decoder&lt;/li>
&lt;li>Two read MUXes&lt;/li>
&lt;/ul>
&lt;h3 id="b-7">(b)&lt;/h3>
&lt;p>Read ports select registers simultaneously.&lt;/p>
&lt;h3 id="c-8">(c)&lt;/h3>
&lt;p>Write decoder activates one register enable.&lt;/p>
&lt;h3 id="d-8">(d)&lt;/h3>
&lt;ul>
&lt;li>3-to-8 decoder&lt;/li>
&lt;li>Two 8-to-1 MUXes&lt;/li>
&lt;/ul>
&lt;h1 id="problem-6--barrel-shifter">Problem 6 — Barrel Shifter&lt;/h1>
&lt;p>Design a 4-bit rotate-left barrel shifter.&lt;/p>
&lt;h3 id="a-7">(a)&lt;/h3>
&lt;p>Show all possible rotations.&lt;/p>
&lt;h3 id="b-8">(b)&lt;/h3>
&lt;p>Draw multiplexer stages.&lt;/p>
&lt;h3 id="c-9">(c)&lt;/h3>
&lt;p>Determine number of multiplexers required.&lt;/p>
&lt;h3 id="d-9">(d)&lt;/h3>
&lt;p>Explain why barrel shifters are faster than iterative shifters.&lt;/p>
&lt;h2 id="solution-5">Solution&lt;/h2>
&lt;h3 id="a-8">(a)&lt;/h3>
&lt;p>Possible rotations:&lt;/p>
&lt;ul>
&lt;li>0&lt;/li>
&lt;li>1&lt;/li>
&lt;li>2&lt;/li>
&lt;li>3&lt;/li>
&lt;/ul>
&lt;h3 id="b-9">(b)&lt;/h3>
&lt;p>Two-stage MUX network:&lt;/p>
&lt;ul>
&lt;li>Shift by 1&lt;/li>
&lt;li>Shift by 2&lt;/li>
&lt;/ul>
&lt;h3 id="c-10">(c)&lt;/h3>
&lt;p>Requires:&lt;/p>
&lt;ul>
&lt;li>8 multiplexers total&lt;/li>
&lt;/ul>
&lt;h3 id="d-10">(d)&lt;/h3>
&lt;p>All shifts occur in parallel combinational hardware.&lt;/p>
&lt;h1 id="problem-7--five-stage-risc-pipeline">Problem 7 — Five-Stage RISC Pipeline&lt;/h1>
&lt;h3 id="a-9">(a)&lt;/h3>
&lt;p>Draw the 5 stages.&lt;/p>
&lt;h3 id="b-10">(b)&lt;/h3>
&lt;p>Describe purpose of each stage.&lt;/p>
&lt;h3 id="c-11">(c)&lt;/h3>
&lt;p>Indicate where hazards occur.&lt;/p>
&lt;h3 id="d-11">(d)&lt;/h3>
&lt;p>Explain why pipelining improves throughput.&lt;/p>
&lt;h2 id="solution-6">Solution&lt;/h2>
&lt;p>Pipeline:&lt;/p>
&lt;p>IF → ID → EX → MEM → WB&lt;/p>
&lt;h3 id="if">IF&lt;/h3>
&lt;p>Fetch instruction.&lt;/p>
&lt;h3 id="id">ID&lt;/h3>
&lt;p>Decode + register read.&lt;/p>
&lt;h3 id="ex">EX&lt;/h3>
&lt;p>ALU operation.&lt;/p>
&lt;h3 id="mem">MEM&lt;/h3>
&lt;p>Memory access.&lt;/p>
&lt;h3 id="wb">WB&lt;/h3>
&lt;p>Write register.&lt;/p>
&lt;p>Hazards:&lt;/p>
&lt;ul>
&lt;li>RAW in EX&lt;/li>
&lt;li>Control hazards after branch&lt;/li>
&lt;/ul>
&lt;p>Throughput improves by overlapping execution.&lt;/p>
&lt;h1 id="problem-8--branch-prediction">Problem 8 — Branch Prediction&lt;/h1>
&lt;h3 id="a-10">(a)&lt;/h3>
&lt;p>Explain static branch prediction.&lt;/p>
&lt;h3 id="b-11">(b)&lt;/h3>
&lt;p>Explain dynamic branch prediction.&lt;/p>
&lt;h3 id="c-12">(c)&lt;/h3>
&lt;p>Why do mispredictions hurt performance?&lt;/p>
&lt;h3 id="d-12">(d)&lt;/h3>
&lt;p>What hardware is commonly used in dynamic prediction?&lt;/p>
&lt;h2 id="solution-7">Solution&lt;/h2>
&lt;h3 id="static">Static&lt;/h3>
&lt;p>Fixed guess.&lt;/p>
&lt;h3 id="dynamic">Dynamic&lt;/h3>
&lt;p>Uses runtime history.&lt;/p>
&lt;h3 id="misprediction-penalty">Misprediction penalty&lt;/h3>
&lt;p>Pipeline flush required.&lt;/p>
&lt;h3 id="hardware">Hardware&lt;/h3>
&lt;ul>
&lt;li>Branch history table&lt;/li>
&lt;li>Saturating counters&lt;/li>
&lt;/ul>
&lt;h1 id="problem-9--out-of-order-processor">Problem 9 — Out-of-Order Processor&lt;/h1>
&lt;p>Explain:&lt;/p>
&lt;h3 id="a-11">(a)&lt;/h3>
&lt;p>Issue Queue&lt;/p>
&lt;h3 id="b-12">(b)&lt;/h3>
&lt;p>Reorder Buffer&lt;/p>
&lt;h3 id="c-13">(c)&lt;/h3>
&lt;p>Register Renaming&lt;/p>
&lt;h3 id="d-13">(d)&lt;/h3>
&lt;p>Why OoO processors achieve higher performance.&lt;/p>
&lt;h2 id="solution-8">Solution&lt;/h2>
&lt;h3 id="issue-queue">Issue Queue&lt;/h3>
&lt;p>Stores ready instructions.&lt;/p>
&lt;h3 id="rob">ROB&lt;/h3>
&lt;p>Commits instructions in-order.&lt;/p>
&lt;h3 id="register-renaming">Register Renaming&lt;/h3>
&lt;p>Removes false dependencies.&lt;/p>
&lt;h3 id="higher-performance">Higher performance&lt;/h3>
&lt;p>Allows independent instructions to execute earlier.&lt;/p>
&lt;h1 id="problem-10--iterative-multiplier">Problem 10 — Iterative Multiplier&lt;/h1>
&lt;p>Given:&lt;/p>
&lt;p>if (B[0] == 1)
P ← P + A&lt;/p>
&lt;p>A ← A &amp;laquo; 1
B ← B &amp;raquo; 1&lt;/p>
&lt;h3 id="a-12">(a)&lt;/h3>
&lt;p>Draw datapath.&lt;/p>
&lt;h3 id="b-13">(b)&lt;/h3>
&lt;p>Identify registers.&lt;/p>
&lt;h3 id="c-14">(c)&lt;/h3>
&lt;p>Draw FSM states.&lt;/p>
&lt;h3 id="d-14">(d)&lt;/h3>
&lt;p>Explain why multiplication requires multiple cycles.&lt;/p>
&lt;h2 id="solution-9">Solution&lt;/h2>
&lt;h3 id="a-13">(a)&lt;/h3>
&lt;p>Datapath:&lt;/p>
&lt;ul>
&lt;li>Adder&lt;/li>
&lt;li>Shift register A&lt;/li>
&lt;li>Shift register B&lt;/li>
&lt;li>Product register P&lt;/li>
&lt;/ul>
&lt;h3 id="b-14">(b)&lt;/h3>
&lt;p>Registers:&lt;/p>
&lt;ul>
&lt;li>A&lt;/li>
&lt;li>B&lt;/li>
&lt;li>P&lt;/li>
&lt;li>Counter&lt;/li>
&lt;/ul>
&lt;h3 id="c-15">(c)&lt;/h3>
&lt;p>FSM:&lt;/p>
&lt;ul>
&lt;li>IDLE&lt;/li>
&lt;li>CHECK&lt;/li>
&lt;li>ADD&lt;/li>
&lt;li>SHIFT&lt;/li>
&lt;li>DONE&lt;/li>
&lt;/ul>
&lt;h3 id="d-15">(d)&lt;/h3>
&lt;p>Each bit of multiplier processed sequentially.&lt;/p>
&lt;p>Complexity:&lt;/p>
&lt;ul>
&lt;li>N-bit multiplication requires N cycles.&lt;/li>
&lt;/ul></description></item></channel></rss>