understanding of Pipe line & Timing Logic
/////////////////////////////////////////////////////////////////////////////////
module vlg_add(
input clk,
output [7:0]a,
output [7:0]b,
output [7:0]c,
output [7:0]d
);
reg [7:0]reg_a = 0;
always@(posedge clk)
begin
reg_a <= reg_a + 8'd1;
end
reg [7:0]reg_b = 0;
always@(posedge clk)
begin
reg_b <= reg_a + 8'd2;
end
reg [7:0]reg_c = 0;
always@(posedge clk)
begin
reg_c <= reg_b + 8'd3;
end
reg [7:0]reg_d = 0;
always@(posedge clk)
begin
reg_d <= reg_c + 8'd4;
end
assign a = reg_a;
assign b = reg_b;
assign c = reg_c;
assign d = reg_d;
endmodule
//////////////////////////////////////////////////////////////////////////////////////////////
////////////////// TestBench//////////////////////////////////////////////////////////////
`timescale 1 ns / 1 ps
module my_sim_vlg_tst();
reg clk;
wire [7:0]a;
wire [7:0]b;
wire [7:0]c;
wire [7:0]d;
vlg_add vlg_add_inst(
.clk(clk),
.a(a),
.b(b),
.c(c),
.d(d)
);
initial
begin
clk = 0;
forever #10 clk = ~clk;
end
endmodule
/////////////////////////////////////////////////////////////

understanding of Pipe line & Timing Logic的更多相关文章
- CRT/LCD/VGA Information and Timing
彩色阴极射线管的剖面图: 1. 电子QIANG Three Electron guns (for red, green, and blue phosphor dots)2. 电子束 Electron ...
- CRT/LCD/VGA Information and Timing【转】
转自:http://www.cnblogs.com/shangdawei/p/4760933.html 彩色阴极射线管的剖面图: 1. 电子QIANG Three Electron guns (for ...
- Method and apparatus for providing total and partial store ordering for a memory in multi-processor system
An improved memory model and implementation is disclosed. The memory model includes a Total Store Or ...
- CaptureManagerSDK
Simple SDK for capturing, recording and streaming video and audio from web-cams on Windows OS by Win ...
- [C2P3] Andrew Ng - Machine Learning
##Advice for Applying Machine Learning Applying machine learning in practice is not always straightf ...
- Bash 脚本编程语言中的美学与哲学
我承认,我再一次地当了标题党.但是不可否认,这一定是一篇精华随笔.在这一篇中,我将探讨 Bash 脚本语言中的美学与哲学. 这不是一篇 Bash 脚本编程的教程,但是却能让人更加深入地了解 Bash ...
- PowerShell Notes
1. 概要 - PowerShell 是cmdlet(command-let)的指令集合,类似unix的bash. - IDE: Windows PowerShell ISE,不区分大小写,可以用命 ...
- Hadoop op 1)
设置yarn.scheduler.fair.user-as-default-queue =fasle, 就会阻止每一个用户使用自己默认的队列. 设置yarn.scheduler.fair.allow- ...
- shell十三问
1) 为何叫做 shell ?在介绍 shell 是甚幺东西之前,不妨让我们重新检视使用者与计算机系统的关系:图(FIXME)我们知道计算机的运作不能离开硬件,但使用者却无法直接对硬件作驱动,硬件的驱 ...
随机推荐
- javax.servlet.ServletException: Could not resolve view with name‘ XXXX’in servlet with name 'spring'的解决方案-----SKY
出现的异常如下: javax.servlet.ServletException: Could not resolve view with name '{"msg":"成功 ...
- ArcGIS API for js Legend(图例)
1.说明 有关怎么把ArcGIS API for js部署到IIS上,请参考我上面的写的博客https://www.cnblogs.com/net064/p/10302660.html 2.运行效果 ...
- Every norm is a convex function
https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Convex_function.html Every ...
- [postfix]添加黑名单
最近公司员工的邮箱总是收到twoomail.com的邀请邮件,邮箱服务器还没有添加过黑名单呢,就拿它开刀吧. 在主配置文件中添加如下配置 #vi /etc/postfix/main.cf #black ...
- 如何将gedit变成c++编译器
本蒟蒻的第一篇文章,分享一下神佬教我的好东西 ——将Ubuntu 16.04上gedit变为编译器! 1° 新建文档.然后点击编辑,打开首选项. 2° 勾选外部工具,然后退出.打开工具,选择Manag ...
- go语言之并发编程 channel(1)
单向channel: 单向通道可分为发送通道和接收通道.但是无论哪一种单向通道,都不应该出现在变量的声明中,假如初始化了这样一个变量 var uselessChan chan <- int =m ...
- 【Prometheus】第二篇---基本查询语法
这几天忙着开发别的项目,今天抽空写一下Prometheus的查询语法 1,查看指标 直接输入指标名字就行了,grafana会自动补全 2,查看某个指标的使用率,比如cpu使用率 用到rate函数,ra ...
- LeetCode:救生艇【881】
LeetCode:救生艇[881] 题目描述 第 i 个人的体重为 people[i],每艘船可以承载的最大重量为 limit. 每艘船最多可同时载两人,但条件是这些人的重量之和最多为 limit. ...
- 2个canvas叠加运用(时钟例子)
最近在学习canvas,http://corehtml5canvas.com/code-live/,主要的学习方式就是通过上面的一些例子来学习canvas的一些用法.但是我发现,这里的例子,只要can ...
- UVALive - 7045 Last Defence 【数学】
题目链接 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_ ...