1/8/2007 - L17 Resolved SiganlsCopyright 2006 - Joanne DeGroat, ECE, OSU1 Resolved Signals What are resolved signals and how do they work. Resolution???

Slides:



Advertisements
Similar presentations
1/8/ VerilogCopyright Joanne DeGroat, ECE, OSU1 Verilog Overview An overview of the Verilog HDL.
Advertisements

L23 – Adder Architectures. Adders  Carry Lookahead adder  Carry select adder (staged)  Carry Multiplexed Adder  Ref: text Unit 15 9/2/2012 – ECE 3561.
Blocks Resolved Signals Signal GUARDs Tri-State Buses.
Reconfigurable Computing - Resolution Functions John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound, Western.
L18 – VHDL for other counters and controllers. Other counters  More examples Gray Code counter Controlled counters  Up down counter  Ref: text Unit.
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.
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
SubprogramsSubprograms. SubprogramsSubprograms ä Similar to subprograms found in other languages ä Allow repeatedly used code to be referenced multiple.
Topics of Lecture Structural Model Procedures Functions Overloading.
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.
9/15/09 - L25 Registers & Load Enable Copyright Joanne DeGroat, ECE, OSU1 Registers & Load Enable.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexers.
Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1.
Resolved Signals Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
L16 – Testbenches for state machines. VHDL Language Elements  More examples HDL coding of class examples Testbench for example  Testing of examples.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 5 Step 2 in behavioral modeling. Use of procedures.
L10 – State Machine Design Topics. States Machine Design  Other topics on state machine design Equivalent sequential machines Incompletely specified.
1/8/ L20 Project Step 8 - Data Path Copyright Joanne DeGroat, ECE, OSU1 State Machine Design with an HDL A methodology that works for documenting.
L26 – Datapath ALU implementation
1/8/ L23 Project Step 9 - Sequential Machine Copyright Joanne DeGroat, ECE, OSU1 Project Step 9 Beyond the ALU and Datapath. Sequential Machine.
L16 – VHDL for State Machines with binary encoding.
2-Jun-16EE5141 Chapter 3 ä The concept of the signal ä Process concurrency ä Delta time ä Concurrent and sequential statements ä Process activation by.
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’);
L12 – VHDL Overview. VHDL Overview  HDL history and background  HDL CAD systems  HDL view of design  Low level HDL examples  Ref: text Unit 10, 17,
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
1/8/ L2 VHDL Introcution© Copyright Joanne DeGroat, ECE, OSU1 Introduction to VHDL.
L19 – Resolved Signals. Resolved Signals  What are resolved signals In systems In VHDL Resolution – Isn’t that for resolving conflicts?  Ref: text Unit.
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.
1/8/ L16 Timing & Concurrency III Copyright Joanne DeGroat, ECE, OSU1 Timing & Concurrency III Delay Model foundations for simulation and.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Subprograms Lecture 6. Subprograms A subprogram defines a sequential algorithm that performs some computations. Subprograms can be: –1. functions –2.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 7 Behavioral modeling of a dual ported register set.
Midterm Exam ReviewCopyright Joanne DeGroat, ECE, OSU1 Midterm Exam Notes.
1/20/ L8 Language Overview III Copyright Joanne DeGroat, ECE, OSU1 Language Overview III The finish of a grand tour of the language.
Project 1.  Two parts Implement a 3 bit Gray Code Counter Implement a 4-to-1 muxtiplexer  Can be done on Altera (Quartis) or Xilinx 8/22/2012 – ECE.
Introduction To VHDL 홍 원 의.
Basic Language Concepts
IAY 0600 Digitaalsüsteemide disain
Timing Model Start Simulation Delay Update Signals Execute Processes
IAY 0600 Digital Systems Design
Behavioral modeling of a dual ported register set.
Copyright Joanne DeGroat, ECE, OSU
ECE 434 Advanced Digital System L15
Copyright Joanne DeGroat, ECE, OSU
CPE 528: Lecture #4 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
CPE/EE 422/522 Advanced Logic Design L11
Copyright Joanne DeGroat, ECE, OSU
L21 – Register Set.
L25 – Datapath ALU.
CPE 528: Lecture #3 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
L22 – Register Set Debugging
How do you achieve deterministic concurrent simulation.
Timing & Concurrency II
Beyond the ALU and Datapath. Sequential Machine Modeling exercise.
Behavioral modeling of a dual ported register set.
Copyright Joanne DeGroat, ECE, OSU
Timing & Concurrency II
Step 2 in behavioral modeling. Use of procedures.
© Copyright Joanne DeGroat, ECE, OSU
Timing & Concurrency II
The transaction problem.
Beyond the ALU and Datapath. Sequential Machine Modeling exercise.
Presentation transcript:

1/8/ L17 Resolved SiganlsCopyright Joanne DeGroat, ECE, OSU1 Resolved Signals What are resolved signals and how do they work. Resolution??? Isn’t that for solving conflicts???

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU2 Overview – Resolved Signals  Why resolved signals?  Steps to creating a resolved signal in VHDL  Resolution Functions

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU3 Busses and Wires  What is the difference between a bus and a wire?  Wires – have only one driving source

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU4 Busses and Wires  Busses on the other hand can be driven by one or more sources  In both cases there can be more than one destination for the signal  With busses, only the device acting as source will actually drive a value. All others will have their output set at high impedance (Z).

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU5 How do you handle Busses in an HDL?  First must consider the information present on a wire and on a bus in a digital circuit.  Information present on a wire: Wire is limited to 2 states using TYPE BIT High or 1 or ‘1’ Low or 0 or ‘0’ There is a transition period between the two but High and Low are the only 2 stable states.

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU6 Information on a Bus  Possible state for a BUS Driven high (driven to a 1) Driven low (driven to a 0) No driving value (Z or high impedance) Capacitive high (H) Capacitive low (L) Conflict (one driver driving it to a 1, another a 0) (X) Conflict of capacitive values (W)  And other useful values U – Uninitialized – - a Don’t Care

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU7 In an HDL need Resolution  With multiple drivers of a signal how do you resolve the value seen by devices using the bus?  RESOLUTION How to determine the value when two or more drivers are driving the same signal  Must look at all drivers and determine the appropriate value to use.

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU8 Step needed in VHDL  Declare a type for the multi-value logic system type mv4_logic is (‘X’,’Z’,’0’,’1’): type mv4_logic_vector is array (natural range <>) of mv4_logic;  Then declare a resolution function function resolved (s:mv4_logic_vector) RETURN mv4_logic;  And then the resolved signal subtype mv4r_logic is resolved mv4_logic; type mv4r_logic_vector is array (natural range <>) of mv4r_logic;  Note that you need to use a subtype declaration to incorporate the resolution function.  So there will be both a resolved and unresolved type for the multi-value system

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU9 Type and Subtype Declaration BNF type_declaration::= full_type_declaration | incomplete_type_declaration full_type_declaration::= TYPE identifier IS type_definition incomplete_type_definition::= TYPE identifier type_definition::= scalar_type_definition | composite_type_definition | access_type_definition | file_type_definition  Can follow the BNF for a TYPE definition but find no resolution function here

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU10 Type and Subtype Declaration BNF  It is, however, in the SUBTYPE definition subtype_declaration::= SUBTYPE identifier IS subtype_indication subtype_indication::=[resolution_function_name] type_mark [constraint] type_mark::= type_name | subtype_name constraint::= range_constraint | index_constraint

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU11 VHDL specification cont.  Had declaration for a function resolved function resolved(s : mv4_logic_vector) RETURN mv4_logic;  Then the body of the resolution function is given in the package body where you will find: TYPE mv4_logic_table IS array (mv4_logic,mv4_logic) of mv4_logic; CONSTANT resolution_table : mv4_logic_table :=( | X Z 0 1 | | ( ‘X’, ‘X’, ‘X’, ‘X’ ), --| X | ( ‘X’, ‘Z’, ‘0’, ‘1’ ), --| Z | ( ‘X’, ‘0’, ‘0’, ‘X’ ), --| 0 | ( ‘X’, ‘1’, ‘X’, ‘1’ )); --| 1 |  And having the resolution table can write the body of the resolution func.

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU12 The resolution function function resolved (s : mv4_logic_vector) RETURN mv4_logic IS variable result : mv4_logic := Z; – weakest state BEGIN IF (s’length = 1) then return s(s’low) ELSE FOR i IN s’range LOOP result := resolution_table(result,s(i)); END LOOP; END IF; return result; END resolved;  Execution could be shortened by adding exit when result=‘X’

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU13 The big picture  After posting of a transaction(s) to the current value of one or more of the drivers, a vector composed of the current values of the drivers is sent to the resolution function for determination of the resolved value.

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU14 Completeness of a MVL package  Having a MVL type with resolution is only part of creating a MVL system.  ALSO need Overloaded function for standard operators Type conversion functions to convert from other type to this type and the reverse  ieee_1164 standard MVL package is a standard package for a multi-value logic system and contains all of these.

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU15 Example of overloading for our 4 state logic system  In the declarative part of the MVL package function “and” (l,r : mv4_logic) RETURN mv4_logic;  In the body of the package for this MVL type mv4logic_table is array (mv4_logic,mv4_logic) of mv4_logic; CONSTANT and_table : mv4logic_table := ( | X Z 0 1 | | ( ‘X’, ‘X’, ‘0’, ‘X’ ), --| X | ( ‘X’, ‘X’, ‘0’, ‘X’ ), --| Z | ( ‘0’, ‘0’, ‘0’, ‘0’ ), --| 0 | ( ‘X’, ‘X’, ‘0’, ‘1’ )); --| 1 | function “and” (l,r : mv4_logic) RETURN mv4_logic IS BEGIN return (and_table(l,r)); END “and”;

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU16 Use of Resolved signals  Must use a resolved signal type for any signals of mode INOUT PORT ( ABUS : INOUT mv4r_logic; …  Within an ARCHITECTURE they are needed whenever the signal will have more than one driver

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU17 Standard logic 1164  Package is online in the course directory  Opens with comments on the code  What is the first part of declaring an MVL system in a package?

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU18 Declaration Part of the Package  Declare MVL logic system types  Declare the resolution function  Declare the resolved type  And declare the array types for vectors  Declare subtype of reduced logic systems

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU19 Overload operators  All operators are overloaded  Can find the package in ~degroat/ee762_assign/ std_1164.vhd

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU20 Type conversion functions and edge detection  To convert from built in logic types of BIT and BIT_VECTOR  And there are similar conversion functions for the reduced logic systems  Also have functions for rising and falling edge

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU21 Now have the package body  Starts with a header  First code is for the resolution function  Note initial state  Note sink state Sink state is state that overrides all others

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU22 The various functions  The AND table  The OR table

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU23 For operation on single logic values and vectors  Single values and vectors

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU24 Example of transactions on resolved values  The model  Note that there is a resolved signal res that is driver both by a concurrent signal assignment statement and in a process. Each is a driver.  Even though the process has two statements that generate transactions for res, it is one driver of res.

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU25 Time 0- and time 0  At startup simulate each process till it suspends  Each driver is set to the initial value of ‘U’  Concurrent stmt is driver 1 of res and generates the transactions shown  The process immediately suspends until 5 ns

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU26 Advance time till time when something occurs = 1 ns  At 1 ns driver 1 (the concurrent stmt) goes to a value of ‘0’  Resolved value is still a ‘U’

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU27 Avdance time to 5 ns when the process resumes  Process generates transaction of an ‘L’ for res at 6 ns  Process then suspends until 25 ns

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU28 Advance time to 6 ns  Transaction on driver 2 becomes the current value on driver 2  Re-evaluate resolution fucntion

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU29 Advance time to next time  Process is suspended until 25 ns  Transaction on Driver 1 at 10 ns  Advance time to 10 ns and post transaction and re- evaluate resolution function

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU30 Advance time to next time at which something occurs  At 20 ns last transaction for Driver 1 is posted  Process is suspended until 25 ns

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU31 Adance time again, to 25 ns  At 25 ns process resumes  Generates transaction for res of (‘1’,26ns)  Process then suspens until 30 ns

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU32 Advance to 26 ns  Post a value of ‘1’ to res  Now resolving a ‘0’ with a ‘1’  Simulation never goes quiescent as the process will always be waiting

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU33 A 2 nd example of transactions on resolved values  The model is similar to the first  Again there is a resolved signal res that is driver both by a concurrent signal assignment statement and in a process. Each is a driver. However, this time res is initialized to ‘1’  Again there are two drivers of res

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU34 Time 0- and time 0  At startup simulate each process till it suspends  Each driver is set to the initial value of ‘1’  Concurrent stmt is driver 1 of res and generates the transactions shown  Process generates the signal transaction, suspends until 5 ns

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU35 Advance time till time when something occurs = 1 ns  At 1 ns driver 1 (the concurrent stmt) goes to a value of ‘0’  Resolved value is now an ‘X’

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU36 Advance time till time when something occurs = 2 ns  At 2 ns driver 2, the process, is updated with a value of ‘Z’ for res.  Resolved value is now an ‘0’  Still have process suspended until 5ns

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU37 Avdance time to 5 ns when the process resumes  Process generates transaction of an ‘L’ for res after 25 ns or 30 ns into simulation  Process then suspends until 25 ns

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU38 Advance time to 10 ns  Posting transaction on Driver 1.  Re-evaluate resolution fucntion  Process 2 still suspeneded until 25 ns.

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU39 Advance time to next time, 20 ns  Post transaction on Driver 1  Process still suspended till 25ns

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU40 Advance time to next time, 25 ns  Time resume process  First generate a transaction of  res(‘1’,26ns)  This is before the transaction on the project output waveform so that old transaction is deleted and this new transaction posted.

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU41 Advance time to next time, 25 ns  Process continues at top and executes res<=‘Z’ after 5 ns;  Generates transaction res(‘Z’,27ns)  Now must add this transaction to driver 2  Process then suspends until 30 ns

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU42 Adding transaction to driver 2  Run the algorithm for posting transactions to drivers (Lect 16).  Step 1 no at or after to delete  Step2 – append the transaction POW – CV - res(‘1’,26ns) - res(‘Z’,27ns)  Now run part II of the algorithm

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU43 Part II of the Update algorithm  Step 1 - Mark new transactions POW – CV - res(‘1’,26ns) - Xres(‘Z’,27ns)  Step 2 - An old transaction is marked if it immediately precedes a marked transactions and its value component is the same as that of the marked transaction. Here the values are different so it is not marked POW – CV - res(‘1’,26ns) - Xres(‘Z’,27ns)  Step 3 – The CV is marked POW – xCV - res(‘1’,26ns) - Xres(‘Z’,27ns)  Step 3 – All unmarked are deleted  POW – CV - res(‘Z’,27ns)

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU44 Resulting in

1/8/ L17 Resolved Siganls Copyright Joanne DeGroat, ECE, OSU45 Advance time to 27ns  Post transaction on Driver 2  Process suspended until 30 ns  As values assigned by process will result in no change of value will end here.