Sequential Logic for Synthesis Based on Aldec Active-HDL

Slides:



Advertisements
Similar presentations
George Mason University ECE 448 – FPGA and ASIC Design with VHDL FPGA Devices & FPGA Design Flow ECE 448 Lecture 5.
Advertisements

George Mason University FPGA Design Flow ECE 448 Lecture 9.
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
FPGA Devices & FPGA Design Flow
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
2-to-1 Multiplexer: if Statement Discussion D2.1 Example 4.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
6/12/20151 Sequence Detectors Lecture Notes – Lab 4 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448.
ECE 448 FPGA and ASIC Design with VHDL
ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board.
ECE 448 FPGA and ASIC Design with VHDL Spring 2008.
Data Flow Modeling of Combinational Logic Simple Testbenches
ECE 448 FPGA and ASIC Design with VHDL
ECE 448 FPGA and ASIC Design with VHDL Spring 2010.
Welcome to the ECE 449 Computer Design Lab Spring 2005.
ECE 448: Spring 11 Lab 3 Part 1 Sequential Logic for Synthesis.
1 ECE 545 – Introduction to VHDL Dataflow Modeling of Combinational Logic Simple Testbenches ECE 656. Lecture 2.
George Mason University ECE 449 – Computer Design Lab Introduction to FPGA Devices & Tools.
ECE 448 FPGA and ASIC Design with VHDL Spring 2011.
ECE 545 Lecture 7 FPGA Design Flow.
George Mason University ECE 449 – Computer Design Lab Welcome to the ECE 449 Computer Design Lab Spring 2004.
George Mason University ECE 448 FPGA and ASIC Design with VHDL FPGA Design Flow ECE 448 Lecture 7.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Introduction to FPGA Tools
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
ECE 448 FPGA and ASIC Design with VHDL
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
George Mason University FPGA Design Flow ECE 545 Lecture 10.
ECE 448 FPGA and ASIC Design with VHDL
ECE 448 FPGA and ASIC Design with VHDL Spring 2009.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL FPGA Design Flow based on Aldec Active-HDL FPGA Board.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 1 Implementing Combinational Logic in VHDL.
ECE 545 Project 1 Introduction & Specification Part I.
Course web page: ECE 545 Introduction to VHDL ECE web page  Courses  Course web pages  ECE 545.
George Mason University Data Flow Modeling of Combinational Logic ECE 545 Lecture 5.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Implementing Combinational
RTL Design Methodology Transition from Pseudocode & Interface
ECE web page  Courses  Course web pages
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Introduction to ModelSim Implementing Sequential
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
RTL Design Methodology
Review of Aldec Active HDL Implementing Combinational
ECE 448 Lecture 6 Modeling of Circuits with a Regular Structure Aliases, Constants, Packages Mixing Design Styles ECE 448 – FPGA and ASIC Design with.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Data Flow Modeling of Combinational Logic
VHDL (VHSIC Hardware Description Language)
ECE 448 Lecture 5 FPGA Devices
VHDL Introduction.
ECE 545 Lecture 11 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
Implementing Combinational
Behavioral Modeling of Sequential-Circuit Building Blocks
Sequntial-Circuit Building Blocks
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Data Flow Description of Combinational-Circuit Building Blocks
Implementing Combinational and Sequential Logic in VHDL
Data Flow Description of Combinational-Circuit Building Blocks
Based on Xilinx ISE & ModelSim
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology Transition from Pseudocode & Interface
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
Sequntial-Circuit Building Blocks
4-Input Gates VHDL for Loops
(Carry Lookahead Adder)
Presentation transcript:

Sequential Logic for Synthesis Based on Aldec Active-HDL ECE 448: Spring 11 Lab 3 Sequential Logic for Synthesis FPGA Design Flow Based on Aldec Active-HDL Add design flow from lecture 1 Why are we interested in PRNG Generate with R=8 Reduce PRNG to 3 slides: purpose, GIF, example Add Loading circuit for PRNG

Agenda for today Part 1: Introduction to the new Lab Assignment: Square Root Unit based on CORDIC Part 2: FPGA Design Flow based on Aldec Active-HDL - using Xilinx XST - using Synplify Premier DP Part 3: Demos of Lab 2 2

Introduction to the new Lab Assignment Part 1 Introduction to the new Lab Assignment Square Root Unit based on CORDIC 3

CORDIC Algorithms - Motivation Operations such as trigonometric functions, division, and logarithms are not synthesizable. Some alternative methods Lookup tables Can require large amounts of memory. Taylor/Maclaurin series Requires multipliers CORDIC algorithms Small area = Inexpensive in hardware High latency

CORDIC Algorithm for Square Root Calculates Pseudocode y = 0 for i=N/2-1 downto 0 do temp = (y + 2i)2 if temp ≤ x then y = y + 2i end if end for sqrt_x = y (y + 2i)2 = y2 + (2i+1)y + 22i

Modified Pseudocode y = 0 y_sq = 0 for i=N/2-1 downto 0 do temp = y_sq + (2i+1)y + 22i if temp ≤ x then y = y + 2i y_sq = temp end if end for sqrt_x = y All computations performed using only addition, bit shifts, and comparisons.

Example N = 8, x = 26 i = 3, temp = 0 + 2(0)(8) + 82 = 64, y = 0, y_sq = 0 i = 2, temp = 0 + 2(0)(4) + 42 = 16, y = 4, y_sq = 16 i = 1, temp = 16 + 2(4)(2)+ 22 = 36, y = 4, y_sq = 16 i = 0, temp = 16 + 2(4)(1) + 12 = 25, y = 5, y_sq = 25 Done! sqrt_x = 5

Block Diagram “1000…..000” out_valid x in_valid Shift Reg. sqrt_x + load in_valid Shift Reg. ld_en sqrt_x N/2 Q(0) ‘0’ s_in Q N/2 2i Q D rst en + A A << B y N/2 N B (2i+1)y i+1 ld_en Down counter N Q N/2 -1 load Q A ≥ B A B L-1 N (2i )(2i)=22i A A << B L-1 i + B temp +1 L y_sq Q D rst en N L = ceil(log2(N)) N

Bonus Make output with M variable. Allows greater output precision Output is of form:

Bonus Pseudocode y = 0 y_sq = 0 x_shifted = x << (2M – N) for i=M-1 downto 0 do temp = y_sq + (2i+1)y + 22i if temp ≤ x_shifted then y = y + 2i y_sq = temp end if end for sqrt_x = y

Example N = 8, M = 6, x = 42 x_shifted = 42 << (2(6) – 8) = 42 << 4 = 672. i = 5, temp = 0 + 2(0)(32) + 322 = 1024, y = 0, y_sq = 0 i = 4, temp = 0 + 2(0)(16) + 162 = 256, y = 16, y_sq = 256 i = 3, temp = 256 + 2(16)(8) + 82 = 576, y = 24, y_sq = 576 i = 2, temp = 576 + 2(24)(4) + 42 = 784, y = 24, y_sq = 576 i = 1, temp = 576 + 2(24)(2) + 22 = 676, y = 24, y_sq = 576 i = 0, temp = 576 + 2(24)(1) + 12 = 625, y = 25, y_sq = 625 Done! x_sqrt = 25. 25/22 = 6.25 Check : sqrt(42) = 6.481

Bonus Diagram “1000…..000” x << (2M-N) out_valid in_valid Q out_valid load in_valid Shift Reg. ld_en sqrt_x M Q(0) ‘0’ s_in Q 2i M Q D rst en + A A << B M y 2M B (2i+1)y i+1 ld_en Down counter 2M Q M -1 load Q A ≥ B A B L-1 i A 2M A << B (2i )(2i)=22i L-1 + B temp +1 L y_sq Q D rst en 2M L = ceil(log2(2M)) 2M

FPGA Design Flow based on Aldec Active-HDL Part 2 FPGA Design Flow based on Aldec Active-HDL 13

FPGA Design process (1) Specification (Lab Assignments) Design and implement a simple unit permitting to speed up encryption with RC5-similar cipher with fixed key set on 8031 microcontroller. Unlike in the experiment 5, this time your unit has to be able to perform an encryption algorithm by itself, executing 32 rounds….. Specification (Lab Assignments) On-paper hardware design (Block diagram & ASM chart) VHDL description (Your Source Files) Library IEEE; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity RC5_core is port( clock, reset, encr_decr: in std_logic; data_input: in std_logic_vector(31 downto 0); data_output: out std_logic_vector(31 downto 0); out_full: in std_logic; key_input: in std_logic_vector(31 downto 0); key_read: out std_logic; ); end AES_core; Functional simulation Synthesis Post-synthesis simulation

FPGA Design process (2) Implementation Timing simulation Configuration On chip testing

Design Process control from Active-HDL

Synthesis Tools Xilinx XST Synplify Premier DP

Logic Synthesis VHDL description Circuit netlist architecture MLU_DATAFLOW of MLU is signal A1:STD_LOGIC; signal B1:STD_LOGIC; signal Y1:STD_LOGIC; signal MUX_0, MUX_1, MUX_2, MUX_3: STD_LOGIC; begin A1<=A when (NEG_A='0') else not A; B1<=B when (NEG_B='0') else not B; Y<=Y1 when (NEG_Y='0') else not Y1; MUX_0<=A1 and B1; MUX_1<=A1 or B1; MUX_2<=A1 xor B1; MUX_3<=A1 xnor B1; with (L1 & L0) select Y1<=MUX_0 when "00", MUX_1 when "01", MUX_2 when "10", MUX_3 when others; end MLU_DATAFLOW;

Implementation After synthesis the entire implementation process is performed by FPGA vendor tools Xilinx ISE/WebPACK