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

src, test: Rename EPI to FCSI to be exact.

parent bd5b5cf0
......@@ -8767,7 +8767,7 @@ ALI\end_layout
\begin_inset Text
\begin_layout Plain Layout
EPI\end_layout
FCSI\end_layout
\end_inset
</cell>
......@@ -8904,7 +8904,7 @@ EWLI Error Warning Limit interrupt. When TX Error Counter (TXC) or RX Error Coun
DOI Data Overrun on RX Buffer Interrupt. Before this interrupt is cleared , STATUS[DOR] must be cleared to avoid setting of this interrupt again. Interrupt clear has priority over set.
\end_layout
\begin_layout Description
EPI CTU CAN FD became Error Passive or Bus Off interrupt. Interrupt set has priority over clear.
FCSI Fault confinement state changed Interrupt. Interrupt is set when node turns Error Passive (from Error Active), Bus Off (from Error Passive) or Error Active (from Bus off after reintegration or from Error Passive). Interrupt set has priority over clear.
\end_layout
\begin_layout Description
ALI Arbitration Lost Interrupt. Interrupt set has priority over clear.
......@@ -267,7 +267,7 @@ union ctu_can_fd_int_stat {
uint32_t txi : 1;
uint32_t ewli : 1;
uint32_t doi : 1;
uint32_t epi : 1;
uint32_t fcsi : 1;
uint32_t ali : 1;
uint32_t bei : 1;
uint32_t ofi : 1;
......@@ -285,7 +285,7 @@ union ctu_can_fd_int_stat {
uint32_t ofi : 1;
uint32_t bei : 1;
uint32_t ali : 1;
uint32_t epi : 1;
uint32_t fcsi : 1;
uint32_t doi : 1;
uint32_t ewli : 1;
uint32_t txi : 1;
......
......@@ -582,9 +582,9 @@
<ipxact:modifiedWriteValue>clear</ipxact:modifiedWriteValue>
</ipxact:field>
<ipxact:field>
<ipxact:name>EPI</ipxact:name>
<ipxact:displayName>EPI</ipxact:displayName>
<ipxact:description>CTU CAN FD became Error Passive or Bus Off interrupt. Interrupt set has priority over clear.</ipxact:description>
<ipxact:name>FCSI</ipxact:name>
<ipxact:displayName>FCSI</ipxact:displayName>
<ipxact:description>Fault confinement state changed Interrupt. Interrupt is set when node turns Error Passive (from Error Active), Bus Off (from Error Passive) or Error Active (from Bus off after reintegration or from Error Passive). Interrupt set has priority over clear.</ipxact:description>
<ipxact:bitOffset>4</ipxact:bitOffset>
<ipxact:resets>
<ipxact:reset>
......
......@@ -209,8 +209,8 @@ entity can_core is
-- Error is detected (Error frame will be transmitted)
err_detected :out std_logic;
-- Error passive state changed
err_passive_changed :out std_logic;
-- Fault confinement state changed
fcs_changed :out std_logic;
-- Error warning limit reached
err_warning_limit :out std_logic;
......@@ -354,8 +354,8 @@ architecture rtl of can_core is
signal br_shifted_i : std_logic;
-- Fault confinement status signals
signal err_passive_changed_i : std_logic;
signal err_warning_limit_i : std_logic;
signal fcs_changed_i : std_logic;
signal err_warning_limit_i : std_logic;
signal tx_err_ctr : std_logic_vector(8 downto 0);
signal rx_err_ctr : std_logic_vector(8 downto 0);
......@@ -606,7 +606,7 @@ begin
drv_bus => drv_bus, -- IN
-- Error signalling for interrupts
err_passive_changed => err_passive_changed_i, -- OUT
fcs_changed => fcs_changed_i, -- OUT
err_warning_limit => err_warning_limit_i, -- OUT
-- Operation control Interface
......@@ -1082,8 +1082,8 @@ begin
stat_bus(STAT_TX_CTR_HIGH downto STAT_TX_CTR_LOW) <=
tx_ctr;
stat_bus(STAT_ERP_CHANGED_INDEX) <=
err_passive_changed_i;
stat_bus(STAT_FCS_CHANGED_INDEX) <=
fcs_changed_i;
stat_bus(STAT_EWL_REACHED_INDEX) <=
err_warning_limit_i;
......@@ -1122,7 +1122,7 @@ begin
tran_valid <= tran_valid_i;
br_shifted <= br_shifted_i;
err_detected <= err_detected_i;
err_passive_changed <= err_passive_changed_i;
fcs_changed <= fcs_changed_i;
err_warning_limit <= err_warning_limit_i;
sync_control <= sync_control_i;
tx_data_wbs <= tx_data_wbs_i;
......
......@@ -89,8 +89,8 @@ entity fault_confinement is
-----------------------------------------------------------------------
-- Error signalling for interrupts
-----------------------------------------------------------------------
-- Error passive state changed
err_passive_changed :out std_logic;
-- Fault confinement state changed
fcs_changed :out std_logic;
-- Error warning limit was reached
err_warning_limit :out std_logic;
......@@ -234,7 +234,7 @@ begin
is_err_passive => is_err_passive, -- OUT
is_bus_off => is_bus_off, -- OUT
err_passive_changed => err_passive_changed, -- OUT
fcs_changed => fcs_changed, -- OUT
err_warning_limit => err_warning_limit -- OUT
);
......
......@@ -118,8 +118,8 @@ entity fault_confinement_fsm is
-----------------------------------------------------------------------
-- Status outputs
-----------------------------------------------------------------------
-- Error passive state changed
err_passive_changed :out std_logic;
-- Fault confinement state changed
fcs_changed :out std_logic;
-- Error warning limit was reached
err_warning_limit :out std_logic
......@@ -213,21 +213,16 @@ begin
---------------------------------------------------------------------------
-- Current state
---------------------------------------------------------------------------
fc_fsm_curr_state_proc : process(curr_state, tx_err_ctr_mt_255,
tx_err_ctr_mt_erp, rx_err_ctr_mt_erp, set_err_active)
fc_fsm_curr_state_proc : process(curr_state)
begin
is_err_active <= '0';
is_err_passive <= '0';
is_bus_off <= '0';
err_passive_changed <= '0';
case curr_state is
when s_fc_err_active =>
is_err_active <= '1';
if (tx_err_ctr_mt_erp = '1' or rx_err_ctr_mt_erp = '1') then
err_passive_changed <= '1';
end if;
when s_fc_err_passive =>
is_err_passive <= '1';
......@@ -236,5 +231,9 @@ begin
end case;
end process;
-- Fault confinement state changed when current state is not equal to
-- Next state.
fcs_changed <= '1' when (curr_state /= next_state) else
'0';
end architecture;
end architecture;
\ No newline at end of file
......@@ -376,11 +376,11 @@ architecture rtl of can_top_level is
-- Error appeared
signal err_detected : std_logic;
-- Error pasive /Error acitve functionality changed
signal err_passive_changed : std_logic;
-- Fault confinement state functionality changed
signal fcs_changed : std_logic;
-- Error warning limit reached
signal err_warning_limit : std_logic;
signal err_warning_limit : std_logic;
-- Arbitration was lost input
signal arbitration_lost : std_logic;
......@@ -709,7 +709,7 @@ begin
-- Interrupt sources
err_detected => err_detected, -- IN
err_passive_changed => err_passive_changed, -- IN
fcs_changed => fcs_changed, -- IN
err_warning_limit => err_warning_limit, -- IN
arbitration_lost => arbitration_lost, -- IN
tran_valid => tran_valid, -- IN
......@@ -784,7 +784,7 @@ begin
tran_valid => tran_valid, -- OUT
br_shifted => br_shifted, -- OUT
err_detected => err_detected, -- OUT
err_passive_changed => err_passive_changed, -- OUT
fcs_changed => fcs_changed, -- OUT
err_warning_limit => err_warning_limit, -- OUT
is_overload => is_overload, -- OUT
......
......@@ -95,8 +95,8 @@ entity int_manager is
-- Error appeared
err_detected :in std_logic;
-- Error pasive /Error acitve functionality changed
err_passive_changed :in std_logic;
-- Fault confinement state changed
fcs_changed :in std_logic;
-- Error warning limit reached
err_warning_limit :in std_logic;
......@@ -232,7 +232,7 @@ begin
int_input_active(TXI_IND) <= tran_valid;
int_input_active(EWLI_IND) <= err_warning_limit;
int_input_active(DOI_IND) <= rx_data_overrun;
int_input_active(EPI_IND) <= err_passive_changed;
int_input_active(FCSI_IND) <= fcs_changed;
int_input_active(ALI_IND) <= arbitration_lost;
int_input_active(BEI_IND) <= err_detected;
int_input_active(RXFI_IND) <= rx_full;
......@@ -325,11 +325,11 @@ begin
-- (int_vect_i(DOI_IND) = '1' and int_ena(DOI_IND) = '1');
-- psl epi_int_set_cov : cover
-- {int_vect_i(EPI_IND) = '0';int_vect_i(EPI_IND) = '1'};
-- psl fcsi_int_set_cov : cover
-- {int_vect_i(FCSI_IND) = '0';int_vect_i(FCSI_IND) = '1'};
-- psl epi_enable_cov : cover
-- (int_vect_i(EPI_IND) = '1' and int_ena(EPI_IND) = '1');
-- psl fcsi_enable_cov : cover
-- (int_vect_i(FCSI_IND) = '1' and int_ena(FCSI_IND) = '1');
-- psl ali_int_set_cov : cover
......
......@@ -869,7 +869,7 @@ package can_components is
-- Status outputs
-----------------------------------------------------------------------
-- Error passive state changed
err_passive_changed :out std_logic;
fcs_changed :out std_logic;
-- Error warning limit was reached
err_warning_limit :out std_logic
......@@ -951,7 +951,7 @@ package can_components is
-- Error signalling for interrupts
-----------------------------------------------------------------------
-- Error passive state changed
err_passive_changed :out std_logic;
fcs_changed :out std_logic;
-- Error warning limit was reached
err_warning_limit :out std_logic;
......@@ -2535,8 +2535,8 @@ package can_components is
-- Error is detected (Error frame will be transmitted)
err_detected :out std_logic;
-- Error passive state changed
err_passive_changed :out std_logic;
-- Fault confinement state changed
fcs_changed :out std_logic;
-- Error warning limit reached
err_warning_limit :out std_logic;
......@@ -2758,8 +2758,8 @@ package can_components is
-- Error appeared
err_detected :in std_logic;
-- Error pasive /Error acitve functionality changed
err_passive_changed :in std_logic;
-- Fault confinement state changed
fcs_changed :in std_logic;
-- Error warning limit reached
err_warning_limit :in std_logic;
......
......@@ -623,7 +623,7 @@ package can_fd_register_map is
constant TXI_IND : natural := 1;
constant EWLI_IND : natural := 2;
constant DOI_IND : natural := 3;
constant EPI_IND : natural := 4;
constant FCSI_IND : natural := 4;
constant ALI_IND : natural := 5;
constant BEI_IND : natural := 6;
constant OFI_IND : natural := 7;
......@@ -637,7 +637,7 @@ package can_fd_register_map is
constant TXI_RSTVAL : std_logic := '0';
constant EWLI_RSTVAL : std_logic := '0';
constant DOI_RSTVAL : std_logic := '0';
constant EPI_RSTVAL : std_logic := '0';
constant FCSI_RSTVAL : std_logic := '0';
constant ALI_RSTVAL : std_logic := '0';
constant BEI_RSTVAL : std_logic := '0';
constant RXFI_RSTVAL : std_logic := '0';
......
......@@ -360,7 +360,7 @@ package drv_stat_pkg is
constant STAT_TX_CTR_HIGH : natural := 251;
constant STAT_TX_CTR_LOW : natural := 220;
constant STAT_ERP_CHANGED_INDEX : natural := 252;
constant STAT_FCS_CHANGED_INDEX : natural := 252;
constant STAT_EWL_REACHED_INDEX : natural := 253;
constant STAT_ERR_VALID_INDEX : natural := 254;
......
......@@ -186,7 +186,7 @@ package CANtestLib is
transmitt_int : boolean;
error_warning_int : boolean;
data_overrun_int : boolean;
error_passive_int : boolean;
fcs_changed_int : boolean;
arb_lost_int : boolean;
bus_error_int : boolean;
logger_finished_int : boolean;
......@@ -4175,8 +4175,8 @@ package body CANtestLib is
tmp(DOI_IND) := '1';
end if;
if (interrupts.error_passive_int) then
tmp(EPI_IND) := '1';
if (interrupts.fcs_changed_int) then
tmp(FCSI_IND) := '1';
end if;
if (interrupts.arb_lost_int) then
......@@ -4231,8 +4231,8 @@ package body CANtestLib is
tmp.data_overrun_int := true;
end if;
if (int_reg(EPI_IND) = '1') then
tmp.error_passive_int := true;
if (int_reg(FCSI_IND) = '1') then
tmp.fcs_changed_int := true;
end if;
if (int_reg(ALI_IND) = '1') then
......
......@@ -70,8 +70,8 @@ architecture int_man_unit_test of CAN_test is
-- Valid Error appeared for interrupt
signal err_detected : std_logic := '0';
-- Error pasive /Error acitve functionality changed
signal err_passive_changed : std_logic := '0';
-- Fault confinement state changed
signal fcs_changed : std_logic := '0';
-- Error warning limit reached
signal err_warning_limit : std_logic := '0';
......@@ -158,7 +158,7 @@ architecture int_man_unit_test of CAN_test is
signal err_detected :inout std_logic;
-- Error pasive /Error acitve functionality changed
signal err_passive_changed :inout std_logic;
signal fcs_changed :inout std_logic;
-- Error warning limit reached
signal err_warning_limit :inout std_logic;
......@@ -198,10 +198,10 @@ architecture int_man_unit_test of CAN_test is
rand_logic_s(rand_ctr, err_detected, 0.1);
end if;
if (err_passive_changed = '1') then
rand_logic_s(rand_ctr, err_passive_changed, 0.85);
if (fcs_changed = '1') then
rand_logic_s(rand_ctr, fcs_changed, 0.85);
else
rand_logic_s(rand_ctr, err_passive_changed, 0.05);
rand_logic_s(rand_ctr, fcs_changed, 0.05);
end if;
if (err_warning_limit = '1') then
......@@ -328,7 +328,7 @@ begin
clk_sys => clk_sys,
res_n => res_n,
err_detected => err_detected,
err_passive_changed => err_passive_changed,
fcs_changed => fcs_changed,
err_warning_limit => err_warning_limit,
arbitration_lost => arbitration_lost,
tran_valid => tran_valid ,
......@@ -349,7 +349,7 @@ begin
-- Joining interrupt inputs to interrupt status
int_input(BEI_IND) <= err_detected;
int_input(ALI_IND) <= arbitration_lost;
int_input(EPI_IND) <= err_passive_changed;
int_input(FCSI_IND) <= fcs_changed;
int_input(DOI_IND) <= rx_data_overrun;
int_input(EWLI_IND) <= err_warning_limit;
int_input(TXI_IND) <= tran_valid;
......@@ -380,7 +380,7 @@ begin
while true loop
wait until falling_edge(clk_sys);
generate_sources(rand_ctr_1, err_detected, err_passive_changed ,
generate_sources(rand_ctr_1, err_detected, fcs_changed ,
err_warning_limit , arbitration_lost, tran_valid,
br_shifted, rx_data_overrun , rec_valid ,
rx_full , rx_empty, txtb_hw_cmd_int, is_overload);
......
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