博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
多通道 移位寄存器 verilog
阅读量:7279 次
发布时间:2019-06-30

本文共 838 字,大约阅读时间需要 2 分钟。

// Quartus II Verilog Template// Basic 64-stage shift register with multiple tapsmodule basic_shift_register_with_multiple_taps#(parameter WIDTH=8, parameter LENGTH=64)(	input clk, enable,	input [WIDTH-1:0] sr_in,	output [WIDTH-1:0] sr_tap_one, sr_tap_two, sr_tap_three, sr_out);	// Declare the shift register	reg [WIDTH-1:0] sr [LENGTH-1:0];	// Declare an iterator	integer n;	always @ (posedge clk)	begin		if (enable == 1'b1)		begin			// Shift everything over, load the incoming data			for (n = LENGTH-1; n>0; n = n-1)			begin				sr[n] <= sr[n-1];			end			// Shift one position in			sr[0] <= sr_in;		end	end	assign sr_tap_one = sr[LENGTH/4-1];	assign sr_tap_two = sr[LENGTH/2-1];	assign sr_tap_three = sr[3*LENGTH/4-1];	// Catch the outgoing data	assign sr_out = sr[LENGTH-1];endmodule

 

转载于:https://www.cnblogs.com/TFH-FPGA/p/3301144.html

你可能感兴趣的文章
Anaconda使用记录
查看>>
It's only too late if you decide it is. Get busy living, or get busy dying(转)
查看>>
tomcat开发,url参数乱码.
查看>>
Flask学习【第11篇】:整合Flask中的目录结构
查看>>
mongoDB 基本crud,索引
查看>>
.NET程序员所需要注意的网站资源
查看>>
移动硬盘出现参数错误,无法访问的问题
查看>>
预处理器标识#error的目的是什么
查看>>
c3p0数据库连接池使用
查看>>
战争哲学
查看>>
【Unity3D技术文档翻译】第1.2篇 为打包 AssetBundles 准备资产
查看>>
COSBench性能测试配置--一张图说明一切
查看>>
Windows桌面共享中一些常见的抓屏技术
查看>>
python中return的用法
查看>>
转载:C# 之泛型详解
查看>>
转载:ActiveMQ的可靠性机制
查看>>
全排列的编码与解码
查看>>
远程连接mongodb出现 no route to host 和 Connection refused
查看>>
团队Alpha版本冲刺(三)
查看>>
个人作业——软件工程实践总结作业
查看>>