1 Statements. 2 Statements - 강의순서 ▣ 병행 (Concurrent) Statement ◈ Concurrent Signal Assignment, Simple ◈ Concurrent Signal Assignment, Conditional ◈ Concurrent.

Slides:



Advertisements
Similar presentations
Chapter 15:Introduction to Verilog Testbenches Objectives In this section,you will learn about designing a testbench: Creating clocks Including files Strategic.
Advertisements

VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 7 Khurram Kazi.
Synchronous Sequential Logic
Combinational Logic.
2/16/09 Lab 3 Jorge Crichigno. 2/16/09 Half-adder.
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
Hardware Description Language (HDL)
Sequential Statements
9/18/08 Lab 2 - Solution TA: Jorge. 9/18/08 Half-adder.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Sequential Statements Module F3.2. Sequential Statements Statements executed sequentially within a process If Statements Case Statements Loop Statements.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 2 Microcomputer Systems Design (Embedded Systems)
CS Data Structures Appendix 1 How to transfer a simple loop- expression to a recursive function (factorial calculation)
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
Verilog HDL (Behavioral Modeling) Bilal Saqib. Behavioral Modeling.
Basic Building Blocks of Programming. Variables and Assignment Think of a variable as an empty container Assignment symbol (=) means putting a value into.
Question What to do if there are two drivers for a signal occuring in various moments of time?
each of these is an instantiation of “full_adder”
Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1.
1 Data Object Object Types A VHDL object consists of one of the following: –Signal, Which represents interconnection wires that connect component instantiation.
The foreach LooptMyn1 The foreach Loop The foreach loop gives an easy way to iterate over arrays. foreach works only on arrays, and will issue an error.
Modeling styles: 1. Structural Modeling: As a set of interconnected components (to represent structure), 2. Dataflow Modeling: As a set of concurrent assignment.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 4: Modeling Dataflow.
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior: initial blocks execute.
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
Chapter 4: Behavioral Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 4-1 Ders – 4: Davranışsal Modelleme.
Java ProgrammingtMyn1 Java Programming Timo Mynttinen Mikkeli University of Applied Sciences.
Sequential Statements
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
2-Jun-16EE5141 Chapter 3 ä The concept of the signal ä Process concurrency ä Delta time ä Concurrent and sequential statements ä Process activation by.
Timing Model VHDL uses the following simulation cycle to model the stimulus and response nature of digital hardware Start Simulation Update Signals Execute.
ITEC 109 Lecture 11 While loops. while loops Review Choices –1 st –2 nd to ?th –Last What happens if you only use ifs? Can you have just an else by itself?
VHDL – Behavioral Modeling and Registered Elements ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Latches and Flip-Flops
Relational Operators Result is boolean: greater than (>) less than (=) less than or equal to (
RTL Hardware Design Chapter Combinational versus sequential circuit 2. Simple signal assignment statement 3. Conditional signal assignment statement.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
Interacting Finite State Machine Design Shaun Murphy.
Lecture #12 Page 1 ECE 4110– Digital Logic Design Lecture #12 Agenda 1.VHDL : Behavioral Design (Processes) Announcements 1.n/a.
TOPIC : SEQUENTIAL AND PARALLEL BLOCKS Module 2.3 : Behavioral modeling in verilog.
Web Design. How to link the robot How to turn on the robot Sec Getting Started What is python Programming in python How to move the robot How to.
ECE 4110–5110 Digital System Design
ECE 4110–5110 Digital System Design
Think What will be the output?
Sequential Design.
ASSIGNMENT NO.-2.
Control Structures in VB
Programming Misconceptions
Sequential Statements
Instructions to get MAX PLUS running
الفصل الثاني الخوارزمية
Chapter 4: Behavioral Modeling
Advanced FPGA Based System Design
VHDL Programming (08 Marks)
Timing & Concurrency II
Control Structures in VB
Signal Conditioning.
Software Engineering Lecture #29
Timing & Concurrency II
Timing & Concurrency II
Cases. Simple Regression Linear Multiple Regression.
CS561 Computer Architecture Hye Yeon Kim
4-Input Gates VHDL for Loops
AX 2012 Development Training
Digital Design with VHDL
Presentation transcript:

1 Statements

2 Statements - 강의순서 ▣ 병행 (Concurrent) Statement ◈ Concurrent Signal Assignment, Simple ◈ Concurrent Signal Assignment, Conditional ◈ Concurrent Signal Assignment, Selected ◈ Process Statement ▣ 순차 (Sequential Statements) ◈ Variable Assignment & Signal Assignment Statement ◈ Wait Statement ◈ If Statement ◈ Case Statement ◈ For Loop Statement

3 Concurrent - Signal Assignment, Simple signal_name <= expression; 1) b 에 변화가 생길 때마다 b 의 값이 y 에 출력됨 2) Sensitivity List : b y <= b; y <= a or b; 1) a 나 b 에 변화가 생길 때마다 a or b 의 값이 y 에 출력됨. 2) Sensitivity List : a,b ◈ 실습 34 : 4bit parallel binary adder(pp.521)

4 Concurrent - Signal Assignment, Conditional signal <= expression1 WHEN boolean_expression1 ELSE expression2 WHEN boolean_expression2 ELSE expression3; 1) boolean_expression1= 참 (True) 이면 signal <= expression1 이 실행되며, 2) boolean_expression2= 참 (True) 이면 signal <= expression2 이 실행되며, 3) 위의 2 가지 조건이 모두 성립하지않으면 signal <= expression3 이 실행된다. ◈ 실습 35 : Priority Encoder(pp.523)

5 Concurrent - Signal Assignment, Selected WITH expression SELECT signal <= expression1 WHEN constant_value1, expression2 WHEN constant_value2, expression3 WHEN constant_value3; 1) expression = constant_value1 이면 signal <= expression1 이 실행되며, 2) expresion1 = constant_value2 이면 signal <= expression2 이 실행되며, 3) expresion1 = constant_value3 이면 signal <= expression3 이 실행된다. ◈ 실습 37 : Decoder(pp.528)

6 Concurrent – Process Statement ▣ Process 문은 하드웨어 모듈을 기술. ▣ Process 문의 내부는 순차처리. ▣ 복잡한 알고리즘의 구현 시 편리 ◈ Declaration syntax : [Label:]process [( Sensitivity List)] begin Sequential statements; end process [Label];  Sensitivity List 에 적혀있는 신호에 변화생길 때 begin 과 end process 내의 문장을 실행

7 Sequential – Variable & signal assignment statements target_signal <= expression [ after time] signal y1, y2 : std_logic; signal x : std_logic; ~ process(a, b, c, x) begin x <= a; y1 <= b and x; x <= c; y2 <= b or x; end process; end behav; target variable := expression; signal y1, y2 : std_logic; ~ process(a, b, c) variable x : std_logic; begin x := a; y1 <= b and x; x := c; y2 <= b or x; end process; end behav; ◈ 실습 25 : 4bit magnitude comparator(pp.481) ◈ 실습 26 : decoder(pp.483)

8 Sequential – Wait Statement wait on signal [, signal] wait until boolean_expression wait for time_expression (1) wait on a, b; (2) wait until ( x < 100 ); (3) wait for 10 ns; (1)a,b 에 변화가 생길 때까지 기다린다. (2)X<100 일 때까지 기다린다. (3)10ns 동안 기다린다. Suspends the sequential execution of a process or subprogram ◈ 실습 24 : D f/f with reset input (pp.478)

9 Sequential – Wait on vs. explicit sensitivity list wait on statement process begin y <= a and b; wait on a, b; end process; explicit sensitivity list process (a, b) begin y <= a and b; end process;  Process 문을 사용하는 두가지 방식 : 모두 가능함.

10 Sequential – IF Statement IF expression1 THEN statement1-1; statement1-2; ELSIF expression2 THEN statement2-1; statement2-2; ELSE statement3-1; statement3-2; END IF; 1) expression1 = 참 (True) 이면 statement1-1, state1-2 가 실행, 2) expression2 = 참 (True) 이면 statement2-1, state2-2 가 실행, 3) 위의 2 가지 조건 모두 성립하지않으면 statement3-1, state3-2 가 실행, ◈ 실습 28 : 4X1 Mux (pp.496)

11 Sequential – Case Statement CASE expression IS WHEN constant_value1 => statement1-1; statement1-2; WHEN constant_value2 => statement2-1; statement2-2; WHEN OTHERS => statement3-1; statement3-2; END CASE; 1) expression1 = constant_value1 이면 statement1-1, state1-2 가 실행, 2) expression1 = constant_value1 이면 statement2-1, state2-2 가 실행, 3) 위의 2 가지 조건 모두 성립하지않으면 statement3-1, state3-2 가 실행, ◈ 실습 31 : Encoder (pp.505)

12 Sequential – For Statement loop_label: FOR index_variable IN range LOOP statement1; statement2; END LOOP loop_label; index_variable 의 값을 변해가 면서 statement1, statement2 를 반복적으로 실행. 아래의 (a), (b) 는 모두 같은 표 현임. Range 는 downto, to 의 2 가지 형태임. loop_Start: FOR i IN 0 to 3 LOOP y(i) <= a(i) and b(i); END LOOP loop_Start; (a) y(0) <= a(0) and b(0); y(1) <= a(1) and b(1); y(2) <= a(2) and b(2); y(3) <= a(3) and b(3); (b) ◈ 실습 32 : n-input NAND gate (pp.510)