SELECT INPUTS STROBE OUTPUTS



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

5 Combinatorial Components. 5.0 Full adder. Full subtractor

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

Understanding Logic Design

Digital Design with VHDL

if-then else : 2-1 mux mux: process (A, B, Select) begin if (select= 1 ) then Z <= A; else Z <= B; end if; end process;

Sistemas Digitais I LESI - 2º ano

Digital Design with Synthesizable VHDL

Combinational-Circuit Building Blocks

Lab 7: VHDL 16-Bit Shifter

Life Cycle of a Memory Request. Ring Example: 2 requests for lock 17

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

CSE140: Components and Design Techniques for Digital Systems

Digital Design and Synthesis INTRODUCTION

Let s put together a Manual Processor

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. Basic Verilog

VHDL Test Bench Tutorial

(1) /30 (2) /30 (3) /40 TOTAL /100

Two-level logic using NAND gates

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

E158 Intro to CMOS VLSI Design. Alarm Clock

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Hardware Implementation of the Stone Metamorphic Cipher

Quartus II Introduction for VHDL Users

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Binary full adder. 2-bit ripple-carry adder. CSE 370 Spring 2006 Introduction to Digital Design Lecture 12: Adders

Figure 8-1 Four Possible Results of Adding Two Bits

Chapter 07: Instruction Level Parallelism VLIW, Vector, Array and Multithreaded Processors. Lesson 05: Array Processors

Conditionals (with solutions)

Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

NEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.

1 The Collocation Method

ASYNCHRONOUS COUNTERS


ON SUITABILITY OF FPGA BASED EVOLVABLE HARDWARE SYSTEMS TO INTEGRATE RECONFIGURABLE CIRCUITS WITH HOST PROCESSING UNIT

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Combinational circuits

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

Registers & Counters

VHDL GUIDELINES FOR SYNTHESIS

Computer organization

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

ECE 451 Verilog Exercises. Sept 14, James Barnes

Read-only memory Implementing logic with ROM Programmable logic devices Implementing logic with PLDs Static hazards

Reduced Instruction Set Computer (RISC)

Multipliers. Introduction

The Designer's Guide to VHDL

VHDL Reference Manual

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

2.2: Bitwise Logical Operations

Optimization and Comparison of 4-Stage Inverter, 2-i/p NAND Gate, 2-i/p NOR Gate Driving Standard Load By Using Logical Effort

Z80 Instruction Set. Z80 Assembly Language

Technical Information Manual

VHDL programmering H2

Gates, Circuits, and Boolean Algebra

Introduction. Jim Duckworth ECE Department, WPI. VHDL Short Course - Module 1

case Statement //8-wide, 4:1 multiplexer module case1 ( input [7:0] a_in, b_in, c_in, d_in, input [1:0] sel, output logic [7:0] d_out);

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December :59

[ 4 ] Logic Symbols and Truth Table

Java (12 Weeks) Introduction to Java Programming Language

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

Distributed Storage Networks and Computer Forensics

Multiplexers Two Types + Verilog

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

CHAPTER 3 Boolean Algebra and Digital Logic

Algorithms and Methods for Distributed Storage Networks 5 Raid-6 Encoding Christian Schindelhauer

The System Designer's Guide to VHDL-AMS

South East of Process Main Building / 1F. North East of Process Main Building / 1F. At 14:05 April 16, Sample not collected

High-speed image processing algorithms using MMX hardware

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Methode Electronics. DM-317-XXXX 40 Gbps QSFP+ Passive Cable RoHS COMPLIANT.

High Speed Gate Level Synchronous Full Adder Designs

Gates, Plexers, Decoders, Registers, Addition and Comparison

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

Layout of Multiple Cells

Digital Systems Design. VGA Video Display Generation

A CPLD VHDL Introduction

Z80 Microprocessors Z80 CPU. User Manual UM Copyright 2014 Zilog, Inc. All rights reserved.

Lecture 8: Synchronous Digital Systems

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

HD44780U (LCD-II) (Dot Matrix Liquid Crystal Display Controller/Driver)

Design: a mod-8 Counter

CLOUD computing systems, in which the clients

A Dynamic Programming Approach for Generating N-ary Reflected Gray Code List

RPDO 1 TPDO 1 TPDO 5 TPDO 6 TPDO 7 TPDO 8

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

Polynomial Factoring. Ramesh Hariharan

Design Verification & Testing Design for Testability and Scan

Ogg Vorbis Audio Decoder Jon Stritar and Matt Papi December 14, 2005

Multiplexers. 74x157 quad 2-to-1 mux

Hardware Implementations of RSA Using Fast Montgomery Multiplications. ECE 645 Prof. Gaj Mike Koontz and Ryon Sumner

Gates & Boolean Algebra. Boolean Operators. Combinational Logic. Introduction

Xilinx ISE. <Release Version: 10.1i> Tutorial. Department of Electrical and Computer Engineering State University of New York New Paltz

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

OUTLINE SYSTEM-ON-CHIP DESIGN. GETTING STARTED WITH VHDL August 31, 2015 GAJSKI S Y-CHART (1983) TOP-DOWN DESIGN (1)

Transcription:

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 STROE OUTPUT G Y X X 1 2 3 2. SN74153. 2. I SN74151. 8x1 U3 74151 G D D1 D2 D3 D4 D5 D6 D7 2. SEET STROE OUTPUTS INPUTS G Y W X X X D D D1 D1 D2 D2 D3 D3 D4 D4 D5 D5 D6 D6 D7 D7 3. SN74151. 3. o I SN74158. 16x1 U4 7415 G E E1 E2 E3 E4 E5 E6 E7 E8 E9 E1 E11 E12 E13 E14 E15 D W Y W 3. SEET INPUTS STROE OUTPUTS D G W X X X X E E1 E2 E3 E4

E5 E6 E7 E8 E9 E1 E11 E12 E13 E14 E15 4. SN74158. 4. 74153. (MUX 4x1 (x2)) ( 4), 1 ( 5). S1--(2) S--(1) 4. U3 74153 S1--(2) S--(1) ~~ X X X 1 X X X 1 X X X 1 X 1 X X 1 X X X 1 X X 1 X 1 1 X X X 1 1 X X X 1 1 X X X 1 1 X X X 1 1 X X X 1 1 X 1 X X 1 1 X X X 1 1 X X 1 X 1 1 1 X X X 1 1 1 X X X 1 2 21 22 23 1 5. 5. 74151. (MUX 8x1), ( 5). 2 5. 6. oole oole. G D D1 D2 D3 D4 D5 D6 D7 S2--(4) U1 74151 G D D1 D2 D3 D4 D5 D6 D7 S1--(2) 1. 2... D ( ),,, 2 3 x1 MUX. 3. ( D ),, F. - S--(1) Y W 1

3 7. 1. MUX. MUX 4x1 (74153) : = (,3,6,7). 2 1 3 1 1 1 4 1 5 1 1 6 1 1 1 7 1 1 1 1 = = =1 ( 6, 7) 1 select, 2 1. select 74153,. MUX = 1. 1 ( 6) select.,, MUX Z. 6. 2. 74153 7 8. (2) (1) (2) (1) U2 SN744 U3 U4 5 7. 6. U1 74153 Number Z Z= 1 1 1 = 2 21 22 23 U1 74153 2 21 22 23 Z Z=S(,3,6,7) i ( 2) (1 4) 8. i n o ut 1 MUX.4x1 (,,,1 3,) (1)= (7) = out Su m 1 1 (6)= 1 2 1 3 1 1 1 (5)=in 4 1 5 1 1 1 (4)=in 6 1 1 1 7 1 1 1 1 (3)=1 1 7. 1 1 2 MUX.4x1 (2,21,22,2 3,) (15)= (9)=Sum 2(1)=in 21(11)=in' 22(12)=in' 23(13)=in 3. MU. MUX 4x1(74153) : = (,1,3,8,9,1,15).

(D, ) select. 4 Z=Z(, ) ( 8). Number D Z Z= 1 1 1 1 2 1 3 1 1 1 = = + + 4 1 5 1 1 6 1 1 7 1 1 1 = 1 = 8 1 1 9 1 1 1 1 1 1 1 11 1 1 1 = 2 = + + 12 1 1 13 1 1 1 14 1 1 1 15 1 1 1 1 1 = 3 = 8. 4. MUX. MUX 8x1(74151) : = (,1,3,8,9,1,15). 9 9. 1 1 1 1 2 1 3 1 1 1 4 1 5 1 1 6 1 1 7 1 1 1 8 1 1 9 1 1 1 1 1 1 1 11 1 1 1 12 1 1 13 1 1 1 14 1 1 1 15 1 1 1 1 1 9. D(4)=1 D1(3)=D D2(2)= D3(1)= D4(15)=1 D5(14)=D D6(13)= D7(12)=D 5. 74153 F1 = (,3,4,5,7) F2 = (2,3,5,7). i (x4) MUX = (x2) MUX = (x 1) F1 MUX=( ) 1 1 1 = 2 1 = 3 1 1 1 1 4 1 1 = 5 1 1 1 1 1 6 1 1 = 7 1 1 1 1 1 1. (x4) (x2) (x1) U2 SN744 ' 1. 1 ' U1 74153 2 21 22 23 4 F2 MUX=( ) 2 = 1 21 =1 22 = 23 = F1 F2 9. i (9) (1) (11) D Z Y(5) G (7)= 6. F. F U1 74153 U1 74153 1 1

5 1 1 1 1 1 1 1 1 ' 1 1 1 F 1. 7., NOT, ND, OR, XOR XNOR, D, R 8. MUX F = D + + D +. 9. 11. VD MUX2x1 --Dataflow level VD description for the 2-input multiplexer ENTITY multiplexer IS PORT(d, d1, s: IN IT; y: OUT IT); END multiplexer; RITETURE Dataflow OF multiplexer IS y <= d WEN s = '' ESE d1; END Dataflow; 1. MUX2x1 U2 Full dder in in in U3!XOR U5 SN742 Full dder 2k N 1k out S G U6 5 U1 74153 2 21 22 23 --ehavioral level VD description for the 2- input multiplexer ENTITY multiplexer IS PORT (d, d1, s: IN IT; y: OUT IT); END multiplexer; RITETURE ehavioral OF multiplexer IS PROESS(s, d, d1) y <= d WEN s = '' ESE d1; END PROESS; END ehavioral; 2. MUX2x1 --Structural level VD description for the 2- input multiplexer ENTITY myand2 IS PORT (i1, i2: IN IT; o: OUT IT); END myand2; RITETURE Dataflow OF myand2 IS o <= i1 ND i2; END Dataflow; ENTITY myor2 IS PORT (i1, i2: IN IT; o: OUT IT); END myor2; RITETURE Dataflow OF myor2 IS o <= i1 OR i2; END Dataflow; ENTITY myinv IS PORT (i: IN IT; o: OUT IT); END myinv; RITETURE Dataflow OF myinv IS o <= not i; END Dataflow; ENTITY multiplexer IS PORT (d, d1, s: IN IT;y: OUT IT); END multiplexer; RITETURE Structural OF multiplexer IS OMPONENT myand2 PORT (i1, i2: IN IT;o: OUT IT); END OMPONENT; OMPONENT myor2 PORT (i1, i2: IN IT; o: OUT IT); END OMPONENT; OMPONENT myinv PORT (i: IN IT; o: OUT IT); END OMPONENT; SIGN sn, asn, sb: IT; U1: myinv PORT MP(s, sn); U2: myand2 PORT MP(d, sn, asn); U3: myand2 PORT MP(s, d1, sb); U4: myor2 PORT MP(asn, sb, y); END Structural; 3. :

: 1 --------------------------------------- 2 IRRY ieee; 3 USE ; 4 --------------------------------------- 5 ENTITY mux IS 6 PORT (, : STD_OGI_VETOR (7 DOWNTO ); 7 sel : IN ; 8 : OUT STD_OGI_VETOR (7 DOWNTO )); 9 END ; 1 --------------------------------------- 11 RITETURE example OF IS 12 13 PROESS (a, b, ) 14 15 IF (sel = "") TEN 16 c <= ""; 17 ESIF ( ) TEN 18 c <= a; 19 (sel = "1") TEN 2 c <= ; 21 ESE 22 c <= (OTERS => ' '); 23 END ; 24 END ; 25 END ; 26 --------------------------------------- (oncurrent) VD VD (concurrent) VD WEN GENERTE., (ND, NOT, +, *, S ) OK,.,,.. RM :, RM VD PROESS, FUNTION PROEDURE., (dataflow code).,, ( GURDED OK). ( ),, PROESSES, 6

7 FUNTION PROEDURES. WEN GENER TE. VD. : NOT, ND, NND, OR, NOR, XOR, XNOR þ, _, *, /, ** (mod, rem, abs) =,/=,<,>,< =,>= sll, srl, sla, sra, rol, ror &, ( ) IT, IT_VETOR, STD_OGI, STD_OGI_VE TOR, STD_UOGI, STD_UOGI_VE TOR INTEGER, SIGNED, UNSIGNED IT_VETOR SIGNED UNSIGNED,, 4x1 : 1bit., s1 s. : IRRY ieee; ENTITY mux IS PORT ( a, b, c, d, s, s1: IN STD_OGI; y: OUT STD_OGI); END mux; RITETURE pure_logic OF mux IS y <= (a ND NOT s1 ND NOT s) OR (b ND NOT s1 ND s) OR (c ND s1 ND NOT s) OR (d ND s1 ND s); END pure_logic; WEN WEN ( GENERTE). : WEN/ESE ( WEN) WIT / SEET/WEN (selected WEN). : WEN / ESE: assignment WEN condition ESE assignment WEN condition ESE ; WIT / SEET / WEN: WIT identifier SEET assignment WEN value, assignment WEN value, ; WIT/SEET/WEN,, OTERS UNFFETED, : ------ With WEN/ESE outp <= "" WEN (inp='' OR reset='1') ESE "1" WEN ctl='1' ESE "1"; ---- With WIT/SEET/WEN WIT control SEET output <=

"" WEN reset, "111" WEN set, UNFFETED WEN OTERS; WEN WEN value, : WEN value -- single value WEN value1 to value2 -- range, for enumerated data types -- only WEN value1 value2 -- value1 or value2 or WEN WEN/ESE: IRRY ieee; ENTITY mux IS PORT ( a, b, c, d: IN STD_OGI; sel: IN STD_OGI_VETOR (1 DOWNTO ); y: OUT STD_OGI); END mux; RITETURE mux1 OF mux IS y <= a WEN sel="" ESE b WEN sel="1" ESE c WEN sel="1" ESE d; END mux1; WEN/SEET/WEN: IRRY ieee; ENTITY mux IS PORT ( a, b, c, d: IN STD_OGI; sel: IN STD_OGI_VETOR (1 DOWNTO ); y: OUT STD_OGI); END mux; RITETURE mux2 OF mux IS WIT sel SEET y <= a WEN "", -- notice "," instead of ";" b WEN "1", c WEN "1", d WEN OTERS; -- cannot be "d WEN "11" END mux2;, sel INTEGER, : WEN/ESE: IRRY ieee; ENTITY mux IS PORT ( a, b, c, d: IN STD_OGI; sel: IN INTEGER RNGE TO 3; y: OUT STD_OGI); END mux; ---- Solution 1: with WEN/ESE --------------- RITETURE mux1 OF mux IS y <= a WEN sel= ESE b WEN sel=1 ESE c WEN sel=2 ESE d; END mux1; -- Solution 2: with WIT/SEET/WEN -------- RITETURE mux2 OF mux IS WIT sel SEET y <= a WEN, b WEN 1, c WEN 2, d WEN 3; -- here, 3 or OTERS are equivalent, -- for all options are tested anyway END mux2;, RITETURE, ( --), (synthesis script),, ONFIGURTION (tristate buffer) WEN. output = input ena=low output =» ( ) : IRRY ieee; ENTITY tri_state IS 8

9 PORT ( ena: IN STD_OGI; input: IN STD_OGI_VETOR (7 DOWNTO ); output: OUT STD_OGI_VETOR (7 DOWNTO )); END tri_state; RITETURE tri_state OF tri_state IS output <= input WEN (ena='') ESE (OTERS => 'Z'); END tri_state; WEN : IRRY ieee; ENTITY encoder IS PORT ( x: IN STD_OGI_VETOR (7 DOWNTO ); y: OUT STD_OGI_VETOR (2 DOWNTO )); END encoder; RITETURE encoder2 OF encoder IS WIT x SEET y <= "" WEN "1", "1" WEN "1", "1" WEN "1", "11" WEN "1", "1" WEN "1", "11" WEN "1", "11" WEN "1", "111" WEN "1", "ZZZ" WEN OTERS; END encoder2; U (rithmetic ogic Unit) : n 2, m=log 2 n. bit high WEN/ESE: IRRY ieee; ENTITY encoder IS PORT ( x: IN STD_OGI_VETOR (7 DOWNTO ); y: OUT STD_OGI_VETOR (2 DOWNTO )); END encoder; RITETURE encoder1 OF encoder IS y <= "" WEN x="1" ESE "1" WEN x="1" ESE "1" WEN x="1" ESE "11" WEN x="1" ESE "1" WEN x="1" ESE "11" WEN x="1" ESE "11" WEN x="1" ESE "111" WEN x="1" ESE "ZZZ"; END encoder1; WIT/SEET/WEN: : sel Operation Function Unit y <= a Transfer a rithmetic 1 y <= a+1 Increment a 1 y <= a-1 Decrement a 11 y <= b Transfer b 1 y <= b+1 Increment b 11 y <= b-1 Decrement b 11 y <= a+b dd a and b 111 y <= a+b+cin dd a and b with carry 1 y <= NOT a omplement ogic a 11 y <= NOT b omplement b 11 y <= a ND b ND 111 y <= a OR b OR 11 y <= a NND b NND 111 y <= a NOR b NOR 111 y <= a XOR b XOR 1111 y <= a XNOR b XNOR

( ) MS sel, bits sel. U,, std_logic_unsigned ieee. arith logic IRRY ieee; USE ieee.std_logic_unsigned.all; ENTITY U IS PORT (a, b: IN STD_OGI_VETOR (7 DOWNTO ); sel: IN STD_OGI_VETOR (3 DOWNTO ); cin: IN STD_OGI; y: OUT STD_OGI_VETOR (7 DOWNTO )); END U; RITETURE dataflow OF U IS SIGN arith, logic: STD_OGI_VETOR (7 DOWNTO ); ----- rithmetic unit: ------ WIT sel(2 DOWNTO ) SEET arith <= a WEN "", a+1 WEN "1", a-1 WEN "1", b WEN "11", b+1 WEN "1", b-1 WEN "11", a+b WEN "11", a+b+cin WEN OTERS; ----- ogic unit: ----------- WIT sel(2 DOWNTO ) SEET logic <= NOT a WEN "", NOT b WEN "1", a ND b WEN "1", a OR b WEN "11", a NND b WEN "1", a NOR b WEN "11", a XOR b WEN "11", NOT (a XOR b) WEN OTERS; -------- Mux: --------------- WIT sel(3) SEET y <= arith WEN '', logic WEN OTERS; END dataflow; GENERTE 1 GENERTE ( WEN). OOP, FOR / GENERTE (label): label: FOR identifier IN range GENERTE (concurrent assignments) END GENERTE; IF / GENERTE ( IF ). ESE. IF / GENERTE FOR / GENERTE : label1: FOR identifier IN range GENERTE label2: IF condition GENERTE (concurrent assignments) END GENERTE; END GENERTE; : SIGN x: IT_VETOR (7 DOWNTO ); SIGN y: IT_VETOR (15 DOWNTO ); SIGN z: IT_VETOR (7 DOWNTO ); G1: FOR i IN x'rnge GENERTE z(i) <= x(i) ND y(i+8); END GENERTE; GENERTE ( OOP),, choice -, : NotOK: FOR i IN TO choice GENERTE (concurrent statements) END GENERTE;,.. : OK: FOR i IN TO 7 GENERTE output(i)<='1' WEN (a(i) ND b(i))='1' ESE ''; END GENERTE;

11 : NotOK: FOR i IN TO 7 GENERTE accum <="11111111" WEN (a(i) ND b(i))='1' ESE ""; END GENERTE; NotOK: For i IN to 7 GENERTE accum <= accum + 1 WEN x(i)='1'; END GENERTE;, GENERTE., : IRRY ieee; ENTITY shifter IS PORT ( inp: IN STD_OGI_VETOR (3 DOWNTO ); sel: IN INTEGER RNGE TO 4; outp: OUT STD_OGI_VETOR (7 DOWNTO )); END shifter; RITETURE shifter OF shifter IS SUTYPE vector IS STD_OGI_VETOR (7 DOWNTO ); TYPE matrix IS RRY (4 DOWNTO ) OF vector; SIGN row: matrix; row() <= "" & inp; G1: FOR i IN 1 TO 4 GENERTE row(i) <= row(i-1)(6 DOWNTO ) & ''; END GENERTE; outp <= row(sel); END shifter; OK OK: Simple Guarded., OK : label: OK [declarative part] (concurrent statements) END OK label; - : RITETURE example block1: OK END OK block1 block2: OK END OK block2; END example; : b1: OK SIGN a: STD_OGI; a <= input_sig WEN ena='1' ESE 'Z'; END OK b1; OK, (simple guarded) OK. : label1: OK [declarative part of top block] [concurrent statements of top block] label2: OK [declarative part nested block] (concurrent statements of nested block) END OK label2; [more concurrent statements of top block] END OK label1; guarded OK OK,, guard expression. OK TRUE: label: OK (guard expression) [declarative part] (concurrent guarded and unguarded statements) END OK label; OK, OK,

12