E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
HDLbits
HDLbits
: ece241 2014 q7b
题目要求用10进制的BCD计数器来构造1000计数,其实也是将1000hz的时钟信号改造成1hz,我们首先计算出10的三次方等于1000,需要三个10进制的计数器,去计999的中高低位。最低位的计数器一直在对时钟信号计数,因此enable=1,中间位的计数器在最低位的计数器达到9时计数,因此enable=(Q1==9),最高位的计数器在中间位的计数器和最低位的计数器同时达到9时才计数。module
weixin_41004238
·
2023-10-08 20:33
fpga开发
HDLbits
: Countbcd
其实这道题目可以在上一道1000进制的基础上接着做。moduletop_module(inputclk,inputreset,//Synchronousactive-highresetoutput[3:1]ena,output[15:0]q);wire[3:0]Q1,Q2,Q3,Q4;assignena[1]=(Q1==9);assignena[2]=(Q2==9&&Q1==9);assignen
weixin_41004238
·
2023-10-08 20:33
fpga开发
HDLbits
: Count clock
目前写过最长的verilog代码,用了将近三个小时,编写12h显示的时钟,改来改去,估计只有我自己看得懂(吐血)moduletop_module(inputclk,inputreset,inputena,outputpm,output[7:0]hh,output[7:0]mm,output[7:0]ss);couter10couter10_1(clk,reset,ena,ss[3:0]);cout
weixin_41004238
·
2023-10-08 20:10
fpga开发
HDLbits
: Dualedge
FPGA没有双边缘触发触发器,@(posedgeclk或negedgeclk)会报错“FPGA(以及其他任何地方)上的触发器是一个具有一个时钟且仅对该时钟的一个边缘敏感的器件。”参考verilog为什么不能双边沿触发实现双边沿的两种方法moduletop_module(inputclk,inputd,outputq);rega,b;always@(posedgeclk)begina<=d;enda
weixin_41004238
·
2023-10-07 22:15
fpga开发
HDLBits
-Rule110
Rule110isaone-dimensionalcellularautomatonwithinterestingproperties(suchasbeingTuring-complete).Thereisaone-dimensionalarrayofcells(onoroff).Ateachtimestep,thestateofeachcellchanges.InRule110,thenexts
N1..
·
2023-10-06 20:19
FPGA
fpga开发
HDLBits
-Conwaylife
Conway'sGameofLifeisatwo-dimensionalcellularautomaton.The"game"isplayedonatwo-dimensionalgridofcells,whereeachcelliseither1(alive)or0(dead).Ateachtimestep,eachcellchangesstatedependingonhowmanyneighbo
N1..
·
2023-10-06 20:19
fpga开发
HDLBits
-Fsm1
ThisisaMoorestatemachinewithtwostates,oneinput,andoneoutput.Implementthisstatemachine.NoticethattheresetstateisB.Thisexerciseisthesameasfsm1s,butusingasynchronousreset.ModuleDeclarationmoduletop_modul
N1..
·
2023-10-06 20:48
FPGA
fpga开发
HDLbits
: Edgedetect
moduletop_module(inputclk,input[7:0]in,output[7:0]pedge);reg[7:0]in_old;always@(posedgeclk)beginin_old<=in;endassignpedge<=in&~in_old;endmodule对于边缘检测而言,若是0→1和1→0都检测则为in^in_old;若只检测0→1则为in&~in_old;若是只检
weixin_41004238
·
2023-10-06 17:31
fpga开发
HDLbits
: ece241 2014 q4
moduletop_module(inputclk,inputx,outputz);reg[2:0]Q;always@(posedgeclk)beginQ[0]<=Q[0]^x;Q[1]<=(~Q[1])&x;Q[2]<=(~Q[2])|x;z<=~(|Q[2:0]);//错误!!!!endendmodule正确答案:moduletop_module(inputclk,inputx,outputz
weixin_41004238
·
2023-10-06 17:29
fpga开发
HDLbits
:Dff16e
Create16Dflip-flops.It'ssometimesusefultoonlymodifypartsofagroupofflip-flops.Thebyte-enableinputscontrolwhethereachbyteofthe16registersshouldbewrittentoonthatcycle.byteena[1]controlstheupperbyted[15:8
weixin_41004238
·
2023-10-06 12:12
fpga开发
HDLbits
: Module addsub
moduletop_module(input[31:0]a,input[31:0]b,inputsub,output[31:0]sum);wirew1;add16add16_1(a[15:0],b[15:0]^{16{sub}},sub,sum[15:0],w1);add16add16_2(a[31:16],b[31:16]^{16{sub}},w1,sum[31:16],);endmodule注
weixin_41004238
·
2023-10-06 00:50
verilog学习
学习
HDLbits
: Mux9to1v
题目:Createa16-bitwide,9-to-1multiplexer.sel=0choosesa,sel=1choosesb,etc.Fortheunusedcases(sel=9to15),setalloutputbitsto'1'.我的答案:moduletop_module(input[15:0]a,b,c,d,e,f,g,h,i,input[3:0]sel,output[15:0]o
weixin_41004238
·
2023-10-06 00:50
verilog学习
学习
笔记
HDLBits
-Edgecapture
该题的特点就是Capture"meansthattheoutputwillremain1untiltheregisterisreset(synchronousreset).一开始错误的原因是:该题中的输出和输入是input[31:0]in,output[31:0]out都是32位的向量,这里的remains1指的是针对每一bit由于我刚开始写的代码判断~in&in_last非0时,out端就重新赋
N1..
·
2023-10-05 12:18
FPGA
fpga开发
HDLBits
-Lfsr32
SeeLfsr5forexplanations.Builda32-bitGaloisLFSRwithtapsatbitpositions32,22,2,and1.ModuleDeclarationmoduletop_module(inputclk,inputreset,//Active-highsynchronousresetto32'h1output[31:0]q);代码如下:moduletop
N1..
·
2023-10-05 12:47
FPGA
fpga开发
[
HDLBits
] Exams/2014 q4b
Considerthen-bitshiftregistercircuitshownbelow:Writeatop-levelVerilogmodule(namedtop_module)fortheshiftregister,assumingthatn=4.InstantiatefourcopiesofyourMUXDFFsubcircuitinyourtop-levelmodule.Assumet
向盟约宣誓
·
2023-09-25 14:18
HDLBits
fpga开发
fpga
verilog
[
HDLBits
] Lfsr32
SeeLfsr5forexplanations.Builda32-bitGaloisLFSRwithtapsatbitpositions32,22,2,and1.moduletop_module(inputclk,inputreset,//Active-highsynchronousresetto32'h1output[31:0]q);always@(posedgeclk)beginif(rese
向盟约宣誓
·
2023-09-25 14:47
HDLBits
fpga开发
fpga
verilog
HDLBits
-Edgedetect
刚开始写的代码如下:moduletop_module(inputclk,input[7:0]in,output[7:0]pedge);reg[7:0]in_pre;always@(posedgeclk)beginin_pre<=in;endassignpedge=in&~in_pre;endmodule但是提交结果是错误的。猜想原因如下:assignpedge=in&~in_pre;表明通过一个门
N1..
·
2023-09-24 14:17
FPGA
fpga开发
HDLBits
Exams/ece241 2013 q12
1、这个题就是八个移位寄存器以及一个三位的选择器。我的理解是选择器那里应该是组合逻辑所以应该用阻塞赋值,非阻塞赋值的话就会延后一个周期。2、还有就是模块的名称不能跟本来的定义的名称一样。之前名字是dff跟fpga内部的逻辑器件重名就会报错。完整代码如下:moduletop_module(inputclk,inputenable,inputS,inputA,B,C,outputZ);reg[7:0]
闪光的正幸
·
2023-09-23 21:18
FPGA
HDLBits刷题
fpga开发
[
HDLBits
] Exams/ece241 2013 q12
Inthisquestion,youwilldesignacircuitforan8x1memory,wherewritingtothememoryisaccomplishedbyshifting-inbits,andreadingis"randomaccess",asinatypicalRAM.Youwillthenusethecircuittorealizea3-inputlogicfunct
向盟约宣誓
·
2023-09-23 21:17
HDLBits
fpga开发
verilog
fpga
[
HDLBits
] Lemmings4
Seealso:Lemmings1,Lemmings2,andLemmings3.AlthoughLemmingscanwalk,fall,anddig,Lemmingsaren'tinvulnerable.IfaLemmingfallsfortoolongthenhitstheground,itcansplatter.Inparticular,ifaLemmingfallsformorethan
向盟约宣誓
·
2023-09-23 19:49
HDLBits
fpga开发
verilog
fpga
[
HDLBits
] Rule110
Rule110isaone-dimensionalcellularautomatonwithinterestingproperties(suchasbeingTuring-complete).Thereisaone-dimensionalarrayofcells(onoroff).Ateachtimestep,thestateofeachcellchanges.InRule110,thenexts
向盟约宣誓
·
2023-09-23 19:18
HDLBits
fpga开发
verilog
fpga
[
HDLBits
] Fsm3s
Seealso:StatetransitionlogicforthisFSMThefollowingisthestatetransitiontableforaMoorestatemachinewithoneinput,oneoutput,andfourstates.Implementthisstatemachine.IncludeasynchronousresetthatresetstheFSMt
向盟约宣誓
·
2023-09-23 17:28
HDLBits
fpga开发
verilog
fpga
[
HDLBits
] Exams/ece241 2013 q4
Alsoincludeanactive-highsynchronousresetthatresetsthestatemachinetoastateequivalenttoifthewaterlevelhadbeenlowforalongtime(nosensorsasserted,andallfouroutputsasserted).moduletop_module(inputclk,inputr
向盟约宣誓
·
2023-09-23 17:28
HDLBits
fpga开发
fpga
verilog
[
HDLBits
] Lemmings1
ThegameLemmingsinvolvescritterswithfairlysimplebrains.Sosimplethatwearegoingtomodelitusingafinitestatemachine.IntheLemmings'2Dworld,Lemmingscanbeinoneoftwostates:walkingleftorwalkingright.Itwillswitch
向盟约宣誓
·
2023-09-23 17:28
HDLBits
fpga开发
fpga
verilog
[
HDLBits
] Fsm1s
ThisisaMoorestatemachinewithtwostates,oneinput,andoneoutput.Implementthisstatemachine.NoticethattheresetstateisB.Thisexerciseisthesameasfsm1,butusingsynchronousreset.//NotetheVerilog-1995moduledeclara
向盟约宣誓
·
2023-09-23 17:56
HDLBits
fpga开发
verilog
fpga
[
HDLBits
] Mt2015 lfsr
Takenfrom2015midtermquestion5.Seealsothefirstpartofthisquestion:mt2015_muxdffWritetheVerilogcodeforthissequentialcircuit(Submodulesareok,butthetop-levelmustbenamedtop_module).Assumethatyouaregoingtoim
向盟约宣誓
·
2023-09-22 10:53
HDLBits
fpga开发
verilog
fpga
[
HDLBits
] Countbcd
Builda4-digitBCD(binary-codeddecimal)counter.Eachdecimaldigitisencodedusing4bits:q[3:0]istheonesdigit,q[7:4]isthetensdigit,etc.Fordigits[3:1],alsooutputanenablesignalindicatingwheneachoftheupperthreed
向盟约宣誓
·
2023-09-22 10:53
HDLBits
fpga开发
verilog
fpga
[
HDLBits
] Rule90
Rule90isaone-dimensionalcellularautomatonwithinterestingproperties.Therulesaresimple.Thereisaone-dimensionalarrayofcells(onoroff).Ateachtimestep,thenextstateofeachcellistheXORofthecell'stwocurrentneig
向盟约宣誓
·
2023-09-22 05:21
HDLBits
fpga开发
verilog
fpga
HDLBits
的Count clock问题总结
模块化设计思想这是
HDLBits
的电路->时序逻辑->计数器问题的压轴大题,如果没有从头开始刷起,直接刷12-hourclock对我这种初学者来说是非常吃力的。
@上帝
·
2023-09-22 01:43
verilog
verilog
HDLBits
hdlbits
题目Count clock
本来只是一直做题,觉得题目比较基础,直到做到这道题,这道题大概写了2个小时,特意记录一下。这个是题目,让做一个计时的时钟。一开始没审好题,直接加法,结果答案是10的地方我的是a,一看是用2位bcd码来写,没办法,重写了。下面是我的代码:moduletop_module( inputclk, inputreset, inputena, outputpm, output[7:0]hh, o
一脸小白
·
2023-09-22 01:43
hdlbits刷题记录
fpga
HDLBits
之Count clock
这题目可以将hh,mm和ss分开写,易于操作。这题目使用16进制,我们人为的逢10进1,每一位占用4个Bits。这题目用10进制也可以。此外,Pm仅仅在11h59m59s时候翻转,重置时为12h00m00s,12h59m59s时变成1h00m00s.这点是题目比较怪的地方,与我们日常认知的时钟有一定区别。moduletop_module(inputclk,inputreset,inputena,o
IC打工人
·
2023-09-22 01:13
蓝桥杯
fpga开发
拓扑学
verilog
HDLbits
Count clock 答案
moduletop_module(inputclk,inputreset,inputena,outputregpm,output[7:0]hh,output[7:0]mm,output[7:0]ss);reg[3:0]ss_ones,ss_tens,mm_ones,mm_tens,hh_ones,hh_tens;always@(posedgeclk)beginif(reset)beginss_on
「Floating dream」^_
·
2023-09-22 01:13
HDLBits答案
Verilog学习
fpga开发
全网最简,欢迎打脸(
HDLbits
的Count clock题)
Title:CountclockCreateasetofcounterssuitableforuseasa12-hourclock(witham/pmindicator).Yourcountersareclockedbyafast-runningclk,withapulseonenawheneveryourclockshouldincrement(i.e.,oncepersecond).reset
继续走1少年
·
2023-09-22 01:41
fpga开发
HDLBits
Count clock
1、这个题难点在于分和秒采用两个四位的计数器来进行计数。分开一下就可以,以及计算pm那里我当时用assign赋值仿真会有错误不知道怎么解决。不过采用always赋值就没有这个错误了。2、pm=0为上午。pm=1为下午。注意pm要变是在11:59:59之后变,之前想成12:59:59那变想错了。完整代码如下:完整代码如下:moduletop_module( inputclk, inputrese
闪光的正幸
·
2023-09-22 01:11
FPGA
HDLBits刷题
fpga开发
HDLBits
练习——Count clock
Createasetofcounterssuitableforuseasa12-hourclock(witham/pmindicator).Yourcountersareclockedbyafast-runningclk,withapulseonenawheneveryourclockshouldincrement(i.e.,oncepersecond).resetresetstheclockto
呆杏呀
·
2023-09-22 01:11
fpga开发
HDLbits
Count clock
HDLbitsCountclockCreateasetofcounterssuitableforuseasa12-hourclock(witham/pmindicator).Yourcountersareclockedbyafast-runningclk,withapulseonenawheneveryourclockshouldincrement(i.e.,oncepersecond).rese
教练我想做玛卡巴卡
·
2023-09-22 01:10
HDLBits
verilog
HDLbits
Count clock 练习
HDLbitsCountclock练习题目链接:https://
hdlbits
.01xz.net/wiki/Count_clock.简单来说就是写一个时钟,包含pm、时针、分针、秒针的跳变,12小时制。
能饮一杯吴?
·
2023-09-22 01:10
verilog
HDLBits
--- Count clock
HDLBitsCountclock这是一个比较常规的题目但是有一点需要注意的是要求的显示方式是BCD码需要二进制转BCD但是并不需要我们专门为这个写一个function来实现二进制转BCD码在这个轻量级的设计中我们只需要了解拼接方式并且赋值即可。下面这个例子来了解二进制和BCD码的显示方式:moduletb_test();reg[7:0]cout;reg[7:0]cout1;initialbegi
XiaoMing_sususu
·
2023-09-22 01:10
FPGA
fpga开发
HDLBits
刷题_Count clock
Createasetofcounterssuitableforuseasa12-hourclock(witham/pmindicator).Yourcountersareclockedbyafast-runningclk,withapulseonenawheneveryourclockshouldincrement(i.e.,oncepersecond).resetresetstheclockto
Little_Engineer456
·
2023-09-22 01:39
HDLBits刷题
fpga开发
HDLBits
—Count clock
创建12小时制计数器。当ena使能时(注意:复位最高优先级),时钟正常工作,否则始终所有状态不变正常工作时,高电平同步复位,复位为12:00:00am,am时pm为0。一个时钟秒加一,11:59:59时,下一个状态pm进行翻转,同时要设置计数器的进位moduletop_module(inputclk,inputreset,inputena,outputpm,output[7:0]hh,output
柠檬酸~
·
2023-09-22 01:39
其他
HDLBits
Count Clock
moduletop_module(inputclk,inputreset,inputena,outputpm,output[7:0]hh,output[7:0]mm,output[7:0]ss);wireem;wireeh;assignem=(ss==8'h59)&ena;assigneh=(ss==8'h59)&(mm==8'h59)&ena;ms60s60(clk,reset,ena,ss);
justdemo
·
2023-09-22 01:09
fpga开发
HDlbits
Count clock 12小时制时钟 verilog fpga
moduletop_module(inputclk,inputreset,inputena,outputpm,output[7:0]hh,output[7:0]mm,output[7:0]ss);reg[3:0]ssge;reg[3:0]ssshi;reg[3:0]mmge;reg[3:0]mmshi;reg[3:0]hhge;reg[3:0]hhshi;always@(posedgeclk)be
Balien_
·
2023-09-22 01:09
fpga开发
硬件工程
HDLBits
练习Count clock
moduletop_module(inputclk,inputreset,inputena,outputpm,output[7:0]hh,output[7:0]mm,output[7:0]ss);//secondcounteralways@(posedgeclk)beginif(reset)ss[3:0]<=4'h0;elseif(ss[3:0]==4'd9&&ena)ss[3:0]<=4'd0;
han_shazi
·
2023-09-22 01:39
fpga开发
HDLBits
Count clock 答案
创建一组适合作为12小时的时钟使用的计数器(带有am/pm指示器)。你的计数器是由一个快速运行的clk驱动,时钟运行时ena必须为1,为0则暂停。reset将时钟重置到中午12点。上午时pm=0,下午时pm=1。hh,mm和ss分别是小时(01-12)、分钟(00-59)和秒(00-59)的两个BCD(二进制编码的十进制)数字。moduletop_module(inputclk,inputrese
gzc12138
·
2023-09-22 01:38
fpga开发
HDLBits
count clock(12-hour clock)
基础单元-通用计数器由于各个位数都是采用4位BCD码的编码方式,因此在这里考虑级联BCD计数器来实现。由于模为60的BCD计数器可以通过模为6和模为10的计数器级联,模为12的可以考虑2*6,因此首先需要设计模为2,6,10的BCD计数器。在这里参考[如下博客]https://blog.csdn.net/step__forward/article/details/124499102,应用带参数(p
Mandy12310
·
2023-09-22 01:08
fpga开发
习题笔记
HDLBits
Count clock
Createasetofcounterssuitableforuseasa12-hourclock(witham/pmindicator).Yourcountersareclockedbyafast-runningclk,withapulseonenawheneveryourclockshouldincrement(i.e.,oncepersecond).resetresetstheclockto
Zephyr_R
·
2023-09-22 01:08
Verilog
fpga开发
HDLBits
Count clock-12hour clock
二刷
HDLBits
发现自己可以独立做出这道题,来分享一下自己的解法。这道题主要难点就是计数器的十位和个位需要分开计数,如果直接按照八位一起计数就会产生十六进制的结果。
Jennywangup
·
2023-09-22 01:38
fpga开发
[
HDLBits
] Count clock
Createasetofcounterssuitableforuseasa12-hourclock(witham/pmindicator).Yourcountersareclockedbyafast-runningclk,withapulseonenawheneveryourclockshouldincrement(i.e.,oncepersecond).resetresetstheclockto
向盟约宣誓
·
2023-09-22 01:06
HDLBits
fpga开发
verilog
fpga
[
HDLBits
] Fsm2s
ThisisaMoorestatemachinewithtwostates,twoinputs,andoneoutput.Implementthisstatemachine.Thisexerciseisthesameasfsm2,butusingsynchronousreset.moduletop_module(inputclk,inputreset,//SynchronousresettoOFF
向盟约宣誓
·
2023-09-22 00:23
HDLBits
fpga开发
verilog
fpga
[
HDLBits
] Fsm3comb
ThefollowingisthestatetransitiontableforaMoorestatemachinewithoneinput,oneoutput,andfourstates.Usethefollowingstateencoding:A=2'b00,B=2'b01,C=2'b10,D=2'b11.Implementonlythestatetransitionlogicandoutpu
向盟约宣誓
·
2023-09-22 00:53
HDLBits
fpga开发
verilog
fpga
上一页
2
3
4
5
6
7
8
9
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他