hdlbits_Fsm_hdlc
【hdlbits_Fsm_hdlc】https://hdlbits.01xz.net/wiki/Fsm_hdlc
有error
module top_module(
input clk,
input reset,// Synchronous reset
input in,
output disc,
output flag,
output err);
reg [7:0]d;
always @(posedge clk)
begin
if (reset)
d<=8'b0;
else
d<= {in,d[7:1]};
end
assign disc = (d[6:0]==7'b0111110);
assign flag = (d==8'b01111110);
assign err = (d==8'b11111110)|(d==8'b01111111)|(d==8'b11111111);
endmodule
推荐阅读
- STM32F1 FSMC 初步理解1
- 如何使用MM32F3270单片机FSMC驱动外部NOR Flash
- Finite State Machines (FSM)
- 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)