Problem Set 2 Solutions
|
|
- Tiffany Hutchinson
- 5 years ago
- Views:
Transcription
1 Problem Set 2 Solutions ECE 551: Digital System Design and Synthesis Fall A tabular description and a known good behavioral specification is given for a priority encoder. x indicates don t care in this table. a) Find a structural description for the priority encoder using only NAND (and NOT) gates. Your goal should be minimum multilevel logic, not speed. Equations C 2 I 7 + I 6 + I5 + I 4 = ( I 7 + I 6) + I5 + I 4 = I 7 + I6 + I5 I 4 I3 + I5 I 4 2 ( I 7 + I 6) + I5 I 4 ( I3 + I 2) C1 I = ( ( ) C0 I 7 + I 6 I5 + I 6 I 4 I3 + I6 I 4 I 2 I1 I 7 + I6 I5 + I 4 I3 + I 2 I1 Note: Equations are not in terms of NAND and NOT operations. The following schematics were used to convert to NAND and NOT gates. Schematic (AND-OR version) I7 I6 I5 I4 I3 I2 C2 C1 C0 I1 Schematic (NAND-NOT version) I7 I6 I5 I4 w1 w2 w4 I3 I2 w3 w9 w8 w7 w6 w5 I1 Note: Graphical conversion techniques were used to develop this schematic. C2 C1 C0 Structural Design module Priority_Encoder(I,C); input [7:1] I; output [2:0] C; 1 of 14
2 // 15 wires wire I7_bar, I6_bar, I5_bar, I4_bar, I3_bar, I2_bar; wire w1, w2, w3, w4, w5, w6, w7, w8, w9; // 18 gates not(i7_bar, I[7]); not(i6_bar, I[6]); not(i5_bar, I[5]); not(i4_bar, I[4]); not(i3_bar, I[3]); not(i2_bar, I[2]); nand(w1, I7_bar, I6_bar); // C[2] calculation not(w2, w1); nand(c[2], w2, I5_bar, I4_bar); nand(w3, I3_bar, I2_bar); // C[1] calculation nand(w4, I5_bar, I4_bar, w3); nand(c[1], w2, w4); nand(w5, I2_bar, I[1]); // C[0] calculation nand(w6, I3_bar, w5); nand(w7, I4_bar, w6); nand(w8, I5_bar, w7); nand(w9, I6_bar, w8); nand(c[0], I7_bar, w9); b) Design a parallel load, left shift register-based testbench for your design that 1) applies the following pair of sequences of vectors to both descriptions 2) compares the output of the known-good description to the output of your description and 3) gives out a 0 if the outputs match and a 1 if they do not for each line and for the entire test at the. Note that the first sequence of patterns is achieved by loading in the shift register and shifting until a 1 is in bit 7 filling the vacated position with 0. The second sequence of patterns is achieved by shifting one more time to getting all 0 s and then shifting filling the vacated position with 1. By having a flip-flop that is set when all 0 s occurs, the filling of the vacated position can be easily changed from 0 to 1. The simulation can be stopped after the 16 patterns by just picking the right run time. Testbench /** Filename: tpriority_encoder.v * * Written By: David Leonard * Last modified: 10/9/01 * Last modified: 10/16/01 CRK * Module implemented: Testbench for Priority Encoder * * Notes: Homework 2 Problem #1 * */ 2 of 14
3 module tpriority_encoder; wire unequal; // comparator output for comparison of C_S and C_B wire [2:0] C_S, // C of Structural Model C_B; // C of Behavorial Model reg [7:1] I; reg clock, inv, // if 1, fill shifter w/ 1s; otherwise, w/ 0s I0, // Place holder for LSB of shift result error; // Storage for accumulated unequal values initial I <= 7'b000_0001; clock <= 1'b0; inv <= 1'b0; I0 <= 1'b0; error <= 0; #70 inv <= 1'b1; always #5 clock = ~clock; always@(posedge clock) if (inv) else error <= error unequal; {I,I0} = {I,1'b1}<<1; {I,I0} = {I,1'b0}<<1; Priority_Encoder Structural(I,C_S); priority_encoder_b Behavorial(I,C_B); assign unequal = (C_S!== C_B); c) Compile and simulate to show that your design matches the known good design. Submit your code, your testbench code, and your simulation results (inputs and output) in list form with the meaningful lines highlighted. Input Vectors I[7:1] of 14
4 State Table I7 I6 I5 I4 I3 I2 I1 C2 C1 C0 1 X X X X X X X X X X X X X X X X X X X X X Known Good Design module priority_encoder_b (I,C); //THIS CODE IS AVAILABLE IN THE HOMEWORK FOLDER! input[7:1] I; output[2:0] C; reg[2:0] C; always@(i) if (I[7]) C = 3'b111; else if (I[6]) C = 3'b110; else if (I[5]) C = 3'b101; else if (I[4]) C = 3'b100; else if (I[3]) C = 3'b011; else if (I[2]) C = 3'b010; else if (I[1]) C = 3'b001; else C = 3'b000; List File ns /tpriority_encoder/i /tpriority_encoder/c_s /tpriority_encoder/c_b /tpriority_encoder/unequal /tpriority_encoder/error of 14
5 2. A negative edge-triggered D flip-flop with positive reset is described below. a) Find a UDP description for this flip-flop, which demonstrates a behavior identical to the given description. Note that negedge A represents the following transitions on A: a) (1x) (1z) - which in a UDP becomes (1x), and b) (10), (x0), (z0) - which in a UDP becomes (10) and (x0). This corresponds to n in the UDP notation. However, the behavior has been written to effectively exclude the case (1x). UDP Design primitive DFF(Q, clk, reset, D); input clk, reset, D; output Q; reg Q; initial Q = 1'bx; table // clk reset D : Q : Q+ p?? :? : -; (?0) 0 0 :? : 0; (?0) x 0 :? : 0; (?0) 0 1 :? : 1; (?0) x 1 :? : 1; (?0) 0 x :? : x; (?0) x x :? : x; (1x) 0? :? : -; (1x) x? :? : -; n 1? :? : 0;? (?1)? :? : 0;? (0x)? :? : -;? n? :? : -;?? * :? : -; table primitive b) Find a testbench that applies a set of vectors and compares outputs to show that the given description and your UDP have the same behavior for 1, 0, and x values and transitions applied. Limit your number of vectors to 20, but be sure to include cases with x s in the transitions on C. Testbench module tdff; wire unequal, U, B; reg clk, reset, D; initial clk <= 1'b1; D <= 1'b1; reset <= 1'b0; // Q+ = x #10 reset <= 1'b1; // Q+ = 0 #10 reset <= 1'b0; // Q+ = 0 5 of 14
6 #10 clk <= 1'b0; // Q+ = 1 #10 clk <= 1'b1; D <= 1'b0; reset <= 1'b0; // Q+ = 1 #10 clk <= 1'b0; // Q+ = 0 #10 clk <= 1'b1; D <= 1'bx; reset <= 1'bx; // Q+ = 0 #10 clk <= 1'b0; // Q+ = x #10 reset <= 1'b1; // Q+ = 0 #10 reset <= 1'bx; // Q+ = 0 #10 clk <= 1'b1; D <= 1'bx; reset <= 1'b0; // Q+ = 0 #10 clk <= 1'b0; // Q+ = x #10 clk <= 1'b1; D <= 1'b1; reset <= 1'b0; // Q+ = x #10 clk <= 1'b0; // Q+ = 1 #10 clk <= 1'b1; D <= 1'b0; reset <= 1'b0; // Q+ = 1 #10 clk <= 1'b0; // Q+ = 0 #10 clk <= 1'b1; D <= 1'b1; reset <= 1'bx; // Q+ = 0 #10 clk <= 1'b0; // Q+ = 1 #10 clk <= 1'b1; D <= 1'b0; reset <= 1'bx; // Q+ = 1 #10 clk <= 1'b0; // Q+ = 0 #10 $stop; DFF udp(u, clk, reset, D); neg_edge_ff behavioral(b, clk, reset, D); assign unequal = (U!== B); c) Compile and simulate to show that your design matches the known good design. Submit your code, your testbench code, and your simulation results (inputs and output) in list form with the meaningful lines highlighted. Known Good Design module neg_edge_ff (Q, clk, reset, D); input clk, reset, D; output Q; reg Q; always@(negedge clk or posedge reset) if (reset == 1) Q <= 1'b0; else if(clk == 0) Q <= D; List File ns unequal U B D clk reset 0 St0 StX StX St0 St0 St St0 St0 St St0 St1 St St0 St1 St St0 St0 St St0 St0 St0 1 x x 6 of 14
7 70 St0 StX StX 0 x x 80 St0 St0 St0 0 1 x 90 St0 St0 St0 0 x x 100 St0 St0 St0 1 0 x 110 St0 StX StX 0 0 x 120 St0 StX StX St0 St1 St St0 St1 St St0 St0 St St0 St0 St0 1 x St0 St1 St1 0 x St0 St1 St1 1 x St0 St0 St0 0 x 0 3. a) Add an enable EN_n (Active at 0) to a correct version of the quad 5-way multiplexer from Problem 10, Problem Set 1. Use a specify block to give the module the following delays: From EN_n to each Y output: 3 ns From each S input to each Y output: 4 ns From each bit of A,B,C,D, and E to the corresponding Y output bit: 2 ns Timing Design `timescale 1 ns / 100 ps module MUX5x4(Y, A, B, C, D, E, S, EN_n); input [3:0] A, B, C, D, E; input [2:0] S; input EN_n; output [3:0] Y; assign Y = {4{~EN_n}} & ({4{~S[2]&~S[1]&~S[0]}}&A {4{~S[2]&~S[1]&S[0]}}&B {4{~S[2]&S[1]&~S[0]}}&C {4{~S[2]&S[1]&S[0]}}&D {4{S[2]}}&E); specify (EN_n *> Y) = 3; (S *> Y) = 4; (A,B,C,D => Y) = 2; specify b) Compile and simulate for enough testbench transitions to show that part a gives the right delay. Use a timescale directive with 1 ns as the time unit and 100 ps as the simulation resolution. Submit your code, testbench code, and your simulation results (inputs and output) in list form with the meaningful lines highlighted. Testbench module tmux5x4; wire [3:0] Y; reg [3:0] A,B,C,D,E; 7 of 14
8 reg [2:0] S; reg EN_n; initial A <= 4'b0000; B <= 4'b0001; C <= 4'b0010; D <= 4'b0100; E <= 4'b1000; S <= 3'b000; EN_n <= 1'b0; #100 S <= 3'b001; #100 S <= 3'b010; #100 S <= 3'b011; #100 S <= 3'b100; #100 EN_n <= 1'b1; #100 S <= 3'b011; #100 S <= 3'b010; #100 S <= 3'b001; #100 S <= 3'b000; #100 $stop; MUX5x4 inst(y, A, B, C,D, E, S, EN_n); List File ns Y A B C D E S EN_n 0.0 xxxx Note: When EN_n = 1, output could also be zzzz as well as It deps on your interpretation of what an enable signal does when inactive. 8 of 14
9 4. A description for a finite state machine for timing simulation in Verilog is given. The description will be used to discuss the order in which the right hand sides RHS are evaluated and the left hand sides LHS are updated during Verilog simulation. Source timescale 1ns/1ns module fsm (clk, reset, a, b, c, state, next_state, 1 bx, by, bz, nbx, nby, nbz); 2 // THIS CODE IS AVAILABLE IN THE HOMEWORK FOLDER! 3 // This code is BAD FSM code! It is being used only to 4 // demonstrate Verilog simulation properties! 5 input clk, reset, a, b, c; 6 output bx, by, bz, nbx, nby, nbz; 7 output[2:0] next_state, state; 8 reg [2:0] next_state, state; 9 reg bx, by, bz, nbx, nby, nbz; 10 parameter S0 = 3'b000, S1 = 3'b001, S2 = 3'b010, S3 = 3'b011, 11 S4 = 3'b100, S5 = 3'b101, S6 = 3'b110, S7 =3'b111; 12 // The State Register 13 always@(posedge clk or posedge reset) if (reset == 1) state <= S0; 16 else state <= next_state; // The Next State Logic 19 always@ (a or b or c or state) next_state = S0; 22 if (a == 1) next_state = S1; 23 else next_state = S2; 24 # 2 if (b == 0) next_state = S3; 25 else next_state = S4; 26 if (state == S3 && c == 0) next_state = #3 S5; 27 else next_state = #4 S6; 28 if (state == S4 && c == 0) next_state = #3 S7; 29 else next_state = S0; // The Output Logic (blocking) 32 always@ (a or b or c or state) bx = 1'b0; 35 #2 by = 1; 36 bz = #3 0; 37 if (state == S1) bx = 1; 38 if (state == S2) by = 0; 39 if (state == S3 && a == 1) bx = #2 1; 40 if (state == S4) by = #2 0; 41 if (state == S5) bx = 1; 42 if (state == S7) bz = 1; // The Output Logic (nonblocking) 45 always@ (a or b or c or state) nbx <= 1'b0; 48 9 of 14
10 #2 nby <= 1; 49 nbz <= #3 0; 50 if (state == S1) nbx <= 1; 51 if (state == S2) nby <= 0; 52 if (state == S3 && a == 1) nbx <= #2 1; 53 if (state == S4) nby <= #2 0; 54 if (state == S5) nbx <= 1; 55 if (state == S7) nbz <= 1; For each of the present value sets listed in the table below and a single positive clock transition: a) Describe the order of evaluation(e) of the RHS and of update(u) of the LHS for each assignment statement executed. You are to represent the ordering graphically including: 1) timestep of evaluation and update, 2) ordering of statement evaluation and statement update whenever the statement execution must be ordered and 3) timestep positioning of statements or ordered statement sets that are not ordered with respect to each other. Assignment statements are to be identified by the line number on the right of the Verilog code. Note that this applies only to assignment statements, not if else, etc. The latter, however, may affect which if the assignment statements are executed. Case #1 at t =20 a b c = 000 state = S0 next-state = S2 Positive Edge at t = 20 t = 20 E17, U17 E22, U22, E24, U24 E35, U35 E48, U48 t = 22 E25, U25, E28 E36, U36, E37 E49, E50, U49 t = 25 U37 U50 t = 26 U28, E30, U30 Case #2 at t =20 a b c = 000 state = S7 next-state = S2 Positive Edge at t = 20 t = 20 E17, U17 E22, U22, E24, U24 E35, U35 E48, U48 t = 22 E25, U25, E28 E36, U36, E37 10 of 14
11 t = 25 t = 26 E49, E50, E56, U49, U56 U37, E43, U43 U50 U28, E30, U30 t = 30 t = 32 t = 35 t = 36 E22, U22, E23, U23 E35, U35 E48, U48 E26, U26, E28 E36, U36, E37 E49, E50, E56, U49, U56 U37, E43, U43 U50 U28, E30, U30 Note: Both cases are assuming that the FSM was reset from t = 2 to 4 and that the states given were changed to those shown. b) In the empty locations in the table, give the resulting progression of output values over time for state, next_state, and the outputs until all activity due to a given positive clock edge has died out. Assume that the inputs a, b, c have not changed since early in the clock period prior to the positive clock edge. The clock period is 20 ns. Note that there are input changes that occur a portion of the way through the clock period. Time state a b c next_state bx by bz nbx nby nbz 0->4 S S3 0 1 x 0 1 x 20 (PE) S S S S S S S S S S >4 S S3 0 1 x 0 1 x 20 (PE) S S S S S S S S S S S S S S S S of 14
12 c) Show that the values you listed occur at the time you indicate by simulating fsm.v to produce outputs you can compare manually to those given in the table. Perform three simulations, using a testbench to apply the values sets in the table to a copy of the fsm module, which has been modified to initialize the state value at reset to that in the value set. It is suggested the reset go to 1 at time 2, back to 0 at time 4 with the clock edge at time 20. The events of interest occur in response to the positive clock edge just after the reset activation is complete. Submit your testbenches and your output (either table or list) clearly annotated to show that it matches your predicted table entries. Source #1 Same as Source above, but line 16 is if (reset == 1) state <= S3; Testbench #1 `timescale 1 ns/ 1 ns module tfsm; wire [2:0] next_state, state; wire bx, by, bz, nbx, nby, nbz; reg clk, reset, a, b, c; initial a <= 1'b0; b <= 1'b0; c <= 1'b0; clk <= 1'b0; reset <= 1'b0; #2 reset <= 1'b1; #2 reset <= 1'b0; #16 clk <= 1'b1; #10 clk <= 1'b0; #10 $stop; FSM inst(clk, reset, a, b, c, state, next_state, bx, by, bz, nbx, nby, nbz); Listing #1 ns next_state bx by bz nby clk a c state nbx nbz b reset xxx St0 StX StX St0 StX StX St0 St1 StX St0 St1 StX St0 St1 StX St0 St1 StX St0 St1 St0 St0 St1 St St0 St1 St0 St0 St1 St St0 St1 St0 St0 St1 St St0 St1 St0 St0 St1 St St0 St1 St0 St0 St1 St St0 St1 St0 St0 St1 St of 14
13 Source #2 Same as Source above, but line 16 is if (reset == 1) state <= S4; Testbench #2 `timescale 1 ns/ 1 ns module tfsm; wire [2:0] next_state, state; wire bx, by, bz, nbx, nby, nbz; reg clk, reset, a, b, c; initial a <= 1'b0; b <= 1'b0; c <= 1'b0; clk <= 1'b0; reset <= 1'b0; #2 reset <= 1'b1; #2 reset <= 1'b0; #16 clk <= 1'b1; #10 clk <= 1'b0; a <= 1'b1; b <= 1'b1; c <= 1'b0; #10 $stop; FSM inst(clk, reset, a, b, c, state, next_state, bx, by, bz, nbx, nby, nbz); Listing #2 ns next_state bx by bz nby clk a c state nbx nbz b reset xxx St0 StX StX St0 StX StX St0 St1 StX St0 St1 StX St0 St1 StX St0 St1 StX St0 St1 St0 St0 St1 St St0 St1 St0 St0 St0 St St0 St0 St0 St0 St0 St St0 St0 St0 St0 St0 St St0 St0 St0 St0 St0 St St0 St1 St0 St0 St1 St St0 St1 St1 St0 St1 St St0 St1 St1 St0 St1 St St0 St1 St1 St0 St1 St St0 St1 St1 St0 St1 St St0 St1 St1 St0 St1 St St0 St1 St1 St0 St1 St of 14
14 5. Write a procedural description for the given combinational circuit using a sequence of blocking procedural statements. Compile your result to get rid of at least some of the syntax errors. Procedural Design module UF(F, G, A, B, C, D); input A, B, C, D; output F, G; reg F, G; reg T1, T2, T3, T4, T5; // wires always@(a or B or C or D) T1 = ~(A&C); T2 = ~(A&B&D); T3 = ~(B&C&D); F = ~(A&T1&T2); T4 = ~(B&T2&T3); T5 = ~(T1&C&T3); G = ~(F&T4&T5); Note: Procedural continuous assignments are not blocking procedural statements. 14 of 14
Problem Set 3 Solutions
Problem Set 3 Solutions ECE 551: Digital System Design and Synthesis Fall 2001 Final Version 1) For each of the following always behaviors: a) Does the given always behavior need a default statement as
More informationBlocking(=) vs Nonblocking (<=) Assignment. Lecture 3: Modeling Sequential Logic in Verilog HDL. Procedural assignments
Blocking(=) vs Nonblocking (
More informationECEN : Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Homework #1 Solutions
ECEN 449 749: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University Homework #1 Solutions Upload your homework solution to ecampus as a single pdf file. Your
More informationMidterm Exam Thursday, October 24, :00--2:15PM (75 minutes)
Last (family) name: Answer Key First (given) name: Student I.D. #: Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE 551 Digital System Design and Synthesis Midterm
More informationEE 231 Fall EE 231 Homework 8 Due October 20, 2010
EE 231 Homework 8 Due October 20, 20 1. Consider the circuit below. It has three inputs (x and clock), and one output (z). At reset, the circuit starts with the outputs of all flip-flops at 0. x z J Q
More informationEECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis
EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis Jan 31, 2012 John Wawrzynek Spring 2012 EECS150 - Lec05-verilog_synth Page 1 Outline Quick review of essentials of state elements Finite State
More informationN-input EX-NOR gate. N-output inverter. N-input NOR gate
Hardware Description Language HDL Introduction HDL is a hardware description language used to design and document electronic systems. HDL allows designers to design at various levels of abstraction. It
More informationFPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1
FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital
More informationChap 6 Introduction to HDL (d)
Design with Verilog Chap 6 Introduction to HDL (d) Credit to: MD Rizal Othman Faculty of Electrical & Electronics Engineering Universiti Malaysia Pahang Ext: 6036 VERILOG HDL Basic Unit A module Module
More informationECE 551: Digital System *
ECE 551: Digital System * Design & Synthesis Lecture Set 5 5.1: Verilog Behavioral Model for Finite State Machines (FSMs) 5.2: Verilog Simulation I/O and 2001 Standard (In Separate File) 3/4/2003 1 Explicit
More informationEPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013
EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013 Print Here Student ID Signature This is a closed book exam. The exam is to be completed in one-hundred ten (110) minutes. Don t use scratch
More informationECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines
ECE 2300 Digital Logic & Computer Organization Spring 2018 More Verilog Finite Machines Lecture 8: 1 Prelim 1, Thursday 3/1, 1:25pm, 75 mins Arrive early by 1:20pm Review sessions Announcements Monday
More informationVerilog Fundamentals. Shubham Singh. Junior Undergrad. Electrical Engineering
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering VERILOG FUNDAMENTALS HDLs HISTORY HOW FPGA & VERILOG ARE RELATED CODING IN VERILOG HDLs HISTORY HDL HARDWARE DESCRIPTION LANGUAGE
More informationEECS150 - Digital Design Lecture 20 - Finite State Machines Revisited
EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited April 2, 2009 John Wawrzynek Spring 2009 EECS150 - Lec20-fsm Page 1 Finite State Machines (FSMs) FSM circuits are a type of sequential
More informationVerilog introduction. Embedded and Ambient Systems Lab
Verilog introduction Embedded and Ambient Systems Lab Purpose of HDL languages Modeling hardware behavior Large part of these languages can only be used for simulation, not for hardware generation (synthesis)
More informationECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog
ECE 2300 Digital Logic & Computer Organization Spring 2018 More Sequential Logic Verilog Lecture 7: 1 Announcements HW3 will be posted tonight Prelim 1 Thursday March 1, in class Coverage: Lectures 1~7
More informationLast Lecture. Talked about combinational logic always statements. e.g., module ex2(input logic a, b, c, output logic f); logic t; // internal signal
Last Lecture Talked about combinational logic always statements. e.g., module ex2(input logic a, b, c, output logic f); logic t; // internal signal always_comb t = a & b; f = t c; should use = (called
More informationVerilog for Synthesis Ing. Pullini Antonio
Verilog for Synthesis Ing. Pullini Antonio antonio.pullini@epfl.ch Outline Introduction to Verilog HDL Describing combinational logic Inference of basic combinational blocks Describing sequential circuits
More informationSynthesizable Verilog
Synthesizable Verilog Courtesy of Dr. Edwards@Columbia, and Dr. Franzon@NCSU http://csce.uark.edu +1 (479) 575-6043 yrpeng@uark.edu Design Methodology Structure and Function (Behavior) of a Design HDL
More informationDigital Design with FPGAs. By Neeraj Kulkarni
Digital Design with FPGAs By Neeraj Kulkarni Some Basic Electronics Basic Elements: Gates: And, Or, Nor, Nand, Xor.. Memory elements: Flip Flops, Registers.. Techniques to design a circuit using basic
More informationGraduate Institute of Electronics Engineering, NTU Design of Datapath Controllers
Design of Datapath Controllers Lecturer: Wein-Tsung Shen Date: 2005.04.01 ACCESS IC LAB Outline Sequential Circuit Model Finite State Machines Useful Modeling Techniques pp. 2 Model of Sequential Circuits
More informationSequential Logic Design
Sequential Logic Design Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu (Guest starring: Frank K. Gürkaynak and Aanjhan Ranganathan) http://www.syssec.ethz.ch/education/digitaltechnik_17 Adapted
More informationECE 4514 Digital Design II. Spring Lecture 2: Hierarchical Design
ECE 4514 Digital Design II Spring 2007 Abstraction in Hardware Design Remember from last lecture that HDLs offer a textual description of a netlist. Through abstraction in the HDL, we can capture more
More informationVerilog Coding Guideline
Verilog Coding Guideline Digital Circuit Lab TA: Po-Chen Wu Outline Introduction to Verilog HDL Verilog Syntax Combinational and Sequential Logics Module Hierarchy Write Your Design Finite State Machine
More informationUniversity of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering
University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering Final Examination ECE 241F - Digital Systems Examiners: S. Brown,
More informationEECS150 - Digital Design Lecture 10 Logic Synthesis
EECS150 - Digital Design Lecture 10 Logic Synthesis September 26, 2002 John Wawrzynek Fall 2002 EECS150 Lec10-synthesis Page 1 Logic Synthesis Verilog and VHDL stated out as simulation languages, but quickly
More informationQuick Introduction to SystemVerilog: Sequental Logic
! Quick Introduction to SystemVerilog: Sequental Logic Lecture L3 8-545 Advanced Digital Design ECE Department Many elements Don Thomas, 24, used with permission with credit to G. Larson Today Quick synopsis
More informationThe Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science
The Verilog Language COMS W4995-02 Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science The Verilog Language Originally a modeling language for a very efficient event-driven
More informationLogic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3
Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm Lecture 3 Lecture 3 Topics Covered: Chapter 4 Discuss Sequential logic Verilog Coding Introduce Sequential coding Further review of Combinational Verilog
More informationSynthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1
Verilog Synthesis Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis Spring 2007 Lec #8 -- HW Synthesis 1 Logic Synthesis Verilog and VHDL started out
More informationLecture 15: System Modeling and Verilog
Lecture 15: System Modeling and Verilog Slides courtesy of Deming Chen Intro. VLSI System Design Outline Outline Modeling Digital Systems Introduction to Verilog HDL Use of Verilog HDL in Synthesis Reading
More informationChapter 4 :: Topics. Introduction. SystemVerilog. Hardware description language (HDL): allows designer to specify logic function only.
Chapter 4 :: Hardware Description Languages Digital Design and Computer Architecture David Money Harris and Sarah L. Harris Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential
More informationWhy Should I Learn This Language? VLSI HDL. Verilog-2
Verilog Why Should I Learn This Language? VLSI HDL Verilog-2 Different Levels of Abstraction Algorithmic the function of the system RTL the data flow the control signals the storage element and clock Gate
More informationFinite-State Machine (FSM) Design
1 Finite-State Machine (FSM) Design FSMs, an important category of sequential circuits, are used frequently in designing digital systems. From the daily used electronic machines to the complex digital
More informationEECS150 - Digital Design Lecture 10 Logic Synthesis
EECS150 - Digital Design Lecture 10 Logic Synthesis February 13, 2003 John Wawrzynek Spring 2003 EECS150 Lec8-synthesis Page 1 Logic Synthesis Verilog and VHDL started out as simulation languages, but
More informationLecture 32: SystemVerilog
Lecture 32: SystemVerilog Outline SystemVerilog module adder(input logic [31:0] a, input logic [31:0] b, output logic [31:0] y); assign y = a + b; Note that the inputs and outputs are 32-bit busses. 17:
More informationECE 2300 Digital Logic & Computer Organization. More Finite State Machines
ECE 2300 Digital Logic & Computer Organization Spring 2018 More Finite State Machines Lecture 9: 1 Announcements Prelab 3(B) due tomorrow Lab 4 to be released tonight You re not required to change partner(s)
More informationDigital Integrated Circuits
Digital Integrated Circuits Lecture 4 Jaeyong Chung System-on-Chips (SoC) Laboratory Incheon National University BCD TO EXCESS-3 CODE CONVERTER 0100 0101 +0011 +0011 0111 1000 LSB received first Chung
More informationWriting Circuit Descriptions 8
8 Writing Circuit Descriptions 8 You can write many logically equivalent descriptions in Verilog to describe a circuit design. However, some descriptions are more efficient than others in terms of the
More informationCSE140L: Components and Design Techniques for Digital Systems Lab
CSE140L: Components and Design Techniques for Digital Systems Lab Tajana Simunic Rosing Source: Vahid, Katz, Culler 1 Announcements & Outline Lab 4 due; demo signup times listed on the cse140l site Check
More informationIntroduction. Why Use HDL? Simulation output. Explanation
Introduction Verilog HDL is a Hardware Description Language (HDL) HDL is a language used to describe a digital system, for example, a computer or a component of a computer. Most popular HDLs are VHDL and
More informationVHDL VS VERILOG.
1 VHDL VS VERILOG http://www.cse.cuhk.edu.hk/~mcyang/teaching.html 2 VHDL & Verilog They are both hardware description languages for modeling hardware. They are each a notation to describe the behavioral
More informationDIGITAL SYSTEM DESIGN
DIGITAL SYSTEM DESIGN Prepared By: Engr. Yousaf Hameed Lab Engineer BASIC ELECTRICAL & DIGITAL SYSTEMS LAB DEPARTMENT OF ELECTRICAL ENGINEERING Digital System Design 1 Name: Registration No: Roll No: Semester:
More informationChapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1>
Chapter 4 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 4 Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential
More informationDigital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University
Digital Circuit Design and Language Datapath Design Chang, Ik Joon Kyunghee University Typical Synchronous Design + Control Section : Finite State Machine + Data Section: Adder, Multiplier, Shift Register
More informationLogic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis
Logic Synthesis Verilog and VHDL started out as simulation languages, but quickly people wrote programs to automatically convert Verilog code into low-level circuit descriptions (netlists). EECS150 - Digital
More informationCSE140L: Components and Design
CSE140L: Components and Design Techniques for Digital Systems Lab Tajana Simunic Rosing Source: Vahid, Katz, Culler 1 Grade distribution: 70% Labs 35% Lab 4 30% Lab 3 20% Lab 2 15% Lab 1 30% Final exam
More informationMealy and Moore examples
CSE 37 Spring 26 Introduction to igital esign ecture 2: uential ogic Technologies ast ecture Moore and Mealy Machines Today uential logic technologies Ving machine: Moore to synch. Mealy OPEN = creates
More informationChapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1>
Chapter 4 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 4 Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential
More informationECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS
ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS Note: Closed book no notes or other material allowed apart from the one
More informationVerilog Nonblocking Assignments with Delays - Myths & Mysteries
Verilog Nonblocking Assignments with Delays - Myths & Mysteries Clifford E. Cummings, Inc. cliffc@sunburst-design.com www.sunburst-design.com 2 of 67 Agenda IEEE 1364 reference model & event queue Review
More informationEEL 4783: HDL in Digital System Design
EEL 4783: HDL in Digital System Design Lecture 15: Logic Synthesis with Verilog Prof. Mingjie Lin 1 Verilog Synthesis Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for
More informationECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines
ECE 2300 Digital Logic & Computer Organization Spring 2017 More Verilog Finite State Machines Lecture 8: 1 Announcements 1 st batch of (raw) quiz scores released on CMS Solutions to HW 1-3 released on
More informationAmrita Vishwa Vidyapeetham. EC429 VLSI System Design Answer Key
Time: Two Hours Amrita Vishwa Vidyapeetham B.Tech Second Assessment March 2013 Eighth Semester Electrical and Electronics Engineering EC429 VLSI System Design Answer Key Answer all Questions Roll No: Maximum:
More informationEE178 Lecture Verilog FSM Examples. Eric Crabill SJSU / Xilinx Fall 2007
EE178 Lecture Verilog FSM Examples Eric Crabill SJSU / Xilinx Fall 2007 In Real-time Object-oriented Modeling, Bran Selic and Garth Gullekson view a state machine as: A set of input events A set of output
More informationCSE 591: Advanced Hardware Design and Verification (2012 Spring) LAB #0
Lab 0: Tutorial on Xilinx Project Navigator & ALDEC s Active-HDL Simulator CSE 591: Advanced Hardware Design and Verification Assigned: 01/05/2011 Due: 01/19/2011 Table of Contents 1 Overview... 2 1.1
More informationEECS150 - Digital Design Lecture 4 - Verilog Introduction. Outline
EECS150 - Digital Design Lecture 4 - Verilog Introduction Feb 3, 2009 John Wawrzynek Spring 2009 EECS150 - Lec05-Verilog Page 1 Outline Background and History of Hardware Description Brief Introduction
More informationParallel versus serial execution
Parallel versus serial execution F assign statements are implicitly parallel Ì = means continuous assignment Ì Example assign E = A & D; assign A = B & C; Ì A and E change if B changes F always blocks
More informationOutline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now?
Outline EECS 5 - Components and Design Techniques for Digital Systems Lec Putting it all together -5-4 David Culler Electrical Engineering and Computer Sciences University of California Berkeley Top-to-bottom
More informationThis Lecture. Some components (useful for the homework) Verilog HDL (will continue next lecture)
Last Lecture The basic component of a digital circuit is the MOS transistor Transistor have instrinsic resistance and capacitance, so voltage values in the circuit take some time to change ( delay ) There
More informationDepartment of Computer Science and Electrical Engineering. CMPE 415 Verilog Events Timing and Testbenches Prof. Ryan Robucci
Department of Computer Science and Electrical Engineering CMPE 415 Verilog Events Timing and Testbenches Prof. Ryan Robucci An Event Driven Language also used for Synthesis We emphasize use of Verilog
More informationHDLs and SystemVerilog. Digital Computer Design
HDLs and SystemVerilog Digital Computer Design Logic Arrays Gates can be organized into regular arrays. If the connections are made programmable, these logic arrays can be configured to perform any function
More informationHardware Description Language (HDL)
Hardware Description Language (HDL) What is the need for Hardware Description Language? Model, Represent, And Simulate Digital Hardware Hardware Concurrency Parallel Activity Flow Semantics for Signal
More informationLast Lecture: Divide by 3 FSM
Last Lecture: Divide by 3 FSM Output should be 1 every 3 clock cycles S2 S0 S1 The double circle indicates the reset state Slide derived from slides by Harris & Harris from their book 1 Finite State Machines
More information!== vs.!= and === vs. ==
!== vs.!= and === vs. == In SystemVerilog, logic is a 4-state signal type with values 0, 1, X, Z. If a signal is never assigned to, ModelSim will assume that has an xxx xxx value. This means if you do
More informationModeling Sequential Circuits in Verilog
Modeling Sequential Circuits in Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Presentation Outline Modeling Latches and Flip-Flops Blocking versus
More informationCS6710 Tool Suite. Verilog is the Key Tool
CS6710 Tool Suite Verilog-XL Behavioral Verilog Your Library Cadence SOC Encounter Synopsys Synthesis Structural Verilog Circuit Layout CSI Verilog-XL AutoRouter Cadence Virtuoso Layout LVS Layout-XL Cadence
More informationCSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8
CSCB58 - Lab 3 Latches, Flip-flops, and Registers Learning Objectives The purpose of this exercise is to investigate the fundamental synchronous logic elements: latches, flip-flops, and registers. Prelab
More informationVerilog Tutorial. Introduction. T. A.: Hsueh-Yi Lin. 2008/3/12 VLSI Digital Signal Processing 2
Verilog Tutorial T. A.: Hsueh-Yi Lin Introduction 2008/3/12 VLSI Digital Signal Processing 2 Verilog: A common language for industry HDL is a common way for hardware design Verilog VHDL Verilog is widely
More informationLecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines
Lecture 3 Behavioral Modeling Sequential Circuits Registers Counters Finite State Machines Behavioral Modeling Behavioral Modeling Behavioral descriptions use the keyword always, followed by optional event
More informationRecommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto
Recommed Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto DISCLAIMER: The information contained in this document does NOT contain
More informationSynthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis
Synthesis of Language Constructs 1 Nets Nets declared to be input or output ports are retained Internal nets may be eliminated due to logic optimization User may force a net to exist trireg, tri0, tri1
More informationIntroduction To Verilog Design. Chun-Hung Chou
Introduction To Verilog Design Chun-Hung Chou 1 Outline Typical Design Flow Design Method Lexical Convention Data Type Data Assignment Event Control Conditional Description Register Description Synthesizable
More informationECE 4514 Digital Design II. Spring Lecture 7: Dataflow Modeling
ECE 4514 Digital Design II Lecture 7: Dataflow Modeling A language Lecture Today's topic Dataflow Modeling input input input module output output Model with submodules and gates = Structural Model with
More informationFSM and Efficient Synthesizable FSM Design using Verilog
FSM and Efficient Synthesizable FSM Design using Verilog Introduction There are many ways to code FSMs including many very poor ways to code FSMs. This lecture offers guidelines for doing efficient coding,
More information271/471 Verilog Tutorial
271/471 Verilog Tutorial Prof. Scott Hauck, last revised 9/15/14 Introduction The following tutorial is inted to get you going quickly in circuit design in Verilog. It isn t a comprehensive guide to System
More informationFinite State Machines
Lab Workbook Introduction (FSM) are sequential circuit used in many digital systems to control the behavior of systems and dataflow paths. Examples of FSM include control units and sequencers. This lab
More informationDigital Integrated Circuits
Digital Integrated Circuits Lecture 3 Jaeyong Chung System-on-Chips (SoC) Laboratory Incheon National University GENERAL MODEL OF MEALY MACHINE Chung EPC6055 2 GENERAL MODEL OF MOORE MACHINE Chung EPC6055
More informationLab 7 (All Sections) Prelab: Introduction to Verilog
Lab 7 (All Sections) Prelab: Introduction to Verilog Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work 1 Objective The
More informationOne and a half hours. Section A is COMPULSORY
One and a half hours Section A is COMPULSORY An additional answersheet is provided for Question 4. Please remember to complete the additional answersheet with your University ID number and attach it to
More informationNonblocking Assignments in Verilog Synthesis; Coding Styles That Kill!
Nonblocking Assignments in Verilog Synthesis; Coding Styles That Kill! by Cliff Cummings Sunburst Design, Inc. Abstract -------- One of the most misunderstood constructs in the Verilog language is the
More informationIntroduction to Verilog HDL. Verilog 1
Introduction to HDL Hardware Description Language (HDL) High-Level Programming Language Special constructs to model microelectronic circuits Describe the operation of a circuit at various levels of abstraction
More informationComputer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog
Verilog Radek Pelánek and Šimon Řeřucha Contents 1 Computer Aided Design 2 Basic Syntax 3 Gate Level Modeling 4 Behavioral Modeling Computer Aided Design Hardware Description Languages (HDL) Verilog C
More informationSpeaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23
98-1 Under-Graduate Project Synthesis of Combinational Logic Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23 What is synthesis? Outline Behavior Description for Synthesis Write Efficient HDL
More informationVLSI II E. Özgür ATES
VERILOG TUTORIAL VLSI II E. Özgür ATES Outline Introduction Language elements Gate-level modeling Data-flow modeling Behavioral modeling Modeling examples Simulation and test bench Hardware Description
More informationVerilog HDL. Gate-Level Modeling
Verilog HDL Verilog is a concurrent programming language unlike C, which is sequential in nature. block - executes once at time 0. If there is more then one block, each execute concurrently always block
More informationECE 4514 Digital Design II. Spring Lecture 13: Logic Synthesis
ECE 4514 Digital Design II A Tools/Methods Lecture Second half of Digital Design II 9 10-Mar-08 L13 (T) Logic Synthesis PJ2 13-Mar-08 L14 (D) FPGA Technology 10 18-Mar-08 No Class (Instructor on Conference)
More informationBehavioral Modeling and Timing Constraints
Lab Workbook Introduction Behavioral modeling was introduced in Lab 1 as one of three widely used modeling styles. Additional capabilities with respect to testbenches were further introduced in Lab 4.
More informationCS6710 Tool Suite. Verilog is the Key Tool. Verilog as HDL (AHT) Verilog has a Split Personality. Quick Review. Synthesis
CS6710 Tool Suite Verilog is the Key Tool Verilog-XL Behavioral Verilog Your Library AutoRouter Cadence SOC Encounter Cadence Virtuoso Layout Synopsys Synthesis Circuit Layout CSI LVS Layout-XL Structural
More informationPart 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits
M1 Informatique / MOSIG Introduction to Modeling and erification of Digital Systems Part 4: HDL for sequential circuits Laurence PIERRE http://users-tima.imag.fr/amfors/lpierre/m1arc 2017/2018 81 Sequential
More informationGraduate Institute of Electronics Engineering, NTU. Lecturer: Chihhao Chao Date:
Design of Datapath Controllers and Sequential Logic Lecturer: Date: 2009.03.18 ACCESS IC LAB Sequential Circuit Model & Timing Parameters ACCESS IC LAB Combinational Logic Review Combinational logic circuits
More informationLecture #2: Verilog HDL
Lecture #2: Verilog HDL Paul Hartke Phartke@stanford.edu Stanford EE183 April 8, 2002 EE183 Design Process Understand problem and generate block diagram of solution Code block diagram in verilog HDL Synthesize
More informationECE 551 Digital System Design and Synthesis. Instructor: Kewal K. Saluja. Midterm Exam
Last (family) name: First (given) name: Student I.D. #: Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE 551 Digital System Design and Synthesis Instructor: Kewal
More informationDigital System Design Verilog-Part III. Amir Masoud Gharehbaghi
Digital System Design Verilog-Part III Amir Masoud Gharehbaghi amgh@mehr.sharif.edu Procedural Blocks initial block always block Place in module body Run concurrently with other module constructs Continuous
More informationRegister Transfer Level in Verilog: Part I
Source: M. Morris Mano and Michael D. Ciletti, Digital Design, 4rd Edition, 2007, Prentice Hall. Register Transfer Level in Verilog: Part I Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National
More informationHomework deadline extended to next friday
Norm Midterm Grading Finished Stats on course homepage Pickup after this lab lec. Regrade requests within 1wk of posted solution Homework deadline extended to next friday Description Design Conception
More informationEECS150 - Digital Design Lecture 7 - Computer Aided Design (CAD) - Part II (Logic Simulation) Finite State Machine Review
EECS150 - Digital Design Lecture 7 - Computer Aided Design (CAD) - Part II (Logic Simulation) Feb 9, 2010 John Wawrzynek Spring 2010 EECS150 - Lec7-CAD2 Page 1 Finite State Machine Review State Transition
More informationProblem Set 3 ECE 551: Digital System Design and Synthesis Spring 2003
Problem Set 3 ECE 551: Digital System Design and Synthesis Spring 2003 1. Blocking/Non-blocking Assignments (25 pts) PART A. module P1(w,p,r,x,y,q,z,a,b,c,d,e); //Lines before always not required. input
More informationSynthesis of Combinational and Sequential Circuits with Verilog
Synthesis of Combinational and Sequential Circuits with Verilog What is Verilog? Hardware description language: Are used to describe digital system in text form Used for modeling, simulation, design Two
More informationDesigning Safe Verilog State Machines with Synplify
Designing Safe Verilog State Machines with Synplify Introduction One of the strengths of Synplify is the Finite State Machine compiler. This is a powerful feature that not only has the ability to automatically
More information