UNIT 8: Synthesis Basics

Slides:



Advertisements
Similar presentations
06/10/071 Security System Using VHDL. 06/10/072 Project Members Amal Shanavas Aneez I Ijas Rahim Renjith S Menon Sajid S Chavady.
Advertisements

UNIT 2: Data Flow description
HDL Programming Fundamentals
HDL Programming Fundamentals
Chapter 3 Gate-Level Minimization
Digital System Design Subject Name : Digital System Design Course Code : IT-314.
Xilinx 6.3 Tutorial Integrated Software Environment (ISE) Set up basic environment Select Gates or Modules to Be simulated (Insert Program Code) Run Waveform.
Verilog HDL -Introduction
©2004 Brooks/Cole FIGURES FOR CHAPTER 10 INTRODUCTION TO VHDL Click the mouse to move to the next page. Use the ESC key to exit this chapter. This chapter.
Adders and Subtractors
©2004 Brooks/Cole FIGURES FOR CHAPTER 20 VHDL FOR DIGITAL SYSTEM DESIGN Click the mouse to move to the next page. Use the ESC key to exit this chapter.
1/8/ VerilogCopyright Joanne DeGroat, ECE, OSU1 Verilog Overview An overview of the Verilog HDL.
ENEL111 Digital Electronics
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
CMSC 611: Advanced Computer Architecture
HDL Programming Fundamentals
The Verilog Hardware Description Language
OBJECTIVES Learn the history of HDL Development. Learn how the HDL module is structured. Learn the use of operators in HDL module. Learn the different.
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Introduction To VHDL for Combinational Logic
Supplement on Verilog adder examples
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
CPEN Digital System Design
Fundamental Concepts 大同大學 資訊工程系 副教授
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
Table 7.1 Verilog Operators.
ECE Synthesis & Verification - Lecture 2 1 ECE 667 Spring 2011 ECE 667 Spring 2011 Synthesis and Verification of Digital Circuits High-Level (Architectural)
Multiplexers Section 3-7 Mano & Kime. Multiplexers & Demultiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal.
Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
ECE 551 Digital System Design & Synthesis Lecture 08 The Synthesis Process Constraints and Design Rules High-Level Synthesis Options.
ELEN 468 Lecture 151 ELEN 468 Advanced Logic Design Lecture 15 Synthesis of Language Construct I.
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
Binary-to-BCD Converter
Digital Fundamentals with PLD Programming Floyd Chapter 4
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
Binary-to-BCD Converter
Synthesis Presented by: Ms. Sangeeta L. Mahaddalkar ME(Microelectronics) Sem II Subject: Subject:ASIC Design and FPGA.
Verilog HDL: A solution for Everybody By, Anil Kumar Ram Rakhyani
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Introduction to VLSI Design – Lec01. Chapter 1 Introduction to VLSI Design Lecture # 11 High Desecration Language- Based Design.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
5-1 Logic System Design I VHDL Design Principles ECGR2181 Reading: Chapter 5.0, 5.1, 5.3 port ( I: in STD_LOGIC_VECTOR (1 to 9); EVEN, ODD: out STD_LOGIC.
Digital Design Using VHDL and PLDs ECOM 4311 Digital System Design Chapter 1.
Slide 1 3.VHDL/Verilog Description Elements. Slide 2 To create a digital component, we start with…? The component’s interface signals Defined in MODULE.
Chapter1: Introduction Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 1-1 Chapter 1: Introduction Prof. Ming-Bo.
VHDL From Ch. 5 Hardware Description Languages. History 1980’s Schematics 1990’s Hardware Description Languages –Increased due to the use of Programming.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
TODAY’S OUTLINE Introduction to Verilog Verilog coding format
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Reg and Wire:.
UNIT 8: Synthesis Basics
HDL Programming Fundamentals
Hardware Descriptive Languages these notes are taken from Mano’s book
Field Programmable Gate Array
Field Programmable Gate Array
Field Programmable Gate Array
HDL Programming Fundamentals
Introduction to Verilog
Lecture 1.3 Hardware Description Languages (HDLs)
Computer Architecture
Hardware Descriptive Languages these notes are taken from Mano’s book
Digital Fundamentals Floyd Chapter 4 Tenth Edition
UNIT 6: Mixed-Type Description
4-Input Gates VHDL for Loops
COE 202 Introduction to Verilog
Presentation transcript:

UNIT 8: Synthesis Basics 10.1 Highlights of SYNTHESIS Facts Synthesis is mapping between the simulation (software) domain and the hardware domain. Synthesis, in this Chapter, can be viewed as Reverse Engineering. The user is provided with the behavioral code and is asked to develop the logic diagram. Not all HDL statements can be mapped into the hardware domain. The hardware domain is limited to signals that can take zeros, ones, or left open. The hardware domain can not differentiate, for example, between signals and variables as does the simulation (software) domain. To successfully synthesize the behavior code onto a certain electronic chips, the mapping has to conform to the requirements and constrains imposed by the vendor of the electronic chip. Several synthesis packages are available on the market. These packages can take the behavior code, map it, and produce net list . In this Chapter we focus on learning how to synthesize the code manually rather than on how to use the synthesizers. Two synthesizers may synthesize the same code using different number of same gates. This is due to the different approaches these two synthesizers took to map the code. Consider, for example, the VHDL statement y := 2x. One synthesizer approaches this statement as a shift to the left of x; another may approach it as a multiplication and may use a multiplier which usually results in more number of gates than the mere shift. HDL Programming Fundamentals

HDL Programming Fundamentals

HDL Programming Fundamentals 10.2 Synthesis Information from Entity (VHDL) and Module (Verilog) 10.2.1 Synthesis Information from Entity (VHDL) Listings 10.1-11 10.2.2 Verilog Synthesis Information from Module Inputs/Outputs Listings 10.12-15 HDL Programming Fundamentals

HDL Programming Fundamentals module array1v( start ,grtst ); parameter N = 4; parameter M = 3; input start; output [3:0] grtst; reg [M:0] a[0:N]; .............. endmodule 10.3 Mapping process (VHDL) and always (Verilog) HDL Programming Fundamentals

HDL Programming Fundamentals 10.3.1 Mapping the Signal Assignment Statement to Gate-Level Listing 10.16 library ieee; use ieee.std_logic_1164.all; entity SIGNA_ASSN is port ( X : in bit; Y: out bit); end SIGNA_ASSN; architecture BEHAVIOR of SIGNA_ASSN is begin P1: process(X) Y <= X; end process P1; end BEHAVIOR; b) Verilog description module SIGNA_ASSN (X, Y); input X; output Y; reg y; always @ (X) Y = X; end endmodule HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.17 Verilog module sign_assn2( X,Y); input [1:0] X; output [3:0] Y; reg [3:0] Y; always @ (X) begin Y = 2*X + 3; end endmodule Verify the synthesis by writing structural description and then simulate HDL Programming Fundamentals

HDL Programming Fundamentals 10.3.2 Mapping Variable Assignment Statement to Gate-Level Synthesis Listing 10.19 library ieee; use ieee.std_logic_1164.all; entity parity_even is port ( x: in std_logic_vector(3 downto 0); C: out std_logic); end parity_even; architecture behav_prti of parity_even is begin P1: process(x) variable c1: std_logic; c1 := (x(0) xor x(1)) xor (x(2) xor x(3)); C <= c1; end process P1; end behav_prti; HDL Programming Fundamentals

HDL Programming Fundamentals 10.3.3 Mapping of Logical Operators Logical Operator Gate-Level Mapping VHDL Verilog And & AND Or | OR Not ~ INVERTER Xor ^ XOR HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.20 HDL Programming Fundamentals

HDL Programming Fundamentals 10.3.4 Mapping of IF Statement Listing 10.21 process (a, x) begin if (a = '1') then Y <= X; else Y <= '0'; end if; end process; HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.22 Verilog always @ (a, X, X1) begin if (a == 1'b1) Y = X; else Y = X1; end HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.23 Verilog module IF_st(a,Y); input [2:0] a; output Y; reg Y; always @ (a) begin if (a < 3'b101) Y = 1'b1; else Y = 1'b0; end endmodule HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.24 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; entity elseif is port (BP: in natural range 0 to 7; ADH : out natural range 0 to 15); end; architecture elseif of elseif is begin ADHP: process(BP) variable resADH : natural := 0; if BP <= 2 then resADH := 15; elsif BP >= 5 then resADH := 0; else resADH := BP * (-5) + 25; end if ; ADH <= resADH; end process ADHP; end elseif; HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.25 library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity If_store is port (a,X: in std_logic; Y: out std_logic); end If_store; architecture If_store of If_store is begin process (a, X) if (a = '1') then Y <= X; end if; end process; To reduce the number of components in the hardware Domain try, if possible, not to write incomplete if statement as in the above example. If possible assign A value to Y as : else Y <= ‘0’; HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.26 else if Statement with Gate-Level Logic HDL Programming Fundamentals

HDL Programming Fundamentals 10.3.5 Mapping of case Statement Listing 10.27 module case_nostr ( a, b, ct,d); input [3:0] a, b; input ct; output [4:0] d; reg [4:0] d; always @ (a,b,ct) begin case (ct) 1'b0: d = a + b; 1'b1: d = a-b; endcase end endmodule HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.28 case statement with storage module case_str ( a, b, ct,d); input [3:0] a, b; input ct; output [4:0] d; reg [4:0] d; always @ (a,b,ct) begin case (ct) 1'b0: d = a + b; 1'b1: ; endcase end endmodule HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.30 Example of Case with Storage library IEEE; use IEEE.STD_LOGIC_1164.all; package types is type states is (state0, state1, state2, state3); end; use IEEE.STD_LOGIC_1164.ALL; use work.types.all; entity state_machine is port ( A, clk: in std_logic; pres_st: buffer states; Z: out std_logic); end state_machine; architecture st_behavioral of state_machine is begin FM: process (clk, pres_st, A) variable present : states := state0; if (clk = '1' and clk'event )then case pres_st is when state0 => if A ='1' then present := state1; Z <= '0'; else present := state0; Z <= '1'; end if; HDL Programming Fundamentals

HDL Programming Fundamentals when state1 => if A ='1' then present := state2; Z <= '0'; else present := state3; end if; …….. HDL Programming Fundamentals

HDL Programming Fundamentals 10.3.6 Mapping of loop Statement Listing 10.32 library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity listing10_32 is port (a: in std_logic_vector (3 downto 0); c: in integer range 0 to 15; b: out std_logic_vector(3 downto 0)); end listing10_32; architecture listing10_32 of listing10_32 is begin shfl: process(a,c) variable result, j: integer; variable temp: std_logic_vector (3 downto 0); result := 0; lop1: for i in 0 to 3 loop if a(i) = '1' then result := result + 2**i; end if; end loop; To limit the number of bits allocated to an integer, always specify its range This loop has no Mapping to hardware domain. “result” and “a” are identical in the hardware Domain. HDL Programming Fundamentals

HDL Programming Fundamentals if result > c then lop2: for i in 0 to 3 loop j := (i + 2)mod 4; temp (j) := a (i); end loop; else lop3:for i in 0 to 3 loop j := (i + 1)mod 4; end if; b <= temp; end process shfl; HDL Programming Fundamentals

HDL Programming Fundamentals 10.3.7 Mapping of Procedure or task Listing 10.33 An Example of Task module example_task(a1,b1,d1); input a1,b1; output d1; reg d1; always @ (a1,b1) begin xor_synth( d1,a1,b1); end task xor_synth; output d; input a, b; d = a ^ b; endtask endmodule HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.34 An Example of a Procedure HDL Programming Fundamentals

HDL Programming Fundamentals 10.3.8 Mapping of Function Statement Listing 10.35 Example of a function module Func_synth(a1,b1,d1); input a1,b1; output d1; reg d1; always @(a1, b1) begin d1 = andopr (a1, b1); end function andopr ; input a,b; andopr = a ^ b; endfunction endmodule HDL Programming Fundamentals

HDL Programming Fundamentals Listing 10.36 Example of a Function HDL Programming Fundamentals

HDL Programming Fundamentals Summary Steps of Synthesizing any system can be summarized as follows: formulate the flowchart of the system; write the behavioral code of the system; simulate the behavioral code to verify the code; map the behavioral statements into hardware components and gates; write a structural code for the components and gates; simulate the structural code and compare between this simulation and that of the behavioral to verify the mapping; download the components and gates into an electronic chip; test the chip to verify that the download represents the system The hardware domain is very limited in comparison with the simulation domain. In hardware domain, for example, we can not distinguish between VHDL variables and signals HDL Programming Fundamentals