Giter Club home page Giter Club logo

drum's Introduction

drum

Dynamic Range Unbiased Multiplier

Design

approxMultiplier (top module)

The operands A and B are fed to the approxMultiplier module, which truncates the required number of bits and pushes it to the 4-bit Wallace Tree Multiplier.
The output of the Wallace Multiplier (resoluteProduct) is then sent through the barrel shifter to obtain a compensated result (approx product).
The shift of the resoluteProduct is necessary to compensate for the offset, which can be calculated by:

<-----n bits---->
|0|0|1|X|...|X|X|
    <---t bits-->
    <-k bits->

In the paper's terms, t-k bits need to be shifted for each operand, which results in loIndexA+1 + loIndexB+1 - 2*(MAIN_RESOLUTION) for the program.

Shift amount wouldn't cross beyond log(OUT_WIDTH) and is an assumption made for the hardware of the barrelShifter.

Wallace-Tree Multiplier

  • Is the only solution to a scaled 16x16 multiplier hardcoded logic?
  • Instantiate 4-bit wallace-multipliers 8x8, 16x16 wallace multipliers?
  • Testbench needed

Leading One Detector

LOD is implemented along with a simple MSB to LSB priority encoder.
Naturally, a break statement will be necessary for prioritising the MSB, which isn't synthesizable, hence a basic FSM is used to improvise.

Simulation Reults

The figure below shows operandA and operandB looping from 17 to 31 (decimal).
allCondensed

The figure below shows one iteration of the testbench's outer loop, with operandA fixed at 17 and operandB ramping from 17 to 31.
oneExample

The figure below shows 50 iterations of operandA x operandB where A ramps from 10 to 18 in increments of 2 while B ramps in single increments.
It can be seen that the steering logic determines to approximate the operand value whenever it goes higher than the RESOLUTION (4 bits). Correspondingly, signals truncateOperandA and truncateOperandB are altered.
All variables are hopefully self-explanatory.
approximate

drum's People

Contributors

thecurryspice avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.