SlideShare a Scribd company logo
http://www.bized.co.uk




                                   Session 4


Prepared by
          Alaa Salah Shehata
          Mahmoud A. M. Abd El Latif
          Mohamed Mohamed Tala’t
          Mohamed Salah Mahmoud

                                                     Version 02 – October 2011
                                                  Copyright 2006 – Biz/ed
http://www.bized.co.uk




                                              4
           -Data Operators
                  -Aggregate
Contents          -Concatenation
                  -Attributes

           -LABs
                   -Counters
                   -Rotating LEDs




                                                  2
                                    Copyright 2006 – Biz/ed
Session 4

                  http://www.bized.co.uk




              Data
            Operators




                                   3
                     Copyright 2006 – Biz/ed
Session 4

                                                                 http://www.bized.co.uk


Data Operators                      Concatenation



Used to merge two operands together using the concatenation operator (&).
This result is an array in which length is the sum of lengths of both operands.




  C <= A & B                                            A                    B




                                                              C

                                                                                   4
                                                                     Copyright 2006 – Biz/ed
Session 4

                        http://www.bized.co.uk




Shift registers



                   Example
                      19




                                           5
                             Copyright 2006 – Biz/ed
Session 4

                                               http://www.bized.co.uk


Data Operators                Concatenation
                                     A7                     A0
 Shift Right Register:

 A <= „0‟ & A(7 downto 1);

                                      0
                                          A7                A1

                                     A7                     A0
 Shift Left Register:

 A <= A(6 downto 0) & „0‟ ;
                                                            0
                                     A6               A0
                                                                 6
                                                  Copyright 2006 – Biz/ed
Session 4

                                                        http://www.bized.co.uk


Data Operators                 Concatenation
                                             A7                      A0
 Shift Right Register:

 A <= A(7) & A(7 downto 1);


                                             A7 A7                   A1
 we use this shifting when we need to keep
 the sign in our vector and not losing it.

                                             A7 A7 A7                A2




                                                                         7
                                                           Copyright 2006 – Biz/ed
Session 4

                          http://www.bized.co.uk




Rotating registers



                     Example
                        20




                                             8
                               Copyright 2006 – Biz/ed
Session 4

                                              http://www.bized.co.uk


Data Operators                Concatenation
                                     A7                    A0
 Rotate Right Register:

 A <= A(0)& A(7 downto 1);



                                     A0 A7                 A1

                                     A7                    A0
 Shift Left Register:

 A <= A(6 downto 0) & A(7);


                                     A6              A0 A7
                                                                9
                                                 Copyright 2006 – Biz/ed
Session 4

                                                            http://www.bized.co.uk


Data Operators                   Aggregate
Provides an easy way of assigning objects of composite types

The aggregate assigns values to a selected elements of an array or a record.

Example 20

Signal data_bus : std_logic_vector(15 downto 0);

data_bus <= (15 downto 8 => '0' , others => '1');

                 “0000000011111111”
data_bus <= (1 | 4 | 7 => '1', 2 | 3 => '0', others => 'Z');
                 “ZZZZZZZZ1ZZ1001Z”
data_bus <= (others => ‘Z');       -- fill data_bus with ones

                 “ZZZZZZZZZZZZZZZZ”

                                                                             10
                                                                Copyright 2006 – Biz/ed
Session 4

                  http://www.bized.co.uk




            Exercise
               5




                                    11
                       Copyright 2006 – Biz/ed
Session 4

                                    http://www.bized.co.uk



Write the statement

“0000000100000000”       --16bit



“11111111”               --8 bits



“11110011”               --8bits




                                                    12
                                       Copyright 2006 – Biz/ed
Session 4

                                                       http://www.bized.co.uk



Write the statement

“0000000100000000”       --16bit

        data_bus <= ( 8 => ‘1’ , others => ‘0’   ) ;

“11111111”               --8 bits

        data_bus <= (others => ‘1’ ) ;

“11110011”               --8bits

        data_bus <= ( 3|2 => ‘0’,others => ‘1’ ) ;




                                                                       13
                                                          Copyright 2006 – Biz/ed
Session 4

                                                                           http://www.bized.co.uk



Attributes                                                                 Attribute      Return value
Attributes allow returning information about entities , architectures ,
types , signals                                                            Count’left          0
„left, „right, „high, „length, ‟range, „event, …                           States’left        Idle
                                                                           Word’left           15
Note
Pronounce the apostrophe as “tick “                                       Count’right        127
                                                                          States’right       Write
Example                                                                   Word’right          0


Type count is integer range 0 to 127 ;                                    Count’high         127
                                                                          States’high        Write
Type states is ( idle , decision , read , write ) ;
                                                                          Word’high           15
Type word is array ( 15 downto 0 ) of std_logic ;
                                                                           Count’low           0
Note
                                                                           States’low         Idle
As we know if we need to ask about the rising edge of the clk we           Word’low            0
can say
 if rising_sdge(clk) then                                                 Count’length        128
                                                                          States’length        4
by using attributes we also can ask about the clk with other formula      Word’length         16
that says
if (clk’event and clk = ‘1’) then

                                                                                             14
                                                                                Copyright 2006 – Biz/ed
Session 4

                                       http://www.bized.co.uk




• General example on Attributes




                                  Example
                                     21




                                                         15
                                            Copyright 2006 – Biz/ed
Session 4

                                                            http://www.bized.co.uk

ARCHITECTURE examp OF attrs IS
  Type myInt is range 0 to 15;    Type states is (red, yellow, green);
  Type word is array (15 downto 0) of std_logic;
  Signal count: integer;     signal mySig: myInt;
  signal state : states;
BEGIN
  process
    begin
       mySig <= myInt'left; count <= word'left; state <= states'left;
       wait for 10 ns;
       mySig <= myInt'right; count <= word'right; state <= states'right;
       wait for 10 ns;
       mySig <= myInt'low; count <= word'low; state <= states'low;
       wait for 10 ns;
       mySig <= myInt'high; count <= word'high; state <= states'high;
       wait for 10 ns;
       count <= word'length;
       wait;
   end process;
END ARCHITECTURE examp;




                                                                             16
                                                                Copyright 2006 – Biz/ed
Session 4

                         http://www.bized.co.uk




Sequential Circuits on Modelsim


                                         17
                            Copyright 2006 – Biz/ed
Session 4

                                         http://www.bized.co.uk




As clock is found in your design..
the output registered (saved) and appeared next clk cycle
                                                         18
                                            Copyright 2006 – Biz/ed
Session 4

                               http://www.bized.co.uk




• 4-Bit binary Counter




                         lab
                          5




                                               19
                                  Copyright 2006 – Biz/ed
Session 4

                                                      http://www.bized.co.uk




• 4-Bit binary Counter with asynchronous load




                                                lab
                                                 6




                                                                      20
                                                         Copyright 2006 – Biz/ed
Session 4

                                                      http://www.bized.co.uk




Assignment
                                  Session-4
4-Bit binary Up-Down Counter with asynchronous load




                                                                      21
                                                         Copyright 2006 – Biz/ed
Session 4

                                http://www.bized.co.uk




• One way rotating LEDs




                          lab
                           7




                                                22
                                   Copyright 2006 – Biz/ed
Session 4

                                     http://www.bized.co.uk




Assignment
                         Session-4
Two Ways Rotating LEDs




                                                     23
                                        Copyright 2006 – Biz/ed
Session 4

                                         http://www.bized.co.uk

Download Session 4 material



        Session 4.pdf

        Labs4.txt




Ask for the material through mail
          start.courses@gmail.com

Facebook group
       start.group@groups.facebook.com



                                                         24
                                            Copyright 2006 – Biz/ed
Session 4

                             http://www.bized.co.uk




Questions
                 Session-4




                                             25
                                Copyright 2006 – Biz/ed
Session 4

                                                                                                      http://www.bized.co.uk

Take Your Notes
              Print the slides and take your notes here

---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                              26
                                                                                                           Copyright 2006 – Biz/ed
Session 4

                                                                                                      http://www.bized.co.uk

Take Your Notes
              Print the slides and take your notes here

---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                              27
                                                                                                           Copyright 2006 – Biz/ed
Session 4

                       http://www.bized.co.uk




See You Next Session




                                       28
                          Copyright 2006 – Biz/ed

More Related Content

Recently uploaded

How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 

Recently uploaded (20)

How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Session four

  • 1. http://www.bized.co.uk Session 4 Prepared by Alaa Salah Shehata Mahmoud A. M. Abd El Latif Mohamed Mohamed Tala’t Mohamed Salah Mahmoud Version 02 – October 2011 Copyright 2006 – Biz/ed
  • 2. http://www.bized.co.uk 4 -Data Operators -Aggregate Contents -Concatenation -Attributes -LABs -Counters -Rotating LEDs 2 Copyright 2006 – Biz/ed
  • 3. Session 4 http://www.bized.co.uk Data Operators 3 Copyright 2006 – Biz/ed
  • 4. Session 4 http://www.bized.co.uk Data Operators Concatenation Used to merge two operands together using the concatenation operator (&). This result is an array in which length is the sum of lengths of both operands. C <= A & B A B C 4 Copyright 2006 – Biz/ed
  • 5. Session 4 http://www.bized.co.uk Shift registers Example 19 5 Copyright 2006 – Biz/ed
  • 6. Session 4 http://www.bized.co.uk Data Operators Concatenation A7 A0 Shift Right Register: A <= „0‟ & A(7 downto 1); 0 A7 A1 A7 A0 Shift Left Register: A <= A(6 downto 0) & „0‟ ; 0 A6 A0 6 Copyright 2006 – Biz/ed
  • 7. Session 4 http://www.bized.co.uk Data Operators Concatenation A7 A0 Shift Right Register: A <= A(7) & A(7 downto 1); A7 A7 A1 we use this shifting when we need to keep the sign in our vector and not losing it. A7 A7 A7 A2 7 Copyright 2006 – Biz/ed
  • 8. Session 4 http://www.bized.co.uk Rotating registers Example 20 8 Copyright 2006 – Biz/ed
  • 9. Session 4 http://www.bized.co.uk Data Operators Concatenation A7 A0 Rotate Right Register: A <= A(0)& A(7 downto 1); A0 A7 A1 A7 A0 Shift Left Register: A <= A(6 downto 0) & A(7); A6 A0 A7 9 Copyright 2006 – Biz/ed
  • 10. Session 4 http://www.bized.co.uk Data Operators Aggregate Provides an easy way of assigning objects of composite types The aggregate assigns values to a selected elements of an array or a record. Example 20 Signal data_bus : std_logic_vector(15 downto 0); data_bus <= (15 downto 8 => '0' , others => '1'); “0000000011111111” data_bus <= (1 | 4 | 7 => '1', 2 | 3 => '0', others => 'Z'); “ZZZZZZZZ1ZZ1001Z” data_bus <= (others => ‘Z'); -- fill data_bus with ones “ZZZZZZZZZZZZZZZZ” 10 Copyright 2006 – Biz/ed
  • 11. Session 4 http://www.bized.co.uk Exercise 5 11 Copyright 2006 – Biz/ed
  • 12. Session 4 http://www.bized.co.uk Write the statement “0000000100000000” --16bit “11111111” --8 bits “11110011” --8bits 12 Copyright 2006 – Biz/ed
  • 13. Session 4 http://www.bized.co.uk Write the statement “0000000100000000” --16bit data_bus <= ( 8 => ‘1’ , others => ‘0’ ) ; “11111111” --8 bits data_bus <= (others => ‘1’ ) ; “11110011” --8bits data_bus <= ( 3|2 => ‘0’,others => ‘1’ ) ; 13 Copyright 2006 – Biz/ed
  • 14. Session 4 http://www.bized.co.uk Attributes Attribute Return value Attributes allow returning information about entities , architectures , types , signals Count’left 0 „left, „right, „high, „length, ‟range, „event, … States’left Idle Word’left 15 Note Pronounce the apostrophe as “tick “ Count’right 127 States’right Write Example Word’right 0 Type count is integer range 0 to 127 ; Count’high 127 States’high Write Type states is ( idle , decision , read , write ) ; Word’high 15 Type word is array ( 15 downto 0 ) of std_logic ; Count’low 0 Note States’low Idle As we know if we need to ask about the rising edge of the clk we Word’low 0 can say if rising_sdge(clk) then Count’length 128 States’length 4 by using attributes we also can ask about the clk with other formula Word’length 16 that says if (clk’event and clk = ‘1’) then 14 Copyright 2006 – Biz/ed
  • 15. Session 4 http://www.bized.co.uk • General example on Attributes Example 21 15 Copyright 2006 – Biz/ed
  • 16. Session 4 http://www.bized.co.uk ARCHITECTURE examp OF attrs IS Type myInt is range 0 to 15; Type states is (red, yellow, green); Type word is array (15 downto 0) of std_logic; Signal count: integer; signal mySig: myInt; signal state : states; BEGIN process begin mySig <= myInt'left; count <= word'left; state <= states'left; wait for 10 ns; mySig <= myInt'right; count <= word'right; state <= states'right; wait for 10 ns; mySig <= myInt'low; count <= word'low; state <= states'low; wait for 10 ns; mySig <= myInt'high; count <= word'high; state <= states'high; wait for 10 ns; count <= word'length; wait; end process; END ARCHITECTURE examp; 16 Copyright 2006 – Biz/ed
  • 17. Session 4 http://www.bized.co.uk Sequential Circuits on Modelsim 17 Copyright 2006 – Biz/ed
  • 18. Session 4 http://www.bized.co.uk As clock is found in your design.. the output registered (saved) and appeared next clk cycle 18 Copyright 2006 – Biz/ed
  • 19. Session 4 http://www.bized.co.uk • 4-Bit binary Counter lab 5 19 Copyright 2006 – Biz/ed
  • 20. Session 4 http://www.bized.co.uk • 4-Bit binary Counter with asynchronous load lab 6 20 Copyright 2006 – Biz/ed
  • 21. Session 4 http://www.bized.co.uk Assignment Session-4 4-Bit binary Up-Down Counter with asynchronous load 21 Copyright 2006 – Biz/ed
  • 22. Session 4 http://www.bized.co.uk • One way rotating LEDs lab 7 22 Copyright 2006 – Biz/ed
  • 23. Session 4 http://www.bized.co.uk Assignment Session-4 Two Ways Rotating LEDs 23 Copyright 2006 – Biz/ed
  • 24. Session 4 http://www.bized.co.uk Download Session 4 material Session 4.pdf Labs4.txt Ask for the material through mail start.courses@gmail.com Facebook group start.group@groups.facebook.com 24 Copyright 2006 – Biz/ed
  • 25. Session 4 http://www.bized.co.uk Questions Session-4 25 Copyright 2006 – Biz/ed
  • 26. Session 4 http://www.bized.co.uk Take Your Notes Print the slides and take your notes here --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- 26 Copyright 2006 – Biz/ed
  • 27. Session 4 http://www.bized.co.uk Take Your Notes Print the slides and take your notes here --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------- 27 Copyright 2006 – Biz/ed
  • 28. Session 4 http://www.bized.co.uk See You Next Session 28 Copyright 2006 – Biz/ed