process(carry)
begin
if carry'event and carry='1'then
if counter40="100111"then
load<='1';
counter40<="000000";
else counter40<=counter40+1;
load<='0';
end if;
end if;
end process;
process(clk)
begin
if clk'event and clk='1'then
if counter4="0011"then
counter4<="0000";
carry<='1';
else counter4<=counter4+1;
carry<='0';
end if;
end if;
end process;
process(load,carry)
begin
if load='1'then
reg10(9 downto 0)<=regin(9 downto 0);
else
if carry'event and carry='1' then
din<=reg10(0);
reg10(8 downto 0)<=reg10(9 downto 1);
end if;
end if;
end process;
运行时说我句法错误!用VHDL语言在CPLD上实现异步串行通信 |