1/8/2007 - L11 Project Step 5Copyright 2006 - Joanne DeGroat, ECE, OSU1 Project Step 6 Step 3 in behavioral modeling. Use of packages.

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.
L9 – State Assignment and gate implementation. States Assignment  Rules for State Assignment  Application of rule  Gate Implementation  Ref: text.
L18 – VHDL for other counters and controllers. Other counters  More examples Gray Code counter Controlled counters  Up down counter  Ref: text Unit.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Binary additon & subtraction.
9/15/09 - L25 Registers & Load Enable Copyright Joanne DeGroat, ECE, OSU1 Registers & Load Enable.
L23 – Arithmetic Logic Units. Arithmetic Logic Units (ALU)  Modern ALU design  ALU is heart of datapath  Ref: text Unit 15 9/2/2012 – ECE 3561 Lect.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexers.
Modeling styles: 1. Structural Modeling: As a set of interconnected components (to represent structure), 2. Dataflow Modeling: As a set of concurrent assignment.
L16 – Testbenches for state machines. VHDL Language Elements  More examples HDL coding of class examples Testbench for example  Testing of examples.
1/8/ L3 Data Path DesignCopyright Joanne DeGroat, ECE, OSU1 ALUs and Data Paths Subtitle: How to design the data path of a processor.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 5 Step 2 in behavioral modeling. Use of procedures.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU1 Project Step 4 Step 1 in transitioning to behavioral modeling. We will wire behavioral.
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.
1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU1 Project Step 3 Structural Modeling and the Generate Statement.
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,
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
9/15/09 - L13 Technology Mapping & Verificaiton Copyright Joanne DeGroat, ECE, OSU1 Technology Mapping and Verification.
L13 – VHDL Language Elements. VHDL Language Elements  Elements needed for FPGA design Types  Basic Types  Resolved Types – special attributes of resolved.
1/8/ Extra CreditCopyright Joanne DeGroat, ECE, OSU1 PS3xcr Extra Credit Project Modification that can be done to the datapath.
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.
L20 – Register Set. The 430 Register Set  Not exactly a dual ported register set, but a dual drive register set.  Ref: text Unit 10, 17, 20 9/2/2012.
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.
1/8/ L25 Floating Point Adder Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point Adder Using the IEEE Floating Point Standard for an.
MicroBaby ALU.
Modification that can be done to the datapath.
Behavioral modeling of a dual ported register set.
The finish of a grand tour of the language.
Project Step 2 – A single bit slice of the ALU
Modification that can be done to the datapath.
Incrementing and Decrementing
Copyright Joanne DeGroat, ECE, OSU
MicroBaby Datapath.
Copyright Joanne DeGroat, ECE, OSU
Project Step 1 Due – see webpage
L21 – Register Set.
L25 – Datapath ALU.
MicroBaby Datapath.
Copyright Joanne DeGroat, ECE, OSU
IEEE Floating Point Adder
A floating point multiplier behavior model.
Step 2 in behavioral modeling. Use of procedures.
Copyright Joanne DeGroat, ECE, OSU
IEEE Floating Point Adder Verification
A floating point multiplier behavior model.
An overview of the Verilog HDL.
Behavioral modeling of a dual ported register set.
L7s Multiple Output example
Copyright Joanne DeGroat, ECE, OSU
Structural Modeling and the Generate Statement
Project Step 2 – A single bit slice of the ALU
A floating point multiplier behavior model.
Copyright Joanne DeGroat, ECE, OSU
Step 2 in behavioral modeling. Use of procedures.
Step 3 in behavioral modeling. Use of packages.
© Copyright Joanne DeGroat, ECE, OSU
L25 – Final Review AU 15 Final Exam – Classroom – Journalism 300
The finish of a grand tour of the language.
Copyright Joanne DeGroat, ECE, OSU
Project Step 2 – A single bit slice of the ALU
Structural Modeling and the Generate Statement
Presentation transcript:

1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 6 Step 3 in behavioral modeling. Use of packages.

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU2 So far  Modeled the ALU structurally with dataflow models of the leaf units.  Modeled the structure algorithmically exactly in the first behavioral architecture. Code≡Structure  2 nd Behavioral model used a combined P&K&R to choose the operation For op A have P,K,R of 1100,1111,1100 For op A AND B have 1000,1111,1100 etc. AND incorporated procedures, declared in the declarative region of the process, for the arithmetic functions.

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU3 This time  And yes, this is yet another architecture of our ALU (yaaa) (more humorous in days before flex and bison)  Start by declaring a new ENTITY for the 8 bit ALU – (we now need one) NO LONGER HAVE P, K, AND R Now have simply alu_op Illustrated in the assignment writeup and on the next slide

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU4 The new ENTITY ENTITY alu_8bit_v4 IS PORT ( alu_op : IN operations; a,b : IN BIT_VECTOR(7 downto 0); Cin : IN BIT; Zout : OUT BIT_VECTOR(7 downto 0); Cout : OUT BIT); END alu_8bit_v4;  Note that this ENTITY uses type operations and there is now input alu_op versus P,K,R  Where is TYPE operations declared?

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU5 Type Operations  Type OPERATIONS was declared in the declarative region of the ARCHITECTURE of the testbench.  The scope of TYPE operations is limited to the ARCHITECTURE in which it is declared.  So how can this ENTITY declaration use it? IT CAN’T -- SO  Move the declaration to a PACKAGE that both the testbench ARCHITECTURE and this ENTITY can use.  So declare a package declarative part and package body. TYPE operations is moved to the package declarative part.

Modifications  In the testbench Before the ARCHITECTURE must have a USE clause to see the declaration.  In the ALU ENTITY Before the entity have a USE clause. 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU6

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU7 The Procedures  The procedures for binary addition, subtraction and two’s complement are also moved to the package body.  What is needed in the package declarative part???

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU8 The package and use.  As the declaration is now in the package the testbench architecture must now have a USE clause prior to it so that it can see the declaration. USE work.step6_package.all; ARCHITECTURE test OF p6 IS … (but the ENTITY of the ALU also needs TYPE operations) so where is the USE placed?  BE SURE TO COMMENT OUT THE DECLARATION for TYPE operations IN THE TESTBENCH ARCHITECTURE

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU9 Type Operations  Declare it in both the testbench and the package??? (WHY NOT) The declaration for type operations in the testbench and the package would be identical so why not just have both of them.  They are different declarations and therefore a different type!! (even though they are identical) Which means it does not work.

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU10 Using it in the ENTITY USE work.step6_package.all; ENTITY alu_8bit_v4 IS … PORT ( ………….  The USE clause prior to the ENTITY makes all the declarations in this package visible to the ENTITY and all ARCHITECTURES of the ENTITY.

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU11 The Procedures  Move the procedures declared in the process declarative region out to the package body.  Add declarations for them in the package declarative part. (but the code from before goes in the package body)  The declaration can be cut and pasted.

Within the ALU  Within the alu the CASE statement previously switched on a concatenation of P,K, and R.  Now switch on alu_op with is of TYPE operations which has values of opa,opb,… 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU12

1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU13 A final modification  Modify the case statement to switch on alu_op instead of the concatenated PKR value which is no longer even available.  And once again Move the declaration for TYPE operations to the package and comment it out in the testbench architecture