Skip to content
Snippets Groups Projects
Commit 250b9c60 authored by jf3g19's avatar jf3g19
Browse files

Update README.md

parent 0fb2d703
No related branches found
No related tags found
No related merge requests found
**Contents**
Implementation of a Basic Distributed Arithmetic Architechture for MAC Implementation of a Basic Distributed Arithmetic Architechture for MAC
**Operation**
- The Distributed Arithmetic Architechture is based on the assumption that for a given Sum Of Products (SoP) between two arrays `C` and `X` that you know the value of `C` at compile time.
- Based on this assumption we can generate a LUT which allows us to transform the SoP to a series of shifts and adds.
- The File generate_LUT.cpp can be used to generate the LUT values for a given set of input coefficients. If you compile the file it can be run in the command line in the following format:
`> generate_LUT [Multiplicand Bit-Width] [C[0]] [C[1]] [C[2]] [C[3]] .... [C[n]] `
i.e
`generate_LUT 16 -4 -3 1 9`
would generate the LUT for the coefficients c[0] = -4, c[1] = -3, c[2] = 1, c[3] = 9, and a 16-bit Bit-Width for your Multiplicand.
The generate multiplication coefficients can be stored as an unpacked array of packed values and should be connected directly to the `multiplication_coefficients` input port.
**Example**
An Example ModelSim output for the testbench provided, which displays the inner product of
`X = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]`
`C = [ [-79 -136 312 654 -1244 -2280 4501 14655 14655 4501 -2280 -1244 654 312 -136 -79]`
[output](https://imgur.com/WczvADF)
We can see that after input ready goes high, 17 clock cycles later, output ready goes high [with the correct value 278,511](https://imgur.com/ctePVPN)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment