02 2023 档案

摘要:VL33 非整数倍数据位宽转换8to12 和上一题一样的,注意valid_out输出时加一个valid_in(其实32题也要加,不过不加仿真也能过)。 `timescale 1ns/1ns module width_8to12( input clk , input rst_n , input val 阅读全文
posted @ 2023-02-28 21:30 Magnolia666 阅读(91) 评论(0) 推荐(0) 编辑
摘要:VL25 输入序列连续的序列检测 这种题用移位寄存器是最方便的,用状态机会麻烦很多。 `timescale 1ns/1ns module sequence_detect( input clk, input rst_n, input a, output reg match ); reg [7:0]se 阅读全文
posted @ 2023-02-25 22:48 Magnolia666 阅读(97) 评论(0) 推荐(0) 编辑
摘要:VL21 根据状态转移表实现时序电路 写一个简单的Moore状态机就可以了,太短就懒得写三段式了。 `timescale 1ns/1ns module seq_circuit( input A , input clk , input rst_n, output wire Y ); reg [1:0] 阅读全文
posted @ 2023-02-23 21:43 Magnolia666 阅读(83) 评论(0) 推荐(0) 编辑
摘要:VL11 4位数值比较器电路 根据题目真值表把情况全部列出来,纯体力活。 `timescale 1ns/1ns module comparator_4( input [3:0] A , input [3:0] B , output wire Y2 , //A>B output wire Y1 , / 阅读全文
posted @ 2023-02-22 21:55 Magnolia666 阅读(85) 评论(0) 推荐(0) 编辑
摘要:VL1 四选一多路器 `timescale 1ns/1ns module mux4_1( input [1:0]d1,d2,d3,d0, input [1:0]sel, output [1:0]mux_out ); //*************code***********// assign mu 阅读全文
posted @ 2023-02-20 21:13 Magnolia666 阅读(91) 评论(0) 推荐(0) 编辑