VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

Similar documents
Logic Design. Flip Flops, Registers and Counters

Microprocessor Design

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

CHAPTER 4: Logic Circuits

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

CHAPTER 4: Logic Circuits

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Digital Fundamentals: A Systems Approach

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

1. Convert the decimal number to binary, octal, and hexadecimal.

Counter dan Register

ECE 263 Digital Systems, Fall 2015

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

Counters

AIM: To study and verify the truth table of logic gates

RS flip-flop using NOR gate

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

COE328 Course Outline. Fall 2007

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

CprE 281: Digital Logic

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Lecture 8: Sequential Logic

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

6.3 Sequential Circuits (plus a few Combinational)

Introduction. Serial In - Serial Out Shift Registers (SISO)

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

MC9211 Computer Organization

DIGITAL FUNDAMENTALS

CS 261 Fall Mike Lam, Professor. Sequential Circuits

Registers and Counters

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

COMP2611: Computer Organization. Introduction to Digital Logic

Asynchronous (Ripple) Counters

LATCHES & FLIP-FLOP. Chapter 7

IT T35 Digital system desigm y - ii /s - iii

ELE2120 Digital Circuits and Systems. Tutorial Note 8

MODULE 3. Combinational & Sequential logic

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003

6. Sequential Logic Flip-Flops

Chapter. Synchronous Sequential Circuits

Registers and Counters

Synchronous Sequential Logic

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

Semester III. Subject Name: Digital Electronics. Subject Code: 09CT0301. Diploma Branches in which this subject is offered: Computer Engineering

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

RS flip-flop using NOR gate

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

A Matlab-Based Teaching Tool for Digital Logic

List of the CMOS 4000 series Dual tri-input NOR Gate and Inverter Quad 2-input NOR gate Dual 4-input NOR gate

Chapter 2. Digital Circuits

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Sequential Logic and Clocked Circuits

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

Tribhuvan University Institute of Science and Technology Bachelor of Science in Computer Science and Information Technology

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Logic Design II (17.342) Spring Lecture Outline

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7).

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

CprE 281: Digital Logic

Chapter 3. Boolean Algebra and Digital Logic

Last time, we saw how latches can be used as memory in a circuit

Logic Design Viva Question Bank Compiled By Channveer Patil

Experiment 8 Introduction to Latches and Flip-Flops and registers

LAB #4 SEQUENTIAL LOGIC CIRCUIT

DIGITAL ELECTRONICS MCQs

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

ENGN3213 Digital Systems and Microprocessors Sequential Circuits

Inside Digital Design Accompany Lab Manual

Register Transfer Level in Verilog: Part II

Combinational vs Sequential

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

Chapter 4. Logic Design

ACS College of Engineering. Department of Biomedical Engineering. HDL pre lab questions ( ) Cycle-1

CPS311 Lecture: Sequential Circuits

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

Multiplexor (aka MUX) An example, yet VERY useful circuit!

Flip-flop and Registers

Timing Pulses. Important element of laboratory electronics. Pulses can control logical sequences with precise timing.

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

Logic Design II (17.342) Spring Lecture Outline

Sequential Logic. Analysis and Synthesis. Joseph Cavahagh Santa Clara University. r & Francis. TaylonSi Francis Group. , Boca.Raton London New York \

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

Module -5 Sequential Logic Design

Department of Computer Science and Engineering Question Bank- Even Semester:

Operating Manual Ver.1.1

Combinational / Sequential Logic

TIME SCHEDULE. MODULE TOPICS PERIODS 1 Number system & Boolean algebra 17 Test I 1 2 Logic families &Combinational logic

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Chapter Contents. Appendix A: Digital Logic. Some Definitions

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

Laboratory 4. Figure 1: Serdes Transceiver

DIGITAL CIRCUIT COMBINATORIAL LOGIC

Transcription:

VeriLab An introductory lab for using Verilog in digital design (first draft) VeriLab An introductory lab for using Verilog in digital design Verilog is a hardware description language useful for designing digital systems at various levels of abstraction, from a pure behavioral description until a full structural description. In between, there are many mixed possibilities allowing us to design systems so detailed as we consider. This laboratory represents a module of knowledge devoted to introduce students in using Verilog only for simple digital projects. The main features of the language are exercised starting from small and simple circuits until medium scale complex systems. First, we must establish the distinction between size and complexity in digital systems. The size of a digital system is given by the number of elementary components used to build the system. A good measure for size could be the total number of inputs in all the gates of the system, or the number of two input gates could be used to realize the system. The complexity of a digital system is given by the magnitude order of the size of its description. Thus, we can talk about: simple systems having the size depending by the number of inputs, but having the complexity in the magnitude class of O(1) complex systems having the size and the complexity in the same magnitude order. Another goal of this laboratory is to accomdate students with the existing relation between the level of structuring of a digital system and the functional features so reached. There are two main structural mechanisms used to build a digital system:

to compose, connecting subsystems serially or/and in parallel to close loops inside the system, connecting some outputs to some inputs. As we shall see, each closed loop adds new functional features in a digital systems, thus allowing a more significant classification than the pour distinction, in use, between combinational and sequential circuits. Using the number of loops closed inside a system results the following classification: 0-OS: zero-order systems with no-loop circuits - the combinational circuits 1-OS: first-order systems with one-loop circuits - memory circuits 2-OS: second-order systems with two-loop circuits - automata 3-OS: third-order systems with three-loop circuits - mainly represented by processors 4-OS: fourth-order systems with four-loop circuits - mainly represented by computers In the first VeriLab we don't need any knowledge about digital circuits because we will describe structures only at the functional level. We need to know only how behaves the structure we want to design. The Verilog hardware description language allows us to simulate more or less complex systems using only behavioral descriptions. Many times these behavioral descriptions are sufficient to generate a synthesisable project, i.e., to have a description of what we intend to do that can be automatically translated into a network of logical gates performing the desired function. But, some times there are needed more details about the internal structure of the system to be built. For this reason follow five other VeriLabs. In each of them are presented specific techniques for designing digital structure. The second VeriLab introduces the main techniques to describe structurally the combinational circuits - the digital circuits with NO LOOP, belonging to the 0-OS. The third VeriLab deals with memory circuits - the digital circuits with ONE LOOP, belonging to the 1-OS. These first loop closed in digital circuits, if it is done appropriately, offers a first degree of autonomy - the autonomy to maintain the internal state between two significant events on the inputs. In the fourth VeriLab we shall describe small automata (for example, T flip-flop, JK flip-flop) or simple automata (automata having the loop closed through simple, recursive defined, combinational circuits, for example, counters). All these are TWO-LOOP circuits, belonging to the 2-OS.

The fifth VeriLab continues with automata in their complex form, called finite automata. Now, the combinational circuit which closes the loop is a random circuits having its size in the same order with its complexity. The behavior of these automata will be more complex, corresponding to the loop's complexity. Finally, the sixth VeriLab ends, this short introduction in using Verilog, with the THREE-LOOP circuits, belonging to the 3-OS. Only simple applications are presented because the main representant of this class - the processor - is too complex to be approached in these introductory labs. The goal of this last VeriLab is to emphasize only the effect of the third loop on the complexity of the resulting circuits in contrast with the solutions, for the same problems, allowed by the two-loop circuits. The amount of matter presented for each VeriLab is more that can be done in a class. The teacher will select the most appropriate problems to be done in the class and the rest can be used as home works. The problems dealing with the synthesisable code, with the synthesis and with the more complex systems will be the matter of a future module called Advanced VeriLab. Content VeriLab 1 BEHAVIORAL DESCRIPTIONS IN VERILOG from Problem no. 8 Expandable 8-bit incrementer The behavioral description of an 8-bit adder/substractor A top level structural description of an 8-bit adder/substractor The structural description of 32-bit incrementer using the module Problem no.1 32-bit adder (to be done by students) The n-bit counter The structural description of the counter Up-down counter (to be done) VeriLab 2 CIRCUITS STRUCTURAL DESCRIPTIONS OF COMBINATIONAL Equality comparator Full adder 4-bit adder with ripple carry 16-bit priority encoder The behavioral description of a 16 to 1 multiplexer The behavioral description of a 4-bit decoder The structural description of the same decoder

Problem no. 8 Problem no. 9 The structural description of the previously described multiplexer The transcoder for 7-segment display VeriLab 3 MEMORIES: LATCHES, FLIP-FLOPS, REGISTERS, RANDOM ACCESS MEMORIES The unstable loop: a three (odd) inverting level loop The stable loop: elementary latch built with two loop-connected NANDs Elementary latch built with two loop connected NORs (proposed to done) The clocked latch The master-slave principle D (delay) flip-flop D flip-flop with asynchronous set and reset (to be done be structurally) Problem no. 8 The behavioral description of D flip-flop with asynchronous reset Problem no. 9 4-bit register structurally described 0 The behavioral description of the n-bit register with asynchronous reset 1 Static random access memory (RAM) 2 Multi-port memory VeriLab 4 AUTOMATA: T & JK FLIP-FLOPS, COUNTERS AND OTHERS SIMPLE AUTOMATA flip-flop home work) Problem no. 8 The simplest automaton: the T flip-flop The biggest flip-flop as the simplest 2-input automaton: the JK The asynchronous counter The structure of an n-bit synchronous counter How to design all 2-input, 2-state and one output automata? Multiplier (accumulator) Multiplier using an adder and a shifter in order to save time (as Stack memory VeriLab 5 CONTROL FINITE AUTOMATA: THE COMPLEX COMMAND OR AUTOMATA

Automaton for semaphors Automaton of recognizing a regular sequences Electronic key More patient electronic key VeriLab 6 LOOP-CONNECTED AUTOMATA: THE DEEPEST SEGREGATION BETWEEN SIMPLE & COMPLEX CIRCUITS Automaton for semaphors - a remake of the first problem from VeriLab 5 Stack automaton Electronic key - a remake of the second problem from the previous VeriLab Electronic key - a remake of the third problem from VeriLab 5