process (DOok_Buf,FCO)
begin
if (DOok_Buf='0') then
P_Count<=X"000";
elsif rising_edge(FCO) then
P_Count<=P_Count+1;
if(P_Count=X"001") then
LVAL<='0';
else
LVAL<='1';
end if;
end if;
end process;
想问下大家这个进程执行完后LVAL是1还是0啊?
哦 是顺序执行才会先0后1
① process(clk)
② begin
③ if clk’event and clk=’1’ then
④ Ctl_areg<=Ctl_a;--产生相邻状态
⑤ if Ctl_areg=’0’ and Ctl_a=’1’ then--上跳判断
⑥ … … ; --执行相应操作
⑦ end if;
⑧ end if;
⑨ end process;
但是如果顺序执行的话会出现5吗 理解不到位啊 见笑了
process (DOok_Buf,FCO)
begin
if (DOok_Buf='0') then
P_Count<=X"000";
elsif rising_edge(FCO) then
P_Count<=P_Count+1;
if(P_Count=X"001") then
LVAL<='0';
else
LVAL<='1';
end if;
end if;
end process;
process (DOok_Buf,FCO)
begin
if (DOok_Buf='0') then
P_Count<=X"000";
elsif rising_edge(FCO) then
if(P_Count=X"001") then
LVAL<='0';
else
LVAL<='1';
end if;
P_Count<=P_Count+1;
end if;
end process;
process (DOok_Buf,FCO)
begin
if (DOok_Buf='0') then
P_Count<=X"000";
elsif rising_edge(FCO) then
P_Count<=P_Count+1;
P_Count<=P_Count+1;
P_Count<=P_Count+1;
if(P_Count=X"001") then
LVAL<='0';
else
LVAL<='1';
end if;
end if;
end process;