Skip to content

Matrix Multiply and Accumulate unit written in System Verilog

License

Notifications You must be signed in to change notification settings

AleksandarKostovic/Matrix-MAC-Unit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Matrix-MAC-Unit

Matrix MAC Unit is 8-bit Multiply and Accumulate core for 4 X 4 size matrices.

alt text

Usage

Generally MAC units are the base of DSP's like FIR filters.

However to do calculation of Deep Neural Networks(DNNs), the matrix ability has to be added to the design.

The design supports 4 X 4 size matrices that are standard size in deep neural network. The reason why the design is 8-bit is that for deep learning computation hardware needs to be 8-bit in width at least. Bit width can be changd by changing the number 8 in code for anything suitable. The code is

localparam DATA_WIDTH = 8

Matrix size can be changed by changing

localparam M_SIZE = 4

and changing the loop so it has more combinations inside the initilaization from 1D to 2D and vice-versa.

Releases

No releases published

Packages

No packages published