摘要: RISC CPU 结构(8大模块) 1.时钟发生器 2.指令寄存器 3.累加器 4.算数逻辑运算单元 5.数据控制器 6.状态控制器 7.程序计数器 8.地址多路器 阅读全文
posted @ 2022-03-24 16:34 理~想 阅读(124) 评论(0) 推荐(0)
摘要: 三段式有限状态机(三个always块) 一段:状态转移方程(采用时序logic) e.g. always @(posedge clk) 二段:状态转移条件方程(采用组合logic)-- 输入 e.g. always @(*) 三段:状态输出方程(采用时序logic)-- 输出 e.g. always 阅读全文
posted @ 2022-03-24 13:33 理~想 阅读(44) 评论(0) 推荐(0)
摘要: Function:设计一个从 1 到 10 的计数器,从1开始计到10 1.design code module top_module ( input clk, input reset, // Synchronous active-high reset output reg [3:0] q); al 阅读全文
posted @ 2022-03-22 19:50 理~想 阅读(229) 评论(0) 推荐(0)
摘要: Function:Decade counter 10 1.design code module top_module ( input clk, input reset, // Synchronous active-high reset output reg [3:0] q); always @(po 阅读全文
posted @ 2022-03-22 19:44 理~想 阅读(227) 评论(0) 推荐(0)
摘要: Function:Four bit binary counter 1.design code module top_module ( input clk, input reset, // Synchronous active-high reset output reg [3:0] q); alway 阅读全文
posted @ 2022-03-22 19:33 理~想 阅读(367) 评论(0) 推荐(0)
摘要: 1.设计代码 `default_nettype none module Cycle_Shift_Register(clk,rst_n,in,out); parameter byte_size = 8; //declare input and output width. input wire clk; 阅读全文
posted @ 2022-03-22 19:08 理~想 阅读(155) 评论(0) 推荐(0)
摘要: Verilog HDL中分阻塞赋值和非阻塞赋值两种, 1.组合逻辑用阻塞赋值,此时使用begin···end语句,将一条执行完再执行下一句,即顺序执行。2.时序逻辑大多数情况是并行执行,用非阻塞赋值,此时begin···end语句的作用只是相当于函数的花括号,将一段语句划分成块,但是在块里语句依然是 阅读全文
posted @ 2022-03-22 18:41 理~想 阅读(4316) 评论(0) 推荐(0)
摘要: 同步复位:顾名思义,同步复位就是指复位信号只有在时钟上升沿到来时,才能有效。否则,无法完成对系统的复位工作。 用Verilog HDL描述如下: always @ (posedge clk) beginif (!Rst_n)…end 异步复位:它是指无论时钟沿是否到来,只要复位信号有效,就对系统进行 阅读全文
posted @ 2022-03-16 19:01 理~想 阅读(1743) 评论(0) 推荐(0)
摘要: 1.Reason:Parity checking is often used as a simple method of detecting errors when transmitting data through an imperfect channel. 2.在Verilog中通常使用“缩减运 阅读全文
posted @ 2022-03-13 16:26 理~想 阅读(39) 评论(0) 推荐(0)
摘要: 一、计数器 1.什么叫做时序逻辑电路 由组合逻辑 + 触发器 = 时序逻辑 注意:如果要构成触发器(trigger),必须要有时钟信号和复位信号,且两个signal必须为边沿触发。 2.原理图 3.Verilog设计代码 module counter( clk, rst_n, y ); input 阅读全文
posted @ 2022-03-06 13:36 理~想 阅读(294) 评论(0) 推荐(0)