Basic Logic Gates and Truth Tables

Slides:



Advertisements
Similar presentations
Logic Gates.
Advertisements

VERILOG: Synthesis - Combinational Logic Combination logic function can be expressed as: logic_output(t) = f(logic_inputs(t)) Rules Avoid technology dependent.
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
Counters Discussion D8.3.
CDA 3100 Recitation Week 11.
//HDL Example 4-10 // //Gate-level description of circuit of Fig. 4-2 module analysis (A,B,C,F1,F2); input.
Verilog.
Spartan-3 FPGA HDL Coding Techniques
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
EE 361 Fall 2003University of Hawaii1 Hardware Design Tips EE 361 University of Hawaii.
Combinational Logic.
Verilog Modules for Common Digital Functions
Review for Exam 2 Using MUXs to implement logic
Table 7.1 Verilog Operators.
Combinational Logic with Verilog Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
//HDL Example 5-1 // //Description of D latch (See Fig.5-6) module D_latch (Q,D,control); output Q; input.
Verilog. 2 Behavioral Description initial:  is executed once at the beginning. always:  is repeated until the end of simulation.
//HDL Example 6-1 // //Behavioral description of //Universal shift register // Fig. 6-7 and Table 6-3 module shftreg.
ECE 551 Digital System Design & Synthesis Lecture 08 The Synthesis Process Constraints and Design Rules High-Level Synthesis Options.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
EELE 367 – Logic Design Module 2 – Modern Digital Design Flow Agenda 1.History of Digital Design Approach 2.HDLs 3.Design Abstraction 4.Modern Design Steps.
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
2-to-1 Multiplexer: if Statement Discussion D7.1 Example 4.
Dataflow Verilog ECEn 224.
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior: initial blocks execute.
ECE 2372 Modern Digital System Design
Introduction Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL) A hardware description language is a language or means used to describe or model a digital.
ECE/CS 352 Digital System Fundamentals© 2001 C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapters 3 and 4: Verilog – Part 2 Charles R.
Module 1.2 Introduction to Verilog
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Verilog A Hardware Description Language (HDL ) is a machine readable and human readable language for describing hardware. Verilog and VHDL are HDLs.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Introduction to ASIC flow and Verilog HDL
M.Mohajjel. Objectives Learn How to write synthesizable Verilog code Common mistakes and how to avoid them What is synthesized for what we code Digital.
Introduction to Verilog. Data Types A wire specifies a combinational signal. – Think of it as an actual wire. A reg (register) holds a value. – A reg.
Multiplexers Section Topics Multiplexers – Definition – Examples – Verilog Modeling.
Digital System Design Verilog ® HDL Dataflow Modeling Maziar Goudarzi.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part4: Verilog – Part 2.
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
Exp#5 & 6 Introduction to Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
Overview Logistics Last lecture Today HW5 due today
Hardware Description Languages: Verilog
An Introduction to Verilog: Transitioning from VHDL
EECE6017C - Lab 0 Introduction to Altera tools and Basic Digital Logic
Verilog Tutorial Fall
TODAY’S OUTLINE Verilog Codings Concurrent and Sequential If-else
ELEN 468 Advanced Logic Design
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
ECE 331 – Digital System Design
Logic Gates.
Logic Gates Benchmark Companies Inc PO Box Aurora CO
Hardware Description Languages: Verilog
Introduction to Verilog
Behavioral Modeling in Verilog
SYNTHESIS OF SEQUENTIAL LOGIC
Levels in computer design
Behavioral/RTL Description (HDL)
Verilog.
Logic Gates.
Introduction to Verilog
The Verilog Hardware Description Language
CS 153 Logic Design Lab Professor Ian G. Harris
Foundations for Datapath Design
Introduction to Verilog
Digital Designs – What does it take
Introduction to Digital IC Design
Presentation transcript:

Basic Logic Gates and Truth Tables NOT (Inverter) F = A.B NAND AND F = A+B F = A+B OR NOR

Basic Logic Gates and Truth Tables

Introduction to Field Programmable Gate Arrays

Introduction to Field Programmable Gate Arrays The first FPGAs for Xilinx in 1985 using a very mature 1.2m process consists of 1,000 ASIC gate equivalent running at 18MHZ. https://anysilicon.com/fpga-vs-asic-choose/

Introduction to Field Programmable Gate Arrays

FPGA Design Flow Overview The ISE® design flow comprises the following steps: design entry, design synthesis, design implementation, and Xilinx® device programming. Design verification, which includes both functional verification and timing verification, takes places at different points during the design flow. This section describes what to do during each step. For additional details on each design step, click on a link below the following figure. https://www.xilinx.com/support/documentation/sw_manuals/xilinx10/isehelp/ise_c_fpga_design_flow_overview.htm

difference between logical and bit-wise operator Suppose A=3′b101,B=3′b010. Logical AND:- Y=A&&B means if A is true(non-zero) and B(non-zero) is true Y will get ‘1’ else ‘0′. So here Y=1. Bit-wise AND:- Y=A&B means bit-wise and operation of A,B. So here Y=3′b000. Logical OR:- Y=A||B means if any of these two true i.e. A is true(non-zero) or B(non-zero) is true Y will get ‘1’ else if both are false(Zero) then ‘0′. So here Y=1; Bit-wise OR:- Y=A|B means bit-wise ‘or’ operation of A,B. So here Y=3′b111. But the trick is with NOT operation. Logical NOT:- Y=!B means if B is true(non-zero) Y will get false i.e. ‘0’ else ‘1′. So here Y=0. Bit-wise NOT:- Y=~B means bit-wise complement operation of B. So here Y=3′b101.

== tests for only 1 and 0, Precedence of Operations in Verilog Verilog HDL operators can be divided into several groups Highest Lowest == tests for only 1 and 0, while === tests for 1, 0, X, Z.

1 1 1 Q1Q0 1/1 Current St Q1Q0 Input In Next St Q1+Q0+ Output Out 0 0 0 1 1 1 0 1 1 In 00 01 11 10 00 0/1 01 1 1 1/0 0/0 Q1+ = Q1’Q0 + Q1Q0’ 1/1 0/1 1/1 Q1Q0 In 11 0/0 10 00 01 11 10 1 1 Q0+ = In’Q0’ + In’Q1 + InQ1’Q0 Q1’Q0 + Q1Q0’ 1 Q1Q0 In 00 01 11 10 CLK 1 1 1 Out = InQ0 + Q1’Q0’ + Q1Q0 In’Q0’ + In’Q1 + InQ1’Q0 Out = InQ0 + Q1’Q0’ + Q1Q0

Examples to complete two_input_xor: assign out = in1 ^ in2; // example 2 wire product1, product2; assign product1 = in1 && !in2; // could have done in assign product2 = !in1 && in2; // single assignment assign out = product1 || product2; // statement… // example 3 assign out = (in1 != in2); // example 4 assign out = in1 ? (!in2) : (in2);

// Behavioral Model of a 4 to 1 MUX (16 data inputs) module mux_4to1(Y, A, B, C, D, sel); output [15:0] Y; input [15:0] A, B, C, D; input [1:0] sel; reg [15:0] Y; always @(A or B or C or D or sel) case ( sel ) 2'b00: Y = A; 2'b01: Y = B; 2'b10: Y = C; 2'b11: Y = D; default: Y = 16'hxxxx; endcase endmodule // Behavioral Model of a 2 to 1 MUX (16 data inputs) module mux_2to1(Y, A, B, sel); output [15:0] Y; input [15:0] A, B; input sel; reg [15:0] Y; always @(A or B or sel) if (sel == 1'b0) Y = A; else Y = B; endmodule

2-bit MUX examples Using if Statement Using case Statement Using assign Statement http://www.asic-world.com/examples/verilog/mux.html

http://euler.ecs.umass.edu/ece232/pdf/03-verilog-11.pdf

Sample Test Questions

Synthesis of Combinational Logic – Gate Netlist Synthesis tools further optimize a gate netlist in term of Verilog primitives. Example: Given the pre-synthesized circuit below, write the Verilog, optimize circuit using only 2-input gates (Optimized) cs.haifa.ac.il/courses/verilog/verilog_tutorial2.ppt

http://www. syssec. ethz http://www.syssec.ethz.ch/content/dam/ethz/special-interest/infk/inst-infsec/system-security-group-dam/education/Digitaltechnik_14/07_Verilog_Combinational.pdf

Structural Modeling of Sequential Circuits // Mixed Structural and Dataflow module Seq_Circuit_Structure (input In, CLK, output Out); wire D0, D1, Q0, Q0b, Q1, Q1b; // Instantiate two D Flip-Flops D_FF FF0(D0, CLK, Q0, Q0b); D_FF FF1(D1, CLK, Q1, Q1b); // Modeling logic assign D0 = Q1b & In; assign D1 = (Q0 & ~In) | (Q1 & ~In); assign Out = Q0 & Q1; endmodule