cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rahma1920
Observer
Observer
501 Views
Registered: ‎01-06-2019

implementation of a ROM

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

Tags (1)
0 Kudos
2 Replies
xilinxacct
Instructor
Instructor
497 Views
Registered: ‎10-23-2018

@rahma1920 

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. :-)

0 Kudos
rahma1920
Observer
Observer
453 Views
Registered: ‎01-06-2019

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)

Capture.PNG
Capture1.PNG
Capture2.PNG
0 Kudos