hdlbits_Exams/m2014_q6b
【hdlbits_Exams/m2014_q6b】https://hdlbits.01xz.net/wiki/Exams/m2014_q6b
module top_module (
input [3:1] y,
input w,
output Y2);
reg [3:1]d;
parameter A=0,B=1,C=2,D=3,E=4,F=5;
always@(*)
begin
case(y)
A:d = w?A:B;
B:d = w?D:C;
C:d = w?D:E;
D:d = w?A:F;
E:d = w?D:E;
F:d = w?D:C;
endcase
endassign Y2 = d[2];
endmodule
推荐阅读
- ACM|codeforces 732-D. Exams (二分)
- HDLBits Day12 count clock 做一个钟表
- HDLbits答案更新系列23(5|HDLbits答案更新系列23(5 Verification: Reading Simulation)
- HDLbits答案更新系列19(3.3|HDLbits答案更新系列19(3.3 Building Larger Circuits 3.3.1 Counter with period 1000等)
- HDLbits答案更新系列10(3.2|HDLbits答案更新系列10(3.2 Sequential Logic 3.2.4 More Circuits)
- HDLbits答案更新系列13(3.2.5|HDLbits答案更新系列13(3.2.5 Finite State Machines 3.2.5.10 Lemmings 1等)
- HDLbits答案更新系列9(3.2|HDLbits答案更新系列9(3.2 Sequential Logic 3.2.3 Shift Registers)
- HDLbits答案更新系列8(3.2|HDLbits答案更新系列8(3.2 Sequential Logic 3.2.2 Counters)
- HDLBits记录(二)
- HDLBits记录(三)