Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CTU CAN FD IP Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canbus
CTU CAN FD IP Core
Commits
01be7dd4
Commit
01be7dd4
authored
Sep 28, 2018
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed reg. map indices for STATUS register.
parent
67fac0a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
src/Registers_Memory_Interface/canfd_registers.vhd
src/Registers_Memory_Interface/canfd_registers.vhd
+7
-7
test/lib/CANtestLib.vhd
test/lib/CANtestLib.vhd
+14
-14
No files found.
src/Registers_Memory_Interface/canfd_registers.vhd
View file @
01be7dd4
...
...
@@ -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
(
E
S
_IND
mod
8
)
<=
'1'
when
status_reg
(
E
WL
_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
(
T
X
S_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
(
R
X
S_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
(
T
BS
_IND
mod
8
)
<=
'1'
when
(
txtb_fsms
(
0
)
=
txt_empty
or
status_reg
(
T
XNF
_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
(
DO
S
_IND
mod
8
)
<=
rx_data_overrun
;
status_reg
(
DO
R
_IND
mod
8
)
<=
rx_data_overrun
;
status_reg
(
ET_IND
mod
8
)
<=
'1'
when
(
PC_state
=
error
)
status_reg
(
E
F
T_IND
mod
8
)
<=
'1'
when
(
PC_state
=
error
)
else
'0'
;
...
...
test/lib/CANtestLib.vhd
View file @
01be7dd4
...
...
@@ -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
(
R
S_IND
)
=
'0'
and
r_data
(
T
S_IND
)
=
'0'
)
loop
while
(
r_data
(
R
XS_IND
)
=
'0'
and
r_data
(
TX
S_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
(
R
S_IND
)
=
'0'
and
r_data
(
T
S_IND
)
=
'0'
)
loop
while
(
r_data
(
R
XS_IND
)
=
'0'
and
r_data
(
TX
S_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
(
E
F
T_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
(
T
X
S_IND
)
=
'1'
)
then
exit
;
end
if
;
if
(
exit_rec
and
r_data
(
RS_IND
)
=
'1'
)
then
if
(
exit_rec
and
r_data
(
R
X
S_IND
)
=
'1'
)
then
exit
;
end
if
;
end
loop
;
...
...
@@ -3951,31 +3951,31 @@ package body CANtestLib is
status
.
receive_buffer
:
=
true
;
end
if
;
if
(
data
(
DO
S
_IND
)
=
'1'
)
then
if
(
data
(
DO
R
_IND
)
=
'1'
)
then
status
.
data_overrun
:
=
true
;
end
if
;
if
(
data
(
T
BS
_IND
)
=
'1'
)
then
if
(
data
(
T
XNF
_IND
)
=
'1'
)
then
status
.
tx_buffer_empty
:
=
true
;
end
if
;
if
(
data
(
ET_IND
)
=
'1'
)
then
if
(
data
(
E
F
T_IND
)
=
'1'
)
then
status
.
error_transmission
:
=
true
;
end
if
;
if
(
data
(
RS_IND
)
=
'1'
)
then
if
(
data
(
R
X
S_IND
)
=
'1'
)
then
status
.
receiver
:
=
true
;
end
if
;
if
(
data
(
TS_IND
)
=
'1'
)
then
if
(
data
(
T
X
S_IND
)
=
'1'
)
then
status
.
transmitter
:
=
true
;
end
if
;
if
(
data
(
E
S
_IND
)
=
'1'
)
then
if
(
data
(
E
WL
_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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment