OpenCores
URL https://opencores.org/ocsvn/artificial_neural_network/artificial_neural_network/trunk

Subversion Repositories artificial_neural_network

[/] [artificial_neural_network/] [trunk/] [ANN_kernel/] [RTL_VHDL_files/] [activation_function.vhd] - Diff between revs 8 and 9

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 8 Rev 9
Line 40... Line 40...
   );
   );
end activation_function;
end activation_function;
 
 
architecture Structural of activation_function is
architecture Structural of activation_function is
 
 
component af_sigmoid is
 
   generic
 
   (
 
      Nbit : natural := 8
 
   );
 
   port
 
   (
 
      reset   : in  std_logic;
 
      clk     : in  std_logic;
 
      run_in  : in  std_logic; -- Start and input data validation
 
      inputs  : in  std_logic_vector(Nbit-1 downto 0); -- Input data
 
      run_out : out std_logic; -- Output data validation, run_in for the next layer
 
      outputs : out std_logic_vector(Nbit-1 downto 0) -- Output data
 
   );
 
end component;
 
 
 
begin
begin
 
 
-- Linear activation function. It is a direct assignment:
-- Linear activation function. It is a direct assignment:
linear_f:
linear_f:
   if (f_type = "linear") generate
   if (f_type = "linear") generate
Line 68... Line 52...
   end generate;
   end generate;
 
 
-- Example 1: sigmoid activation function implemented as a Look-Up-Table (LUT):
-- Example 1: sigmoid activation function implemented as a Look-Up-Table (LUT):
Sigmoid_f:
Sigmoid_f:
   if (f_type = "siglut") generate
   if (f_type = "siglut") generate
      siglut_inst: af_sigmoid
      siglut_inst: entity work.af_sigmoid
         generic map
         generic map
         (
         (
            Nbit => Nbit
            Nbit => Nbit
         )
         )
         port map
         port map

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.