HDLbits——Lfsr32
//Build a 32-bit Galois LFSR with taps at bit positions 32, 22, 2, and 1.
草图

verilog描述
module top_module(
input clk,
input reset, // Active-high synchronous reset to 32'h1
output reg [31:0] q
);
always @(posedge clk) begin
if(reset)begin
q <= 32'h1;
end
else begin
q <= {1'b0^q[0],q[31:23],q[22]^q[0],q[21:3],q[2]^q[0],q[1]^q[0]};
end
end
endmodule
vivado下的RTL原理图:

quartus下的RTL原理图:采用大量选择器

HDLbits——Lfsr32的更多相关文章
- 学会使用Hdlbits网页版Verilog代码仿真验证平台
给大家推荐一款网页版的 Verilog代码编辑仿真验证平台,这个平台是国外的一家开源FPGA学习网站,通过“https://hdlbits.01xz.net/wiki/Main_Page” 地址链接进 ...
- HDLBits答案——Circuits
1 Combinational Logic 1.1 Basic Gates 1.1.1 Exams/m2014 q4h module top_module ( input in, output out ...
- HDLBits答案——Verification: Writing Testbenches
1 clock module top_module ( ); reg clk; dut U1(.clk(clk)); initial begin clk = 0; end always begin # ...
- HDLBits答案——Verification: Reading Simulations
1 Finding bugs in code 1.1 Bugs mux2 module top_module ( input sel, input [7:0] a, input [7:0] b, ou ...
- HDLBits答案——Verilog Language
Verilog Language 1 Basics 1.1 Wire module top_module( input in, output out ); assign out = in; endmo ...
- HDLBits答案——Getting started
Getting started 1 Step one module top_module( output one ); // Insert your code here assign one = 1' ...
- verilog常见错误列表
Error/Warning 来源:https://hdlbits.01xz.net/wiki/ 题目: 1.Quartus Warning 10235: Warning (): Verilog HDL ...
- Verilog HDL
https://wenku.baidu.com/view/9943b7acf524ccbff1218463.html https://hdlbits.01xz.net/wiki/Main_Page h ...
- Verilog设计技巧实例及实现
Verilog设计技巧实例及实现 1 引言 最近在刷HDLBits的过程中学习了一些Verilog的设计技巧,在这里予以整理.部分操作可能降低代码的可读性和Debug的难度,请大家根据实际情况进行使用 ...
- 入行数字IC验证的一些建议
0x00 首先,推荐你看两本书,<"胡"说IC菜鸟工程师完美进阶>(pdf版本就行)本书介绍整个流程都有哪些岗位,充分了解IC行业的职业发展方向.<SoC设计方法 ...
随机推荐
- springboot mybatisPlus集成shiro实现权限控制
创建数据库表.由于时间仓促,数据库表设计不太合理,后期会更改 SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ------------------- ...
- iOS开发之长按浮动操作选择项
我们一般会有长按一段文字显示气泡浮动操作选项的需求 我们常用的方法如下 cut: copy: select: selectAll: paste: delete: _promptForRep ...
- 091_解析Callout XML 处理方式
XML: <?xml version="1.0" encoding="iso-8859-1" ?> <results> <resu ...
- 下载接口时出现:Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'D:\python\demo\venv\Scripts\...的错误
下载接口时出现:Try to run this command from the system terminal. Make sure that you use the correct version ...
- Spring中最常用的11个扩展点
转载自: 微信公众号 [Java后端技术] 前言 我们一说到spring,可能第一个想到的是 IOC(控制反转) 和 AOP(面向切面编程). 没错,它们是spring的基石,得益于它们的优秀设计,使 ...
- Java笔记_this关键字
this关键字 引出this的使用场景: 案例一(通过案例一来引出this的使用场景): /** * @ClassName This02 * @Description TODO * @Author O ...
- mysql(insert + group by + on duplicate key update)
group by 的内容设为子表tmp, 外面嵌套一层查询 连接 on duplicate key update key = tmp.new_key
- vue用echarts不显示
在html页面中套vue的情况来使用echarts,或者单独vue使用echarts,出现页面不渲染图表,代码渲染有的情况,加个this.$nextTick(()=>{})让他主动渲染一下就可以 ...
- 注释:MARK与TODO、FIXME
MARK: 在OC中的用法: #pragma mark -说明文字(可以不加-) 在swift中的用法:// MARK: - 说明文字(可以不加-) TODO.FIXME(不区分OC.swift) / ...
- 《在编译两个不同的库时,不想相互include头文件,但又需要用到对方的函数,可以用extern》
以下是个人理解,水平有限,可能不太准确.有问题,麻烦指出. demo: a.so void a_fun(void) { b_fun(); } b.so void b_fun(void) { //略 } ...