完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛扫一扫,分享给好友
|
你好,
我有一个简单的问题,如果在我的VHDL代码中初始化一个信号(红色),那么当我在FPGA上实现代码时它会被初始化吗? 与ui_clk相比,此代码是否可以生成周期除以2的时钟? 图书馆IEEE; 使用IEEE.STD_LOGIC_1164.ALL; - 如果使用,取消注释以下库声明 - 带有符号或无符号值的算术函数 使用IEEE.NUMERIC_STD.ALL; - 如果实例化,则取消注释以下库声明 - 此代码中的任何Xilinx叶子单元格。 - 图书馆UNISIM; - 使用UNISIM.VComponents.all; 实体时钟是 港口 ( ui_clk:在std_logic中; - 200 MHz clk:out std_logic - Clock Out ); 结束时钟; 建筑时钟的行为是 signal tb_ui_clk_div2:std_logic:='0'; 开始 clk进程(ui_clk)beginif rising_edge(ui_clk)然后tb_ui_clk_div2结束if; end process; end Behavioral; 以上来自于谷歌翻译 以下为原文 Hello, I have a simple question, if initialise a signal in my VHDL code (in red) will it be initialized when i implement the code on the FPGA? Will this code work to generate a clock with a period divided by 2 compared to ui_clk? library IEEE;use IEEE.STD_LOGIC_1164.ALL;-- Uncomment the following library declaration if using-- arithmetic functions with Signed or Unsigned valuesuse IEEE.NUMERIC_STD.ALL;-- Uncomment the following library declaration if instantiating-- any Xilinx leaf cells in this code.--library UNISIM;--use UNISIM.VComponents.all;entity clock is Port ( ui_clk : in std_logic; -- 200 MHz clk : out std_logic -- Clock Out );end clock;architecture Behavioral of clock issignal tb_ui_clk_div2 : std_logic := '0';beginclk <= tb_ui_clk_div2 ; process (ui_clk) begin if rising_edge (ui_clk) then tb_ui_clk_div2 <= not tb_ui_clk_div2; end if; end process; end Behavioral; |
|
相关推荐
2个回答
|
|
|
您指定的初始值将是寄存器的上电值,由启动期间的GSR信号设置。
它可以与寄存器上的本地复位不同。 初始值可能非常强大,特别是用于定义存储器或ROM的初始值。 您还可以使用函数计算初始值,从而可以对初始值进行复杂的计算。 这适用于过去10年Xilinx工具的综合和仿真。 非常古老的工具可能不支持它。 不要忘记通过接受帖子作为解决方案来尽可能地关闭线程。 在原帖中查看解决方案 以上来自于谷歌翻译 以下为原文 This initial value that you have specified will be the power-on value of the register, set by the GSR signal during startup. It can be different from a local reset on the register. Initial values can be quite powerful, particularly to define the initial values of memories or ROM's. You can also use a function to calculate the initial value, letting you do complex calculations about what the initial value should be. This works for both synthesis and simulation, for Xilinx tools in the last 10 years. Extremely ancient tools might not support it. Don't forget to close a thread when possible by accepting a post as a solution.View solution in original post |
|
|
|
|
|
您指定的初始值将是寄存器的上电值,由启动期间的GSR信号设置。
它可以与寄存器上的本地复位不同。 初始值可能非常强大,特别是用于定义存储器或ROM的初始值。 您还可以使用函数计算初始值,从而可以对初始值进行复杂的计算。 这适用于过去10年Xilinx工具的综合和仿真。 非常古老的工具可能不支持它。 不要忘记通过接受帖子作为解决方案来尽可能地关闭线程。 以上来自于谷歌翻译 以下为原文 This initial value that you have specified will be the power-on value of the register, set by the GSR signal during startup. It can be different from a local reset on the register. Initial values can be quite powerful, particularly to define the initial values of memories or ROM's. You can also use a function to calculate the initial value, letting you do complex calculations about what the initial value should be. This works for both synthesis and simulation, for Xilinx tools in the last 10 years. Extremely ancient tools might not support it. Don't forget to close a thread when possible by accepting a post as a solution. |
|
|
|
|
只有小组成员才能发言,加入小组>>
3137 浏览 7 评论
3433 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2895 浏览 9 评论
4094 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
3079 浏览 15 评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
1353浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
1191浏览 1评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-9 15:17 , Processed in 0.893294 second(s), Total 74, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1396
