集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 3143|回复: 2

关于信号赋初值、及进程启动的问题!(VHDL)

[复制链接]
小泡泡 发表于 2010-4-23 12:12:49 | 显示全部楼层 |阅读模式
各位仁兄:以下是很简单的一段程序,烦请各位瞧一瞧,帮小弟答疑解惑。
问1:在结构体中,对信号的赋初值,是否有效?
问2:进程中的敏感信号,没有发生更新,只是在结构体中进行定义时赋于了初值,如:init,那么,进程能否启动?
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity led is
port(ledout1:   out std_logic;
ledout:   out std_logic
);
end entity;

architecture behavior of led is
signal init:std_logic:='1';--此处对信号的赋初值是有效的。
begin
process(init) is
begin
if(init='0') then
--init<='0';
ledout<='1';
ledout1<='0';
elsif init='1' then
ledout<='0';
ledout1<='1';
elsif init='X' then
ledout<='X';
ledout1<='X';
else
ledout<='1';
ledout1<='1';
end if;
end process;
end architecture;
我在QUARTUS II中进行仿真后的结果,赋初值是有效的,并且,进程能够启动?按语法,进程中的敏感信号,更新后才能启动?
 楼主| 小泡泡 发表于 2010-4-26 20:53:42 | 显示全部楼层
问1:在结构体中,对信号的赋初值,是否有效?
问2:进程中的敏感信号,没有发生更新,只是在结构体中进行定义时赋于了初值,如:init,那么,进程能否启动?
Sunlife 发表于 2015-5-14 11:42:14 | 显示全部楼层
进程中的敏感信号,没有发生更新,只是在结构体中进行定义时赋于了初值
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2025-5-6 22:20 , Processed in 0.076797 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表