Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mariamelsahharr committed Sep 28, 2024
1 parent ad824c2 commit 7be90ff
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/processing_Element.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module processing_element(
input wire clk,
input wire rst,
input wire [15:0] data_in_2,
input wire [15:0] data_in_1,
output wire [31:0] data_out
);

reg [31:0] acc ;

always @(posedge clk or posedge rst) begin

if (rst) begin
acc <= 32'b0;
data_out <= 32'b0;
end else begin
acc <= acc + $signed(data_in_1) + $signed(data_in_2);
data_out <= acc;
end
end




endmodule

0 comments on commit 7be90ff

Please sign in to comment.