【正文】
clk=39。139。then if start=39。039。 then q1=0。 elsif q1=5 then f1=39。139。 q1=q1+1。 elsif q1=11 then f1=39。039。 q1=0。 else f1=39。039。 q1=q1+1。 end if。 end if。 end process。 process(clk) begin if clk39。event and clk=39。139。 then if start=39。039。 then q2=0。 elsif q2=0 then f2=39。139。 q2=q2+1。 elsif q2=1 then f2=39。039。 q2=0。 else f2=39。039。 q2=q2+1。 end if。 end if。 end process。 process(clk,x) begin if clk39。event and clk=39。139。 then if x=39。039。 then y=f1。 else y=f2。 end if。 end if。 end process。end rt1。 FSK解調(diào)模塊代碼library ieee。use 。use 。use 。entity pl_fsk2 is port(clk :in std_logic。 start :in std_logic。 x :in std_logic。 y :out std_logic)。end pl_fsk2。architecture rt1 of pl_fsk2 issignal q:integer range 0 to 11。signal xx:std_logic。signal m:integer range 0 to 5。 begin process(clk) begin if clk39。event and clk=39。139。 then xx=x。 if start=39。039。 then q=0。 elsif q=11 then q=0。 else q=q+1。 end if。 end if。 end process。 process(xx,q) begin if q=11 then m=0。 elsif q=10 then if m=3 then y=39。039。 else y=39。139。 end if。 elsif xx39。event and xx=39。139。 then m=m+1。 end if。 end process。end rt1。CPSK調(diào)制模塊代碼library ieee。use 。use 。use 。entity pl_cpsk is port(clk :in std_logic。 start :in std_logic。 x :in std_logic。 y :out std_logic)。end pl_cpsk。architecture rt1 of pl_cpsk issignal q:std_logic_vector(1 downto 0)。signal f1,f2:std_logic。 begin process(clk) begin if clk39。event and clk=39。139。 then if start=39。039。 then q=00。 elsif q=01 then f1=39。139。 f2=39。039。 q=q+1。 elsif q=11 then f1=39。039。 f2=39。139。 q=00。 else f1=39。039。 f2=39。139。 q=q+1。 end if。 end if。 end process。 process(clk,x) begin if clk39。event and clk=39。139。 then if q(0)=39。139。 then if x=39。139。 then y=f1。 else y=f2。 end if。 end if。 end if。 end process。end rt1;CPSK解調(diào)模塊代碼library ieee。use 。use 。use 。entity pl_cpsk2 is port(clk :in std_logic。 start :in std_logic。 x :in std_logic。 y :out std_logic)。end pl_cpsk2。architecture rt1 of pl_cpsk2 issignal q:integer range 0 to 3。begin process(clk) begin if clk39。event and clk=39。139。then if start=39。039。 then q=0。 elsif q=0 then q=q+1。 if x=39。139。 then y=39。139。 else y=39。039。 end if。 elsif q=3 then q=0。 else q=0。 end if。 end if。 end process。end rt1。絕對(duì)碼到相對(duì)碼轉(zhuǎn)換代碼library ieee。use 。use 。use 。entity pl_dpsk isport(clk :in std_logic。 start :in std_logic。 x :in std_logic。 y :out std_logic)。end pl_dpsk。architecture rt1 of pl_dpsk issignal q:integer range 0 to 3。signal xx:std_logic。 begin process(clk,x) begin if clk39。event and clk=39。139。 then if start=39。039。 then q=0。 xx=39。039。 elsif q=0 then q=1。 xx=xx xor x。 y=xx xor x。 elsif q=3 then q=0。 else q=q+1。 end if。 end if。 end process。 end rt1。相對(duì)碼到絕對(duì)碼轉(zhuǎn)化代碼 library ieee。use 。use 。use 。entity pl_dpsk2 is port(clk :in std_logic。 start :in std_logic。 x :in std_logic。 y :out std_logic)。end pl_dpsk2。architecture rt1 of pl_dpsk2 issignal q :integer range 0 to 3。signal xx:std_logic。begin process(clk,x) begin if clk39。event and clk=39。139。 then if start=39。039。 then q=0。 elsif q=0 then q=1。 y=xx xor x。 xx=x。 else q=q+1。 end if。 end if。 end process。end rt1。 3