81 lines
2.8 KiB
VHDL
81 lines
2.8 KiB
VHDL
-- altera vhdl_input_version vhdl_2008
|
|
-- XXX: QSYS Fix (https://www.intel.com/content/www/us/en/support/programmable/articles/000079458.html)
|
|
|
|
library ieee;
|
|
use ieee.std_logic_1164.all;
|
|
use ieee.numeric_std.all;
|
|
|
|
-- TODO: Move gen_user_string out of rtps_package?
|
|
use work.rtps_package.all; -- gen_user_string
|
|
|
|
package ros_config is
|
|
|
|
-- Period of ros system clock
|
|
constant ROS_CLOCK_PERIOD : time := 50 ns;
|
|
-- IPv4 Address of ROS System [Default 192.168.0.128]
|
|
constant ROS_ADDRESS : std_logic_vector(IPv4_ADDRESS_WIDTH-1 downto 0) := x"C0A80080";
|
|
-- Random Key used to generate GUIDs
|
|
constant ROS_RAND_KEY : std_logic_vector(47 downto 0) := x"97917E0BA8CF";
|
|
|
|
constant NUM_NODES : natural := 1;
|
|
|
|
constant ROS_NODES : ROS_NODE_ARRAY_TYPE(0 to NUM_NODES-1) := (
|
|
0 => (
|
|
name => gen_user_string("TestNode"),
|
|
namespace => gen_user_string(""),
|
|
domain_id => 1,
|
|
NUM_PUBS => 1,
|
|
NUM_SUBS => 1,
|
|
NUM_SERVICES => 1,
|
|
NUM_ACTIONS => 0
|
|
)
|
|
);
|
|
|
|
constant NUM_PUBS : natural := get_num_pubs(ROS_NODES);
|
|
constant NUM_SUBS : natural := get_num_subs(ROS_NODES);
|
|
constant NUM_SERVICES : natural := get_num_services(ROS_NODES);
|
|
constant NUM_ACTIONS : natural := get_num_actions(ROS_NODES);
|
|
|
|
constant ROS_PUBLICATIONS : ROS_TOPIC_ARRAY_TYPE(0 to NUM_PUBS-1) := (
|
|
0 => (
|
|
node_id => 0,
|
|
TOPICNAME => gen_user_string("Topic1"),
|
|
TYPENAME => gen_user_string("Type1"),
|
|
QOS => ROS_QOS_PROFILE_DEFAULT,
|
|
MAX_SIZE => 10
|
|
)
|
|
);
|
|
|
|
constant ROS_SUBSCRIPTIONS : ROS_TOPIC_ARRAY_TYPE(0 to NUM_SUBS-1) := (
|
|
0 => (
|
|
node_id => 0,
|
|
TOPICNAME => gen_user_string("Topic2"),
|
|
TYPENAME => gen_user_string("Type2"),
|
|
QOS => ROS_QOS_PROFILE_DEFAULT,
|
|
MAX_SIZE => 10
|
|
)
|
|
);
|
|
|
|
constant ROS_SERVICES : ROS_SERVICE_ARRAY_TYPE(0 to NUM_SERVICES-1) := (
|
|
0 => (
|
|
node_id => 0,
|
|
SERVICENAME => gen_user_string("Service1"),
|
|
RQ_TYPENAME => gen_user_string("Type3_Request"),
|
|
RR_TYPENAME => gen_user_string("Type3_Response"),
|
|
QOS => ROS_QOS_PROFILE_SERVICES_DEFAULT,
|
|
MAX_RQ_SIZE => 10,
|
|
MAX_RR_SIZE => 10,
|
|
is_client => FALSE
|
|
)
|
|
);
|
|
|
|
-- TODO
|
|
constant ROS_ACTIONS : ROS_ACTION_ARRAY_TYPE(0 to NUM_ACTIONS-1) := (
|
|
others => (
|
|
node_id => 0
|
|
)
|
|
);
|
|
|
|
-- Defines sensible RTPS timings for simulation
|
|
constant SIMULATION_TIMING : boolean := FALSE;
|
|
end package; |