Register-Transfer Level Components in Verilog

Slides:



Advertisements
Similar presentations
//HDL Example 8-2 // //RTL description of design example (Fig.8-9) module Example_RTL (S,CLK,Clr,E,F,A);
Advertisements

CDA 3100 Recitation Week 11.
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Synchronous Sequential Logic
EE 361 Fall 2003University of Hawaii1 Hardware Design Tips EE 361 University of Hawaii.
Combinational Logic.
Register Transfer Level
Verilog Modules for Common Digital Functions
Table 7.1 Verilog Operators.
//HDL Example 5-1 // //Description of D latch (See Fig.5-6) module D_latch (Q,D,control); output Q; input.
Verilog. 2 Behavioral Description initial:  is executed once at the beginning. always:  is repeated until the end of simulation.
Give qualifications of instructors: DAP
//HDL Example 6-1 // //Behavioral description of //Universal shift register // Fig. 6-7 and Table 6-3 module shftreg.
Registers and Counters. Register Register is built with gates, but has memory. The only type of flip-flop required in this class – the D flip-flop – Has.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior : initial blocks execute.
Unit 12 Registers and Counters Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Registers & Counters M. Önder Efe
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior: initial blocks execute.
Chapter 4: Behavioral Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 4-1 Ders – 4: Davranışsal Modelleme.
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
1 Arithmetic, ALUs Lecture 9 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Introduction to ASIC flow and Verilog HDL
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Chapter 11: System Design.
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
Figure Implementation of an FSM in a CPLD..
Exp#5 & 6 Introduction to Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
Exp#7 Finite State Machine Design in Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
Overview Logistics Last lecture Today HW5 due today
Supplement on Verilog FF circuit examples
Supplement on Verilog for Algorithm State Machine Chart
Figure 8.1. The general form of a sequential circuit.
Last Lecture Talked about combinational logic always statements. e.g.,
Verilog Introduction Fall
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
Supplement on Verilog Sequential circuit examples: FSM
Sequential logic examples
Processor (I).
Digital System Design Review.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
Chapter 9: Sequential Logic Modules
SYNTHESIS OF SEQUENTIAL LOGIC
Computer Architecture and Design Lecture 6
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
FSM MODELING MOORE FSM MELAY FSM. Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-2]
Verilog.
ESE 437: Sensors and Instrumentation
Chapter 4: Behavioral Modeling
The Processor Lecture 3.1: Introduction & Logic Design Conventions
COE 202 Introduction to Verilog
A register design with parallel load input
6. Registers and Counters
Overview Part 1 - Registers, Microoperations and Implementations
Supplement on Verilog Sequential circuit examples: FSM
Dr. Tassadaq Hussain Introduction to Verilog – Part-3 Expressing Sequential Circuits and FSM.
The Verilog Hardware Description Language
CS 153 Logic Design Lab Professor Ian G. Harris
Flip Flops Unit-4.
Controllers and Datapaths
Lecture 4: Continuation of SystemVerilog
332:437 Lecture 9 Verilog Example
332:437 Lecture 9 Verilog Example
Dr. Tassadaq Hussain Introduction to Verilog – Part-4 Expressing FSM in Verilog (contd) and FSM State Encoding Dr. Tassadaq Hussain.
332:437 Lecture 9 Verilog Example
Presentation transcript:

Register-Transfer Level Components in Verilog CS 153, Spring 2007 Ian G. Harris Department of Computer Science University of California Irvine

Next Assignment: Div/Mod, Structurally Need to reimplement the Div/Mod structurally, not behaviorally Build it using RTL (datapath) components Need to determine how to implement behavioral operations structurally Some tips: Fixed length loops can be implemented with down counters and zero detectors Left/right shift can be implemented using shift registers Assignments within conditionals can be implemented using multiplexers to drive registers > X Y Z ‘1’ ‘0’ if (x > y) z = 1; else z = 0;

RTL Components Built from gates and flip-flops Operate on words rather than bits Some are combinational, some are sequential Data inputs vs. control inputs Data outputs vs. status outputs Example: 8 bit ALU Inputs - in1 [7:0], in2[7:0], op[3:0] Outputs - out[7:0], cout

RTL Component Design Define your RTL components behaviorally, not structurally Combine RTL components structurally to create a larger design Example: 4 to 1 Multiplexer module mux4to1 (W, S, f); input [0:3] W, [1:0] S; output f; reg f; always @(W or S) case (S) 0: f= W[0]; 1: f= W[1]; 2: f= W[2]; 3: f= W[3]; endcase endmodule

Sequential Components module reg8 (D, Clock, Resetn, Q); input [7:0] D, Clock, Resetn; output [7:0] Q; reg [7:0] Q; always @(negedge Resetn or posedge Clock) if (!Resetn) Q <= 0; else Q <= D; endmodule Reset is negatively asserted You can add a clear or a shift function as needed

Components needed for a Div/Mod Register, 8 bit, needs a load signal Shift register, 8 or 16 bit, needs a load signal Subtractor, 8 bit Comparator Multiplexer, 8 bit, 2 way Counter - to stop after 8 iterations Comparator (or zero detector) - to detect last iteration Notice that Div/Mod is sequential Your testbench will need to generate a clock