
HDLBits—verilog编程练习记录
文章平均质量分 93
HDLBits 网站提供了verilog语言练习、提高的不错资源,带你从解决问题中学会verilog。
FPGA&SDR探索者
这个作者很懒,什么都没留下…
展开
-
HDLBits 系列(11)——Verification: Reading Simulations && Verification: Writing Testbenches
4. Verification: Reading Simulations4.1 Finding bugs in code1. MuxThis 8-bit wide 2-to-1 multiplexer doesn't work. Fix the bug(s).module top_module ( input sel, input [7:0] a, input [7:0] b, output[7:0] out ); assign out = se原创 2021-09-11 12:55:34 · 1170 阅读 · 0 评论 -
HDLBits 系列(10)——Building Larger Circuits
3.2Sequential Logic3.2.6 Building Larger Circuits4-bit shift register and down counter3. FSM: Sequence 1101 recognizer 4.FSM: Enable shift register 5.FSM: The complete FSM 6.The complete timer 7.FSM: One-hot logic equations原创 2021-09-11 10:16:15 · 1598 阅读 · 0 评论 -
HDLBits 系列(9)——Sequential Logic(Finite State Machines(二))
目录3.2 Sequential Logic3.2.5 Finite State Machines21.Q8: Design a Mealy FSM22.Q5a: Serial two's complementer (Moore FSM)23. Q5b: Serial two's complementer (Mealy FSM)24. Q3a: FSM25. Q3b: FSM26. Q3c: FSM logic27.Q6b: FSM next-state lo...原创 2021-09-10 14:22:56 · 2358 阅读 · 0 评论 -
HDLBits 系列(8)——Sequential Logic(Finite State Machines(一))
目录3.2 Sequential Logic3.2.5 Finite State Machines1.Simple FSM 1 (asynchronous reset)2.Simple FSM 1 (synchronous reset)3.Simple FSM 2 (asynchronous reset)4.Simple FSM 2 (synchronous reset)5.Simple state transitions 36.Simple one-hot st...原创 2021-09-09 22:54:28 · 1614 阅读 · 0 评论 -
HDLBits 系列(7)——Sequential Logic(Counters、Shift Registers、More Circuits)
3.2 Sequential Logic3.2.2 Counters1.Four-bit binary countermodule top_module ( input clk, input reset, // Synchronous active-high reset output reg [3:0] q); always @(posedge clk)begin if(reset)begin ...原创 2021-09-09 12:34:41 · 4549 阅读 · 0 评论 -
HDLBits 系列(6)——Sequential Logic(Latches and Flip-Flops)
目录3.2 Sequential Logic3.2.1 Latches and Flip-Flops1.D flip-flop2.D flip-flops3.DFF with reset4.DFF with reset value5.DFF with asynchronous reset6.DFF with byte enable7.D Latch8.DFF9.DFF10.DFF+gate11.Mux and DFF12.M...原创 2021-09-08 19:14:54 · 2229 阅读 · 0 评论 -
HDLBits 系列(5)——Combinational Logic(Multiplexers、Arithmetic Circuits、 Karnaugh Map to Circuit)
目录3.Circuits3.1 Combinational Logic3.1.2 Multiplexers1.2-to-1 multiplexer2.2-to-1 bus multiplexer3.9-to-1 multiplexer4.256-to-1 multiplexer5.256-to-1 4-bit multiplexer3.1.3 Arithmetic Circuits1.Half adder2.Full adder3.3-bi...原创 2021-09-08 12:27:41 · 1007 阅读 · 0 评论 -
HDLBits 系列(4)——Combinational Logic(Basic Gates)
目录3.Circuits3.1 Combinational Logic3.1.1 Basic Gates1.Wire2.GND3.NOR4.Another gate5.Two gates6.More logic gates7.7420 chip8.Truth tables9.Two-bit equality10.Simple circuit A11.Simple circuit B12.Combine circuits A and B13.Ri原创 2021-09-08 10:49:46 · 1236 阅读 · 0 评论 -
HDLBits 系列(3)——Verilog Language(More Verilog Features)
目录2.5 More Verilog Features1.Conditional ternary operator2.Reduction operators3.Reduction: Even wider gates4.Combinational for-loop: Vector reversal 25.Combinational for-loop: 255-bit population count6.Generate for-loop: 100-bit binary adde..原创 2021-09-08 02:25:16 · 587 阅读 · 0 评论 -
HDLBits 系列(2)——Verilog Language(Modules: Hierarchy、Procedures)
目录2.Verilog Language2.3 Modules: Hierarchy1.Modules2.Connecting ports by position3.Connecting ports by name4.Three modules5.Modules and vectors6.Adder 17.Adder 28.Carry-select adder9.Adder-subtractor2.4 Procedures1.Always blocks .原创 2021-09-08 02:07:31 · 4805 阅读 · 0 评论 -
HDLBits 练习记录
HDLBits 网站主要为练习Verilog 语言的使用和基本逻辑电路的设计。网站提供了在线编程环境,用户根据题目编写代码之后,直接可以运行仿真验证,观察时序,检查自己设计是否正确,对于初学者有一定的训练效果。网址:https://hdlbits.01xz.net/wiki/Main_Page主要分这几个主题: 这6个主题之下又可以分几个小节构成,每个小节针对一个知识内容进行针对性训练。如下图所示。 博主近期进行了verilog编...原创 2021-09-07 23:59:13 · 483 阅读 · 0 评论 -
HDLBits 系列(1)——Getting Started
目录本篇文章主要包含以下问题的解析,这部分是最基本的,不作解读。1.Getting Started1.1 Step one 赋值输出11.2Zero 赋值输出02.Verilog Language——Problems that focus on introducing Verilog language syntax and features.2.1Basics 1.Create a module with one input and one output t...原创 2021-09-07 23:51:48 · 1254 阅读 · 0 评论