Commit 01be7dd4 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

Changed reg. map indices for STATUS register.

parent 67fac0a1
......@@ -1768,7 +1768,7 @@ begin
-- it directly!
-- Status register
status_reg(BS_IND mod 8) <= '1' when
status_reg(IDLE_IND mod 8) <= '1' when
error_state_type'VAL(to_integer(unsigned(
stat_bus(STAT_ERROR_STATE_HIGH downto
STAT_ERROR_STATE_LOW)))) = bus_off
......@@ -1786,7 +1786,7 @@ begin
else
'0';
status_reg(ES_IND mod 8) <= '1' when
status_reg(EWL_IND mod 8) <= '1' when
(ewl < stat_bus(STAT_TX_COUNTER_HIGH downto
STAT_TX_COUNTER_LOW) or
(ewl < stat_bus(STAT_RX_COUNTER_HIGH downto
......@@ -1794,19 +1794,19 @@ begin
else
'0';
status_reg(TS_IND mod 8) <= '1' when oper_mode_type'VAL(to_integer(unsigned(
status_reg(TXS_IND mod 8) <= '1' when oper_mode_type'VAL(to_integer(unsigned(
stat_bus(STAT_OP_STATE_HIGH downto
STAT_OP_STATE_LOW)))) = transciever
else
'0';
status_reg(RS_IND mod 8) <= '1' when oper_mode_type'VAL(to_integer(unsigned(
status_reg(RXS_IND mod 8) <= '1' when oper_mode_type'VAL(to_integer(unsigned(
stat_bus(STAT_OP_STATE_HIGH downto
STAT_OP_STATE_LOW)))) = reciever
else
'0';
status_reg(TBS_IND mod 8) <= '1' when (txtb_fsms(0) = txt_empty or
status_reg(TXNF_IND mod 8) <= '1' when (txtb_fsms(0) = txt_empty or
txtb_fsms(1) = txt_empty or
txtb_fsms(2) = txt_empty or
txtb_fsms(3) = txt_empty)
......@@ -1815,9 +1815,9 @@ begin
-- When at least one message is availiable in the buffer
status_reg(RXNE_IND mod 8) <= not rx_empty;
status_reg(DOS_IND mod 8) <= rx_data_overrun;
status_reg(DOR_IND mod 8) <= rx_data_overrun;
status_reg(ET_IND mod 8) <= '1' when (PC_state = error)
status_reg(EFT_IND mod 8) <= '1' when (PC_state = error)
else
'0';
......
......@@ -3472,13 +3472,13 @@ package body CANtestLib is
-- Wait until unit starts to transmitt or reciesve
CAN_read(r_data, MODE_ADR, ID, mem_bus);
while (r_data(RS_IND) = '0' and r_data(TS_IND) = '0') loop
while (r_data(RXS_IND) = '0' and r_data(TXS_IND) = '0') loop
CAN_read(r_data, MODE_ADR, ID, mem_bus);
end loop;
-- Wait until bus is idle now
CAN_read(r_data, MODE_ADR, ID, mem_bus);
while (r_data(BS_IND) = '0') loop
while (r_data(IDLE_IND) = '0') loop
CAN_read(r_data, MODE_ADR, ID, mem_bus);
end loop;
......@@ -3494,7 +3494,7 @@ package body CANtestLib is
begin
-- Wait until bus is idle
CAN_read(r_data, MODE_ADR, ID, mem_bus);
while (r_data(BS_IND) = '0') loop
while (r_data(IDLE_IND) = '0') loop
CAN_read(r_data, MODE_ADR, ID, mem_bus);
end loop;
end procedure;
......@@ -3509,13 +3509,13 @@ package body CANtestLib is
begin
-- Wait until unit starts to transmitt or recieve
CAN_read(r_data, MODE_ADR, ID, mem_bus);
while (r_data(RS_IND) = '0' and r_data(TS_IND) = '0') loop
while (r_data(RXS_IND) = '0' and r_data(TXS_IND) = '0') loop
CAN_read(r_data, MODE_ADR, ID, mem_bus);
end loop;
-- Wait until error frame is not being transmitted
CAN_read(r_data, MODE_ADR, ID, mem_bus);
while (r_data(ET_IND) = '0') loop
while (r_data(EFT_IND) = '0') loop
CAN_read(r_data, MODE_ADR, ID, mem_bus);
end loop;
end procedure;
......@@ -3572,10 +3572,10 @@ package body CANtestLib is
-- Wait until unit starts to transmitt or recieve
while (true) loop
CAN_read(r_data, MODE_ADR, ID, mem_bus);
if (exit_trans and r_data(TS_IND) = '1') then
if (exit_trans and r_data(TXS_IND) = '1') then
exit;
end if;
if (exit_rec and r_data(RS_IND) = '1') then
if (exit_rec and r_data(RXS_IND) = '1') then
exit;
end if;
end loop;
......@@ -3951,31 +3951,31 @@ package body CANtestLib is
status.receive_buffer := true;
end if;
if (data(DOS_IND) = '1') then
if (data(DOR_IND) = '1') then
status.data_overrun := true;
end if;
if (data(TBS_IND) = '1') then
if (data(TXNF_IND) = '1') then
status.tx_buffer_empty := true;
end if;
if (data(ET_IND) = '1') then
if (data(EFT_IND) = '1') then
status.error_transmission := true;
end if;
if (data(RS_IND) = '1') then
if (data(RXS_IND) = '1') then
status.receiver := true;
end if;
if (data(TS_IND) = '1') then
if (data(TXS_IND) = '1') then
status.transmitter := true;
end if;
if (data(ES_IND) = '1') then
if (data(EWL_IND) = '1') then
status.error_warning := true;
end if;
if (data(BS_IND) = '1') then
if (data(IDLE_IND) = '1') then
status.bus_status := true;
end if;
end procedure;
......
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