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
e08a5f86
Commit
e08a5f86
authored
Jan 17, 2020
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: Debug ERR_CAPT bit error in CRC field testcase.
parent
08523e9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
test/feature/err_capt_crc_bit_feature_tb.vhd
test/feature/err_capt_crc_bit_feature_tb.vhd
+17
-2
No files found.
test/feature/err_capt_crc_bit_feature_tb.vhd
View file @
e08a5f86
...
...
@@ -146,7 +146,7 @@ package body err_capt_crc_bit_feature is
crc_len
:
=
15
;
-- CRC 15 (CAN 2.0 frames have no Stuff count)!
end
if
;
-- Wait for Random amount of
time
!
-- Wait for Random amount of
bits, but not longer than CRC field
!
rand_int_v
(
rand_ctr
,
crc_len
-
1
,
tmp
);
info
(
"Waiting for: "
&
integer
'image
(
tmp
)
&
" bits!"
);
for
i
in
1
to
tmp
loop
...
...
@@ -165,7 +165,22 @@ package body err_capt_crc_bit_feature is
check
(
stat_1
.
error_transmission
,
"Error frame is being transmitted!"
);
CAN_read_error_code_capture
(
err_capt
,
ID_1
,
mem_bus
(
1
));
check
(
err_capt
.
err_type
=
can_err_bit
,
"Bit error detected!"
);
-----------------------------------------------------------------------
-- It might happend that we corrupt a bit which is just stuff bit (due
-- to randomization). If this is a CAN FD frame, this will be considered
-- as form error (stuff error during fixed bit stuffing shall be reported
-- as form error). In such case, form error has higher priority than
-- stuff error, so form error is reported. Tolerate this as this is not
-- a bug!
-----------------------------------------------------------------------
if
(
frame_1
.
frame_format
=
FD_CAN
)
then
check
(
err_capt
.
err_type
=
can_err_bit
or
err_capt
.
err_type
=
can_err_form
,
"Bit or Form error detected!"
);
else
check
(
err_capt
.
err_type
=
can_err_bit
,
"Bit error detected!"
);
end
if
;
check
(
err_capt
.
err_pos
=
err_pos_crc
,
"Error detected in CRC field!"
);
CAN_wait_bus_idle
(
ID_1
,
mem_bus
(
1
));
...
...
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