赛灵思
直播中

袁嫚玲

7年用户 179经验值
私信 关注
[问答]

信号CLK_counter无法合成

我在合成以下代码时遇到了问题(但是引起部分的问题现在已被注释)。
“信号CLK_counter无法合成,错误的同步描述”。
然后我尝试将F_Clk分成另一个进程,以便我的问题得以解决。
然而,这次Clk_counter信号和Stamp信号得到值X es。
我想要做的就是在F_clk的上升沿将Clk_counter设置为零
提前致谢。
图书馆IEEE;
使用IEEE.STD_LOGIC_1164.ALL;
使用IEEE.STD_LOGIC_ARITH.ALL;
使用IEEE.STD_LOGIC_UNSIGNED.ALL;
实体adc是
港口(
重置:在std_logic中;
D_Clk:在std_logic中;
F_Clk:在std_logic中;
Data_in:在std_logic中;
Data_out:out std_logic_vector(15 downto 0);
W_en:out std_logic
);
结束adc;
架构adc的行为是
signal Data_main:std_logic_vector(23 downto 0);
信号ClkCounter:std_logic_vector(15 downto 0);
信号标记:std_logic_vector(3 downto 0):=“0000”;
signal SubState:std_logic_vector(15 downto 0);
类型STATE_TYPE是(
闲,
ALIGN,
发送
);
signal UserState:STATE_TYPE;
开始
--------------------------------------------------
---------------------------
过程(F_Clk)
开始
if(F_Clk'event和F_clk ='1')然后
邮票'0');
Data_main'0');
ClkCounter'0');
UserState
if(ClkCounter = X“000b”)然后
子状态
UserState
子状态
W_en
Data_Out(15 downto 4)
W_en

以上来自于谷歌翻译


以下为原文

I met a problem when synthesizing the following code (however the problem causing part is now commented). " Signal  CLK_counter cannot be synthesized ,bad synchronous description " . Then I tried to seperate the F_Clk into another process so that my problem could be solved. However this time Clk_counter signal and Stamp signal gets the value X es.
All I want to do is set the Clk_counter to zero on the rising edge of F_clk

Thanks in advance.
library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;entity adc isport(RESET : in std_logic;D_Clk : in std_logic;F_Clk : in std_logic;Data_in : in std_logic;Data_out : out std_logic_vector(15 downto 0);W_en: out std_logic);end adc;architecture Behavioral of adc issignal Data_main : std_logic_vector(23 downto 0);signal ClkCounter : std_logic_vector (15 downto 0);signal Stamp : std_logic_vector (3 downto 0):="0000";signal SubState : std_logic_vector (15 downto 0);type STATE_TYPE is (        IDLE,  ALIGN,  SEND    );     signal UserState : STATE_TYPE;begin-----------------------------------------------------------------------------process (F_Clk)beginif (F_Clk'event and F_clk='1') thenStamp <= Stamp + 1;ClkCounter <= X"0000";end if;end process;process(D_Clk)beginif (RESET='1') thenStamp <= (others=>'0');Data_main <= (others=>'0');ClkCounter <= (others=>'0');UserState <= IDLE;elseData_main <= Data_main(22 downto 0) & Data_in;ClkCounter <= ClkCounter + 1;--if (rising_edge(F_Clk)) then--Stamp <= Stamp + 1;------ClkCounter <= X"0000";--end if;case (UserState) iswhen IDLE =>if (ClkCounter=X"000b") thenSubState <= x"0000";UserState <= ALIGN;end if;when ALIGN =>UserState <= SEND;when SEND =>SubState <= Substate +1;if (SubState=x"0001") thenUserState <= IDLE;end if;end case;end if;end process;------------------------------------------------------------------------- process (UserState,ClkCounter)begincase (UserState) iswhen IDLE => W_en <= '0';when ALIGN =>  Data_Out(15 downto 4) <= Data_Main (12 downto 1);Data_out(3 downto 0) <= Stamp;when SEND =>W_en <= '1';end case;end process;end Behavioral;

回帖(9)

张晓宁

2019-6-11 14:11:24
是的,我已经评论过“rising_edge(F_Clk)”部分它没有,但它包含在代码中对不起。
如果你在代码中看到了错误 - 或者没有意义的东西 - 你是否能够改变它?
我的目标是捕获在D_Clk的上升沿和下降沿发送的LVDS数据,因此我无法添加“if(D_Clk'event和D_clk ='1')或类似的那样。
在时钟的上升沿采样LVDS数据的寄存器与在相同(不同)时钟的下降沿采样LVDS数据的寄存器是分开的。
你能理解这个吗?
如果你可以创建一个新的寄存器类型来捕获两个时钟边沿的数据,你完成了什么?
您从DDR数据开始,您将获得DDR数据。
你能理解这个吗?
所以'奇数'数据被捕获在'posedge'上的时钟寄存器中,'even'数据被捕获在'negedge'上的时钟寄存器中。
您可以使用简单的HDL代码(可能使用结构逻辑)来完成此操作,或者如果您希望在IO块中完成1:2解复用,则可以实例化IDDR原语。
- 鲍勃埃尔金德
签名:新手的自述文件在这里:http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369总结:1。
阅读手册或用户指南。
你读过手册了吗?
你能找到手册吗?2。
搜索论坛(并搜索网页)以寻找类似的主题。
不要在多个论坛上发布相同的问题。
不要在别人的主题上发布新主题或问题,开始新的主题!5。
学生:复制代码与学习设计不同.6“它不起作用”不是一个可以回答的问题。
提供有用的详细信息(请与网页,数据表链接).7。
您的代码中的评论不需要支付额外费用。
我没有支付论坛帖子的费用。
如果我写一篇好文章,那么我一无所获。
在原帖中查看解决方案

以上来自于谷歌翻译


以下为原文

Yeah, I have commented that  "rising_edge(F_Clk) " part it does not , however it is included in the code sorry about that.
 
If you see something wrong -- or something which does not make sense -- in the code, are you not able to change it?
 
My aim is to capture the LVDS data sent in both rising and falling edges of that D_Clk so I could not add "if (D_Clk'event and D_clk='1') or sth. like that.
 
The register which samples LVDS data on the rising edge of the clock is separate from the register which samples LVDS data on the falling edge of the same (not different) clock.  Does this make sense to you?
 
If you could create a new register type which captures data on both clock edges, what have you accomplished?  You started with DDR data and you are left with DDR data.  Does this make sense to you?
 
So 'odd' data are captured in registers clocked on 'posedge' and 'even' data are captured in registers clocked on 'negedge'.
 
You can accomplish this with simple HDL code (probably using fabric logic), or you can instantiate the IDDR primitive if you want the 1:2 de-multiplexing accomplished in the IO blocks.
 
-- Bob Elkind
SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide.  Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts.  If I write a good post, then I have been good for nothing.View solution in original post
举报

黄淳

2019-6-11 14:30:21
你的D_Clk过程是一个完整的混乱。
这个过程对D_Clk很敏感,但是在这个过程中甚至没有引用那个信号。
出于某种原因,你在该过程的中间有一个rising_edge(F_Clk)调用。
我不知道还有什么可说的,除了你应该得到一本好的VHDL书并实际阅读它。
----------------------------是的,我这样做是为了谋生。

以上来自于谷歌翻译


以下为原文

Your D_Clk process is a complete mess. The process is sensitive to D_Clk, yet there's nothing in the process that even references that signal.
And for some reason, you have a rising_edge(F_Clk) call smack in the middle of that process.
I don't know what else to say, other than perhaps you should get a good VHDL book and actually read it.
----------------------------Yes, I do this for a living.
举报

张晓宁

2019-6-11 14:38:03
除了Bassman的评论之外,在“初学者”设计中使用多个时钟通常是一个麻烦的迹象,与缺乏经验相关,这通常会导致计时和同步问题。
- 鲍勃埃尔金德
签名:新手的自述文件在这里:http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369总结:1。
阅读手册或用户指南。
你读过手册了吗?
你能找到手册吗?2。
搜索论坛(并搜索网页)以寻找类似的主题。
不要在多个论坛上发布相同的问题。
不要在别人的主题上发布新主题或问题,开始新的主题!5。
学生:复制代码与学习设计不同.6“它不起作用”不是一个可以回答的问题。
提供有用的详细信息(请与网页,数据表链接).7。
您的代码中的评论不需要支付额外费用。
我没有支付论坛帖子的费用。
如果我写一篇好文章,那么我一无所获。

以上来自于谷歌翻译


以下为原文

In addition to Bassman's comments, the use of multiple clocks in a 'beginner' design is usually a sign of trouble, related to inexperience, which usually leads to timing and synchronisation problems.
 
-- Bob Elkind
SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide.  Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts.  If I write a good post, then I have been good for nothing.
举报

李兆峰

2019-6-11 14:46:48
嗨,
是的,我已经评论过“rising_edge(F_Clk)”部分它没有,但它包含在代码中对不起。
我的目标是捕获在D_Clk的上升沿和下降沿发送的LVDS数据,因此我无法添加“if(D_Clk'event和D_clk ='1')或类似的那样。是否有任何方式或可能是一个想法
要做到这一点。请不要建议关于lvds的应用笔记,因为我已经阅读了太久而且它们非常复杂。

以上来自于谷歌翻译


以下为原文

 
Hi,
 
Yeah, I have commented that  "rising_edge(F_Clk) " part it does not , however it is included in the code sorry about that. My aim is to capture the LVDS data sent in both rising and falling edges of that D_Clk so I could not add "if (D_Clk'event and D_clk='1') or sth. like that. Is there any way or perhaps an idea to accomplish that. Please do not suggest app notes about lvds because I have been reading them for too long and they pretty complicated.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分