在图3中,T1=100nS、T2=1000nS,数据顺序输出,10个数为一组,每组的前3位为通道标志,即用来指示输出的波形是哪一通道,每通道的通道标识是唯一的。D6-D0组成7位二进制数,取值范围0-119,每2mS递增1,每2.4S循环一次。
具体的实现方法如下所示:
p1:process(RST,fosc)
begin
if (mode1=‘0’ and mode2=‘0’) or (mode1=‘1’ and mode2= ‘1’) or (RST = ‘0’) then j 《= “000000”;
elsif fosc ‘ event and fosc = ’1‘ then
case count1 is
when “0000” =》 j(0)《=’0‘;
when “0001” =》 j(0) 《=’1‘;
when “0010” =》 j(0) 《=’0‘;
when “0011” =》 j(0) 《= count(6);
…………………………
when “1001” =》 j(0) 《= count(0);
when others =》 j(0) 《= ’1‘;
end case;
end if;
end process p1;
I1 《= j(0);
在具体实现时,为了使6路高速脉冲信号区别开来,将分别负责计6路信号D0~D6部分的计数器初始值赋为:0,20,40,60,80,100。6路高速脉冲的输出波形图如图4所示。