摘要
以浮点数为基础,首先对色度学基本公式进行化简,使程序更为简洁,并节省硬件资源.随后按照自顶向下的系统设计流程,采用模块化设计方法,利用Verilog HDL语言设计硬件电路,对64位双精度浮点数运算模块进行设计.利用仿真软件对3个模块分别进行功能仿真,给出功能仿真图和仿真实数显示图.在通过仿真验证之后,采取调用运算模块的方法将各个模块组合起来进行系统的设计和仿真.为了验证程序的正确性,选用Mat-lab软件进行算法验证.通过对比两组结果发现:Modelsim程序的输出结果由于受到位数的限制,最终只能精确到小数点后第6位,而Matlab的输出结果位数可以精确到小数点后第14位,但两组结果在同时保留6位小数的情况下可以保证数值的一致性.因此,浮点数运算模块误差较小,具有较高的可行性和可靠性,适合在进一步设计中加以应用.
Based on the floating-point numbers,the basic formulas of colorimetry should be simplified,and it would make the expressions simpler.This would not only make the procedures more concise,but also save the hardware resources.Then based on top-down system design flow and modulization method,using Verilog hardware description language,the hardware circuit is designed.Each mathematical module designs their logic circuits with 64-bit double-precision floating-point numbers.Three operation modules are performed the functional simulation,the functional simulation in wave windows and the functional simulation in transcript are given.After the simulation,addition,multiplication and division would be applied for the method of invoking the operation module while systematic design and simulation is carried on.Matlab is used for verification of algorithm.Eventually,by comparing the outputs of the two procedures,the outputs of Modelsim software are restricted,and can be accurate to the sixth decimal,while the outputs of Matlab software can be accurate to the fourteenth decimal.However,the two groups of results will keep their numbers consistent in the same range.Consequently,the simulation results show that the designs of floating-point basic operations have small margin of error,remain high feasibility and reliability,and still can be widely used in the future.
出处
《天津师范大学学报(自然科学版)》
CAS
北大核心
2011年第2期51-54,共4页
Journal of Tianjin Normal University:Natural Science Edition
基金
教育部高等学校博士学科点专项科研基金资助项目(20070080001)