Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Packages - HDL Design - Lecture Slides, Slides of Verilog and VHDL

During the course work of the HDL design, the key points in the lecture slides are:Packages, Behavioral Modeling, Structurally, Leaf Units, Structure Exactly, Code, Structure, Combined, Operation, Behavioral Model

Typology: Slides

2012/2013

Uploaded on 05/07/2013

anjaliy
anjaliy 🇮🇳

4.5

(17)

145 documents

1 / 13

Toggle sidebar

Related documents


Partial preview of the text

Download Packages - HDL Design - Lecture Slides and more Slides Verilog and VHDL in PDF only on Docsity! Project Step 6 Step 3 in behavioral modeling. Use of packages. Docsity.com So far • Modeled the ALU structurally with dataflow models of the leaf units. • Modeled the structure exactly in the first behavioral architecture. Code=Structure • 2nd 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. Docsity.com 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 it. • So declare a package declarative part and package body. TYPE operations is moved to the package declarative part. Docsity.com 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. Docsity.com 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??? Docsity.com 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. Docsity.com 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. Docsity.com Within the ALU • Within the alu the CASE statement switch on a concatenation of P,K, and R. • Now switch on oper with is of TYPE operations which has values of opa,opb,… Docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved