【正文】
td_logic。 調(diào)制信號 ? y :out std_logic)。 基帶信號 ? end ASK2。 ? architecture behav of ASK2 is ? signal q:integer range 0 to 11。 計數(shù)器 ? signal xx:std_logic。 寄存 x信號 電路符號 接下頁 EDA技術(shù)及 CPLD/FPGA應(yīng)用簡明教程 清華大學(xué)出版社 2022212 第 19頁 ? signal m:integer range 0 to 5。 計 xx的脈沖數(shù) ? begin ? process(clk) 對系統(tǒng)時鐘進(jìn)行 q分頻 , ? begin ? if clk39。event and clk=39。139。 then xx=x。 ? if start=39。039。 then q=0。 if語句完成 q的循環(huán)計數(shù) ? elsif q=11 then q=0。 ? else q=q+1。 ? end if。 ? end if。 ? end process。 接下頁 EDA技術(shù)及 CPLD/FPGA應(yīng)用簡明教程 清華大學(xué)出版社 2022212 第 20頁 ? process(xx,q) 此進(jìn)程完成 ASK解調(diào) ? begin ? if q=11 then m=0。 m計數(shù)器清零 ? elsif q=10 then ? if m=3 then y=39。0 ? else y=39。139。 ? end if。 ? elsif xx39。event and xx=39。139。then m=m+1。 計 xx信號的脈沖個數(shù) ? end if。 ? end process。 ? end behav。