You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
369 B
Verilog

module pwm_beep(
input wire sys_clk ,
input wire sys_rst_n ,
input wire pwm ,
output reg beep
);
always @(posedge sys_clk or negedge sys_rst_n)begin
if(!sys_rst_n)begin
beep <= 1'b1;
end
else if(pwm)begin
beep <= 1'b0;
end
else begin
beep <= 1'b1;
end
end
endmodule