Advertisement
Guest User

Untitled

a guest
May 2nd, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module mat_mul_accl(
  2.     input logic CLK,
  3.     input logic RESET,
  4.     // start signal that comes in from avalon interface to start conv
  5.     input logic MM_START,
  6.     input logic [31:0] mat1 [8:0],
  7.     input logic [31:0] mat2 [8:0],
  8.     // done signal that tells interface multiplication is complete
  9.     output logic [31:0] outmat [8:0],
  10.     output logic MM_DONE
  11. );  
  12. always_comb
  13. begin
  14.  
  15.         outmat[0] = mat1[0]*mat2[0];
  16.         outmat[1] = mat1[1]*mat2[1];
  17.         outmat[2] = mat1[2]*mat2[2];
  18.         outmat[3] = mat1[3]*mat2[3];
  19.         outmat[4] = mat1[4]*mat2[4];
  20.         outmat[5] = mat1[5]*mat2[5];
  21.         outmat[6] = mat1[6]*mat2[6];
  22.         outmat[7] = mat1[7]*mat2[7];
  23.         outmat[8] = mat1[8]*mat2[8];
  24.  
  25. end
  26. assign MM_DONE = 1'b1;
  27. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement