02-25-2019 02:42 PM
i want to write mathematical equation using ROM block in system generator:
log sigmoid function f(x)=1/(1+exp(-x)) and tan sigmoid function
f(x) = [(2 / (1+exp(-2x))-1].
I tried to apply the formula, i put in Initial value vector these vector:
1./(1+exp(-1.*(0:255))) and tanh([0:255]*5/256) sur 8 bit.
the objective is to obtain the positive part of the two fuctions between[0,5].
I don't know if i think correctly or not, some one can help me please?
Thanks in advance
02-25-2019 02:50 PM
You can make a ROM two ways....
1) For small ROMs it may be simplest to declare an array and populate it with the constants right in the HDL
2) For larger (or changing) ROMs... create a 'coe' file with the values you want to put in your ROM (e.g. make a program to create a COE file using your iterated formula, then use the COE to initialize the ROM
Hope that helps
If so, please mark as solution accepted. Kudos also welcomed. :-)
02-26-2019 01:24 AM
thanks for your quick reply, but i don't understand what should i do?
i want to realise this design(capture)
with these parameters of ROM(capture1)
and the scope was affiched this result(capture2)