- 博客(21)
- 问答 (1)
- 收藏
- 关注
原创 cdc多bit信号-握手处理
,才会更新发送端的数据(cnt加1),并且确定了ack下降到0才会把req置1,开始下一次握手。接收端是把req打两派就可以接收数据了,只要req为1就接收数据。...
2022-05-15 19:18:11
3140
转载 跨时钟域同步2---单bit信号同步实战(快到慢+慢到快)——学习笔记
原文见耐心的小黑https://zhuanlan.zhihu.com/p/452183878一、快时钟域>>>慢时钟域我们假定有两个时钟,CLK1 和 CLK2,还有一个信号叫 READ,CLK1 时钟频率快于 CLK2,现在我们需要将READ 信号同步到CLK2时钟域下。1、方法一:展宽+打拍同步READ_DLY1 信号是 READ 信号相对于 CLK1 时钟打一拍产生的,READ_DLY2 信号是 READ 信号相对于 CLK1 时钟打两拍产生的,由于单纯的 READ 信号宽度
2022-03-14 01:26:17
8667
7
原创 FPGA仿真
前情提要:阻塞赋值(=):该语句结束时就完成赋值操作,前面的语句没有完成前,后面的语句是不能执行的。在一个过程块内多个阻塞赋值语句是顺序执行的。非阻塞赋值(<=):一条非阻塞赋值语句的执行是不会阻塞下一条语句的执行,也就是说在本条非阻塞赋值语句执行完毕前,下一条语句也可开始执行。非阻塞赋值语句在过程块结束时才完成赋值操作。在一个过程块内的多个非阻塞赋值语句是并行执行的。但是如果一个always过程块只有一个赋值语句,哪采用阻塞和非阻塞应该是一样的吗?如果几个always中变量有关联,采用
2022-01-08 19:59:30
566
原创 HDLBits刷题_Verilog Language_Procedures_Alwaysblock1
学习内容Since digital circuits are composed of logic gates connected with wires, any circuit can be expressed as some combination of modules and assign statements. However, sometimes this is not the most convenient way to describe the circuit. Procedures (of
2021-11-25 10:20:23
418
原创 HDLBits刷题_Verilog Language_Module addsub
学习内容An adder-subtractor can be built from an adder by optionally negating one of the inputs, which is equivalent to inverting the input then adding 1. The net result is a circuit that can do two operations: (a + b + 0) and (a + ~b + 1). See Wikipedia if y
2021-11-24 16:21:05
464
原创 HDLBits刷题_Verilog Language_Module cseladd
学习内容One drawback of the ripple carry adder (See previous exercise) is that the delay for an adder to compute the carry out (from the carry-in, in the worst case) is fairly slow, and the second-stage adder cannot begin computing its carry-out until the fir
2021-11-24 11:13:30
283
原创 HDLBits刷题_Verilog Language_Module fadd
学习内容In this exercise, you will create a circuit with two levels of hierarchy. Your top_module will instantiate two copies of add16 (provided), each of which will instantiate 16 copies of add1 (which you must write). Thus, you must write two modules: top_m
2021-11-23 10:36:17
833
1
原创 HDLBits刷题_Verilog Language_Module add
学习内容You are given a module add16 that performs a 16-bit addition. Instantiate two of them to create a 32-bit adder. One add16 module computes the lower 16 bits of the addition result, while the second add16 module computes the upper 16 bits of the result,
2021-11-23 09:46:30
911
原创 HDLBits刷题_Verilog Language_Module shift8
学习内容This exercise is an extension of module_shift. Instead of module ports being only single pins, we now have modules with vectors as ports, to which you will attach wire vectors instead of plain wires. Like everywhere else in Verilog, the vector length
2021-11-22 21:05:01
378
原创 HDLBits刷题_Verilog Language_Module shift
学习内容:You are given a module my_dff with two inputs and one output (that implements a D flip-flop). Instantiate three of them, then chain them together to make a shift register of length 3. The clk port needs to be connected to all instances.The module pr
2021-11-22 16:59:16
956
原创 HDLBits刷题_Verilog Language_Module name
学习内容:This problem is similar to module. You are given a module named mod_a that has 2 outputs and 4 inputs, in some order. You must connect the 6 ports by name to your top-level module’s ports:Port in mod_aPort in top_moduleoutputout1out1
2021-11-19 17:16:12
464
原创 HDLBits刷题_Verilog Language_Module pos
学习内容:This problem is similar to the previous one (module). You are given a module named mod_a that has 2 outputs and 4 inputs, in that order. You must connect the 6 ports by position to your top-level module’s ports out1, out2, a, b, c, and d, in that ord
2021-11-19 16:40:48
750
原创 HDLBits刷题_Verilog Language_Module
学习内容:By now, you’re familiar with a module, which is a circuit that interacts with its outside through input and output ports. Larger, more complex circuits are built by composing bigger modules out of smaller modules and other pieces (such as assign stat
2021-11-19 16:28:33
725
原创 HDLBits刷题_Verilog Language_Vector5
学习内容:Given five 1-bit signals (a, b, c, d, and e), compute all 25 pairwise one-bit comparisons in the 25-bit output vector. The output should be 1 if the two bits being compared are equal.out[24] = ~a ^ a; // a == a, so out[24] is always 1.out[23] = ~
2021-11-19 15:35:11
835
1
原创 HDLBits刷题_Verilog Language_Vector4
学习内容:The concatenation operator allowed concatenating together vectors to form a larger vector. But sometimes you want the same thing concatenated together many times, and it is still tedious to do something like assign a = {b,b,b,b,b,b};. The replication
2021-11-19 15:15:34
471
原创 HDLBits刷题_Verilog Language_Vectorr
学习内容:Given an 8-bit input vector [7:0], reverse its bit ordering.module top_module( input [7:0] in, output [7:0] out); assign out = {in[0],in[1],in[2],in[3],in[4],in[5],in[6],in[7],};endmodule
2021-11-18 09:32:53
319
原创 HDLBits刷题_Verilog Language_Vector3
学习内容:Given several input vectors, concatenate them together then split them up into several output vectors. There are six 5-bit input vectors: a, b, c, d, e, and f, for a total of 30 bits of input. There are four 8-bit output vectors: w, x, y, and z, for
2021-11-17 21:55:56
364
原创 HDLBits刷题_Verilog Language_Gates4
学习内容:Build a combinational circuit with four inputs, in[3:0].There are 3 outputs:out_and: output of a 4-input AND gate.out_or: output of a 4-input OR gate.out_xor: output of a 4-input XOR gate.module top_module( input [3:0] in, output out_an
2021-11-17 14:51:23
177
原创 HDLBits刷题_Verilog Language_Vectorgates
学习内容:VectorgatesBuild a circuit that has two 3-bit inputs that computes the bitwise-OR of the two vectors, the logical-OR of the two vectors, and the inverse (NOT) of both vectors. Place the inverse of b in the upper half of out_not (i.e., bits [5:3]), a
2021-11-17 11:17:17
368
原创 HDLBits刷题_Verilog Language_Vector1
学习内容:Vector1A Bit of PracticeBuild a combinational circuit that splits an input half-word (16 bits, [15:0] ) into lower [7:0] and upper [15:8] bytes.`default_nettype none // Disable implicit nets. Reduces some types of bugs.module top_module(
2021-11-17 09:59:42
117
原创 HDLBits刷题_Verilog Language_Vector2
学习内容:Vector2A 32-bit vector can be viewed as containing 4 bytes (bits [31:24], [23:16], etc.). Build a circuit that will reverse the byte ordering of the 4-byte word.AaaaaaaaBbbbbbbbCcccccccDddddddd => DdddddddCcccccccBbbbbbbbAaaaaaaaThis operation
2021-11-17 09:55:58
470
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人