![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
HDLBits
文章平均质量分 58
温故而知新2020
这个作者很懒,什么都没留下…
展开
-
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 · 339 阅读 · 0 评论 -
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 · 416 阅读 · 0 评论 -
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 · 245 阅读 · 0 评论 -
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 · 724 阅读 · 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 · 726 阅读 · 0 评论 -
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 · 303 阅读 · 0 评论 -
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 · 884 阅读 · 0 评论 -
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 · 406 阅读 · 0 评论 -
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 · 647 阅读 · 0 评论 -
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 · 649 阅读 · 0 评论 -
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 · 630 阅读 · 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 · 389 阅读 · 0 评论 -
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 · 271 阅读 · 0 评论 -
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 · 295 阅读 · 0 评论 -
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 · 147 阅读 · 0 评论 -
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 · 242 阅读 · 0 评论 -
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 · 96 阅读 · 0 评论 -
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 · 302 阅读 · 0 评论