AN INTRODUCTION TO VERILOG HDL
|
|
- David Joseph
- 6 years ago
- Views:
Transcription
1 AN INTRODUCTION TO VERILOG HDL Departamento de Tecnología Electrónica Universidad de Sevilla Rev.7 (feb 2013)
2 Index Introducction Part I: combinational circuits Part II: sequential circuits 2
3 Introducción Verilog is a formal language for describing and implementing electronic circuits. It can be similar to an imperative programming language Differences: Often, sentences are executed concurrently It is used for describing hardware 3
4 Bibliography & references Online: Verilog-1995 Quick Reference Guide by Stuart Sutherland of Sutherland HDL, Inc., Portland, Oregon, USA at Verilog Tutorial: Verilog HDL Quick Reference Guide (Verilog-2001 standard) 4
5 Part I Combinational circuits 5
6 Part I: Index Sections of a Verilog description Description styles Signals, I/O ports and arrays Sintax 6
7 Sections of a Verilog description module mi_circuito ( input x, y, input z, output f1, f2 ); wire cable_interno; reg variable_a; endmodule This is the header. It is used to name the module and to to declare its inputs and outputs. Here we declare the signals and variables to be used internally within the module. Here we declare the module. We have several description styles to choose from. 7
8 Example: a voting circuit a b votador z Logic expression: z=ab+ac+bc c module votador (input a,b,c,output z); assign z= (a & b) (a & c) (b & c); endmodule 8
9 Description styles Functional description It is used to model combinational circuits. By using the assign keyword it is stated that the value of a digital signal is a logic function of other signals. Assign sentences are executed concurrently. module votador(input a,b,c, output z); assign z = a&b a&c b&c; endmodule 9
10 Description styles Procedural description We can use control statements here to describe an algorithm. It is usefull for describing complex functions. It is just an always sentence followed by an imperative sentence. module votador( input a,b,c, output reg z) if(a==1) if(b==1 c==1) z=1; else z=0; else if(b==1 && c==1) z=1; else z=0; endmodule 10
11 Description styles Structural description Here we list the internal components of the module and their interconnections. These components must be previously described, but basic logic gates are predefined in Verilog. It is usefull for describing component interconnections. a b c and1 and3 and2 module votador( input a,b,c, output z) out3 out1 or1 out2 wire out1,out2,out3; and and1(out1,a,b); and and2(out2,b,c); and and3(out3,a,c); or or1(z,out1,out2,out3); z endmodule 11
12 Description styles assign and always sentences are executed concurrently. Structural description is used to describe the interconnection of the declared components. Descriptions using structural style can form a hierachy. 12
13 Description styles Example: describing a 4-bit full-adder made of several 1-bit full-adders b3 b2 b1 b0 a3 a2 a1 a0 cout4 FA 4bits cin s3 s2 s1 s0 a3 b3 a2 b2 a1 b1 a0 b0 cout4 FA3 cout3 FA2 cout2 FA1 cout1 FA0 cin s3 s2 s1 s0 13
14 Description styles Steps: 1. Describe the module for the 1-bit full-adders. 2. Describe the module for the 4-bit full-adder by instantiating four 1-bit full-adders and describing their interconnections. 14
15 Description styles a b Description of the 1-bit full-adder cout FA cin module fulladder( input a, input b, input cin, output s, output cout); assign s = a ^ b ^ cin; assign cout = a & b a & cin b & cin; endmodule cin a b cout s s s=a b c cout=a b + a cin + b cin 15
16 Description styles Connecting the full-adders: positional connection. a3 b3 a2 b2 a1 b1 a0 b0 module fulladder4( input [3:0] a, input [3:0] b, input cin, output [3:0] s, output cout4); cout4 FA3 s3 cout3 FA2 s2 cout2 FA1 s1 cout1 FA0 s0 cin wire cout1,cout2,cout3; fulladder fa0 (a[0], b[0], cin, s[0], cout1); fulladder fa1 (a[1], b[1], cout1, s[1], cout2); fulladder fa2 (a[2], b[2], cout2, s[2], cout3); fulladder fa3 (a[3], b[3], cout3, s[3], cout4); endmodule 16
17 Description styles Connecting the full-adders: named connection. a3 b3 a2 b2 a1 b1 a0 b0 module fulladder4( input [3:0] a, input [3:0] b, input cin, output [3:0] s, output cout4); cout4 FA3 s3 cout3 FA2 s2 cout2 FA1 s1 cout1 FA0 s0 cin wire cout1,cout2,cout3; fulladder fa0 (.a(a[0]),.b(b[0]),.cin(cin),.s(s[0]),.cout(cout1)); fulladder fa1 (.a(a[1]),.b(b[1]),.cin(cout1),.s(s[1]),.cout(cout2)); fulladder fa2 (.a(a[2]),.b(b[2]),.cin(cout2),.s(s[2]),.cout(cout3)); fulladder fa3 (.a(a[3]),.b(b[3]),.cin(cout3),.s(s[3]),.cout(cout4)); endmodule 17
18 Signal types You can declare signals of two types wire: physical nets interconnecting componentes. They have no memory. reg: (variable). Mainly used to store values within procedural descriptions. They do have memory. reg signals are usually used to model data storing (memories) but any signal assigned within an always statement must be declared as reg even if it just a wire. 18
19 Input/Output ports When declaring a module you can specify if its ports are wire or reg wire is assumed by default if not specified otherwise The left part of an assign sentence can only be a wire signal. Only reg signals can be assigned within procedures. module mi_circuito ( input wire x, input z, output reg mem );... endmodule 19
20 Arrays signal arrays can be very usefull: It is easier to handle I/O ports if you group them into buses. You can handle registers of multiple bits. Sintax: [M:N] A3 A2 A1 A0 B3 B2 B1 B0 COMPARADOR GEL G E L module comparador_gel ( input wire [3:0] a, input [3:0] b, output g,e,l );... endmodule 20
21 Sintax Literals Assign sentences Always sentences Operators and expressions Conditional sentences 21
22 Sintax Verilog is case sensitive You can write comments: One line comments: preceded by double slash // wire a; // Este cable se conecta con f2 Multi line comments: between /* and */ /* Este cable conecta muchos componentes y necesito varias lineas para explicarlo correctamente */ wire a; 22
23 Sintax Literals: You can use several formats Example: The 8-bit word BINARY OCTAL HEXADECIMAL DECIMAL 8'b 'o052 8'h2A 8'd42 ó 42 Number of bits base (b,o,h,d) 23
24 Sintax Example: a circuit whose outputs are always set to 1 module siempre_uno ( input x, output [7:0] salida1, output [3:0] salida2 ); assign salida2 = 4'b1111; assign salida1 = 8'hFF; endmodule 24
25 Assign sentences assign sentences are executed concurrently You can change the second assign sentence on the right by the following: assign f2 = x & y & z; module otro_ejemplo ( input x, y, z, output f1, f2 ); assign f1 = x & y; assign f2 = f1 & z; endmodule 25
26 Always sentences Any always sentence is executed concurrently with other always and assign sentences. An always sentence includes a sensitivity list : La lista de sensibilidad consiste en una lista de señales. El código del bloque always se ejecuta sólo si cambia alguna de las señales de la lista de sensibilidad. La sintaxis es: c = a b; 26
27 Always sentences If you want a set of sentences to be executed sequentially you can write them within a beginend statement. module (input a, b, c, d output reg f1, output reg f2); begin f1 = a b; f2 = c & d; end endmodule 27
28 WARNING: Always sentences When describing combinational components every input must be included in the sensitivity list. You can write for short. module (input a, b, c, d, input e, f, g, h, output f1, f2); begin... end endmodule = module (input a, b, c, d, input e, f, g, h, output f1, f2); begin... end endmodule 28
29 Operators Bitwise operators: Operator Example & c = a&b; // AND operation c = a b; // OR operation ^ c = a^b; // XOR operation ~ b = ~a; // NOT operation You can use them with individual bits and arrays. 29
30 Operators More bitwise operators: Operator ~& Example d = a ~& b; // NAND operation ~ d = a ~ b; // NOR operation ~^ d = a ~^ b; // NEXOR operation 30
31 Operators Example: A module for calculating the ones' complement of a 16-bit word module complemento_a1( input [15:0] palabra, output [15:0] complemento_1); assign complemento_1 = ~palabra; endmodule 31
32 Operators relational operators: Operator Example < a < b; // Is a lower than b? > a > b; // Is a greater than b? >= a >= b; // Is a greater than or equal to b? <= a <= b; // Is a lower than or equal to b? == a == b; // Is a equal to b?!= a!= b; // Is a different from b? 32
33 Operators Logical operators: they are not the same as the bitwise operators. Operator && Example a && b; // logic and operator a b; // logic or operator!!a; // logic not operator 33
34 Operators Arithmetic operators Operator Example * c = a * b; // multiplication / c = a / b; // division + sum = a + b; // addition - resta = a - b; // subtraction 34
35 Other operators Operators operator Example << b = a << 1; // 1-bit left shift >> b = a >> 1; // 1-bit right shift?: c = sel? a : b; // if c is true then c=a // otherwise c =b {} {a, b, c} = 3'b101; // concatenanion: // a=1, b=0 y c=1 There are more operators (see the bibliography) 35
36 Conditional sentences if else sentence if ( a > 0 ) Sentencia else Sentencia if ( a == 0 ) Sentencia else if( b!= 1 ) Sentencia You can only use it within always statements You can write the condition using logical and relational operators 36
37 Conditional sentences If you want more than one sentence to be executed when the condition is true you must group them within a begin end sentence. begin if ( a > 0 ) f1 = 1; f2 = 1; else f1 = 0; end WRONG begin if ( a > 0 ) begin f1 = 1; f2 = 1; end else f1 = 0; end OK 37
38 Conditional sentences Example: a GEL comparator module comparador_gel( input [3:0] a, input [3:0] b, output g, // si a < b => (g,e,l) = (0,0,1) output e, // si a = b => (g,e,l) = (0,1,0) output l); A3 A2 A1 A0 B3 B2 B1 B0 COMPARADOR GEL G E L reg g, e, l; b) begin g = 0; e = 0; l = 0; if (a > b) g =1; else if (a < b) l = 1; else e = 1; end endmodule 38
39 Conditional sentences Case sentence You can only use it within always statements. If you want more than one sentence to be executed for one case you must group them within a begin end sentence. You can use the default keyword to take into account the values not explicitly mentioned. reg [1:0] x; begin case(x) 0: salida_1 = 1; 1: begin salida_1 = 1; salida_2 = 0; end 2: salida_2 = 1; 3: salida_1 = 0; endcase end 39
40 Conditional sentences Example: a multiplexer module mux8_1( input [2:0] s, input [7:0] in, output out); in0 in1 in2 in3 in4 in5 in6 in7 s2 s1 s0 out reg out; in) case (s) 3'h0: out = in[0]; 3'h1: out = in[1]; 3'h2: out = in[2]; 3'h3: out = in[3]; 3'h4: out = in[4]; 3'h5: out = in[5]; 3'h6: out = in[6]; default: out = in[7]; endcase endmodule 40
41 Part II Sequential Circuits 41
42 Part II: Index Sintax II Bistables Finite State Machines Registers Counters 42
43 Sintax II Constant definitions Concatenation operator Edge detection blocking/non blocking assignments 43
44 Sintax II You can define constants within a module by using the parameter keyword. It is useful for describing state machines. Example: parameter uno_con_tres_bits = 3'b001, ultimo = 3'b111; reg [2:0] a; a = ultimo; 44
45 Sintax II You can group signals to form an array by using the concatenation operator Sintax: {signal, signal,...} Example: Circuit to detect number 3 module concatena( input a,b,c, output reg igual_a_3 ); case({a,b,c}) 3'b011: igual_a_3 = 1; default: igual_a_3 = 0; endcase endmodule 45
46 Sintax II Edge detection You can use edge detection if you want a process to be executed only if some of the signals in the sensitive list rise (or fall). To do so you must use the following prefixes in the sensitive list: - posedge for detecting rising edges - negedge for detecting falling edges 46
47 Sintax II Example: module detector_flanco( input clk, output reg z); clk)... endmodule 47
48 Sintax II Blocking assignment: = When executed the new value is assumed immediately. It is useful for modeling combinational outputs. Multiple blocking assignments within the same always statement can only execute sequentially so their order is relevant. 48
49 Sintax II Non blocking assignment: <= It is useful for modeling register writing. When multiple blocking assignments within an always statement are executed, every right part is evaluated first. Afterwards the assignments are executed simultaneously. So, their order is not relevant. 49
50 Sintax II module no_bloqueante(input a,clk, output reg z1); reg q; clk) begin q <= a; z1 <= q; end endmodule module bloqueante(input a,clk, output reg z2); reg q; clk) begin q = a; z2 = q; end endmodule clk a z1 z2 50
51 Bistables Example: D q module biestable_d( input clk,d, output reg q); (posedge clk) q <= d; clk endmodule clk d q 51
52 Bistables Triggered by falling edge: q D ck module biestable_d( input ck,d, output reg q); (negedge ck) q <= d; endmodule ck d q 52
53 Bistables asynchronous reset: module biestable_d( input ck,d,reset, output reg q); D RESET q (posedge ck or posedge reset) if (reset) q <= 1'b0; else q <= d; endmodule ck ck d reset q 53
54 Bistables synchronous reset: clk d reset q module biestable_d( input clk,d,reset, output reg q); (posedge clk) if (reset) q <= 1'b0; else q <= d; endmodule 54
55 Bistables JK bistable: module jk_flip_flop ( J q input ck, input j, input k, output reg q); JK q 0 1 K ck Q ck) case ({j,k}) 2'b11 : q <= ~q; // Cambio 2'b01 : q <= 1'b0; // reset. 2'b10 : q <= 1'b1; // set. 2'b00 : q <= q; // endcase endmodule 55
56 Bistables T bistable: q T ck T=1 T=0 T=0 q=0 q=1 module biestable_t( input ck, input t, output reg q); ck) if (t == 1) q <= ~q; endmodule T=1 56
57 Bistables practice: Describe the following bistables. CL and PR must be asynchronous. CL PR CL PR CL PR CL PR S q J q D q T q R ck K ck ck ck 57
58 State machines 1/0 A 0/0 0/0 1/1 1/0 B 1/0 D 0/0 C 0/0 We will describe them by using two process: One will assign values to the state registers. The other will calculate the outputs and the next state of the machine. 58
59 State machines module mi_diagrama_de_estados( input YOUR_LIST_OF_INPUTS_HERE, output reg YOUR_LIST_OF_OUTPUTS_HERE); // DEFINICION Y ASIGNACIÓN DE ESTADOS parameter YOUR_LIST_OF_STATES_HERE // VARIABLES PARA ALMACENAR EL ESTADO PRESENTE Y SIGUIENTE reg [N:0] current_state, next_state; // PROCESO DE CAMBIO DE ESTADO clk or posedge reset)... // PROCESO SIGUIENTE ESTADO Y SALIDA YOUR_LIST_OF_INPUTS_HERE)... endmodule 59
60 State machines Our description will have four parts: 1. The first one will be used for naming and assigning binary codes to every state of the machine. 2. In the second one the state registers will be declared. There must be one for each bit of the state codes. 3. The third one will be the process assigning values to the state registers. Its code is always the same. 4. The last one will be the process calculating the next state codes and the outputs of the sequential circuit. Its behaviour is described by the state graph. 60
61 State machines module maquina_estados( input x, clk, reset, output reg z); 1/0 B 1/0 0/0 parameter A = 2'b00, B = 2'b01, C = 2'b10, D = 2'b11; State codes assignment reg [1:0] current_state,next_state; 0/0 A 1/1 1/0 C clk, posedge reset) begin if(reset) current_state <= A; else current_state <= next_state; end To be continued -> 0/0 D process assigning values to the state registers 0/0 61
62 State machines the process calculating the next state codes and the outputs of the sequential circuit can be describe with a single case statement. Every state must be taken into account. It is recommended to assign a default value to each output before the case statement. 62
63 State machines begin z = 0; case(current_state) A: if(x == 1) next_state = B; else next_state = A; B: if(x == 1) next_state = B; else next_state = C; The output is set to zero by default state A state B 0/0 1/0 A 0/0 1/1 B D 1/0 1/0 0/0 C 0/0 63
64 State machines C: if(x == 1) next_state = B; else next_state = D; D: if(x == 1) begin z = 1; next_state = B; end else next_state = A; endcase end endmodule state C state D 0/0 1/0 A 0/0 1/1 B D 1/0 1/0 0/0 C 0/0 64
65 Registers Register with clear and parallel load operations C L LD C K x 3 x 2 x 1 x 0 REG z 3 z 2 z 1 z 0 CL, LD Operation Type 0x q 0 async. 11 q x sync. 10 q q sync. module registro( input ck, input cl, input ld, input [3:0] x, output [3:0] z ); reg [3:0] q; ck, negedge cl) if (cl == 0) q <= 0; else if (ld == 1) q <= x; assign z = q; endmodule 65
66 Registers Shift register C L E N C K REG x L module reg_shl( input ck, input cl, input en, input xl, output zl ); reg [3:0] q; z L CL, EN Operation Type 0x q 0 async. 11 q SHL(q) sync. 10 q q sync. ck, negedge cl) if (cl == 0) q <= 0; else if (en == 1) q <= {q[2:0], xl}; assign zl = q[3]; endmodule 66
67 Counters counter with clear operation: C L C K COUNT z 3 z 2 z 1 z 0 CL Operation Type 1 q 0 async. 0 q q+1 mod 16 sync. module count_mod16( input ck, input cl, output [3:0] z); reg [3:0] q; ck, posedge cl) if (cl == 1) q <= 0; else q <= q + 1; assign z = q; endmodule 67
68 Counters Up/Down counter with clear operation: C L E N U D C K COUNT z 3 z 2 z 1 z 0 CL, EN, UD Operation Type 1xx q 0 async. 00x q q sync. 010 q q+1 mod 16 sync. 011 q q-1 mod 16 sync. C module rev_counter1( input ck, input cl,en, ud, output [3:0] z, output c); reg [3:0] q; ck, posedge cl) begin if (cl == 1) q <= 0; else if (en == 1) if (ud == 0) q <= q + 1; else q <= q - 1; end assign z = q; assign c = ud? ~( q) : &q; endmodule 68
Chap 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 informationDigital Design with FPGAs. By Neeraj Kulkarni
Digital Design with FPGAs By Neeraj Kulkarni Some Basic Electronics Basic Elements: Gates: And, Or, Nor, Nand, Xor.. Memory elements: Flip Flops, Registers.. Techniques to design a circuit using basic
More informationFPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1
FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital
More informationRegisters and finite state machines
Registers and finite state machines DAPA E.T.S.I. Informática Universidad de Sevilla /22 Jorge Juan 2, 2, 22 You are free to copy, distribute and communicate this work publicly and
More informationDigital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University
Digital Circuit Design and Language Datapath Design Chang, Ik Joon Kyunghee University Typical Synchronous Design + Control Section : Finite State Machine + Data Section: Adder, Multiplier, Shift Register
More informationContents. Appendix D Verilog Summary Page 1 of 16
Appix D Verilog Summary Page 1 of 16 Contents Appix D Verilog Summary... 2 D.1 Basic Language Elements... 2 D.1.1 Keywords... 2 D.1.2 Comments... 2 D.1.3 Identifiers... 2 D.1.4 Numbers and Strings... 3
More informationVerilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design
Verilog What is Verilog? Hardware description language: Are used to describe digital system in text form Used for modeling, simulation, design Two major languages Verilog (IEEE 1364), latest version is
More informationLecture 32: SystemVerilog
Lecture 32: SystemVerilog Outline SystemVerilog module adder(input logic [31:0] a, input logic [31:0] b, output logic [31:0] y); assign y = a + b; Note that the inputs and outputs are 32-bit busses. 17:
More informationVerilog Fundamentals. Shubham Singh. Junior Undergrad. Electrical Engineering
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering VERILOG FUNDAMENTALS HDLs HISTORY HOW FPGA & VERILOG ARE RELATED CODING IN VERILOG HDLs HISTORY HDL HARDWARE DESCRIPTION LANGUAGE
More informationDigital Design (VIMIAA01) Introduction to the Verilog HDL
BUDAPEST UNIVERSITY OF TECHNOLOGY AND ECONOMICS FACULTY OF ELECTRICAL ENGINEERING AND INFORMATICS DEPARTMENT OF MEASUREMENT AND INFORMATION SYSTEMS Digital Design (VIMIAA01) Introduction to the Verilog
More informationDesign Using Verilog
EGC220 Design Using Verilog Baback Izadi Division of Engineering Programs bai@engr.newpaltz.edu Basic Verilog Lexical Convention Lexical convention are close to C++. Comment // to the of the line. /* to
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 informationBrief Introduction to Verilog HDL (Part 1)
BUDAPEST UNIVERSITY OF TECHNOLOGY AND ECONOMICS FACULTY OF ELECTRICAL ENGINEERING AND INFORMATICS DEPARTMENT OF MEASUREMENT AND INFORMATION SYSTEMS Brief Introduction to Verilog HDL (Part 1) Tamás Raikovich
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 informationA Verilog Primer. An Overview of Verilog for Digital Design and Simulation
A Verilog Primer An Overview of Verilog for Digital Design and Simulation John Wright Vighnesh Iyer Department of Electrical Engineering and Computer Sciences College of Engineering, University of California,
More informationAbi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University
Hardware description language (HDL) Intended to describe circuits textually, for a computer to read Evolved starting in the 1970s and 1980s Popular languages today include: VHDL Defined in 1980s by U.S.
More informationHDLs and SystemVerilog. Digital Computer Design
HDLs and SystemVerilog Digital Computer Design Logic Arrays Gates can be organized into regular arrays. If the connections are made programmable, these logic arrays can be configured to perform any function
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 informationDIGITAL SYSTEM DESIGN
DIGITAL SYSTEM DESIGN Prepared By: Engr. Yousaf Hameed Lab Engineer BASIC ELECTRICAL & DIGITAL SYSTEMS LAB DEPARTMENT OF ELECTRICAL ENGINEERING Digital System Design 1 Name: Registration No: Roll No: Semester:
More informationa, b sum module add32 sum vector bus sum[31:0] sum[0] sum[31]. sum[7:0] sum sum overflow module add32_carry assign
I hope you have completed Part 1 of the Experiment. This lecture leads you to Part 2 of the experiment and hopefully helps you with your progress to Part 2. It covers a number of topics: 1. How do we specify
More informationVHDL VS VERILOG.
1 VHDL VS VERILOG http://www.cse.cuhk.edu.hk/~mcyang/teaching.html 2 VHDL & Verilog They are both hardware description languages for modeling hardware. They are each a notation to describe the behavioral
More informationVerilog 1 - Fundamentals
Verilog 1 - Fundamentals FA FA FA FA module adder( input [3:0] A, B, output cout, output [3:0] S ); wire c0, c1, c2; FA fa0( A[0], B[0], 1 b0, c0, S[0] ); FA fa1( A[1], B[1], c0, c1, S[1] ); FA fa2( A[2],
More informationEN2911X: Reconfigurable Computing Lecture 05: Verilog (2)
EN2911X: Lecture 05: Verilog (2) Prof. Sherief Reda Division of Engineering, Brown University Fall 09 http://scale.engin.brown.edu Dataflow modeling Module is designed by specifying the data flow, where
More informationHardware Description Language VHDL (1) Introduction
Hardware Description Language VHDL (1) Introduction Digital Radiation Measurement and Spectroscopy NE/RHP 537 Introduction Hardware description language (HDL) Intended to describe circuits textually, for
More informationDigital Design with SystemVerilog
Digital Design with SystemVerilog Prof. Stephen A. Edwards Columbia University Spring 25 Synchronous Digital Design Combinational Logic Sequential Logic Summary of Modeling Styles Testbenches Why HDLs?
More informationN-input EX-NOR gate. N-output inverter. N-input NOR gate
Hardware Description Language HDL Introduction HDL is a hardware description language used to design and document electronic systems. HDL allows designers to design at various levels of abstraction. It
More informationChapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1>
Chapter 4 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 4 Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential
More informationFederal Urdu University of Arts, Science and Technology, Islamabad VLSI SYSTEM DESIGN. Prepared By: Engr. Yousaf Hameed.
VLSI SYSTEM DESIGN Prepared By: Engr. Yousaf Hameed Lab Engineer BASIC ELECTRICAL & DIGITAL SYSTEMS LAB DEPARTMENT OF ELECTRICAL ENGINEERING VLSI System Design 1 LAB 01 Schematic Introduction to DSCH and
More informationLecture #2: Verilog HDL
Lecture #2: Verilog HDL Paul Hartke Phartke@stanford.edu Stanford EE183 April 8, 2002 EE183 Design Process Understand problem and generate block diagram of solution Code block diagram in verilog HDL Synthesize
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 informationChapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1>
Chapter 4 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 4 Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential
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 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 informationVerilog Module 1 Introduction and Combinational Logic
Verilog Module 1 Introduction and Combinational Logic Jim Duckworth ECE Department, WPI 1 Module 1 Verilog background 1983: Gateway Design Automation released Verilog HDL Verilog and simulator 1985: Verilog
More informationEECS150 - Digital Design Lecture 4 - Verilog Introduction. Outline
EECS150 - Digital Design Lecture 4 - Verilog Introduction Feb 3, 2009 John Wawrzynek Spring 2009 EECS150 - Lec05-Verilog Page 1 Outline Background and History of Hardware Description Brief Introduction
More informationIntroduction to Verilog HDL. Verilog 1
Introduction to HDL Hardware Description Language (HDL) High-Level Programming Language Special constructs to model microelectronic circuits Describe the operation of a circuit at various levels of abstraction
More informationMicrocomputers. Outline. Number Systems and Digital Logic Review
Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded
More informationSpring 2017 EE 3613: Computer Organization Chapter 5: Processor: Datapath & Control - 2 Verilog Tutorial
Spring 2017 EE 3613: Computer Organization Chapter 5: Processor: Datapath & Control - 2 Verilog Tutorial Avinash Kodi Department of Electrical Engineering & Computer Science Ohio University, Athens, Ohio
More informationELCT 501: Digital System Design
ELCT 501: Digital System Lecture 4: CAD tools (Continued) Dr. Mohamed Abd El Ghany, Basic VHDL Concept Via an Example Problem: write VHDL code for 1-bit adder 4-bit adder 2 1-bit adder Inputs: A (1 bit)
More informationCombinational Logic II
Combinational Logic II Ranga Rodrigo July 26, 2009 1 Binary Adder-Subtractor Digital computers perform variety of information processing tasks. Among the functions encountered are the various arithmetic
More informationOnline Verilog Resources
EECS 427 Discussion 6: Verilog HDL Reading: Many references EECS 427 F08 Discussion 6 1 Online Verilog Resources ASICs the book, Ch. 11: http://www.ge.infn.it/~pratolo/verilog/verilogtutorial.pdf it/ pratolo/verilog/verilogtutorial
More informationEE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE
EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE 1 Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates, and output
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 informationVerilog 1 - Fundamentals
Verilog 1 - Fundamentals FA FA FA FA module adder( input [3:0] A, B, output cout, output [3:0] S ); wire c0, c1, c2; FA fa0( A[0], B[0], 1 b0, c0, S[0] ); FA fa1( A[1], B[1], c0, c1, S[1] ); FA fa2( A[2],
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 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 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 informationIT T35 Digital system desigm y - ii /s - iii
UNIT - V Introduction to Verilog Hardware Description Language Introduction HDL for combinational circuits Sequential circuits Registers and counters HDL description for binary multiplier. 5.1 INTRODUCTION
More informationEN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages
EN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2014 1 Introduction to Verilog
More informationSynthesizable Verilog
Synthesizable Verilog Courtesy of Dr. Edwards@Columbia, and Dr. Franzon@NCSU http://csce.uark.edu +1 (479) 575-6043 yrpeng@uark.edu Design Methodology Structure and Function (Behavior) of a Design HDL
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 informationVerilog HDL Introduction
EEE3050 Theory on Computer Architectures (Spring 2017) Prof. Jinkyu Jeong Verilog HDL Introduction 2017.05.14 TA 이규선 (GYUSUN LEE) / 안민우 (MINWOO AHN) Modules The Module Concept Basic design unit Modules
More informationChapter 4 :: Topics. Introduction. SystemVerilog. Hardware description language (HDL): allows designer to specify logic function only.
Chapter 4 :: Hardware Description Languages Digital Design and Computer Architecture David Money Harris and Sarah L. Harris Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential
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 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 informationThe Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science
The Verilog Language COMS W4995-02 Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science The Verilog Language Originally a modeling language for a very efficient event-driven
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 informationIn this lecture, we will go beyond the basic Verilog syntax and examine how flipflops and other clocked circuits are specified.
1 In this lecture, we will go beyond the basic Verilog syntax and examine how flipflops and other clocked circuits are specified. I will also introduce the idea of a testbench as part of a design specification.
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 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 informationEECS 427 Lecture 14: Verilog HDL Reading: Many handouts/references. EECS 427 W07 Lecture 14 1
EECS 427 Lecture 14: Verilog HDL Reading: Many handouts/references EECS 427 W07 Lecture 14 1 Online Verilog Resources ASICs the book, Ch. 11: http://www.ge.infn.it/~pratolo/verilog/verilogtutorial.pdf
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 informationECE 4514 Digital Design II. Spring Lecture 7: Dataflow Modeling
ECE 4514 Digital Design II Lecture 7: Dataflow Modeling A language Lecture Today's topic Dataflow Modeling input input input module output output Model with submodules and gates = Structural Model with
More information14:332:231 DIGITAL LOGIC DESIGN. Hardware Description Languages
14:332:231 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 2013 Lecture #22: Introduction to Verilog Hardware Description Languages Basic idea: Language constructs
More informationVerilog. Verilog for Synthesis
Verilog Verilog for Synthesis 1 Verilog background 1983: Gateway Design Automation released Verilog HDL Verilog and simulator 1985: Verilog enhanced version Verilog-XL 1987: Verilog-XL becoming more popular
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 informationCode No: R Set No. 1
Code No: R059210504 Set No. 1 II B.Tech I Semester Regular Examinations, November 2007 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems
More informationSpeaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28
99-1 Under-Graduate Project Verilog Simulation & Debugging Tools Speaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28 ACCESS IC LAB Outline Basic Concept of Verilog HDL Gate Level Modeling
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 Design Principles
16 h7fex // 16-bit value, low order 4 bits unknown 8 bxx001100 // 8-bit value, most significant 2 bits unknown. 8 hzz // 8-bit value, all bits high impedance. Verilog Design Principles ECGR2181 Extra Notes
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 informationDESCRIPTION OF DIGITAL CIRCUITS USING VHDL
DESCRIPTION OF DIGITAL CIRCUITS USING VHDL Combinatinal circuits Sequential circuits Design organization. Generic design Iterative operations Authors: Luis Entrena Arrontes, Celia López, Mario García,
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 informationCombinational Logic Circuits
Combinational Logic Circuits By Dr. M. Hebaishy Digital Logic Design Ch- Rem.!) Types of Logic Circuits Combinational Logic Memoryless Outputs determined by current values of inputs Sequential Logic Has
More informationFPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]
FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language Reference: [] FIELD PROGRAMMABLE GATE ARRAY FPGA is a hardware logic device that is programmable Logic functions may be programmed
More informationTutorial on Verilog HDL
Tutorial on Verilog HDL HDL Hardware Description Languages Widely used in logic design Verilog and VHDL Describe hardware using code Document logic functions Simulate logic before building Synthesize code
More informationWriting Circuit Descriptions 8
8 Writing Circuit Descriptions 8 You can write many logically equivalent descriptions in Verilog to describe a circuit design. However, some descriptions are more efficient than others in terms of the
More informationSequential Logic Design
Sequential Logic Design Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu (Guest starring: Frank K. Gürkaynak and Aanjhan Ranganathan) http://www.syssec.ethz.ch/education/digitaltechnik_17 Adapted
More informationModule 2.1 Gate-Level/Structural Modeling. UNIT 2: Modeling in Verilog
Module 2.1 Gate-Level/Structural Modeling UNIT 2: Modeling in Verilog Module in Verilog A module definition always begins with the keyword module. The module name, port list, port declarations, and optional
More informationLecture 3: Modeling in VHDL. EE 3610 Digital Systems
EE 3610: Digital Systems 1 Lecture 3: Modeling in VHDL VHDL: Overview 2 VHDL VHSIC Hardware Description Language VHSIC=Very High Speed Integrated Circuit Programming language for modelling of hardware
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 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 informationSpiral 1 / Unit 4 Verilog HDL. Digital Circuit Design Steps. Digital Circuit Design OVERVIEW. Mark Redekopp. Description. Verification.
1-4.1 1-4.2 Spiral 1 / Unit 4 Verilog HDL Mark Redekopp OVERVIEW 1-4.3 1-4.4 Digital Circuit Design Steps Digital Circuit Design Description Design and computer-entry of circuit Verification Input Stimulus
More informationVERILOG 2: LANGUAGE BASICS
VERILOG 2: LANGUAGE BASICS Verilog module Modules are basic building blocks. These are two example module definitions which you should use: // Safer traditional method module abc (in1, in2, out); input
More informationVHDL Structural Modeling II
VHDL Structural Modeling II ECE-331, Digital Design Prof. Hintz Electrical and Computer Engineering 5/7/2001 331_13 1 Ports and Their Usage Port Modes in reads a signal out writes a signal inout reads
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 informationModeling Synchronous Logic Circuits. Debdeep Mukhopadhyay IIT Madras
Modeling Synchronous Logic Circuits Debdeep Mukhopadhyay IIT Madras Basic Sequential Circuits A combinational circuit produces output solely depending on the current input. But a sequential circuit remembers
More informationTopics. Midterm Finish Chapter 7
Lecture 9 Topics Midterm Finish Chapter 7 ROM (review) Memory device in which permanent binary information is stored. Example: 32 x 8 ROM Five input lines (2 5 = 32) 32 outputs, each representing a memory
More informationC-Based Hardware Design
LECTURE 6 In this lecture we will introduce: The VHDL Language and its benefits. The VHDL entity Concurrent and Sequential constructs Structural design. Hierarchy Packages Various architectures Examples
More informationThis Lecture. Some components (useful for the homework) Verilog HDL (will continue next lecture)
Last Lecture The basic component of a digital circuit is the MOS transistor Transistor have instrinsic resistance and capacitance, so voltage values in the circuit take some time to change ( delay ) There
More informationLecture 15: System Modeling and Verilog
Lecture 15: System Modeling and Verilog Slides courtesy of Deming Chen Intro. VLSI System Design Outline Outline Modeling Digital Systems Introduction to Verilog HDL Use of Verilog HDL in Synthesis Reading
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 informationEN164: Design of Computing Systems Lecture 06: Lab Foundations / Verilog 2
EN164: Design of Computing Systems Lecture 06: Lab Foundations / Verilog 2 Professor Sherief Reda http://scaleenginbrownedu Electrical Sciences and Computer Engineering School of Engineering Brown University
More informationACS College of Engineering. Department of Biomedical Engineering. Logic Design Lab pre lab questions ( ) Cycle-1
ACS College of Engineering Department of Biomedical Engineering Logic Design Lab pre lab questions (2015-2016) Cycle-1 1. What is a combinational circuit? 2. What are the various methods of simplifying
More informationEE178 Lecture Verilog FSM Examples. Eric Crabill SJSU / Xilinx Fall 2007
EE178 Lecture Verilog FSM Examples Eric Crabill SJSU / Xilinx Fall 2007 In Real-time Object-oriented Modeling, Bran Selic and Garth Gullekson view a state machine as: A set of input events A set of output
More informationUnit 5. Hardware description languages
Unit 5. Hardware description languages Digital Electronic Circuits (Circuitos Electrónicos Digitales) E.T.S.I. Informática Universidad de Sevilla October, 2012 Jorge Juan 2010, 2011,
More informationECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS
ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS Note: Closed book no notes or other material allowed apart from the one
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 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 informationVerilog. Like VHDL, Verilog HDL is like a programming language but:
Verilog Verilog Like VHDL, Verilog HDL is like a programming language but: Statements can execute simultaneously unlike programming e.g. nand(y1,a1,b1); nand(y2,a2,b2); or (out,y1,y2); a1 b1 all statements
More information