vhdl语言赋值问题 求高人 在线等 急急急
发布网友
发布时间:2023-09-01 07:43
我来回答
共1个回答
热心网友
时间:2024-11-28 23:03
p: PROCESS(clr,clk,qq)
variable p: std_logic_vector(3 downto 0);
BEGIN
p<=qq;
if clr='1' then
if clk='1' and clk'event then
if p>"0000" then
p<=p-1;
else p<=p;
end if;
end if;
end if;
q<=p;
end process p;
process(a,b,s)
begin
case s is
when 0 => qq<=a;
when 1 =>qq<=b;
when others=> qq<="0000";
end case;
end process;
end architecture dc;
没试过不知道可对