hdlbits_Exams/review2015_fsmseq
https://hdlbits.01xz.net/wiki/Exams/review2015_fsmseq
【hdlbits_Exams/review2015_fsmseq】用LFSR 写更简单一些
module top_module (
input clk,
input reset,// Synchronous reset
input data,
output start_shifting);
reg [3:0] d;
always @(posedge clk)
begin
d<= {d[2:0],data};
if (reset)
begin
start_shifting<=1'b0;
d <= 4'b0;
end
else if ({d[2:0],data} == 4'b1101)
start_shifting<=1'b1;
endendmodule
推荐阅读
- 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记录(三)