随笔分类 -  Hdlbits的Verilog学习

摘要:Implement a Mealy-type finite state machine that recognizes the sequence "101" on an input signal named x. Your FSM should have an output signal, z, t 阅读全文
posted @ 2024-04-16 01:38 江左子固 阅读(70) 评论(0) 推荐(0)
摘要:// way1 module top_module( input clk, input reset, // Synchronous reset input in, output disc, output flag, output err); parameter NONE = 4'd0,ONE = 4 阅读全文
posted @ 2024-04-16 00:47 江左子固 阅读(42) 评论(0) 推荐(0)
摘要:See also: Serial receiver and datapath We want to add parity checking to the serial receiver. Parity checking adds one extra bit after each data byte. 阅读全文
posted @ 2024-04-15 23:44 江左子固 阅读(131) 评论(0) 推荐(0)
摘要:See also: Serial receiver Now that you have a finite state machine that can identify when bytes are correctly received in a serial bitstream, add a da 阅读全文
posted @ 2024-04-15 20:38 江左子固 阅读(54) 评论(0) 推荐(0)
摘要:In many (older) serial communications protocols, each data byte is sent along with a start bit and a stop bit, to help the receiver delimit bytes from 阅读全文
posted @ 2024-04-15 20:32 江左子固 阅读(64) 评论(0) 推荐(0)
摘要:See also: PS/2 packet parser. Now that you have a state machine that will identify three-byte messages in a PS/2 byte stream, add a datapath that will 阅读全文
posted @ 2024-04-15 17:58 江左子固 阅读(77) 评论(0) 推荐(0)
摘要:The PS/2 mouse protocol sends messages that are three bytes long. However, within a continuous byte stream, it's not obvious where messages start and 阅读全文
posted @ 2024-04-15 17:37 江左子固 阅读(60) 评论(0) 推荐(0)
摘要:Given the following state machine with 1 input and 2 outputs: 题目网站 module top_module( input in, input [9:0] state, output [9:0] next_state, output out 阅读全文
posted @ 2024-04-15 17:07 江左子固 阅读(99) 评论(2) 推荐(1)
摘要:See also: Lemmings1, Lemmings2, and Lemmings3. Although Lemmings can walk, fall, and dig, Lemmings aren't invulnerable. If a Lemming falls for too lon 阅读全文
posted @ 2024-04-15 02:28 江左子固 阅读(142) 评论(0) 推荐(0)
摘要:See also: Lemmings1 and Lemmings2. In addition to walking and falling, Lemmings can sometimes be told to do useful things, like dig (it starts digging 阅读全文
posted @ 2024-04-15 00:42 江左子固 阅读(82) 评论(0) 推荐(0)
摘要:See also: Lemmings1. In addition to walking left and right, Lemmings will fall (and presumably go "aaah!") if the ground disappears underneath them. I 阅读全文
posted @ 2024-04-14 22:43 江左子固 阅读(74) 评论(0) 推荐(0)
摘要:The game Lemmings involves critters with fairly simple brains. So simple that we are going to model it using a finite state machine. In the Lemmings' 阅读全文
posted @ 2024-04-14 04:50 江左子固 阅读(65) 评论(0) 推荐(0)
摘要:题目网站 1 module top_module ( 2 input clk, 3 input reset, 4 input [3:1] s, 5 output fr3, 6 output fr2, 7 output fr1, 8 output dfr 9 ); 10 parameter A2=3' 阅读全文
posted @ 2024-04-14 04:36 江左子固 阅读(65) 评论(0) 推荐(0)
摘要:module top_module( input clk, input in, input reset, output out); // parameter A=2'b00,B=2'b01,C=2'b10,D=2'b11; reg [1:0]state,next_state; // State tr 阅读全文
posted @ 2024-04-14 04:29 江左子固 阅读(44) 评论(0) 推荐(0)
摘要:See also: State transition logic for this FSM The following is the state transition table for a Moore state machine with one input, one output, and fo 阅读全文
posted @ 2024-04-14 04:18 江左子固 阅读(52) 评论(0) 推荐(0)
摘要:The following is the state transition table for a Moore state machine with one input, one output, and four states. Use the following one-hot state enc 阅读全文
posted @ 2024-04-14 04:02 江左子固 阅读(50) 评论(0) 推荐(0)
摘要:The following is the state transition table for a Moore state machine with one input, one output, and four states. Use the following state encoding: A 阅读全文
posted @ 2024-04-14 03:18 江左子固 阅读(53) 评论(0) 推荐(0)
摘要:This is a Moore state machine with two states, two inputs, and one output. Implement this state machine. This exercise is the same as fsm2, but using 阅读全文
posted @ 2024-04-14 02:41 江左子固 阅读(45) 评论(0) 推荐(0)
摘要:This is a Moore state machine with two states, two inputs, and one output. Implement this state machine. This exercise is the same as fsm2s, but using 阅读全文
posted @ 2024-04-14 02:17 江左子固 阅读(83) 评论(0) 推荐(0)
摘要:This is a Moore state machine with two states, one input, and one output. Implement this state machine. Notice that the reset state is B. This exercis 阅读全文
posted @ 2024-04-14 01:14 江左子固 阅读(153) 评论(0) 推荐(0)