文章分类 -  Hdlbits的Verilog学习

摘要:A JK flip-flop has the below truth table. Implement a JK flip-flop with only a D-type flip-flop and gates. Note: Qold is the output of the D flip-flop 阅读全文
posted @ 2023-04-26 13:34 江左子固 阅读(15) 评论(0) 推荐(0)
摘要:Given the finite state machine circuit as shown, assume that the D flip-flops are initially reset to zero before the machine begins. Build this circui 阅读全文
posted @ 2023-04-26 13:30 江左子固 阅读(36) 评论(0) 推荐(0)
摘要:Consider the n-bit shift register circuit shown below: Exams/2014 q4a - HDLBits (01xz.net) 1 module top_module ( 2 input clk, 3 input w, R, E, L, 4 ou 阅读全文
posted @ 2023-04-26 12:51 江左子固 阅读(16) 评论(0) 推荐(0)
摘要:Taken from ECE253 2015 midterm question 5 Consider the sequential circuit below: Mt2015 muxdff - HDLBits (01xz.net) 1 module top_module ( 2 input clk, 阅读全文
posted @ 2023-04-25 18:45 江左子固 阅读(70) 评论(0) 推荐(0)
摘要:Exams/m2014 q4d - HDLBits (01xz.net) 1 module top_module ( 2 input clk, 3 input in, 4 output out); 5 always @(posedge clk) begin 6 out <= (in ^ out); 阅读全文
posted @ 2023-04-25 18:26 江左子固 阅读(23) 评论(0) 推荐(0)
摘要:1 module top_module ( 2 input clk, 3 input d, 4 input r, // synchronous reset 5 output q); 6 always @(posedge clk) begin 7 if(!r) begin 8 q<=d; 9 end 阅读全文
posted @ 2023-04-25 13:12 江左子固 阅读(12) 评论(0) 推荐(0)
摘要:Exams/m2014 q4b - HDLBits (01xz.net) 1 module top_module ( 2 input clk, 3 input d, 4 input ar, // asynchronous reset 5 output q); 6 always @(posedge c 阅读全文
posted @ 2023-04-25 13:11 江左子固 阅读(10) 评论(0) 推荐(0)
摘要:1 Create 16 D flip-flops. It's sometimes useful to only modify parts of a group of flip-flops. The byte-enable inputs control whether each byte of the 阅读全文
posted @ 2023-04-25 12:31 江左子固 阅读(29) 评论(0) 推荐(0)
摘要:同步复位,也可见《数字积木》一书P85 Create 8 D flip-flops with active high synchronous reset. The flip-flops must be reset to 0x34 rather than zero. All DFFs should b 阅读全文
posted @ 2023-04-25 10:51 江左子固 阅读(130) 评论(0) 推荐(0)
摘要:D触发器定义: D触发器(DFF)是一个具有记忆功能的,具有两个稳定状态的信息存储器件,触发器具有两个稳定状态,即"0"和"1",在一定的外界信号作用下,可以从一个稳定状态翻转到另一个稳定状态。在这里解释边沿触发的D触发器,D触发器在时钟脉冲CP的前沿(正跳变0→1)发生翻转,触发器的次态(下一个状 阅读全文
posted @ 2023-04-25 00:30 江左子固 阅读(176) 评论(0) 推荐(0)
摘要:Assume that you have two 8-bit 2's complement numbers, a[7:0] and b[7:0]. These numbers are added to produce s[7:0]. Also compute whether a (signed) o 阅读全文
posted @ 2023-04-22 13:10 江左子固 阅读(29) 评论(0) 推荐(0)
摘要:Exams/m2014 q4j - HDLBits (01xz.net) 1 module top_module ( 2 input [3:0] x, 3 input [3:0] y, 4 output [4:0] sum); 5 wire [2:0] cout; //定义一个wire,即用即无,是 阅读全文
posted @ 2023-04-22 12:53 江左子固 阅读(52) 评论(1) 推荐(0)
摘要:Now that you know how to build a full adder, make 3 instances of it to create a 3-bit binary ripple-carry adder. The adder adds two 3-bit numbers and 阅读全文
posted @ 2023-04-22 12:27 江左子固 阅读(32) 评论(0) 推荐(0)
摘要:Create a full adder. A full adder adds three bits (including carry-in) and produces a sum and carry-out. Fadd - HDLBits (01xz.net) 1 module top_module 阅读全文
posted @ 2023-04-22 12:14 江左子固 阅读(12) 评论(0) 推荐(0)
摘要:Create a half adder. A half adder adds two bits (with no carry-in) and produces a sum and carry-out. Hadd - HDLBits (01xz.net) 1 module top_module( 2 阅读全文
posted @ 2023-04-22 12:06 江左子固 阅读(38) 评论(0) 推荐(0)
摘要:Create a 4-bit wide, 256-to-1 multiplexer. The 256 4-bit inputs are all packed into a single 1024-bit input vector. sel=0 should select bits in[3:0], 阅读全文
posted @ 2023-04-21 23:46 江左子固 阅读(18) 评论(0) 推荐(0)
摘要:Create a 16-bit wide, 9-to-1 multiplexer. sel=0 chooses a, sel=1 chooses b, etc. For the unused cases (sel=9 to 15), set all output bits to '1'. Mux9t 阅读全文
posted @ 2023-04-21 23:37 江左子固 阅读(29) 评论(0) 推荐(0)
摘要:See also the shorter version: Gates and vectors. You are given a 100-bit input vector in[99:0]. We want to know some relationships between each bit an 阅读全文
posted @ 2023-04-21 13:52 江左子固 阅读(21) 评论(0) 推荐(0)
摘要:You are given a four-bit input vector in[3:0]. We want to know some relationships between each bit and its neighbour: out_both: Each bit of this outpu 阅读全文
posted @ 2023-04-21 13:49 江左子固 阅读(18) 评论(0) 推荐(0)
摘要:这道题自己换了一种写法,也是可以运行的,算是过程赋值语句和持续赋值语句的一个小小的对比,也可见《搭建你的数字积木》一书的P56,借鉴了上面的案例。 1 /*module top_module ( 2 input in1, 3 input in2, 4 input in3, 5 output out) 阅读全文
posted @ 2023-04-21 12:32 江左子固 阅读(18) 评论(0) 推荐(0)