Hanbat National University Prof. Lee Jaeheung
|
|
- Trevor Bradford
- 5 years ago
- Views:
Transcription
1 Sun, HH yy ee -Se ung Hanbat National University Prof. Lee Jaeheung
2 5.1.1 always, a l w a y s, i n i t i a l, t a s k, f u n c t i o n always always [@(sensitivity_list)] begin blocking_or_nonblocking (s e n s i t i v i t y _ l i s t ) a l w a y s sensitivity_list () (event) a lw a ys b eg in b eg in b lo c k ing no nb lo c k ing 2
3 5.1.1 always module sample(a, b, out); input a, b; output out; reg out; 2 OR or b) begin if(a==1 b==1) out = 1; // blocking else out = 0; // blocking module 5.1 3
4 5.1.1 always module dff(clk, din, qout); input clk, din; output qout; reg qout; clk) qout <= din; // Non-blocking module D 5.2 4
5 5.1.1 always always se n si t i v i t y_ li st ( ) a l w a y s, R T L (@*) / : / :,, // equivalent or b or c or d or f) y =(a & b) (c & d) f; 5
6 5.1.1 always module mux21_bad(a, b, sel, out); input [1:0] a, b; input sel; output [1:0] out; reg [1:0] out; or b) // sel is omitted if(sel ==0) out = a; else out = b; module sel 5.3 6
7 5.1.1 always always zero-d el a y ( i n f i n i t e l oop ) ( d ea d l oc k ) always clk = ~clk; // zero-delay infinite loop always #20 clk = ~clk; // 40ns clk 7
8 5.1.2 initial i n i t i al initial begin blocking_or_nonblocking statements;, initial begin areg = 0; // initialize areg for(index = 0; index < size; index = index + 1) memory[index] = 0; //initialize memory word 8
9 5.1.2 initial initial begin din = 6'b000000; // initialize at time zero #10 din = 6'b011001; // first pattern #10 din = 6'b011011; // second pattern #10 din = 6'b011000; // third pattern #10 din = 6'b001000; // last pattern 9
10 5.1.2 initial module behave; reg a, b; 5.4 initial begin // a = 1'b1; b = 1'b0; always #50 a = ~a; always #100 b = ~b; module 1 0
11 5.2 reg, i n t eg er, t i m e, rea l, rea l t i m e ( ex ec u t e) : (e v e n t ), n e t (d r i v e ) B l oc k i n g = N on b l oc k i n g < = 1 1
12 5.2.1 Blocking B lo c k i n g reg_lvalue = [delay_or_event_operator] expression; initial begin rega = 0; // reg regb[3] = 1; // regc[3:5] = 7; // mema[address] = 8'hff; // {carry, acc} = rega + regb; // 1 2
13 5.2.2 Nonblocking N o n b lo c k i n g b l oc k i n g ( a s s i g n m en t s c h ed u l i n g ), reg_lvalue <= [delay_or_event_operator] expression; 1 3
14 5.2.2 Nonblocking module non_blk1; output out; reg a, b, clk; initial begin a = 0; b = 1; clk = 0; always clk = #5 ~clk; module blk1; output out; reg a, b, clk; initial begin a = 0; b = 1; clk = 0; always clk = #5 ~clk; clk) begin clk) begin a <= b; b <= a; a = b; b = a; // a=1 // b=a=1 module 5.5-(a) module 5.5-(b) 1 4
15 5.2.2 Nonblocking Nonblocking Blocking 1 5
16 5.2.2 Nonblocking module non_block2; reg a, b, c, d, e, f; //blocking assignments with intra-assignment delay initial begin a = #10 1; // a will be assigned 1 at time 10 b = #2 0; // b will be assigned 0 at time 12 c = #4 1; // c will be assigned 1 at time 16 //non-blocking assignments with intra-assignment delay initial begin d <= #10 1; // d will be assigned 1 at time 10 e <= #2 0; // e will be assigned 0 at time 2 f <= #4 1; // f will be assigned 1 at time 4 module
17 5.2.2 Nonblocking module non_block3; reg a, b, c, d, e, f; //blocking assignments with delay initial begin #10 a = 1; // a will be assigned 1 at time 10 #2 b = 0; // b will be assigned 0 at time 12 #4 c = 1; // c will be assigned 1 at time 16 //non-blocking assignments with delay initial begin #10 d <= 1; // d will be assigned 1 at time 10 #2 e <= 0; // e will be assigned 0 at time 12 #4 f <= 1; // f will be assigned 1 at time 16 module 1 7
18 5.2.2 Nonblocking non_block2 non_block3 1 8
19 5.2.2 Nonblocking Nonblocking module multiple2; reg a; 5.7 initial a = 1; initial begin a <= #4 1; // schedules a = 1 at time 4 a <= #4 0; // schedules a = 0 at time 4 #20 $stop; // At time 4, a = 0 module 1 9
20 5.2.2 Nonblocking Nonblocking module multiple; reg r1; reg [2:0] i; 5.8 initial begin r1 = 0; for(i = 0; i <= 5; i = i+1) r1 <= #(i*10) i[0]; module 20
21 5.3 if i f if(expression) statement_true; [else statement_false;] (0 ), s t a t e m e n t _ t r u e (0, x, z ), s t a t e m e n t _ f a l s e e l s e, (l a t c h ) i f (n e s t e d ) (, i f i f ) if else, else if begin 21
22 5.3 if if(index > 0) // IF-1 if(rega > regb) // IF-2 result = rega; else // else of the IF-2 result = regb; if(index > 0) begin // IF-1 if(rega > regb) result = rega; // IF-2 else result = regb; // else of the IF-1 22
23 5.3 if module mux21_if(a, b, sel, out); input [1:0] a, b; input sel; output [1:0] out; reg [1:0] out; or b or sel) if(sel == 1'b0) // if(!sel) out = a; else out = b; module if
24 5.3 if module dff_sr_async(clk, d, rb, sb, q, qb); input clk, d, rb, sb; output q, qb; reg q; clk or negedge rb or negedge sb) begin if(rb==0) q <= 0; else if(sb==0) q <= 1; else q <= d; assign qb = ~q; set/reset D module
25 5.3 if
26 5.4 case case case(expression) case_item {, case_item} : statement_or_null; default [:] statement_or_null; case case case_ i t em 0, 1, x, z c a s e c a s e_ it em case_ i t em d ef au l t d ef au l t case d ef au l t 26
27 5.4 case case 2 1 module mux21_case(a, b, sel, out); input [1:0] a, b; input sel; output [1:0] out; reg [1:0] out; or b or sel) begin case(sel) 0 : out = a; 1 : out = b; case module
28 5.4 case reg [15:0] rega; reg [9:0] result; case begin case(rega) 16'd0: result = 10'b ; 16'd1: result = 10'b ; 16'd2: result = 10'b ; 16'd3: result = 10'b ; 16'd4: result = 10'b ; 16'd5: result = 10'b ; 16'd6: result = 10'b ; 16'd7: result = 10'b ; 16'd8: result = 10'b ; 16'd9: result = 10'b ; default: result = 10'bx; case 28
29 5.4 case case x z case(select[1:2]) 2'b00 : result = 0; 2'b01 : result = flaga; 2'b0x, 2'b0z : result = flaga? 'bx : 0; 2'b10 : result = flagb; 2'bx0, 2'bz0 : result = flagb? 'bx : 0; default : result = 'bx; case case x z case(sig) 1'bz: $display("signal is floating"); 1'bx: $display("signal is unknown"); default: $display("signal is %b", sig); case 29
30 5.4 case don't care cas e casez : z d o n t - c a r e d o n ' t car e? casex : x z d o n t - c a r e reg [7:0] ir; casez(ir) 8'b1???????: instruction1(ir); 8'b01??????: instruction2(ir); 8'b00010???: instruction3(ir); 8'b000001??: instruction4(ir); case 3 0
31 5.4 case module pri_enc_casex(encode, enc); input [3:0] encode; output [1:0] enc; reg [1:0] enc; casex 3 (priority encoder) begin casex(encode) 4'b1xxx : enc = 2'b11; 4'b01xx : enc = 2'b10; 4'b001x : enc = 2'b01; 4'b0001 : enc = 2'b00; case module
32 5.4 case
33 5.4 case module pri_enc_case(encode, enc); input [3:0] encode; output [1:0] enc; reg [1:0] enc; case 3 begin case(1) encode[3]: enc = 2'b11; encode[2]: enc = 2'b10; encode[1]: enc = 2'b01; encode[0]: enc = 2'b00; default : $display("error: One of the bits expected ON"); case module
34 5.5 forever repeat x z 0, while for forever statement; repeat(expression) statement; while(expression) statement; for(variable_assign); expression; variable_assign) statement; 3 4
35 5.5 repeat shift-add module multiplier_8b(opa, opb, result); parameter SIZE = 8, LongSize = 2*SIZE; input [SIZE-1:0] opa, opb; output [LongSize-1:0] result; reg [LongSize-1:0] result, shift_opa, shift_opb; or opb) begin shift_opa = opa; // multiplicand shift_opb = opb; // multiplier result = 0; repeat(size) begin if(shift_opb[0]) result = result + shift_opa; shift_opa = shift_opa << 1; shift_opb = shift_opb >> 1; module
36
37 5.5 module cnt_one(rega, count); input [7:0] rega; output [3:0] count; reg [7:0] temp_reg; reg [3:0] count; 8 rega 1 begin count = 0; temp_reg = rega; while(temp_reg) begin if(temp_reg[0]) count = count + 1; temp_reg = temp_reg >> 1; module
38
39 5.5 for 8 (priority encoder) module enc_for(in, out); input [7:0] in; output [2:0] out; reg [2:0] out; integer i; begin : LOOP out=0; for(i = 7; i >= 0; i = i-1) begin if(in[i]) begin out=i; disable LOOP; module in[7:0] out[2:0] 0000_ _ _ _ _ _ _ _
40
41 5.5 module tb_dff ; reg clk, d; forever dff U1 (clk, d, q); initial begin clk = 1'b0; forever #10 clk = ~clk; initial begin d = 1'b0; forever begin #15 d = 1'b1; #20 d = 1'b0; #30 d = 1'b1; #20 d = 1'b0; module 4 1
42 5.6 : delay operator : # ( ) x z 0 2 u n s i g n ed #10 rega = regb; #d rega = regb; // d is defined as a parameter #((d+e)/2) rega = regb; // delay is average of d and e ev ent ev en t operator ev en t n et ev en t 4 2
43 5.6 negedge 1 0, x, z, x, z 0 ev ent posedge 0 x, z, 1, x, z 1 ev ent ev ent 1, L S B 5.1 posedge negedge event From To 0 1 x z 0 No edge posedge posedge posedge 1 negedge No edge negedge negedge x negedge posedge No edge No edge z negedge posedge No edge No edge 4 3
44 5.6 delay_control ::= # delay_value #( mintypmax_expression ) delay_or_event_control ::= delay_control event_control repeat( expression ) event_control event_control event_expression ::= expression hierarchical_identifier posedge expression negedge expression event_expression or event_expression event_expression, event_expression 4 4
45 5.6 module dff(clk, d, q); input clk, d; output q; reg q; D clk) q <= d; module
46 5.6 named event event event ev ent na m ed event event event event list_of_event_identifiers; // event -> event_identifier; // event trigger 46
47 5.6 named event D module ff_event(clock, reset, din, q); input reset, clock, din; output q; reg q; event upedge; // event clock) -> upedge; or negedge reset) begin if(reset==0) q = 0; else q = din; module
48
49 5.6 event or event o r (, ) clk_a or posedge clk_b or trig) rega = regb; clk_a, posedge clk_b, trig) rega = regb; w a i t w a i t, wait(expression) statement_or_null; begin wait(!enable) #10 a = b; #10 c = d; 49
50 5.6 intra-as s ig nm e nt event, blocking_assignment ::= variable_lvalue = [ delay_or_event_control ] expression nonblocking_assignment ::= variable_lvalue <= [ delay_or_event_control ] expression delay_control ::= # delay_value #( mintypmax_expression ) delay_or_event_control ::= delay_control event_control repeat( expression ) event_control event_control 5 0
51 5.6 fork #5 a = b; #5 b = a; join // result will be a=b fork join a b, fork join race condition a b. fork a = #5 b; // intra-assignment delay b = #5 a; // intra-assignment delay join // data swap a b,, fork join a b 5 1
52 5.6 module fork_join(); reg a, b, c, d; initial begin a = 0; b = 1; c = 0; d = 1; or b or c or d) begin fork #20 a = b; #20 b = a; join fork c = #20 d; d = #20 c; join module 5 2
53 5.6 fork // data shift a clk) b; b clk) c; join a <= clk) data; 5 3
54 5.6 module intra_delay1(clk, d, out); input clk, d; output out; reg out; out = clk) d; module module intra_delay1_eq(clk, d, out); input clk, d; output out; reg out,temp; begin temp = clk) out = temp; module
55
56 Equivalent model of Intra assignment timing control With intra assignment construct a = #5 b; a clk) b; a = clk) b; Without intra assignment construct begin temp = b; #5 a = temp; begin temp = clk) a = temp; begin temp = clk) a = temp; 5 6
57 5.7 b eg i n : : f o r k j o i n : : 5 7
58 5.7 parameter d = 50; reg [7:0] r; begin // a waveform controlled by sequential delay #d r = 8'h35; #d r = 8'hE2; #d r = 8'h00; #d r = 8'hF7; #d -> _wave; //trigger an event called _wave fork join #50 r = 8'h35; #100 r = 8'hE2; #150 r = 8'h00; #200 r = 8'hF7; #250 -> _wave; fork join #250 -> _wave; #200 r = 8'hF7; #150 r = 8'h00; #100 r = 8'hE2; #50 r = 8'h35; 5 8
59 5.7 begin #ta wa = 0; #ta wa = 1; #ta wa = begin #tb wb = 1; #tb wb = 0; #tb wb = 1; join event event 5 9
P-1/P-105. Samir Palnitkar. Prentice-Hall, Inc. INSTRUCTOR : CHING-LUNG SU.
: P-1/P-105 Textbook: Verilog HDL 2 nd. Edition Samir Palnitkar Prentice-Hall, Inc. : INSTRUCTOR : CHING-LUNG SU E-mail: kevinsu@yuntech.edu.tw Chapter 7 P-2/P-105 Chapter 7 Behavioral Modeling Outline
More informationECEN 468 Advanced Digital System Design
ECEN 468 Advanced Digital System Design Lecture 22: Verilog Behavioral Description Structural vs. Behavioral Descriptions module my_module(); assign ; // continuous assignment and (); // instantiation
More informationVerilog Behavioral Modeling
Verilog Behavioral Modeling Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Spring, 2017 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Source:
More informationSynthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis
Synthesis of Language Constructs 1 Nets Nets declared to be input or output ports are retained Internal nets may be eliminated due to logic optimization User may force a net to exist trireg, tri0, tri1
More informationDate Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 11. Introduction to Verilog II Sequential Circuits
Name: Instructor: Engr. Date Performed: Marks Obtained: /10 Group Members (ID):. Checked By: Date: Experiment # 11 Introduction to Verilog II Sequential Circuits OBJECTIVES: To understand the concepts
More informationCourse Topics - Outline
Course Topics - Outline Lecture 1 - Introduction Lecture 2 - Lexical conventions Lecture 3 - Data types Lecture 4 - Operators Lecture 5 - Behavioral modeling A Lecture 6 Behavioral modeling B Lecture 7
More informationAmrita Vishwa Vidyapeetham. EC429 VLSI System Design Answer Key
Time: Two Hours Amrita Vishwa Vidyapeetham B.Tech Second Assessment March 2013 Eighth Semester Electrical and Electronics Engineering EC429 VLSI System Design Answer Key Answer all Questions Roll No: Maximum:
More information14. Introducton to Verilog
14. Introducton to Verilog 1 14. Introducton to Verilog Jacob Abraham Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 October 23, 2017 ECE Department,
More information14. Introducton to Verilog
14. Introducton to Verilog Jacob Abraham Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 October 23, 2017 ECE Department, University of Texas at
More informationEEL 4783: HDL in Digital System Design
EEL 4783: HDL in Digital System Design Lecture 15: Logic Synthesis with Verilog Prof. Mingjie Lin 1 Verilog Synthesis Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for
More informationIntroduction To Verilog Design. Chun-Hung Chou
Introduction To Verilog Design Chun-Hung Chou 1 Outline Typical Design Flow Design Method Lexical Convention Data Type Data Assignment Event Control Conditional Description Register Description Synthesizable
More informationLogic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis
Logic Synthesis Verilog and VHDL started out as simulation languages, but quickly people wrote programs to automatically convert Verilog code into low-level circuit descriptions (netlists). EECS150 - Digital
More informationUnder-Graduate Project Logic Design with Behavioral Models
97-1 1 Under-Graduate Project Logic Design with Behavioral Models Speaker: 吳佳謙 Adviser: Prof. An-Yeu Wu Date: 2008/10/20 ACCESS IC LAB Operation Assignment Outline Blocking and non-blocking Appendix pp.
More informationWhy Should I Learn This Language? VLSI HDL. Verilog-2
Verilog Why Should I Learn This Language? VLSI HDL Verilog-2 Different Levels of Abstraction Algorithmic the function of the system RTL the data flow the control signals the storage element and clock Gate
More informationSynthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1
Verilog Synthesis Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis Spring 2007 Lec #8 -- HW Synthesis 1 Logic Synthesis Verilog and VHDL started out
More informationCSE140L: Components and Design Techniques for Digital Systems Lab
CSE140L: Components and Design Techniques for Digital Systems Lab Tajana Simunic Rosing Source: Vahid, Katz, Culler 1 Announcements & Outline Lab 4 due; demo signup times listed on the cse140l site Check
More informationVLSI Design 13. Introduction to Verilog
Last module: Sequential circuit design Design styles This module Synthesis Brief introduction to Verilog Synthesis in the Design Flow Designer Tasks Tools Architect Logic Designer Circuit Designer Define
More informationCSE140L: Components and Design
CSE140L: Components and Design Techniques for Digital Systems Lab Tajana Simunic Rosing Source: Vahid, Katz, Culler 1 Grade distribution: 70% Labs 35% Lab 4 30% Lab 3 20% Lab 2 15% Lab 1 30% Final exam
More informationEECS150 - Digital Design Lecture 10 Logic Synthesis
EECS150 - Digital Design Lecture 10 Logic Synthesis February 13, 2003 John Wawrzynek Spring 2003 EECS150 Lec8-synthesis Page 1 Logic Synthesis Verilog and VHDL started out as simulation languages, but
More informationEECS150 - Digital Design Lecture 10 Logic Synthesis
EECS150 - Digital Design Lecture 10 Logic Synthesis September 26, 2002 John Wawrzynek Fall 2002 EECS150 Lec10-synthesis Page 1 Logic Synthesis Verilog and VHDL stated out as simulation languages, but quickly
More informationECEN 468 Advanced Logic Design
ECEN 468 Advanced Logic Design Lecture 28: Synthesis of Language Constructs Synthesis of Nets v An explicitly declared net may be eliminated in synthesis v Primary input and output (ports) are always retained
More informationVerilog Nonblocking Assignments with Delays - Myths & Mysteries
Verilog Nonblocking Assignments with Delays - Myths & Mysteries Clifford E. Cummings, Inc. cliffc@sunburst-design.com www.sunburst-design.com 2 of 67 Agenda IEEE 1364 reference model & event queue Review
More informationVerilog Tutorial. Introduction. T. A.: Hsueh-Yi Lin. 2008/3/12 VLSI Digital Signal Processing 2
Verilog Tutorial T. A.: Hsueh-Yi Lin Introduction 2008/3/12 VLSI Digital Signal Processing 2 Verilog: A common language for industry HDL is a common way for hardware design Verilog VHDL Verilog is widely
More informationCMPE 415 Full and Parallel Case
Department of Computer Science and Electrical Engineering CMPE 415 Full and Parallel Case Prof. Ryan Robucci Some examples and discussion are cited from Clifford E. Cummings' "full_case parallel_case",
More informationCombinational Circuit Design
Modeling Combinational Circuits with Verilog Prof. Chien-Nan Liu TEL: 3-42275 ext:34534 Email: jimmy@ee.ncu.edu.tw 3- Combinational Circuit Design Outputs are functions of inputs inputs Combinational Circuit
More informationCourse Topics - Outline
Course Topics - Outline Lecture 1 - Introduction Lecture 2 - Lexical conventions Lecture 3 - Data types Lecture 4 - Operators Lecture 5 - Behavioral modeling A Lecture 6 Behavioral modeling B Lecture 7
More informationAdvanced Verilog Coding
Advanced Verilog Coding 1 Part 1 Behavioral Modeling Structured Procedures 2 structured procedure always basic statements in behavioral modeling Verilog is a concurrent programming language Activity flows
More informationIntroduction to Digital Design with Verilog HDL
Introduction to Digital Design with Verilog HDL Modeling Styles 1 Levels of Abstraction n Behavioral The highest level of abstraction provided by Verilog HDL. A module is implemented in terms of the desired
More informationDepartment of Computer Science and Electrical Engineering. CMPE 415 Verilog Events Timing and Testbenches Prof. Ryan Robucci
Department of Computer Science and Electrical Engineering CMPE 415 Verilog Events Timing and Testbenches Prof. Ryan Robucci An Event Driven Language also used for Synthesis We emphasize use of Verilog
More informationECE 4514 Digital Design II. Spring Behavioral Modeling II: Conditionals and Loops
ECE 4514 Digital Design II Behavioral Modeling II: Conditionals and Loops A Language Lecture Behavioral Modeling so far Procedural statements (lecture 2 and on) Always and Initial constructs Sequential
More informationRIZALAFANDE CHE ISMAIL TKT. 3, BLOK A, PPK MIKRO-e KOMPLEKS PENGAJIAN KUKUM. BEHAVIORAL DESCRIPTIONS IN VERILOG HDL (Chapter 7)
RIZALAFANDE CHE ISMAIL TKT. 3, BLOK A, PPK MIKRO-e KOMPLEKS PENGAJIAN KUKUM BEHAVIORAL DESCRIPTIONS IN VERILOG HDL (Chapter 7) INTRODUCTION Conventional method designers had to design at the gate level
More informationHanbat National University Prof. Lee Jaeheung
Sun, HH yy ee -Se ung Hanbat National University Prof. Lee Jaeheung (Half Adder) 2 a b cout sum 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 a b sum 15_2 cout 1 3 a b cin cout sum 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1
More informationECE 353 Lab 3 (Verilog Design Approach)
ECE 353 Lab 3 (Verilog Design Approach) Prof Daniel Holcomb Recall What You Will Do Design and implement a serial MIDI receiver Hardware in an Altera Complex Programmable Logic Device (CPLD) MAX 7000S
More informationBlocking(=) vs Nonblocking (<=) Assignment. Lecture 3: Modeling Sequential Logic in Verilog HDL. Procedural assignments
Blocking(=) vs Nonblocking (
More informationProblem Set 3 Solutions
Problem Set 3 Solutions ECE 551: Digital System Design and Synthesis Fall 2001 Final Version 1) For each of the following always behaviors: a) Does the given always behavior need a default statement as
More information- 1 of 18 - The Verilog Hardware Description Language - A Behavioural View Overview. The Behavioural Model
The Verilog Hardware Description Language - A Behavioural View Overview In this lesson we will Introduce and explore the Verilog behavioural level model. Introduce the behavioural operators. Study the
More informationModeling Sequential Circuits in Verilog
Modeling Sequential Circuits in Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Presentation Outline Modeling Latches and Flip-Flops Blocking versus
More informationES611 FPGA Based System Design. Behavioral Model
ES611 FPGA Based System Design Behavioral Model Structural procedures Two statements Initial always initial they execute only once always they execute for ever (until simulation finishes) initial block
More informationLab 7 (Sections 300, 301 and 302) Prelab: Introduction to Verilog
Lab 7 (Sections 300, 301 and 302) Prelab: Introduction to Verilog Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work
More informationDigital System Design Verilog-Part III. Amir Masoud Gharehbaghi
Digital System Design Verilog-Part III Amir Masoud Gharehbaghi amgh@mehr.sharif.edu Procedural Blocks initial block always block Place in module body Run concurrently with other module constructs Continuous
More informationChapter 2: Introduction to Verilog
Chapter 2: Introduction to Verilog 2.1 (a) HDL Hardware Description Language FPGA Field Programmable Logic Array (b) Verilog has statements that execute concurrently since it must model real hardware in
More informationLogic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3
Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm Lecture 3 Lecture 3 Topics Covered: Chapter 4 Discuss Sequential logic Verilog Coding Introduce Sequential coding Further review of Combinational Verilog
More informationVerilog Coding Guideline
Verilog Coding Guideline Digital Circuit Lab TA: Po-Chen Wu Outline Introduction to Verilog HDL Verilog Syntax Combinational and Sequential Logics Module Hierarchy Write Your Design Finite State Machine
More informationBehavioral Modeling and Timing Constraints
Lab Workbook Introduction Behavioral modeling was introduced in Lab 1 as one of three widely used modeling styles. Additional capabilities with respect to testbenches were further introduced in Lab 4.
More informationChap 6 Introduction to HDL (d)
Design with Verilog Chap 6 Introduction to HDL (d) Credit to: MD Rizal Othman Faculty of Electrical & Electronics Engineering Universiti Malaysia Pahang Ext: 6036 VERILOG HDL Basic Unit A module Module
More informationLab 7 (All Sections) Prelab: Introduction to Verilog
Lab 7 (All Sections) Prelab: Introduction to Verilog Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work 1 Objective The
More informationECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines
ECE 2300 Digital Logic & Computer Organization Spring 2017 More Verilog Finite State Machines Lecture 8: 1 Announcements 1 st batch of (raw) quiz scores released on CMS Solutions to HW 1-3 released on
More informationAdvanced Digital Design with the Verilog HDL
Copyright 2001, 2003 MD Ciletti 1 Advanced Digital Design with the Verilog HDL M. D. Ciletti Department of Electrical and Computer Engineering University of Colorado Colorado Springs, Colorado ciletti@vlsic.uccs.edu
More informationECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb With material by Professor Moritz and Kundu UMass Amherst Fall 2016
ECE 353 Lab 4 Verilog Review Professor Daniel Holcomb With material by Professor Moritz and Kundu UMass Amherst Fall 2016 Recall What You Will Do Design and implement a serial MIDI receiver Hardware in
More informationRegister Transfer Level Design. Topics. Register Transfer Level Notation. Chapter 8 Steve Oldridge Dr. Sidney Fels. A Circuit is described as:
Register Transfer Level Design Chapter 8 Steve Oldridge Dr. Sidney Fels Topics RTL Notation RTL in HDL Algorithmic State Machines Sequential Binary Multiplier Control Logic HDL Design with Multiplexors
More informationVerilog For Synthesis
Coding with always @(...) Coding with always @(...) always This is separate from the @(...) command. In C procedures are executed when called. In Verilog procedures are executed continuously by default.
More information8 Describing Combinational and Sequential Logic using Verilog HDL
8 Describing Combinational and Sequential Logic using Verilog HDL 8.1 THE DATA-FLOW STYLE OF DESCRIPTION: REVIEW OF THE CONTINUOUS ASSIGNMENT We have already come across numerous examples in the previous
More informationSimple Behavioral Model: the always block
Simple Behavioral Model: the always block always block Always waiting for a change to a trigger signal Then executes the body module and_gate (out, in1, in2); input in1, in2; output out; reg out; always
More informationGraduate Institute of Electronics Engineering, NTU Logic Design with Behavioral Models
Logic Design with Behavioral Models Speaker: Yuan-Chuan Chen( 陳圓覺 ) Professor: Dr. An-Yeu Wu Date: 2006/03/22 ACCESS IC LAB voperation vassignment Outline vblocking and non-blocking vfunction & Task pp.
More informationChapter-5. EE 335 : Advanced Microprocessor. Logic Design with Behavioral Models of Combinational and Sequential Logic
EE 335 : Advanced Microprocessor Chapter-5 Logic Design with Behavioral Models of Combinational and Sequential Logic Ajay Kumar Yadav (Instructor) Electrical & Computer Engineering Temple University Data
More informationDigital Integrated Circuits
Digital Integrated Circuits Lecture 5 Jaeyong Chung System-on-Chips (SoC) Laboratory Incheon National University MULTIPLE initial/always In C (single-threaded), a single statement is being executed at
More informationCS6710 Tool Suite. Verilog is the Key Tool
CS6710 Tool Suite Verilog-XL Behavioral Verilog Your Library Cadence SOC Encounter Synopsys Synthesis Structural Verilog Circuit Layout CSI Verilog-XL AutoRouter Cadence Virtuoso Layout LVS Layout-XL Cadence
More informationIntroduction. Why Use HDL? Simulation output. Explanation
Introduction Verilog HDL is a Hardware Description Language (HDL) HDL is a language used to describe a digital system, for example, a computer or a component of a computer. Most popular HDLs are VHDL and
More informationIntroduction to Verilog/System Verilog
NTUEE DCLAB Feb. 27, 2018 Introduction to Verilog/System Verilog Presenter: Yao-Pin Wang 王耀斌 Advisor: Prof. Chia-Hsiang Yang 楊家驤 Dept. of Electrical Engineering, NTU National Taiwan University What is
More information8-1. Fig. 8-1 ASM Chart Elements 2001 Prentice Hall, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 2e, Updated.
8-1 Name Binary code IDLE 000 Register operation or output R 0 RUN Condition (a) State box (b) Example of state box (c) Decision box IDLE R 0 From decision box START Register operation or output PC 0 (d)
More informationECEN 449 Microprocessor System Design. Verilog. Texas A&M University
ECEN 449 Microprocessor System Design Verilog 1 Objectives of this Lecture Unit Get a feel for the basics of Verilog The focus of this unit will be along two separate e but equally relevant ev axes We
More informationCSE140L: Components and Design Techniques for Digital Systems Lab. Verilog HDL. Instructor: Mohsen Imani UC San Diego. Source: Eric Crabill, Xilinx
CSE140L: Components and Design Techniques for Digital Systems Lab Verilog HDL Instructor: Mohsen Imani UC San Diego Source: Eric Crabill, Xilinx 1 Hardware description languages Used to describe & model
More informationLecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines
Lecture 3 Behavioral Modeling Sequential Circuits Registers Counters Finite State Machines Behavioral Modeling Behavioral Modeling Behavioral descriptions use the keyword always, followed by optional event
More information! ISP (circa 1977) - research project at CMU " Simulation, but no synthesis
Hardware Description Languages: Verilog! Verilog " Structural Models " (Combinational) Behavioral Models " Syntax " Examples Quick History of HDLs! ISP (circa 1977) - research project at CMU " Simulation,
More informationBehavioral Modeling and Timing Constraints
Introduction Behavioral modeling was introduced in Lab 1 as one of three widely used modeling styles. Additional capabilities with respect to testbenches were further introduced in Lab 4. However, there
More informationRegister Transfer Level
Register Transfer Level Something between the logic level and the architecture level A convenient way to describe synchronous sequential systems State diagrams for pros Hierarchy of Designs The design
More informationEECS Components and Design Techniques for Digital Systems. Lec 20 RTL Design Optimization 11/6/2007
EECS 5 - Components and Design Techniques for Digital Systems Lec 2 RTL Design Optimization /6/27 Shauki Elassaad Electrical Engineering and Computer Sciences University of California, Berkeley Slides
More informationVerilog for Synthesis Ing. Pullini Antonio
Verilog for Synthesis Ing. Pullini Antonio antonio.pullini@epfl.ch Outline Introduction to Verilog HDL Describing combinational logic Inference of basic combinational blocks Describing sequential circuits
More informationSequential Logic Blocks
Sequential Logic Blocks Output of sequential blocks depends on present state as well as on past state. Sequential circuits work with a reference which is clock. A clock signal can be of any duty cycle,
More informationVerilog HDL. Gate-Level Modeling
Verilog HDL Verilog is a concurrent programming language unlike C, which is sequential in nature. block - executes once at time 0. If there is more then one block, each execute concurrently always block
More informationyamin/
http://cis.k.hosei.ac.jp/ yamin/ Verilog HDL p.1/76 HDL Verilog HDL IEEE Standard 1364-1995 (Verilog-1995) IEEE Standard 1364-2001 (Verilog-2001) VHDL VHSIC HDL IEEE Standard 1076-1987 AHDL Altera HDL
More information//HDL Example 8-2 //------------------------------------------ //RTL description of design example (Fig.8-9) module Example_RTL (S,CLK,Clr,E,F,A); //Specify inputs and outputs //See block diagram Fig.
More informationVerilog Lecture Gandhi Puvvada, USC always statements, Coding a Flip-Flop. blocking and non-blocking assignments. Copyright 2008 Gandhi Puvvada 1
EE201L and EE560 Verilog Lecture by Gandhi Puvvada, USC always statements, t t Coding a Flip-Flop Counters, Basics of Data Path, blocking and non-blocking assignments Copyright 2008 Gandhi Puvvada 1 always
More informationFile: /home/young/workspace/verilog/flipflop/register.print Page 1 of 8
File: /home/young/workspace/verilog/flipflop/register.print Page 1 of 8 adder4.v module adder4(a, B, Ci, Co, S); input [3:0] A, B; input Ci; output Co; output [3:0] S; wire[3:1] C; fa fa0 (A[0], B[0],
More informationCS6710 Tool Suite. Verilog is the Key Tool. Verilog as HDL (AHT) Verilog has a Split Personality. Quick Review. Synthesis
CS6710 Tool Suite Verilog is the Key Tool Verilog-XL Behavioral Verilog Your Library AutoRouter Cadence SOC Encounter Cadence Virtuoso Layout Synopsys Synthesis Circuit Layout CSI LVS Layout-XL Structural
More informationDigital Design Using Verilog EE Final Examination
Name Digital Design Using Verilog EE 4702-1 Final Examination 8 May 2000, 7:30 9:30 CDT Alias Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Exam Total (100 pts) Good Luck! Problem 1: The modules below
More informationECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb UMass Amherst Fall 2017
ECE 353 Lab 4 Verilog Review Professor Daniel Holcomb UMass Amherst Fall 2017 What You Will Do In Lab 4 Design and implement a serial MIDI receiver Hardware in an Altera Complex Programmable Logic Device
More informationChapter 2 Using Hardware Description Language Verilog. Overview
Chapter 2 Using Hardware Description Language Verilog CSE4210 Winter 2012 Mokhtar Aboelaze based on slides by Dr. Shoab A. Khan Overview Algorithm development isa usually done in MATLAB, C, or C++ Code
More informationXilinx ASMBL Architecture
FPGA Structure Xilinx ASMBL Architecture Design Flow Synthesis: HDL to FPGA primitives Translate: FPGA Primitives to FPGA Slice components Map: Packing of Slice components into Slices, placement of Slices
More informationECEN 449 Microprocessor System Design. Verilog. Texas A&M University
ECEN 449 Microprocessor System Design Verilog 1 Objectives of this Lecture Unit Get a feel for the basics of Verilog The focus of this unit will be along two separate but equally relevant axes We will
More informationEECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis
EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis Jan 31, 2012 John Wawrzynek Spring 2012 EECS150 - Lec05-verilog_synth Page 1 Outline Quick review of essentials of state elements Finite State
More informationCSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008
CSE 140L Final Exam Prof. Tajana Simunic Rosing Spring 2008 NAME: ID#: Do not start the exam until you are told to. Turn off any cell phones or pagers. Write your name and PID at the top of every page.
More informationFSM and Efficient Synthesizable FSM Design using Verilog
FSM and Efficient Synthesizable FSM Design using Verilog Introduction There are many ways to code FSMs including many very poor ways to code FSMs. This lecture offers guidelines for doing efficient coding,
More informationECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines
ECE 2300 Digital Logic & Computer Organization Spring 2018 More Verilog Finite Machines Lecture 8: 1 Prelim 1, Thursday 3/1, 1:25pm, 75 mins Arrive early by 1:20pm Review sessions Announcements Monday
More informationVerilog Overview. Verilog Overview. Simple Example. Simple Example. Simple Example. Simple Example
Verilog Overview Prof. MacDonald Verilog Overview C-Like Language used to describe hardware VHDL is main competitor VHDL is more rigorous and typed VHDL takes longer to write VHDL is used by 5% of USA
More informationVERILOG. Deepjyoti Borah, Diwahar Jawahar
VERILOG Deepjyoti Borah, Diwahar Jawahar Outline 1. Motivation 2. Basic Syntax 3. Sequential and Parallel Blocks 4. Conditions and Loops in Verilog 5. Procedural Assignment 6. Timing controls 7. Combinatorial
More informationECEN : Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Homework #1 Solutions
ECEN 449 749: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University Homework #1 Solutions Upload your homework solution to ecampus as a single pdf file. Your
More informationComputer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog
Verilog Radek Pelánek and Šimon Řeřucha Contents 1 Computer Aided Design 2 Basic Syntax 3 Gate Level Modeling 4 Behavioral Modeling Computer Aided Design Hardware Description Languages (HDL) Verilog C
More information271/469 Verilog Tutorial
271/469 Verilog Tutorial Prof. Scott Hauck, last revised 8/14/17 Introduction The following tutorial is inted to get you going quickly in circuit design in Verilog. It isn t a comprehensive guide to System
More informationContents of Verilog Reference Guide
Contents of Verilog Reference Guide Contents of Verilog Reference Guide 1 Always Procedural Block 3 Arithmetic Operators 5 Array 7 Bit-Select 9 Bit-wise Operators 10 Block Statement 12 Blocking Assignment
More informationVerilog introduction. Embedded and Ambient Systems Lab
Verilog introduction Embedded and Ambient Systems Lab Purpose of HDL languages Modeling hardware behavior Large part of these languages can only be used for simulation, not for hardware generation (synthesis)
More informationVerilog HDL:Digital Design and Modeling. Chapter 11. Additional Design Examples
Chapter 11 Additional Design Examples 1 Verilog HDL:Digital Design and Modeling Chapter 11 Additional Design Examples Chapter 11 Additional Design Examples 2 Page 604 //structural 3-bit johnson counter
More informationECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog
ECE 2300 Digital Logic & Computer Organization Spring 2018 More Sequential Logic Verilog Lecture 7: 1 Announcements HW3 will be posted tonight Prelim 1 Thursday March 1, in class Coverage: Lectures 1~7
More informationVerilog Tutorial for ECE260B
Verilog Tutorial for ECE260B Prof. Andrew B. Kahng TAs: Sherief Reda, Swamy Muddu 18 January 2004 References: 1. Application Specific Integrated Circuits, Michael Smith 2. Verilog Digital Computer Design,
More informationCSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008
CSE 140L Final Exam Prof. Tajana Simunic Rosing Spring 2008 Do not start the exam until you are told to. Turn off any cell phones or pagers. Write your name and PID at the top of every page. Do not separate
More informationDigital Integrated Circuits
Digital Integrated Circuits Lecture 4 Jaeyong Chung System-on-Chips (SoC) Laboratory Incheon National University BCD TO EXCESS-3 CODE CONVERTER 0100 0101 +0011 +0011 0111 1000 LSB received first Chung
More information271/471 Verilog Tutorial
271/471 Verilog Tutorial Prof. Scott Hauck, last revised 9/15/14 Introduction The following tutorial is inted to get you going quickly in circuit design in Verilog. It isn t a comprehensive guide to System
More informationCAD for VLSI Design - I. Lecture 21 V. Kamakoti and Shankar Balachandran
CAD for VLSI Design - I Lecture 21 V. Kamakoti and Shankar Balachandran Overview of this Lecture Understanding the process of Logic synthesis Logic Synthesis of HDL constructs Logic Synthesis What is this?
More informationProblem Set 2 Solutions
Problem Set 2 Solutions ECE 551: Digital System Design and Synthesis Fall 2001 1. A tabular description and a known good behavioral specification is given for a priority encoder. x indicates don t care
More informationLecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems
EE 3610: Digital Systems 1 Lecture 4: Modeling in VHDL (Continued ) Sequential Statements Use Process process (sensitivity list) variable/constant declarations Sequential Statements end process; 2 Sequential
More information