Advertisement
mayankherode_04

Untitled

Sep 14th, 2023
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module tb_matrix_multiplier();
  2.   reg clk;
  3.   reg rst;
  4.   reg [31:0] matrix_A;
  5.   reg [31:0] matrix_B;
  6.   wire [31:0] matrix_C;
  7. matrix_multiplier uut (
  8.     .clk(clk),
  9.     .rst(rst),
  10.     .matrix_A(matrix_A),
  11.     .matrix_B(matrix_B),
  12.     .matrix_C(matrix_C)
  13.   );
  14. always begin
  15.     #5 clk = ~clk;
  16.   end
  17.   initial begin
  18.     clk = 0;
  19.     rst = 0;
  20.     matrix_A = 32'h00000000;
  21.     matrix_B = 32'h00000000;
  22.     rst = 1;
  23.     #10 rst = 0;
  24.     matrix_A = 32'h12345678;
  25.     matrix_B = 32'h9ABCDEF0;
  26.     #100;
  27.     $display("matrix_C = %h", matrix_C);
  28.     $finish;
  29.   end
  30.  
  31. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement