CMSC 611: Advanced Computer Architecture

Similar documents
ECE U530 Digital Hardware Synthesis. Programming Assignments

Designing with VHDL and FPGA

Lecture #12 Structural VHDL Modeling

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

VHDL simulation and synthesis

Hardware Design Environments. Dr. Mahdi Abbasi Computer Engineering Department Bu-Ali Sina University

VHDL Sample Slides Rev Sample Slides from the 2-day and 4-day VHDL Training Courses

What is Verilog HDL? Lecture 1: Verilog HDL Introduction. Basic Design Methodology. What is VHDL? Requirements

A bird s eye view on VHDL!

Synthesizable Verilog

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

Lab #1: Introduction to Design Methodology with FPGAs part 1 (80 pts)

EE595. Part VIII Overall Concept on VHDL. EE 595 EDA / ASIC Design Lab

A Brief Introduction to Verilog Hardware Definition Language (HDL)

Hardware Modeling. VHDL Architectures. Vienna University of Technology Department of Computer Engineering ECS Group

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

COE 561 Digital System Design & Synthesis Introduction

Hardware Modeling. Hardware Description. ECS Group, TU Wien

Spiral 1 / Unit 4 Verilog HDL. Digital Circuit Design Steps. Digital Circuit Design OVERVIEW. Mark Redekopp. Description. Verification.

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

Tutorial on VHDL and Verilog Applications

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

Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston

University of California, Davis Department of Electrical and Computer Engineering. EEC180B DIGITAL SYSTEMS Spring Quarter 2018

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

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

Synthesis of Combinational and Sequential Circuits with Verilog

C-Based Hardware Design

Hardware Synthesis. References

DESIGN STRATEGIES & TOOLS UTILIZED

System Synthesis of Digital Systems

Hardware Description Languages (HDLs) Verilog

The Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science

MLR Institute of Technology

Lecture 2 Hardware Description Language (HDL): VHSIC HDL (VHDL)

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

101-1 Under-Graduate Project Digital IC Design Flow

Digital System Design with SystemVerilog

Designing with VHDL and FPGA

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1

The process. Sensitivity lists

TOPIC : Verilog Synthesis examples. Module 4.3 : Verilog synthesis

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

Hardware Description Languages: Verilog. Quick History of HDLs. Verilog/VHDL. Design Methodology. Verilog Introduction. Verilog.

Verilog Tutorial. Verilog Fundamentals. Originally designers used manual translation + bread boards for verification

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING

Verilog Tutorial 9/28/2015. Verilog Fundamentals. Originally designers used manual translation + bread boards for verification

Hardware Description Languages: Verilog

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

System-on-Chip Design for Wireless Communications

Digital System Design

Don t expect to be able to write and debug your code during the lab session.

A Tutorial Introduction 1

Introduction to Verilog HDL

Hardware Modelling. Design Flow Overview. ECS Group, TU Wien

RIZALAFANDE CHE ISMAIL TKT. 3, BLOK A, PPK MIKRO-e KOMPLEKS PENGAJIAN KUKUM. SYNTHESIS OF COMBINATIONAL LOGIC (Chapter 8)

CSE140L: Components and Design

Fundamental Design Concepts. Fundamental Concepts. Modeling Domains. Basic Definitions. New terminology and overloaded use of common words

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

Combinational Logic II

Lecture 1: Introduction Course arrangements Recap of basic digital design concepts EDA tool demonstration

VHDL/Verilog Simulation. Testbench Design

CSE140L: Components and Design Techniques for Digital Systems Lab

EECS150 - Digital Design Lecture 7 - Computer Aided Design (CAD) - Part II (Logic Simulation) Finite State Machine Review

VHDL Essentials Simulation & Synthesis

Verilog HDL is one of the two most common Hardware Description Languages (HDL) used by integrated circuit (IC) designers. The other one is VHDL.

EECS150 - Digital Design Lecture 10 Logic Synthesis

! ISP (circa 1977) - research project at CMU " Simulation, but no synthesis

Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23

Bibliography. Measuring Software Reuse, Jeffrey S. Poulin, Addison-Wesley, Practical Software Reuse, Donald J. Reifer, Wiley, 1997.

VHDL Quick Start. Edward Gatt

Digital Design with FPGAs. By Neeraj Kulkarni

Digital Design Methodology (Revisited) Design Methodology: Big Picture

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3

EEL 4783: HDL in Digital System Design

HIERARCHICAL DESIGN. RTL Hardware Design by P. Chu. Chapter 13 1

Digital Design Methodology

Outline HIERARCHICAL DESIGN. 1. Introduction. Benefits of hierarchical design

Evolution of CAD Tools & Verilog HDL Definition

Lab 3 Verilog Simulation Mapping

Timing Analysis in Xilinx ISE

The Verilog Hardware Description Language

Hardware description languages

1 Design Process HOME CONTENTS INDEX. For further assistance, or call your local support center

Introduction To HDL. Verilog HDL. Debdeep Mukhopadhyay How it started!

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

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

This Lecture. Some components (useful for the homework) Verilog HDL (will continue next lecture)

EITF35: Introduction to Structured VLSI Design

Schematic design. Gate level design. 0 EDA (Electronic Design Assistance) 0 Classical design. 0 Computer based language

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 11. Introduction to Verilog II Sequential Circuits

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

Verilog for High Performance

Lecture 12 VHDL Synthesis

INTRODUCTION TO VHDL. Lecture 5 & 6 Dr. Tayab Din Memon Assistant Professor Department of Electronic Engineering, MUET

CS232 VHDL Lecture. Types

Sequential VHDL. Katarzyna Radecka. DSD COEN 313

EECS150 - Digital Design Lecture 10 Logic Synthesis

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

Transcription:

CMSC 611: Advanced Computer Architecture Design Languages Practically everything adapted from slides by Peter J. Ashenden, VHDL Quick Start Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides

Abstraction Hierarchy of Digital Design Digital designers often employ abstraction hierarchy, which can be expressed in two domains: Structural domain: Components are described in terms of an interconnection of more primitive components Behavior domain: Components are described by defining the their input/output responses by means of a procedure Strcutural Decomposition Behavioral Decomposition

Design's Levels of Abstraction Level Structural Primitive Behavior Representation Increased compexity and details PMS Chip Register Gate Circuit Silicon PMS Chip CPU, memories, buses Microprocessor, RAM, UART Register ALU, counter, MUX Gate AND, OR, flipflop Circuit Transistor, R, L, and C Silicon Geometrical objects Performance specifications I/O response, algorithms Truth table, state table Boolean equations Differential equations Process specifications.

Design Simulator Device behavioral model is represented by procedure calls Events within the simulator are kept in a time-based queue Events stored as three-tuples (Module #, Pin #, New logic value) Depending on the behavioral model of a module, the handling of an event usually trigger other events that will be inserted in the event queue Time 0 - - - - - - - - - - 100 Event Queue 0, 6, 1 - - - - - - - - - - - - - - - - - - - - - - - - - 1, 8, 0 Events Simulation continues until the event queue is empty or stopped externally by the designer 100 ns Module 2 Module 0 6 3 Module 1 8 Module 3

Domains and Levels of Modeling Structural Functional high level of abstraction low level of abstraction Geometric Y-chart due to Gajski & Kahn

Domains and Levels of Modeling Structural Functional Algorithm (behavioral) Register-Transfer Language Boolean Equation Differential Equation Geometric Y-chart due to Gajski & Kahn

Domains and Levels of Modeling Structural Processor-Memory Switch Functional Register-Transfer Gate Transistor Geometric Y-chart due to Gajski & Kahn

Domains and Levels of Modeling Structural Functional Polygons Sticks Standard Cells Floor Plan Geometric Y-chart due to Gajski & Kahn

Hardware Design Languages A hardware design language provides primitives for describing both structural and behavioral models of the design Hardware design languages are useful in Documenting and modeling the design Ensuring design portability Every hardware design language is supported by a simulator that helps in: Validating the design Mitigating the risk of design faults Avoiding expensive prototyping for complicated hardware

VHDL & Verilog VHDL and Verilog are the most famous and widely used hardware design language Focus on VHDL: Interfaces, Behavior, Structure, Test Benches Analysis, Elaboration, Simulation, Synthesis

Modeling Digital Systems VHDL is for writing models of a system Reasons for modeling requirements specification documentation testing using simulation formal verification synthesis Goal most reliable design process, with minimum cost and time avoid design errors!

Entity declaration Modeling Interfaces describes the input/output ports of a module entity name port names port mode (direction) entity reg4 is port ( d0, d1, d2, d3, en, clk : in bit; q0, q1, q2, q3 : out bit ); end entity reg4; punctuation reserved words port type

VHDL-87 Omit entity at end of entity declaration entity reg4 is port ( d0, d1, d2, d3, en, clk : in bit; q0, q1, q2, q3 : out bit ); end reg4;

Modeling Behavior Architecture body describes an implementation of an entity may be several per entity Behavioral architecture describes the algorithm performed by the module contains process statements, each containing sequential statements, including signal assignment statements and wait statements

Behavior Example architecture behav of reg4 is begin storage : process is variable stored_d0, stored_d1, stored_d2, stored_d3 : bit; begin if en = '1' and clk = '1' then stored_d0 := d0; stored_d1 := d1; stored_d2 := d2; stored_d3 := d3; end if; q0 <= stored_d0 after 5 ns; q1 <= stored_d1 after 5 ns; q2 <= stored_d2 after 5 ns; q3 <= stored_d3 after 5 ns; wait on d0, d1, d2, d3, en, clk; end process storage; end architecture behav;

Modeling Structure Structural architecture implements the module as a composition of subsystems contains signal declarations, for internal interconnections the entity ports are also treated as signals component instances instances of previously declared entity/architecture pairs port maps in component instances connect signals to component ports wait statements

Structure Example d0 bit0 d_latch d q clk q0 d1 bit1 d_latch d q clk q1 d2 bit2 d_latch d q clk q2 d3 en clk gate and2 a y b int_clk bit3 d_latch d q clk q3

Structure Example First declare D-latch and and-gate entities and architectures entity d_latch is port ( d, clk : in bit; q : out bit ); end entity d_latch; architecture basic of d_latch is begin latch_behavior : process is begin if clk = 1 then q <= d after 2 ns; end if; wait on clk, d; end process latch_behavior; end architecture basic; entity and2 is port ( a, b : in bit; y : out bit ); end entity and2; architecture basic of and2 is begin and2_behavior : process is begin y <= a and b after 2 ns; wait on a, b; end process and2_behavior; end architecture basic;

Structure Example Now use them to implement a register architecture struct of reg4 is begin signal int_clk : bit; bit0 : entity work.d_latch(basic) port map ( d0, int_clk, q0 ); bit1 : entity work.d_latch(basic) port map ( d1, int_clk, q1 ); bit2 : entity work.d_latch(basic) port map ( d2, int_clk, q2 ); bit3 : entity work.d_latch(basic) port map ( d3, int_clk, q3 ); gate : entity work.and2(basic) port map ( en, clk, int_clk ); end architecture struct;

Mixed Behavior and Structure An architecture can contain both behavioral and structural parts process statements and component instances collectively called concurrent statements processes can read and assign to signals Example: register-transfer-level model data path described structurally control section described behaviorally

Mixed Example multiplier multiplicand shift_reg control_ section shift_ adder reg product

Mixed Example entity multiplier is port ( clk, reset : in bit; multiplicand, multiplier : in integer; product : out integer ); end entity multiplier; architecture mixed of mulitplier is begin signal partial_product, full_product : integer; signal arith_control, result_en, mult_bit, mult_load : bit; arith_unit : entity work.shift_adder(behavior) port map ( addend => multiplicand, augend => full_product, sum => partial_product, add_control => arith_control ); result : entity work.reg(behavior) port map ( d => partial_product, q => full_product, en => result_en, reset => reset );...

Mixed Example multiplier_sr : entity work.shift_reg(behavior) port map ( d => multiplier, q => mult_bit, load => mult_load, clk => clk ); product <= full_product; control_section : process is -- variable declarations for control_section -- begin -- sequential statements to assign values to control signals -- wait on clk, reset; end process control_section; end architecture mixed;

Test Benches Testing a design by simulation Use a test bench model an architecture body that includes an instance of the design under test applies sequences of test values to inputs monitors values on output signals either using simulator or with a process that verifies correct operation

Test Bench Example entity test_bench is end entity test_bench; architecture test_reg4 of test_bench is begin signal d0, d1, d2, d3, en, clk, q0, q1, q2, q3 : bit; dut : entity work.reg4(behav) port map ( d0, d1, d2, d3, en, clk, q0, q1, q2, q3 ); stimulus : process is begin d0 <= 1 ; d1 <= 1 ; d2 <= 1 ; d3 <= 1 ; wait for 20 ns; en <= 0 ; clk <= 0 ; wait for 20 ns; en <= 1 ; wait for 20 ns; clk <= 1 ; wait for 20 ns; d0 <= 0 ; d1 <= 0 ; d2 <= 0 ; d3 <= 0 ; wait for 20 ns; en <= 0 ; wait for 20 ns; wait; end process stimulus; end architecture test_reg4;

Regression Testing Test that a refinement of a design is correct that lower-level structural model does the same as a behavioral model Test bench includes two instances of design under test behavioral and lower-level structural stimulates both with same inputs compares outputs for equality Need to take account of timing differences

Regression Test Example architecture regression of test_bench is begin signal d0, d1, d2, d3, en, clk : bit; signal q0a, q1a, q2a, q3a, q0b, q1b, q2b, q3b : bit; dut_a : entity work.reg4(struct) port map ( d0, d1, d2, d3, en, clk, q0a, q1a, q2a, q3a ); dut_b : entity work.reg4(behav) port map ( d0, d1, d2, d3, en, clk, q0b, q1b, q2b, q3b ); stimulus : process is begin d0 <= 1 ; d1 <= 1 ; d2 <= 1 ; d3 <= 1 ; wait for 20 ns; en <= 0 ; clk <= 0 ; wait for 20 ns; en <= 1 ; wait for 20 ns; clk <= 1 ; wait for 20 ns; wait; end process stimulus;...

Regression Test Example verify : process is begin wait for 10 ns; assert q0a = q0b and q1a = q1b and q2a = q2b and q3a = q3b report implementations have different outputs severity error; wait on d0, d1, d2, d3, en, clk; end process verify; end architecture regression;

Analysis Elaboration Simulation Synthesis Design Processing

Analysis Check for syntax and semantic errors syntax: grammar of the language semantics: the meaning of the model Analyze each design unit separately entity declaration architecture body best if each design unit is in a separate file Analyzed design units are placed in a library in an implementation dependent internal form current library is called work

Elaboration Flattening the design hierarchy create ports create signals and processes within architecture body for each component instance, copy instantiated entity and architecture body repeat recursively bottom out at purely behavioral architecture bodies Final result of elaboration flat collection of signal nets and processes

Elaboration Example d0 reg4(struct) bit0 d_latch d q q0 clk bit1 d1 d_latch d q q1 clk bit2 d2 d_latch d q q2 clk bit3 d3 d_latch d q q3 gate clk en clk and2 a y b int_clk

Elaboration Example d0 reg4(struct) bit0 d_latch(basic) d q q0 clk bit1 d1 d_latch(basic) d q q1 clk bit2 d2 d_latch(basic) d q q2 clk bit3 d3 d_latch(basic) d q q3 gate clk en clk and2(basic) a y b int_clk process with variables and statements

Simulation Execution of the processes in the elaborated model Discrete event simulation time advances in discrete steps when signal values change events A processes is sensitive to events on input signals specified in wait statements resumes and schedules new values on output signals schedules transactions event on a signal if new value different from old value

Simulation Algorithm Initialization phase each signal is given its initial value simulation time set to 0 for each process activate execute until a wait statement, then suspend execution usually involves scheduling transactions on signals for later times

Simulation Algorithm Simulation cycle advance simulation time to time of next transaction for each transaction at this time update signal value event if new value is different from old value for each process sensitive to any of these events, or whose wait for time-out has expired resume execute until a wait statement, then suspend Simulation finishes when there are no further scheduled transactions

Synthesis Translates register-transfer-level (RTL) design into gate-level netlist Restrictions on coding style for RTL model Tool dependent

Basic Design Methodology Requirements RTL Model Simulate Synthesize Gate-level Model Simulate Test Bench ASIC or FPGA Place & Route Timing Model Simulate