Redesign Interface and Instance Handle Responses of dds_writer
The REGISTER_INSTANCE and LOOKUP_INSTANCE DDS Writer Operations return an Instance Handle. Until now this instance Handle was returned via the Data output interface of the dds_writer (ready_out, valid_out, data_out_last_word_out). This was changed, so that the dds_writer directly outputs the Instance Handle via a dedicated port while asserting the done Signal. This has the result that the <TYPENAME>_writer_wrapper no longer "exports" data out signals from the dds_writer. All relevant instantiations and testcases are changed accordingly
This commit is contained in:
parent
830d6c1409
commit
ddc331d9ba
@ -7,7 +7,6 @@ use ieee.numeric_std.all;
|
||||
|
||||
use work.rtps_package.all;
|
||||
use work.rtps_config_package.all;
|
||||
use work.Type2_package.all;
|
||||
|
||||
entity Type2_reader_wrapper is
|
||||
port (
|
||||
@ -36,7 +35,7 @@ entity Type2_reader_wrapper is
|
||||
si_instance_state_dds : in std_logic_vector(INSTANCE_STATE_KIND_WIDTH-1 downto 0);
|
||||
si_source_timestamp_dds : in TIME_TYPE;
|
||||
si_instance_handle_dds : in INSTANCE_HANDLE_TYPE;
|
||||
si_publication_handle_dds : in PUBLICATION_HANDLE_TYPE;
|
||||
si_publication_handle_dds : in INSTANCE_HANDLE_TYPE;
|
||||
si_disposed_generation_count_dds : in std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0);
|
||||
si_no_writers_generation_count_dds : in std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0);
|
||||
si_sample_rank_dds : in std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0);
|
||||
@ -173,7 +172,7 @@ begin
|
||||
begin
|
||||
-- DEFAULT
|
||||
stage_next <= stage;
|
||||
decode_stage_next <= decode_stage;
|
||||
decode_stage_next <= decode_stage;
|
||||
return_stage_next <= return_stage;
|
||||
cnt_next <= cnt;
|
||||
endian_flag_next <= endian_flag;
|
||||
|
||||
@ -7,7 +7,6 @@ use ieee.numeric_std.all;
|
||||
|
||||
use work.rtps_package.all;
|
||||
use work.rtps_config_package.all;
|
||||
use work.Type2_package.all;
|
||||
|
||||
entity Type2_writer_wrapper is
|
||||
generic (
|
||||
@ -15,49 +14,47 @@ entity Type2_writer_wrapper is
|
||||
);
|
||||
port (
|
||||
-- SYSTEM
|
||||
clk : in std_logic;
|
||||
reset : in std_logic;
|
||||
clk : in std_logic;
|
||||
reset : in std_logic;
|
||||
-- FROM DDS WRITER
|
||||
start_dds : out std_logic;
|
||||
ack_dds : in std_logic;
|
||||
opcode_dds : out DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_dds : out INSTANCE_HANDLE_TYPE;
|
||||
source_ts_dds : out TIME_TYPE;
|
||||
max_wait_dds : out DURATION_TYPE;
|
||||
done_dds : in std_logic;
|
||||
return_code_dds : in std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
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;
|
||||
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;
|
||||
start_dds : out std_logic;
|
||||
ack_dds : in std_logic;
|
||||
opcode_dds : out DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_out_dds : out INSTANCE_HANDLE_TYPE;
|
||||
source_ts_dds : out TIME_TYPE;
|
||||
max_wait_dds : out DURATION_TYPE;
|
||||
done_dds : in std_logic;
|
||||
return_code_dds : in std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
instance_handle_in_dds : in INSTANCE_HANDLE_TYPE;
|
||||
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;
|
||||
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;
|
||||
-- Communication Status
|
||||
status_dds : in std_logic_vector(STATUS_KIND_WIDTH-1 downto 0);
|
||||
status_dds : in std_logic_vector(STATUS_KIND_WIDTH-1 downto 0);
|
||||
|
||||
-- TO USER ENTITY
|
||||
start_user : in std_logic;
|
||||
ack_user : out std_logic;
|
||||
opcode_user : in DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_user : in INSTANCE_HANDLE_TYPE;
|
||||
source_ts_user : in TIME_TYPE;
|
||||
max_wait_user : in DURATION_TYPE;
|
||||
done_user : out std_logic;
|
||||
return_code_user : out std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
ready_out_user : in std_logic;
|
||||
valid_out_user : out std_logic;
|
||||
data_out_user : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
last_word_out_user : out std_logic;
|
||||
start_user : in std_logic;
|
||||
ack_user : out std_logic;
|
||||
opcode_user : in DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_in_user : in INSTANCE_HANDLE_TYPE;
|
||||
source_ts_user : in TIME_TYPE;
|
||||
max_wait_user : in DURATION_TYPE;
|
||||
done_user : out std_logic;
|
||||
return_code_user : out std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
instance_handle_out_user : out INSTANCE_HANDLE_TYPE;
|
||||
-- Communication Status
|
||||
status_user : out std_logic_vector(STATUS_KIND_WIDTH-1 downto 0);
|
||||
status_user : out std_logic_vector(STATUS_KIND_WIDTH-1 downto 0);
|
||||
|
||||
-- ###GENERATED START###
|
||||
-- TYPE SPECIFIC PORTS
|
||||
-- ###GENERATED END###
|
||||
|
||||
encode_done : out std_logic
|
||||
encode_done : out std_logic
|
||||
);
|
||||
end entity;
|
||||
|
||||
@ -93,19 +90,16 @@ begin
|
||||
-- ###GENERATED END###
|
||||
|
||||
-- PASSTHROUGH
|
||||
start_dds <= start_user;
|
||||
ack_user <= ack_dds;
|
||||
opcode_dds <= opcode_user;
|
||||
instance_handle_dds <= instance_handle_user;
|
||||
source_ts_dds <= source_ts_user;
|
||||
max_wait_dds <= max_wait_user;
|
||||
done_user <= done_dds;
|
||||
return_code_user <= return_code_dds;
|
||||
ready_in_dds <= ready_out_user;
|
||||
valid_out_user <= valid_in_dds;
|
||||
data_out_user <= data_in_dds;
|
||||
last_word_out_user <= last_word_in_dds;
|
||||
status_user <= status_dds;
|
||||
start_dds <= start_user;
|
||||
ack_user <= ack_dds;
|
||||
opcode_dds <= opcode_user;
|
||||
instance_handle_out_dds <= instance_handle_in_user;
|
||||
source_ts_dds <= source_ts_user;
|
||||
max_wait_dds <= max_wait_user;
|
||||
done_user <= done_dds;
|
||||
return_code_user <= return_code_dds;
|
||||
instance_handle_out_user <= instance_handle_in_dds;
|
||||
status_user <= status_dds;
|
||||
|
||||
-- ###GENERATED START###
|
||||
-- PORT SIGNAL CONNECTIONS
|
||||
|
||||
@ -87,7 +87,7 @@ architecture testbench of L0_dds_writer_test1_afk is
|
||||
constant MAX_REMOTE_ENDPOINTS : natural := 3;
|
||||
|
||||
-- *TYPE DECLARATION*
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK);
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE);
|
||||
type RTPS_STAGE_TYPE is (IDLE, START, DONE, CHECK);
|
||||
type RTPS_WRITER_TEST_TYPE is record
|
||||
opcode : HISTORY_CACHE_OPCODE_TYPE;
|
||||
@ -125,7 +125,7 @@ architecture testbench of L0_dds_writer_test1_afk is
|
||||
signal get_data_rtps, liveliness_assertion, data_available : std_logic := '0';
|
||||
signal cc_source_timestamp, source_ts_dds : TIME_TYPE := TIME_INVALID;
|
||||
signal cc_kind : CACHE_CHANGE_KIND_TYPE := ALIVE;
|
||||
signal cc_instance_handle, instance_handle_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal cc_instance_handle, instance_handle_in_dds, instance_handle_out_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal max_wait_dds : DURATION_TYPE := DURATION_INFINITE;
|
||||
signal return_code_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := (others => '0');
|
||||
signal status : std_logic_vector(STATUS_KIND_WIDTH-1 downto 0) := (others => '0');
|
||||
@ -136,7 +136,7 @@ architecture testbench of L0_dds_writer_test1_afk is
|
||||
signal rtps_stage : RTPS_STAGE_TYPE := IDLE;
|
||||
shared variable dds : DDS_TEST_TYPE := DEFAULT_DDS_TEST;
|
||||
shared variable rtps : RTPS_WRITER_TEST_TYPE := DEFAULT_RTPS_WRITER_TEST;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id : AlertLogIDType;
|
||||
signal inst_id, kind_id, sn_id, ts_id, ih_id, ret_id, data_id : AlertLogIDType;
|
||||
|
||||
-- *FUNCTION DECLARATION*
|
||||
function extract_key_hash (payload : TEST_PACKET_TYPE) return INSTANCE_HANDLE_TYPE is
|
||||
@ -196,11 +196,12 @@ begin
|
||||
start_dds => start_dds,
|
||||
ack_dds => ack_dds,
|
||||
opcode_dds => opcode_dds,
|
||||
instance_handle_dds => instance_handle_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,
|
||||
@ -296,6 +297,7 @@ begin
|
||||
kind_id <= GetAlertLogID("Cache Change Kind", ALERTLOG_BASE_ID);
|
||||
sn_id <= GetAlertLogID("SequenceNumber", ALERTLOG_BASE_ID);
|
||||
ts_id <= GetAlertLogID("TimeStamp", ALERTLOG_BASE_ID);
|
||||
ih_id <= GetAlertLogID("Instance Handle", ALERTLOG_BASE_ID);
|
||||
data_id <= GetAlertLogID("Data Out", ALERTLOG_BASE_ID);
|
||||
ret_id <= GetAlertLogID("Return Code", ALERTLOG_BASE_ID);
|
||||
|
||||
@ -1987,32 +1989,16 @@ begin
|
||||
if (dds_cnt = dds.cc.payload.length-1) then
|
||||
-- DEFAULT
|
||||
dds_stage <= DONE;
|
||||
|
||||
case (dds.opcode) is
|
||||
when REGISTER_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when LOOKUP_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when DONE =>
|
||||
if (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_dds = '1') then
|
||||
AffirmIfEqual(data_id, data_out_dds, dds.cc.instance(dds_cnt));
|
||||
dds_cnt <= dds_cnt + 1;
|
||||
if (dds_cnt = 3) then
|
||||
AlertIf(data_id, last_word_out_dds /= '1', "Last Word Signal not pulled High", ERROR);
|
||||
dds_stage <= IDLE;
|
||||
if (dds.opcode = REGISTER_INSTANCE or dds.opcode = LOOKUP_INSTANCE) then
|
||||
AffirmIfEqual(ih_id, to_unsigned(instance_handle_out_dds), to_unsigned(dds.cc.instance));
|
||||
else
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
end if;
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
end case;
|
||||
end if;
|
||||
@ -2023,7 +2009,7 @@ begin
|
||||
valid_in_dds <= '0';
|
||||
last_word_in_dds <= '0';
|
||||
data_in_dds <= (others => '0');
|
||||
instance_handle_dds <= HANDLE_NIL;
|
||||
instance_handle_in_dds <= HANDLE_NIL;
|
||||
source_ts_dds <= TIME_INVALID;
|
||||
ready_out_dds <= '0';
|
||||
|
||||
@ -2031,14 +2017,12 @@ begin
|
||||
when START =>
|
||||
start_dds <= '1';
|
||||
opcode_dds <= dds.opcode;
|
||||
instance_handle_dds <= dds.cc.instance;
|
||||
instance_handle_in_dds <= dds.cc.instance;
|
||||
source_ts_dds <= dds.cc.src_timestamp;
|
||||
when PUSH =>
|
||||
valid_in_dds <= '1';
|
||||
data_in_dds <= dds.cc.payload.data(dds_cnt);
|
||||
last_word_in_dds <= dds.cc.payload.last(dds_cnt);
|
||||
when CHECK =>
|
||||
ready_out_dds <= '1';
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
@ -2085,7 +2069,7 @@ begin
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_rtps = '1') then
|
||||
AffirmIfEqual(data_id, last_word_out_rtps & data_out_rtps, rtps.cc.payload.last(rtps_cnt) & rtps.cc.payload.data(rtps_cnt));
|
||||
AffirmIfEqual(ih_id, last_word_out_rtps & data_out_rtps, rtps.cc.payload.last(rtps_cnt) & rtps.cc.payload.data(rtps_cnt));
|
||||
rtps_cnt <= rtps_cnt + 1;
|
||||
if (rtps_cnt = rtps.cc.payload.length-1) then
|
||||
rtps_stage <= IDLE;
|
||||
|
||||
@ -87,7 +87,7 @@ architecture testbench of L0_dds_writer_test1_aik is
|
||||
constant MAX_REMOTE_ENDPOINTS : natural := 3;
|
||||
|
||||
-- *TYPE DECLARATION*
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK);
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE);
|
||||
type RTPS_STAGE_TYPE is (IDLE, START, DONE, CHECK);
|
||||
|
||||
-- *SIGNAL DECLARATION*
|
||||
@ -105,7 +105,7 @@ architecture testbench of L0_dds_writer_test1_aik is
|
||||
signal get_data_rtps, liveliness_assertion, data_available : std_logic := '0';
|
||||
signal cc_source_timestamp, source_ts_dds : TIME_TYPE := TIME_INVALID;
|
||||
signal cc_kind : CACHE_CHANGE_KIND_TYPE := ALIVE;
|
||||
signal cc_instance_handle, instance_handle_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal cc_instance_handle, instance_handle_in_dds, instance_handle_out_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal max_wait_dds : DURATION_TYPE := DURATION_INFINITE;
|
||||
signal return_code_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := (others => '0');
|
||||
signal status : std_logic_vector(STATUS_KIND_WIDTH-1 downto 0) := (others => '0');
|
||||
@ -116,7 +116,7 @@ architecture testbench of L0_dds_writer_test1_aik is
|
||||
signal rtps_stage : RTPS_STAGE_TYPE := IDLE;
|
||||
shared variable dds : DDS_WRITER_TEST_TYPE := DEFAULT_DDS_WRITER_TEST;
|
||||
shared variable rtps : RTPS_WRITER_TEST_TYPE := DEFAULT_RTPS_WRITER_TEST;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id : AlertLogIDType;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id, ih_id : AlertLogIDType;
|
||||
|
||||
-- *FUNCTION DECLARATION*
|
||||
function extract_key_hash (payload : TEST_PACKET_TYPE) return INSTANCE_HANDLE_TYPE is
|
||||
@ -176,11 +176,12 @@ begin
|
||||
start_dds => start_dds,
|
||||
ack_dds => ack_dds,
|
||||
opcode_dds => opcode_dds,
|
||||
instance_handle_dds => instance_handle_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,
|
||||
@ -276,6 +277,7 @@ begin
|
||||
kind_id <= GetAlertLogID("Cache Change Kind", ALERTLOG_BASE_ID);
|
||||
sn_id <= GetAlertLogID("SequenceNumber", ALERTLOG_BASE_ID);
|
||||
ts_id <= GetAlertLogID("TimeStamp", ALERTLOG_BASE_ID);
|
||||
ih_id <= GetAlertLogID("Instance Handle", ALERTLOG_BASE_ID);
|
||||
data_id <= GetAlertLogID("Data Out", ALERTLOG_BASE_ID);
|
||||
ret_id <= GetAlertLogID("Return Code", ALERTLOG_BASE_ID);
|
||||
|
||||
@ -1967,32 +1969,16 @@ begin
|
||||
if (dds_cnt = dds.cc.payload.length-1) then
|
||||
-- DEFAULT
|
||||
dds_stage <= DONE;
|
||||
|
||||
case (dds.opcode) is
|
||||
when REGISTER_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when LOOKUP_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when DONE =>
|
||||
if (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_dds = '1') then
|
||||
AffirmIfEqual(data_id, data_out_dds, dds.cc.instance(dds_cnt));
|
||||
dds_cnt <= dds_cnt + 1;
|
||||
if (dds_cnt = 3) then
|
||||
AlertIf(data_id, last_word_out_dds /= '1', "Last Word Signal not pulled High", ERROR);
|
||||
dds_stage <= IDLE;
|
||||
if (dds.opcode = REGISTER_INSTANCE or dds.opcode = LOOKUP_INSTANCE) then
|
||||
AffirmIfEqual(ih_id, to_unsigned(instance_handle_out_dds), to_unsigned(dds.cc.instance));
|
||||
else
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
end if;
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
end case;
|
||||
end if;
|
||||
@ -2003,7 +1989,7 @@ begin
|
||||
valid_in_dds <= '0';
|
||||
last_word_in_dds <= '0';
|
||||
data_in_dds <= (others => '0');
|
||||
instance_handle_dds <= HANDLE_NIL;
|
||||
instance_handle_in_dds <= HANDLE_NIL;
|
||||
source_ts_dds <= TIME_INVALID;
|
||||
ready_out_dds <= '0';
|
||||
|
||||
@ -2011,14 +1997,12 @@ begin
|
||||
when START =>
|
||||
start_dds <= '1';
|
||||
opcode_dds <= dds.opcode;
|
||||
instance_handle_dds <= dds.cc.instance;
|
||||
instance_handle_in_dds <= dds.cc.instance;
|
||||
source_ts_dds <= dds.cc.src_timestamp;
|
||||
when PUSH =>
|
||||
valid_in_dds <= '1';
|
||||
data_in_dds <= dds.cc.payload.data(dds_cnt);
|
||||
last_word_in_dds <= dds.cc.payload.last(dds_cnt);
|
||||
when CHECK =>
|
||||
ready_out_dds <= '1';
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
|
||||
@ -60,7 +60,7 @@ architecture testbench of L0_dds_writer_test1_ain is
|
||||
constant MAX_REMOTE_ENDPOINTS : natural := 3;
|
||||
|
||||
-- *TYPE DECLARATION*
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK);
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE);
|
||||
type RTPS_STAGE_TYPE is (IDLE, START, DONE, CHECK);
|
||||
|
||||
-- *SIGNAL DECLARATION*
|
||||
@ -78,7 +78,7 @@ architecture testbench of L0_dds_writer_test1_ain is
|
||||
signal get_data_rtps, liveliness_assertion, data_available : std_logic := '0';
|
||||
signal cc_source_timestamp, source_ts_dds : TIME_TYPE := TIME_INVALID;
|
||||
signal cc_kind : CACHE_CHANGE_KIND_TYPE := ALIVE;
|
||||
signal cc_instance_handle, instance_handle_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal cc_instance_handle, instance_handle_in_dds, instance_handle_out_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal max_wait_dds : DURATION_TYPE := DURATION_INFINITE;
|
||||
signal return_code_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := (others => '0');
|
||||
signal status : std_logic_vector(STATUS_KIND_WIDTH-1 downto 0) := (others => '0');
|
||||
@ -89,7 +89,7 @@ architecture testbench of L0_dds_writer_test1_ain is
|
||||
signal rtps_stage : RTPS_STAGE_TYPE := IDLE;
|
||||
shared variable dds : DDS_WRITER_TEST_TYPE := DEFAULT_DDS_WRITER_TEST;
|
||||
shared variable rtps : RTPS_WRITER_TEST_TYPE := DEFAULT_RTPS_WRITER_TEST;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id : AlertLogIDType;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ih_id, ret_id : AlertLogIDType;
|
||||
|
||||
-- *FUNCTION DECLARATION*
|
||||
function extract_key_hash (payload : TEST_PACKET_TYPE) return INSTANCE_HANDLE_TYPE is
|
||||
@ -149,11 +149,12 @@ begin
|
||||
start_dds => start_dds,
|
||||
ack_dds => ack_dds,
|
||||
opcode_dds => opcode_dds,
|
||||
instance_handle_dds => instance_handle_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,
|
||||
@ -248,6 +249,7 @@ begin
|
||||
kind_id <= GetAlertLogID("Cache Change Kind", ALERTLOG_BASE_ID);
|
||||
sn_id <= GetAlertLogID("SequenceNumber", ALERTLOG_BASE_ID);
|
||||
ts_id <= GetAlertLogID("TimeStamp", ALERTLOG_BASE_ID);
|
||||
ih_id <= GetAlertLogID("Instance Handle", ALERTLOG_BASE_ID);
|
||||
data_id <= GetAlertLogID("Data Out", ALERTLOG_BASE_ID);
|
||||
ret_id <= GetAlertLogID("Return Code", ALERTLOG_BASE_ID);
|
||||
|
||||
@ -889,17 +891,6 @@ begin
|
||||
if (dds_cnt = dds.cc.payload.length-1) then
|
||||
-- DEFAULT
|
||||
dds_stage <= DONE;
|
||||
|
||||
case (dds.opcode) is
|
||||
when REGISTER_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when LOOKUP_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
end if;
|
||||
elsif (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
@ -907,17 +898,12 @@ begin
|
||||
end if;
|
||||
when DONE =>
|
||||
if (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_dds = '1') then
|
||||
AffirmIfEqual(data_id, data_out_dds, dds.cc.instance(dds_cnt));
|
||||
dds_cnt <= dds_cnt + 1;
|
||||
if (dds_cnt = 3) then
|
||||
AlertIf(data_id, last_word_out_dds /= '1', "Last Word Signal not pulled High", ERROR);
|
||||
dds_stage <= IDLE;
|
||||
if (dds.opcode = REGISTER_INSTANCE or dds.opcode = LOOKUP_INSTANCE) then
|
||||
AffirmIfEqual(ih_id, to_unsigned(instance_handle_out_dds), to_unsigned(dds.cc.instance));
|
||||
else
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
end if;
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
end case;
|
||||
end if;
|
||||
@ -928,7 +914,7 @@ begin
|
||||
valid_in_dds <= '0';
|
||||
last_word_in_dds <= '0';
|
||||
data_in_dds <= (others => '0');
|
||||
instance_handle_dds <= HANDLE_NIL;
|
||||
instance_handle_in_dds <= HANDLE_NIL;
|
||||
source_ts_dds <= TIME_INVALID;
|
||||
ready_out_dds <= '0';
|
||||
|
||||
@ -936,14 +922,12 @@ begin
|
||||
when START =>
|
||||
start_dds <= '1';
|
||||
opcode_dds <= dds.opcode;
|
||||
instance_handle_dds <= dds.cc.instance;
|
||||
instance_handle_in_dds <= dds.cc.instance;
|
||||
source_ts_dds <= dds.cc.src_timestamp;
|
||||
when PUSH =>
|
||||
valid_in_dds <= '1';
|
||||
data_in_dds <= dds.cc.payload.data(dds_cnt);
|
||||
last_word_in_dds <= dds.cc.payload.last(dds_cnt);
|
||||
when CHECK =>
|
||||
ready_out_dds <= '1';
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
|
||||
@ -87,7 +87,7 @@ architecture testbench of L0_dds_writer_test1_lik is
|
||||
constant MAX_REMOTE_ENDPOINTS : natural := 3;
|
||||
|
||||
-- *TYPE DECLARATION*
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK);
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE);
|
||||
type RTPS_STAGE_TYPE is (IDLE, START, DONE, CHECK);
|
||||
|
||||
-- *SIGNAL DECLARATION*
|
||||
@ -105,7 +105,7 @@ architecture testbench of L0_dds_writer_test1_lik is
|
||||
signal get_data_rtps, liveliness_assertion, data_available : std_logic := '0';
|
||||
signal cc_source_timestamp, source_ts_dds : TIME_TYPE := TIME_INVALID;
|
||||
signal cc_kind : CACHE_CHANGE_KIND_TYPE := ALIVE;
|
||||
signal cc_instance_handle, instance_handle_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal cc_instance_handle, instance_handle_in_dds, instance_handle_out_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal max_wait_dds : DURATION_TYPE := DURATION_INFINITE;
|
||||
signal return_code_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := (others => '0');
|
||||
signal status : std_logic_vector(STATUS_KIND_WIDTH-1 downto 0) := (others => '0');
|
||||
@ -116,7 +116,7 @@ architecture testbench of L0_dds_writer_test1_lik is
|
||||
signal rtps_stage : RTPS_STAGE_TYPE := IDLE;
|
||||
shared variable dds : DDS_WRITER_TEST_TYPE := DEFAULT_DDS_WRITER_TEST;
|
||||
shared variable rtps : RTPS_WRITER_TEST_TYPE := DEFAULT_RTPS_WRITER_TEST;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id : AlertLogIDType;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id, ih_id : AlertLogIDType;
|
||||
|
||||
-- *FUNCTION DECLARATION*
|
||||
function extract_key_hash (payload : TEST_PACKET_TYPE) return INSTANCE_HANDLE_TYPE is
|
||||
@ -176,11 +176,12 @@ begin
|
||||
start_dds => start_dds,
|
||||
ack_dds => ack_dds,
|
||||
opcode_dds => opcode_dds,
|
||||
instance_handle_dds => instance_handle_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,
|
||||
@ -276,6 +277,7 @@ begin
|
||||
kind_id <= GetAlertLogID("Cache Change Kind", ALERTLOG_BASE_ID);
|
||||
sn_id <= GetAlertLogID("SequenceNumber", ALERTLOG_BASE_ID);
|
||||
ts_id <= GetAlertLogID("TimeStamp", ALERTLOG_BASE_ID);
|
||||
ih_id <= GetAlertLogID("Instance Handle", ALERTLOG_BASE_ID);
|
||||
data_id <= GetAlertLogID("Data Out", ALERTLOG_BASE_ID);
|
||||
ret_id <= GetAlertLogID("Return Code", ALERTLOG_BASE_ID);
|
||||
|
||||
@ -1739,32 +1741,16 @@ begin
|
||||
if (dds_cnt = dds.cc.payload.length-1) then
|
||||
-- DEFAULT
|
||||
dds_stage <= DONE;
|
||||
|
||||
case (dds.opcode) is
|
||||
when REGISTER_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when LOOKUP_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when DONE =>
|
||||
if (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_dds = '1') then
|
||||
AffirmIfEqual(data_id, data_out_dds, dds.cc.instance(dds_cnt));
|
||||
dds_cnt <= dds_cnt + 1;
|
||||
if (dds_cnt = 3) then
|
||||
AlertIf(data_id, last_word_out_dds /= '1', "Last Word Signal not pulled High", ERROR);
|
||||
dds_stage <= IDLE;
|
||||
if (dds.opcode = REGISTER_INSTANCE or dds.opcode = LOOKUP_INSTANCE) then
|
||||
AffirmIfEqual(ih_id, to_unsigned(instance_handle_out_dds), to_unsigned(dds.cc.instance));
|
||||
else
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
end if;
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
end case;
|
||||
end if;
|
||||
@ -1775,7 +1761,7 @@ begin
|
||||
valid_in_dds <= '0';
|
||||
last_word_in_dds <= '0';
|
||||
data_in_dds <= (others => '0');
|
||||
instance_handle_dds <= HANDLE_NIL;
|
||||
instance_handle_in_dds <= HANDLE_NIL;
|
||||
source_ts_dds <= TIME_INVALID;
|
||||
ready_out_dds <= '0';
|
||||
|
||||
@ -1783,14 +1769,12 @@ begin
|
||||
when START =>
|
||||
start_dds <= '1';
|
||||
opcode_dds <= dds.opcode;
|
||||
instance_handle_dds <= dds.cc.instance;
|
||||
instance_handle_in_dds <= dds.cc.instance;
|
||||
source_ts_dds <= dds.cc.src_timestamp;
|
||||
when PUSH =>
|
||||
valid_in_dds <= '1';
|
||||
data_in_dds <= dds.cc.payload.data(dds_cnt);
|
||||
last_word_in_dds <= dds.cc.payload.last(dds_cnt);
|
||||
when CHECK =>
|
||||
ready_out_dds <= '1';
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
|
||||
@ -21,7 +21,7 @@ architecture testbench of L0_dds_writer_test2_aik is
|
||||
constant MAX_REMOTE_ENDPOINTS : natural := 3;
|
||||
|
||||
-- *TYPE DECLARATION*
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK);
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE);
|
||||
type RTPS_STAGE_TYPE is (IDLE, START, DONE, CHECK);
|
||||
|
||||
-- *SIGNAL DECLARATION*
|
||||
@ -39,7 +39,7 @@ architecture testbench of L0_dds_writer_test2_aik is
|
||||
signal get_data_rtps, liveliness_assertion, data_available : std_logic := '0';
|
||||
signal cc_source_timestamp, source_ts_dds : TIME_TYPE := TIME_INVALID;
|
||||
signal cc_kind : CACHE_CHANGE_KIND_TYPE := ALIVE;
|
||||
signal cc_instance_handle, instance_handle_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal cc_instance_handle, instance_handle_in_dds, instance_handle_out_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal max_wait_dds : DURATION_TYPE := DURATION_INFINITE;
|
||||
signal return_code_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := (others => '0');
|
||||
signal status : std_logic_vector(STATUS_KIND_WIDTH-1 downto 0) := (others => '0');
|
||||
@ -50,7 +50,7 @@ architecture testbench of L0_dds_writer_test2_aik is
|
||||
signal rtps_stage : RTPS_STAGE_TYPE := IDLE;
|
||||
shared variable dds : DDS_WRITER_TEST_TYPE := DEFAULT_DDS_WRITER_TEST;
|
||||
shared variable rtps : RTPS_WRITER_TEST_TYPE := DEFAULT_RTPS_WRITER_TEST;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id : AlertLogIDType;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id, ih_id : AlertLogIDType;
|
||||
|
||||
-- *FUNCTION DECLARATION*
|
||||
function extract_key_hash (payload : TEST_PACKET_TYPE) return INSTANCE_HANDLE_TYPE is
|
||||
@ -110,7 +110,7 @@ begin
|
||||
start_dds => start_dds,
|
||||
ack_dds => ack_dds,
|
||||
opcode_dds => opcode_dds,
|
||||
instance_handle_dds => instance_handle_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,
|
||||
@ -210,6 +210,7 @@ begin
|
||||
kind_id <= GetAlertLogID("Cache Change Kind", ALERTLOG_BASE_ID);
|
||||
sn_id <= GetAlertLogID("SequenceNumber", ALERTLOG_BASE_ID);
|
||||
ts_id <= GetAlertLogID("TimeStamp", ALERTLOG_BASE_ID);
|
||||
ih_id <= GetAlertLogID("Instance Handle", ALERTLOG_BASE_ID);
|
||||
data_id <= GetAlertLogID("Data Out", ALERTLOG_BASE_ID);
|
||||
ret_id <= GetAlertLogID("Return Code", ALERTLOG_BASE_ID);
|
||||
|
||||
@ -372,32 +373,16 @@ begin
|
||||
if (dds_cnt = dds.cc.payload.length-1) then
|
||||
-- DEFAULT
|
||||
dds_stage <= DONE;
|
||||
|
||||
case (dds.opcode) is
|
||||
when REGISTER_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when LOOKUP_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when DONE =>
|
||||
if (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_dds = '1') then
|
||||
AffirmIfEqual(data_id, data_out_dds, dds.cc.instance(dds_cnt));
|
||||
dds_cnt <= dds_cnt + 1;
|
||||
if (dds_cnt = 3) then
|
||||
AlertIf(data_id, last_word_out_dds /= '1', "Last Word Signal not pulled High", ERROR);
|
||||
dds_stage <= IDLE;
|
||||
if (dds.opcode = REGISTER_INSTANCE or dds.opcode = LOOKUP_INSTANCE) then
|
||||
AffirmIfEqual(ih_id, to_unsigned(instance_handle_out_dds), to_unsigned(dds.cc.instance));
|
||||
else
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
end if;
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
end case;
|
||||
end if;
|
||||
@ -408,7 +393,7 @@ begin
|
||||
valid_in_dds <= '0';
|
||||
last_word_in_dds <= '0';
|
||||
data_in_dds <= (others => '0');
|
||||
instance_handle_dds <= HANDLE_NIL;
|
||||
instance_handle_in_dds <= HANDLE_NIL;
|
||||
source_ts_dds <= TIME_INVALID;
|
||||
ready_out_dds <= '0';
|
||||
|
||||
@ -416,14 +401,12 @@ begin
|
||||
when START =>
|
||||
start_dds <= '1';
|
||||
opcode_dds <= dds.opcode;
|
||||
instance_handle_dds <= dds.cc.instance;
|
||||
instance_handle_in_dds <= dds.cc.instance;
|
||||
source_ts_dds <= dds.cc.src_timestamp;
|
||||
when PUSH =>
|
||||
valid_in_dds <= '1';
|
||||
data_in_dds <= dds.cc.payload.data(dds_cnt);
|
||||
last_word_in_dds <= dds.cc.payload.last(dds_cnt);
|
||||
when CHECK =>
|
||||
ready_out_dds <= '1';
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
|
||||
@ -21,7 +21,7 @@ architecture testbench of L0_dds_writer_test3_aik is
|
||||
constant MAX_REMOTE_ENDPOINTS : natural := 3;
|
||||
|
||||
-- *TYPE DECLARATION*
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK, CHECK_DEADLINE);
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK_DEADLINE);
|
||||
type RTPS_STAGE_TYPE is (IDLE, START, DONE, CHECK);
|
||||
|
||||
-- *SIGNAL DECLARATION*
|
||||
@ -39,7 +39,7 @@ architecture testbench of L0_dds_writer_test3_aik is
|
||||
signal get_data_rtps, liveliness_assertion, data_available : std_logic := '0';
|
||||
signal cc_source_timestamp, source_ts_dds : TIME_TYPE := TIME_INVALID;
|
||||
signal cc_kind : CACHE_CHANGE_KIND_TYPE := ALIVE;
|
||||
signal cc_instance_handle, instance_handle_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal cc_instance_handle, instance_handle_in_dds, instance_handle_out_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal max_wait_dds : DURATION_TYPE := DURATION_INFINITE;
|
||||
signal return_code_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := (others => '0');
|
||||
signal status : std_logic_vector(STATUS_KIND_WIDTH-1 downto 0) := (others => '0');
|
||||
@ -50,7 +50,7 @@ architecture testbench of L0_dds_writer_test3_aik is
|
||||
signal rtps_stage : RTPS_STAGE_TYPE := IDLE;
|
||||
shared variable dds : DDS_WRITER_TEST_TYPE := DEFAULT_DDS_WRITER_TEST;
|
||||
shared variable rtps : RTPS_WRITER_TEST_TYPE := DEFAULT_RTPS_WRITER_TEST;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id, status_id : AlertLogIDType;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id, status_id, ih_id : AlertLogIDType;
|
||||
|
||||
-- *FUNCTION DECLARATION*
|
||||
function extract_key_hash (payload : TEST_PACKET_TYPE) return INSTANCE_HANDLE_TYPE is
|
||||
@ -110,11 +110,12 @@ begin
|
||||
start_dds => start_dds,
|
||||
ack_dds => ack_dds,
|
||||
opcode_dds => opcode_dds,
|
||||
instance_handle_dds => instance_handle_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,
|
||||
@ -227,6 +228,7 @@ begin
|
||||
kind_id <= GetAlertLogID("Cache Change Kind", ALERTLOG_BASE_ID);
|
||||
sn_id <= GetAlertLogID("SequenceNumber", ALERTLOG_BASE_ID);
|
||||
ts_id <= GetAlertLogID("TimeStamp", ALERTLOG_BASE_ID);
|
||||
ih_id <= GetAlertLogID("Instance Handle", ALERTLOG_BASE_ID);
|
||||
data_id <= GetAlertLogID("Data Out", ALERTLOG_BASE_ID);
|
||||
ret_id <= GetAlertLogID("Return Code", ALERTLOG_BASE_ID);
|
||||
status_id <= GetAlertLogID("Communication Status", ALERTLOG_BASE_ID);
|
||||
@ -462,41 +464,25 @@ begin
|
||||
if (dds_cnt = dds.cc.payload.length-1) then
|
||||
-- DEFAULT
|
||||
dds_stage <= DONE;
|
||||
|
||||
case (dds.opcode) is
|
||||
when REGISTER_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when LOOKUP_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when DONE =>
|
||||
if (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
case (dds.opcode) is
|
||||
when GET_OFFERED_DEADLINE_MISSED_STATUS =>
|
||||
if (dds.ret_code = RETCODE_OK) then
|
||||
dds_stage <= CHECK_DEADLINE;
|
||||
dds_cnt <= 0;
|
||||
else
|
||||
if (dds.opcode = REGISTER_INSTANCE or dds.opcode = LOOKUP_INSTANCE) then
|
||||
AffirmIfEqual(ih_id, to_unsigned(instance_handle_out_dds), to_unsigned(dds.cc.instance));
|
||||
else
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
case (dds.opcode) is
|
||||
when GET_OFFERED_DEADLINE_MISSED_STATUS =>
|
||||
if (dds.ret_code = RETCODE_OK) then
|
||||
dds_stage <= CHECK_DEADLINE;
|
||||
dds_cnt <= 0;
|
||||
else
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when others =>
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when others =>
|
||||
dds_stage <= IDLE;
|
||||
end case;
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_dds = '1') then
|
||||
AffirmIfEqual(data_id, data_out_dds, dds.cc.instance(dds_cnt));
|
||||
dds_cnt <= dds_cnt + 1;
|
||||
if (dds_cnt = 3) then
|
||||
AlertIf(data_id, last_word_out_dds /= '1', "Last Word Signal not pulled High", ERROR);
|
||||
dds_stage <= IDLE;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when CHECK_DEADLINE =>
|
||||
@ -530,7 +516,7 @@ begin
|
||||
valid_in_dds <= '0';
|
||||
last_word_in_dds <= '0';
|
||||
data_in_dds <= (others => '0');
|
||||
instance_handle_dds <= HANDLE_NIL;
|
||||
instance_handle_in_dds <= HANDLE_NIL;
|
||||
source_ts_dds <= TIME_INVALID;
|
||||
ready_out_dds <= '0';
|
||||
|
||||
@ -538,14 +524,12 @@ begin
|
||||
when START =>
|
||||
start_dds <= '1';
|
||||
opcode_dds <= dds.opcode;
|
||||
instance_handle_dds <= dds.cc.instance;
|
||||
instance_handle_in_dds <= dds.cc.instance;
|
||||
source_ts_dds <= dds.cc.src_timestamp;
|
||||
when PUSH =>
|
||||
valid_in_dds <= '1';
|
||||
data_in_dds <= dds.cc.payload.data(dds_cnt);
|
||||
last_word_in_dds <= dds.cc.payload.last(dds_cnt);
|
||||
when CHECK =>
|
||||
ready_out_dds <= '1';
|
||||
when CHECK_DEADLINE =>
|
||||
ready_out_dds <= '1';
|
||||
when others =>
|
||||
|
||||
@ -21,7 +21,7 @@ architecture testbench of L0_dds_writer_test3_ain is
|
||||
constant MAX_REMOTE_ENDPOINTS : natural := 3;
|
||||
|
||||
-- *TYPE DECLARATION*
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK, CHECK_DEADLINE);
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK_DEADLINE);
|
||||
type RTPS_STAGE_TYPE is (IDLE, START, DONE, CHECK);
|
||||
|
||||
-- *SIGNAL DECLARATION*
|
||||
@ -39,7 +39,7 @@ architecture testbench of L0_dds_writer_test3_ain is
|
||||
signal get_data_rtps, liveliness_assertion, data_available : std_logic := '0';
|
||||
signal cc_source_timestamp, source_ts_dds : TIME_TYPE := TIME_INVALID;
|
||||
signal cc_kind : CACHE_CHANGE_KIND_TYPE := ALIVE;
|
||||
signal cc_instance_handle, instance_handle_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal cc_instance_handle, instance_handle_in_dds, instance_handle_out_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal max_wait_dds : DURATION_TYPE := DURATION_INFINITE;
|
||||
signal return_code_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := (others => '0');
|
||||
signal status : std_logic_vector(STATUS_KIND_WIDTH-1 downto 0) := (others => '0');
|
||||
@ -50,7 +50,7 @@ architecture testbench of L0_dds_writer_test3_ain is
|
||||
signal rtps_stage : RTPS_STAGE_TYPE := IDLE;
|
||||
shared variable dds : DDS_WRITER_TEST_TYPE := DEFAULT_DDS_WRITER_TEST;
|
||||
shared variable rtps : RTPS_WRITER_TEST_TYPE := DEFAULT_RTPS_WRITER_TEST;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id, status_id : AlertLogIDType;
|
||||
signal inst_id, kind_id, sn_id, ts_id, ih_id, ret_id, status_id, data_id : AlertLogIDType;
|
||||
|
||||
-- *FUNCTION DECLARATION*
|
||||
function extract_key_hash (payload : TEST_PACKET_TYPE) return INSTANCE_HANDLE_TYPE is
|
||||
@ -110,11 +110,12 @@ begin
|
||||
start_dds => start_dds,
|
||||
ack_dds => ack_dds,
|
||||
opcode_dds => opcode_dds,
|
||||
instance_handle_dds => instance_handle_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,
|
||||
@ -227,6 +228,7 @@ begin
|
||||
kind_id <= GetAlertLogID("Cache Change Kind", ALERTLOG_BASE_ID);
|
||||
sn_id <= GetAlertLogID("SequenceNumber", ALERTLOG_BASE_ID);
|
||||
ts_id <= GetAlertLogID("TimeStamp", ALERTLOG_BASE_ID);
|
||||
ih_id <= GetAlertLogID("Instance Handle", ALERTLOG_BASE_ID);
|
||||
data_id <= GetAlertLogID("Data Out", ALERTLOG_BASE_ID);
|
||||
ret_id <= GetAlertLogID("Return Code", ALERTLOG_BASE_ID);
|
||||
status_id <= GetAlertLogID("Communication Status", ALERTLOG_BASE_ID);
|
||||
@ -377,41 +379,25 @@ begin
|
||||
if (dds_cnt = dds.cc.payload.length-1) then
|
||||
-- DEFAULT
|
||||
dds_stage <= DONE;
|
||||
|
||||
case (dds.opcode) is
|
||||
when REGISTER_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when LOOKUP_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when DONE =>
|
||||
if (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
case (dds.opcode) is
|
||||
when GET_OFFERED_DEADLINE_MISSED_STATUS =>
|
||||
if (dds.ret_code = RETCODE_OK) then
|
||||
dds_stage <= CHECK_DEADLINE;
|
||||
dds_cnt <= 0;
|
||||
else
|
||||
if (dds.opcode = REGISTER_INSTANCE or dds.opcode = LOOKUP_INSTANCE) then
|
||||
AffirmIfEqual(ih_id, to_unsigned(instance_handle_out_dds), to_unsigned(dds.cc.instance));
|
||||
else
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
case (dds.opcode) is
|
||||
when GET_OFFERED_DEADLINE_MISSED_STATUS =>
|
||||
if (dds.ret_code = RETCODE_OK) then
|
||||
dds_stage <= CHECK_DEADLINE;
|
||||
dds_cnt <= 0;
|
||||
else
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when others =>
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when others =>
|
||||
dds_stage <= IDLE;
|
||||
end case;
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_dds = '1') then
|
||||
AffirmIfEqual(data_id, data_out_dds, dds.cc.instance(dds_cnt));
|
||||
dds_cnt <= dds_cnt + 1;
|
||||
if (dds_cnt = 3) then
|
||||
AlertIf(data_id, last_word_out_dds /= '1', "Last Word Signal not pulled High", ERROR);
|
||||
dds_stage <= IDLE;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when CHECK_DEADLINE =>
|
||||
@ -445,7 +431,7 @@ begin
|
||||
valid_in_dds <= '0';
|
||||
last_word_in_dds <= '0';
|
||||
data_in_dds <= (others => '0');
|
||||
instance_handle_dds <= HANDLE_NIL;
|
||||
instance_handle_in_dds <= HANDLE_NIL;
|
||||
source_ts_dds <= TIME_INVALID;
|
||||
ready_out_dds <= '0';
|
||||
|
||||
@ -453,14 +439,12 @@ begin
|
||||
when START =>
|
||||
start_dds <= '1';
|
||||
opcode_dds <= dds.opcode;
|
||||
instance_handle_dds <= dds.cc.instance;
|
||||
instance_handle_in_dds <= dds.cc.instance;
|
||||
source_ts_dds <= dds.cc.src_timestamp;
|
||||
when PUSH =>
|
||||
valid_in_dds <= '1';
|
||||
data_in_dds <= dds.cc.payload.data(dds_cnt);
|
||||
last_word_in_dds <= dds.cc.payload.last(dds_cnt);
|
||||
when CHECK =>
|
||||
ready_out_dds <= '1';
|
||||
when CHECK_DEADLINE =>
|
||||
ready_out_dds <= '1';
|
||||
when others =>
|
||||
|
||||
@ -21,7 +21,7 @@ architecture testbench of L0_dds_writer_test4_aik is
|
||||
constant MAX_REMOTE_ENDPOINTS : natural := 3;
|
||||
|
||||
-- *TYPE DECLARATION*
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK, CHECK_LIVELINESS);
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK_LIVELINESS);
|
||||
type RTPS_STAGE_TYPE is (IDLE, START, DONE, CHECK);
|
||||
|
||||
-- *SIGNAL DECLARATION*
|
||||
@ -39,7 +39,7 @@ architecture testbench of L0_dds_writer_test4_aik is
|
||||
signal get_data_rtps, liveliness_assertion, data_available : std_logic := '0';
|
||||
signal cc_source_timestamp, source_ts_dds : TIME_TYPE := TIME_INVALID;
|
||||
signal cc_kind : CACHE_CHANGE_KIND_TYPE := ALIVE;
|
||||
signal cc_instance_handle, instance_handle_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal cc_instance_handle, instance_handle_in_dds, instance_handle_out_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal max_wait_dds : DURATION_TYPE := DURATION_INFINITE;
|
||||
signal return_code_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := (others => '0');
|
||||
signal status : std_logic_vector(STATUS_KIND_WIDTH-1 downto 0) := (others => '0');
|
||||
@ -50,7 +50,7 @@ architecture testbench of L0_dds_writer_test4_aik is
|
||||
signal rtps_stage : RTPS_STAGE_TYPE := IDLE;
|
||||
shared variable dds : DDS_WRITER_TEST_TYPE := DEFAULT_DDS_WRITER_TEST;
|
||||
shared variable rtps : RTPS_WRITER_TEST_TYPE := DEFAULT_RTPS_WRITER_TEST;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id, status_id, assert_id : AlertLogIDType;
|
||||
signal inst_id, kind_id, sn_id, ts_id, ih_id, ret_id, status_id, assert_id, data_id : AlertLogIDType;
|
||||
|
||||
-- *FUNCTION DECLARATION*
|
||||
function extract_key_hash (payload : TEST_PACKET_TYPE) return INSTANCE_HANDLE_TYPE is
|
||||
@ -110,11 +110,12 @@ begin
|
||||
start_dds => start_dds,
|
||||
ack_dds => ack_dds,
|
||||
opcode_dds => opcode_dds,
|
||||
instance_handle_dds => instance_handle_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,
|
||||
@ -227,6 +228,7 @@ begin
|
||||
kind_id <= GetAlertLogID("Cache Change Kind", ALERTLOG_BASE_ID);
|
||||
sn_id <= GetAlertLogID("SequenceNumber", ALERTLOG_BASE_ID);
|
||||
ts_id <= GetAlertLogID("TimeStamp", ALERTLOG_BASE_ID);
|
||||
ih_id <= GetAlertLogID("Instance Handle", ALERTLOG_BASE_ID);
|
||||
data_id <= GetAlertLogID("Data Out", ALERTLOG_BASE_ID);
|
||||
ret_id <= GetAlertLogID("Return Code", ALERTLOG_BASE_ID);
|
||||
status_id <= GetAlertLogID("Communication Status", ALERTLOG_BASE_ID);
|
||||
@ -477,44 +479,28 @@ begin
|
||||
if (dds_cnt = dds.cc.payload.length-1) then
|
||||
-- DEFAULT
|
||||
dds_stage <= DONE;
|
||||
|
||||
case (dds.opcode) is
|
||||
when REGISTER_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when LOOKUP_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when DONE =>
|
||||
if (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
case (dds.opcode) is
|
||||
when GET_LIVELINESS_LOST_STATUS =>
|
||||
if (dds.ret_code = RETCODE_OK) then
|
||||
dds_stage <= CHECK_LIVELINESS;
|
||||
dds_cnt <= 0;
|
||||
else
|
||||
if (dds.opcode = REGISTER_INSTANCE or dds.opcode = LOOKUP_INSTANCE) then
|
||||
AffirmIfEqual(ih_id, to_unsigned(instance_handle_out_dds), to_unsigned(dds.cc.instance));
|
||||
else
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
case (dds.opcode) is
|
||||
when GET_LIVELINESS_LOST_STATUS =>
|
||||
if (dds.ret_code = RETCODE_OK) then
|
||||
dds_stage <= CHECK_LIVELINESS;
|
||||
dds_cnt <= 0;
|
||||
else
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when ASSERT_LIVELINESS =>
|
||||
AffirmIfEqual(assert_id, liveliness_assertion, dds.assertion);
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
when ASSERT_LIVELINESS =>
|
||||
AffirmIfEqual(assert_id, liveliness_assertion, dds.assertion);
|
||||
dds_stage <= IDLE;
|
||||
when others =>
|
||||
dds_stage <= IDLE;
|
||||
end case;
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_dds = '1') then
|
||||
AffirmIfEqual(data_id, data_out_dds, dds.cc.instance(dds_cnt));
|
||||
dds_cnt <= dds_cnt + 1;
|
||||
if (dds_cnt = 3) then
|
||||
AlertIf(data_id, last_word_out_dds /= '1', "Last Word Signal not pulled High", ERROR);
|
||||
dds_stage <= IDLE;
|
||||
when others =>
|
||||
dds_stage <= IDLE;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when CHECK_LIVELINESS =>
|
||||
@ -540,7 +526,7 @@ begin
|
||||
valid_in_dds <= '0';
|
||||
last_word_in_dds <= '0';
|
||||
data_in_dds <= (others => '0');
|
||||
instance_handle_dds <= HANDLE_NIL;
|
||||
instance_handle_in_dds <= HANDLE_NIL;
|
||||
source_ts_dds <= TIME_INVALID;
|
||||
ready_out_dds <= '0';
|
||||
|
||||
@ -548,14 +534,12 @@ begin
|
||||
when START =>
|
||||
start_dds <= '1';
|
||||
opcode_dds <= dds.opcode;
|
||||
instance_handle_dds <= dds.cc.instance;
|
||||
instance_handle_in_dds <= dds.cc.instance;
|
||||
source_ts_dds <= dds.cc.src_timestamp;
|
||||
when PUSH =>
|
||||
valid_in_dds <= '1';
|
||||
data_in_dds <= dds.cc.payload.data(dds_cnt);
|
||||
last_word_in_dds <= dds.cc.payload.last(dds_cnt);
|
||||
when CHECK =>
|
||||
ready_out_dds <= '1';
|
||||
when CHECK_LIVELINESS =>
|
||||
ready_out_dds <= '1';
|
||||
when others =>
|
||||
|
||||
@ -21,7 +21,7 @@ architecture testbench of L0_dds_writer_test5_afk is
|
||||
constant MAX_REMOTE_ENDPOINTS : natural := 3;
|
||||
|
||||
-- *TYPE DECLARATION*
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE, CHECK);
|
||||
type DDS_STAGE_TYPE is (IDLE, START, PUSH, DONE);
|
||||
type RTPS_STAGE_TYPE is (IDLE, START, DONE, CHECK);
|
||||
|
||||
-- *SIGNAL DECLARATION*
|
||||
@ -39,7 +39,7 @@ architecture testbench of L0_dds_writer_test5_afk is
|
||||
signal get_data_rtps, liveliness_assertion, data_available : std_logic := '0';
|
||||
signal cc_source_timestamp, source_ts_dds : TIME_TYPE := TIME_INVALID;
|
||||
signal cc_kind : CACHE_CHANGE_KIND_TYPE := ALIVE;
|
||||
signal cc_instance_handle, instance_handle_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal cc_instance_handle, instance_handle_in_dds, instance_handle_out_dds : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal max_wait_dds : DURATION_TYPE := DURATION_INFINITE;
|
||||
signal return_code_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := (others => '0');
|
||||
signal status : std_logic_vector(STATUS_KIND_WIDTH-1 downto 0) := (others => '0');
|
||||
@ -50,7 +50,7 @@ architecture testbench of L0_dds_writer_test5_afk is
|
||||
signal rtps_stage : RTPS_STAGE_TYPE := IDLE;
|
||||
shared variable dds : DDS_WRITER_TEST_TYPE := DEFAULT_DDS_WRITER_TEST;
|
||||
shared variable rtps : RTPS_WRITER_TEST_TYPE := DEFAULT_RTPS_WRITER_TEST;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id, status_id, assert_id : AlertLogIDType;
|
||||
signal inst_id, kind_id, sn_id, ts_id, data_id, ret_id, status_id, assert_id, ih_id : AlertLogIDType;
|
||||
|
||||
-- *FUNCTION DECLARATION*
|
||||
function extract_key_hash (payload : TEST_PACKET_TYPE) return INSTANCE_HANDLE_TYPE is
|
||||
@ -110,11 +110,12 @@ begin
|
||||
start_dds => start_dds,
|
||||
ack_dds => ack_dds,
|
||||
opcode_dds => opcode_dds,
|
||||
instance_handle_dds => instance_handle_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,
|
||||
@ -227,6 +228,7 @@ begin
|
||||
kind_id <= GetAlertLogID("Cache Change Kind", ALERTLOG_BASE_ID);
|
||||
sn_id <= GetAlertLogID("SequenceNumber", ALERTLOG_BASE_ID);
|
||||
ts_id <= GetAlertLogID("TimeStamp", ALERTLOG_BASE_ID);
|
||||
ih_id <= GetAlertLogID("Instance Handle", ALERTLOG_BASE_ID);
|
||||
data_id <= GetAlertLogID("Data Out", ALERTLOG_BASE_ID);
|
||||
ret_id <= GetAlertLogID("Return Code", ALERTLOG_BASE_ID);
|
||||
status_id <= GetAlertLogID("Communication Status", ALERTLOG_BASE_ID);
|
||||
@ -488,35 +490,16 @@ begin
|
||||
if (dds_cnt = dds.cc.payload.length-1) then
|
||||
-- DEFAULT
|
||||
dds_stage <= DONE;
|
||||
|
||||
case (dds.opcode) is
|
||||
when REGISTER_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when LOOKUP_INSTANCE =>
|
||||
dds_stage <= CHECK;
|
||||
dds_cnt <= 0;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
end if;
|
||||
end if;
|
||||
when DONE =>
|
||||
if (done_dds = '1') then
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
case (dds.opcode) is
|
||||
when others =>
|
||||
dds_stage <= IDLE;
|
||||
end case;
|
||||
end if;
|
||||
when CHECK =>
|
||||
if (valid_out_dds = '1') then
|
||||
AffirmIfEqual(data_id, data_out_dds, dds.cc.instance(dds_cnt));
|
||||
dds_cnt <= dds_cnt + 1;
|
||||
if (dds_cnt = 3) then
|
||||
AlertIf(data_id, last_word_out_dds /= '1', "Last Word Signal not pulled High", ERROR);
|
||||
dds_stage <= IDLE;
|
||||
if (dds.opcode = REGISTER_INSTANCE or dds.opcode = LOOKUP_INSTANCE) then
|
||||
AffirmIfEqual(ih_id, to_unsigned(instance_handle_out_dds), to_unsigned(dds.cc.instance));
|
||||
else
|
||||
AffirmIfEqual(ret_id, return_code_dds, dds.ret_code);
|
||||
end if;
|
||||
dds_stage <= IDLE;
|
||||
end if;
|
||||
end case;
|
||||
end if;
|
||||
@ -527,7 +510,7 @@ begin
|
||||
valid_in_dds <= '0';
|
||||
last_word_in_dds <= '0';
|
||||
data_in_dds <= (others => '0');
|
||||
instance_handle_dds <= HANDLE_NIL;
|
||||
instance_handle_in_dds <= HANDLE_NIL;
|
||||
source_ts_dds <= TIME_INVALID;
|
||||
ready_out_dds <= '0';
|
||||
|
||||
@ -535,14 +518,12 @@ begin
|
||||
when START =>
|
||||
start_dds <= '1';
|
||||
opcode_dds <= dds.opcode;
|
||||
instance_handle_dds <= dds.cc.instance;
|
||||
instance_handle_in_dds <= dds.cc.instance;
|
||||
source_ts_dds <= dds.cc.src_timestamp;
|
||||
when PUSH =>
|
||||
valid_in_dds <= '1';
|
||||
data_in_dds <= dds.cc.payload.data(dds_cnt);
|
||||
last_word_in_dds <= dds.cc.payload.last(dds_cnt);
|
||||
when CHECK =>
|
||||
ready_out_dds <= '1';
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
|
||||
@ -41,11 +41,12 @@ begin
|
||||
start_dds => open,
|
||||
ack_dds => '1',
|
||||
opcode_dds => open,
|
||||
instance_handle_dds => open,
|
||||
instance_handle_out_dds => open,
|
||||
source_ts_dds => open,
|
||||
max_wait_dds => open,
|
||||
done_dds => '1',
|
||||
return_code_dds => RETCODE_OK,
|
||||
instance_handle_in_dds => HANDLE_NIL,
|
||||
ready_out_dds => ready_w,
|
||||
valid_out_dds => valid_w,
|
||||
data_out_dds => data_w,
|
||||
@ -58,15 +59,12 @@ begin
|
||||
start_user => start_w,
|
||||
ack_user => ack_w,
|
||||
opcode_user => WRITE,
|
||||
instance_handle_user => HANDLE_NIL,
|
||||
instance_handle_in_user => HANDLE_NIL,
|
||||
source_ts_user => TIME_ZERO,
|
||||
max_wait_user => TIME_INFINITE,
|
||||
done_user => open,
|
||||
return_code_user => open,
|
||||
ready_out_user => '1',
|
||||
valid_out_user => open,
|
||||
data_out_user => open,
|
||||
last_word_out_user => open,
|
||||
instance_handle_out_user => open,
|
||||
status_user => open,
|
||||
encode_done => encode_done,
|
||||
id => id_in,
|
||||
|
||||
@ -44,11 +44,12 @@ begin
|
||||
start_dds => open,
|
||||
ack_dds => '1',
|
||||
opcode_dds => open,
|
||||
instance_handle_dds => open,
|
||||
instance_handle_out_dds => open,
|
||||
source_ts_dds => open,
|
||||
max_wait_dds => open,
|
||||
done_dds => '1',
|
||||
return_code_dds => RETCODE_OK,
|
||||
instance_handle_in_dds => HANDLE_NIL,
|
||||
ready_out_dds => ready_w,
|
||||
valid_out_dds => valid_w,
|
||||
data_out_dds => data_w,
|
||||
@ -61,15 +62,12 @@ begin
|
||||
start_user => start_w,
|
||||
ack_user => ack_w,
|
||||
opcode_user => WRITE,
|
||||
instance_handle_user => HANDLE_NIL,
|
||||
instance_handle_in_user => HANDLE_NIL,
|
||||
source_ts_user => TIME_ZERO,
|
||||
max_wait_user => TIME_INFINITE,
|
||||
done_user => open,
|
||||
return_code_user => open,
|
||||
ready_out_user => '1',
|
||||
valid_out_user => open,
|
||||
data_out_user => open,
|
||||
last_word_out_user => open,
|
||||
instance_handle_out_user => open,
|
||||
status_user => open,
|
||||
encode_done => encode_done,
|
||||
id => id_in,
|
||||
|
||||
@ -36,11 +36,12 @@ begin
|
||||
start_dds => open,
|
||||
ack_dds => '1',
|
||||
opcode_dds => open,
|
||||
instance_handle_dds => open,
|
||||
instance_handle_out_dds => open,
|
||||
source_ts_dds => open,
|
||||
max_wait_dds => open,
|
||||
done_dds => '1',
|
||||
return_code_dds => RETCODE_OK,
|
||||
instance_handle_in_dds => HANDLE_NIL,
|
||||
ready_out_dds => ready,
|
||||
valid_out_dds => valid,
|
||||
data_out_dds => data,
|
||||
@ -53,19 +54,16 @@ begin
|
||||
start_user => start_w,
|
||||
ack_user => open,
|
||||
opcode_user => WRITE,
|
||||
instance_handle_user => HANDLE_NIL,
|
||||
instance_handle_in_user => HANDLE_NIL,
|
||||
source_ts_user => TIME_ZERO,
|
||||
max_wait_user => TIME_INFINITE,
|
||||
done_user => open,
|
||||
return_code_user => open,
|
||||
ready_out_user => '1',
|
||||
valid_out_user => open,
|
||||
data_out_user => open,
|
||||
last_word_out_user => open,
|
||||
instance_handle_out_user => open,
|
||||
status_user => open,
|
||||
encode_done => encode_done,
|
||||
id => id_in,
|
||||
a => a_in
|
||||
a => a_in,
|
||||
encode_done => encode_done
|
||||
);
|
||||
|
||||
uut_r : entity work.Type1_reader_wrapper(arch)
|
||||
|
||||
@ -39,11 +39,12 @@ begin
|
||||
start_dds => open,
|
||||
ack_dds => '1',
|
||||
opcode_dds => open,
|
||||
instance_handle_dds => open,
|
||||
instance_handle_out_dds => open,
|
||||
source_ts_dds => open,
|
||||
max_wait_dds => open,
|
||||
done_dds => '1',
|
||||
return_code_dds => RETCODE_OK,
|
||||
instance_handle_in_dds => HANDLE_NIL,
|
||||
ready_out_dds => ready,
|
||||
valid_out_dds => valid,
|
||||
data_out_dds => data,
|
||||
@ -56,19 +57,16 @@ begin
|
||||
start_user => start_w,
|
||||
ack_user => open,
|
||||
opcode_user => WRITE,
|
||||
instance_handle_user => HANDLE_NIL,
|
||||
instance_handle_in_user => HANDLE_NIL,
|
||||
source_ts_user => TIME_ZERO,
|
||||
max_wait_user => TIME_INFINITE,
|
||||
done_user => open,
|
||||
return_code_user => open,
|
||||
ready_out_user => '1',
|
||||
valid_out_user => open,
|
||||
data_out_user => open,
|
||||
last_word_out_user => open,
|
||||
instance_handle_out_user => open,
|
||||
status_user => open,
|
||||
encode_done => encode_done,
|
||||
id => id_in,
|
||||
a => a_in
|
||||
a => a_in,
|
||||
encode_done => encode_done
|
||||
);
|
||||
|
||||
uut_r : entity work.Type1_reader_wrapper(arch)
|
||||
|
||||
@ -63,11 +63,12 @@ begin
|
||||
start_dds => open,
|
||||
ack_dds => '1',
|
||||
opcode_dds => open,
|
||||
instance_handle_dds => open,
|
||||
instance_handle_out_dds => open,
|
||||
source_ts_dds => open,
|
||||
max_wait_dds => open,
|
||||
done_dds => '1',
|
||||
return_code_dds => RETCODE_OK,
|
||||
instance_handle_in_dds => HANDLE_NIL,
|
||||
ready_out_dds => ready_w,
|
||||
valid_out_dds => valid_w,
|
||||
data_out_dds => data_w,
|
||||
@ -80,15 +81,12 @@ begin
|
||||
start_user => start_w,
|
||||
ack_user => ack_w,
|
||||
opcode_user => WRITE,
|
||||
instance_handle_user => HANDLE_NIL,
|
||||
instance_handle_in_user => HANDLE_NIL,
|
||||
source_ts_user => TIME_ZERO,
|
||||
max_wait_user => TIME_INFINITE,
|
||||
done_user => open,
|
||||
return_code_user => open,
|
||||
ready_out_user => '1',
|
||||
valid_out_user => open,
|
||||
data_out_user => open,
|
||||
last_word_out_user => open,
|
||||
instance_handle_out_user => open,
|
||||
status_user => open,
|
||||
encode_done => encode_done,
|
||||
id => id_in,
|
||||
|
||||
@ -66,11 +66,12 @@ begin
|
||||
start_dds => open,
|
||||
ack_dds => '1',
|
||||
opcode_dds => open,
|
||||
instance_handle_dds => open,
|
||||
instance_handle_out_dds => open,
|
||||
source_ts_dds => open,
|
||||
max_wait_dds => open,
|
||||
done_dds => '1',
|
||||
return_code_dds => RETCODE_OK,
|
||||
instance_handle_in_dds => HANDLE_NIL,
|
||||
ready_out_dds => ready_w,
|
||||
valid_out_dds => valid_w,
|
||||
data_out_dds => data_w,
|
||||
@ -83,15 +84,12 @@ begin
|
||||
start_user => start_w,
|
||||
ack_user => ack_w,
|
||||
opcode_user => WRITE,
|
||||
instance_handle_user => HANDLE_NIL,
|
||||
instance_handle_in_user => HANDLE_NIL,
|
||||
source_ts_user => TIME_ZERO,
|
||||
max_wait_user => TIME_INFINITE,
|
||||
done_user => open,
|
||||
return_code_user => open,
|
||||
ready_out_user => '1',
|
||||
valid_out_user => open,
|
||||
data_out_user => open,
|
||||
last_word_out_user => open,
|
||||
instance_handle_out_user => open,
|
||||
status_user => open,
|
||||
encode_done => encode_done,
|
||||
id => id_in,
|
||||
|
||||
@ -58,11 +58,12 @@ begin
|
||||
start_dds => open,
|
||||
ack_dds => '1',
|
||||
opcode_dds => open,
|
||||
instance_handle_dds => open,
|
||||
instance_handle_out_dds => open,
|
||||
source_ts_dds => open,
|
||||
max_wait_dds => open,
|
||||
done_dds => '1',
|
||||
return_code_dds => RETCODE_OK,
|
||||
instance_handle_in_dds => HANDLE_NIL,
|
||||
ready_out_dds => ready,
|
||||
valid_out_dds => valid,
|
||||
data_out_dds => data,
|
||||
@ -75,17 +76,13 @@ begin
|
||||
start_user => start_w,
|
||||
ack_user => open,
|
||||
opcode_user => WRITE,
|
||||
instance_handle_user => HANDLE_NIL,
|
||||
instance_handle_in_user => HANDLE_NIL,
|
||||
source_ts_user => TIME_ZERO,
|
||||
max_wait_user => TIME_INFINITE,
|
||||
done_user => open,
|
||||
return_code_user => open,
|
||||
ready_out_user => '1',
|
||||
valid_out_user => open,
|
||||
data_out_user => open,
|
||||
last_word_out_user => open,
|
||||
instance_handle_out_user => open,
|
||||
status_user => open,
|
||||
encode_done => encode_done,
|
||||
id => id_in,
|
||||
TestSequence_len => TestSequence_len_in,
|
||||
TestSequence_addr => TestSequence_addr_in,
|
||||
@ -137,7 +134,8 @@ begin
|
||||
TestString_valid => TestString_valid_in,
|
||||
TestString_ack => TestString_ack_in,
|
||||
TestString_r => TestString_r_in,
|
||||
TestString_w => TestString_w_in
|
||||
TestString_w => TestString_w_in,
|
||||
encode_done => encode_done
|
||||
);
|
||||
|
||||
uut_r : entity work.Type2_reader_wrapper(arch)
|
||||
|
||||
@ -61,11 +61,12 @@ begin
|
||||
start_dds => open,
|
||||
ack_dds => '1',
|
||||
opcode_dds => open,
|
||||
instance_handle_dds => open,
|
||||
instance_handle_out_dds => open,
|
||||
source_ts_dds => open,
|
||||
max_wait_dds => open,
|
||||
done_dds => '1',
|
||||
return_code_dds => RETCODE_OK,
|
||||
instance_handle_in_dds => HANDLE_NIL,
|
||||
ready_out_dds => ready,
|
||||
valid_out_dds => valid,
|
||||
data_out_dds => data,
|
||||
@ -78,17 +79,13 @@ begin
|
||||
start_user => start_w,
|
||||
ack_user => open,
|
||||
opcode_user => WRITE,
|
||||
instance_handle_user => HANDLE_NIL,
|
||||
instance_handle_in_user => HANDLE_NIL,
|
||||
source_ts_user => TIME_ZERO,
|
||||
max_wait_user => TIME_INFINITE,
|
||||
done_user => open,
|
||||
return_code_user => open,
|
||||
ready_out_user => '1',
|
||||
valid_out_user => open,
|
||||
data_out_user => open,
|
||||
last_word_out_user => open,
|
||||
instance_handle_out_user => open,
|
||||
status_user => open,
|
||||
encode_done => encode_done,
|
||||
id => id_in,
|
||||
TestSequence_len => TestSequence_len_in,
|
||||
TestSequence_addr => TestSequence_addr_in,
|
||||
@ -140,7 +137,8 @@ begin
|
||||
TestString_valid => TestString_valid_in,
|
||||
TestString_ack => TestString_ack_in,
|
||||
TestString_r => TestString_r_in,
|
||||
TestString_w => TestString_w_in
|
||||
TestString_w => TestString_w_in,
|
||||
encode_done => encode_done
|
||||
);
|
||||
|
||||
uut_r : entity work.Type2_reader_wrapper(arch)
|
||||
|
||||
@ -13,37 +13,34 @@ use Testbench_Lib2.Type1_package.all;
|
||||
entity L2_Testbench_Lib2 is
|
||||
port (
|
||||
-- SYSTEM
|
||||
clk : in std_logic;
|
||||
reset : in std_logic;
|
||||
time : in TIME_TYPE;
|
||||
clk : in std_logic;
|
||||
reset : in std_logic;
|
||||
time : in TIME_TYPE;
|
||||
-- INPUT
|
||||
empty : in std_logic;
|
||||
rd : out std_logic;
|
||||
data_in : in std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
empty : in std_logic;
|
||||
rd : out std_logic;
|
||||
data_in : in std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
-- OUTPUT
|
||||
data_out : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
wr : out std_logic;
|
||||
full : in std_logic;
|
||||
data_out : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
wr : out std_logic;
|
||||
full : in std_logic;
|
||||
-- TO USER ENTITY
|
||||
start_user : in std_logic;
|
||||
ack_user : out std_logic;
|
||||
opcode_user : in DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_user : in INSTANCE_HANDLE_TYPE;
|
||||
source_ts_user : in TIME_TYPE;
|
||||
max_wait_user : in DURATION_TYPE;
|
||||
done_user : out std_logic;
|
||||
return_code_user : out std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
ready_out_user : in std_logic;
|
||||
valid_out_user : out std_logic;
|
||||
data_out_user : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
last_word_out_user : out std_logic;
|
||||
start_user : in std_logic;
|
||||
ack_user : out std_logic;
|
||||
opcode_user : in DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_in_user : in INSTANCE_HANDLE_TYPE;
|
||||
source_ts_user : in TIME_TYPE;
|
||||
max_wait_user : in DURATION_TYPE;
|
||||
done_user : out std_logic;
|
||||
return_code_user : out std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
instance_handle_out_user : out INSTANCE_HANDLE_TYPE;
|
||||
-- Communication Status
|
||||
status_user : out std_logic_vector(STATUS_KIND_WIDTH-1 downto 0);
|
||||
status_user : out std_logic_vector(STATUS_KIND_WIDTH-1 downto 0);
|
||||
-- ###GENERATED START###
|
||||
id : in std_logic_vector(CDR_LONG_WIDTH-1 downto 0);
|
||||
a : in std_logic_vector(CDR_LONG_WIDTH-1 downto 0);
|
||||
id : in std_logic_vector(CDR_LONG_WIDTH-1 downto 0);
|
||||
a : in std_logic_vector(CDR_LONG_WIDTH-1 downto 0);
|
||||
-- ###GENERATED END###
|
||||
encode_done : out std_logic
|
||||
encode_done : out std_logic
|
||||
);
|
||||
end entity;
|
||||
|
||||
@ -54,7 +51,7 @@ architecture arch of L2_Testbench_Lib2 is
|
||||
-- INTERCONNECT
|
||||
signal start_wr_dds, ack_wr_dds, done_wr_dds, ready_out_wr_dds, valid_out_wr_dds, last_word_out_wr_dds, ready_in_wr_dds, valid_in_wr_dds, last_word_in_wr_dds : std_logic;
|
||||
signal opcode_wr_dds : DDS_WRITER_OPCODE_TYPE;
|
||||
signal instance_handle_wr_dds : INSTANCE_HANDLE_TYPE;
|
||||
signal instance_handle_in_wr_dds, instance_handle_out_wr_dds : INSTANCE_HANDLE_TYPE;
|
||||
signal source_ts_wr_dds : TIME_TYPE;
|
||||
signal max_wait_wr_dds : DURATION_TYPE;
|
||||
signal return_code_wr_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
@ -91,47 +88,45 @@ begin
|
||||
Type1_writer_wrapper_w_inst : entity Testbench_Lib2.Type1_writer_wrapper(arch)
|
||||
port map (
|
||||
-- SYSTEM
|
||||
clk => clk,
|
||||
reset => reset,
|
||||
clk => clk,
|
||||
reset => reset,
|
||||
-- FROM DDS WRITER
|
||||
start_dds => start_wr_dds,
|
||||
ack_dds => ack_wr_dds,
|
||||
opcode_dds => opcode_wr_dds,
|
||||
instance_handle_dds => instance_handle_wr_dds,
|
||||
source_ts_dds => source_ts_wr_dds,
|
||||
max_wait_dds => max_wait_wr_dds,
|
||||
done_dds => done_wr_dds,
|
||||
return_code_dds => return_code_wr_dds,
|
||||
ready_out_dds => ready_out_wr_dds,
|
||||
valid_out_dds => valid_out_wr_dds,
|
||||
data_out_dds => data_out_wr_dds,
|
||||
last_word_out_dds => last_word_out_wr_dds,
|
||||
ready_in_dds => ready_in_wr_dds,
|
||||
valid_in_dds => valid_in_wr_dds,
|
||||
data_in_dds => data_in_wr_dds,
|
||||
last_word_in_dds => last_word_in_wr_dds,
|
||||
start_dds => start_wr_dds,
|
||||
ack_dds => ack_wr_dds,
|
||||
opcode_dds => opcode_wr_dds,
|
||||
instance_handle_out_dds => instance_handle_out_wr_dds,
|
||||
source_ts_dds => source_ts_wr_dds,
|
||||
max_wait_dds => max_wait_wr_dds,
|
||||
done_dds => done_wr_dds,
|
||||
return_code_dds => return_code_wr_dds,
|
||||
instance_handle_in_dds => instance_handle_in_wr_dds,
|
||||
ready_out_dds => ready_out_wr_dds,
|
||||
valid_out_dds => valid_out_wr_dds,
|
||||
data_out_dds => data_out_wr_dds,
|
||||
last_word_out_dds => last_word_out_wr_dds,
|
||||
ready_in_dds => ready_in_wr_dds,
|
||||
valid_in_dds => valid_in_wr_dds,
|
||||
data_in_dds => data_in_wr_dds,
|
||||
last_word_in_dds => last_word_in_wr_dds,
|
||||
-- Communication Status
|
||||
status_dds => status_wr_dds,
|
||||
status_dds => status_wr_dds,
|
||||
-- TO USER ENTITY
|
||||
start_user => start_user,
|
||||
ack_user => ack_user,
|
||||
opcode_user => opcode_user,
|
||||
instance_handle_user => instance_handle_user,
|
||||
source_ts_user => source_ts_user,
|
||||
max_wait_user => max_wait_user,
|
||||
done_user => done_user,
|
||||
return_code_user => return_code_user,
|
||||
ready_out_user => ready_out_user,
|
||||
valid_out_user => valid_out_user,
|
||||
data_out_user => data_out_user,
|
||||
last_word_out_user => last_word_out_user,
|
||||
start_user => start_user,
|
||||
ack_user => ack_user,
|
||||
opcode_user => opcode_user,
|
||||
instance_handle_in_user => instance_handle_in_user,
|
||||
source_ts_user => source_ts_user,
|
||||
max_wait_user => max_wait_user,
|
||||
done_user => done_user,
|
||||
return_code_user => return_code_user,
|
||||
instance_handle_out_user => instance_handle_out_user,
|
||||
-- Communication Status
|
||||
status_user => status_user,
|
||||
status_user => status_user,
|
||||
-- ###GENERATED START###
|
||||
id => id,
|
||||
a => a,
|
||||
id => id,
|
||||
a => a,
|
||||
-- ###GENERATED END###
|
||||
encode_done => encode_done
|
||||
encode_done => encode_done
|
||||
);
|
||||
|
||||
dds_writer_w_inst : entity Testbench_Lib2.dds_writer(arch)
|
||||
@ -174,11 +169,12 @@ begin
|
||||
start_dds => start_wr_dds,
|
||||
ack_dds => ack_wr_dds,
|
||||
opcode_dds => opcode_wr_dds,
|
||||
instance_handle_dds => instance_handle_wr_dds,
|
||||
instance_handle_in_dds => instance_handle_out_wr_dds,
|
||||
source_ts_dds => source_ts_wr_dds,
|
||||
max_wait_dds => max_wait_wr_dds,
|
||||
done_dds => done_wr_dds,
|
||||
return_code_dds => return_code_wr_dds,
|
||||
instance_handle_out_dds => instance_handle_in_wr_dds,
|
||||
ready_in_dds => ready_out_wr_dds,
|
||||
valid_in_dds => valid_out_wr_dds,
|
||||
data_in_dds => data_out_wr_dds,
|
||||
|
||||
@ -35,7 +35,8 @@ architecture testbench of L2_Type1_test1 is
|
||||
signal start_w, ack_w, done_w, ready_out_w, valid_out_w, last_word_out_w, encode_done_w, empty_rtps_w, full_rtps_w, rd_rtps_w, wr_rtps_w : std_logic := '0';
|
||||
--signal opcode_w : Testbench_Lib2.rtps_config_package.DDS_WRITER_OPCODE_TYPE := Testbench_Lib2.rtps_config_package.DDS_WRITER_OPCODE_TYPE'(NOP);
|
||||
signal opcode_w : DDS_WRITER_OPCODE_TYPE;
|
||||
signal instance_handle_w : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal instance_handle_in_w : INSTANCE_HANDLE_TYPE := HANDLE_NIL;
|
||||
signal instance_handle_out_w : Testbench_Lib2.rtps_package.INSTANCE_HANDLE_TYPE := Testbench_Lib2.rtps_package.HANDLE_NIL;
|
||||
signal source_ts_w : TIME_TYPE := TIME_INVALID;
|
||||
signal max_wait_w : DURATION_TYPE := DURATION_ZERO;
|
||||
signal return_code_w : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := RETCODE_OK;
|
||||
@ -85,37 +86,34 @@ begin
|
||||
Lib2_inst : entity Testbench_Lib2.L2_Testbench_Lib2(arch)
|
||||
port map (
|
||||
-- SYSTEM
|
||||
clk => clk,
|
||||
reset => reset,
|
||||
time => Testbench_Lib2.rtps_package.TIME_TYPE(time),
|
||||
clk => clk,
|
||||
reset => reset,
|
||||
time => Testbench_Lib2.rtps_package.TIME_TYPE(time),
|
||||
-- INPUT
|
||||
empty => empty_rtps_w,
|
||||
rd => rd_rtps_w,
|
||||
data_in => data_in_rtps_w,
|
||||
empty => empty_rtps_w,
|
||||
rd => rd_rtps_w,
|
||||
data_in => data_in_rtps_w,
|
||||
-- OUTPUT
|
||||
data_out => data_out_rtps_w,
|
||||
wr => wr_rtps_w,
|
||||
full => full_rtps_w,
|
||||
data_out => data_out_rtps_w,
|
||||
wr => wr_rtps_w,
|
||||
full => full_rtps_w,
|
||||
-- TO USER ENTITY
|
||||
start_user => start_w,
|
||||
ack_user => ack_w,
|
||||
opcode_user => to_Lib2(opcode_w),
|
||||
instance_handle_user => Testbench_Lib2.rtps_package.INSTANCE_HANDLE_TYPE(instance_handle_w),
|
||||
source_ts_user => Testbench_Lib2.rtps_package.TIME_TYPE(source_ts_w),
|
||||
max_wait_user => Testbench_Lib2.rtps_package.DURATION_TYPE(max_wait_w),
|
||||
done_user => done_w,
|
||||
return_code_user => return_code_w,
|
||||
ready_out_user => ready_out_w,
|
||||
valid_out_user => valid_out_w,
|
||||
data_out_user => data_out_w,
|
||||
last_word_out_user => last_word_out_w,
|
||||
start_user => start_w,
|
||||
ack_user => ack_w,
|
||||
opcode_user => to_Lib2(opcode_w),
|
||||
instance_handle_in_user => Testbench_Lib2.rtps_package.INSTANCE_HANDLE_TYPE(instance_handle_in_w),
|
||||
source_ts_user => Testbench_Lib2.rtps_package.TIME_TYPE(source_ts_w),
|
||||
max_wait_user => Testbench_Lib2.rtps_package.DURATION_TYPE(max_wait_w),
|
||||
done_user => done_w,
|
||||
return_code_user => return_code_w,
|
||||
instance_handle_out_user => instance_handle_out_w,
|
||||
-- Communication Status
|
||||
status_user => status_w,
|
||||
status_user => status_w,
|
||||
-- ###GENERATED START###
|
||||
id => id_w,
|
||||
a => a_w,
|
||||
id => id_w,
|
||||
a => a_w,
|
||||
-- ###GENERATED END###
|
||||
encode_done => encode_done_w
|
||||
encode_done => encode_done_w
|
||||
);
|
||||
|
||||
fifo_r_w_inst : configuration work.FWFT_FIFO_cfg
|
||||
@ -233,23 +231,6 @@ begin
|
||||
wait on sig until ((sig and DATA_AVAILABLE_STATUS) = DATA_AVAILABLE_STATUS);
|
||||
end if;
|
||||
end procedure;
|
||||
|
||||
procedure get_instance(signal inst : inout INSTANCE_HANDLE_TYPE; signal ready_in : out std_logic; signal valid_in : in std_logic; signal data_in : in std_logic_vector; signal last_word_in : in std_logic ) is
|
||||
variable cnt : natural := 0;
|
||||
begin
|
||||
while (cnt < 4) loop
|
||||
ready_in <= '1';
|
||||
wait_on_sig(valid_in);
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
inst(cnt) <= data_in;
|
||||
if (cnt = 3) then
|
||||
AlertIf(last_word_in /= '1', "last_word not high", ERROR);
|
||||
end if;
|
||||
wait until rising_edge(clk);
|
||||
cnt := cnt + 1;
|
||||
ready_in <= '0';
|
||||
end loop;
|
||||
end procedure;
|
||||
begin
|
||||
|
||||
SetAlertLogName("System - Level 2 - (Type1) - General");
|
||||
@ -282,7 +263,9 @@ begin
|
||||
wait_on_sig(ack_w);
|
||||
wait until rising_edge(clk);
|
||||
start_w <= '0';
|
||||
get_instance(inst1, ready_out_w, valid_out_w, data_out_w, last_word_out_w);
|
||||
wait_on_sig(done_w);
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
inst1 <= INSTANCE_HANDLE_TYPE(instance_handle_out_w);
|
||||
|
||||
Log("Register Instance 2", INFO);
|
||||
start_w <= '1';
|
||||
@ -292,15 +275,17 @@ begin
|
||||
wait_on_sig(ack_w);
|
||||
wait until rising_edge(clk);
|
||||
start_w <= '0';
|
||||
get_instance(inst2, ready_out_w, valid_out_w, data_out_w, last_word_out_w);
|
||||
wait_on_sig(done_w);
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
inst2 <= INSTANCE_HANDLE_TYPE(instance_handle_out_w);
|
||||
|
||||
Log("Write Instance 1 Sample 1 (Historical)", INFO);
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_w <= inst1;
|
||||
id_w <= id1;
|
||||
a_w <= a1;
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_in_w <= inst1;
|
||||
id_w <= id1;
|
||||
a_w <= a1;
|
||||
wait_on_sig(ack_w);
|
||||
wait until rising_edge(clk);
|
||||
start_w <= '0';
|
||||
@ -310,12 +295,12 @@ begin
|
||||
wait until rising_edge(clk);
|
||||
|
||||
Log("Write Instance 2 Sample 1 (Historical)", INFO);
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_w <= inst2;
|
||||
id_w <= id2;
|
||||
a_w <= a1;
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_in_w <= inst2;
|
||||
id_w <= id2;
|
||||
a_w <= a1;
|
||||
wait_on_sig(ack_w);
|
||||
wait until rising_edge(clk);
|
||||
start_w <= '0';
|
||||
@ -325,12 +310,12 @@ begin
|
||||
wait until rising_edge(clk);
|
||||
|
||||
Log("Write Instance 1 Sample 2 (Historical)", INFO);
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_w <= HANDLE_NIL;
|
||||
id_w <= id1;
|
||||
a_w <= a2;
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_in_w <= HANDLE_NIL;
|
||||
id_w <= id1;
|
||||
a_w <= a2;
|
||||
wait_on_sig(ack_w);
|
||||
wait until rising_edge(clk);
|
||||
start_w <= '0';
|
||||
@ -340,12 +325,12 @@ begin
|
||||
wait until rising_edge(clk);
|
||||
|
||||
Log("Write Instance 1 Sample 1 (Historical)", INFO);
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_w <= HANDLE_NIL;
|
||||
id_w <= id2;
|
||||
a_w <= a2;
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_in_w <= HANDLE_NIL;
|
||||
id_w <= id2;
|
||||
a_w <= a2;
|
||||
wait_on_sig(ack_w);
|
||||
wait until rising_edge(clk);
|
||||
start_w <= '0';
|
||||
@ -466,12 +451,12 @@ begin
|
||||
wait until rising_edge(clk);
|
||||
|
||||
Log("Write Instance 3 Sample 1", INFO);
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_w <= HANDLE_NIL;
|
||||
id_w <= id3;
|
||||
a_w <= a3;
|
||||
start_w <= '1';
|
||||
opcode_w <= WRITE;
|
||||
source_ts_w <= TIME_INVALID;
|
||||
instance_handle_in_w <= HANDLE_NIL;
|
||||
id_w <= id3;
|
||||
a_w <= a3;
|
||||
wait_on_sig(ack_w);
|
||||
wait until rising_edge(clk);
|
||||
start_w <= '0';
|
||||
@ -488,7 +473,9 @@ begin
|
||||
wait_on_sig(ack_w);
|
||||
wait until rising_edge(clk);
|
||||
start_w <= '0';
|
||||
get_instance(inst3, ready_out_w, valid_out_w, data_out_w, last_word_out_w);
|
||||
wait_on_sig(done_w);
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
inst3 <= INSTANCE_HANDLE_TYPE(instance_handle_out_w);
|
||||
|
||||
Log("Wait on Data Arrival", INFO);
|
||||
wait_on_data(status_r);
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
-- 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;
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
-- 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;
|
||||
@ -18,11 +21,12 @@ entity Type1_writer_wrapper is
|
||||
start_dds : out std_logic;
|
||||
ack_dds : in std_logic;
|
||||
opcode_dds : out DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_dds : out INSTANCE_HANDLE_TYPE;
|
||||
instance_handle_out_dds : out INSTANCE_HANDLE_TYPE;
|
||||
source_ts_dds : out TIME_TYPE;
|
||||
max_wait_dds : out DURATION_TYPE;
|
||||
done_dds : in std_logic;
|
||||
return_code_dds : in std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
instance_handle_in_dds : in INSTANCE_HANDLE_TYPE;
|
||||
ready_out_dds : in std_logic;
|
||||
valid_out_dds : out std_logic;
|
||||
data_out_dds : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
@ -38,15 +42,12 @@ entity Type1_writer_wrapper is
|
||||
start_user : in std_logic;
|
||||
ack_user : out std_logic;
|
||||
opcode_user : in DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_user : in INSTANCE_HANDLE_TYPE;
|
||||
instance_handle_in_user : in INSTANCE_HANDLE_TYPE;
|
||||
source_ts_user : in TIME_TYPE;
|
||||
max_wait_user : in DURATION_TYPE;
|
||||
done_user : out std_logic;
|
||||
return_code_user : out std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
ready_out_user : in std_logic;
|
||||
valid_out_user : out std_logic;
|
||||
data_out_user : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
last_word_out_user : out std_logic;
|
||||
instance_handle_out_user : out INSTANCE_HANDLE_TYPE;
|
||||
-- Communication Status
|
||||
status_user : out std_logic_vector(STATUS_KIND_WIDTH-1 downto 0);
|
||||
|
||||
@ -84,19 +85,16 @@ architecture arch of Type1_writer_wrapper is
|
||||
begin
|
||||
|
||||
-- PASSTHROUGH
|
||||
start_dds <= start_user;
|
||||
ack_user <= ack_dds;
|
||||
opcode_dds <= opcode_user;
|
||||
instance_handle_dds <= instance_handle_user;
|
||||
source_ts_dds <= source_ts_user;
|
||||
max_wait_dds <= max_wait_user;
|
||||
done_user <= done_dds;
|
||||
return_code_user <= return_code_dds;
|
||||
ready_in_dds <= ready_out_user;
|
||||
valid_out_user <= valid_in_dds;
|
||||
data_out_user <= data_in_dds;
|
||||
last_word_out_user <= last_word_in_dds;
|
||||
status_user <= status_dds;
|
||||
start_dds <= start_user;
|
||||
ack_user <= ack_dds;
|
||||
opcode_dds <= opcode_user;
|
||||
instance_handle_out_dds <= instance_handle_in_user;
|
||||
source_ts_dds <= source_ts_user;
|
||||
max_wait_dds <= max_wait_user;
|
||||
done_user <= done_dds;
|
||||
return_code_user <= return_code_dds;
|
||||
instance_handle_out_user <= instance_handle_in_dds;
|
||||
status_user <= status_dds;
|
||||
|
||||
main_prc : process (all)
|
||||
begin
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
-- 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;
|
||||
@ -78,7 +81,7 @@ entity Type2_reader_wrapper is
|
||||
status_user : out std_logic_vector(STATUS_KIND_WIDTH-1 downto 0);
|
||||
decode_error : out std_logic;
|
||||
|
||||
-- TYPE SPECIFIC PORTS
|
||||
-- ###GENERATED START###
|
||||
id : out std_logic_vector(CDR_LONG_WIDTH-1 downto 0);
|
||||
TestSequence_len : out std_logic_vector(TESTSEQUENCE_ADDR_WIDTH-1 downto 0);
|
||||
TestSequence_addr : in std_logic_vector(TESTSEQUENCE_ADDR_WIDTH-1 downto 0);
|
||||
@ -118,6 +121,7 @@ entity Type2_reader_wrapper is
|
||||
TestString_valid : out std_logic;
|
||||
TestString_ack : in std_logic;
|
||||
TestString : out std_logic_vector(CDR_CHAR_WIDTH-1 downto 0);
|
||||
-- ###GENERATED END###
|
||||
valid : out std_logic
|
||||
);
|
||||
end entity;
|
||||
@ -146,10 +150,10 @@ architecture arch of Type2_reader_wrapper is
|
||||
signal optional, optional_next : std_logic;
|
||||
signal abort_mem : std_logic;
|
||||
signal ready_in_dds_sig : std_logic;
|
||||
-- ###GENERATED START###
|
||||
signal decode_stage, decode_stage_next : DECODE_STAGE_TYPE;
|
||||
signal valid_latch, valid_latch_next : std_logic;
|
||||
signal decode_stage, decode_stage_next : DECODE_STAGE_TYPE;
|
||||
signal return_stage, return_stage_next : DECODE_STAGE_TYPE;
|
||||
-- ###GENERATED START###
|
||||
signal dw_latch, dw_latch_next : std_logic_vector(CDR_LONG_LONG_WIDTH-1 downto 0);
|
||||
signal qw_latch, qw_latch_next : std_logic_vector(CDR_LONG_DOUBLE_WIDTH-1 downto 0);
|
||||
signal id_latch, id_latch_next : std_logic_vector(CDR_LONG_WIDTH-1 downto 0);
|
||||
@ -651,7 +655,7 @@ begin
|
||||
end if;
|
||||
when DECODE_PAYLOAD =>
|
||||
case (decode_stage) is
|
||||
-- ###GENERATED START###
|
||||
-- ###GENERATED START###
|
||||
when GET_ID =>
|
||||
-- ALIGN GUARD
|
||||
if (not check_align(align_offset, ALIGN_4)) then
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
-- 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;
|
||||
@ -18,11 +21,12 @@ entity Type2_writer_wrapper is
|
||||
start_dds : out std_logic;
|
||||
ack_dds : in std_logic;
|
||||
opcode_dds : out DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_dds : out INSTANCE_HANDLE_TYPE;
|
||||
instance_handle_out_dds : out INSTANCE_HANDLE_TYPE;
|
||||
source_ts_dds : out TIME_TYPE;
|
||||
max_wait_dds : out DURATION_TYPE;
|
||||
done_dds : in std_logic;
|
||||
return_code_dds : in std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
instance_handle_in_dds : in INSTANCE_HANDLE_TYPE;
|
||||
ready_out_dds : in std_logic;
|
||||
valid_out_dds : out std_logic;
|
||||
data_out_dds : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
@ -38,20 +42,16 @@ entity Type2_writer_wrapper is
|
||||
start_user : in std_logic;
|
||||
ack_user : out std_logic;
|
||||
opcode_user : in DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_user : in INSTANCE_HANDLE_TYPE;
|
||||
instance_handle_in_user : in INSTANCE_HANDLE_TYPE;
|
||||
source_ts_user : in TIME_TYPE;
|
||||
max_wait_user : in DURATION_TYPE;
|
||||
done_user : out std_logic;
|
||||
return_code_user : out std_logic_vector(RETURN_CODE_WIDTH-1 downto 0);
|
||||
ready_out_user : in std_logic;
|
||||
valid_out_user : out std_logic;
|
||||
data_out_user : out std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
last_word_out_user : out std_logic;
|
||||
instance_handle_out_user : out INSTANCE_HANDLE_TYPE;
|
||||
-- Communication Status
|
||||
status_user : out std_logic_vector(STATUS_KIND_WIDTH-1 downto 0);
|
||||
encode_done : out std_logic;
|
||||
|
||||
-- TYPE SPECIFIC PORTS
|
||||
-- ###GENERATED START###
|
||||
id : in std_logic_vector(CDR_LONG_WIDTH-1 downto 0);
|
||||
TestSequence_len : in std_logic_vector(TESTSEQUENCE_ADDR_WIDTH-1 downto 0);
|
||||
TestSequence_addr : in std_logic_vector(TESTSEQUENCE_ADDR_WIDTH-1 downto 0);
|
||||
@ -103,7 +103,10 @@ entity Type2_writer_wrapper is
|
||||
TestString_valid : out std_logic;
|
||||
TestString_ack : in std_logic;
|
||||
TestString_r : out std_logic_vector(CDR_CHAR_WIDTH-1 downto 0);
|
||||
TestString_w : in std_logic_vector(CDR_CHAR_WIDTH-1 downto 0)
|
||||
TestString_w : in std_logic_vector(CDR_CHAR_WIDTH-1 downto 0);
|
||||
-- ###GENERATED END###
|
||||
|
||||
encode_done : out std_logic
|
||||
);
|
||||
end entity;
|
||||
|
||||
@ -127,8 +130,9 @@ architecture arch of Type2_writer_wrapper is
|
||||
signal data_out_latch, data_out_latch_next : std_logic_vector(WORD_WIDTH-1 downto 0);
|
||||
signal abort_mem : std_logic;
|
||||
signal finalize_payload, finalize_payload_next : std_logic;
|
||||
-- ###GENERATED START###
|
||||
signal encode_stage, encode_stage_next : ENCODE_STAGE_TYPE;
|
||||
|
||||
-- ###GENERATED START###
|
||||
signal TestSequence_cnt, TestSequence_cnt_next : natural range 0 to TESTSEQUENCE_MAX_DEPTH-1;
|
||||
signal TestSequence_addr_latch, TestSequence_addr_latch_next : std_logic_vector(TESTSEQUENCE_ADDR_WIDTH-1 downto 0);
|
||||
signal TestSequence_TestArray_cnt, TestSequence_TestArray_cnt_next : natural range 0 to TESTSEQUENCE_TESTARRAY_MAX_DEPTH-1;
|
||||
@ -337,19 +341,16 @@ begin
|
||||
-- ###GENERATED END###
|
||||
|
||||
-- PASSTHROUGH
|
||||
start_dds <= start_user;
|
||||
ack_user <= ack_dds;
|
||||
opcode_dds <= opcode_user;
|
||||
instance_handle_dds <= instance_handle_user;
|
||||
source_ts_dds <= source_ts_user;
|
||||
max_wait_dds <= max_wait_user;
|
||||
done_user <= done_dds;
|
||||
return_code_user <= return_code_dds;
|
||||
ready_in_dds <= ready_out_user;
|
||||
valid_out_user <= valid_in_dds;
|
||||
data_out_user <= data_in_dds;
|
||||
last_word_out_user <= last_word_in_dds;
|
||||
status_user <= status_dds;
|
||||
start_dds <= start_user;
|
||||
ack_user <= ack_dds;
|
||||
opcode_dds <= opcode_user;
|
||||
instance_handle_out_dds <= instance_handle_in_user;
|
||||
source_ts_dds <= source_ts_user;
|
||||
max_wait_dds <= max_wait_user;
|
||||
done_user <= done_dds;
|
||||
return_code_user <= return_code_dds;
|
||||
instance_handle_out_user <= instance_handle_in_dds;
|
||||
status_user <= status_dds;
|
||||
|
||||
-- ###GENERATED START###
|
||||
TestSequence_valid <= TestSequence_TestChar_mem_valid_out and TestSequence_TestWChar_mem_valid_out and TestSequence_TestLongLong_mem_valid_out and TestSequence_TestLongDouble_mem_valid_out;
|
||||
@ -565,8 +566,8 @@ begin
|
||||
end if;
|
||||
end if;
|
||||
when ENCODE_PAYLOAD =>
|
||||
-- ###GENERATED START###
|
||||
case (encode_stage) is
|
||||
-- ###GENERATED START###
|
||||
when WRITE_ID =>
|
||||
-- ALIGN GUARD
|
||||
if (not check_align(align_offset, ALIGN_4)) then
|
||||
@ -1121,10 +1122,10 @@ begin
|
||||
when others =>
|
||||
end case;
|
||||
end if;
|
||||
-- ###GENERATED END###
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
-- ###GENERATED END###
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
|
||||
@ -54,11 +54,12 @@ entity dds_writer is
|
||||
start_dds : in std_logic;
|
||||
ack_dds : out std_logic;
|
||||
opcode_dds : in DDS_WRITER_OPCODE_TYPE;
|
||||
instance_handle_dds : in INSTANCE_HANDLE_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);
|
||||
@ -695,6 +696,7 @@ begin
|
||||
ret_rtps <= ERROR;
|
||||
return_code_dds <= RETCODE_UNSUPPORTED;
|
||||
opcode_kh <= NOP;
|
||||
instance_handle_out_dds <= HANDLE_NIL;
|
||||
ack_dds <= '0';
|
||||
done_dds <= '0';
|
||||
ack_rtps <= '0';
|
||||
@ -941,7 +943,7 @@ begin
|
||||
lease_deadline_next <= time + LEASE_DURATION;
|
||||
|
||||
-- Latch Input Signals
|
||||
instance_handle_next <= instance_handle_dds;
|
||||
instance_handle_next <= instance_handle_in_dds;
|
||||
source_ts_next <= source_ts_dds;
|
||||
|
||||
-- NOTE: The ALIGNED_FLAG is set by default. if actual Payload is not aligned, need to reset.
|
||||
@ -982,8 +984,8 @@ begin
|
||||
end if;
|
||||
else
|
||||
-- Instance Handle provided
|
||||
if (WITH_KEY and instance_handle_dds /= HANDLE_NIL) then
|
||||
key_hash_next <= instance_handle_dds;
|
||||
if (WITH_KEY and instance_handle_in_dds /= HANDLE_NIL) then
|
||||
key_hash_next <= instance_handle_in_dds;
|
||||
stage_next <= INITIATE_INSTANCE_SEARCH;
|
||||
cnt_next <= 0;
|
||||
else
|
||||
@ -998,7 +1000,7 @@ begin
|
||||
lease_deadline_next <= time + LEASE_DURATION;
|
||||
|
||||
-- Latch Input Signals
|
||||
instance_handle_next <= instance_handle_dds;
|
||||
instance_handle_next <= instance_handle_in_dds;
|
||||
source_ts_next <= source_ts_dds;
|
||||
|
||||
-- NOTE: The ALIGNED_FLAG is set by default. if actual Payload is not aligned, need to reset.
|
||||
@ -1037,8 +1039,8 @@ begin
|
||||
end if;
|
||||
else
|
||||
-- Instance Handle provided
|
||||
if (WITH_KEY and instance_handle_dds /= HANDLE_NIL) then
|
||||
key_hash_next <= instance_handle_dds;
|
||||
if (WITH_KEY and instance_handle_in_dds /= HANDLE_NIL) then
|
||||
key_hash_next <= instance_handle_in_dds;
|
||||
stage_next <= INITIATE_INSTANCE_SEARCH;
|
||||
cnt_next <= 0;
|
||||
else
|
||||
@ -1053,7 +1055,7 @@ begin
|
||||
lease_deadline_next <= time + LEASE_DURATION;
|
||||
|
||||
-- Latch Input Signals
|
||||
instance_handle_next <= instance_handle_dds;
|
||||
instance_handle_next <= instance_handle_in_dds;
|
||||
source_ts_next <= source_ts_dds;
|
||||
|
||||
-- NOTE: The ALIGNED_FLAG is set by default. if actual Payload is not aligned, need to reset.
|
||||
@ -1092,8 +1094,8 @@ begin
|
||||
end if;
|
||||
else
|
||||
-- Instance Handle provided
|
||||
if (WITH_KEY and instance_handle_dds /= HANDLE_NIL) then
|
||||
key_hash_next <= instance_handle_dds;
|
||||
if (WITH_KEY and instance_handle_in_dds /= HANDLE_NIL) then
|
||||
key_hash_next <= instance_handle_in_dds;
|
||||
stage_next <= INITIATE_INSTANCE_SEARCH;
|
||||
cnt_next <= 0;
|
||||
else
|
||||
@ -1535,7 +1537,6 @@ begin
|
||||
if (inst_addr_base /= INSTANCE_MEMORY_MAX_ADDRESS) then
|
||||
-- Accept Registration
|
||||
stage_next <= PUSH_KEY_HASH;
|
||||
cnt_next <= 0;
|
||||
|
||||
-- Instance is Unregistered
|
||||
if (inst_data.status_info(ISI_UNREGISTERED_FLAG) = '1') then
|
||||
@ -1566,12 +1567,10 @@ begin
|
||||
-- Reject Registration
|
||||
key_hash_next <= KEY_HASH_NIL;
|
||||
stage_next <= PUSH_KEY_HASH;
|
||||
cnt_next <= 0;
|
||||
end if;
|
||||
else
|
||||
-- Accept Registration
|
||||
stage_next <= PUSH_KEY_HASH;
|
||||
cnt_next <= 0;
|
||||
|
||||
-- Insert New Instance
|
||||
inst_op_start <= '1';
|
||||
@ -1591,58 +1590,18 @@ begin
|
||||
-- Instance Found
|
||||
if (inst_addr_base /= INSTANCE_MEMORY_MAX_ADDRESS) then
|
||||
stage_next <= PUSH_KEY_HASH;
|
||||
cnt_next <= 0;
|
||||
else
|
||||
-- Return Special Value
|
||||
key_hash_next <= KEY_HASH_NIL;
|
||||
stage_next <= PUSH_KEY_HASH;
|
||||
cnt_next <= 0;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
when PUSH_KEY_HASH =>
|
||||
case (cnt) is
|
||||
-- Key Hash 1/4
|
||||
when 0 =>
|
||||
valid_out_dds <= '1';
|
||||
data_out_dds <= key_hash(0);
|
||||
|
||||
-- Output Guard
|
||||
if (ready_out_dds = '1') then
|
||||
cnt_next <= cnt + 1;
|
||||
end if;
|
||||
-- Key Hash 2/4
|
||||
when 1 =>
|
||||
valid_out_dds <= '1';
|
||||
data_out_dds <= key_hash(1);
|
||||
|
||||
-- Output Guard
|
||||
if (ready_out_dds = '1') then
|
||||
cnt_next <= cnt + 1;
|
||||
end if;
|
||||
-- Key Hash 3/4
|
||||
when 2 =>
|
||||
valid_out_dds <= '1';
|
||||
data_out_dds <= key_hash(2);
|
||||
|
||||
-- Output Guard
|
||||
if (ready_out_dds = '1') then
|
||||
cnt_next <= cnt + 1;
|
||||
end if;
|
||||
-- Key Hash 4/4
|
||||
when 3 =>
|
||||
valid_out_dds <= '1';
|
||||
data_out_dds <= key_hash(3);
|
||||
last_word_out_dds <= '1';
|
||||
|
||||
-- Output Guard
|
||||
if (ready_out_dds = '1') then
|
||||
-- DONE
|
||||
stage_next <= IDLE;
|
||||
end if;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
done_dds <= '1';
|
||||
instance_handle_out_dds <= key_hash;
|
||||
-- DONE
|
||||
stage_next <= IDLE;
|
||||
when FILTER_STAGE =>
|
||||
-- Precondition: cur_sample set, inst_data set (IMF_SAMPLE_CNT_FLAG, IMF_ACK_CNT_FLAG)
|
||||
|
||||
@ -2713,7 +2672,6 @@ begin
|
||||
if (register_op = '1') then
|
||||
-- DONE
|
||||
stage_next <= PUSH_KEY_HASH;
|
||||
cnt_next <= 0;
|
||||
else
|
||||
stage_next <= FINALIZE_PAYLOAD;
|
||||
cnt_next <= 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user