If Case Loop Next Exit

Similar documents
This report is based on sampled data. Jun 1 Jul 6 Aug 10 Sep 14 Oct 19 Nov 23 Dec 28 Feb 1 Mar 8 Apr 12 May 17 Ju

SEQUENTIAL STATEMENTS

CSE 341 Section Handout #6 Cheat Sheet

Section 1.2: What is a Function? y = 4x

software.sci.utah.edu (Select Visitors)

CMIS 102 Hands-On Lab

Data Types. 9. Types. a collection of values and the definition of one or more operations that can be performed on those values

Asks for clarification of whether a GOP must communicate to a TOP that a generator is in manual mode (no AVR) during start up or shut down.

HPE Security Data Security. HPE SecureData. Product Lifecycle Status. End of Support Dates. Date: April 20, 2017 Version:

Annex A to the DVD-R Disc and DVD-RW Disc Patent License Agreement Essential Sony Patents relevant to DVD-RW Disc

More Binary Search Trees AVL Trees. CS300 Data Structures (Fall 2013)

More BSTs & AVL Trees bstdelete

Lecture 10: Boolean Expressions

ICT PROFESSIONAL MICROSOFT OFFICE SCHEDULE MIDRAND

FREQUENTLY ASKED QUESTIONS

All King County Summary Report

High Performance Computing

SCI - software.sci.utah.edu (Select Visitors)

Seattle (NWMLS Areas: 140, 380, 385, 390, 700, 701, 705, 710) Summary

Seattle (NWMLS Areas: 140, 380, 385, 390, 700, 701, 705, 710) Summary

Seattle (NWMLS Areas: 140, 380, 385, 390, 700, 701, 705, 710) Summary

CS Programming I: Arrays

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14

APPENDIX E2 ADMINISTRATIVE DATA RECORD #2

Polycom Advantage Service Endpoint Utilization Report

Polycom Advantage Service Endpoint Utilization Report

ACTIAN PRODUCTS by Platform - Vector, Vector in Hadoop as of October 18, 2017

SHADOW - Main Result. windpro EFFECTEN SLAGSCHADUW HERENTALS GEPLANDE WINDTURBINES HERENTALS. EDF Luminus Markiesstraat Brussel

EECS2301. Example. Testing 3/22/2017. Linux/Unix Part 3. for SCRIPT in /path/to/scripts/dir/* do if [ -f $SCRIPT -a -x $SCRIPT ] then $SCRIPT fi done

2

2

Lecture 6. Drinking. Nested if. Nested if s reprise. The boolean data type. More complex selection statements: switch. Examples.

2

AIMMS Function Reference - Date Time Related Identifiers

VHDL Sequential Statements. Cristian Sisterna

Fluidity Trader Historical Data for Ensign Software Playback

Monthly SEO Report. Example Client 16 November 2012 Scott Lawson. Date. Prepared by

Scaling on one node Hybrid engines with Multi-GPU on In-Memory database queries

Birthdates by Species 12,064. Beef Bison Dairy Sheep. Birthdates by Year

History. used in early Mac development notable systems in Pascal Skype TeX embedded systems

UAE PUBLIC TRAINING CALENDAR

NCC Cable System Order

DATE OF BIRTH SORTING (DBSORT)

Programming Languages. Function-Closure Idioms. Adapted from Dan Grossman's PL class, U. of Washington

Excel Functions & Tables

Turn Stacked Summarized Bars into One Bridged Bar. Document No: SB001-P3 Revision No: Last Updated: March 18, 2003

COURSE LISTING. Courses Listed. with SAP Hybris Marketing Cloud. 24 January 2018 (23:53 GMT) HY760 - SAP Hybris Marketing Cloud

UK Link Committee Meeting. Xoserve Report Pack. Meeting Date: 12 th January 2017 Reporting Month: December 2016

Mpoli Archive - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

The Power of Prediction: Cloud Bandwidth and Cost Reduction

Programming for Engineers Structures, Unions

CMR India Monthly Mobile Handset Market Report. June 2017

COURSE LISTING. Courses Listed. Training for Database & Technology with Modeling in SAP HANA. 20 November 2017 (12:10 GMT) Beginner.

Annex A to the MPEG Audio Patent License Agreement Essential Philips, France Telecom and IRT Patents relevant to DVD-Video Disc - MPEG Audio - general

ARRL RADIOGRAM A How To

CIMA Asia. Interactive Timetable Live Online

Getting in Gear with the Service Catalog

GWDG Software Archive - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

Definition: Data Type A data type is a collection of values and the definition of one or more operations on those values.

Types, Operators and Expressions

Quatius Corporation - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

ECSE 321 Assignment 2

University of Osnabruck - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

Exam 2 ITEC 120 Principles of Computer Science I Spring: 2017

Eindhoven University of Technology - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

Prof. Dr. M. Schubert VHDL Practical Training FH Regensburg. VHDL distinguishes three possibilities of writing source code:

Undergraduate Admission File

Review. VHDL in Action. This week. Lexical Elements. Literals. More Literals. Concurrent statements Conditional and selected signal assignments

Rzeszow University Of Technology - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

BANGLADESH UNIVERSITY OF PROFESSIONALS ACADEMIC CALENDAR FOR MPhil AND PHD PROGRAM 2014 (4 TH BATCH) PART I (COURSE WORK)

Types, Operators and Expressions

Timing in synchronous systems

Lab # 2. Sequential Statements

Technical University of Munich - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

Omega Engineering Software Archive - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

AVM Networks - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

National Aeronautics and Space Admin. - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

Arrays: The How and the Why of it All Jane Stroupe

Work to establish standard ENTSOE STAKEHOLDER COMMITTEE 1

Data Types H&K Chapter 7. Instructor - Andrew S. O Fallon CptS 121 (October 17, 2018) Washington State University

App Economy Market analysis for Economic Development

CBERS-2. Attitude Control and its Effects on Image Geometric Correction. Follow up to TCM-06 INPE CBERS TEAM

OBJECT-ORIENTED PROGRAMMING IN R: S3 & R6. Environments, Reference Behavior, & Shared Fields

Yield Reduction Due to Shading:

COE 405 Behavioral Descriptions in VHDL

The CPA Exam and Requirements. Adapted and modified from material originally created by David Reinus.

MUC Archive - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

New Concept for Article 36 Networking and Management of the List

ACTIVE MICROSOFT CERTIFICATIONS:

Contract-based Programming: a Route to Finding Bugs Earlier

CIMA Asia. Interactive Timetable Live Online

Stream Depletion Factor Model SDF View

Sequential Logic - Module 5

BEST PRACTICE GUIDE ON THE USE OF THE ELECTRONIC COMMON TECHNICAL DOCUMENT

Statistical Charts and Graphs. June 1, 2012

What you learned so far. Loops & Arrays efficiency for statements while statements. Assignment Plan. Required Reading. Objective 2/3/2018

Maximo 76 Cognos Dimensions

University of California - FTP Site Statistics. Top 20 Directories Sorted by Disk Space

File Handling in C. EECS 2031 Fall October 27, 2014

Transcription:

If Case Loop Next Exit

If statement If_statement ::= if condition then sequence of sequential statements {elsif condition then sequence of sequential statements} [else sequence of sequential statements]

If statement: example of counter The signal COUNT is of the OUT mode so it cannot be read. entity IFSTMT is port ( RSTn, CLK, EN, PL : in bit; DATA : in integer range 0 to 31; COUNT : out integer range 0 to 31); end IFSTMT; architecture RTL of IFSTMT is signal COUNT_VALUE : integer range 0 to 31; begin p0 : process (RSTn, CLK) begin if (RSTn = '0') then COUNT_VALUE <= 0; elsif (CLK'event and CLK = '1') then if (PL = '1') then COUNT_VALUE <= DATA; elsif (EN = '1') then if (COUNT_VALUE = 31) then COUNT_VALUE <= 0; else COUNT_VALUE <= COUNT_VALUE + 1; end process; COUNT <= COUNT_VALUE; end RTL; A temporary signal COUNT_VALUE is used to calculate the COUNT value. Then COUNT_VALUE is assigned to the output port COUNT outside the process.

If statement REMEMBER THIS TYPICAL CONSTRUCTION: The signal COUNT is of the OUT mode so it cannot be read. A temporary signal COUNT_VALUE is used to calculate the COUNT value. Then COUNT_VALUE is assigned to the output port COUNT outside the process.

If statement if (RSTn = '0') then COUNT_VALUE <= 0; elsif (CLK'event and CLK = '1') then if (PL = '1') then COUNT_VALUE <= DATA; elsif (EN = '1') then if (COUNT_VALUE = 31) then COUNT_VALUE <= 0; else COUNT_VALUE <= COUNT_VALUE + 1; R Cl D P E C 30 30 31 Let us observe this counter simulation

If statement

Case statement Case_statement ::= case expression is when choice(s)=> sequence of sequential statements [when choices(s)=> sequence of sequential statements] end case;

Case statement package PACK is type month_type is (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC); end PACK; use work.pack.all; entity CASESTMT is port ( MONTH : in month_type; LEAP : in boolean; DAYS : out integer); end CASESTMT; architecture RTL of CASESTMT is begin p0 : process (LEAP, MONTH) begin case MONTH is when FEB => if LEAP then DAYS <= 29; else DAYS <= 28; when APR JUN SEP NOV => DAYS <= 30; when JUL to AUG => DAYS <= 31; when others => DAYS <= 31; end case; end process; end RTL;

Case statement

Loop statement Loop_statement ::= [loop_label:][ :][while condition for identifier in discrete_range] loop sequence of sequential statements end loop [loop_label];

Loop statement entity LOOPSTMT is end LOOPSTMT; architecture RTL of LOOPSTMT is type arytype is array (0 to 9) of integer; signal A : arytype := (1, 2, 3, 4, 11, 6, 7, 23, 9, 10); signal TOTAL : integer := 0; begin p0 : process (A) variable sum : integer := 0; variable i : integer := 20; begin sum := 0; loop1 : for i in 0 to 9 loop -- notice that i is local in loop1 exit loop1 when A(i) > 20; next when A(i) > 10; sum := sum + A(i); end loop loop1; if i = 20 then TOTAL <= -33; else TOTAL <= sum; end process; end RTL;

Loop statement

Loop statement begin sum := 0; loop1 : for i in 0 to 9 loop exit loop1 when A(i) > 20; next when A(i) > 10; sum := sum + A(i); end loop loop1; if i = 20 then TOTAL <= -33; else TOTAL <= sum; end process; Note: The looping identifier i is not visible outside the loop statement, and the local variable i is not the same as the looping identifier. Variable i is used to assign the signal TOTAL.

Next statement Next_statement ::= next [loop_label][when condition ]; Must be enclosed by a loop statement with the same loop label, and the next statement applies to that loop statement. If the loop label is not specified, it always applies to the innermost level of the loop statements.

Exit statement Exit_statement ::= exit [loop_label][when condition]; Must be enclosed by a loop statement with the same loop label, and the exit applies to that loop statement. If the loop label is not specified, the exit always applies to the innermost level of the loop statements.

Exit statement entity EXITSTMT is end EXITSTMT; architecture BEH of EXITSTMT is type matrix is array (1 to 5, 1 to 4) of integer; constant TABLE : matrix := ( (1, 2, 3, 4), (2, 8, 1, 0), (8, 5, 3, 7), (3, 0, 2, 1), (1, 1, 0, 2) ); begin p0 : process variable NUMROW, ROWSUM : integer := 0; variable ROWDONE, ALLDONE : bit; begin ALLDONE := '0'; outloop : for i in matrix'range(1) loop ROWSUM := 0; ROWDONE := '0'; inloop : for j in matrix'range(2) loop ROWSUM := ROWSUM + TABLE (i, j); if (ROWSUM > 10) then NUMROW := NUMROW + 1; exit outloop when NUMROW = 2; exit; -- get out of inloop wait for 20 ns; end loop inloop;

Exit statement ROWDONE := '1'; wait for 20 ns; end loop outloop; ALLDONE := '1'; wait for 60 ns; end process; end BEH;

Sources VLSI, Ohio University, Starzyk