Also include an active-high synchronous reset that resets the state machine to a state equivalent to if the water level had been low for a long time (no sensors asserted, and all four outputs asserted).
前言
三个输入,包括一个时钟clk,一个高电平有效的同步置位信号reset,一个输入信号s;四个输出,包括一个输出信号dfr,以及一组输出信号fr3、fr2 和 fr1。
代码
module top_module (
input clk,
input reset,
input [3:1] s,
output fr3,
output fr2,
output fr1,
output dfr
);
parameter A=