The CPU Bus : Structure 0

Similar documents
In our case Dr. Johnson is setting the best practices

Introduction to Computer Design

Sequential Statement

VHDL And Synthesis Review

VHDL for FPGA Design. by : Mohamed Samy

Field Programmable Gate Array

Basic Language Concepts

EITF35: Introduction to Structured VLSI Design

VHDL simulation and synthesis

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden

Nanosistemų programavimo kalbos 5 paskaita. Sekvencinių schemų projektavimas

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

Design Problem 5 Solutions

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. George Mason University

Note: Closed book no notes or other material allowed, no calculators or other electronic devices.

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a

EITF35: Introduction to Structured VLSI Design

ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices

Altera s Avalon Communication Fabric

VHDL for Complex Designs

EEL 4783: Hardware/Software Co-design with FPGAs

Menu. Introduction to VHDL EEL3701 EEL3701. Intro to VHDL

Computer-Aided Digital System Design VHDL

Multi-valued Logic. Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized

VHDL: Code Structure. 1

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles

Bruce s VHDL Tutorial By Bruce Misner Lakehead University

Introduction to VHDL #1

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

VHDL in 1h. Martin Schöberl

Problem Set 10 Solutions

VHDL is a hardware description language. The code describes the behavior or structure of an electronic circuit.

Sequential Logic - Module 5

Today. Comments about assignment Max 1/T (skew = 0) Max clock skew? Comments about assignment 3 ASICs and Programmable logic Others courses

Lattice VHDL Training

Inthis lecture we will cover the following material:

Contents. Chapter 9 Datapaths Page 1 of 28

VHDL Models for Memories and Busses

BUS TIMING ANALYSIS. George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners

VHDL: RTL Synthesis Basics. 1 of 59

Control and Datapath 8

CSC / EE Digital Systems Design. Summer Sample Project Proposal 01

MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD.

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

Subprograms, Packages, and Libraries

Synthesis of Digital Systems CS 411N / CSL 719. Part 3: Hardware Description Languages - VHDL

[VARIABLE declaration] BEGIN. sequential statements

Simulation with ModelSim Altera from Quartus II

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems

Simulation with ModelSim Altera from Quartus II

CPE/EE 421/521 Fall 2004 Chapter 4 The CPU Hardware Model. Dr. Rhonda Kay Gaede UAH. The CPU Hardware Model - Overview

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

VHDL Part 2. What is on the agenda? Basic VHDL Constructs. Examples. Data types Objects Packages and libraries Attributes Predefined operators

Lecture 12 VHDL Synthesis

VHDL for Modeling - Module 10

Quartus Counter Example. Last updated 9/6/18

Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis. 26 October - 20 November, 2009

VHDL VS VERILOG.

EEE8076. Reconfigurable Hardware Design (coursework) Module Outline. Dr A. Bystrov Dr. E.G. Chester. Autumn

OUTLINE SYSTEM-ON-CHIP DESIGN. GETTING STARTED WITH VHDL September 3, 2018 GAJSKI S Y-CHART (1983) TOP-DOWN DESIGN (1)

Inferring Storage Elements

MAX 10. Memory Modules

310/ ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006

Hardware Description Languages. Modeling Complex Systems

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language

INTRODUCTION TO VHDL ADVANCED COMPUTER ARCHITECTURES. Slides by: Pedro Tomás. Additional reading: - ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC)

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

Using ModelSim to Simulate Logic Circuits in VHDL Designs. 1 Introduction. For Quartus II 13.0

CS/EE Homework 7 Solutions

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture

Lecture 4. VHDL Fundamentals. George Mason University

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

Introduction to VHDL

Timing in synchronous systems

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes)

6.111 Lecture # 8. Topics for Today: (as time permits)

Miscellaneous Issues. TIE Logic Synthesis Arto Perttula Tampere University of Technology Spring 2017

The block diagram representation is given below: The output equation of a 2x1 multiplexer is given below:

CSE 260 Digital Computers: Organization and Logical Design. Exam 2. Jon Turner 3/28/2012

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

Sequential Circuit Design: Principle

XSV Flash Programming and Virtex Configuration

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution Spring 2016

CS211 Digital Systems/Lab. Introduction to VHDL. Hyotaek Shim, Computer Architecture Laboratory

Introduction to VHDL. Main language concepts

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

Altera s Avalon Communication Fabric

FPGAs in a Nutshell - Introduction to Embedded Systems-

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University

Internal Hardware Design of a Microcontroller in VLSI

Design Problem 6 Solution

ECE 545 Lecture 12. FPGA Resources. George Mason University

CprE 583 Reconfigurable Computing

EL 310 Hardware Description Languages Midterm

Lecture 3 Introduction to VHDL

Transcription:

The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC).

The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC). Device 1 Enq Device 2 Ack

The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC). Device 1 Enq Device 2 Ack Buses require a protocol in order to function correctly.

The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC). Device 1 Enq Device 2 Ack Buses require a protocol in order to function correctly. Most bus protocols use a four-cycle protocol

The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC). Device 1 Enq Device 2 Ack Buses require a protocol in order to function correctly. Most bus protocols use a four-cycle protocol Device 1 raises enq

The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC). Device 1 Enq Device 2 Ack Buses require a protocol in order to function correctly. Most bus protocols use a four-cycle protocol Device 1 raises enq Device 2 raises ack

The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC). Device 1 Enq Device 2 Ack Buses require a protocol in order to function correctly. Most bus protocols use a four-cycle protocol Device 1 raises enq Device 2 raises ack Device 2 lowers ack

The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC). Device 1 Enq Device 2 Ack Buses require a protocol in order to function correctly. Most bus protocols use a four-cycle protocol Device 1 raises enq Device 2 raises ack Device 2 lowers ack Device 1 lowers enq

The CPU Bus : Behaviour 1

The CPU Bus : Behaviour 1 Device 1 Action Device 2 1 2 3 4 time from Computers as Components W. Wolf

The CPU Bus : Signals 2 Most bus operations are reading and writing. A typical bus will require the following to support this :

The CPU Bus : Signals 2 Most bus operations are reading and writing. A typical bus will require the following to support this : Clock synchronizes the bus components.

The CPU Bus : Signals 2 Most bus operations are reading and writing. A typical bus will require the following to support this : Clock synchronizes the bus components. R/W controls whether a read or write should take place.

The CPU Bus : Signals 2 Most bus operations are reading and writing. A typical bus will require the following to support this : Clock synchronizes the bus components. R/W controls whether a read or write should take place. Address an m-bit set of signals used to identify the location for an access.

The CPU Bus : Signals 2 Most bus operations are reading and writing. A typical bus will require the following to support this : Clock synchronizes the bus components. R/W controls whether a read or write should take place. Address an m-bit set of signals used to identify the location for an access. Data an n-bit set of signals used to carry the data to or from the CPU. Under most circumstances the bus will be controlled by the CPU. The main exceptions are

The CPU Bus : Signals 2 Most bus operations are reading and writing. A typical bus will require the following to support this : Clock synchronizes the bus components. R/W controls whether a read or write should take place. Address an m-bit set of signals used to identify the location for an access. Data an n-bit set of signals used to carry the data to or from the CPU. Under most circumstances the bus will be controlled by the CPU. The main exceptions are DMA transfers, where the CPU relinquishes control of the bus.

The CPU Bus : Signals 2 Most bus operations are reading and writing. A typical bus will require the following to support this : Clock synchronizes the bus components. R/W controls whether a read or write should take place. Address an m-bit set of signals used to identify the location for an access. Data an n-bit set of signals used to carry the data to or from the CPU. Under most circumstances the bus will be controlled by the CPU. The main exceptions are DMA transfers, where the CPU relinquishes control of the bus. Bus bridges.

The CPU Bus : Notation 3 high rising falling A low 10 ns B changing stable C timing constraint time from Computers as Components W. Wolf Timing diagram notation

The CPU Bus : Read - Write cycles 4 Clock R/W Address enable Address Data ready Data time from Computers as Components W. Wolf A typical timing diagram for read and write cycles

The CPU Bus : VHDL descriptions 0 Buses will be described as either

The CPU Bus : VHDL descriptions 0 Buses will be described as either or an interface ( port description ).

The CPU Bus : VHDL descriptions 0 Buses will be described as either an interface ( port description ). or a set of signals.

The CPU Bus : VHDL descriptions 0 Buses will be described as either an interface ( port description ). or a set of signals. The control signals or ports will normally be unidirectional.

The CPU Bus : VHDL descriptions 0 Buses will be described as either an interface ( port description ). or a set of signals. The control signals or ports will normally be unidirectional. The bus(es) will be bi-directional and will need to be described with a resolution function to resolve the bus access.

The CPU Bus : VHDL descriptions 0 Buses will be described as either an interface ( port description ). or a set of signals. The control signals or ports will normally be unidirectional. The bus(es) will be bi-directional and will need to be described with a resolution function to resolve the bus access. When a signal can be driven by more than one source, there must be a way of resolving what happens if multiple drivers are active at the same time.

The CPU Bus : Magic Smoke entity magic is port (a, b, c : in std_logic; bus: out std_logic); end magic;

The CPU Bus : Magic Smoke entity magic is port (a, b, c : in std_logic; bus: out std_logic); end magic; architecture smoke of magic is signal sig : std_logic; begin sig <= a; sig <= b; sig <= c; z <= sig; end architecture;

The CPU Bus : Magic Smoke entity magic is port (a, b, c : in std_logic; bus: out std_logic); end magic; architecture smoke of magic is signal sig : std_logic; begin sig <= a; sig <= b; sig <= c; z <= sig; end architecture;

The CPU Bus : VHDL descriptions 0a U X 0 1 Z W L H U U U 0 U U U 0 U U X U X 0 X X X 0 X X 0 0 0 0 0 0 0 0 0 0 1 U X 0 1 X X 0 1 X Z U X 0 X X X 0 X X W U X 0 X X X 0 X X L 0 0 0 0 0 0 0 0 0 H U X 0 1 X X 0 1 X U X 0 X X X 0 X X U Uninitialised X Forcing unknown 0 Forcing 0 1 Forcing 1 Z High impedance W Weak unknown L Weak 0 H Weak 1 Don t care std_u_logic The resolution table for the AND function when the inputs are defined as std_u_logic. Note that the high impedance value, Z, is not treated as a special case.

The CPU Bus : VHDL descriptions 0b U X 0 1 Z W L H U U U U U U U U U U X U X X X X X X X X 0 U X 0 X 0 0 0 0 X 1 U X X 1 1 1 1 1 X Z U X 0 1 Z W L H X W U X 0 1 W W W W X L U X 0 1 L W L W X H U X 0 1 H W W H X U X X X X X X X X Possible values for 3.3 v LVTTL X 1.5v 0 < 0.4v 1 > 2.4v W > 0.8v & < 1.5v < 2.0v & > 1.5v L < 0.8v & > 0.4v H > 2.0v & < 2.4v std_logic The resolution function for std_logic. This shows what the result will be if 2 values are driving the same signal. For example driving a signal with a strong 1 and a strong 0 results in a strong unknown X. Strictly speaking the terms weak and strong signals relate to whether the 0 or the 1 outputs are driven by the gate transistors or are passive. See ASIC design, M.J. Smith, (ref. to be completed)

The CPU Bus : VHDL descriptions 1 -- property of Altera Corporation LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY bidir IS PORT( bidir : INOUT STD_LOGIC_VECTOR (7 DOWNTO 0); oe, clk : IN STD_LOGIC; inp : IN STD_LOGIC_VECTOR (7 DOWNTO 0); outp : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)); END bidir; ARCHITECTURE maxpld OF bidir IS SIGNAL a : STD_LOGIC_VECTOR (7 DOWNTO 0); -- DFF that stores -- value from input. SIGNAL b : STD_LOGIC_VECTOR (7 DOWNTO 0); -- DFF that stores -- feedback value.

The Bus Interface : VHDL descriptions 2 BEGIN PROCESS(clk) BEGIN IF clk = 1 AND clk EVENT THEN -- Creates the flipflops a <= inp; outp <= b; END IF; END PROCESS; PROCESS (oe, bidir) -- Behavioral representation BEGIN -- of tri-states. IF( oe = 0 ) THEN bidir <= "ZZZZZZZZ"; b <= bidir; ELSE bidir <= a; b <= bidir; END IF; END PROCESS; END maxpld;

Bus Interface : Quartus RTL View

Bus Interface : Quartus RTL View

Register to Bus : An alternative 4 library ieee; use ieee.std_logic_1164.all; entity ld_reg is generic ( n : natural := 16); port ( clk : in std_logic; reset : in std_logic; load : in std_logic; bus_enable : in std_logic; q : inout std_logic_vector(n-1 downto 0)); end ld_reg;

Register to Bus : 2 5 architecture rtl of ld_inc_reg is signal q_val : std_logic_vector(n-1 downto 0); begin -- rtl p0 : process (clk) begin -- process if (rising_edge(clk)) then -- rising clock edge if reset = 0 then -- synchronous reset. q_val <= (others =>( 0 )); else if load = 1 then q_val <= q; end if; end if; end if; end process p0;

Register to Bus : Last Bit -- purpose: tristated output from register -- type : combinational -- inputs : bus_enable, q_val -- outputs: q, 16 bit output drive_bus : process( bus_enable, load, q_val ) begin if (bus_enable = 1 and load = 0 ) then q <= std_logic_vector(q_val); else q <= (others=>( Z )); end if; end process drive_bus; end rtl;

CPU Buses : RTL view 7

CPU Buses : RTL view 7 Do you understand this?

clk reset2 reset1 address_bus 15 address_bus 14 address_bus 13 address_bus 12 address_bus 11 address_bus 10 address_bus 9 address_bus 8 address_bus 7 address_bus 6 address_bus 5 address_bus 4 address_bus 3 address_bus 2 address_bus 1 address_bus 0 data_bus 7 data_bus 6 data_bus 5 data_bus 4 data_bus 3 data_bus 2 data_bus 1 data_bus 0 read_m write_m CPU Buses : hardware (vst) view 7 data reg. program counter d_h en. Structure of the r-s cpu address register showing internal buses d_bus control Address bus and the external connection to the address and data buses Data bus d_l en. t_reg r_reg acc. acc d_en IR Control Unit flag ALU

CPU Buses : hardware (vst) view 8 clk reset1 reset2 cpu a_bus 15 Cpu integrated into an SoC, along with a_bus 14 a_bus 13 a_bus 12 a_bus 11 the a_bus ram 10 & rom, as indicated by the a_bus 9 shaded area. The external address and data buses are now both internal. cpu a_bus 8 a_bus 7 a_bus 6 a_bus 5 a_bus 4 a_bus 3 a_bus 2 a_bus 1 a_bus 0 d_bus 7 data_seg cpu_ram rom_select code_seg board_rom d_bus 6 d_bus 5 d_bus 4 d_bus 3 d_bus 2 d_bus 1 d_bus 0

CPU Buses : hardware timing 9 source register D Q circuit propagation delay bus gate R out n bit bus logic block R in dest. reg. gate prop. bus prop. ALU etc. latch t g t bp t comb t l The set of factors to be considered when calculating D Q clock speed. This example uses latches rather than edge triggered devices. R out latch hold time, t h latch setup time,t su R in t R2valid minimum pulse width,t w Minimum clock period, t min after V. Heuring & H. Jordan Computer Systems Design & Arch. 2nd Ed.