FPGA & Pulse Width Modulation. Digital Logic. Programing the FPGA 7/23/2015. Time Allotment During the First 14 Weeks of Our Advanced Lab Course

Similar documents
SPI Slave to PWM Generation

CHAPTER 5 NOVEL CARRIER FUNCTION FOR FUNDAMENTAL FORTIFICATION IN VSI

PE713 FPGA Based System Design

SIMULATION AND IMPLEMENTATION OF LOW POWER QPSK ON FPGA Tushar V. Kafare*1 *1( E&TC department, GHRCEM Pune, India.)

I hope you have completed Part 2 of the Experiment and is ready for Part 3.

EXPERIMENT 1: INTRODUCTION TO THE NEXYS 2. ELEC 3004/7312: Signals Systems & Controls EXPERIMENT 1: INTRODUCTION TO THE NEXYS 2

Digital Fundamentals. Introductory Digital Concepts

Digital Systems Design

WHAT ARE FIELD PROGRAMMABLE. Audible plays called at the line of scrimmage? Signaling for a squeeze bunt in the ninth inning?

CHAPTER III THE FPGA IMPLEMENTATION OF PULSE WIDTH MODULATION

Method We follow- How to Get Entry Pass in SEMICODUCTOR Industries for 2 nd year engineering students

FPGA Implementation of Digital Modulation Techniques BPSK and QPSK using HDL Verilog

Digital Design With Cpld Applications And Vhdl 2nd Edition Solution Manual

VLSI IMPLEMENTATION OF MODIFIED DISTRIBUTED ARITHMETIC BASED LOW POWER AND HIGH PERFORMANCE DIGITAL FIR FILTER Dr. S.Satheeskumaran 1 K.

Stratix Filtering Reference Design

Field Programmable Gate Array Implementation and Testing of a Minimum-phase Finite Impulse Response Filter

EE19D Digital Electronics. Lecture 1: General Introduction

CHAPTER 4 FIELD PROGRAMMABLE GATE ARRAY IMPLEMENTATION OF FIVE LEVEL CASCADED MULTILEVEL INVERTER

GENERATION OF PWM PULSES IN VHDL TO DRIVE THREE PHASE INVERTER

Written exam IE1204/5 Digital Design Friday 13/

Single Chip FPGA Based Realization of Arbitrary Waveform Generator using Rademacher and Walsh Functions

Spectral Monitoring/ SigInt

Technology Timeline. Transistors ICs (General) SRAMs & DRAMs Microprocessors SPLDs CPLDs ASICs. FPGAs. The Design Warrior s Guide to.

CHAPTER IV DESIGN AND ANALYSIS OF VARIOUS PWM TECHNIQUES FOR BUCK BOOST CONVERTER

Cyclone II Filtering Lab

CS/EE Homework 9 Solutions

Configuring CorePWM Using RTL Blocks

Generation of Gaussian Pulses using FPGA for Simulating Nuclear Counting System

Stratix II Filtering Lab

RAPID PROTOTYPING OF CONTROL SYSTEMS FROM ELECTROMAGNETIC TRANSIENT SIMULATOR PROGRAM

CHAPTER 6 IMPLEMENTATION OF FPGA BASED CASCADED MULTILEVEL INVERTER

ECE 124 Digital Circuits and Systems Winter 2011 Introduction Calendar Description:

The Application of System Generator in Digital Quadrature Direct Up-Conversion

PRESENTATION OF THE PROJECTX-FINAL LEVEL 1.

Types of Control. Programmed Non-programmed. Program Counter Hardwired

Implementation of Huffman Decoder on Fpga

Wideband Spectral Measurement Using Time-Gated Acquisition Implemented on a User-Programmable FPGA

Basic FPGA Tutorial. using VHDL and VIVADO to design two frequencies PWM modulator system

Digital Logic ircuits Circuits Fundamentals I Fundamentals I

Rapid Design of FIR Filters in the SDR- 500 Software Defined Radio Evaluation System using the ASN Filter Designer

FPGA Based System Design

Simple Sigma-Delta ADC Reference Design

Datorstödd Elektronikkonstruktion

Simple Traffic Light Controller A Digital Systems Design Project

FPGA Implementation of a Digital Tachometer with Input Filtering

Real-Time Testing Made Easy with Simulink Real-Time

Design and synthesis of FPGA for speed control of induction motor

EECS 270: Lab 7. Real-World Interfacing with an Ultrasonic Sensor and a Servo

INTRODUCTION. In the industrial applications, many three-phase loads require a. supply of Variable Voltage Variable Frequency (VVVF) using fast and

DIGITAL SYSTEM DESIGN WITH VHDL AND FPGA CONTROLLER BASED PULSE WIDTH MODULATION

Field Programmable Gate Arrays based Design, Implementation and Delay Study of Braun s Multipliers

ADS9850 Signal Generator Module

Lecture 3, Handouts Page 1. Introduction. EECE 353: Digital Systems Design Lecture 3: Digital Design Flows, Simulation Techniques.

USB-PWM10. User s Manual

Using Soft Multipliers with Stratix & Stratix GX

Research Article. Amiya Karmakar Ȧ,#, Deepshikha Mullick Ḃ,#,* and Amitabha Sinha Ċ. Abstract

A COMPARATIVE ANALYSIS OF AN ULTRA-LOW VOLTAGE 1-BIT FULL SUBTRACTOR DESIGNED IN BOTH DIGITAL AND ANALOG ENVIRONMENTS

CMOS VLSI IC Design. A decent understanding of all tasks required to design and fabricate a chip takes years of experience

Signal Processing and Display of LFMCW Radar on a Chip

VLSI Implementation of Image Processing Algorithms on FPGA

IMPLEMENTATION OF QALU BASED SPWM CONTROLLER THROUGH FPGA. This Chapter presents an implementation of area efficient SPWM

Xilinx Implementation of Pulse Width Modulation Generation using FPGA

USB4. Encoder Data Acquisition USB Device Page 1 of 8. Description. Features

A HIGH PERFORMANCE HARDWARE ARCHITECTURE FOR HALF-PIXEL ACCURATE H.264 MOTION ESTIMATION

Digital Fundamentals 8/25/2016. Summary. Summary. Floyd. Chapter 1. Analog Quantities

Published by: PIONEER RESEARCH & DEVELOPMENT GROUP ( 1

FPGA Circuits. na A simple FPGA model. nfull-adder realization

FPGA IMPLEMENTATION OF POWER EFFICIENT ALL DIGITAL PHASE LOCKED LOOP

Digital Circuits II Lecture 6. Lab Demonstration 3 Using Altera Quartus II to Determine Simplified Equations & Entering Truth Table into VHDL

PC-OSCILLOSCOPE PCS500. Analog and digital circuit sections. Description of the operation

A Novel Approach For the Design and Implementation of FPGA Based High Speed Digital Modulators Using Cordic Algorithm

FPGA-based Digital Signal Processing Trainer

Lecture 1. Tinoosh Mohsenin

1. R-2R ladder Digital-Analog Converters (DAC). Connect the DAC boards (2 channels) and Nexys 4 board according to Fig. 1.

Lab 2.2 Custom slave programmable interface

ArbStudio Training Guide

Video Enhancement Algorithms on System on Chip

Laboratory for the Introductory Digital Course

IJSRD - International Journal for Scientific Research & Development Vol. 5, Issue 06, 2017 ISSN (online):

DYNAMICALLY RECONFIGURABLE PWM CONTROLLER FOR THREE PHASE VOLTAGE SOURCE INVERTERS. In this Chapter the SPWM and SVPWM controllers are designed and

FPGAs: Why, When, and How to use them (with RFNoC ) Pt. 1 Martin Braun, Nicolas Cuervo FOSDEM 2017, SDR Devroom

An Efficient Method for Implementation of Convolution

Analog Arts SF990 SF880 SF830 Product Specifications

Enhancing Analog Signal Generation by Digital Channel Using Pulse-Width Modulation

CHAPTER 5 IMPLEMENTATION OF MULTIPLIERS USING VEDIC MATHEMATICS

Hardware Implementation of BCH Error-Correcting Codes on a FPGA

Behavioral Simulator of Analog-to-Digital Converters

Automated Generation of Built-In Self-Test and Measurement Circuitry for Mixed-Signal Circuits and Systems

VHDL Implementation Of PWM Technique For Generation Of Switching Pulses

Ring Counter. 4-bit Ring Counter using D FlipFlop. VHDL Code for 4-bit Ring Counter and Johnson Counter 1. Contents

An FPGA-based Re-configurable 24-bit 96kHz Sigma-Delta Audio DAC

Instructional Demos, In-Class Projects, & Hands-On Homework: Active Learning for Electrical Engineering using the Analog Discovery

The counterpart to a DAC is the ADC, which is generally a more complicated circuit. One of the most popular ADC circuit is the successive

EFFICIENT FPGA IMPLEMENTATION OF 2 ND ORDER DIGITAL CONTROLLERS USING MATLAB/SIMULINK

APPLICATION OF PROGRAMMABLE LOGIC DEVICES FOR ACQUISITION OF ECG SIGNAL WITH PACEMAKER PULSES 1. HISTORY OF PROGRAMMABLE CIRCUITS

DigitalFrequencySynthesisusingMultiPhaseNCOforDielectricCharacterizationofMaterialsonXilinxZynqFPGA

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

FPGA-BASED PULSED-RF PHASE AND AMPLITUDE DETECTOR AT SLRI

CHAPTER FIVE - Flip-Flops and Related Devices

A Low Power VLSI Design of an All Digital Phase Locked Loop

Transcription:

1.9.8.7.6.5.4.3.2.1.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 DAC Vin 7/23/215 FPGA & Pulse Width Modulation Allotment During the First 14 Weeks of Our Advanced Lab Course Sigma Delta Pulse Width Modulated Sine Wave Lab Instruments (1 Week) DAQ Cards / Programming (4 Weeks) BFY BFY Workshop 3 University of Maryland 215 Kurt Wick (wick@umn.edu) University of Minnesota Microprocessors (none) Circuits: Analog & Digital (Analog: 5 Weeks, Digital 4 Weeks) Digital Logic Rules of Digital logic are relatively few but (interesting) designs often require: Large number of components Fast clock speeds Conclusion: today s circuit very rarely use the old ASSP (Application-Specific Standard Products) such as the74 series gates. They either use ASIC (Application Specific Integrated Circuits) or FPGAs or CPLDs. Field Programmable Gate Arrays (FPGAs) and Complex Programmable Logic Devices (CPLDs) Number of Generic Gates: 1 to a few millions. Number of Flip-Flops: 2 and above Clock Speed: 25 MHz up to GHz range. Pins: 1 to 4. Cost: a few dollars Programing the FPGA Step 1: Implementing Your Design Approaches Step1: Implement Your Design Step 2: Assign Pins to I/O Ports HDL (Hardware Description Language) Verilog VHDL Step 3: Generate Bit File / Firmware Step 4: Transfer Bit File to FPGA Graphical Interface Xilinx Schematic LabView 1

Voltage (arbs) 7/23/215 Implementing Your Design in a Graphical Environment: Creating a 4 Bit Full Adder Simple 1 Bit Adder 4-Bit Adder Implementing Your Design in a Graphical Environment (continued) Eas(ier) to learn than HDL Displays parallel nature of circuits! No Standard LabView Version will only work with LabView boards. Step 1: Implementing Your Design in HDL Verilog Users: 5% C-Based: Case sensitive IEEE Standard 1364-25 VHDL Users: 5% Based on ADA: not case sensitive IEEE Standard 176-28 Student Lab Assignment: Radiation Counter module MyAndGate( input a, input b, output q); assign q = a&b; module -- import std_logic from the IEEE library library IEEE; use IEEE.std_logic_1164.all; -- this is the entity entity ANDGATE is port ( I1 : in std_logic; I2 : in std_logic; O : out std_logic); entity ANDGATE; -- this is the architecture architecture RTL of ANDGATE is begin O <= I1 and I2; architecture RTL; Block Diagram PWM Theory V out = τ on τ swc V on PWM Circuit Components Low Pass Filter / Averager V on 1.8 τ swc.6.4 τ on <> Desired Voltage Level.2-5 5 1 15 2 25 (arbs) Clock FPGA / Verilog Module 2

7/23/215 Simple PWM Control Algorithm An n-bit counter continuously increments from to its maximum value, i.e., 2 n -1 and then repeats the cycle. Range of input value x_in: x_in 2 n -1 if ( counter < x_in ) PWM_out <= 1; PWM_out <= ; counter <= counter+1; Verilog Implementation of Simple 8 Bit PWM Algorithm module SimplePWM(clk_in, x_in, PWM_out); input clk_in; //clock for counter input [7:] x_in; //control value that //defines pulse width output reg PWM_out = 1; //PWM signal out reg [7:] counter = ; always@ (posedge clk_in )begin if ( counter < x_in ) PWM_out <= 1; PWM_out <= ; counter <= counter+1; module A2D Key Concepts: Resolution / Sensitivity Resolution of an n-bit PWM A2D is: V on / 2 n (Hypothetical) Resolution for our BASYS board PWM A2D with V on = 5 Volts would be: bits Resolution (Volts) 8 1.9E-2 16 7.6E-5 32 1.2E-9 64 2.7E-19 A2D Key Concepts: Conversion It takes at least one complete counter cycle to average V out. For a counter running at f o, this corresponds to: 2 n /f o (Optimal) Conversion for our BASYS board PWM A2D with f o = 25 MHz: Bits Resolution (Volts) Conversion 8 1.9E-2 1.2 usec 16 7.6E-5 2.6 msec 32 1.2E-9 2.8 min 64 2.7E-19 23 years Though V out (t) is different in each of these timing diagrams, <V out > remains identical. Sigma Delta Concepts Sigma Delta PWM Algorithm if ( Sigma >= Delta ) { Sigma = (Sigma Delta) + x_in; Out = 1; } { Sigma = Sigma + x_in; Out = ; } 3

1.9.8.7.6.5.4.3.2.1 Sigma Delta Pulse Width Modulated Sine Wave.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7/23/215 DAC Vin PWM Application: Music Player Conclusions about PWM Pulse Width Modulation can be used to create an analog signal from a digital signal. Allows the reduction of a DC signal while being much more energy efficient than, for example, a passive voltage divider. Sigma Delta algorithm can also be used for voltage to frequency conversion. Educational Goals The PWM exercises expose students to basic digital concepts such as clocks and counters. They are easily implemented with an FPGA and thereby exposes students with this ubiquitous electronic component. Familiarizes them with digital-to-analog converters and the basic concepts of resolution and conversion time. The exercise can be exted by turning it into an analog-to-digital converter using successive approximation and a state machine. Successive Approximation A2D Verilog State Machine 1st approximation 2nd approximation 3rd approximation vs. t showing the different guesses and How the circuit approaches the final value. Successive Approximation A2D Verilog State Machine 1st approximation reg [7:] mask_now = 8'b1_; reg [7:] mask_next = 8'b1_; parameter ADJ_MASK = 2'b; parameter INIT = 2'b1; parameter COMP_ADJUST = 2'b1; parameter DONE = 2'b11; (* FSM_ENCODING="SEQUENTIAL", SAFE_IMPLEMENTATION="YES", SAFE_RECOVERY_STATE="<recovery_state_value>" *) reg [1:] state = INIT; always@(posedge sys_clk) (* PARALLEL_CASE, FULL_CASE *) case (state) INIT : begin //initalize all parameters state <= COMP_ADJUST; mask_now <= 8'b1_; mask_next <= 8'b1_; ADC_out <= 8'b1_; busy <= 1; COMP_ADJUST : begin //adjust DAC output based on comp_in value; also set next lower bit if (mask_now == 1) state <= DONE; state <= ADJ_MASK; if( comp_in ) ADC_out <= (ADC_out ^ mask_now) mask_next; ADC_out <= ADC_out mask_next; ADJ_MASK : begin //adjust the masks which define the bits that are currently guessed state <= COMP_ADJUST; mask_now <= mask_now >> 1; mask_next <= mask_next >> 1; IP (Intellectual Property) Cores Add New Source: in the Source Wizard select: IP (CORE Generator and Architecture Wizard.) Free IP Cores in the ISE Webpack: Signal Processing: FIR Filters Transforms: FFT Math Functions (Trig, Divide, Square Root etc.) Embedded Microprocessors DONE : begin //s the conversion done message state <= INIT; busy <= ; default : begin // Fault Recovery state <= INIT; case Using a Trigonometric IP Core to Create an Arbitrary Waveform 4

7/23/215 Additional Projects: Using IP Cores for Embedded Designs Using a Microprocessor to Communicate with the PC Additional Resources Books Advanced Digital Design with the Verilog HDL (2nd Edition) [Hardcover] Michael D. Ciletti Web Sites Opencores is a website that lets users upload and download their VHDL and Verilog code. It contains a large repository for communications controllers (SPI, Serial etc) and microprocessors: http://opencores.org/ Our Wiki Page: https://wiki.umn.edu/mxp/alphaworkshop 5