Commit f61e1cb0 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

Modified Traffic measure, Transceiver delay and TX arb time

feature tests with IP-XACT generated constants
parent 13cdf816
......@@ -115,9 +115,9 @@ package body traf_meas_feature is
-- Check the TX RX counters
--------------------------------------------
CAN_read(r_data,TX_COUNTER_ADR,ID_1,mem_bus_1);
tx_ctr:= to_integer(unsigned(r_data));
tx_ctr:= to_integer(unsigned(r_data(TX_COUNTER_VAL_H downto TX_COUNTER_VAL_L)));
CAN_read(r_data,RX_COUNTER_ADR,ID_2,mem_bus_2);
rx_ctr:= to_integer(unsigned(r_data));
rx_ctr:= to_integer(unsigned(r_data(RX_COUNTER_VAL_H downto RX_COUNTER_VAL_L)));
--------------------------------------------
-- Generate the CAN frames to send
......@@ -137,9 +137,9 @@ package body traf_meas_feature is
-- Check the TX RX counters
--------------------------------------------
CAN_read(r_data,TX_COUNTER_ADR,ID_1,mem_bus_1);
tx_ctr_2:= to_integer(unsigned(r_data));
tx_ctr_2:= to_integer(unsigned(r_data(TX_COUNTER_VAL_H downto TX_COUNTER_VAL_L)));
CAN_read(r_data,RX_COUNTER_ADR,ID_2,mem_bus_2);
rx_ctr_2:= to_integer(unsigned(r_data));
rx_ctr_2:= to_integer(unsigned(r_data(RX_COUNTER_VAL_H downto RX_COUNTER_VAL_L)));
if(tx_ctr+aux+1 /= tx_ctr_2)then
outcome:=false;
......
......@@ -62,6 +62,7 @@ USE work.CANtestLib.All;
USE work.randomLib.All;
use work.CAN_FD_register_map.all;
use work.CAN_FD_frame_format.all;
package tran_delay_feature is
......@@ -111,9 +112,9 @@ package body tran_delay_feature is
--Generate CAN frame
----------------------------------------------
CAN_generate_frame(rand_ctr,CAN_frame);
CAN_frame.rtr:='0';
CAN_frame.frame_format:='1';
CAN_frame.brs:='1';
CAN_frame.rtr:= NO_RTR_FRAME;
CAN_frame.frame_format:= FD_CAN;
CAN_frame.brs:=BR_SHIFT;
CAN_send_frame(CAN_frame,1,ID_1,mem_bus_1,frame_sent);
CAN_wait_frame_sent(ID_2,mem_bus_2);
......
......@@ -251,11 +251,11 @@ package body tx_arb_time_tran_feature is
--report "Checking the data";
CAN_read(r_data,TX_STATUS_ADR,ID_1,mem_bus_1);
if(rand_value<rand_value_2)then
if(r_data(0)='0' or r_data(1)='1')then
if(r_data(TXT1_EMPTY_IND)='0' or r_data(TXT2_EMPTY_IND)='1')then
outcome:=false;
end if;
else
if(r_data(1)='0' or r_data(0)='1')then
if(r_data(TXT2_EMPTY_IND)='0' or r_data(TXT1_EMPTY_IND)='1')then
outcome:=false;
end if;
end if;
......@@ -309,11 +309,11 @@ package body tx_arb_time_tran_feature is
------------------------------------------
CAN_read(r_data,TX_STATUS_ADR,ID_1,mem_bus_1);
if(CAN_frame.identifier<=CAN_frame_2.identifier)then
if(r_data(0)='0' or r_data(1)='1')then
if(r_data(TXT1_EMPTY_IND)='0' or r_data(TXT2_EMPTY_IND)='1')then
outcome:=false;
end if;
else
if(r_data(1)='0' or r_data(0)='1')then
if(r_data(TXT2_EMPTY_IND)='0' or r_data(TXT1_EMPTY_IND)='1')then
outcome:=false;
end if;
end if;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment