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
da253ce5
Commit
da253ce5
authored
Jan 19, 2019
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/driver/design: Add CTU_CAN_ prefix
parent
b35069f3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
driver/ctu_can_fd_hw.c
driver/ctu_can_fd_hw.c
+1
-1
driver/ctu_can_fd_hw.h
driver/ctu_can_fd_hw.h
+1
-1
src/bus_sampling/bus_sampling.vhd
src/bus_sampling/bus_sampling.vhd
+2
-2
src/can_core/operation_control/operation_control.vhd
src/can_core/operation_control/operation_control.vhd
+3
-3
src/can_core/protocol_control/protocol_control.vhd
src/can_core/protocol_control/protocol_control.vhd
+1
-1
test/lib/CANtestLib.vhd
test/lib/CANtestLib.vhd
+2
-2
No files found.
driver/ctu_can_fd_hw.c
View file @
da253ce5
...
@@ -142,7 +142,7 @@ void ctu_can_fd_enable(struct ctucanfd_priv *priv, bool enable)
...
@@ -142,7 +142,7 @@ void ctu_can_fd_enable(struct ctucanfd_priv *priv, bool enable)
union
ctu_can_fd_mode_command_status_settings
reg
;
union
ctu_can_fd_mode_command_status_settings
reg
;
reg
.
u32
=
priv
->
read_reg
(
priv
,
CTU_CAN_FD_MODE
);
reg
.
u32
=
priv
->
read_reg
(
priv
,
CTU_CAN_FD_MODE
);
reg
.
s
.
ena
=
enable
?
ENABLED
:
DISABLED
;
reg
.
s
.
ena
=
enable
?
CTU_CAN_ENABLED
:
CTU_CAN_
DISABLED
;
priv
->
write_reg
(
priv
,
CTU_CAN_FD_MODE
,
reg
.
u32
);
priv
->
write_reg
(
priv
,
CTU_CAN_FD_MODE
,
reg
.
u32
);
}
}
...
...
driver/ctu_can_fd_hw.h
View file @
da253ce5
...
@@ -316,7 +316,7 @@ static inline bool ctu_can_fd_is_enabled(struct ctucanfd_priv *priv)
...
@@ -316,7 +316,7 @@ static inline bool ctu_can_fd_is_enabled(struct ctucanfd_priv *priv)
union
ctu_can_fd_mode_command_status_settings
reg
;
union
ctu_can_fd_mode_command_status_settings
reg
;
reg
.
u32
=
priv
->
read_reg
(
priv
,
CTU_CAN_FD_MODE
);
reg
.
u32
=
priv
->
read_reg
(
priv
,
CTU_CAN_FD_MODE
);
return
reg
.
s
.
ena
==
ENABLED
;
return
reg
.
s
.
ena
==
CTU_CAN_
ENABLED
;
}
}
...
...
src/bus_sampling/bus_sampling.vhd
View file @
da253ce5
...
@@ -548,7 +548,7 @@ begin
...
@@ -548,7 +548,7 @@ begin
elsif
rising_edge
(
clk_sys
)
then
elsif
rising_edge
(
clk_sys
)
then
if
(
drv_ena
=
ENABLED
)
then
if
(
drv_ena
=
CTU_CAN_
ENABLED
)
then
case
sp_control
is
case
sp_control
is
----------------------------------------------------------------
----------------------------------------------------------------
...
@@ -599,7 +599,7 @@ begin
...
@@ -599,7 +599,7 @@ begin
elsif
rising_edge
(
clk_sys
)
then
elsif
rising_edge
(
clk_sys
)
then
if
(
drv_ena
=
ENABLED
and
bit_err_enable
=
'1'
)
then
if
(
drv_ena
=
CTU_CAN_
ENABLED
and
bit_err_enable
=
'1'
)
then
case
sp_control
is
case
sp_control
is
----------------------------------------------------------------
----------------------------------------------------------------
...
...
src/can_core/operation_control/operation_control.vhd
View file @
da253ce5
...
@@ -142,7 +142,7 @@ begin
...
@@ -142,7 +142,7 @@ begin
unknown_OP_state
<=
'0'
;
unknown_OP_state
<=
'0'
;
if
(
drv_ena
/=
ENABLED
)
then
if
(
drv_ena
/=
CTU_CAN_
ENABLED
)
then
OP_State_r
<=
integrating
;
OP_State_r
<=
integrating
;
elsif
(
set_transciever
=
'1'
)
then
elsif
(
set_transciever
=
'1'
)
then
OP_State_r
<=
transciever
;
OP_State_r
<=
transciever
;
...
@@ -156,7 +156,7 @@ begin
...
@@ -156,7 +156,7 @@ begin
-- Waiting for 11 consecutive recessive bits
-- Waiting for 11 consecutive recessive bits
----------------------------------------------------------------
----------------------------------------------------------------
when
integrating
=>
when
integrating
=>
if
(
drv_ena
=
ENABLED
)
then
if
(
drv_ena
=
CTU_CAN_
ENABLED
)
then
if
(
rec_trig
=
'1'
)
then
if
(
rec_trig
=
'1'
)
then
-- Counting up the integration period
-- Counting up the integration period
if
(
integ_counter
=
INTEGRATING_DURATION
)
then
if
(
integ_counter
=
INTEGRATING_DURATION
)
then
...
@@ -214,4 +214,4 @@ begin
...
@@ -214,4 +214,4 @@ begin
end
if
;
end
if
;
end
process
;
end
process
;
end
architecture
;
end
architecture
;
\ No newline at end of file
src/can_core/protocol_control/protocol_control.vhd
View file @
da253ce5
...
@@ -3214,7 +3214,7 @@ begin
...
@@ -3214,7 +3214,7 @@ begin
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
when
off
=>
when
off
=>
if
(
drv_ena
=
ENABLED
)
then
if
(
drv_ena
=
CTU_CAN_
ENABLED
)
then
if
(
error_state
/=
bus_off
and
OP_State
/=
integrating
)
then
if
(
error_state
/=
bus_off
and
OP_State
/=
integrating
)
then
-- Note that here we don't want to execute FSM_Preset! We want
-- Note that here we don't want to execute FSM_Preset! We want
...
...
test/lib/CANtestLib.vhd
View file @
da253ce5
...
@@ -2786,9 +2786,9 @@ package body CANtestLib is
...
@@ -2786,9 +2786,9 @@ package body CANtestLib is
begin
begin
CAN_read
(
data
,
MODE_ADR
,
ID
,
mem_bus
);
CAN_read
(
data
,
MODE_ADR
,
ID
,
mem_bus
);
if
turn_on
then
if
turn_on
then
data
(
ENA_IND
)
:
=
ENABLED
;
data
(
ENA_IND
)
:
=
CTU_CAN_
ENABLED
;
else
else
data
(
ENA_IND
)
:
=
DISABLED
;
data
(
ENA_IND
)
:
=
CTU_CAN_
DISABLED
;
end
if
;
end
if
;
CAN_write
(
data
,
MODE_ADR
,
ID
,
mem_bus
);
CAN_write
(
data
,
MODE_ADR
,
ID
,
mem_bus
);
CAN_read
(
readback
,
MODE_ADR
,
ID
,
mem_bus
);
CAN_read
(
readback
,
MODE_ADR
,
ID
,
mem_bus
);
...
...
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