摘要: `timescale 1ns/1ns module sequence_detect( input clk, input rst_n, input a, output reg match ); reg [8:0] temp_a; always @(posedge clk,negedge rst_n) 阅读全文
posted @ 2024-08-29 16:25 段星儿 阅读(16) 评论(0) 推荐(0)
摘要: 这个题目的意思是输入是单bit脉冲,然后当8个周期的脉冲序列符合给定的参数值则match输出1; 因此肯定需要一共8位的寄存器存储总共8个a的输入脉冲 此外由于是从左向右匹配,因此每个周期输入的a要从寄存器最低位输入,从右向左移位(temp_a<={temp_a[6:0],a};),这样才是输入满足 阅读全文
posted @ 2024-08-29 16:16 段星儿 阅读(30) 评论(0) 推荐(0)