中文说明:用查找表的方式实现了sigmoid函数的verilog实现,sigmoid函数的特点是关于(0,0.5)奇对称,只用matlab求出自变量大于0的函数值,小于0的函数值可以由1-f(x)得到。导函数关于y轴偶对称,由f(x)乘以f(-x)即可得到。使用matlab生成mif文件,再调用quartus2中的rom核,把mif文件添加进去,仿真即可.
English Description:
The sigmoid function is characterized by (0,0.5) odd symmetry. We only use matlab to calculate the function value of the independent variable greater than 0, and the function value less than 0 can be obtained by 1-f (x). The derivative function is even symmetric about the Y axis, which can be obtained by multiplying f (x) by F (- x). Use matlab to generate MIF file, and then call the ROM core in quartus2 to add MIF file to the simulation