SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
Introduction to VHDL
            Fall 2008


          Jason Lor
   jlor@engmail.uwaterloo.ca
Outline
•   Brief Overview of VHDL
•   Structural Elements of VHDL
     •   Entity
     •   Architecture
     •   Signals

•   Data Types & Operators in VHDL
•   Assignment Execution
     •   Concurrent
     •   Sequential (Process)
Brief Overview of VHDL
• VHDL
 ... stands for Very High Speed Integrated Circuit
                 Hardware
                 Description
                 Language
 ... can be translated into an actual hardware implementation
 ... allows complex digital circuits to be easily created

 In VHDL, strong understanding of your code is more important
 than syntax & style.
Structural Elements
•   Entity

    •   Interface
        •   Example: Ports, I/O


•   Architecture

    •   Implementation
    •   Behaviour
    •   Function
Entity
• Describes the interactions of a module
entity GarageDoorOpener is             entity BlockName is
  port(                                  port(
        i_button : in std_logic;                clock_gen : in std_logic;
        i_sensor : in std_logic;                input1    : inout boolean;
        i_stop    : in std_logic;               input2    : in std_integer;

        o_active    : out std_logic;           output     : out string;
        o_direction : out std_logic            output1    : buffer character
     );                                     );
end entity;                            end entity;

 •    Port is a keyword that describes the data flow
 •    PortName : Mode DataType
 •    ‘;’ is used to separate elements, not for terminating the
      statement
Entity
          • Clock Generator

1
                                             Periodic Function
0


    Rising Edge               Falling Edge
Architecture

• Specifies the implementation of the module
• One entity can have several architectures
   architecture ArchitectureName of EntityName is
      begin
            a AND b => c;
   end ArchitectureName;



• Entity ports are available as signals within
  the architecture
Signals
• are intermediary ‘ports’ within the
  architecture
• represents wires and storage elements
• statements are concurrent

  architecture rtl of GarageDoorOpener is

    signal stop_door    : std_logic;
    signal SignalName   : datatype

  begin
    <architecture code here>
  end rtl;
Data Types
•   similar to programming, all signals and ports should
    have a data type
•   all signals and port must have a data type


      Data Types

       Boolean            Integer      std_logic_vector

          Bit              Real            std_logic

      Character                              type
Data Types
std_logic_vector is an array of std_logic variables
                      std_logic
                 U : uninitialized
                  X : unknown
                     0 : logic 0
                     1 : logic 1
               Z : high impedance
          W : weak signal (either 1 or 0)
           L : weak signal (leaning 0)
           H : weak signal (leaning 1)
                   - : don’t care
Data Types
• ‘type’                                        enumerable type
  • ... is an array of data types and values similar to std_logic_vector &
        std_logic
  • ... can be defined by you

  type TrafficLightState is
    (INIT, RED, REDYELLOW,YELLOW, GREEN);

  type LightSwitchState is
    (‘0’, ‘1’);

  type TypeName is
    (datatype, variablename);
Typical Operators
Logical Operators            Relational Operators
AND   NOR        NOT            =               Equal

                                /=            Not Equal
OR    NAND
                                <             Less than
XOR   XNOR
                                >            Greater than

             Mathematical Operators
             +                Addition
             -               Subtraction
             *              Multiplication
             /                Division
Assignment Execution
•   Concurrent/Continously or Combinational Logic
    • To give a signal a concurrent assignment
      SignalName <= expression;
    • Once your VHDL files compile, the compiler will
      assign your specifications to hardware components
      which operate in parallel with one another
•   Sequential Logic
    • Sequential logic is like programming in that your code
      executes in sequence
    • You can use conditional assignments like ‘if’, ‘case’ etc.
Assignment Execution
• In order to utilize sequential logic you
  have to use process statements
• There are two types of process
  statements, inside processes and outside
  processes
• ‘Process’ Statements
   • ... specifies a block of sequentially executed statements
   • ... run concurrently with each other
   • ... allows the use of if, else if, case, when, with, select statements
Assignment Execution
  library ieee;
  use ieee.std_logic_1164.all;
  use ieee.numeric_std.all;
Entity                                                        Architecture continued, Processes, Cases and If/elses
  entity TrafficLight is
     port(                                                      process(i_clock)
          i_clock : in std_logic;                                  begin
          i_pedestrian : out std_logic;                               if rising_edge(traffic_clock) then
                                                                       if i_pedestrian = ‘1’ then
         o_red : out std_logic;                                             current_state = YELLOW;
         o_yellow : out std_logic;                                     else
         o_green : out std_logic;                                           case current_state is
     );                                                                          when RED =>
  end entity;                                                                          current_state <= GREEN;
Architecture, Signal, Type                                                       when GREEN =>
 architecture RTL of TrafficLight is                                                    current_state <= RED;
    type state_t is (RED, YELLOW, GREEN);                                        when YELLOW =>
                                                                                   current_state <= RED;
    signal current_state : state_t;                                         end case;
                                                                         end if;
 begin                                                                 end if;
    o_red <= ‘1’ when (current_state = RED) else ‘0’;              end process;
    o_yellow <= ‘1’ when (current_state = YELLOW) else ‘0’;     end rtl;
    o_green <= ‘1’ when (current_state = GREEN) else ‘0’;

Weitere ähnliche Inhalte

Andere mochten auch

Komunikasi data pendahuluan_rev1
Komunikasi data pendahuluan_rev1Komunikasi data pendahuluan_rev1
Komunikasi data pendahuluan_rev1Pendidikan
 
Limeryki o zdrowiu z cyklu między kleksami
Limeryki o zdrowiu  z cyklu między kleksamiLimeryki o zdrowiu  z cyklu między kleksami
Limeryki o zdrowiu z cyklu między kleksamiEwelina Os
 
Early intervention 1.23.2012
Early intervention 1.23.2012Early intervention 1.23.2012
Early intervention 1.23.2012Healthy City
 
BHC webinar_General Users
BHC webinar_General UsersBHC webinar_General Users
BHC webinar_General UsersHealthy City
 
Motivation, Organisation and Campaigning
Motivation, Organisation and CampaigningMotivation, Organisation and Campaigning
Motivation, Organisation and Campaigningmore like people
 
How to Use HealthyCity.org for Uploading Your Own Data
How to Use HealthyCity.org for Uploading Your Own Data How to Use HealthyCity.org for Uploading Your Own Data
How to Use HealthyCity.org for Uploading Your Own Data Healthy City
 
211 Healthy City Webinar 3 25 10
211 Healthy City Webinar 3 25 10211 Healthy City Webinar 3 25 10
211 Healthy City Webinar 3 25 10Healthy City
 
Healthy City Presentation 3 23 10
Healthy City Presentation 3 23 10Healthy City Presentation 3 23 10
Healthy City Presentation 3 23 10Healthy City
 
Healthy City Community Planning and Development webinar
Healthy City Community Planning and Development webinarHealthy City Community Planning and Development webinar
Healthy City Community Planning and Development webinarHealthy City
 
ندوة الدراما التليفزيونية الأردنية
ندوة الدراما التليفزيونية الأردنيةندوة الدراما التليفزيونية الأردنية
ندوة الدراما التليفزيونية الأردنيةUrdun Mubdi3
 
Cwex and apprenticeship credits 2012
Cwex and apprenticeship credits 2012Cwex and apprenticeship credits 2012
Cwex and apprenticeship credits 2012V
 
Healthy City WEBINAR Introductory Training
Healthy City WEBINAR Introductory TrainingHealthy City WEBINAR Introductory Training
Healthy City WEBINAR Introductory TrainingHealthy City
 
How to make_godly_decisions
How to make_godly_decisionsHow to make_godly_decisions
How to make_godly_decisionsDon McClain
 

Andere mochten auch (18)

Komunikasi data pendahuluan_rev1
Komunikasi data pendahuluan_rev1Komunikasi data pendahuluan_rev1
Komunikasi data pendahuluan_rev1
 
Limeryki o zdrowiu z cyklu między kleksami
Limeryki o zdrowiu  z cyklu między kleksamiLimeryki o zdrowiu  z cyklu między kleksami
Limeryki o zdrowiu z cyklu między kleksami
 
Historiaurrea
HistoriaurreaHistoriaurrea
Historiaurrea
 
Early intervention 1.23.2012
Early intervention 1.23.2012Early intervention 1.23.2012
Early intervention 1.23.2012
 
BHC webinar_General Users
BHC webinar_General UsersBHC webinar_General Users
BHC webinar_General Users
 
Motivation, Organisation and Campaigning
Motivation, Organisation and CampaigningMotivation, Organisation and Campaigning
Motivation, Organisation and Campaigning
 
Sutro & AdX
Sutro  & AdXSutro  & AdX
Sutro & AdX
 
How to Use HealthyCity.org for Uploading Your Own Data
How to Use HealthyCity.org for Uploading Your Own Data How to Use HealthyCity.org for Uploading Your Own Data
How to Use HealthyCity.org for Uploading Your Own Data
 
211 Healthy City Webinar 3 25 10
211 Healthy City Webinar 3 25 10211 Healthy City Webinar 3 25 10
211 Healthy City Webinar 3 25 10
 
Healthy City Presentation 3 23 10
Healthy City Presentation 3 23 10Healthy City Presentation 3 23 10
Healthy City Presentation 3 23 10
 
Badakizue blog
Badakizue blogBadakizue blog
Badakizue blog
 
Unibertsoa
UnibertsoaUnibertsoa
Unibertsoa
 
Healthy City Community Planning and Development webinar
Healthy City Community Planning and Development webinarHealthy City Community Planning and Development webinar
Healthy City Community Planning and Development webinar
 
ندوة الدراما التليفزيونية الأردنية
ندوة الدراما التليفزيونية الأردنيةندوة الدراما التليفزيونية الأردنية
ندوة الدراما التليفزيونية الأردنية
 
Cwex and apprenticeship credits 2012
Cwex and apprenticeship credits 2012Cwex and apprenticeship credits 2012
Cwex and apprenticeship credits 2012
 
Healthy City WEBINAR Introductory Training
Healthy City WEBINAR Introductory TrainingHealthy City WEBINAR Introductory Training
Healthy City WEBINAR Introductory Training
 
Historiaurrea
HistoriaurreaHistoriaurrea
Historiaurrea
 
How to make_godly_decisions
How to make_godly_decisionsHow to make_godly_decisions
How to make_godly_decisions
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Introduction to VHDL

  • 1. Introduction to VHDL Fall 2008 Jason Lor jlor@engmail.uwaterloo.ca
  • 2. Outline • Brief Overview of VHDL • Structural Elements of VHDL • Entity • Architecture • Signals • Data Types & Operators in VHDL • Assignment Execution • Concurrent • Sequential (Process)
  • 3. Brief Overview of VHDL • VHDL ... stands for Very High Speed Integrated Circuit Hardware Description Language ... can be translated into an actual hardware implementation ... allows complex digital circuits to be easily created In VHDL, strong understanding of your code is more important than syntax & style.
  • 4. Structural Elements • Entity • Interface • Example: Ports, I/O • Architecture • Implementation • Behaviour • Function
  • 5. Entity • Describes the interactions of a module entity GarageDoorOpener is entity BlockName is port( port( i_button : in std_logic; clock_gen : in std_logic; i_sensor : in std_logic; input1 : inout boolean; i_stop : in std_logic; input2 : in std_integer; o_active : out std_logic; output : out string; o_direction : out std_logic output1 : buffer character ); ); end entity; end entity; • Port is a keyword that describes the data flow • PortName : Mode DataType • ‘;’ is used to separate elements, not for terminating the statement
  • 6. Entity • Clock Generator 1 Periodic Function 0 Rising Edge Falling Edge
  • 7. Architecture • Specifies the implementation of the module • One entity can have several architectures architecture ArchitectureName of EntityName is begin a AND b => c; end ArchitectureName; • Entity ports are available as signals within the architecture
  • 8. Signals • are intermediary ‘ports’ within the architecture • represents wires and storage elements • statements are concurrent architecture rtl of GarageDoorOpener is signal stop_door : std_logic; signal SignalName : datatype begin <architecture code here> end rtl;
  • 9. Data Types • similar to programming, all signals and ports should have a data type • all signals and port must have a data type Data Types Boolean Integer std_logic_vector Bit Real std_logic Character type
  • 10. Data Types std_logic_vector is an array of std_logic variables std_logic U : uninitialized X : unknown 0 : logic 0 1 : logic 1 Z : high impedance W : weak signal (either 1 or 0) L : weak signal (leaning 0) H : weak signal (leaning 1) - : don’t care
  • 11. Data Types • ‘type’ enumerable type • ... is an array of data types and values similar to std_logic_vector & std_logic • ... can be defined by you type TrafficLightState is (INIT, RED, REDYELLOW,YELLOW, GREEN); type LightSwitchState is (‘0’, ‘1’); type TypeName is (datatype, variablename);
  • 12. Typical Operators Logical Operators Relational Operators AND NOR NOT = Equal /= Not Equal OR NAND < Less than XOR XNOR > Greater than Mathematical Operators + Addition - Subtraction * Multiplication / Division
  • 13. Assignment Execution • Concurrent/Continously or Combinational Logic • To give a signal a concurrent assignment SignalName <= expression; • Once your VHDL files compile, the compiler will assign your specifications to hardware components which operate in parallel with one another • Sequential Logic • Sequential logic is like programming in that your code executes in sequence • You can use conditional assignments like ‘if’, ‘case’ etc.
  • 14. Assignment Execution • In order to utilize sequential logic you have to use process statements • There are two types of process statements, inside processes and outside processes • ‘Process’ Statements • ... specifies a block of sequentially executed statements • ... run concurrently with each other • ... allows the use of if, else if, case, when, with, select statements
  • 15. Assignment Execution library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; Entity Architecture continued, Processes, Cases and If/elses entity TrafficLight is port( process(i_clock) i_clock : in std_logic; begin i_pedestrian : out std_logic; if rising_edge(traffic_clock) then if i_pedestrian = ‘1’ then o_red : out std_logic; current_state = YELLOW; o_yellow : out std_logic; else o_green : out std_logic; case current_state is ); when RED => end entity; current_state <= GREEN; Architecture, Signal, Type when GREEN => architecture RTL of TrafficLight is current_state <= RED; type state_t is (RED, YELLOW, GREEN); when YELLOW => current_state <= RED; signal current_state : state_t; end case; end if; begin end if; o_red <= ‘1’ when (current_state = RED) else ‘0’; end process; o_yellow <= ‘1’ when (current_state = YELLOW) else ‘0’; end rtl; o_green <= ‘1’ when (current_state = GREEN) else ‘0’;