1 / 8

Floating Point Hardware and Algorithms

Floating Point Hardware and Algorithms. Ch.3. Review. Adder gate level diagram Adder Verilog module Processing Verilog files using Icarus Verilog Simulation verilog module definition using vvp Floating point representation. Adder Circuit. Adder (a,b,cin)  s, cout s = ? cout = ?.

Download Presentation

Floating Point Hardware and Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Floating Point Hardware and Algorithms Ch.3

  2. Review • Adder gate level diagram • Adder Verilog module • Processing Verilog files using Icarus Verilog • Simulation verilog module definition using vvp • Floating point representation

  3. Adder Circuit • Adder (a,b,cin)  s, cout • s = ? • cout = ?

  4. Processing Verilog File • IcarusVerilog, vvp are the tools available on cse machines • IcarusVerilog compiler: iverilog • iverilog is a compiler that translates Verilog source code into executable programs for simulation, or other netlist formats for further processing. The currently supported targets are vvp for simulation • vvp is the run time engine that executes the default compiled form generated by IcarusVerilog. The output from the iverilog command is not by itself executable on any plat form. Instead, the vvp program is invoked to execute the generated output file.

  5. Using the Verilog Compiler and Runtime • Design your Verilog module according to the specification given • For adder, lets say we have saved the verilog module design in “adder.v” • Compile the module definition into a form that can be executed by vvp runtime. • iverilog -o adder adder.v • Output of iverilog command is stored in file “adder” • Run the code to check the output, that is typically generated by the tester code. • vvp adder • You will see the output on the screen • You can also capture into a file to submit it or print it.

  6. Floating point numbers • Why do we need them? • To represent very large number and very small number. • To represent a larger range of number with a given size in bits. • Consider a 4 bit container • Consider a 8 bit container • Examples: An astronautical unit (Au)is the distance between the earth and the sun in meters. • 150,000,000,000 meters • Size of Helium atom: 1 angstrom: 10-10 meters • See more details on units of measurement here

  7. FP Representation S Exponent Fraction Value = (-1)S X F X 2 E 32 bit single precision 64 bit double precision IEEE 754 format

  8. FP Addition and Multiplication • Components: operands, ALU, control, comparison, shifters, normalize, round • Control • ALUs • Figures: 3.17, 3.16, 3.18

More Related