完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
大家好,
使用相对简单的状态机我得到以下警告,我无法解决: Xst:3002 - 此设计包含一个或多个与Spartan6架构直接不兼容的寄存器/锁存器。 造成这种情况的两个主要原因是使用异步设置和异步复位描述的寄存器或锁存器,或者使用异步设置或复位描述的寄存器或锁存器,但是具有相反极性的初始化值(即使用异步设置进行异步复位)。 初始化值为1)。 我的状态机看起来像这样,我想问你,如果你能找到这个警告的原因: type int_t_AllStates是(PART_1,PART_2_READ,PART_2_WRITE); signal int_s_CurrentState:int_t_AllStates; 的statemachine:处理(in_SPI_CS) 开始 如果rising_edge(in_SPI_CS)那么 case int_s_CurrentState是 当PART_1 =>时 如果int_DataRX = x“0060”那么 int_s_CurrentState int_s_CurrentState int_s_CurrentState int_s_CurrentState int_SlaveOut int_SlaveOut int_SlaveOut 你可以帮我吗? 以上来自于谷歌翻译 以下为原文 Hello everyone, while using a relativly simple State Machine I get the following Warning which I can not resolve: Xst:3002 - This design contains one or more registers/latches that are directly incompatible with the Spartan6 architecture. The two primary causes of this is either a register or latch described with both an asynchronous set and asynchronous reset, or a register or latch described with an asynchronous set or reset which however has an initialization value of the opposite polarity (i.e. asynchronous reset with an initialization value of 1). My State machine looks like this and I wanted to aks you, if you can find the reason for this warning: type int_t_AllStates is (PART_1,PART_2_READ,PART_2_WRITE);signal int_s_CurrentState: int_t_AllStates;STATEMACHINE:process(in_SPI_CS)begin if rising_edge(in_SPI_CS) then case int_s_CurrentState is when PART_1 => if int_DataRX = x"0060" then int_s_CurrentState <= PART_2_READ; else int_s_CurrentState <= PART_2_WRITE; end if; when PART_2_READ => int_s_CurrentState <= PART_1; when PART_2_WRITE => int_s_CurrentState <= PART_1; when OTHERS => int_s_CurrentState <= PART_1; end case; end if;end process;-----------------------------------------------------------------------SIGNALMANIPULATION:process (int_s_CurrentState,i_FIFO_DataOut)begin case int_s_CurrentState is when PART_1 => int_SlaveOut <= x"1234"; when PART_2_READ => int_SlaveOut <= i_FIFO_DataOut; when PART_2_WRITE => int_SlaveOut <= x"5678"; end case;end process; Can you help me? |
|
相关推荐
5个回答
|
|
|
请在所有实例中定义输出值。
然后就不会有任何警告。 第二种情况使用默认值。 查看以下论坛帖子http://forums.xilinx.com/xlnx/board/crawl_message?board.id=SYNTHBD&message.id=6853谢谢 -------------------------------------------------- -----------------------不要忘记回答,kudo,并接受为解决方案.------------- -------------------------------------------------- ---------- 以上来自于谷歌翻译 以下为原文 Please define the value of output at all instances. Then there wont be any warning. Use default in 2nd case. Check the following forum post http://forums.xilinx.com/xlnx/board/crawl_message?board.id=SYNTHBD&message.id=6853 Thanks ------------------------------------------------------------------------- Don’t forget to reply, kudo, and accept as solution. ------------------------------------------------------------------------- |
|
|
|
|
|
嗨,
检查综合报告。 你必须改变你的编码。 警告:Xst:3001 - 此设计包含一个或多个具有活动异步设置和异步复位的寄存器或锁存器。 虽然可以构建该电路,但它在面积,功率和性能方面创建了次优实现。 为实现更优化的实现,Xilinx强烈建议采用以下方法之一:1)如果不需要所需的功能,则从所有寄存器和锁存器中移除置位或复位2)修改代码以产生同步设置和/或复位(均为 首选)3)使用-async_to_sync选项将异步设置/重置转换为同步操作(使用此选项时强烈建议使用时序模拟)具有异步设置和重置的寄存器实例列表:int_DataTx_14 in unit int_DataTx_10 in unit int_DataTx_6 in unit int_DataTx_3 in unit int_DataTx_2 in unit int_DataTx_0 in unit如果没有那么转到综合属性 - > HDL选项 - >检查async到sync.Thanks -------------------------------------------------- -----------------------不要忘记回答,kudo,并接受为解决方案.------------- -------------------------------------------------- ---------- 以上来自于谷歌翻译 以下为原文 Hi, Check your synthesis report. You have to change your coding. WARNING:Xst:3001 - This design contains one or more registers or latches with an active asynchronous set and asynchronous reset. While this circuit can be built, it creates a sub-optimal implementation in terms of area, power and performance. For a more optimal implementation Xilinx highly recommends one of the following: 1) Remove either the set or reset from all registers and latches if not needed for required functionality 2) Modify the code in order to produce a synchronous set and/or reset (both is preferred) 3) Use the -async_to_sync option to transform the asynchronous set/reset to synchronous operation (timing simulation highly recommended when using this option) List of register instances with asynchronous set and reset: int_DataTx_14 in unit int_DataTx_10 in unit int_DataTx_6 in unit int_DataTx_3 in unit int_DataTx_2 in unit int_DataTx_0 in unit If not then Go to synthesis properties--> HDL options -->check the async to sync. Thanks ------------------------------------------------------------------------- Don’t forget to reply, kudo, and accept as solution. ------------------------------------------------------------------------- |
|
|
|
|
|
engineer_on_tour写道:
大家好, 使用相对简单的状态机我得到以下警告,我无法解决: 我的状态机看起来像这样,我想问你,如果你能找到这个警告的原因: type int_t_AllStates是(PART_1,PART_2_READ,PART_2_WRITE); signal int_s_CurrentState:int_t_AllStates; 的statemachine:处理(in_SPI_CS) 开始 如果rising_edge(in_SPI_CS)那么 case int_s_CurrentState是 当PART_1 =>时 如果int_DataRX = x“0060”那么 int_s_CurrentState 其他 int_s_CurrentState 万一; 当PART_2_READ =>时 int_s_CurrentState 当PART_2_WRITE =>时 int_s_CurrentState 当OTHERS => int_s_CurrentState时 结束案例; 万一; 结束过程; 您确定要将SPI芯片选择用作状态机的时钟吗? SIGNALMANIPULATION:process(int_s_CurrentState,i_FIFO_DataOut) 开始 case int_s_CurrentState是 当PART_1 =>时 int_SlaveOut 当PART_2_READ =>时 int_SlaveOut 当PART_2_WRITE =>时 int_SlaveOut 结束案例; 结束过程; 你可以帮我吗? 这是通常糟糕的双进程状态机,但除非你没有显示更多代码,否则我不明白为什么你会得到错误。 ----------------------------是的,我这样做是为了谋生。 以上来自于谷歌翻译 以下为原文 engineer_on_tour wrote:It's the usual awful two-process state machine but unless there is more code you're not showing, I don't understand why you get the error. ----------------------------Yes, I do this for a living. |
|
|
|
|
|
engineer_on_tour写道:
添加“when OTHERS” - case无效。 正如我所看到的,在每种情况下都有一个指定的输出值。 这是完全正确的。 当您使用枚举类型来定义状态时,如果您在case语句中表示了每个已定义的状态,那么使用when others =>是完全没有必要的,因为状态寄存器没有其他可能的状态。 。 因此,当其他人=>覆盖默认或恢复状态时,您无法使用! 您建议的帖子像这样解决了这个问题:“我已经将异步复位转换为同步信号,并且所有这些锁存器都消失了。” 我不明白我在代码中必须做出的改变来解决这个问题(?) 也许真正的问题是: 你申报州登记 int_s_CurrentState:int_t_AllStates; 没有初始化器。 无法知道机器启动的状态,因此工具将选择一个。 初始化器很简单: int_s_CurrentState:int_t_AllStates:= PART_1; 然后,当第一个进程(使用in_SPI_cs作为时钟的那个)中的其他=>时,你有多余的东西,并且出于某种原因,工具可能认为那种情况是同步重置条件(这是一个延伸,但谁知道?)。 你应该做的是使用单个同步过程重新编码,因为这是双进程状态机是恶魔工具的另一个原因。 摆脱其他人=>并确保初始化你的州注册。 ----------------------------是的,我这样做是为了谋生。 以上来自于谷歌翻译 以下为原文 engineer_on_tour wrote:And that is entirely correct. When you use an enumerated type to define your states, and if you have each defined state represented in your case statement, then the use of when others => is completely unnecessary, since there is no other possible state for the state register to be in. Thus you cannot use when others => to cover a default or recovery state! The post you suggested soved the problem like this: "I have turned an asynchronous reset into a synchronous one for a certain signal and all those latches disappeared."Perhaps the real issue is this: You declare the state register int_s_CurrentState : int_t_AllStates; without an initializer. It is impossible to know what state your machine starts up in, so the tools will pick one. The initializer is simple: int_s_CurrentState : int_t_AllStates := PART_1; Then you have the superfluous when others => in the first process (the one using in_SPI_cs as the clock) and for some reason the tools might think that that case is a synchronous reset condition (which is a stretch, but who knows?). What you should do is to recode this using a single synchronous process, because this is yet another reason why two-process state machines are the tools of the devil. Get rid of the when others => and make sure you initialize your state register. ----------------------------Yes, I do this for a living. |
|
|
|
|
|
har ** bleep **写道:
请在所有实例中定义输出值。 然后就不会有任何警告。 第二种情况使用默认值。 他的案件陈述涵盖了所有案件。 当别人=>没有必要时。 ----------------------------是的,我这样做是为了谋生。 以上来自于谷歌翻译 以下为原文 har**bleep** wrote:His case statements cover all cases. when others => is not necessary. ----------------------------Yes, I do this for a living. |
|
|
|
|
只有小组成员才能发言,加入小组>>
3118 浏览 7 评论
3407 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2874 浏览 9 评论
3966 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
3057 浏览 15 评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
1326浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
1168浏览 1评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 23:21 , Processed in 0.768943 second(s), Total 82, Slave 65 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
952
