03 2022 档案

摘要:手撕代码——2022乐鑫数字芯片提前批笔试:代码题2 题目:使用Verilog/SV撰写如下功能模块;求输入信号序列din在din_vld为高电平的时间段内的次小值和次小值出现的次数。接口声明如下: module sec_min( input clk,//时钟 input rst_n,//复位 in 阅读全文
posted @ 2022-03-29 20:57 passchen 阅读(181) 评论(0) 推荐(0) 编辑
摘要:手撕代码——异步FIFO module asynfifo ( input rd_clk, input wr_clk, input rst_n, input rd_en, input wr_en, input [7:0] datain, output reg empty, output reg ful 阅读全文
posted @ 2022-03-15 10:02 passchen 阅读(285) 评论(0) 推荐(0) 编辑
摘要:手撕代码——同步FIFO module synfifo( input clk, input rst_n, input rd_en, input wr_en, output reg full, output reg empty, input [7:0] datain, output reg [7:0] 阅读全文
posted @ 2022-03-07 14:51 passchen 阅读(172) 评论(0) 推荐(0) 编辑
摘要:奇偶分频电路verilog代码 1.偶数分频器 偶数分频器只要在计数器为N/2-1时反转输出就行 //4分频器 module clk_div( input clk, input rst_n, output reg clk_div4 ); reg [3:0]count; parameter N=4;/ 阅读全文
posted @ 2022-03-05 20:00 passchen 阅读(385) 评论(0) 推荐(0) 编辑