HDLbits——Lfsr5
Build this LFSR. The reset should reset the LFSR to 1

module top_module(
input clk,
input reset, // Active-high synchronous reset to 5'h1
output reg [4:0] q
);
always @(posedge clk) begin
if(reset==1'b1)begin
q <= 5'h1;
end
else begin
q <= {0^q[0],q[4],q[3]^q[0],q[2:1]};
end
end
endmodule
测试波形

原理图:



HDLbits——Lfsr5的更多相关文章
- 学会使用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设计方法 ...
随机推荐
- Mysql习题系列(一):基本select语句与运算符
Mysql8.0习题系列 软件下载地址 提取码:7v7u 数据下载地址 提取码:e6p9 文章目录 Mysql8.0习题系列 1. 基本select语句 1.1 题目 1.2答案 1.查询员工12个月 ...
- Appium元素选择 滑动 通知栏
一.根据ID 包名可省略 1.元素的resource id属性 2.唯一标志该元素的值 3.一般最优先根据它来定位 driver.find_element_by_id('io.manong.deve ...
- Vue项目使用/deep/报错:SassError: expected selector解决方案--亲测有效
项目npm run dev报错如下: 解决方法: 尝试用 ::v-deep 替换 /deep/ ,成功解决了问题. 效果如下图所示(完美解决~) 某些预处理器(例如Sass)可能无法>>& ...
- CSS控制背景图片100%自适应填充布局
原文地址:http://blog.csdn.net/wd4java/article/details/50537562 .personal_head { width: 100%; height: 35% ...
- echarts饼图同时展示数量和百分比
要在ECharts中同时展示饼图数据的数量和百分比,可以使用ECharts中的formatter功能.下面是一个简单的示例,演示如何在饼图中显示数量和百分比: option = { tooltip: ...
- Recycle Queue Sample
public class RecycleQueue<T> { public int len; T[] v; int max; int front; int rear; public Rec ...
- hutool调用第三方接口上传文件和下载文件
1.上传文件接口例子(本地接口) 2.第三方接口 3.调用第三方接口下载文件 4.第三方接口 5.多个文件生成压缩文件
- OS复盘
OS复盘 OS课设已经结课一段时间了,我也从其他课程中抽身出来,有了一段能够好好反思的时光. 说实话,完成OS课设的过程是很痛苦的,指导书蜻蜓点水.注释模棱两可.各种函数和文件调用杂乱无章.每次在完成 ...
- requests库获取指定关键词的图片,并保存到本地
var code = "45f4267f-9476-44ca-ac68-6d32aad2d4e1" 源码地址:https://gitee.com/myrensheng/data_a ...
- 7.29关灯游戏,用script实现
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...