121 lines
5.8 KiB
VHDL
121 lines
5.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;
|
|
|
|
use work.math_pkg.all;
|
|
use work.rtps_package.all;
|
|
use work.user_config.all;
|
|
use work.rtps_config_package.all;
|
|
use work.Type1_package.all;
|
|
|
|
entity dds_writer_syn is
|
|
port (
|
|
-- SYSTEM
|
|
clk : in std_logic;
|
|
reset : in std_logic;
|
|
time : in TIME_TYPE;
|
|
-- TO/FROM RTPS ENDPOINT
|
|
start_rtps : in std_logic;
|
|
opcode_rtps : in HISTORY_CACHE_OPCODE_TYPE;
|
|
ack_rtps : out std_logic;
|
|
done_rtps : out std_logic;
|
|
ret_rtps : out HISTORY_CACHE_RESPONSE_TYPE;
|
|
seq_nr_rtps : in SEQUENCENUMBER_TYPE;
|
|
get_data_rtps : in std_logic;
|
|
data_out_rtps : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
|
valid_out_rtps : out std_logic;
|
|
ready_out_rtps : in std_logic;
|
|
last_word_out_rtps : out std_logic;
|
|
liveliness_assertion : out std_logic;
|
|
data_available : out std_logic;
|
|
-- Cache Change
|
|
cc_instance_handle : out INSTANCE_HANDLE_TYPE;
|
|
cc_kind : out CACHE_CHANGE_KIND_TYPE;
|
|
cc_source_timestamp : out TIME_TYPE;
|
|
cc_seq_nr : out SEQUENCENUMBER_TYPE;
|
|
-- TO/FROM USER ENTITY
|
|
start_dds : in std_logic;
|
|
ack_dds : out std_logic;
|
|
opcode_dds : in DDS_WRITER_OPCODE_TYPE;
|
|
instance_handle_in_dds : in INSTANCE_HANDLE_TYPE;
|
|
source_ts_dds : in TIME_TYPE;
|
|
max_wait_dds : in DURATION_TYPE;
|
|
done_dds : out std_logic;
|
|
return_code_dds : out std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
|
instance_handle_out_dds : out INSTANCE_HANDLE_TYPE;
|
|
ready_in_dds : out std_logic;
|
|
valid_in_dds : in std_logic;
|
|
data_in_dds : in std_logic_vector(WORD_WIDTH-1 downto 0);
|
|
last_word_in_dds : in std_logic;
|
|
ready_out_dds : in std_logic;
|
|
valid_out_dds : out std_logic;
|
|
data_out_dds : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
|
last_word_out_dds : out std_logic;
|
|
-- Communication Status
|
|
status : out std_logic_vector(STATUS_KIND_WIDTH-1 downto 0)
|
|
);
|
|
end entity;
|
|
|
|
architecture arch of dds_writer_syn is
|
|
begin
|
|
|
|
if_gen : if (NUM_WRITERS > 0) generate
|
|
syn_inst : entity work.dds_writer(arch)
|
|
generic map (
|
|
HISTORY_QOS => ENDPOINT_CONFIG(NUM_READERS).HISTORY_QOS,
|
|
DEADLINE_QOS => ENDPOINT_CONFIG(NUM_READERS).DEADLINE_QOS,
|
|
LIFESPAN_QOS => ENDPOINT_CONFIG(NUM_READERS).LIFESPAN_QOS,
|
|
LEASE_DURATION => ENDPOINT_CONFIG(NUM_READERS).LEASE_DURATION,
|
|
WITH_KEY => ENDPOINT_CONFIG(NUM_READERS).WITH_KEY,
|
|
MAX_SAMPLES => ENDPOINT_CONFIG(NUM_READERS).MAX_SAMPLES,
|
|
MAX_INSTANCES => ENDPOINT_CONFIG(NUM_READERS).MAX_INSTANCES,
|
|
MAX_SAMPLES_PER_INSTANCE => ENDPOINT_CONFIG(NUM_READERS).MAX_SAMPLES_PER_INSTANCE,
|
|
PAYLOAD_FRAME_SIZE => MAX_TYPE1_SIZE
|
|
)
|
|
port map (
|
|
clk => clk,
|
|
reset => reset,
|
|
time => time,
|
|
start_rtps => start_rtps,
|
|
opcode_rtps => opcode_rtps,
|
|
ack_rtps => ack_rtps,
|
|
done_rtps => done_rtps,
|
|
ret_rtps => ret_rtps,
|
|
seq_nr_rtps => seq_nr_rtps,
|
|
get_data_rtps => get_data_rtps,
|
|
data_out_rtps => data_out_rtps,
|
|
valid_out_rtps => valid_out_rtps,
|
|
ready_out_rtps => ready_out_rtps,
|
|
last_word_out_rtps => last_word_out_rtps,
|
|
liveliness_assertion => liveliness_assertion,
|
|
data_available => data_available,
|
|
cc_instance_handle => cc_instance_handle,
|
|
cc_kind => cc_kind,
|
|
cc_source_timestamp => cc_source_timestamp,
|
|
cc_seq_nr => cc_seq_nr,
|
|
start_dds => start_dds,
|
|
ack_dds => ack_dds,
|
|
opcode_dds => opcode_dds,
|
|
instance_handle_in_dds => instance_handle_in_dds,
|
|
source_ts_dds => source_ts_dds,
|
|
max_wait_dds => max_wait_dds,
|
|
done_dds => done_dds,
|
|
return_code_dds => return_code_dds,
|
|
instance_handle_out_dds => instance_handle_out_dds,
|
|
ready_in_dds => ready_in_dds,
|
|
valid_in_dds => valid_in_dds,
|
|
data_in_dds => data_in_dds,
|
|
last_word_in_dds => last_word_in_dds,
|
|
ready_out_dds => ready_out_dds,
|
|
valid_out_dds => valid_out_dds,
|
|
data_out_dds => data_out_dds,
|
|
last_word_out_dds => last_word_out_dds,
|
|
status => status
|
|
);
|
|
end generate;
|
|
|
|
end architecture;
|