完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
我正在使用Spartan-6开发板和XC6SLX45T FPGA。
我目前正在研究从板上的200MHz ocillator到代码所需的20MHz时钟的时钟分频器。 当我尝试合成代码时出现这个错误:“非网络端口clkIn不能是模式输入。” 我对Xilinx的支持表示感谢,并表示:“XST正在使用一个新的解析器,从Virtex-6和Spartan-6 FPGA开始,它增强了语言覆盖率并遵循更严格的LRM指南。” 我的问题是:是否可以绕过此错误或是否有另一种方法来制作分频器,以便不会发生此错误? 谢谢。 下面是代码: 输入clkIn; reg [3:0]计数; // clock divider counterreg clkIn; //时钟分频器输出总是@(posedge clkIn)开始if(count == 4'b1001)//除以10 count 以下为原文 I am working with a Spartan-6 development board and the XC6SLX45T FPGA. I am current working on a clock divider from the 200MHz ocillator on the board to a 20MHz clock required by the code. When I try to synthisize the code this error comes up: "Non-net port clkIn cannot be of mode input." I chekc on Xilinx support and it says that : "XST is using a new parser starting with Virtex-6 and Spartan-6 FPGA which has enhanced language coverage and follows stricter LRM guidelines." My question is: is it possible to bypass this error or is there another way to make the divider so that this error does not happen? Thanks. below is the the code: input clkIn; reg [3:0] count; // clock divider counter reg clkIn; // clock divider output always @ (posedge clkIn) begin if (count==4'b1001) // divide by 10 count <= 4'b0000; // reset to 0 else count <= count+1; // increment counter clkIn <= (count == 4'b0000); // counter decoded, single cycle pulse is generated end |
|
相关推荐
4个回答
|
|
你可以删除“reg clkIn;”
线。 “输入clkIn”语句已经声明clkIn是一个连线并重新声明它,因为reg不是必需的。一行让我困惑的是“clkIn这看起来完全是假的。我认为你的意思是clkOut; //和laterclkOut? - 如果提供的信息有用,请将答案标记为“接受为解决方案”。给予您认为有用且回复的帖子。 在原帖中查看解决方案 以上来自于谷歌翻译 以下为原文 You can just remove the "reg clkIn;" line. The "input clkIn" statement already declares clkIn to be a wire and redeclaration of it as reg is not necessary. One lines which baffles me is "clkIn <= (count == 4'b0000); " This looks completely bogus. I think you meant reg clkOut; // and later clkOut <= (count == 4'b0000); ?- Please mark the Answer as "Accept as solution" if information provided is helpful. Give Kudos to a post which you think is helpful and reply oriented.View solution in original post |
|
|
|
你可以删除“reg clkIn;”
线。 “输入clkIn”语句已经声明clkIn是一个连线并重新声明它,因为reg不是必需的。一行让我困惑的是“clkIn这看起来完全是假的。我认为你的意思是clkOut; //和laterclkOut? - 如果提供的信息有用,请将答案标记为“接受为解决方案”。给予您认为有用且回复的帖子。 以上来自于谷歌翻译 以下为原文 You can just remove the "reg clkIn;" line. The "input clkIn" statement already declares clkIn to be a wire and redeclaration of it as reg is not necessary. One lines which baffles me is "clkIn <= (count == 4'b0000); " This looks completely bogus. I think you meant reg clkOut; // and later clkOut <= (count == 4'b0000); ?- Please mark the Answer as "Accept as solution" if information provided is helpful. Give Kudos to a post which you think is helpful and reply oriented. |
|
|
|
谢谢你帮助解决了这个错误。
但是其他事情也出现了。 因为这是一个时钟分频器,它需要与原始输入一起工作。 现在,当我运行模拟时,时钟以200MHz的速率滴答,但是如果我添加clkOut,则频率没有变化(即,它可能将它分开但没有连接到clkIn输入)。 如何将输入clkIn连接到clkOut寄存器,以便它在模拟中分开。 下面是测试台的代码: 模块ethernettest; //输入reg clkIn; //输出有线Ethernet_TDp; 电线Ethernet_TDm; 电线clkOut; //实例化被测单元(UUT)packet_sender uut(.clkIn(clkIn),. Ethernet_TDp(Ethernet_TDp),。CONTnet_TDm(Ethernet_TDm),. clkOut(clkOut)); 初始开始clkIn = 0; //初始化输入结束始终开始#500 clkIn = 1; #500 clkIn = 0; //等待100 ns进行全局重置以完成#100; //在这里添加刺激结束endmodule 以上来自于谷歌翻译 以下为原文 Thank you this helped with the error. But somthing else arised. becasue this is a clock divider it needs to work with the orginal input. Right now when I run a simulation the clock ticks at 200MHz but if I add clkOut, there is no change to the frequency (i.e while it may dividing it is not connected to the clkIn input). How can I connect the input, clkIn, to the clkOut register so that it divides in a simulation. below is the code for the test bench: module ethernettest; // Inputs reg clkIn; // Outputs wire Ethernet_TDp; wire Ethernet_TDm; wire clkOut; // Instantiate the Unit Under Test (UUT) packet_sender uut ( .clkIn(clkIn), .Ethernet_TDp(Ethernet_TDp), .Ethernet_TDm(Ethernet_TDm), .clkOut(clkOut) ); initial begin clkIn=0; // Initialize Inputs end always begin #500 clkIn= 1; #500 clkIn = 0; // Wait 100 ns for global reset to finish #100; // Add stimulus here end endmodule |
|
|
|
我认为你的问题是你的测试平台没有创建时钟。
从always块中删除clkIn赋值并将以下内容添加到初始块:clkIn = 0; forever#500 clkIn =!clkIn;这应该为您提供一个不断切换的时钟而不是单个脉冲。 - 如果提供的信息有用,请将答案标记为“接受为解决方案”。给予您认为有用且回复的帖子。 以上来自于谷歌翻译 以下为原文 I think your problem is that your testbench does not create a clock. remove the clkIn assignments from always block and add the following to the initial block: clkIn = 0; forever #500 clkIn = !clkIn; This should give you a constantly toggling clock as opposed to a single pulse.- Please mark the Answer as "Accept as solution" if information provided is helpful. Give Kudos to a post which you think is helpful and reply oriented. |
|
|
|
只有小组成员才能发言,加入小组>>
2423 浏览 7 评论
2824 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2294 浏览 9 评论
3374 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2465 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
1190浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
590浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
452浏览 1评论
2006浏览 0评论
731浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 06:00 , Processed in 1.229649 second(s), Total 84, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号