library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

use work.math_pkg.all;
use work.ros_package.all;
use work.GoalInfo_package;

package Fibonacci_package is
    
    -- GOAL
    constant G_RQ_GOAL_ID_MAX_DEPTH  : natural := GoalInfo_package.GOAL_ID_MAX_DEPTH;
    constant G_RQ_GOAL_ID_ADDR_WIDTH : natural := GoalInfo_package.GOAL_ID_ADDR_WIDTH;
    
    constant G_RQ_MAX_GOAL_ID_SIZE      : natural := GoalInfo_package.MAX_GOAL_ID_SIZE;
    constant G_RQ_MAX_ORDER_SIZE        : natural := 4;
    constant G_RQ_MAX_FIBONACCI_SIZE    : natural := G_RQ_MAX_GOAL_ID_SIZE + G_RQ_MAX_ORDER_SIZE;
    
    constant G_RR_MAX_ACCEPTED              : natural := 1;
    constant G_RR_MAX_STAMP_SEC_SIZE        : natural := GoalInfo_package.MAX_STAMP_SEC_SIZE;
    constant G_RR_MAX_STAMP_NANOSEC_SIZE    : natural := GoalInfo_package.MAX_STAMP_NANOSEC_SIZE;
    constant G_RR_MAX_STAMP_SIZE            : natural := GoalInfo_package.MAX_STAMP_SIZE;
    constant G_RR_MAX_FIBONACCI_SIZE        : natural := G_RR_MAX_ACCEPTED + G_RR_MAX_STAMP_SIZE;
    
    -- RESULT
    constant R_RQ_GOAL_ID_MAX_DEPTH     : natural := GoalInfo_package.GOAL_ID_MAX_DEPTH;
    constant R_RQ_GOAL_ID_ADDR_WIDTH    : natural := GoalInfo_package.GOAL_ID_ADDR_WIDTH;
    
    constant R_RQ_MAX_GOAL_ID_SIZE      : natural := GoalInfo_package.MAX_GOAL_ID_SIZE;
    constant R_RQ_MAX_FIBONACCI_SIZE    : natural := R_RQ_MAX_GOAL_ID_SIZE;
    
    constant R_RR_SEQ_MAX_DEPTH         : natural := 100;
    constant R_RR_SEQ_ADDR_WIDTH        : natural := log2c(R_RR_SEQ_MAX_DEPTH);
    
    constant R_RR_MAX_STATUS_SIZE       : natural := 1;
    constant R_RR_MAX_SEQ_SIZE          : natural := R_RR_SEQ_MAX_DEPTH * 4;
    constant R_RR_MAX_FIBONACCI_SIZE    : natural := R_RR_MAX_STATUS_SIZE + R_RR_MAX_SEQ_SIZE;
    
    -- FEEDBACK
    constant F_GOAL_ID_MAX_DEPTH  : natural := GoalInfo_package.GOAL_ID_MAX_DEPTH;
    constant F_GOAL_ID_ADDR_WIDTH : natural := GoalInfo_package.GOAL_ID_ADDR_WIDTH;
    constant F_SEQ_MAX_DEPTH      : natural := 100;
    constant F_SEQ_ADDR_WIDTH     : natural := log2c(F_SEQ_MAX_DEPTH);
    
    constant F_MAX_GOAL_ID_SIZE   : natural := GoalInfo_package.MAX_GOAL_ID_SIZE;
    constant F_MAX_SEQ_SIZE       : natural := F_SEQ_MAX_DEPTH * 4;
    constant F_MAX_FIBONACCI_SIZE : natural := F_MAX_GOAL_ID_SIZE + F_MAX_SEQ_SIZE;
    
end package;