Wednesday, February 12, 2020

Interview Question 39: Compute Sum of Differences.

 You need to compute the Sum of Differences for the given two matrices.

Output = ABS(A00-B00) + .... + ABS(A03-B03) + ........+ ABS(A30-B30) + .... + ABS(A33-B33)

Each entry is an 8-bit unsigned integer. 

Questions you should be asking:
- Are all the values are available immediately or they arrive at different times?
- How many clocks are allowed to compute? (1/2/4/16)
    . The answer will change your micro-architecture of design

Hints:
- Design a simple SOD design for just two 8-bit inputs. This can become a building block.
- Give attention to the widths of outputs of each block.
- What will change if the design can not fit in the required number of clocks? (pipelining)