-latch
-latch
全部文章
题解
归档
标签
去牛客网
登录
/
注册
-latch的博客
全部文章
/ 题解
(共16篇)
题解 | #使用8线-3线优先编码器Ⅰ实现16线-4线优先编码器#
4-16对于3-8逻辑是:3-8有一块有输入,4-16就有输入(GS为逻辑或),3-8两块都没输入,4-16才没输入(EO为逻辑与),Y的选择按照优先编码器的规则,先判断高位,再判断低位。 `timescale 1ns/1ns module encoder_83( input [7:...
verilog
2022-03-12
13
921
题解 | #优先编码器电路①#
无关项用? `timescale 1ns/1ns module encoder_0( input [8:0] I_n , output reg [3:0] Y_n ); always@(*)begin ...
verilog
2022-03-12
5
856
题解 | #使用函数实现数据大小端转换#
关于function中嵌套for的语法问题 `timescale 1ns/1ns module function_mod( input [3:0]a, input [3:0]b, output [3:0]c, output [3:0]d ); function [3 : 0] i...
verilog
2022-03-12
3
864
题解 | #格雷码计数器#
`timescale 1ns/1ns module gray_counter( input clk, input rst_n, output wire [3:0] gray_out ); //使用Moore状态机实现 parameter s0 =8...
verilog
2022-03-11
8
1158
题解 | #去掉空行#
四种方法: grep 正则:匹配空行并删除 用-v(两种写法) grep -v '^$' nowcoder.txt cat nowcoder.txt | grep -v '^$' awk 正则:匹配不是空格的行全部输出 awk '{if(!/^$/)print $0}' nowcoder...
bash
2022-03-11
1
361
题解 | #RAM的简单实现#
主要是初始化用for写,开始我在always块中用了generate,发现报错了,后来一想generte是个生成块,应该放在always,assign以及instance外面,always内部循环用integer + for实现 `timescale 1ns/1ns module ram_mod( ...
verilog
2022-03-11
5
614
题解 | #Johnson Counter#
开始这么写: `timescale 1ns/1ns module JC_counter( input clk , input rst_n, output reg [3:0] Q ); always...
verilog
2022-03-11
37
567
题解 | #打印空行的行号#
grep匹配空行,awk去掉冒号 grep -n '^$' nowcoder.txt | awk -F: '{print $1}' awk正则匹配空行,然后呢输出行数 awk '/^$/{print NR}' nowcoder.txt sed正则匹配空行,=输出行数 sed -n '/...
bash
2022-03-10
17
555
题解 | #流水线乘法器#
本质上是加法树流水线,移位部分可以用组合逻辑实现,这里用了generate简化了代码。 `timescale 1ns/1ns module multi_pipe#( parameter size = 4 )( input clk , input rst_n ...
verilog
2022-03-10
22
1522
题解 | #脉冲同步电路#
第一种方法,经典握手。 `timescale 1ns/1ns module pulse_detect( input clk_fast , input clk_slow , input rst_n , input data_in , outpu...
verilog
2022-03-10
6
950
首页
上一页
1
2
下一页
末页