一種DDS的優(yōu)化設(shè)計(jì)
architecture Behavioral of rom is
signal sin:STD_LOGIC_VECTOR(8 downto 0);
signal temp:STD_LOGIC_VECTOR(5 downto 0);
begin
temp=phase when MSB-1=′0′ else
not phase;
process(temp)
begin
case temp is
when ″000000″=>
sin=″000000000″;
…… --正弦查找表由MATLAB生成
end case;
end process;
data_out=″0″ sin when MSB=′0′ else
″1″ not sin+″000000001″;
end Behavioral;
2.3 同步接口電路設(shè)計(jì)
在使用DDS時(shí),需要為其提供頻率控制字K的值,一般通過(guò)中央控制單元MCU來(lái)完成,其以數(shù)據(jù)總線(xiàn)及寫(xiě)時(shí)鐘信號(hào)的方式與FPGA內(nèi)的DDS實(shí)體進(jìn)行通訊,同時(shí)DDS在FPGA內(nèi)部又是在本地時(shí)鐘fc驅(qū)動(dòng)下運(yùn)行。由于MCU的寫(xiě)時(shí)鐘和FPGA內(nèi)的本地時(shí)鐘異步,兩者之間進(jìn)行通訊難免存在數(shù)據(jù)不穩(wěn)等問(wèn)題,特別是在通訊速度較高時(shí),這一異步接口問(wèn)題會(huì)更加突出。為了實(shí)現(xiàn)異步接口的同步化,本文提出了如圖3所示的接口同步電路。
評(píng)論