Add request ID comparisons to ROS Service Level 1 Tests
This commit is contained in:
parent
6bbb5fc102
commit
b86ef8ec53
@ -184,6 +184,7 @@ begin
|
||||
stimulus_prc : process
|
||||
variable RV : RandomPType;
|
||||
variable A, B, SUM, RET : AlertLogIDType;
|
||||
variable sid : std_logic_vector(ROS_SEQUENCE_ID_WIDTH-1 downto 0);
|
||||
|
||||
procedure wait_on_sig(signal sig : std_logic) is
|
||||
begin
|
||||
@ -350,11 +351,13 @@ begin
|
||||
sample_info_sr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Request on Server", INFO);
|
||||
wait_on_sig(done_c);
|
||||
sid := sequence_id_c;
|
||||
wait_on_sig(done_s);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_s /= ROS_RET_OK, "Server did Return ERROR", FAILURE);
|
||||
AlertIf(taken_s /= '1', "Server did not take Request", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_s.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Request", INFO);
|
||||
AffirmIfEqual(A, a_s, a_c);
|
||||
@ -368,6 +371,7 @@ begin
|
||||
Log("SERVER: Send Response", INFO);
|
||||
start_s <= '1';
|
||||
opcode_s <= SEND_RESPONSE;
|
||||
request_id_s.sequence_number <= to_double_word(unsigned(sid));
|
||||
wait_on_sig(ack_s);
|
||||
wait until rising_edge(clk);
|
||||
start_s <= '0';
|
||||
@ -387,11 +391,12 @@ begin
|
||||
sample_info_cr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Response on Client", INFO);
|
||||
wait_on_sig(done_s);
|
||||
wait_on_sig(done_c);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_c /= ROS_RET_OK, "Client did Return ERROR", FAILURE);
|
||||
AlertIf(taken_c /= '1', "Client did not take Response", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_c.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Response", INFO);
|
||||
AffirmIfEqual(SUM, sum_c, sum_s);
|
||||
|
||||
@ -190,6 +190,7 @@ begin
|
||||
stimulus_prc : process
|
||||
variable RV : RandomPType;
|
||||
variable A, B, SUM, RET : AlertLogIDType;
|
||||
variable sid : std_logic_vector(ROS_SEQUENCE_ID_WIDTH-1 downto 0);
|
||||
|
||||
procedure wait_on_sig(signal sig : std_logic) is
|
||||
begin
|
||||
@ -356,11 +357,13 @@ begin
|
||||
sample_info_sr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Request on Server", INFO);
|
||||
wait_on_sig(done_c);
|
||||
sid := sequence_id_c;
|
||||
wait_on_sig(done_s);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_s /= ROS_RET_OK, "Server did Return ERROR", FAILURE);
|
||||
AlertIf(taken_s /= '1', "Server did not take Request", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_s.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Request", INFO);
|
||||
AffirmIfEqual(A, a_s, a_c);
|
||||
@ -374,6 +377,7 @@ begin
|
||||
Log("SERVER: Send Response", INFO);
|
||||
start_s <= '1';
|
||||
opcode_s <= SEND_RESPONSE;
|
||||
request_id_s.sequence_number <= to_double_word(unsigned(sid));
|
||||
wait_on_sig(ack_s);
|
||||
wait until rising_edge(clk);
|
||||
start_s <= '0';
|
||||
@ -393,11 +397,12 @@ begin
|
||||
sample_info_cr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Response on Client", INFO);
|
||||
wait_on_sig(done_s);
|
||||
wait_on_sig(done_c);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_c /= ROS_RET_OK, "Client did Return ERROR", FAILURE);
|
||||
AlertIf(taken_c /= '1', "Client did not take Response", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_c.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Response", INFO);
|
||||
AffirmIfEqual(SUM, sum_c, sum_s);
|
||||
|
||||
@ -212,6 +212,7 @@ begin
|
||||
stimulus_prc : process
|
||||
variable RV : RandomPType;
|
||||
variable RQ_GOAL_ID, RQ_STAMP, RR_GOAL_ID, RR_STAMP, RR_RETURN_CODE : AlertLogIDType;
|
||||
variable sid : std_logic_vector(ROS_SEQUENCE_ID_WIDTH-1 downto 0);
|
||||
|
||||
procedure wait_on_sig(signal sig : std_logic) is
|
||||
begin
|
||||
@ -381,11 +382,13 @@ begin
|
||||
sample_info_sr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Request on Server", INFO);
|
||||
wait_on_sig(done_c);
|
||||
sid := sequence_id_c;
|
||||
wait_on_sig(done_s);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_s /= ROS_RET_OK, "Server did Return ERROR", FAILURE);
|
||||
AlertIf(taken_s /= '1', "Server did not take Request", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_s.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Request", INFO);
|
||||
AffirmIfEqual(RQ_GOAL_ID, goal_info_goal_id_s, goal_info_goal_id_c);
|
||||
@ -407,6 +410,7 @@ begin
|
||||
Log("SERVER: Send Response", INFO);
|
||||
start_s <= '1';
|
||||
opcode_s <= SEND_RESPONSE;
|
||||
request_id_s.sequence_number <= to_double_word(unsigned(sid));
|
||||
wait_on_sig(ack_s);
|
||||
wait until rising_edge(clk);
|
||||
start_s <= '0';
|
||||
@ -426,11 +430,12 @@ begin
|
||||
sample_info_cr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Response on Client", INFO);
|
||||
wait_on_sig(done_s);
|
||||
wait_on_sig(done_c);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_c /= ROS_RET_OK, "Client did Return ERROR", FAILURE);
|
||||
AlertIf(taken_c /= '1', "Client did not take Response", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_c.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Response", INFO);
|
||||
AffirmIfEqual(RR_RETURN_CODE, return_code_c1, return_code_s1);
|
||||
|
||||
@ -218,6 +218,7 @@ begin
|
||||
stimulus_prc : process
|
||||
variable RV : RandomPType;
|
||||
variable RQ_GOAL_ID, RQ_STAMP, RR_GOAL_ID, RR_STAMP, RR_RETURN_CODE : AlertLogIDType;
|
||||
variable sid : std_logic_vector(ROS_SEQUENCE_ID_WIDTH-1 downto 0);
|
||||
|
||||
procedure wait_on_sig(signal sig : std_logic) is
|
||||
begin
|
||||
@ -387,11 +388,13 @@ begin
|
||||
sample_info_sr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Request on Server", INFO);
|
||||
wait_on_sig(done_c);
|
||||
sid := sequence_id_c;
|
||||
wait_on_sig(done_s);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_s /= ROS_RET_OK, "Server did Return ERROR", FAILURE);
|
||||
AlertIf(taken_s /= '1', "Server did not take Request", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_s.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Request", INFO);
|
||||
AffirmIfEqual(RQ_GOAL_ID, goal_info_goal_id_s, goal_info_goal_id_c);
|
||||
@ -413,6 +416,7 @@ begin
|
||||
Log("SERVER: Send Response", INFO);
|
||||
start_s <= '1';
|
||||
opcode_s <= SEND_RESPONSE;
|
||||
request_id_s.sequence_number <= to_double_word(unsigned(sid));
|
||||
wait_on_sig(ack_s);
|
||||
wait until rising_edge(clk);
|
||||
start_s <= '0';
|
||||
@ -432,11 +436,12 @@ begin
|
||||
sample_info_cr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Response on Client", INFO);
|
||||
wait_on_sig(done_s);
|
||||
wait_on_sig(done_c);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_c /= ROS_RET_OK, "Client did Return ERROR", FAILURE);
|
||||
AlertIf(taken_c /= '1', "Client did not take Response", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_c.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Response", INFO);
|
||||
AffirmIfEqual(RR_RETURN_CODE, return_code_c1, return_code_s1);
|
||||
|
||||
@ -190,6 +190,7 @@ begin
|
||||
stimulus_prc : process
|
||||
variable RV : RandomPType;
|
||||
variable GOAL_ID, ORDER, ACCEPTED, STAMP : AlertLogIDType;
|
||||
variable sid : std_logic_vector(ROS_SEQUENCE_ID_WIDTH-1 downto 0);
|
||||
|
||||
procedure wait_on_sig(signal sig : std_logic) is
|
||||
begin
|
||||
@ -357,11 +358,13 @@ begin
|
||||
sample_info_sr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Request on Server", INFO);
|
||||
wait_on_sig(done_c);
|
||||
sid := sequence_id_c;
|
||||
wait_on_sig(done_s);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_s /= ROS_RET_OK, "Server did Return ERROR", FAILURE);
|
||||
AlertIf(taken_s /= '1', "Server did not take Request", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_s.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Request", INFO);
|
||||
AffirmIfEqual(GOAL_ID, goal_id_s, goal_id_c);
|
||||
@ -376,6 +379,7 @@ begin
|
||||
Log("SERVER: Send Response", INFO);
|
||||
start_s <= '1';
|
||||
opcode_s <= SEND_RESPONSE;
|
||||
request_id_s.sequence_number <= to_double_word(unsigned(sid));
|
||||
wait_on_sig(ack_s);
|
||||
wait until rising_edge(clk);
|
||||
start_s <= '0';
|
||||
@ -395,11 +399,12 @@ begin
|
||||
sample_info_cr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Response on Client", INFO);
|
||||
wait_on_sig(done_s);
|
||||
wait_on_sig(done_c);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_c /= ROS_RET_OK, "Client did Return ERROR", FAILURE);
|
||||
AlertIf(taken_c /= '1', "Client did not take Response", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_c.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Response", INFO);
|
||||
AffirmIfEqual(ACCEPTED, accepted_c, accepted_s);
|
||||
|
||||
@ -196,6 +196,7 @@ begin
|
||||
stimulus_prc : process
|
||||
variable RV : RandomPType;
|
||||
variable GOAL_ID, ORDER, ACCEPTED, STAMP : AlertLogIDType;
|
||||
variable sid : std_logic_vector(ROS_SEQUENCE_ID_WIDTH-1 downto 0);
|
||||
|
||||
procedure wait_on_sig(signal sig : std_logic) is
|
||||
begin
|
||||
@ -363,11 +364,13 @@ begin
|
||||
sample_info_sr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Request on Server", INFO);
|
||||
wait_on_sig(done_c);
|
||||
sid := sequence_id_c;
|
||||
wait_on_sig(done_s);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_s /= ROS_RET_OK, "Server did Return ERROR", FAILURE);
|
||||
AlertIf(taken_s /= '1', "Server did not take Request", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_s.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Request", INFO);
|
||||
AffirmIfEqual(GOAL_ID, goal_id_s, goal_id_c);
|
||||
@ -382,6 +385,7 @@ begin
|
||||
Log("SERVER: Send Response", INFO);
|
||||
start_s <= '1';
|
||||
opcode_s <= SEND_RESPONSE;
|
||||
request_id_s.sequence_number <= to_double_word(unsigned(sid));
|
||||
wait_on_sig(ack_s);
|
||||
wait until rising_edge(clk);
|
||||
start_s <= '0';
|
||||
@ -401,11 +405,12 @@ begin
|
||||
sample_info_cr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Response on Client", INFO);
|
||||
wait_on_sig(done_s);
|
||||
wait_on_sig(done_c);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_c /= ROS_RET_OK, "Client did Return ERROR", FAILURE);
|
||||
AlertIf(taken_c /= '1', "Client did not take Response", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_c.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Response", INFO);
|
||||
AffirmIfEqual(ACCEPTED, accepted_c, accepted_s);
|
||||
|
||||
@ -205,6 +205,7 @@ begin
|
||||
stimulus_prc : process
|
||||
variable RV : RandomPType;
|
||||
variable GOAL_ID, STATUS, SEQ : AlertLogIDType;
|
||||
variable sid : std_logic_vector(ROS_SEQUENCE_ID_WIDTH-1 downto 0);
|
||||
|
||||
procedure wait_on_sig(signal sig : std_logic) is
|
||||
begin
|
||||
@ -370,11 +371,13 @@ begin
|
||||
sample_info_sr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Request on Server", INFO);
|
||||
wait_on_sig(done_c);
|
||||
sid := sequence_id_c;
|
||||
wait_on_sig(done_s);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_s /= ROS_RET_OK, "Server did Return ERROR", FAILURE);
|
||||
AlertIf(taken_s /= '1', "Server did not take Request", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_s.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Request", INFO);
|
||||
AffirmIfEqual(GOAL_ID, goal_id_s, goal_id_c);
|
||||
@ -394,6 +397,7 @@ begin
|
||||
Log("SERVER: Send Response", INFO);
|
||||
start_s <= '1';
|
||||
opcode_s <= SEND_RESPONSE;
|
||||
request_id_s.sequence_number <= to_double_word(unsigned(sid));
|
||||
wait_on_sig(ack_s);
|
||||
wait until rising_edge(clk);
|
||||
start_s <= '0';
|
||||
@ -413,11 +417,12 @@ begin
|
||||
sample_info_cr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Response on Client", INFO);
|
||||
wait_on_sig(done_s);
|
||||
wait_on_sig(done_c);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_c /= ROS_RET_OK, "Client did Return ERROR", FAILURE);
|
||||
AlertIf(taken_c /= '1', "Client did not take Response", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_c.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Response", INFO);
|
||||
AffirmIfEqual(STATUS, status_c, status_s);
|
||||
|
||||
@ -205,6 +205,7 @@ begin
|
||||
stimulus_prc : process
|
||||
variable RV : RandomPType;
|
||||
variable GOAL_ID, STATUS, SEQ : AlertLogIDType;
|
||||
variable sid : std_logic_vector(ROS_SEQUENCE_ID_WIDTH-1 downto 0);
|
||||
|
||||
procedure wait_on_sig(signal sig : std_logic) is
|
||||
begin
|
||||
@ -370,11 +371,13 @@ begin
|
||||
sample_info_sr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Request on Server", INFO);
|
||||
wait_on_sig(done_c);
|
||||
sid := sequence_id_c;
|
||||
wait_on_sig(done_s);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_s /= ROS_RET_OK, "Server did Return ERROR", FAILURE);
|
||||
AlertIf(taken_s /= '1', "Server did not take Request", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_s.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Request", INFO);
|
||||
AffirmIfEqual(GOAL_ID, goal_id_s, goal_id_c);
|
||||
@ -394,6 +397,7 @@ begin
|
||||
Log("SERVER: Send Response", INFO);
|
||||
start_s <= '1';
|
||||
opcode_s <= SEND_RESPONSE;
|
||||
request_id_s.sequence_number <= to_double_word(unsigned(sid));
|
||||
wait_on_sig(ack_s);
|
||||
wait until rising_edge(clk);
|
||||
start_s <= '0';
|
||||
@ -413,11 +417,12 @@ begin
|
||||
sample_info_cr.valid_data <= '1';
|
||||
|
||||
Log("Wait for Response on Client", INFO);
|
||||
wait_on_sig(done_s);
|
||||
wait_on_sig(done_c);
|
||||
wait until rising_edge(clk);
|
||||
|
||||
wait for 1 ps; -- Make sure all signals stable
|
||||
AlertIf(return_code_c /= ROS_RET_OK, "Client did Return ERROR", FAILURE);
|
||||
AlertIf(taken_c /= '1', "Client did not take Response", FAILURE);
|
||||
AlertIf(to_unsigned(SEQUENCENUMBER_TYPE(service_info_c.request_id.sequence_number)) /= unsigned(sid), "Request ID incorrect", FAILURE);
|
||||
|
||||
Log("Compare Response", INFO);
|
||||
AffirmIfEqual(STATUS, status_c, status_s);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user