Implementing Combinational and Sequential Logic in VHDL

Slides:



Advertisements
Similar presentations
ECE 448 – FPGA and ASIC Design with VHDLGeorge Mason University ECE 448: Lab 2 Implementing Sequential Logic in VHDL.
Advertisements

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.
Generate a clock pulse clk inp outp
ECE 545 Project 1 Part IV Key Scheduling Final Integration List of Deliverables.
VHDL Project Specification Naser Mohammadzadeh. Schedule  due date: Tir 18 th 2.
FPGA Design Flow Based on Using Seven-Segment Displays,
ECE 448: Spring 11 Lab 3 Part 1 Sequential Logic for Synthesis.
Introduction to Experiment 7 Sorting Using PicoBlaze ECE 448 Spring 2010.
displayCtrlr Specification
CascadedBCDCntr&Display Aim : Capture, simulate and implement a 2-digit, loadable BCD up/down counter, with chip enable I/P (CE) and chip enable O/P (CEO).
Introduction to Experiment 6 Internal FPGA Memories, Pseudo Random Number Generator, Advanced Testbenches ECE 448 Spring 2009.
Lecture 5 Block Diagrams Modes of Operation of Block Ciphers.
Fibonnaci Sequence Generator and Testbench in VHDL Michael Larson.
RTL Design Methodology Transition from Pseudocode & Interface
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
Lecture 5B Block Diagrams HASH Example.
Lecture 3 RTL Design Methodology Transition from Pseudocode & Interface to a Corresponding Block Diagram.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Cipher Transmission and Storage Modes Part 2: Stream Cipher Modes CSCI 5857: Encoding and Encryption.
George Mason University Design of Controllers using Algorithmic State Machine (ASM) Charts ECE 545 Lecture 12.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
ECE 545 Project 1 Introduction & Specification Part I.
ECE 448 Lab 3 FPGA Design Flow Based on Xilinx ISE and ISim. Using Seven-Segment Displays, Buttons, and Switches.
ECE 448 Lab 3 FPGA Design Flow Based on Xilinx ISE and Isim. Using Seven-Segment Displays, Buttons, and Switches.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
Block Cipher Modes Last Updated: Aug 25, ECB Mode Electronic Code Book Divide the plaintext into fixed-size blocks Encrypt/Decrypt each block independently.
George Mason University Finite State Machines Refresher ECE 545 Lecture 11.
Introduction to the FPGA and Labs
Implementing Combinational
Class Exercise 1B.
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.
Revision2 for CENG34340 (Self study exercise no need to submit)
FPGA Implementation of Multicore AES 128/192/256
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
RTL Design Methodology
ECE 448 Lab 1a Developing Effective Testbenches
Introduction to ModelSim Implementing Sequential
RTL Design Methodology
ECE 448: Lab 6 Using PicoBlaze Fast Sorting Class Exercise 2.
Project Deliverables ECE 545 – Introduction to VHDL.
Finite State Machines Experiment 4 Introduction
Developing More Advanced Testbenches
ECE 448: Spring 2015 Lab 3 FPGA Design Flow Based on Aldec Active-HDL.
ECE 448: Spring 2018 Lab 3 – Part 2 FPGA Design Flow Based on
Using Fpro SoC with Hardware Accelerators
EE4OI4 Engineering Design
Sequential Logic for Synthesis Simulation using ModelSim
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Test Fixture (Testbench)
ECE 545 Lecture 11 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
Implementing Combinational
RTL Design Methodology Transition from Pseudocode & Interface
Implementing Combinational and Sequential Logic in VHDL
Based on Xilinx ISE & ModelSim
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology
RTL Design Methodology
Pipelined Array Multiplier Aldec Active-HDL Design Flow
ECE 448 Lab 3 – Part 1 FPGA Design Flow Based on
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology
RTL Design Methodology
Implementing Combinational
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
ECE 448 Lab 3 – Part 1 FPGA Design Flow Based on
ECE 448: Spring 2018 Lab 3 – Part 2 Design of Controllers
Presentation transcript:

Implementing Combinational and Sequential Logic in VHDL ECE 448 Lab 2 Implementing Combinational and Sequential Logic in VHDL ECE 448 – FPGA and ASIC Design with VHDL George Mason University

Agenda for today Part 1: Introduction to Lab 2 Implementing Combinational and Sequential Logic in VHDL Part 2: Lab 2 Exercise Part 3: Lab 1b Demos

Part 1 Introduction to Lab 2 ECE 448 – FPGA and ASIC Design with VHDL

Stream Cipher PCFB: Encryption Task 1 Stream Cipher PCFB: Encryption

Block vs. stream ciphers M1, M2, …, Mn m1, m2, …, mn Internal state - IS Block cipher K K Stream cipher C1, C2, …, Cn c1, c2, …, cn Ci=fK(Mi) ci = fK(mi, ISi) ISi+1=gK(mi, ISi) Every block of ciphertext is a function of the current block of message and the current internal state of the cipher Every block of ciphertext is a function of only one corresponding block of message

A typical stream cipher Sender Receiver Initialization Vector (IV) Initialization Vector (IV) key key Pseudorandom Keystream Generator Pseudorandom Keystream Generator ki keystream ki keystream mi ci ci mi message ciphertext ciphertext message

CFB (Cipher FeedBack) Mode A method for turning an arbitrary block cipher into a stream cipher Notation: EK – Block Cipher Encryption with the key K

Cipher Feedback Mode - CFB Encryption IV . . . EK EK EK EK EK . . . k1 k2 k3 kN-1 kN m1 m2 m3 mN-1 mN c1 c2 c3 cN-1 cN ci = mi  ki ki =EK(ci-1) for i=1..N, and c0 = IV

Cipher Feedback Mode - CFB Decryption IV . . . EK EK EK EK EK . . . k1 k2 k3 kN-1 kN m1 m2 m3 mN-1 mN c1 c2 c3 cN-1 cN mi = ci  ki ki =EK(ci-1) for i=1..N, and c0 = IV

Cipher Feedback Mode - CFB IV IV 1 ISi L 1 ISi L IN IN EK EK IS1 = IV ci = EK(ISi)  mi ISi+1 = ci OUT OUT 1 L 1 L ci ci mi mi

j-bit Cipher Feedback Mode - CFB IV IV shift shift L-j bits j bits L-j bits j bits 1 L-j L 1 L-j L IN IN EK EK OUT OUT j bits L-j bits j bits L-j bits 1 j L 1 j L ci ci mi mi

Stream Cipher PCFB: Block Diagram iv_reg EK p_out msg_reg d_in

Stream Cipher PCFB: Block Diagram EK iv_reg p_out msg_reg d_in

Notation

Stream Cipher PCFB: Block Diagram iv_reg p_out msg_reg d_in

Expected Waveform

Expected Timing Waveforms Given Expected Timing Waveforms Deliverables RTL VHDL code for the encryption unit of the stream cipher PCFB. 2. Testbench for the encryption unit of the stream cipher PCFB. 3. Vivado Simulator waveforms obtained by applying your testbench (in the PDF format).

Stream Cipher PCFB: Decryption Bonus Task 1 Stream Cipher PCFB: Decryption

Deliverables Block diagram of the module capable of performing both the encryption and decryption operations of PCFB (depending on the value of the control input decrypt) RTL VHDL code for the encryption/decryption unit of the stream cipher PCFB. Testbench for the encryption/decryption unit of the stream cipher PCFB. 4. Vivado Simulator waveforms obtained by applying your testbench (in the PDF format).

& Rising Edge Detector (RED) Task 2 Debouncer & Rising Edge Detector (RED)

Debouncing Buttons key bounce tBOUNCE key bounce tBOUNCE pulse width Bouncing period typically smaller than 10 ms. Pulse width typically greater than 200-500 ms.

Using Debouncer & Rising Edge Detector to Generate Short Pulses (1) DEBOUNCE_RED: Block Diagram RED – Rising Edge Detector

Using Debouncer & Rising Edge Detector to Generate Short Pulses (2)

DEBOUNCE_RED: Interface

DEBOUNCER: Interface DEBOUNCER reset output input clk

DEBOUNCER: Block Diagram

k and DD Generics k - width of the counter used to measure the debouncing period DD - debouncing period in clock cycles Values of generics given on the next slide assume that the clock frequency = 100 MHz and thus clock period = 10 ns.

k and DD Generics Option 1 (value used for simulation only): DD = 100 assuming bouncing period < 1 μs = 1000 ns condition: DD*10ns = 1000 ns => DD = 100 k=7 because 2^7 > 100 Option 2 (values used for synthesis, implementation, and experimental testing): DD = 1000000 assuming bouncing period = 10 ms condition: DD*10ns = 10ms => DD = 1,000,000 k=20 because 2^20 > 1,000,000

Rising Edge Detector - RED Turns a step function into a pulse Allows a step to drive the circuit for only one clock cycle

Rising Edge Detector: Block Diagram input clk output rising edge detector reset q clk input q output

Given Deliverables Testbench: debounce_red_tb.vhd 1. RTL VHDL code for DEBOUNCE_RED unit. 2. ModelSim Intel FPGA waveforms obtained by applying your testbench (in the PDF format).

Comparing Vivado Simulator with ModelSim Intel FPGA Task 3 Comparing Vivado Simulator with ModelSim Intel FPGA

Be ready to demonstrate using both simulators: Adding signals to the Waveform window. Including signals from lower levels of hierarchy. Using all options to run Simulation. Introducing Breakpoints and showing the execution of logic before and after a breakpoint in the Waveform window. Measuring time intervals. Dealing with Buses (Expanding and viewing all bits of a signal). Taking a signal and changing Radix to Decimal, Binary and Hexadecimal. Saving timing waveforms in Native format of the simulators. Printing output of the simulators to PDF files. Clearing waveforms.

Part 2 Lab 2 Exercise ECE 448 – FPGA and ASIC Design with VHDL

ALU: Interface

ALU: Block Diagram

Part 3 Lab 1b Demos ECE 448 – FPGA and ASIC Design with VHDL