【正文】
se 。use 。entity t10 is port(clk: in std_logic。 clr: in std_logic。 ena: in std_logic。 cq: out integer range 0 to 15。 carry_out: out std_logic)。end entity t10。architecture art of t10 is signal cqi: integer range 0 to 15。 begin process(clk,clr,ena)is begin if clr=39。139。then cqi=0。 elsif clk39。event and clk=39。139。then if ena=39。139。then if cqi9 then cqi=cqi+1。 else cqi=0。end if。 end if。 end if。 end process。 process(cqi)is begin if cqi=9 then carry_out=39。139。 else carry_out=39。039。end if。end p