Skip to content

Commit

Permalink
Update conv2_weight.v
Browse files Browse the repository at this point in the history
  • Loading branch information
cxlisme authored Apr 5, 2022
1 parent cc249a2 commit 34632c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CNN_minist/CNN_minist.srcs/sources_1/new/conv2_weight.v
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@ parameter weight_widht = 6'd17)

assign en = ((rd_vaild<4'd11) && weight_flat && (cnt_addra<weight_num))?1'b1:1'b0;

always@(*)begin
always@(posedge vaild or negedge rst_n or negedge c2_w_en)begin
if(!rst_n)
weight_flat = 1'd0;
weight_flat <= 1'd0;
else if(vaild || !c2_w_en)
weight_flat = ~weight_flat;

weight_flat <= ~weight_flat;
end

always@(posedge clk or negedge rst_n)begin
Expand Down

0 comments on commit 34632c0

Please sign in to comment.