Re: piecewise function



dilou wrote:
I need your help for implementing the pwl in FPGA using VHDL. In a
study I have found this approximation of the sigmoid function:

It can be approximate it at:
y(v) = mi( v-vi-1) + ni-1 , v <> [ vi-1, vi]
ni = mi ( vi - vi-1 ) + ni-1, i=1,2,3,...
with v0=0, n0=0



i : number of sections of the interval of (v) of the function
yi : linear approximation of the function in the section i
mi : slope in the section i
ni : ordered in the origin of section i



It said that the hardware for implementing this version is:
· comparators to determinate the area,
· multipliers,
· the sumator and a set of registers to save the differents valors
of slope and displacement and the mi and ni.

My problem is:

I don't know how can I choose the slope and the interval, also if
this method is best or no?
Mu project is to implement a Hopfield network with the pwl function
instead of the look up table function.

I think you should look at my other reply. A sequence of the sort:
if (value >= v0 and value < v1) then
-- Use region v0 to v1 slope and intercept to calculate
elsif (value >= v1 and value < v2) then
-- Use region v1 to v2 slope and intercept
elsif (...
-- Last region
end if;

will generate comparators to check "value" against the v0, v1, ... vn
numbers and the sections in between you will multiply and add numbers to
get to the output. As far as I can tell, that will generate
comparators, multipliers, and a summation structures.

Apart from this, I don't know what more to tell you. If the syntax
looks unfamiliar, I would advise cracking open a book on VHDL.

Best regards,
Mark Norton

--
==============================
Mark Norton <markn@xxxxxxxxxx>
Concept Development, Inc.
http://www.cdvinc.com
.



Relevant Pages

  • Re: Unicycling Theory
    ... maestro8 wrote: ... approximation is no where near what occurs in reality. ... constant (or in holding the unicycle stationary on the slope). ... Convince me I am wrong about that? ...
    (rec.sport.unicycling)
  • A small numerical error of A. Einstein
    ... I seem to have discovered a small numerical error in Einstein's ... and then to approximate the coefficients: ... coefficient, -0.186, representing the slope of a linear approximation. ...
    (sci.physics.research)
  • Re: how to determine the center or foci of an ellipse from a slope
    ... the slope which is tangent to some ellipse. ... approximation and go some delta along the normal direction. ... P2on the second interpolated curve. ...
    (comp.soft-sys.matlab)
  • Re: how to determine the center or foci of an ellipse from a slope
    ... the slope which is tangent to some ellipse. ... approximation and go some delta along the normal direction. ... P2on the second interpolated curve. ...
    (comp.soft-sys.matlab)
  • RE: Regressions with data in (changing) rows
    ... Columns M to V contain the Z1 to Z10 for each date. ... I know how to get the intercept and slope (using INTERCEPT and SLOPE, ... or LINEST) if I just regress Y on X or Y on Z only. ...
    (microsoft.public.excel.misc)