Objectives. After completing this module, you will be able to:

Similar documents
Basic Xilinx Design Capture. Objectives. After completing this module, you will be able to:

Intro to System Generator. Objectives. After completing this module, you will be able to:

Xilinx System Generator v Xilinx Blockset Reference Guide. for Simulink. Introduction. Xilinx Blockset Overview.

COMP Overview of Tutorial #2

Introduction to DSP/FPGA Programming Using MATLAB Simulink

Inf2C - Computer Systems Lecture 2 Data Representation

SDR Spring KOMSYS-F6: Programmable Digital Devices (FPGAs)


Arithmetic Operations

Number Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as:

Chapter 4. Operations on Data

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

An Efficient Implementation of Floating Point Multiplier

Chapter 1 Review of Number Systems

But first, encode deck of cards. Integer Representation. Two possible representations. Two better representations WELLESLEY CS 240 9/8/15

LogiCORE IP Floating-Point Operator v6.2

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

Chapter 2: Number Systems

Number Systems. Decimal numbers. Binary numbers. Chapter 1 <1> 8's column. 1000's column. 2's column. 4's column

Chapter 10 Binary Arithmetics

Chapter 3: Dataflow Modeling

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

Microcomputers. Outline. Number Systems and Digital Logic Review

Parallel FIR Filters. Chapter 5

EE292: Fundamentals of ECE

Number System. Introduction. Decimal Numbers

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

Method We follow- How to Get Entry Pass in SEMICODUCTOR Industries for 3rd year engineering. Winter/Summer Training

MC1601 Computer Organization

Number Systems CHAPTER Positional Number Systems

C NUMERIC FORMATS. Overview. IEEE Single-Precision Floating-point Data Format. Figure C-0. Table C-0. Listing C-0.

COMP2611: Computer Organization. Data Representation

Tutorial - Using Xilinx System Generator 14.6 for Co-Simulation on Digilent NEXYS3 (Spartan-6) Board

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR

Reserved Words and Identifiers

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

BINARY SYSTEM. Binary system is used in digital systems because it is:

Lab Assignment 2. Implementing Combinational and Sequential Logic in VHDL

#RRNKECVKQP0QVG. A Two s-complement Fractional Multiplier

Chapter 3: part 3 Binary Subtraction

Octal & Hexadecimal Number Systems. Digital Electronics

ECEN 468 Advanced Logic Design

CMPE223/CMSE222 Digital Logic Design. Positional representation

Implementing MATLAB Algorithms in FPGAs and ASICs By Alexander Schreiber Senior Application Engineer MathWorks

Module 2: Computer Arithmetic

Double Precision Floating-Point Multiplier using Coarse-Grain Units

Computer Arithmetic. L. Liu Department of Computer Science, ETH Zürich Fall semester, Reconfigurable Computing Systems ( L) Fall 2012

Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Lecture 3

Arithmetic Operators. Portability: Printing Numbers

Tutorial. CASPER Reference Design

CS107, Lecture 3 Bits and Bytes; Bitwise Operators

Binary Values. CSE 410 Lecture 02

Measuring Improvement When Using HUB Formats to Implement Floating-Point Systems under Round-to- Nearest

CS 101: Computer Programming and Utilization

Lecture 3: Basic Adders and Counters

World Inside a Computer is Binary

Verilog Dataflow Modeling

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Architecture and Design of Generic IEEE-754 Based Floating Point Adder, Subtractor and Multiplier

14:332:231 DIGITAL LOGIC DESIGN. Hardware Description Languages

D I G I T A L C I R C U I T S E E

Representation of Numbers and Arithmetic in Signal Processors

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

Organisasi Sistem Komputer

TSIU03, SYSTEM DESIGN LECTURE 2

Time (self-scheduled): Location Schedule Your Exam: What to bring:

Numbering systems. Dr Abu Arqoub

Operators in C. Staff Incharge: S.Sasirekha

Operations, Operands, and Instructions

Topic Notes: Bits and Bytes and Numbers

structure syntax different levels of abstraction

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design

LogiCORE IP Multiply Adder v2.0

Quixilica Floating Point FPGA Cores

LAB A Translating Data to Binary

CO212 Lecture 10: Arithmetic & Logical Unit

CHW 261: Logic Design

A complement number system is used to represent positive and negative integers. A complement number system is based on a fixed length representation

Lab Assignment 1. Developing and Using Testbenches

University, Patiala, Punjab, India 1 2

FIR Filter IP Core User s Guide

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Time: 8:30-10:00 pm (Arrive at 8:15 pm) Location What to bring:

Topic Notes: Bits and Bytes and Numbers

Bits, Bytes, and Integers

A High Speed Binary Floating Point Multiplier Using Dadda Algorithm

An FPGA based Implementation of Floating-point Multiplier

COMP 122/L Lecture 2. Kyle Dewey

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

Number representations

ECE 5775 (Fall 17) High-Level Digital Design Automation. Fixed-Point Types Analysis of Algorithms

Figurel. TEEE-754 double precision floating point format. Keywords- Double precision, Floating point, Multiplier,FPGA,IEEE-754.

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Arithmetic (a) The four possible cases Carry (b) Truth table x y

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

Operators and Expressions in C & C++ Mahesh Jangid Assistant Professor Manipal University, Jaipur

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.

DA-FIR Filter Generator User s Guide

Transcription:

Signal Routing This material exempt per Department of Commerce license exception TSU Objectives After completing this module, you will be able to: Describe how signals are converted through Gateway In blocks State supporting blocks for routing signals List the blocks which use additional resources and which do not Identify circumstances under which blocks consumes additional resources Signal Routing 2 1

Outline Signal Conversion Bit Picking Reinterpret Block Convert Block Concat Block Slice Block BitBasher Block Expression Block Summary Signal Routing 3 IP Wrappers Every IP core has a wrapper to interface between the Simulink tool and the hardware Each SysGen block has an RTL HDL wrapper to: Extend the IP core functionality Simplify the IP core interface Supports fixed-point arithmetic Number of bits, binary point Overflow and quantization Valid bit control on some cores COREGen IP Core (<desgn>_<family>_<ver>_<has>.edn Note: a Simulink parameter may not be identical to the corresponding CORE Generator software parameter Wrapper models will be generated and placed in one file MultGen v6.0 SysGen VHDL IP Core Wrapper Signal Routing 4 2

Implications of IP Wrappers System-level abstraction is very expressive and powerful, but it comes at the expense of hardware. Be aware! Saturation arithmetic and rounding require hardware (full adder and comparator) Excess latency is implemented with a shift register (SRL16/32) on the core output Some System Generator blocks perform implicit conversion of inputs Unsigned to signed Sign extension Zero padding SysGen mask parameters may not be identical to COREGen parameters The valid-bit pipeline parallels the datapath; typically implemented by using SRL16/32 Signal Routing 5 Quantization and Overflow Signal Routing 6 3

Quantization Quantization occurs when the number of fractional bits is insufficient to represent the fractional portion of a value You can: Truncate: Discard bits to the right of the least significant bit Round: Round to the nearest representable value or to the value farthest from zero if there are two equidistant nearest representable values Full Precision 1 0 1 1 0 1 1 1 1 0 1 0 1 0 0 0 0 FIX_12_9 1 0 1 1 0 1 1 1 1 0 1 0 -Truncate -2.26171875 FIX_12_9 1 0 1 1 0 1 1 1 1 0 1 0 - Round -2.26171875 Signal Routing 7 Overflow Overflow occurs when a value lies outside the representable range You can: Saturate to the largest positive (or maximum negative) value Wrap the value (that is, discard any significant bits beyond the most significant bit in the fixed-point number) Flag an overflow as a Simulink error during simulation (13.6875) 0 1 1 0 1 1 0 1 1 Full-Precision Output - Saturate (3.9375) 0 1 1 1 1 1 1 FIX_7_4 - Wrap (-2.3125) 1 0 1 1 0 1 1 FIX_7_4 Signal Routing 8 4

Quantization and Overflow Whatever option is selected, the generated HDL model and Simulink model will behave identically This also means that rounding and saturation will use FPGA resources Signal Routing 9 Outline Signal Conversion Bit Picking Reinterpret Block Convert Block Concat Block Slice Block BitBasher Block Expression Block Summary Signal Routing 10 5

Picking Bits Why do you do it? To reinterpret unsigned data as signed or the converse To combine two data buses together to form a new bus To force a conversion of data type, including the number of bits and binary bits To extract certain bits of data, especially when there is bit growth Signal Routing 11 Xilinx Blocks Reinterpret Available in basic elements, math, and index libraries Concat Available in basic elements, data types, and index libraries Convert Available in basic elements, data types, math, and index libraries Slice Available in basic elements, control logic, data types, and index libraries Signal Routing 12 6

Outline Signal Conversion Bit Picking Reinterpret Block Convert Block Concat Block Slice Block BitBasher Block Summary Signal Routing 13 Reinterpret Block This block forces its output into a new type without any regard for retaining the numerical value represented by the input The total number of bits in equals the total number of bits out This block allows unsigned data to be reinterpreted as signed data and the converse This block also allows scaling of the data through repositioning of the binary point Does not use the Xilinx LogiCORE solution and hardware resources Signal Routing 14 7

Reinterpret Block Reinterpret the FIX_10_8 number and force the binary point to position 5 0 1 1 0 0 0 0 0 0 0 FIX_10_8 0 1 1 0 0 0 0 0 0 0 FIX_10_5 +1.5 +12 Signal Routing 15 Outline Signal Conversion Bit Picking Reinterpret Block Convert Block Concat Block Slice Block BitBasher Block Summary Signal Routing 16 8

Convert Block The Xilinx convert block converts each input sample into a number of a desired arithmetic type A number can be converted to a signed (twos complement), unsigned value, or Boolean The total number of bits and the binary point are specified by the user Overflow and quantization options apply to the output value Does not use Xilinx LogiCORE solution resources, but it may use additional hardware depending on the overflow and quantization options Signal Routing 17 Convert Block What is it doing? You specify the total number of bits, where the binary point is located, and the arithmetic type (signed or unsigned) First, it lines up the binary point between the input and output port types Next, the total number of bits and the binary point that you specify are used, and if overflow and quantization options are used, the output may change, as opposed to dropping bits Signal Routing 18 9

Convert Block The following through the convert block would result in the same value using a different number of bits and binary point FIX_10_8 0 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 FIX_7_4 Signal Routing 19 Convert Block Saturating the overflow can change the fractional number to get the saturated value Rounding the quantization can also affect the value to the left of the binary point (the whole number) Signal Routing 20 10

Convert Block When you convert to a Fix_6_0, how do you get two different values? OVERFLOW - Wrap - Saturate - Flag Error 0 1 1 0 0 0 0 0 0 0 FIX_10_8 0 0 0 0 1 0 FIX_6_0 0 0 0 0 0 1 FIX_6_0 QUANTIZATION - Truncate - Round Round to decimal +2 Add 1 to round Truncate to decimal +1 Drop the bits Signal Routing 21 Outline Signal Conversion Bit Picking Reinterpret Block Convert Block Concat Block Slice Block BitBasher Block Summary Signal Routing 22 11

Concat Block Performs a concatenation of up to 16 bit vectors All inputs must be unsigned integers That is, unsigned numbers with binary points at position zero The Reinterpret block provides signed-to-unsigned conversion capabilities that can extend the functionality of the concat block Does not use the Xilinx LogiCORE solution and hardware resources Signal Routing 23 Outline Signal Conversion Bit Picking Reinterpret Block Convert Block Concat Block Slice Block BitBasher Block Summary Signal Routing 24 12

Slice Block The Xilinx Slice block allows you to slice off a sequence of bits from your input data and create a new data value The output data type is unsigned, with its binary point at zero It can be of type Boolean when the output size is one bit Signal Routing 25 Slice Block Take a slice of the FIX_10_8 number by taking a four-bit slice and offsetting the bottom bit of the slice by five bits 0 1 1 0 0 0 0 0 0 0 +1.5 Upper-bit location + width: Offset of top bit from MSB = 0 and width = 4 12 0 1 1 0 6 Two-bit locations: Offset of top bit from MSB of input = -1 and offset of bottom bit from LSB of input = 5 12 Signal Routing 26 13

Outline Signal Conversion Bit Picking Reinterpret Block Convert Block Concat Block Slice Block BitBasher Block Expression Block Summary Signal Routing 27 BitBasher Block Bit manipulation and augmentation through textual specification Based on Verilog syntax Supports Concatenation, Slicing and Repeat operators Allows augmentation with constants specified as binary, decimal, octal or hex At least one of the inputs must be from input port Supports up to four outputs Number of Output type and Binary point fields available in Output Type tab depends on number of output equations in Basic tab Signal Routing 28 14

BitBasher Examples Concat inputs b,d,e and f : a = {b,d,e,f} Input b forms the msb s of output a and f forms the lsb s of output a Slicing a = {b[17:7]} Bits are numbered from 0(lsb) - bit_width-1(msb) Bit reversal a = {b[0:7]} B input is assumed to be 8 bits wide Repeating a = {4{b,d}} 4 represents the repeat factor for the enclosed expression {b,d} and is equivalent to {b,d,b,d,b,d,b,d} Signal Routing 29 BitBasher Examples Using constants a={4'o14,4'hf,3'b110,5'd22,b} 4 o14 represents an octal constant(4 o14) of bit-width 4(4 o14) and octal value 14(4 o14).b,d,h represent binary, decimal and hex respectively Must have at least one variable Multiple output New-line is used as a separator of each output expression Signal Routing 30 15

Outline Signal Conversion Bit Picking Reinterpret Block Convert Block Concat Block Slice Block BitBasher Block Expression Block Summary Signal Routing 31 Expression Block This block performs a bitwise logical expression The expression is specified with operators And - & (highest precedence) Or - Not - ~ Xor - ^ (lowest precedence) Precedence can be changed by using parenthesis The number of input ports is inferred from the expression Maximum of 16 possible input ports The input port labels are identified from the expression, and the block is subsequently labeled accordingly Block parameters Expression: Bitwise logical expression Align Binary Point: Specifies that the block must align binary points automatically. If not selected, all inputs must have the same binary point position Signal Routing 32 16

Expression Block Entering the following expression in the block parameters Expression field will generate the resulting symbol ~((A1 A2) & (B1 ^ B2)) Signal Routing 33 Outline Signal Conversion Bit Picking Reinterpret Block Convert Block Concat Block Slice Block BitBasher Block Expression Block Summary Signal Routing 34 17

Knowledge Check Signal Routing 35 Knowledge Check What is quantization? Why does it occur? State the two options available to handle it What is an overflow? Why does it occur? State the three options available to handle it Signal Routing 36 18

Answers What is quantization? Why does it occur? State the two options available to handle it Quantization is a process of handling higher-precision number representation with a lower-precision number representation In the Simulink tool, the numbers are represented in double-precision; whereas in the Xilinx blockset, the numbers are represented in fixed point Truncate and Rounding are the two available options to handle it What is an overflow? Why does it occur? State the three options available to handle it An overflow occurs when a large number is represented in a smaller range representation In the Simulink tool, the numbers are represented in double-precision; whereas in the Xilinx blockset, the numbers are represented in fixed point Saturate, Wrap the value, and Flag an Error are the three available options Signal Routing 37 Knowledge Check What is the purpose of HDL wrapper? Why do you need bit picking? State the four blocks available for this purpose Signal Routing 38 19

Answers What is the purpose of HDL wrapper? Extend the IP core/block functionality, allowing various data types Simplify the IP core interface, providing only necessary ports on a block For example, DSP48 macro Why do you need bit picking? State the four blocks available for this purpose There may be a need to: Combine two data buses together to form a new bus Force a conversion of data type, including the number of bits and binary bits Reinterpret unsigned data as signed or the converse Extract certain bits of data, especially when there is bit growth The four blocks available are: Concat, Convert, Reinterpret, Slice Signal Routing 39 Knowledge Check Signed Data Truncate and Wrap Signed Data Output Binary Point of 3 Total Number of Bits 3 Bottom Slice offset by 5 from the LSB Signal Routing 40 20

Answers Number Input Convert Reinterpret Slice 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 Signed Data Truncate and Wrap Signed Data Output Binary point of 3 Total Number of Bits 3 Bottom of Slice offset by 5 from the LSB Signal Routing 41 Summary Quantization and overflow options are available when the output of a block is user defined Quantization occurs when the number of fractional bits is insufficient to represent the fractional portion of a value Overflow occurs when a value lies outside the representable range Bit picking blocks allow combining of multiple busses into a single bus, force a conversion of data type without changing the number of bits, extract bits, and convert the number into different format BitBasher block allows bit manipulation and augmentation through textual specification BitBasher block may have up to four outputs Expression block provides a convenient way to implement complex combinatorial expression Signal Routing 42 21

Where Can I Learn More? Software documentation Simulink Browser Help Simulink Help Xilinx System Generator BlockSet Reference Pages Block Reference Pages Bitbasher, Concat, Convert, Expression, Gateway In, Reinterpret, Slice On-line documentation www.xilinx.com/products/software/sysgen/sysgen_ug.pdf Support Website DSP Website: http://www.xilinx.com/dsp Signal Routing 43 22