FPGA Fixed-Point Math Library User Guide

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "FPGA Fixed-Point Math Library User Guide"

Transcription

1 Contents 1. Overview DISCLAIMER: National Instruments does not support the FPGA Fixed-Point Math Library. The library is an internal product, so you are using the library at your own risk. 2. Common Characteristics 3. VI Reference 3.1. AddSub 3.2. Discrete Delay 3.3. Integer Accumulator 3.4. FXP To Fixed-Point 3.5. FXP Add 3.6. FXP Subtract 3.7. FXP Multiply 3.8. FXP Divide 3.9. FXP Reciprocal FXP Square Root CORDIC VIs FXP Sin & Cos FXP Atan FXP Polar To Rect FXP Rect To Polar FXP Sinh & Cosh FXP Exponential FXP Natural Logarithm FPGA Fixed-Point Math Library User Guide Page 1 of 50

2 1. Overview The fixed-point math library contains a set of FPGA IPs for elementary mathematical functions that work with the LabVIEW FPGA Module. These IPs are grouped into two categories: basic elements and fixed-point math VIs. The basic elements perform integer computation, while the fixed-point VIs perform fixed-point computation. Specifically, the following VIs are in the library: Basic elements: 1). AddSub 2). Discrete delay 3). Integer accumulator Fixed-point math VIs: 1). To Fixed-Point 2). Add 3). Subtract 4). Multiply 5). Divide 6). Reciprocal 7). Square root 8). CORDIC VIs: a. Sin & Cos b. Atan2 c. Polar To Rect d. Rect To Polar e. Sinh & Cosh f. Exponential g. Natural logarithm where CORDIC VIs refer to VIs implemented with CORDIC algorithms. National Instruments implemented all above VIs as configurable nodes. The VIs generate optimized FPGA code according to your configuration. Meanwhile, all VIs support bit-true and cycle-accurate simulation. So you can develop and simulate your applications on the desktop first and then compile them and deploy them to hardware targets. Page 2 of 50

3 2. Common Characteristics 2.1 Configurability All VIs are configurable. You can display the configuration dialog box by either double-clicking a VI or right-clicking the VI and selecting Properties from the shortcut menu. Some options on configuration dialog boxes might not be configurable or applicable depending on the VI and other configuration options. Non-configurable or inapplicable options are dimmed. For example, the input of FXP Square Root can only be unsigned, so the Signed and Unsigned options of x type are dimmed and the Unsigned option is always selected. As another example, in FXP Sin & Cos, the Cycles per sample option is applicable only when the execution mode is Inside single-cycle timed loop. So, the option is dimmed if the execution mode is Outside single-cycle timed loop. All configuration dialog boxes have a Configuration Feedback section, which includes important implementation information corresponding to the current configuration. 2.2 Constraints on input fixed-point data type Some VIs might not support the entire spectrum of the fixed-point data type. For example, FXP Sin & Cos only supports inputs with word length that is greater than or equal to 4 bits. And FXP Square Root only supports unsigned fixed-point inputs. Refer to the VI Reference section for the specific constraints of each VI. 2.3 Adapt to inputs Input terminals of fixed-point type can adapt to supported input data types. You cannot configure the type information of an input terminal if it has adapted to the type wired to it because its type is determined by the input data type. 2.4 Execution mode VIs that take multiple cycles per computation have two different execution modes: Inside singlecycle timed loop and Outside single-cycle timed loop. Examples of such VIs include FXP Division, FXP Square Root, and all CORDIC VIs. You can select the execution mode in configuration dialog boxes. If you select Inside single-cycle timed loop for a VI, you can only place it inside a single-cycle timed loop. Similarly, if you select Outside single-cycle timed loop, you cannot place the VI inside a single-cycle timed loop. Otherwise, the Code Generation Errors window reports an error when you compile the VI. Outside single-cycle timed loop: Select this option to return a valid output after every call to the VI. Inside single-cycle timed loop: Select this option to guarantee that the VI executes in one cycle. The VI returns a computation result after each cycle and uses the output valid output to indicate whether the computation is complete and the returned result is the valid Page 3 of 50

4 final result. Refer to the Handshaking terminals section below for more information about the output valid output. 2.5 Handshaking terminals VIs configured with the Inside single-cycle timed loop execution mode have handshaking terminals (input valid, output valid, and ready for input) to assist interconnection with upstream and downstream VIs. The protocol for the handshaking terminals is specified as follows: (1) ready for input indicates that the VI can accept a new input on the next call to the VI. You must feed ready for input back through a shift register to the upstream logic to determine when to feed a new input. (2) input valid indicates to the VI whether there are new input data ready for computing at input terminals. The VI ignores all inputs when the last output of ready for input is FALSE. So, assign TRUE to input valid and feed inputs only when the last output of ready for input is TRUE. (3) The VI initiates a new computation when input valid is TRUE and the last output of ready for input is TRUE. The VI goes into a busy state and ready for input keeps FALSE until the VI can accept new inputs on the next call. (4) output valid indicates that the output from the VI is valid and ready to be read. output valid is short-lived for one cycle. So, the output must be read in the same cycle when output valid becomes TRUE. Otherwise, the output is overwritten by next call to the VI. The following diagram illustrates the application of the above handshaking terminals: The block diagram reads an input number from the input FIFO to compute its square root if the FXP Square Root VI is ready for input. If the input is read successfully (Timed Out? is FALSE) from the input FIFO, the input to input valid becomes TRUE so that the FXP Square Root starts to compute the square root. When output valid becomes TRUE, which means the FXP Square Root VI has already worked out the square root, the computed square root is passed to the output FIFO. 2.6 VI icon views Except the basic elements, all VIs in the library have two types of VI icon views. One is the expanded view with the inputs, outputs, and fixed-point data type labeled on the icon. The other is the contracted view for saving block diagram space. You can toggle between these two types of icon by right-clicking the VI and selecting Expanded View or Contracted View from the shortcut menu. Page 4 of 50

5 3. VI Reference 3.1 AddSub Computes the sum or difference of x and y. The VI has optional terminals for cascading operations and can be configured as Add, Subtract, or Add/Subtract. Terminals x, y in load is sub? carry-in borrow-in carry-in/no borrow-in in in in in in Input operands that must be of the same type. Refer to the Supported Data Types and Remarks on Adapting to Input section for information on how the VI adapts to the input types of x and y. Specifies if the VI performs the load operation. Refer to the Functionality section for more information. This terminal is optional. Only available when you configure the VI as Add/Subtract. This terminal specifies if the operation is addition (is sub? is FALSE) or subtraction (is sub? is TRUE). Only available when you configure the VI as Add. This terminal specifies if there is an incoming carry. carry-in is active high. This terminal is optional. There is no incoming carry if carry-in is not visible on the block diagram. Only available when you configure the VI as Subtract. This terminal specifies if there is an incoming borrow. borrow-in is active high. This terminal is optional. There is no incoming borrow if borrow-in is not visible on the block diagram. Only available when you configure the VI as Add/Subtract. This terminal specifies if there is an incoming carry when is sub? is FALSE or if there is an incoming borrow when is sub? is TRUE. It is active high in the former case and active low in the latter case. This terminal is optional. There is no incoming carry or borrow if carry-in/no borrow-in is not visible on the block diagram. Page 5 of 50

6 s out The computed result. s is of the same type as x, y. carry-out out Only available when you configure the VI as unsigned Add. This terminal indicates if there is an outgoing carry. carry-out is active high. borrow-out out Only available when you configure the VI as unsigned Subtract. This terminal indicates if there is an outgoing borrow. borrowout is active high. carryout/no borrow-out out Only available when you configure the VI as unsigned Add/Subtract. This terminal indicates if there is an outgoing carry when is sub? is FALSE or if there is an outgoing borrow when is sub? is TRUE. It is active high in the former case and active low in the latter case. overflow out Only available when you configure the VI as signed. This terminal indicates if the result exceeds the range s can represent. overflow is always active high. AddSub Details Functionality You can configure AddSub as Add, Subtract, or Add/Subtract from the configuration dialog box. 1). Add The functionality of Add can be described by the equation below: x y c load FALSE s y c load TRUE where c 0 1 carry - in carry - in FALSE TRUE For unsigned Add, carry-out is TRUE if there is an outgoing carry. For signed Add, overflow is TRUE if the result exceeds the range s can represent. 2). Subtract The functionality of Subtract can be described by the equation below: s where x y c y c c 0 1 load load FALSE TRUE borrow- in borrow- in FALSE TRUE For unsigned Subtract, borrow-out is TRUE if there is an outgoing borrow. For signed Subtract, overflow is TRUE if the result exceeds the range s can represent. 3). Add/Subtract The functionality of Add/Subtract can be described by the equations below: Page 6 of 50

7 s x y y c c load load FALSE TRUE is sub? = FALSE where c 0 1 carry - in/noborrow- in carry - in/noborrow- in FALSE TRUE For unsigned Add/Subtract, carry-out/no borrow-out is TRUE if there is an outgoing carry. s x y c y c load load FALSE TRUE is sub? = TRUE where c 0 1 carry - in/noborrow- in carry - in/noborrow- in FALSE TRUE For unsigned Add/Subtract, carry-out/no borrow-out is FALSE if there is an outgoing borrow. For signed Add/Subtract, overflow is TRUE if the result exceeds the range s can represent. Supported Data Types The AddSub VI supports the data types listed in the following table. Supported data type Supported word length (bits) Integers (I8, U8, I16, U16, I32, U32, I64, U64) 8, 16, 32, 64 Fixed-Point 1~64 Boolean 1 Boolean Array word length>=1 Notes: 1). The data type of x, y and s can be Boolean array with each element representing one bit of the number. The 0th element of the array corresponds to the least significant bit. For example, a Boolean array {TRUE, FALSE, FALSE} represents a binary number (001) binary. 2). If you configure the VI as unsigned and x, y, and s are represented in a Boolean array, the VI interprets input and output numbers as unsigned binaries. If you configure the VI as signed, the VI interprets the numbers as 2 s complement binaries. Remarks on Adapting to Inputs If both wired input x and y are of supported data type but different to each other, the AddSub VI adapts to the type with a higher priority. The priority order in adaptation of all supported types is listed in the following table. Highest > Lowest Fixed-Point U64 I64 U32 I32 U16 I16 U8 I8 Boolean Array Boolean For example, if the input to x is of U64 type and the input to y is of I64, then the AddSub VI adapts to the type wired to x, i.e. U64. Page 7 of 50

8 If both wired inputs x and y are of fixed-point data type or Boolean array, the AddSub VI adapts to the input with longer word length. If both have the same word length, then the AddSub VI adapts to the unsigned one. If both have the same word length and are both of unsigned or signed type, the AddSub VI adapts to the input with longer integer word length. Configuration Dialog Box Options Data Type - Specifies the encoding type of input x, y and output s. The AddSub VI performs integer computation and expects that x and y have the same data type. Thus integer word length makes no difference for the AddSub VI, though you can wire fixed-point inputs to the VI. So the option to configure the integer word length is not presented on the configuration dialog box. If the VI adapts to the wired input, Data Type is dimmed. Refer to the Supported Data Types and Remarks on Adapting to Input sections for more information. Operation - Specifies the functionality of the VI. The value can be one of Add, Subtract, or Add/Subtract. Refer to the Functionality section for details about each operation. Optional Terminals Carry-in/no borrow-in When you select Add/Subtract as the Operation, place a checkmark in the Carry-in/no borrow-in checkbox if you want to show the carry-in/no borrow-in terminal on the block diagram. When you select Add as the Operation, place a checkmark in this checkbox if you want to show the carry-in terminal. When you select Subtract as the Operation, place a checkmark in this checkbox if you want to show the borrow-in terminal. Refer to the Terminals section for more information on these terminals. Page 8 of 50

9 Load Place a checkmark in this checkbox if you want to show the load terminal on the block diagram. Configuration Feedback - Displays some important implementation information corresponding to the current configuration. 3.2 Discrete Delay Delays input value for a number of loop iterations. This VI is analogous to a z -n block where n can be constant or variable. Terminals D in Input data. The Discrete Delay VI loads D if enable is TRUE. Refer to the Supported Data Types section for the data types D supports. enable in Indicates if the VI is enabled. The VI loads input D and shifts data in internal registers if enable is TRUE. This terminal is optional. The VI is always enabled if this terminal is not presented. n-1 in Specifies the number of loop iterations to delay. n-1+1 is the number of loop iterations to delay. The input value to this terminal must be within the range specified in the brackets with the terminal name. This terminal is only available when you configure the VI as Dynamic Discrete Delay. Refer to the Functionality section for details. Q out Output data that the VI shifts out. Q is of the same data type as D. Discrete Delay Details Functionality The Discrete Delay VI implements discrete delay with 16-bit shift register look-up-tables (SRL16s) and a D flip-flop. You can configure the VI as Constant Delay or Dynamic Delay. 1). Constant Delay If you configure the VI as Constant Delay, the number of loop iterations to delay is constant, and you can specify the delay in the configuration dialog box. For Constant Delay, if enable is TRUE, the VI outputs the data at the highest position of the shift registers, shifts all data to the next higher position, and then loads new input D to the lowest position. If enable is FALSE, the VI still outputs the data at the highest position but does not shift data or load new data. The functionality of a Constant Delay VI is shown as below. (The number of loop iterations to delay is 3 and enable is TRUE.) Page 9 of 50

10 Shift Register Look-Up-Table 0th 1th 2th Position Loop Iteration i D i Q i = 2 Loop Iteration i+1 D i+1 D i 0 1 Q i+1 = 1 Loop Iteration i+2 D i+2 D i D i+1 0 Q i+2 = 0 Loop Iteration i+3 D i+3 D i+2 D i+1 D i Q i+3 = D i 2). Dynamic Delay If you configure the VI as Dynamic Delay, the number of loop iterations to delay is dynamic and you can specify it through the n-1 terminal at run time. The functionality of Dynamic Delay is the same as Constant Delay except that Dynamic Delay outputs the data in the (n-1)th position instead of the constant highest position of the shift registers. Supported Data Types The Discrete Delay VI supports the data types listed in the following table. Supported data type Supported word length (bits) Integers (I8, U8, I16, U16, I32, U32, I64, U64) 8, 16, 32, 64 Fixed-Point 1~64 Boolean 1 Boolean Array 1~64 Note: The data type of D and Q can be Boolean array with each element representing one bit of the number. The 0th element of the array corresponds to the least significant bit. For example, a Boolean array {TRUE, FALSE, FALSE} represents a binary number (001) binary. Page 10 of 50

11 Configuration Dialog Box Options Data Type General Page on the Configuration Dialog Box of Discrete Delay Word length - Specifies the word length of input D and output Q. If the VI adapts to the wired input, Word length is dimmed. Refer to the Supported Data Types section for information about what input types the VI can adapt to. Delay Settings Constant delay - Select this option if you want to configure the VI as Constant Delay. Refer to the Functionality section for details. Delay - Only applicable when you select Constant delay. This control specifies the number of loop iterations to delay. The number must be within [1, 129]. Dynamic delay - Select this option if you want to configure the VI as Dynamic Delay. Refer to the Functionality section for details. Maximum delay - Only applicable when you select Dynamic delay. This control specifies the maximum number of loop iterations to delay. The number must be within [16, 128]. Input value on the n-1 terminal must be less than this number as shown in the terminal name. Page 11 of 50

12 Optional Terminals Enable - Place a checkmark in this checkbox if you want to show the enable terminal on the block diagram. Resulting schematic - Displays the schematic of how the VI implements discrete delay according to the current configuration. Configuration Feedback - Displays some important implementation information corresponding to the current configuration. Advanced Page on the Configuration Dialog Box of Discrete Delay Initial Value Configuration - Displays the bit pattern of initial values of the shift registers in the Discrete Delay VI. The indices in the left column of the listbox correspond to the positions in the shift registers. You can change the initial values individually in the list. Hex, Dec, and Bin - Specify format the listbox displays the bit pattern of initial values. Call Initialization VI - Click this button to open the Select Initialization VI dialog box. In the dialog box, you can select a VI to generate initial values for this VI. After you click OK in the dialog box, LabVIEW calls the selected VI and displays the generated values in the listbox in the Initial Value Configuration section. Page 12 of 50

13 Create Initialization VI - Click this button to open an instance of a template VI. You can edit this VI to generate initial values as you like and save it. You must close the configuration dialog box to edit the VI. 3.3 Integer Accumulator Accumulates the input x. The VI supports multi-channel operations and feedback scaling. Terminals x load is sub? carry-in/no borrow-in s carry-out/no borrow out overflow enable in in in in out out out in Input data to be accumulated. x can be represented as a fixed-point data type or Boolean array. Specifies if the VI performs the load operation. Refer to the Functionality section for details. Specifies if the operation is addition (is sub? is FALSE) or subtraction (is sub? is TRUE). Specifies if there is an incoming carry when is sub? is FALSE or if there is an incoming borrow when is sub? is TRUE. It is active high in the former case and active low in the latter case. Returns the accumulated result. The data type of s is determined by the data type of x. The word length of s cannot be less than that of x. Only available when this VI is configured as an unsigned accumulator. This terminal indicates if there is an outgoing carry when is sub? is FALSE, or if there is an outgoing borrow when is sub? is TRUE. It is active high in the former case and active low in the latter case. Only available when this VI is configured as a signed accumulator. This terminal indicates if the result exceeds the range s can represent and is always active high. Specifies if the accumulator is enabled. If enable is FALSE, x will not be accumulated. Integer Accumulator Details Functionality The Integer Accumulator VI is an add/subtract based accumulator supporting multi-channel operations. The functionality of the Integer Accumulator VI without feedback scaling is described as: Page 13 of 50

14 s s x x c c load load FALSE TRUE is sub? = FALSE where c 0 1 carry - in/noborrow- in carry - in/noborrow- in FALSE TRUE For unsigned accumulator, carry-out/no borrow-out is TRUE if there is an outgoing carry. s s x c x c load load FALSE TRUE is sub? = TRUE where c 0 1 carry - in/noborrow- in carry - in/noborrow- in FALSE TRUE For unsigned accumulator, carry-out/no borrow-out is FALSE if there is an outgoing borrow. The schematic of the Integer Accumulator VI is shown below. The VI has one loop iteration latency between input x and output s. There is also one loop iteration latency between carry-out/no borrowout or overflow and x if you select Carry-out registered? in the configuration dialog box. Feedback scaling scales s by a number of bits before feeding the number back to the add/subtract. Fixed-Point Input If you wire a fixed-point number to x, the VI adapts to the wired type. The fractional word lengths of x and s are identical, and the word length of s cannot be greater than 64. If you leave the x terminal unwired and set the word length of s greater than 64, the output and the input data type changes to Boolean array. Boolean Array Input If you wire a Boolean array to x, the VI interprets it as an unsigned number if you configure the type of x as unsigned, or 2 s complement binary if you configure the type of x as signed. You must interpret s the same way as x is interpreted. Page 14 of 50

15 Note: Each element in a Boolean array represents one bit of the number. The 0th element of the array corresponds to the least significant bit. For example, a Boolean array {TRUE, FALSE, FALSE} represents a binary number (001) binary. Configuration Dialog Box Options Fixed-Point Configuration x Type - Specifies the type of input x. s Type - Specifies the type of output s. The signed/unsigned option is not configurable and is determined by x type. Accumulator Settings Feedback scaling - Specifies the number of bits to right shift s before feeding it back to the add/subtract computation unit. You can set Feedback scaling in range [0, 8]. Number of channels - Specifies the number of channels. The input data for multiple channels must be interleaved channel by channel. The accumulated result s and carry-out/no borrowout or overflow will be output in the same way as the input. For example, a 2-channel accumulator has the input and output sequences as below. Page 15 of 50

16 input sequence output sequence loop iteration i+4 loop iteration i+3 loop iteration i+2 loop iteration i+1 loop iteration i Ch1 input Ch2 input Ch1 input Ch2 input Ch1 input Ch2 output Ch1 output Ch2 output Ch1 output Ch2 output Carry-out registered? - Specifies if you output the carry-out/no borrow-out or overflow directly from the add/subtract unit or through a register. Configuration Feedback - Displays some important implementation information corresponding to the current configuration. 3.4 FXP To Fixed-Point Converts the fixed-point input x to the fixed-point output y. Terminals x in Input operand. y out The converted result. Indicates if the result exceeds the range y can represent. This overflow out terminal is optional. Page 16 of 50

17 Configuration Dialog Box Options Fixed-Point Configuration x Type - Specifies the type of x. If the FXP Convert VI adapts to wired input, x Type is dimmed. y Type - Specifies the type of y. Overflow mode - Specifies the overflow handling mode of the VI. Rounding mode - Specifies the rounding mode of the VI. Optional Terminals Overflow - Place a checkmark in the checkbox if you want to show the overflow terminal on the block diagram. Configuration Feedback - Displays some important implementation information corresponding to the current configuration. Page 17 of 50

18 3.5 FXP Add Computes the sum of x and y. Terminals x, y in Input operands. x+y out The computed result. overflow out Indicates if the result exceeds the range it can represent. This terminal is optional. Page 18 of 50

19 Configuration Dialog Box Options Fixed-Point Configuration x Type - Specifies the type of x. If the VI adapts to wired input, x, y Type is dimmed. y Type - Specifies the type of y. If the VI adapts to wired input, x, y Type is dimmed. x+y Type - Specifies the type of x+y. When you select Default type, this control is dimmed and the VI applies the default x+y type according to the input data types. Overflow never occurs if you select the Default type for the x+y Type. Overflow mode - Specifies the overflow handling mode of the VI. Page 19 of 50

20 Rounding mode - Specifies the rounding mode of the VI. Optional Terminals Overflow - Place a checkmark in the checkbox if you want to show the overflow terminal. Configuration Feedback - Displays some important implementation information corresponding to the current configuration. 3.6 FXP Subtract Computes the difference of x and y. Terminals x, y in Input operands. x-y out The computed result. overflow out Indicates if the result exceeds the range x-y can represent Page 20 of 50

21 Configuration Dialog Box Options Fixed-Point Configuration x Type - Specifies the type of x. y Type - Specifies the type of y. x-y Type - Specifies the type of x-y. When you select Default type, this control is disabled and the VI selects a data type according to the input data types automatically. The computation result cannot overflow when you select Default type. Overflow mode - Specifies the overflow handling mode. Rounding mode - Specifies the rounding mode. Page 21 of 50

22 Optional Terminals Overflow - Place a checkmark in the checkbox if you want to show the overflow terminal on the block diagram. Configuration feedback - Displays some important implementation information corresponding to the current configuration. 3.7 FXP Multiply Computes the product of the inputs. Terminals x in Multiplicand. y in Multiplicator. x*y out The product of x multiplied by y. overflow out Indicates if the result exceeds the range x*y can represent. This terminal is optional. input valid in Terminals for handshaking signals. These terminals are available when you pipeline the VI and configure the execution mode to be Inside single-cycle output valid out timed loop. The ready for input terminal is not visible with this VI because the VI is always ready for input. Refer to Execution mode and Handshaking terminals in the Common Characteristics section for more information. FXP Multiply Details Pipelined Multiplier You can improve the timing performance on FPGA by pipelining the multiplier. The functionality of a pipelined multiplier is equivalent to a normal multiplier cascaded by a certain number of registers as shown below. The number of the registers is equal to the number of pipelining stages. Page 22 of 50

23 x y DFF DFF x*y normal multiplier Configuration Dialog Box Options Fixed-Point Configuration x Type - Specifies the type of x. y Type - Specifies the type of y. x*y Type - Specifies the type of product x*y. When you select Default type, the x*y Type control is dimmed and the VI applies the default x*y type according to the input data types. Overflow never occurs if you select Default type for x*y. Page 23 of 50

24 Overflow mode - Specifies overflow handling mode. Rounding mode - Specifies rounding mode. Pipelining Options Pipeline the multiplier - Specifies if the VI is a pipelined multiplier. Place a checkmark in the Pipeline the multiplier checkbox to pipeline the multiplier. Number of pipelining stages - Specifies the number of pipelining stages. Number of pipelining stages must be within [1, 12]. Implement with LUT - Specifies if you want to implement the multiplier with look-up-table (LUT). If you place a checkmark in the Implement with LUT checkbox, the VI implements the multiplier using LUT. Otherwise, the VI automatically chooses to use LUT or embedded block multipliers to implement the multiplier. The LUT implementation might have better timing performance at the cost of increased resource usage. Execution Mode - Applies only if you pipeline the multiplier. Outside single-cycle timed loop - Select this option to return an output after every call to the VI. If you select this option and place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI including the VI. Inside single-cycle timed loop - Select this option to guarantee that the VI executes in one cycle. If you select this option but do not place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Optional Terminals Overflow - Place a checkmark in the checkbox if you want to show the overflow terminal on the block diagram. Configuration Feedback - Displays some important implementation information corresponding to the current configuration. Page 24 of 50

25 3.8 FXP Divide Computes the quotient of inputs. Terminals x in Dividend. y in Divisor. x/y out Quotient. overflow out Indicates if the result exceeds the range x/y can represent. This terminal is optional. input valid in Terminals for handshaking signals. These terminals are output valid out available when you configure the execution mode to be Inside single-cycle timed loop. Refer to Execution mode and ready for out Handshaking terminals in the Common Characteristics section input for more information. FXP Divide Details Functionality The FXP Divide VI computes fixed-point division and the result is always rounded towards zero. Divide by Zero If divisor y is 0, both x/y and overflow are undefined. Execution This VI takes more than one cycle to complete a computation. Refer to Execution Mode in the Common Characteristics section for details. Page 25 of 50

26 Configuration Dialog Box Options Fixed-Point Configuration x Type - Specifies the type of input x. If the VI adapts to wired input, x Type is dimmed. y Type - Specifies the type of input y. If the VI adapts to wired input, y Type is dimmed. x/y Type - Specifies the type of output x/y. If you select Default type, LabVIEW determines x/y Type according to the types of x and y. Page 26 of 50

27 Execution Mode Outside single-cycle timed loop - Select this option to return an output after every call to the VI. If you select this option and place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Inside single-cycle timed loop - Select this option to guarantee that the VI executes in one cycle. If you select this option but do not place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Cycles per sample - Only applicable when Execution Mode is Inside single-cycle timed loop. You can set this value to provide a new x/y every nth call to the VI where n equals Cycles per sample. Optional Terminals Overflow - Place a checkmark in the checkbox if you want to show the overflow terminal on the block diagram. Configuration Feedback - Displays some important implementation information corresponding to the current configuration. 3.9 FXP Reciprocal Computes the reciprocal of the input value. Terminals x in Input operand. 1/x out Reciprocal of x. overflow out Indicates if the result exceeds the range 1/x can represent. This terminal is optional. input in valid Terminals for handshaking signals. These terminals are available output when you configure the execution mode to be Inside single-cycle out valid timed loop. Refer to Execution mode and Handshaking terminals ready for in the Common Characteristics section for more information. out input Fixed-Point Reciprocal Details Functionality Page 27 of 50

28 FXP Reciprocal computes fixed-point reciprocal of input x and the result is always rounded towards zero. Divide by Zero If x is 0, both 1/x and overflow are undefined. Execution This VI takes more than one cycle to complete a computation. Refer to Execution Mode in the Common Characteristics section for details. Configuration Dialog Box Options Page 28 of 50

29 Fixed-Point Configuration x Type - Specifies the type of input x. If the VI adapts to wired input, x Type is dimmed. 1/x Type - Specifies the type of output 1/x. If you select Default type, LabVIEW determines 1/x Type according to the type of x. Execution Mode Outside single-cycle timed loop - Select this option to return an output after every call to the VI. If you select this option and place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Inside single-cycle timed loop - Select this option to guarantee that the VI executes in one cycle. If you select this option but do not place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Cycles per sample - Only applicable when Execution Mode is Inside single-cycle timed loop. You can set this value to provide a new 1/x every nth call to the VI, where n equals Cycles per sample. Optional Terminals Overflow - Place a checkmark in this checkbox if you want to show the overflow terminal on the block diagram. Configuration Feedback - Displays some important implementation information corresponding to the current configuration FXP Square Root Computes the square root of input x. Terminals x in Input radicand. x must be unsigned. sqrt(x) out Computed square root. overflow out Indicates if the result exceeds the range sqrt(x) can represent. This terminal is optional. input valid in Handshaking terminals. These terminals are available when you configure output valid out the execution mode to be Inside single-cycle timed loop. Refer to ready for Execution mode and Handshaking terminals in the Common out input Characteristics section for more information. Page 29 of 50

30 FXP Square Root Details Execution This VI takes more than one cycle to complete a computation. Refer to Execution Mode in the Common Characteristics section for details. Configuration Dialog Box Options Fixed-Point Configuration Page 30 of 50

31 x Type - Specifies the type of input x. If the VI adapts to wired input, x Type is dimmed. Refer to the Terminals section for more information on input x. sqrt(x) Type - Specifies the type of sqrt(x). When you select Default type, this control is dimmed and the VI applies the default sqrt(x) type according to x Type. Overflow mode - Specifies the overflow handling. Rounding mode - Specifies the rounding mode. Execution Mode Outside single-cycle timed loop - Select this option to return an output after every call to the VI. If you select this option and place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Inside single-cycle timed loop - Select this option to guarantee that the VI executes in one cycle. If you select this option but do not place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Cycles per sample - Only applicable when Execution Mode is Inside single-cycle timed loop. You can set this value to provide a new sqrt(x) every nth call to the VI where n equals Cycles per sample. Optional Terminals Overflow - Place a checkmark in the checkbox if you want to show the overflow terminal on the block diagram. Configuration Feedback - Displays some important implementation information corresponding to the current configuration CORDIC VIs FXP Sin & Cos Computes both the sine and the cosine of x, where x is in unit of radians. Terminals x in Input operands. x must be signed with integer word length fixed to 1. The word length must be greater than or equal to 4 bits. x is in unit of radians, i.e. if you want to calculate sin( /2) and cos( /2), you need to Page 31 of 50

32 input a x of 1/2. sin(x), cos(x) out sin(x) and cos(x) with integer word length fixed to 2. input valid in Terminals for handshaking signals. These terminals are available when output valid ready for input out out you configure the execution mode to be Inside single-cycle timed loop. Refer to Execution mode and Handshaking terminals in the Common Characteristics section for more information. FXP Sin & Cos Details Execution This VI takes more than one cycle to complete a computation. Refer to Execution Mode in the Common Characteristics section for details. Page 32 of 50

33 Configuration Dialog Box Options Fixed-Point Configuration x Type - Specifies the type of input x. sin(x), cos(x) Type - Specifies the type of output sin(x) and cos(x). Rounding mode - Specifies how the VI coerces calculated sin(x) and cos(x) to a value with the precision of sin(x), cos(x) Type. Execution Mode Outside single-cycle timed loop - Select this option to return an output after every call to the VI. If you select this option and place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Page 33 of 50

34 Inside single-cycle timed loop - Select this option to guarantee that the VI executes in one cycle. If you select this option but do not place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Cycles per sample - Only applicable when Execution Mode is Inside single-cycle timed loop. You can set this value to provide a new pair of sin(x) and cos(x) every nth call to the VI, where n equals Cycles per sample. Input Phase Range - Specifies what range input x is in. You select [-1/2, 1/2) if the input is always in phase range [- /2, /2). Otherwise, select [-1, 1). This information can help the VI minimize the use of hardware resources. Configuration Feedback - Displays some important implementation information corresponding to the current configuration FXP atan2 Computes the arctangent of y/x. Terminals x, y in Input operands. x and y must be signed and of the same fixed-point data type. The word length must be greater than or equal to 4 bits. atan2(y, x) out The arctangent of y and x in unit of radians. To get the corresponding phase value in radians, multiply atan2(y, x) by. input valid in Handshaking terminals. These terminals are available when you configure output valid out the execution mode to be Inside single-cycle timed loop. Refer to ready for Execution mode and Handshaking terminals in the Common out input Characteristics section for more information. FXP Atan2 Details Output of a special case If both input x and y are 0s, atan2(y, x) is unspecified. Output numeric error Page 34 of 50

35 Theoretically, arctangent of input (y, x) is identical to that of input (ky, kx) where k is positive. But the actual calculated results can be different due to numeric error. The greater the magnitude of input (y, x), the smaller the numeric error. Execution This VI takes more than one cycle to complete a computation. Refer to Execution Mode in the Common Characteristics section for details. Configuration Dialog Box Options Fixed-Point Configuration Page 35 of 50

36 x, y Type - Specifies the type of input x and y. If the VI adapts to wired input, x, y Type is dimmed. Refer to the Terminals section for more information about inputs x and y. atan2(y, x) Type - Specifies the type of output atan2(y, x). Refer to the Terminals section for more information about output atan2(y, x). Rounding mode - Specifies how the VI coerces the calculated arctangent of y and x to a value with the precision of atan2(y, x) Type. Execution Mode Outside single-cycle timed loop- Select this option to return an output after every call to the VI. If you select this option and place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Inside single-cycle timed loop - Select this option to guarantee that the VI executes in one cycle. If you select this option but do not place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Cycles per sample - Only applicable when Execution Mode is Inside single-cycle timed loop. You can set this value to provide a new atan2(y, x) every nth call to the VI, where n equals Cycles per sample. Input x Range Always x>= 0 - Place a checkmark in this checkbox if you are sure that input x is always greater than or equal to 0. This information can help the VI minimize the use of hardware resources. Configuration Feedback - Displays some important implementation information corresponding to the current configuration FXP Polar To Rect Converts the polar coordinates into the rectangular coordinates. Terminals magnitude in The input magnitude of the polar coordinates. magnitude must be unsigned and the word length must be greater than or equal to 4 bits. phase in The input phase of a polar coordinate in unit of radians. Page 36 of 50

37 x, y out Output rectangular coordinates. x and y must be signed and of the same fixed-point data type. input valid in Handshaking terminals. These terminals are available when you output valid ready for input out out configure the execution mode to be Inside single-cycle timed loop. Refer to Execution mode and Handshaking terminals in the Common Characteristics section for more details FXP Polar To Rect Details Execution This VI takes more than one cycle to complete a computation. Refer to Execution Mode in the Common Characteristics section for details. Page 37 of 50

38 Configuration Dialog Box Options Fixed-Point Configuration magnitude type - Specifies the type of input magnitude. phase type - Specifies the type of input phase. x, y Type - Specifies the type of output x and y. Rounding mode - Specifies how the VI coerces the calculated magnitude or phase to a value with the precision of magnitude Type or phase Type respectively. Page 38 of 50

39 Execution Mode Outside single-cycle timed loop - Select this option to return an output after every call to the VI. If you select this option and place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Inside single-cycle timed loop - Select this option to guarantee that the VI executes in one cycle. If you select this option but do not place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Cycles per sample - Only applicable when Execution Mode is Inside single-cycle timed loop. You can set this value to provide a new pair of x and y every nth call to the VI, where n equals Cycles per sample. Input Phase Range - Specifies what range input x is in. Select [-1/2, 1/2) if the input is always in phase range [- /2, /2), otherwise, select [-1, 1). This information can help the VI minimize the use of hardware resources. Configuration Feedback - Displays some important implementation information corresponding to the current configuration FXP Rect To Polar Converts the rectangular coordinates into the polar coordinates. Terminals x, y in Input rectangular coordinates. x and y must be signed and of the same fixed-point data type. The word length must be greater than or equal to 4 bits. magnitude out The output magnitude of the polar coordinates. magnitude must be unsigned and the same word length and integer word length as those of x, y. The output phase of the polar coordinates in unit of radians. phase out To get the corresponding phase value in radians, multiply phase by. input valid in Handshaking terminals. The VI shows these terminals when the output valid out execution mode is Inside single-cycle timed loop. Refer to Page 39 of 50

40 ready for input out Execution mode and Handshaking terminals in the Common Characteristics section for more details FXP Rect To Polar Details Output of a special case If both input x and y are 0s, the output phase is unspecified. Output Numeric Error Theoretically, the phase of input (x, y) is identical to that of input (kx, ky), where k is positive. But the actual calculated phase can be different due to numeric error. The greater the magnitude of input (x, y), the smaller this error. Execution This VI takes more than one cycle to complete a computation. Refer to Execution Mode in the Common Characteristics section for details. Page 40 of 50

41 Configuration Dialog Box Options Fixed-Point Configuration x, y Type - Specifies the type of input x and y. If the VI adapts to wired input, x, y Type is dimmed. magnitude Type - Specifies the type of output magnitude. phase Type - Specifies the type of output phase. Page 41 of 50

42 Rounding mode - Specifies how the VI coerces the calculated magnitude or phase to a value with the precision of magnitude Type or phase Type respectively. Execution Mode Outside single-cycle timed loop - Select this option to return an output after every call to the VI. If you select this option and place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Inside single-cycle timed loop - Select this option to guarantee that the VI executes in one cycle. If you select this option but do not place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Cycles per sample - Only applicable when Execution Mode is Inside single-cycle timed loop. You can set this value to provide a new pair of magnitude and phase every nth call to the VI where n equals Cycles per sample. Input x Range Always x>= 0 - Place a checkmark in this check box if you are sure that input x is always greater than or equal to 0. This information can help the VI minimize the usage of hardware resource. Configuration Feedback - Displays some important implementation information corresponding to the current configuration FXP Sinh & Cosh Computes the hyperbolic sine and cosine of x. Terminals x sinh(x) cosh(x) in out out Input operand that must be signed. The integer word length must be 1. The word length must be greater than or equal to 4 bits. x must be within [-1, 1). If you need to input an x out of this range, you should perform preprocessing on x. Otherwise, the result will be unpredictable. Refer to Preprocessing the input section for details. The hyperbolic sine of x. sinh(x) must be signed. The integer word length must be 2. The word length must be greater than or equal to 4 bits. The hyperbolic cosine of x. cosh(x) must be unsigned. The integer word length must be 1. The word length must be greater than or equal to 3 bits. Page 42 of 50

43 input valid in Handshaking terminals. These terminals are available when you configure output valid out the execution mode to be Inside single-cycle timed loop. Refer to ready for Execution mode and Handshaking terminals in Common Characteristics out input section for more information. Fixed-Point Sinh & Cosh Details Preprocessing the input The input value to x must be within the range [-1, 1). If the input is out of this range, preprocess the input according to the following formula to convert the input into the range [-1, 1). sinh(d)=sinh(qln2+x) = 2 Q-1 [cosh x +sinh x -2-2Q (cosh x -sinh x)] where x < ln2 = 0.69 cosh(d)=cosh(qln2+ x) = 2 Q-1 [cosh x +sinh x +2-2Q (cosh x -sinh x)] where x < ln2 = 0.69 Page 43 of 50

44 Configuration Dialog Box Options Fixed-Point Configuration x Type - Specifies the type of input x. If the VI adapts to wired input, x Type is dimmed. sinh Type - Specifies the type of sinh(x). cosh Type - Specifies the type of cosh(x). Rounding mode - Specifies how the VI coerces the calculated sinh and cosh to a value with the precision of sinh Type and cosh Type respectively. Page 44 of 50

45 Execution Mode Outside single-cycle timed loop - Select this option to return an output after every call to the VI. If you select this option and place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Inside single-cycle timed loop - Select this option to guarantee that the VI executes in one cycle. If you select this option but do not place the VI inside a single-cycle timed loop, the Code Generation Errors window reports an error when you compile the VI. Cycles per sample - Only applicable when Execution Mode is Inside single-cycle timed loop. You can set this value to provide a new pair of sinh and cosh every nth call to the VI where n equals Cycles per sample. Configuration feedback - Displays some important implementation information corresponding to the current configuration FXP Exponential Computes the exponential of x. Terminals x in Input operand that must be signed. The integer word length must be 1. The word length must be greater than or equal to 4 bits. x must be within [-1, 1). If you need to input an x out of this range, you should perform preprocessing on x. Otherwise, the result will be unpredictable. Refer to Preprocessing the input section for details. exp(x) out The exponential of x. exp(x) must be unsigned. The integer word length must be 2. The word length must be greater than or equal to 4 bits. input valid in Handshaking terminals. These terminals are available when you configure output valid out the execution mode to be Inside single-cycle timed loop. Refer to ready for Execution mode and Handshaking terminals in the Common out input Characteristics section for more information. Page 45 of 50

46 Fixed-Point Exponential Details Preprocessing the input The input value to x must be within the range [-1, 1). If the input is out of this range, preprocess the input according to the following formula to convert the input into the range [-1, 1). exp(d)=exp(qln2+x) = 2 Q exp(x) x < ln2 = 0.69 Configuration Dialog Box Options Page 46 of 50

Chapter 6 Digital Arithmetic: Operations & Circuits

Chapter 6 Digital Arithmetic: Operations & Circuits Chapter 6 Digital Arithmetic: Operations & Circuits Chapter 6 Objectives Selected areas covered in this chapter: Binary addition, subtraction, multiplication, division. Differences between binary addition

More information

Expense Management. Configuration and Use of the Expense Management Module of Xpert.NET

Expense Management. Configuration and Use of the Expense Management Module of Xpert.NET Expense Management Configuration and Use of the Expense Management Module of Xpert.NET Table of Contents 1 Introduction 3 1.1 Purpose of the Document.............................. 3 1.2 Addressees of the

More information

EET 310 Programming Tools

EET 310 Programming Tools Introduction EET 310 Programming Tools LabVIEW Part 1 (LabVIEW Environment) LabVIEW (short for Laboratory Virtual Instrumentation Engineering Workbench) is a graphical programming environment from National

More information

Simulation & Synthesis Using VHDL

Simulation & Synthesis Using VHDL Floating Point Multipliers: Simulation & Synthesis Using VHDL By: Raj Kumar Singh - B.E. (Hons.) Electrical & Electronics Shivananda Reddy - B.E. (Hons.) Electrical & Electronics BITS, PILANI Outline Introduction

More information

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1 Divide: Paper & Pencil Computer Architecture ALU Design : Division and Floating Point 1001 Quotient Divisor 1000 1001010 Dividend 1000 10 101 1010 1000 10 (or Modulo result) See how big a number can be

More information

Lab View with crio Tutorial. Control System Design Feb. 14, 2006

Lab View with crio Tutorial. Control System Design Feb. 14, 2006 Lab View with crio Tutorial Control System Design Feb. 14, 2006 Pan and Tilt Mechanism Experimental Set up Power Supplies Ethernet cable crio Reconfigurable Embedded System Lab View + Additional Software

More information

Control Analog Out, Digital Out, and Pulse Out

Control Analog Out, Digital Out, and Pulse Out Control Analog Out, Digital Out, and Pulse Out Exercise 8 Completed front panel and block diagram In this exercise, you will create a program to control the SensorDAQ s analog out terminal (this is pin

More information

Lab 1: Full Adder 0.0

Lab 1: Full Adder 0.0 Lab 1: Full Adder 0.0 Introduction In this lab you will design a simple digital circuit called a full adder. You will then use logic gates to draw a schematic for the circuit. Finally, you will verify

More information

Computer Science 281 Binary and Hexadecimal Review

Computer Science 281 Binary and Hexadecimal Review Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two

More information

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012 Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

More information

CS 16: Assembly Language Programming for the IBM PC and Compatibles

CS 16: Assembly Language Programming for the IBM PC and Compatibles CS 16: Assembly Language Programming for the IBM PC and Compatibles First, a little about you Your name Have you ever worked with/used/played with assembly language? If so, talk about it Why are you taking

More information

LabVIEW Day 1 Basics. Vern Lindberg. 1 The Look of LabVIEW

LabVIEW Day 1 Basics. Vern Lindberg. 1 The Look of LabVIEW LabVIEW Day 1 Basics Vern Lindberg LabVIEW first shipped in 1986, with very basic objects in place. As it has grown (currently to Version 10.0) higher level objects such as Express VIs have entered, additional

More information

Digital Image Processing

Digital Image Processing 1 Introduction in IMAQ Vision. Structure of Digital Image Processing Applications Using IMAQ Vision 1.1 Introduction A grey level image is a function expressing the spatial variation of the light intensity

More information

Digital to Analog Conversion Using Pulse Width Modulation

Digital to Analog Conversion Using Pulse Width Modulation Digital to Analog Conversion Using Pulse Width Modulation Samer El-Haj-Mahmoud Electronics Engineering Technology Program Texas A&M University Instructor s Portion Summary The purpose of this lab is to

More information

14.1. Basic Concepts of Integration. Introduction. Prerequisites. Learning Outcomes. Learning Style

14.1. Basic Concepts of Integration. Introduction. Prerequisites. Learning Outcomes. Learning Style Basic Concepts of Integration 14.1 Introduction When a function f(x) is known we can differentiate it to obtain its derivative df. The reverse dx process is to obtain the function f(x) from knowledge of

More information

Lecture 8: Binary Multiplication & Division

Lecture 8: Binary Multiplication & Division Lecture 8: Binary Multiplication & Division Today s topics: Addition/Subtraction Multiplication Division Reminder: get started early on assignment 3 1 2 s Complement Signed Numbers two = 0 ten 0001 two

More information

FX 260 Training guide. FX 260 Solar Scientific Calculator Overhead OH 260. Applicable activities

FX 260 Training guide. FX 260 Solar Scientific Calculator Overhead OH 260. Applicable activities Tools Handouts FX 260 Solar Scientific Calculator Overhead OH 260 Applicable activities Key Points/ Overview Basic scientific calculator Solar powered Ability to fix decimal places Backspace key to fix

More information

The string of digits 101101 in the binary number system represents the quantity

The string of digits 101101 in the binary number system represents the quantity Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for

More information

Getting Started with the LabVIEW Mobile Module Version 2009

Getting Started with the LabVIEW Mobile Module Version 2009 Getting Started with the LabVIEW Mobile Module Version 2009 Contents The LabVIEW Mobile Module extends the LabVIEW graphical development environment to Mobile devices so you can create applications that

More information

TYPES OF NUMBERS. Example 2. Example 1. Problems. Answers

TYPES OF NUMBERS. Example 2. Example 1. Problems. Answers TYPES OF NUMBERS When two or more integers are multiplied together, each number is a factor of the product. Nonnegative integers that have exactly two factors, namely, one and itself, are called prime

More information

Fixed-Point Arithmetic

Fixed-Point Arithmetic Fixed-Point Arithmetic Fixed-Point Notation A K-bit fixed-point number can be interpreted as either: an integer (i.e., 20645) a fractional number (i.e., 0.75) 2 1 Integer Fixed-Point Representation N-bit

More information

Lecture 2. Binary and Hexadecimal Numbers

Lecture 2. Binary and Hexadecimal Numbers Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations

More information

Integer multiplication

Integer multiplication Integer multiplication Suppose we have two unsigned integers, A and B, and we wish to compute their product. Let A be the multiplicand and B the multiplier: A n 1... A 1 A 0 multiplicand B n 1... B 1 B

More information

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8 ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also

More information

PREPARATION FOR MATH TESTING at CityLab Academy

PREPARATION FOR MATH TESTING at CityLab Academy PREPARATION FOR MATH TESTING at CityLab Academy compiled by Gloria Vachino, M.S. Refresh your math skills with a MATH REVIEW and find out if you are ready for the math entrance test by taking a PRE-TEST

More information

Graphing Calculator Scientific Calculator Version 2.0

Graphing Calculator Scientific Calculator Version 2.0 Graphing Calculator Scientific Calculator Version 2.0 2006-1012 Infinity Softworks, Inc. www.infinitysw.com/ets August 7, 2012 1! Table of Contents Table of Contents 1 Overview! 3 2 Navigation! 4 3 Using

More information

COMPUTER ARCHITECTURE. ALU (2) - Integer Arithmetic

COMPUTER ARCHITECTURE. ALU (2) - Integer Arithmetic HUMBOLDT-UNIVERSITÄT ZU BERLIN INSTITUT FÜR INFORMATIK COMPUTER ARCHITECTURE Lecture 11 ALU (2) - Integer Arithmetic Sommersemester 21 Leitung: Prof. Dr. Miroslaw Malek www.informatik.hu-berlin.de/rok/ca

More information

The 104 Duke_ACC Machine

The 104 Duke_ACC Machine The 104 Duke_ACC Machine The goal of the next two lessons is to design and simulate a simple accumulator-based processor. The specifications for this processor and some of the QuartusII design components

More information

b) lower case always use lower case for all matlab commands. This is what matlab recognizes.

b) lower case always use lower case for all matlab commands. This is what matlab recognizes. 1 Matlab 1) Fundamentals a) Getting Help for more detailed help on any topic, typing help, then a space, and then the matlab command brings up a detailed page on the command or topic. For really difficult

More information

Getting Started with the LabVIEW Mobile Module

Getting Started with the LabVIEW Mobile Module Getting Started with the LabVIEW Mobile Module Contents The LabVIEW Mobile Module extends the LabVIEW graphical development environment to Mobile devices so you can create applications that run on Windows

More information

Lies My Calculator and Computer Told Me

Lies My Calculator and Computer Told Me Lies My Calculator and Computer Told Me 2 LIES MY CALCULATOR AND COMPUTER TOLD ME Lies My Calculator and Computer Told Me See Section.4 for a discussion of graphing calculators and computers with graphing

More information

Modbus and ION Technology

Modbus and ION Technology 70072-0104-14 TECHNICAL 06/2009 Modbus and ION Technology Modicon Modbus is a communications protocol widely used in process control industries such as manufacturing. PowerLogic ION meters are compatible

More information

Two's Complement Adder/Subtractor Lab L03

Two's Complement Adder/Subtractor Lab L03 Two's Complement Adder/Subtractor Lab L03 Introduction Computers are usually designed to perform indirect subtraction instead of direct subtraction. Adding -B to A is equivalent to subtracting B from A,

More information

This representation is compared to a binary representation of a number with N bits.

This representation is compared to a binary representation of a number with N bits. Chapter 11 Analog-Digital Conversion One of the common functions that are performed on signals is to convert the voltage into a digital representation. The converse function, digital-analog is also common.

More information

Paramedic Program Pre-Admission Mathematics Test Study Guide

Paramedic Program Pre-Admission Mathematics Test Study Guide Paramedic Program Pre-Admission Mathematics Test Study Guide 05/13 1 Table of Contents Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 Page 10 Page 11 Page 12 Page 13 Page 14 Page 15 Page

More information

Design and FPGA Implementation of a Novel Square Root Evaluator based on Vedic Mathematics

Design and FPGA Implementation of a Novel Square Root Evaluator based on Vedic Mathematics International Journal of Information & Computation Technology. ISSN 0974-2239 Volume 4, Number 15 (2014), pp. 1531-1537 International Research Publications House http://www. irphouse.com Design and FPGA

More information

ECE 3401 Lecture 9. VHDL for Arithmetic Functions and Circuits

ECE 3401 Lecture 9. VHDL for Arithmetic Functions and Circuits ECE 3401 Lecture 9 VHDL for Arithmetic Functions and Circuits Outline Arithmetic Functions and Circuits: operate on binary vectors, use the same sub-function in each bit position Adders Multipliers Others

More information

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

EE 261 Introduction to Logic Circuits. Module #2 Number Systems EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook

More information

Simple C++ Programs. Engineering Problem Solving with C++, Etter/Ingber. Dev-C++ Dev-C++ Windows Friendly Exit. The C++ Programming Language

Simple C++ Programs. Engineering Problem Solving with C++, Etter/Ingber. Dev-C++ Dev-C++ Windows Friendly Exit. The C++ Programming Language Simple C++ Programs Engineering Problem Solving with C++, Etter/Ingber Chapter 2 Simple C++ Programs Program Structure Constants and Variables C++ Operators Standard Input and Output Basic Functions from

More information

CHAPTER 5 Round-off errors

CHAPTER 5 Round-off errors CHAPTER 5 Round-off errors In the two previous chapters we have seen how numbers can be represented in the binary numeral system and how this is the basis for representing numbers in computers. Since any

More information

Mathematical Procedures

Mathematical Procedures CHAPTER 6 Mathematical Procedures 168 CHAPTER 6 Mathematical Procedures The multidisciplinary approach to medicine has incorporated a wide variety of mathematical procedures from the fields of physics,

More information

Accuplacer Arithmetic Study Guide

Accuplacer Arithmetic Study Guide Testing Center Student Success Center Accuplacer Arithmetic Study Guide I. Terms Numerator: which tells how many parts you have (the number on top) Denominator: which tells how many parts in the whole

More information

Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC

Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 1 Number Systems Representation Positive radix, positional number systems A number with radix r is represented by a string of digits: A n

More information

Quartus II Introduction for VHDL Users

Quartus II Introduction for VHDL Users Quartus II Introduction for VHDL Users This tutorial presents an introduction to the Quartus II software. It gives a general overview of a typical CAD flow for designing circuits that are implemented by

More information

LabVIEW programming I

LabVIEW programming I FYS3240 PC-based instrumentation and microcontrollers LabVIEW programming I LabVIEW basics Spring 2013 Lecture #2 Bekkeng 8.1.2013 Virtual Instruments LabVIEW programs are called virtual instruments, or

More information

The OptQuest Engine Java and.net Developer's Guilde

The OptQuest Engine Java and.net Developer's Guilde The OptQuest Engine Java and.net Developer's Guilde Table Of Contents Introduction to optimization... 1 What is optimization?... 1 How the OptQuest Engine works... 1 Using the documentation... 2 Platforms...

More information

Decimal Numbers: Base 10 Integer Numbers & Arithmetic

Decimal Numbers: Base 10 Integer Numbers & Arithmetic Decimal Numbers: Base 10 Integer Numbers & Arithmetic Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 )+(1x10 0 ) Ward 1 Ward 2 Numbers: positional notation Number

More information

LMS is a simple but powerful algorithm and can be implemented to take advantage of the Lattice FPGA architecture.

LMS is a simple but powerful algorithm and can be implemented to take advantage of the Lattice FPGA architecture. February 2012 Introduction Reference Design RD1031 Adaptive algorithms have become a mainstay in DSP. They are used in wide ranging applications including wireless channel estimation, radar guidance systems,

More information

3.1. RATIONAL EXPRESSIONS

3.1. RATIONAL EXPRESSIONS 3.1. RATIONAL EXPRESSIONS RATIONAL NUMBERS In previous courses you have learned how to operate (do addition, subtraction, multiplication, and division) on rational numbers (fractions). Rational numbers

More information

Getting Started with the LabVIEW Embedded Module for ARM Microcontrollers 1.0 For the Keil MCB2300

Getting Started with the LabVIEW Embedded Module for ARM Microcontrollers 1.0 For the Keil MCB2300 Getting Started with the LabVIEW Embedded Module for ARM Microcontrollers 1.0 For the Keil MCB2300 Contents The LabVIEW Embedded Module for ARM Microcontrollers is a comprehensive graphical development

More information

SignalTap II with Verilog Designs. 1 Introduction

SignalTap II with Verilog Designs. 1 Introduction SignalTap II with Verilog Designs 1 Introduction This tutorial explains how to use the SignalTap II feature within Altera s Quartus II software. The SignalTap II Embedded Logic Analyzer is a system-level

More information

VISUAL ALGEBRA FOR COLLEGE STUDENTS. Laurie J. Burton Western Oregon University

VISUAL ALGEBRA FOR COLLEGE STUDENTS. Laurie J. Burton Western Oregon University VISUAL ALGEBRA FOR COLLEGE STUDENTS Laurie J. Burton Western Oregon University VISUAL ALGEBRA FOR COLLEGE STUDENTS TABLE OF CONTENTS Welcome and Introduction 1 Chapter 1: INTEGERS AND INTEGER OPERATIONS

More information

16-Tap, 8-Bit FIR Filter Applications Guide

16-Tap, 8-Bit FIR Filter Applications Guide 16-Tap, 8-Bit FIR Filter Applications Guide November 21, 1994 Application Note BY G GOSLIN & BRUCE NEWGARD Summary This application note describes the functionality and integration of a 16-Tap, 8-Bit Finite

More information

DRAFT. Further mathematics. GCE AS and A level subject content

DRAFT. Further mathematics. GCE AS and A level subject content Further mathematics GCE AS and A level subject content July 2014 s Introduction Purpose Aims and objectives Subject content Structure Background knowledge Overarching themes Use of technology Detailed

More information

COMPASS Numerical Skills/Pre-Algebra Preparation Guide. Introduction Operations with Integers Absolute Value of Numbers 13

COMPASS Numerical Skills/Pre-Algebra Preparation Guide. Introduction Operations with Integers Absolute Value of Numbers 13 COMPASS Numerical Skills/Pre-Algebra Preparation Guide Please note that the guide is for reference only and that it does not represent an exact match with the assessment content. The Assessment Centre

More information

Scripting with TCL, Part 1

Scripting with TCL, Part 1 Scripting with TCL, Part 1 Axel Kohlmeyer Center for Molecular Modeling University of Pennsylvania SBS 2007 @ JNCASR, Bangalore The VMD Execution Model GUI (FLTK) Internal State Visualization Python Interpreter

More information

Lab 3: Introduction to Data Acquisition Cards

Lab 3: Introduction to Data Acquisition Cards Lab 3: Introduction to Data Acquisition Cards INTRODUCTION: In this lab, you will be building a VI to display the input measured on a channel. However, within your own VI you will use LabVIEW supplied

More information

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal. Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems

More information

Getting Started Manual

Getting Started Manual Getting Started Manual LabVIEW LEGO MINDSTORMS NXT Module The LabVIEW LEGO MINDSTORMS NXT Module enables you to perform the following tasks: Develop LabVIEW VIs that run on a host computer and communicate

More information

SignalTap II with Verilog Designs

SignalTap II with Verilog Designs SignalTap II with Verilog Designs This tutorial explains how to use the SignalTap II feature within Altera s Quartus R II software. The Signal- Tap II Embedded Logic Analyzer is a system-level debugging

More information

VIDEO SCRIPT: 8.2.1 Data Management

VIDEO SCRIPT: 8.2.1 Data Management VIDEO SCRIPT: 8.2.1 Data Management OUTLINE/ INTENT: Create and control a simple numeric list. Use numeric relationships to describe simple geometry. Control lists using node lacing settings. This video

More information

LabVIEW Report Generation Toolkit for Microsoft Office User Guide

LabVIEW Report Generation Toolkit for Microsoft Office User Guide LabVIEW Report Generation Toolkit for Microsoft Office User Guide Version 1.1 Contents The LabVIEW Report Generation Toolkit for Microsoft Office provides tools you can use to create and edit reports in

More information

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors I. Introduction I.a. Objectives In this experiment, parallel adders, subtractors and complementors will be designed and investigated. In the

More information

DDS. 16-bit Direct Digital Synthesizer / Periodic waveform generator Rev. 1.4. Key Design Features. Block Diagram. Generic Parameters.

DDS. 16-bit Direct Digital Synthesizer / Periodic waveform generator Rev. 1.4. Key Design Features. Block Diagram. Generic Parameters. Key Design Features Block Diagram Synthesizable, technology independent VHDL IP Core 16-bit signed output samples 32-bit phase accumulator (tuning word) 32-bit phase shift feature Phase resolution of 2π/2

More information

Introduction to Mathcad

Introduction to Mathcad CHAPTER 1 Introduction to Mathcad Mathcad is a product of MathSoft inc. The Mathcad can help us to calculate, graph, and communicate technical ideas. It lets us work with mathematical expressions using

More information

Final Exam Review: VBA

Final Exam Review: VBA Engineering Fundamentals ENG1100 - Session 14B Final Exam Review: VBA 1 //coe/dfs/home/engclasses/eng1101/f03/ethics/en1.e05.finalcoursewrapup.sxi Final Programming Exam Topics Flowcharts Assigning Variables

More information

Introduction to Xilinx System Generator Part II. Evan Everett and Michael Wu ELEC 433 - Spring 2013

Introduction to Xilinx System Generator Part II. Evan Everett and Michael Wu ELEC 433 - Spring 2013 Introduction to Xilinx System Generator Part II Evan Everett and Michael Wu ELEC 433 - Spring 2013 Outline Introduction to FPGAs and Xilinx System Generator System Generator basics Fixed point data representation

More information

Exercise 10: Basic LabVIEW Programming

Exercise 10: Basic LabVIEW Programming Exercise 10: Basic LabVIEW Programming In this exercise we will learn the basic principles in LabVIEW. LabVIEW will be used in later exercises and in the project part, as well in other courses later, so

More information

Chapter # 5: Arithmetic Circuits

Chapter # 5: Arithmetic Circuits Chapter # 5: rithmetic Circuits Contemporary Logic Design 5- Number ystems Representation of Negative Numbers Representation of positive numbers same in most systems Major differences are in how negative

More information

Counters and Decoders

Counters and Decoders Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter

More information

Lecture 8: Synchronous Digital Systems

Lecture 8: Synchronous Digital Systems Lecture 8: Synchronous Digital Systems The distinguishing feature of a synchronous digital system is that the circuit only changes in response to a system clock. For example, consider the edge triggered

More information

COMPSCI 210. Binary Fractions. Agenda & Reading

COMPSCI 210. Binary Fractions. Agenda & Reading COMPSCI 21 Binary Fractions Agenda & Reading Topics: Fractions Binary Octal Hexadecimal Binary -> Octal, Hex Octal -> Binary, Hex Decimal -> Octal, Hex Hex -> Binary, Octal Animation: BinFrac.htm Example

More information

The Answer to the 14 Most Frequently Asked Modbus Questions

The Answer to the 14 Most Frequently Asked Modbus Questions Modbus Frequently Asked Questions WP-34-REV0-0609-1/7 The Answer to the 14 Most Frequently Asked Modbus Questions Exactly what is Modbus? Modbus is an open serial communications protocol widely used in

More information

EnerVista TM Viewpoint Monitoring v7.10

EnerVista TM Viewpoint Monitoring v7.10 EnerVista TM Viewpoint Monitoring v7.10 Guideform Specifications July 7, 2014 Page 1 of 14 1 - Product Overview 1.1 Viewpoint Monitoring Scope EnerVista Viewpoint Monitoring is an easy to setup, powerful

More information

DEPLOYING A VISUAL BASIC.NET APPLICATION

DEPLOYING A VISUAL BASIC.NET APPLICATION C6109_AppendixD_CTP.qxd 18/7/06 02:34 PM Page 1 A P P E N D I X D D DEPLOYING A VISUAL BASIC.NET APPLICATION After completing this appendix, you will be able to: Understand how Visual Studio performs deployment

More information

Modbus and ION Technology

Modbus and ION Technology Modbus and ION Technology Modicon Modbus is a communications protocol widely used in process control industries such as manufacturing. ACCESS meters are compatible with Modbus networks as both slaves and

More information

Using MATLAB to Solve Differential Equations

Using MATLAB to Solve Differential Equations ECE 350 Linear Systems I MATLAB Tutorial #3 Using MATLAB to Solve Differential Equations This tutorial describes the use of MATLAB to solve differential equations. Two methods are described. The first

More information

Algorithm and Programming Considerations for Embedded Reconfigurable Computers

Algorithm and Programming Considerations for Embedded Reconfigurable Computers Algorithm and Programming Considerations for Embedded Reconfigurable Computers Russell Duren, Associate Professor Engineering And Computer Science Baylor University Waco, Texas Douglas Fouts, Professor

More information

2 Programs: Instructions in the Computer

2 Programs: Instructions in the Computer 2 2 Programs: Instructions in the Computer Figure 2. illustrates the first few processing steps taken as a simple CPU executes a program. The CPU for this example is assumed to have a program counter (PC),

More information

Introduction to Simulink

Introduction to Simulink Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Introduction to Simulink HANS-PETTER HALVORSEN, 2011.06.06 Faculty of Technology, Postboks 203,

More information

Lab 4 Large Number Arithmetic. ECE 375 Oregon State University Page 29

Lab 4 Large Number Arithmetic. ECE 375 Oregon State University Page 29 Lab 4 Large Number Arithmetic ECE 375 Oregon State University Page 29 Objectives Understand and use arithmetic and ALU operations Manipulate and handle large numbers Create and handle functions and subroutines

More information

CORDIC: How Hand Calculators Calculate

CORDIC: How Hand Calculators Calculate Integre Technical Publishing Co., Inc. College Mathematics Journal 40: December 7, 008 :49 p.m. sultan.tex page 87 CORDIC: How Hand Calculators Calculate Alan Sultan Alan Sultan is a professor of mathematics

More information

New parameters in Driver Sheet Copyright InduSoft Systems LLC 2006

New parameters in Driver Sheet Copyright InduSoft Systems LLC 2006 Using the DIV & ADD and MAX & MIN Parameters in a Main or Standard Driver Category Software Equipment Software Demo Application Implementation Specifications or Requirements Item IWS Version: 6.0 and later

More information

The equation for the 3-input XOR gate is derived as follows

The equation for the 3-input XOR gate is derived as follows The equation for the 3-input XOR gate is derived as follows The last four product terms in the above derivation are the four 1-minterms in the 3-input XOR truth table. For 3 or more inputs, the XOR gate

More information

Using Casio Graphics Calculators

Using Casio Graphics Calculators Using Casio Graphics Calculators (Some of this document is based on papers prepared by Donald Stover in January 2004.) This document summarizes calculation and programming operations with many contemporary

More information

PURSUITS IN MATHEMATICS often produce elementary functions as solutions that need to be

PURSUITS IN MATHEMATICS often produce elementary functions as solutions that need to be Fast Approximation of the Tangent, Hyperbolic Tangent, Exponential and Logarithmic Functions 2007 Ron Doerfler http://www.myreckonings.com June 27, 2007 Abstract There are some of us who enjoy using our

More information

General Guide...3. Before Starting Calculation...4

General Guide...3. Before Starting Calculation...4 General Guide...3 Turning on or off...3 Battery replacement...3 Auto power-off function...3 Reset operation...3 Contrast adjustment...3 Display readout...4 Before Starting Calculation...4 Using " MODE

More information

DSP Laboratory: Analog to Digital and Digital to Analog Conversion

DSP Laboratory: Analog to Digital and Digital to Analog Conversion OpenStax-CNX module: m13035 1 DSP Laboratory: Analog to Digital and Digital to Analog Conversion Erik Luther This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License

More information

Introduction to LabVIEW

Introduction to LabVIEW Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Introduction to LabVIEW HANS- PETTER HALVORSEN, 2014.03.07 Faculty of Technology, Postboks 203,

More information

An Introduction to Using Simulink

An Introduction to Using Simulink An Introduction to Using Simulink Eric Peasley, Department of Engineering Science, University of Oxford version 4.0, 2013 An Introduction To Using Simulink. Eric Peasley, Department of Engineering Science,

More information

CSI 333 Lecture 1 Number Systems

CSI 333 Lecture 1 Number Systems CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...

More information

The Role of Distributed Arithmetic in FPGA-based Signal Processing

The Role of Distributed Arithmetic in FPGA-based Signal Processing The Role of Distributed Arithmetic in FPGA-based Signal Processing Introduction Distributed Arithmetic (DA) plays a key role in embedding DSP functions in the Xilinx 4000 family of FPGA devices. In this

More information

MATH 10034 Fundamental Mathematics IV

MATH 10034 Fundamental Mathematics IV MATH 0034 Fundamental Mathematics IV http://www.math.kent.edu/ebooks/0034/funmath4.pdf Department of Mathematical Sciences Kent State University January 2, 2009 ii Contents To the Instructor v Polynomials.

More information

FX 115 MS Training guide. FX 115 MS Calculator. Applicable activities. Quick Reference Guide (inside the calculator cover)

FX 115 MS Training guide. FX 115 MS Calculator. Applicable activities. Quick Reference Guide (inside the calculator cover) Tools FX 115 MS Calculator Handouts Other materials Applicable activities Quick Reference Guide (inside the calculator cover) Key Points/ Overview Advanced scientific calculator Two line display VPAM to

More information

Lab 4 Multisim Evaluation of an RC Network

Lab 4 Multisim Evaluation of an RC Network Lab 4 Multisim Evaluation of an RC Network Prelab Exercises All graphs must be fully labeled and drawn neatly! No answers are complete without the units! as always, show your work! 2 R 1 = 10kΩ 5V + V

More information

fx-83gt PLUS fx-85gt PLUS User s Guide

fx-83gt PLUS fx-85gt PLUS User s Guide E fx-83gt PLUS fx-85gt PLUS User s Guide CASIO Worldwide Education Website http://edu.casio.com CASIO EDUCATIONAL FORUM http://edu.casio.com/forum/ Contents Important Information... 2 Sample Operations...

More information

Display Format To change the exponential display format, press the [MODE] key 3 times.

Display Format To change the exponential display format, press the [MODE] key 3 times. Tools FX 300 MS Calculator Overhead OH 300 MS Handouts Other materials Applicable activities Activities for the Classroom FX-300 Scientific Calculator Quick Reference Guide (inside the calculator cover)

More information