12. A B C A B C A B C 1 A B C A B C A B C JK-FF NETr

Size: px
Start display at page:

Download "12. A B C A B C A B C 1 A B C A B C A B C JK-FF NETr"

Transcription

1 2..,.,.. Flip-Flops :, Flip-Flops, Flip Flop. ( MOD) , 7 ( ).. n Flip-Flops. n Flip-Flops : 2 n. 2 n, Modulo. (-5) -4 ( -), (-) - ( -).. / A A A MOD-5 6 MOD-6 7 MOD / A A A MOD-8 9 MOD-9 MOD-.. :. (-). 2. n ( 2 n ) FF.. SR PETr / NETr ( ) ( ). 3. ( ) FF ( ). 4. FF,,,. (, FF). 5. () FF FF NETr -8 -FF NETr (,

2 FF ).. :. -8 ( -7) n = 8 n = 3 FF ( -FF NETr). 3. FF. / (..) A A + (..) + + A A FF FF FF ( ). (L) FF : A =, A =X A-FF =, =X -FF =, =X -FF..,,. (, ).... FF. :. A A X X X X X X X X A =. A =. A A X X X X X X X X = = A A X X X X X X X X = = 5. (...) FF. ( ). and H P A Q 4 2 P Q H P Q 2 4. FF. P Q Q Q

3 FF. 3.,7,4,2,5,3 ( ) -FF NETr,7,4,2,5,3 ( ) -FF NETr.. /.... FF A A X X D D D D D D 6 D D D D D D 3.,7,4,2,5,3..,,7,4,2,5, n 7 ( 2 n ) n = 3 FF ( -FF NETr). 3. FF. 4. FF.,.,6. ( ).... FF. A A FF. A A D X X X D D X D D X A = A = A A X D X D X D X X D = = A A D X X D X D X X X D = A = 5. (...) FF. ( ). 4..,7,4,2,5,3 FLIP-FLOP 2. mod- Flip-Flops. 3., 6, 3, 7,, 2, 5 Flip- Flops. 4. MOD-8 --, State Editor..

4 Finite State Machine (FSM) Editor. FSM.. FileNew, 2.. L reset. q 3bits FSM Editor, (S,,S8), 3. FSM Editor, VHDL,. vhd, File Export (VHDL code). -- Generated : /6/23 5:5:49 PM library IEEE use IEEE.std_logic_64.all use IEEE.std_logic_arith.all use IEEE.std_logic_unsigned.all entity SAMPLE is port ( reset: in std_logic L: in std_logic q: out std_logic_vector ( 2 downto )) end architecture SAMPLE_arch of SAMPLE is -- SYMOLI ENODED state machine: SMachine type SMachine_type is (S,S2,S3,S4,S5,S6,S7,S8) signal SMachine: SMachine_type := S begin -- concurrent signals assignments Machine: SMachine SMachine_machine: process (L) begin if reset='' then SMachine <= S elsif L'event and L = '' then -- Set default values for registered outputs/signals and for variables case SMachine is when S => q<="" if reset='' then SMachine <= S2 end if when S2 => q<="" if reset='' then SMachine <= S elsif reset=''then SMachine <= S3 end if when S3 => q<="" if reset='' then SMachine <= S elsif reset=''then SMachine <= S4 end if when S4 => q<="" if reset='' then SMachine <= S elsif reset=''then SMachine <= S5 end if when S5 => q<="" if reset='' then SMachine <= S elsif reset=''then SMachine <= S6 end if when S6 => q<="" if reset='' then SMachine <= S elsif reset=''then 4

5 5 SMachine <= S7 end if when S7 => q<="" if reset='' then SMachine <= S elsif reset=''then SMachine <= S8 end if when S8 => q<="" if reset='' then SMachine <= S elsif reset=''then SMachine <= S end if when others => null end case end if end process end SAMPLE_arch. Tools New Macro Wizard. 4. Macro Name, ounter. From File counter.vhd, VHDL. 5. Next, 5 TSM. Save. 6. Insert, U ounter 6. reset clk ounter q Pin us Pin Meters Voltage Pin, q 3bits.

6 6 H L clk k Reset 8. U ounter reset clk ounter q q. VHDL ounterb.vhd, Tools New Macro VHDL. Analysis Digital VHDL Simulation,. VHDL. bit. FSM Editor ounter File Edit Ports. 9, bits q2, q, q.. H L T H q2 q clk k L H Reset. U2 ounterb reset clk ounterb q2 q q q2 q q q2 q q L H q L. 2.m 4.m 6.m 8.m Time (s). VHDL. IF q2<='' q<='' q<='' 9. S S2 S3 S4 q2<='' q2<='' q<='' q<='' q<='' q<='' q2<='' q<='' q<='' q2<='' q<='' q<='' S5 S6 S7 S8 q2<='' q2<='' q<='' q<='' q<='' q<='' q2<='' q<='' q<='' - (-->9-->). bit (clk) 4-bit (digit). IF. temp 4 Flip-Flops 4-bit. LIRARY ieee USE ieee.std_logic_64.all

7 7 ENTITY counter IS PORT (clk : IN STD_LOGI digit : OUT INTEGER RANGE TO 9) END counter, 7 segment display (SSD) ARHITETURE counter OF counter IS count: PROESS(clk) VARIALE temp : INTEGER RANGE TO IF (clk'event AND clk='') THEN temp := temp + IF (temp=) THEN temp := digit <= temp END PROESS count END counter reset temp ( toy digit). temp 4-bit.. WAIT UNTIL LIRARY ieee USE ieee.std_logic_64.all ENTITY counter IS PORT (clk : IN STD_LOGI digit : OUT INTEGER RANGE TO 9) END counter ARHITETURE counter OF counter IS PROESS -- no sensitivity list VARIALE temp : INTEGER RANGE TO WAIT UNTIL (clk'event AND clk='') temp := temp + IF (temp=) THEN temp := digit <= temp END counter LIRARY ieee USE ieee.std_logic_64.all ENTITY counter IS PORT (clk, reset : IN STD_LOGI digit, digit2 : OUT STD_LOGI_VETOR (6 DOWNTO )) END counter ARHITETURE counter OF counter IS PROESS(clk, reset) VARIALE temp: INTEGER RANGE TO VARIALE temp2: INTEGER RANGE TO IF (reset='') THEN temp := temp2 := ELSIF (clk'event AND clk='') THEN temp := temp + IF (temp=) THEN temp := temp2 := temp2 + IF (temp2=) THEN temp2 := ---- D to SSD conversion: -----

8 ASE temp IS WHEN => digit <= "" --7E WHEN => digit <= "" --3 WHEN 2 => digit <= "" --6D WHEN 3 => digit <= "" --79 WHEN 4 => digit <= "" --33 WHEN 5 => digit <= "" --5 WHEN 6 => digit <= "" --5F WHEN 7 => digit <= "" --7 WHEN 8 => digit <= "" --7F WHEN 9 => digit <= "" --7 WHEN OTHERS => NULL END ASE ASE temp2 IS WHEN => digit2 <= "" --7E WHEN => digit2 <= "" --3 WHEN 2 => digit2 <= "" --6D WHEN 3 => digit2 <= "" --79 WHEN 4 => digit2 <= "" --33 WHEN 5 => digit2 <= "" --5 WHEN 6 => digit2 <= "" --5F WHEN 7 => digit2 <= "" --7 WHEN 8 => digit2 <= "" --7F WHEN 9 => digit2 <= "" --7 WHEN OTHERS => NULL END ASE END counter FOR/LOOP: FOR i IN TO 5 LOOP x(i) <= enable AND w(i+2) y(, i) <= w(i) END LOOP FOR/LOOP ( GENERATE),... FOR I IN TO HOIE LOOP, HOIE ( ),. WHILE/LOOP: WHILE (i < ) LOOP WAIT UNTIL clk'event AND clk='' (other statements) END LOOP EXIT:, EXIT, (, LOOP ). : FOR i IN data'range LOOP ASE data(i) IS WHEN '' => count:=count+ WHEN OTHERS => EXIT END ASE END LOOP NEXT: NEXT LOOP i=skip: FOR i IN TO 5 LOOP NEXT WHEN i=skip -- jumps to next iteration (...) END LOOP arry Ripple Adder generic, bits. 8bit. FOR/LOOP, IF. --Solution : Generic, with VETORS LIRARY ieee USE ieee.std_logic_64.all ENTITY adder IS GENERI (length : INTEGER := 8) PORT ( a, b: IN STD_LOGI_VETOR (length- DOWNTO ) cin: IN STD_LOGI s: OUT STD_LOGI_VETOR (length- DOWNTO ) cout: OUT STD_LOGI) END adder ARHITETURE adder OF adder IS PROESS (a, b, cin) 8

9 9 VARIALE carry : STD_LOGI_VETOR (length DOWNTO ) carry() := cin FOR i IN TO length- LOOP s(i) <= a(i) XOR b(i) XOR carry(i) carry(i+) := (a(i) AND b(i)) OR (a(i) AND carry(i)) OR (b(i) AND carry(i)) END LOOP cout <= carry(length) END adder --Solution 2: non-generic, --with INTEGERS LIRARY ieee USE ieee.std_logic_64.all ENTITY adder IS PORT ( a, b: IN INTEGER RANGE TO 255 c: IN STD_LOGI s: OUT INTEGER RANGE TO 255 c8: OUT STD_LOGI) END adder ARHITETURE adder OF adder IS PROESS (a, b, c) VARIALE temp : INTEGER RANGE TO 5 IF (c='') THEN temp:= ELSE temp:= temp := a + b + temp IF (temp > 255) THEN c8 <= '' temp := temp ELSE c8 <= '' s <= temp END adder (ad clocking) () ( ). (.. PLDs) flip-flop. «signal does not hold value after clock edge». ( ). : PROESS (clk) IF(clk'EVENT AND clk='') THEN counter <= counter + ELSIF(clk'EVENT AND clk='') THEN counter <= counter +...,, counter.,. EVENT. IF(clk'EVENT AND clk=''), IF(clk'EVENT), (.. AND clk=') : clock not locally stable.,. : PROESS (clk) IF(clk'EVENT) THEN counter := counter +... PROESS clk,.,,.,,.,., PROESS,... : PROESS (clk) counter := counter +...

10 counter clk ( ), «ignored unnecessary pin clk».,,.,. PROESS (clk) IF(clk'EVENT AND clk='') THEN x <= d PROESS (clk) IF(clk'EVENT AND clk='') THEN y <= d VARIALE SIGNAL -7. VARIALE. SIGNAL. : --Solution : With a VARIALE ENTITY counter IS PORT ( clk, rst: IN IT count: OUT INTEGER RANGE TO 7) END counter ARHITETURE counter OF counter IS PROESS (clk, rst) VARIALE temp: INTEGER RANGE TO 7 IF (rst='') THEN temp:= ELSIF (clk'event AND clk='') THEN temp := temp+ count <= temp END counter VARIALE. (clk). : -- Solution 2: With SIGNALS only ENTITY counter IS PORT ( clk, rst: IN IT count: UFFER INTEGER RANGE TO 7) END counter ARHITETURE counter OF counter IS PROESS (clk, rst) IF (rst='') THEN count <= ELSIF (clk'event AND clk='') THEN count <= count + END counter 2, SIGNALS.,, count UFFER, ( ). SIGNAL VARIALE. std_logic_64 STD_LOGI. flipflops ( 3bit count). 4bit 4bit..

11 IF lear = '' THEN value <= (OTHERS => '') -- 4-bit vector of, same as "" ELSIF (lock'event AND lock='') THEN IF ount = '' THEN value <= value + Q <= value END ehavioral - lear ount VHDL. USE IEEE.STD_LOGI_UNSIGNED.ALL STD_LOGI_VETOR. value. clear, value OTHERS =>., count, value. count Q Q<=value, PROESS. LIRARY IEEE USE IEEE.STD_LOGI_64.ALL USE IEEE.STD_LOGI_UNSIGNED.ALL -- need this to -- add STD_LOGI_VETORs ENTITY counter IS PORT ( lock: IN STD_LOGI lear: IN STD_LOGI ount: IN STD_LOGI Q : OUT STD_LOGI_VETOR(3 DOWNTO )) END counter ARHITETURE ehavioral OF counter IS SIGNAL value: STD_LOGI_VETOR(3 DOWNTO ) PROESS (lock, lear) -.. lear ount Down VHDL. LIRARY IEEE USE IEEE.STD_LOGI_64.ALL ENTITY udcounter IS PORT ( lock: IN STD_LOGI

12 lear: IN STD_LOGI ount: IN STD_LOGI Down: IN STD_LOGI Q: OUT INTEGER RANGE TO 5) END udcounter ARHITETURE ehavioral OF udcounter IS PROESS (lock, lear) VARIALE value: INTEGER RANGE TO 5 IF (lear = '') THEN value := ELSIF (lock'event AND lock='') THEN IF (ount = '') THEN IF (Down = '') THEN value := value + ELSE value := value - Q <= value END ehavioral 2 lear Load ount Down VHDL

2 n. (finite state machines).

2 n. (finite state machines). . - S,, T FI-FO. ;. 2. ;,,.,, (sequential).. ( )... 3. ; (state) (state variables),.,, (state)..,,..,,. 4. ;. n 2 n., 2 n,, (finite state machines). 5. (feedback).,..,.,,. 6.,,., ( ).. ,.,. 7., ( ).,..,

More information

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process) ECE 3401 Lecture 7 Concurrent Statements & Sequential Statements (Process) Concurrent Statements VHDL provides four different types of concurrent statements namely: Signal Assignment Statement Simple Assignment

More information

Digital Design with VHDL

Digital Design with VHDL Digital Design with VHDL CSE 560M Lecture 5 Shakir James Shakir James 1 Plan for Today Announcement Commentary due Wednesday HW1 assigned today. Begin immediately! Questions VHDL help session Assignment

More information

Lenguaje VHDL. Diseño de sistemas digitales secuenciales

Lenguaje VHDL. Diseño de sistemas digitales secuenciales Lenguaje VHDL Diseño de sistemas digitales secuenciales Flip-Flop D 1 entity d_ff is clk: in std_logic; d: in std_logic; q: out std_logic 2 end d_ff; P3 P1 5 Q D Q Q(t+1) 0 0 0 0 1 0 1 0 1 1 1 1 architecture

More information

VHDL GUIDELINES FOR SYNTHESIS

VHDL GUIDELINES FOR SYNTHESIS VHDL GUIDELINES FOR SYNTHESIS Claudio Talarico For internal use only 1/19 BASICS VHDL VHDL (Very high speed integrated circuit Hardware Description Language) is a hardware description language that allows

More information

An Example VHDL Application for the TM-4

An Example VHDL Application for the TM-4 An Example VHDL Application for the TM-4 Dave Galloway Edward S. Rogers Sr. Department of Electrical and Computer Engineering University of Toronto March 2005 Introduction This document describes a simple

More information

VGA video signal generation

VGA video signal generation A VGA display controller VGA video signal generation A VGA video signal contains 5 active signals: horizontal sync: digital signal, used for synchronisation of the video vertical sync: digital signal,

More information

In this example the length of the vector is determined by D length and used for the index variable.

In this example the length of the vector is determined by D length and used for the index variable. Loops Loop statements are a catagory of control structures that allow you to specify repeating sequences of behavior in a circuit. There are three primary types of loops in VHDL: for loops, while loops,

More information

Using Xilinx ISE for VHDL Based Design

Using Xilinx ISE for VHDL Based Design ECE 561 Project 4-1 - Using Xilinx ISE for VHDL Based Design In this project you will learn to create a design module from VHDL code. With Xilinx ISE, you can easily create modules from VHDL code using

More information

(1) D Flip-Flop with Asynchronous Reset. (2) 4:1 Multiplexor. CS/EE120A VHDL Lab Programming Reference

(1) D Flip-Flop with Asynchronous Reset. (2) 4:1 Multiplexor. CS/EE120A VHDL Lab Programming Reference VHDL is an abbreviation for Very High Speed Integrated Circuit Hardware Description Language, and is used for modeling digital systems. VHDL coding includes behavior modeling, structure modeling and dataflow

More information

VHDL programmering H2

VHDL programmering H2 VHDL programmering H2 VHDL (Very high speed Integrated circuits) Hardware Description Language IEEE standard 1076-1993 Den benytter vi!! Hvornår blev den frigivet som standard første gang?? Ca. 1980!!

More information

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE Ioan Lemeni Computer and Communication Engineering Department Faculty of Automation, Computers and Electronics University of Craiova 13, A.I. Cuza, Craiova,

More information

CPE 462 VHDL: Simulation and Synthesis

CPE 462 VHDL: Simulation and Synthesis CPE 462 VHDL: Simulation and Synthesis Topic #09 - a) Introduction to random numbers in hardware Fortuna was the goddess of fortune and personification of luck in Roman religion. She might bring good luck

More information

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary RTL Design RTL Overview Gate-level design is now rare! design automation is necessary to manage the complexity of modern circuits only library designers use gates automated RTL synthesis is now almost

More information

LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER

LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER OBJECTIVES 1. Learn the basic elements of VHDL that are implemented in Warp. 2. Build a simple application using VHDL and

More information

A CPLD VHDL Introduction

A CPLD VHDL Introduction Application Note: CPLD R XAPP105 (v2.0) August 30, 2001 Summary This introduction covers the fundamentals of VHDL as applied to Complex Programmable Logic Devices (CPLDs). Specifically included are those

More information

Lab 7: VHDL 16-Bit Shifter

Lab 7: VHDL 16-Bit Shifter Lab 7: VHDL 16-Bit Shifter Objectives : Design a 16-bit shifter which need implement eight shift operations: logic shift right, logic shift left, arithmetic shift right, arithmetic shift left, rotate right,

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: omputer Organization and Architecture Lecture 8: Registers and ounters Registers A register is a group of flip-flops. Each flip-flop stores one bit of data; n flip-flops are required to store

More information

VHDL Test Bench Tutorial

VHDL Test Bench Tutorial University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate

More information

! " # # $ '"() * #! +, # / $0123$

!  # # $ '() * #! +, # / $0123$ ! " # # $ ##% "& & $# '"() * # +,(- *,. & #! +, # ( / $0123$ ( 1 - $# #4+,ENTITY4 ' 4 ) '! )( 5, # - 5 $ Contador_1s D #+ 6 CNT #+ 7( D 3 Contador_1s 2 Cnt ENTITY Contador_1s IS PORT ( D: IN BIT_VECTOR(2

More information

Hardware Implementation of the Stone Metamorphic Cipher

Hardware Implementation of the Stone Metamorphic Cipher International Journal of Computer Science & Network Security VOL.10 No.8, 2010 Hardware Implementation of the Stone Metamorphic Cipher Rabie A. Mahmoud 1, Magdy Saeb 2 1. Department of Mathematics, Faculty

More information

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset.

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset. More Verilog 8-bit Register with Synchronous Reset module reg8 (reset, CLK, D, Q); input reset; input [7:0] D; output [7:0] Q; reg [7:0] Q; if (reset) Q = 0; else Q = D; module // reg8 Verilog - 1 Verilog

More information

Quartus II Introduction for VHDL Users

Quartus II Introduction for VHDL Users Quartus II Introduction for VHDL Users This tutorial presents an introduction to the Quartus II software. It gives a general overview of a typical CAD flow for designing circuits that are implemented by

More information

Digital Design with Synthesizable VHDL

Digital Design with Synthesizable VHDL Digital Design with Synthesizable VHDL Prof. Stephen A. Edwards Columbia University Spring 2012 Combinational Logic in a Dataflow Style Hierarchy: Instantiating Components (entities) Combinational Logic

More information

Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit

Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit 1 Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT OF FOR THE DEGREE IN Bachelor of Technology In Electronics and Communication

More information

Asynchronous & Synchronous Reset Design Techniques - Part Deux

Asynchronous & Synchronous Reset Design Techniques - Part Deux Clifford E. Cummings Don Mills Steve Golson Sunburst Design, Inc. LCDM Engineering Trilobyte Systems cliffc@sunburst-design.com mills@lcdm-eng.com sgolson@trilobyte.com ABSTRACT This paper will investigate

More information

Digital Systems Design. VGA Video Display Generation

Digital Systems Design. VGA Video Display Generation Digital Systems Design Video Signal Generation for the Altera DE Board Dr. D. J. Jackson Lecture 12-1 VGA Video Display Generation A VGA signal contains 5 active signals Two TTL compatible signals for

More information

Sprites in Block ROM

Sprites in Block ROM Sprites in Block ROM 1 Example 37 Sprites in Block ROM In Example 36 we made a sprite by storing the bit map of three initials in a VHDL ROM. To make a larger sprite we could use the Core Generator to

More information

Finite State Machine Design and VHDL Coding Techniques

Finite State Machine Design and VHDL Coding Techniques Finite State Machine Design and VHDL Coding Techniques Iuliana CHIUCHISAN, Alin Dan POTORAC, Adrian GRAUR "Stefan cel Mare" University of Suceava str.universitatii nr.13, RO-720229 Suceava iulia@eed.usv.ro,

More information

Chapter 8. Sequential Circuits for Registers and Counters

Chapter 8. Sequential Circuits for Registers and Counters Chapter 8 Sequential Circuits for Registers and Counters Lesson 3 COUNTERS Ch16L3- "Digital Principles and Design", Raj Kamal, Pearson Education, 2006 2 Outline Counters T-FF Basic Counting element State

More information

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies ETEC 2301 Programmable Logic Devices Chapter 10 Counters Shawnee State University Department of Industrial and Engineering Technologies Copyright 2007 by Janna B. Gallaher Asynchronous Counter Operation

More information

State Machines in VHDL

State Machines in VHDL State Machines in VHDL Implementing state machines in VHDL is fun and easy provided you stick to some fairly well established forms. These styles for state machine coding given here is not intended to

More information

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa Experiment # 9 Clock generator circuits & Counters Eng. Waleed Y. Mousa 1. Objectives: 1. Understanding the principles and construction of Clock generator. 2. To be familiar with clock pulse generation

More information

Digital Design and Synthesis INTRODUCTION

Digital Design and Synthesis INTRODUCTION Digital Design and Synthesis INTRODUCTION The advances in digital design owe its progress to 3 factors. First the acceleration at which the CMOS technology has advanced in last few decades and the way

More information

Asynchronous Counters. Asynchronous Counters

Asynchronous Counters. Asynchronous Counters Counters and State Machine Design November 25 Asynchronous Counters ENGI 25 ELEC 24 Asynchronous Counters The term Asynchronous refers to events that do not occur at the same time With respect to counter

More information

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC. 8.1 Objectives To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC. 8.2 Introduction Circuits for counting events are frequently used in computers and other digital

More information

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. http://www.ecs.umass.edu/ece/ece232/ Basic Verilog

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. http://www.ecs.umass.edu/ece/ece232/ Basic Verilog ECE232: Hardware Organization and Design Part 3: Verilog Tutorial http://www.ecs.umass.edu/ece/ece232/ Basic Verilog module ();

More information

Counters. Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0

Counters. Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 ounter ounters ounters are a specific type of sequential circuit. Like registers, the state, or the flip-flop values themselves, serves as the output. The output value increases by one on each clock cycle.

More information

Counters & Shift Registers Chapter 8 of R.P Jain

Counters & Shift Registers Chapter 8 of R.P Jain Chapter 3 Counters & Shift Registers Chapter 8 of R.P Jain Counters & Shift Registers Counters, Syllabus Design of Modulo-N ripple counter, Up-Down counter, design of synchronous counters with and without

More information

From VHDL to FPGA jagron@ittc.ku.edu, enno.luebbers@upb.de

From VHDL to FPGA jagron@ittc.ku.edu, enno.luebbers@upb.de From VHDL to FPGA #1: VHDL simulation Jason Agron University of Kansas Enno Lübbers University of Paderborn jagron@ittc.ku.edu, enno.luebbers@upb.de 1 Field-Programmable Gate Arrays (FPGAs) Fine-grained

More information

SELECT INPUTS STROBE OUTPUTS

SELECT INPUTS STROBE OUTPUTS 1 9. 1. I SN74153. 4x1 U1 74153 2 21 22 23 1. SN74153 ( ), ogic Is-MUs MUX. SEET DT INPUTS STROE OUTPUT INPUTS 1 2 3 G Y X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X 1. SN74153. : SEET INPUTS

More information

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on CS 61C: Great Ideas in Computer Architecture Finite State Machines Instructors: Krste Asanovic & Vladimir Stojanovic hbp://inst.eecs.berkeley.edu/~cs61c/sp15 1 Levels of RepresentaKon/ InterpretaKon High

More information

Cascaded Counters. Page 1 BYU

Cascaded Counters. Page 1 BYU Cascaded Counters Page 1 Mod-N Counters Generally we are interested in counters that count up to specific count values Not just powers of 2 A mod-n counter has N states Counts from 0 to N-1 then rolls

More information

Start Active-HDL by double clicking on the Active-HDL Icon (windows).

Start Active-HDL by double clicking on the Active-HDL Icon (windows). Getting Started Using Aldec s Active-HDL This guide will give you a short tutorial in using the project mode of Active-HDL. This tutorial is broken down into the following sections 1. Part 1: Compiling

More information

Introduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division

Introduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division Introduction to Programmable Logic Devices John Coughlan RAL Technology Department Detector & Electronics Division PPD Lectures Programmable Logic is Key Underlying Technology. First-Level and High-Level

More information

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 1/20 EE 42/100 Lecture 24: Latches and Flip Flops ELECTRONICS Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad University of California,

More information

EC313 - VHDL State Machine Example

EC313 - VHDL State Machine Example EC313 - VHDL State Machine Example One of the best ways to learn how to code is seeing a working example. Below is an example of a Roulette Table Wheel. Essentially Roulette is a game that selects a random

More information

The Designer's Guide to VHDL

The Designer's Guide to VHDL The Designer's Guide to VHDL Third Edition Peter J. Ashenden EDA CONSULTANT, ASHENDEN DESIGNS PTY. LTD. ADJUNCT ASSOCIATE PROFESSOR, ADELAIDE UNIVERSITY AMSTERDAM BOSTON HEIDELBERG LONDON m^^ yj 1 ' NEW

More information

Module 3: Floyd, Digital Fundamental

Module 3: Floyd, Digital Fundamental Module 3: Lecturer : Yongsheng Gao Room : Tech - 3.25 Email : yongsheng.gao@griffith.edu.au Structure : 6 lectures 1 Tutorial Assessment: 1 Laboratory (5%) 1 Test (20%) Textbook : Floyd, Digital Fundamental

More information

Design: a mod-8 Counter

Design: a mod-8 Counter Design: a mod-8 Counter A mod-8 counter stores a integer value, and increments that value (say) on each clock tick, and wraps around to 0 if the previous stored value was 7. So, the stored value follows

More information

Two Binary Algorithms for Calculating the Jacobi Symbol and a Fast Systolic Implementation in Hardware

Two Binary Algorithms for Calculating the Jacobi Symbol and a Fast Systolic Implementation in Hardware Two Binary Algorithms for Calculating the Jacobi Symbol and a Fast Systolic Implementation in Hardware George Purdy, Carla Purdy, and Kiran Vedantam ECECS Department, University of Cincinnati, Cincinnati,

More information

Introduction to the Altera Qsys System Integration Tool. 1 Introduction. For Quartus II 12.0

Introduction to the Altera Qsys System Integration Tool. 1 Introduction. For Quartus II 12.0 Introduction to the Altera Qsys System Integration Tool For Quartus II 12.0 1 Introduction This tutorial presents an introduction to Altera s Qsys system inegration tool, which is used to design digital

More information

Floating point package user s guide By David Bishop (dbishop@vhdl.org)

Floating point package user s guide By David Bishop (dbishop@vhdl.org) Floating point package user s guide By David Bishop (dbishop@vhdl.org) Floating-point numbers are the favorites of software people, and the least favorite of hardware people. The reason for this is because

More information

Lecture 8: Synchronous Digital Systems

Lecture 8: Synchronous Digital Systems Lecture 8: Synchronous Digital Systems The distinguishing feature of a synchronous digital system is that the circuit only changes in response to a system clock. For example, consider the edge triggered

More information

Digital Logic Design Sequential circuits

Digital Logic Design Sequential circuits Digital Logic Design Sequential circuits Dr. Eng. Ahmed H. Madian E-mail: ahmed.madian@guc.edu.eg Dr. Eng. Rania.Swief E-mail: rania.swief@guc.edu.eg Dr. Eng. Ahmed H. Madian Registers An n-bit register

More information

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline SR Latch D Latch Edge-Triggered D Flip-Flop (FF) S-R Flip-Flop (FF) J-K Flip-Flop (FF) T Flip-Flop

More information

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction Software ISO 7816 I/O Line Implementation Features ISO 7816-3 compliant (direct convention) Byte reception and transmission with parity check Retransmission on error detection Automatic reception at the

More information

FINITE STATE MACHINE: PRINCIPLE AND PRACTICE

FINITE STATE MACHINE: PRINCIPLE AND PRACTICE CHAPTER 10 FINITE STATE MACHINE: PRINCIPLE AND PRACTICE A finite state machine (FSM) is a sequential circuit with random next-state logic. Unlike the regular sequential circuit discussed in Chapters 8

More information

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE INTRODUCTION TO DIGITAL SYSTEMS 1 DESCRIPTION AND DESIGN OF DIGITAL SYSTEMS FORMAL BASIS: SWITCHING ALGEBRA IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE COURSE EMPHASIS:

More information

Lesson 12 Sequential Circuits: Flip-Flops

Lesson 12 Sequential Circuits: Flip-Flops Lesson 12 Sequential Circuits: Flip-Flops 1. Overview of a Synchronous Sequential Circuit We saw from last lesson that the level sensitive latches could cause instability in a sequential system. This instability

More information

The components. E3: Digital electronics. Goals:

The components. E3: Digital electronics. Goals: E3: Digital electronics Goals: Basic understanding of logic circuits. Become familiar with the most common digital components and their use. Equipment: 1 st. LED bridge 1 st. 7-segment display. 2 st. IC

More information

NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY

NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY Section 8. Counters HOW MUCH Once you understand the capabilities of different Ps, you might ask, Why not ES I COS? just always use the most capable P available? For example, even if a circuit fits in

More information

Modeling Latches and Flip-flops

Modeling Latches and Flip-flops Lab Workbook Introduction Sequential circuits are digital circuits in which the output depends not only on the present input (like combinatorial circuits), but also on the past sequence of inputs. In effect,

More information

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse. DIGITAL COUNTERS http://www.tutorialspoint.com/computer_logical_organization/digital_counters.htm Copyright tutorialspoint.com Counter is a sequential circuit. A digital circuit which is used for a counting

More information

Printed Circuit Board Design with HDL Designer

Printed Circuit Board Design with HDL Designer Printed Circuit Board Design with HDL Designer Tom Winkert Teresa LaFourcade NASNGoddard Space Flight Center 301-286-291 7 NASNGoddard Space Flight Center 301-286-0019 tom.winkert8 nasa.gov teresa. 1.

More information

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447). G. H. RAISONI COLLEGE OF ENGINEERING, NAGPUR Department of Electronics & Communication Engineering Branch:-4 th Semester[Electronics] Subject: - Digital Circuits List of Experiment Sr. Name Of Experiment

More information

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department Counters By: Electrical Engineering Department 1 Counters Upon completion of the chapter, students should be able to:.1 Understand the basic concepts of asynchronous counter and synchronous counters, and

More information

AES (Rijndael) IP-Cores

AES (Rijndael) IP-Cores AES (Rijndael) IP-Cores Encryption/Decryption and Key Expansion Page 1 Revision History Date Version Description 24 February 2006 1.0 Initial draft. 15 March 2006 1.1 Block diagrams added. 26 March 2006

More information

ASYNCHRONOUS COUNTERS

ASYNCHRONOUS COUNTERS LB no.. SYNCHONOUS COUNTES. Introduction Counters are sequential logic circuits that counts the pulses applied at their clock input. They usually have 4 bits, delivering at the outputs the corresponding

More information

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1 WEEK 8.1 egisters and Counters ECE124 igital Circuits and Systems Page 1 Additional schematic FF symbols Active low set and reset signals. S Active high set and reset signals. S ECE124 igital Circuits

More information

KCPSM6 Instruction Set

KCPSM6 Instruction Set KPSM6 Instruction Set aaa : 2-bit address to FFF kk : 8-bit constant to FF pp : 8-bit port ID to FF p : 4-bit port ID to F ss : 8-bit scratch pad location to FF x : Register within bank s to sf y : Register

More information

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. Objectives Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. describe how such a flip-flop can be SET and RESET. describe the disadvantage

More information

Application Note 120 Communicating Through the 1-Wire Master

Application Note 120 Communicating Through the 1-Wire Master www.dalsemi.com Application Note 120 Communicating Through the 1-Wire Master INTRODUCTION The DS1WM 1-Wire Master was created to facilitate host CPU communication with devices over a 1-Wire bus without

More information

Memory Elements. Combinational logic cannot remember

Memory Elements. Combinational logic cannot remember Memory Elements Combinational logic cannot remember Output logic values are function of inputs only Feedback is needed to be able to remember a logic value Memory elements are needed in most digital logic

More information

6. Control Structures

6. Control Structures - 35 - Control Structures: 6. Control Structures A program is usually not limited to a linear sequence of instructions. During its process it may bifurcate, repeat code or take decisions. For that purpose,

More information

Rotary Encoder Interface for Spartan-3E Starter Kit

Rotary Encoder Interface for Spartan-3E Starter Kit Rotary Encoder Interface for Spartan-3E Starter Kit Ken Chapman Xilinx Ltd 2 th February 26 Rev.2 With thanks to Peter Alfke (Xilinx Inc.) Limitations Limited Warranty and Disclaimer. These designs are

More information

Using Altera MAX Series as Microcontroller I/O Expanders

Using Altera MAX Series as Microcontroller I/O Expanders 2014.09.22 Using Altera MAX Series as Microcontroller I/O Expanders AN-265 Subscribe Many microcontroller and microprocessor chips limit the available I/O ports and pins to conserve pin counts and reduce

More information

Clock Data Recovery Design Techniques for E1/T1 Based on Direct Digital Synthesis Author: Paolo Novellini and Giovanni Guasti

Clock Data Recovery Design Techniques for E1/T1 Based on Direct Digital Synthesis Author: Paolo Novellini and Giovanni Guasti Application Note: Virtex and Spartan FPGA Families XAPP868 (v1.0) January 29, 2008 Clock Data ecovery Design Techniques for E1/T1 Based on Direct Digital Synthesis Author: Paolo Novellini and Giovanni

More information

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw. Sequential Circuit

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw. Sequential Circuit Modeling Sequential Elements with Verilog Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw 4-1 Sequential Circuit Outputs are functions of inputs and present states of storage elements

More information

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters LAB OBJECTIVES 1. Introduction to latches and the D type flip-flop 2. Use of actual flip-flops to help you understand sequential

More information

Designing Digital Circuits a modern approach. Jonathan Turner

Designing Digital Circuits a modern approach. Jonathan Turner Designing Digital Circuits a modern approach Jonathan Turner 2 Contents I First Half 5 1 Introduction to Designing Digital Circuits 7 1.1 Getting Started.......................... 7 1.2 Gates and Flip

More information

Getting Started Using Mentor Graphic s ModelSim

Getting Started Using Mentor Graphic s ModelSim Getting Started Using Mentor Graphic s ModelSim There are two modes in which to compile designs in ModelSim, classic/traditional mode and project mode. This guide will give you a short tutorial in using

More information

Chapter 2 Ensuring RTL Intent

Chapter 2 Ensuring RTL Intent Chapter 2 Ensuring RTL Intent A user starts the design of his block, by describing the functionality of the block in the form of RTL. The RTL code is then synthesized to realize the gate level connectivity

More information

VENDING MACHINE. ECE261 Project Proposal Presentaion. Members: ZHANG,Yulin CHEN, Zhe ZHANG,Yanni ZHANG,Yayuan

VENDING MACHINE. ECE261 Project Proposal Presentaion. Members: ZHANG,Yulin CHEN, Zhe ZHANG,Yanni ZHANG,Yayuan VENDING MACHINE ECE261 Project Proposal Presentaion Members: ZHANG,Yulin CHEN, Zhe ZHANG,Yanni ZHANG,Yayuan Abstract This project will design and implement a coin operated vending machine controller The

More information

Chapter 13: Verification

Chapter 13: Verification Chapter 13: Verification Prof. Ming-Bo Lin Department of Electronic Engineering National Taiwan University of Science and Technology Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010,

More information

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012 Flip-Flops and Sequential Circuit Design ECE 52 Winter 22 Reading ssignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7.5 T Flip-Flop 7.5. Configurable Flip-Flops 7.6

More information

Flip-Flops and Sequential Circuit Design

Flip-Flops and Sequential Circuit Design Flip-Flops and Sequential Circuit Design ECE 52 Winter 22 Reading ssignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7.5 T Flip-Flop 7.5. Configurable Flip-Flops 7.6

More information

Laboratorio di Sistemi Digitali M A.A. 2010/11

Laboratorio di Sistemi Digitali M A.A. 2010/11 begin if (RESET_N = '0') then for col in 0 to BOARD_COLUMNS-1 loop for row in 0 to BOARD_ROWS-1 loop... elsif (rising_edge(clock)) then... Laboratorio di Sistemi Digitali M 6 Esercitazione Tetris: View

More information

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction

More information

Z80 Microprocessors Z80 CPU. User Manual UM008006-0714. Copyright 2014 Zilog, Inc. All rights reserved. www.zilog.com

Z80 Microprocessors Z80 CPU. User Manual UM008006-0714. Copyright 2014 Zilog, Inc. All rights reserved. www.zilog.com Z80 Microprocessors Z80 CPU UM008006-0714 Copyright 2014 Zilog, Inc. All rights reserved. www.zilog.com ii Warning: DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS. LIFE SUPPORT POLICY ZILOG S PRODUCTS

More information

Finite State Machine. RTL Hardware Design by P. Chu. Chapter 10 1

Finite State Machine. RTL Hardware Design by P. Chu. Chapter 10 1 Finite State Machine Chapter 10 1 Outline 1. Overview 2. FSM representation 3. Timing and performance of an FSM 4. Moore machine versus Mealy machine 5. VHDL description of FSMs 6. State assignment 7.

More information

Chapter 9 Latches, Flip-Flops, and Timers

Chapter 9 Latches, Flip-Flops, and Timers ETEC 23 Programmable Logic Devices Chapter 9 Latches, Flip-Flops, and Timers Shawnee State University Department of Industrial and Engineering Technologies Copyright 27 by Janna B. Gallaher Latches A temporary

More information

Flip-Flops, Registers, Counters, and a Simple Processor

Flip-Flops, Registers, Counters, and a Simple Processor June 8, 22 5:56 vra235_ch7 Sheet number Page number 349 black chapter 7 Flip-Flops, Registers, Counters, and a Simple Processor 7. Ng f3, h7 h6 349 June 8, 22 5:56 vra235_ch7 Sheet number 2 Page number

More information

EXPERIMENT 8. Flip-Flops and Sequential Circuits

EXPERIMENT 8. Flip-Flops and Sequential Circuits EXPERIMENT 8. Flip-Flops and Sequential Circuits I. Introduction I.a. Objectives The objective of this experiment is to become familiar with the basic operational principles of flip-flops and counters.

More information

Lecture-3 MEMORY: Development of Memory:

Lecture-3 MEMORY: Development of Memory: Lecture-3 MEMORY: It is a storage device. It stores program data and the results. There are two kind of memories; semiconductor memories & magnetic memories. Semiconductor memories are faster, smaller,

More information

ENEE 244 (01**). Spring 2006. Homework 5. Due back in class on Friday, April 28.

ENEE 244 (01**). Spring 2006. Homework 5. Due back in class on Friday, April 28. ENEE 244 (01**). Spring 2006 Homework 5 Due back in class on Friday, April 28. 1. Fill up the function table (truth table) for the following latch. How is this latch related to those described in the lectures

More information

Combining the ADS1202 with an FPGA Digital Filter for Current Measurement in Motor Control Applications

Combining the ADS1202 with an FPGA Digital Filter for Current Measurement in Motor Control Applications Application Report SBAA094 June 2003 Combining the ADS1202 with an FPGA Digital Filter for Current Measurement in Motor Control Applications Miroslav Oljaca, Tom Hendrick Data Acquisition Products ABSTRACT

More information

Serial port interface for microcontroller embedded into integrated power meter

Serial port interface for microcontroller embedded into integrated power meter Serial port interface for microcontroller embedded into integrated power meter Mr. Borisav Jovanović, Prof. dr. Predrag Petković, Prof. dr. Milunka Damnjanović, Faculty of Electronic Engineering Nis, Serbia

More information