Giter Club home page Giter Club logo

solved-ee2003-assignment1-sequential-multiplier-in-verilog-hdl's Introduction

Download Link: https://assignmentchef.com/product/solved-ee2003-assignment1-sequential-multiplier-in-verilog-hdl

This assignment deals with implementation of a sequential multiplier in Verilog HDL.

Goals

– Demonstrate basic working knowledge of verilog– Practice git– Practice assignment submission and feedback

Given

– Test bench for sequential multiplier– Template code that you can use to fill in– Some test cases

Details on the assignment

Multiplication

This basically refers to the “long form” multiplication as we learn in school. For each digit of the multiplier, we shift the multiplicand to the appropriate place value, and then add all the partial products. An example of the partial products in binary for a simple 4-bit multiplication are shown below. As expected, multiplying two 4-bit numbers can result in an output that is up to 8 bits in length.

0110 # Decimal 6 – Multiplicandx 0011 # Decimal 3 – Multiplier——–0110 # Partial product 0 (PP0)0110 # PP10000 # PP20000 # PP3——–00010010 # Decimal 18——–“

Number representation

The numbers themselves are represented in 2’s complement notation. Therefore, if the multiplicand is negative, the PP values should be “sign-extended” to get the correct result. An example for negative multiplicand is shown below – negative multiplier requires similar careful handling, and is left as an exercise.

1010 # Decimal -6x 0011 # Decimal 3——–11111010 # Partial product 0 (PP0) – sign extended1111010 # PP1000000 # PP200000 # PP3——–(1)11101110 # Decimal -18 (discard the overflow 1)——–“

Hardware implementation

The above multiplication process can be directly implemented as combinational logic, where each partial product vector is created using a set of AND gates, and the results are put through a chain of adders.

The other alternative is to have a reduced hardware with a single register to hold the final product. This accumulates the final product by iterating over several clock cycles (how many?). A diagram indicating the architecture is shown here.

Sequential Multiplier

HowTo

Fork this repostiry (EE2003/a1) into your namespace so that you can edit and push changes.

You are given a test bench (seq_mult.v) with suitable test cases (test_in.dat). The assignment repository also contains a drone configuration that will run the tests using the iverilog compiler. You can of course run the test commands yourself if you wish, as seen in the configuration file.

IMPORTANT: the filename for the code that you write must be seq_mult.v – otherwise the auto-grader will not recognize it.

Once you have confirmed that your code passes all the tests, commit all the changes, tag it for submission, and push to your repository.

solved-ee2003-assignment1-sequential-multiplier-in-verilog-hdl's People

Contributors

programming-assignments avatar

Watchers

 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.