乐曲硬件演奏电路设计(10)
发布时间:2021-06-11
发布时间:2021-06-11
乐曲演奏广泛用于自动答录装置、手机铃声、集团电话、及智能仪器仪表设备。实现方法有许多种,随着FPGA集成度的提高,价格下降,EDA设计工具更新换代,功能日益普及与流行,使这种方案的应用越来越多。如今的数字逻辑设计者面临日益缩短的上市时间的压力,不得不进行上万门的设计,同时设计者不允许以牺牲硅的效率达到保持结构的独特性。使用现今的EDA软件工具来应付这些问题,并不是一件简单的事情。FPGA预装了很多已构造好的参数
end entity tonetaba;
architecture one of tonetaba is
begin
search:process(index)
begin
case index is
when"0000"=>tone<="11111111111";code<="0000";high<='0';--2047; when"0001"=>tone<="01100000101";code<="0001";high<='0';-- 773; when"0010"=>tone<="01110010000";code<="0010";high<='0';-- 912; when"0011"=>tone<="10000001100";code<="0011";high<='0';--1036; when"0101"=>tone<="10010101101";code<="0101";high<='0';--1197; when"0110"=>tone<="10100001010";code<="0110";high<='1';--1290; when"0111"=>tone<="10101011100";code<="0111";high<='1';--1372; when"1000"=>tone<="10110000010";code<="0001";high<='1';--1410; when"1001"=>tone<="10111001000";code<="0010";high<='1';--1480; when"1010"=>tone<="11000000110";code<="0011";high<='1';--1542; when"1100"=>tone<="11001010110";code<="0101";high<='1';--1622; when"1101"=>tone<="11010000100";code<="0110";high<='1';--1668; when"1111"=>tone<="11011000000";code<="0001";high<='1';--1728; when others=>null;
end case;
end process;
end one;
模块的功能是输出各个音符所对应的分频预置数,当index是“0000”,