赞
踩
This is a sequential circuit. The circuit consists of combinational logic and one bit of memory (i.e., one flip-flop). The output of the flip-flop has been made observable through the output state.
Read the simulation waveforms to determine what the circuit does, then implement it.
2030405060708090100110120130140150
- module top_module (
- input clk,
- input a,
- input b,
- output q,
- output state );
-
- always @(posedge clk)
- begin
- if (a == b)
- state <= a;
- else
- state <= state;
- end
-
- assign q = (a == b) ? state : ~state;
-
- endmodule
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。