完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
本人小白一个今天在做按键消抖的实验,用的是黑金的板子,感觉代码没有问题,但是应该是分配引脚出了问题,我明明没有定义[1:0]pin_out,但是却会出现这样的警告,然后告诉我有一个引脚没有分配,请问各位大大是怎么回事?多谢啦代码:
module debounce_module ( input clk, input reset, input pin_in, output [1:0]pin_out ); /**********************************/ parameter T10MS=19'd500_000; //detect reg F1,F2; always@(posedge clk or negedge reset) if(!reset) {F1,F2}<=2'b00; else {F1,F2}<={pin_in,F1}; wire HtoL,LtoH; assign HtoL=!F1&&F2; assign LtoH=!F2&&F1; //delay reg [18:0] count_10ms; reg [3:0] i; reg ispress,isrelease; always@(posedge clk or negedge reset) if(!reset) begin i<=0; count_10ms<=19'd0; {ispress,isrelease}<=2'b00; end else case(i) 3'd0: if(HtoL) i<=i+1'b1; 3'd1: if(count_10ms==T10MS-1) begin i<=i+1'b1; ispress<=1'b1; count_10ms<=19'd0; end else count_10ms<=count_10ms+1'b1; 3'd2: begin i<=i+1'b1; ispress<=1'b0; end 3'd3: if(LtoH) i<=i+1'b1; 3'd4: if(count_10ms==T10MS-1) begin i<=i+1'b1; isrelease<=1'b1; count_10ms<=19'd0; end else count_10ms<=count_10ms+1'b1; 3'd5: begin i<=1'b0; isrelease<=1'b0; end endcase //function reg [1:0]rpin_out; always@(posedge clk or negedge reset) if(!reset) rpin_out<=1'b0; else if(ispress) rpin_out[0]<=~rpin_out[0]; else if(isrelease) rpin_out[1]<=~rpin_out[1]; assign pin_out = rpin_out; endmodule 下面是tcl文件部分: #复位引脚 set_location_assignment PIN_E15 -to reset #时钟引脚 set_location_assignment PIN_E1 -to clk #LED对应的引脚 set_location_assignment PIN_G15 -to pin_out[0] set_location_assignment PIN_F16 -to pin_out[1] #按键对应的引脚(KEY2 set_location_assignment PIN_E16 -to pin_in 这里是警告信息: Warning: Ignored assignment(s) for "pin_out[0]" because "pin_out" is not a bus or array Warning: Ignored assignment(s) for "pin_out[1]" because "pin_out" is not a bus or array Warning: Some pins have incomplete I/O assignments. Refer to the I/O Assignment Warnings report for details Warning: Skipped module PowerPlay Power Analyzer due to the assignment FLOW_ENABLE_POWER_ANALYZER Critical Warning: No exact pin location assignment(s) for 1 pins of 4 total pins Info: Pin pin_out not assigned to an exact location on the device |
|
相关推荐
2个回答
|
|
可是那条严重警告说的是pin_out没有连接到实际的fpga接口上,烧到板子上不会工作的啊 |
|
|
|
嗷,问题已经解决了,查了一下,原因是我用的fpga有一个nceo引脚默认不是io,要设置一下才行,否则会出现引脚复用还是谢谢你了哈,我是个新人,以后多多关照哈 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1421 浏览 1 评论
1215 浏览 0 评论
矩阵4x4个按键,如何把识别结果按编号01-16(十进制)显示在两个七段数码管上?
1426 浏览 0 评论
913 浏览 0 评论
2229 浏览 0 评论
1432 浏览 35 评论
5619 浏览 113 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-23 00:30 , Processed in 0.511874 second(s), Total 74, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号