Reconfigurable Computing - Resolution Functions John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound, Western.

Slides:



Advertisements
Similar presentations
1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
Advertisements

1/8/ L17 Resolved SiganlsCopyright Joanne DeGroat, ECE, OSU1 Resolved Signals What are resolved signals and how do they work. Resolution???
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
Sistemas Digitais I LESI - 2º ano Lesson 5 - VHDL U NIVERSIDADE DO M INHO E SCOLA DE E NGENHARIA Prof. João Miguel Fernandes Dept.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
VHDL And Synthesis Review. VHDL In Detail Things that we will look at: –Port and Types –Arithmetic Operators –Design styles for Synthesis.
Programming in VHDL Using Processes. How Processes Run A process is either in suspend mode or is running. For a process to run, there has to be a change.
The IEEE Libraries And Examples Using Functions. Libraries Using the Library Command VHDL allows libraries defined using: library LibraryName; Here, we.
Simple Testbenches Behavioral Modeling of Combinational Logic
Reconfigurable Computing - VHDL – Types & Statements John Morris The University of Auckland Iolanthe on the Hauraki Gulf.
1 H ardware D escription L anguages Basic Language Concepts.
Resolved Signals Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Reconfigurable Computing - Designing and Testing John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound,
Reconfigurable Computing - VHDL - Types John Morris Chung-Ang University The University of Auckland.
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic9: Three-State Buffers, Encoders/Decoders José Nelson Amaral.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
IAY 0600 Digital Systems Design
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
Reconfigurable Computing - Type conversions and the standard libraries John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots.
Language Concepts Ver 1.1, Copyright 1997 TS, Inc. VHDL L a n g u a g e C o n c e p t s Page 1.
Reconfigurable Computing - VHDL John Morris Chung-Ang University The University of Auckland.
EE3A1 Computer Hardware and Digital Design Lecture 5 Testbenches and Memories in VHDL.
RESOLVED SIGNALS Used for situations where 2 outputs drive one signal. Example of a resolved signal declaration: type tri_state_logic is (‘0’, ‘1’, ‘Z’);
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
Reconfigurable Computing - VHDL John Morris Computer Science/ Electrical and Computer Engineering The University of Auckland Iolanthe racing off Fremantle,
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Reconfigurable Computing - VHDL - Types John Morris Chung-Ang University The University of Auckland.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
L19 – Resolved Signals. Resolved Signals  What are resolved signals In systems In VHDL Resolution – Isn’t that for resolving conflicts?  Ref: text Unit.
Reconfigurable Computing - Pipelined Systems John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound, Western.
DATA TYPES 1.Pre-Defined Data Types 2. User-Defined Data Types.
16/11/2006DSD,USIT,GGSIPU1 Packages The primary purpose of a package is to encapsulate elements that can be shared (globally) among two or more design.
8-Jan-16EE5141 Chapter 6 Subprograms & Packages Subprogram declaration Subprogram body Package declaration Package body Resolution function Subprogram.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
5-1 Logic System Design I VHDL Design Principles ECGR2181 Reading: Chapter 5.0, 5.1, 5.3 port ( I: in STD_LOGIC_VECTOR (1 to 9); EVEN, ODD: out STD_LOGIC.
EE121 John Wakerly Lecture #17
BASIC VHDL LANGUAGE ELEMENTS Digital Design for Instrumentation with VHDL 1.
Advanced FPGA Based System Design Lecture-6 & 7 VHDL Data Types By: Dr Imtiaz Hussain 1.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 7 Behavioral modeling of a dual ported register set.
Signals & Data-typesVer 1.1, Copyright 1997, TS, Inc. VHDL S i g n a l s & D a t a T y p e s Page 1.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
1 - CPRE 583 (Reconfigurable Computing): VHDL overview 1 Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 2: 8/26/2011 (VHDL Overview.
IAY 0600 Digital Systems Design
Elements of Structural Models
More About Objects and Methods
Basic Language Concepts
Systems Architecture Lab: Introduction to VHDL
Behavioral Style Combinational Design with VHDL
Discussion 2: More to discuss
Reconfigurable Computing - VHDL - Types
Dataflow Style Combinational Design with VHDL
Behavioral Style Combinational Design with VHDL
Copyright Joanne DeGroat, ECE, OSU
IAS 0600 Digital Systems Design
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
IAS 0600 Digital Systems Design
IAS 0600 Digital Systems Design
CPE 528: Lecture #3 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
IAS 0600 Digital Systems Design
IAS 0600 Digital Systems Design
CPRE 583 Reconfigurable Computing
IAS 0600 Digital Systems Design
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Reconfigurable Computing - Resolution Functions John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound, Western Australia

What’s the difference between std_logic and std_ulogic ?  The library ieee.std_logic_1164 has two types std_logic and std_ulogic  To understand the difference, consider this circuit  where the blue signal line has more than one driver attached to it?  ( eg it’s a bus)  How do we set up our model so that the simulator knows the ‘rules’?  ie  which signal overrides the others or  how the signals combine together

Contending drivers  Remember that VHDL knows nothing about the IEEE 1164 rules  To VHDL, the only primitive operations are those of a ‘normal’ programming language  addition, subtraction, etc  assignment It does distinguish between signal and variable assignment, but only with respect to the timing of assignment of new values!  ieee.std_logic_1164 is NOT part of the VHDL standard  So when two std_logic values are applied to the same signal (ie wire), a VHDL simulator has to know that  ‘1’ overrides ‘Z’, ‘U’, ‘X’, ‘H’, ‘L’, …  ‘1’ and ‘0’ lead to ‘X’  etc

Unresolved signals  std_ulogic is an unresolved type  It is an error to define a model in which two drivers can set the value of an unresolved signal because  there is no resolution function associated with the signal that can be invoked to determine which driver overrides the other  It is defined simply: TYPE std_ulogic IS (‘U’,‘X’,‘0’,‘1’,‘Z’,‘W’,‘L’,‘H’,‘-’); ie it is an enumerated type with possible values: ‘U’, … This says nothing about the behaviour of std_ulogic signals  Their behaviour is encoded in the functions ( and, or, … ) that take std_ulogic arguments On the other hand,  std_logic is an resolved type

Unresolved signals On the other hand,  std_logic is an resolved type  It is defined: ( see maxplus2\vhdl93\ieee\std1164.vhd ) SUBTYPE std_logic IS resolved std_ulogic; Note that there is a function definition just preceding this type: Thus resolved is a function that takes a vector of std_ulogic elements and returns a value of std_ulogic type  This function is called a resolution function  It is called whenever two or more sources (signal assignments) drive a std_logic signal FUNCTION resolved( s: std_ulogic_vector ) RETURN std_ulogic; SUBTYPE std_logic IS resolved std_ulogic;

Resolution functions  Any resolved signal ( ie one that may be driven by two sources) is defined by a type that has a resolution function associated with it  A resolved type is a subtype  It can resolve a conflict of multiple instances of the parent type  The name of the resolution function immediately precedes the name of the type being resolved  The resolution function’s  argument is a vector of elements of the type being resolved The simulator will place the actual values to be resolved in this vector and call the resolution function eg with 3 drivers for a std_logic signal, the argument to resolved might be (‘Z’, ‘H’, ‘1’) which should return ‘1’  return value is the parent type It will determine which of the values of the parent type result when the vector of signal values is applied FUNCTION resolved( s: std_ulogic_vector ) RETURN std_ulogic; SUBTYPE std_logic IS resolved std_ulogic;

Implementation of resolution functions  The simplest way to implement a resolution function uses a table eg for std_logic ( see maxplus\vhdl93\ieee\std1164b.vhd ) TYPE std_logic_table IS ARRAY(std_ulogic,std_ulogic) OF std_ulogic; CONSTANT resolution_table : std_logic_table := ( -- U X 0 1 Z W L H – ( ‘U’, ‘U’, ‘U’, ‘U’, ‘U’, ‘U’, ‘U’, ‘U’, ‘U’ ), -- U ( ‘U’, ‘X’, ‘X’, ‘X’, ‘X’, ‘X’, ‘X’, ‘X’, ‘X’ ), -- X ( ‘U’, ‘X’, ‘0’, ‘X’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’ ), -- 0 ( ‘U’, ‘X’, ‘X’, ‘1’, ‘1’, ‘1’, ‘1’, ‘1’, ‘1’ ), -- 1 ( ‘U’, ‘X’, ‘0’, ‘1’, ‘Z’, ‘W’, ‘L’, ‘H’, ‘X’ ), -- Z … );

Implementation of resolution functions  The function resolved is now very simple ( see maxplus\vhdl93\ieee\std1164b.vhd ) -- On entry, s will contain the actual values being driven -- this signal FUNCTION resolved ( s: std_ulogic_vector ) RETURN std_ulogic IS VARIABLE result : std_logic := ‘Z’; -- default, weakest BEGIN IF ( s’LENGTH = 1 ) THEN RETURN s(s’LOW); ELSE FOR k IN s’RANGE LOOP -- Take each signal in turn and determine the result of -- combining it with the previous result result := resolution_table(result,s(k)); END LOOP; END IF; RETURN result; END resolved;

Writing resolution functions  You may never need to!  std_logic_1164 defines the most commonly needed one! But, 1.You may be using integer types instead of std_logic_vector in a model of a processor for  convenience  speed in simulation  …  You will need to define a resolved integer types if your model has a bus with multiple drivers in it  You will need to have a convention for ‘disconnecting’ a driver, eg setting a driver to emit 0 when it’s not driving the bus (where you would drive a ‘Z’ with std_logic )  You can also explicitly disconnect a driver with VHDL’s DISCONNECT statement

Resolution functions 2.You may have defined an abstract type  You (correctly) don’t want to be bothered with implementation details yet  Your bus is a collection of signals (address, data, command, etc ); you have a type for each one; so the bus itself is defined as a VHDL RECORD  The synthesizer will eventually convert it to logic for you!  …  Again you will need a resolution function 3.…

Simulation speed  std_ulogic does not have a resolution function associated with it  it should use less simulation time (ie run faster) than std_logic  With std_logic, the simulator may end up checking for (or calling) the resolution function for every assignment  std_ulogic is recommended wherever possible  It may save simulation time  std_logic is a subtype, so it is possible to convert between them whenever necessary  res_signal <= std_logic(unres_signal);