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
14
Issues
14
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
f61e1cb0
Commit
f61e1cb0
authored
Jan 23, 2018
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified Traffic measure, Transceiver delay and TX arb time
feature tests with IP-XACT generated constants
parent
13cdf816
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
test/feature/traf_meas_feature_tb.vhd
test/feature/traf_meas_feature_tb.vhd
+4
-4
test/feature/tran_delay_feature.vhd
test/feature/tran_delay_feature.vhd
+4
-3
test/feature/tx_arb_time_tran.vhd
test/feature/tx_arb_time_tran.vhd
+4
-4
No files found.
test/feature/traf_meas_feature_tb.vhd
View file @
f61e1cb0
...
...
@@ -115,9 +115,9 @@ package body traf_meas_feature is
-- Check the TX RX counters
--------------------------------------------
CAN_read
(
r_data
,
TX_COUNTER_ADR
,
ID_1
,
mem_bus_1
);
tx_ctr
:
=
to_integer
(
unsigned
(
r_data
));
tx_ctr
:
=
to_integer
(
unsigned
(
r_data
(
TX_COUNTER_VAL_H
downto
TX_COUNTER_VAL_L
)
));
CAN_read
(
r_data
,
RX_COUNTER_ADR
,
ID_2
,
mem_bus_2
);
rx_ctr
:
=
to_integer
(
unsigned
(
r_data
));
rx_ctr
:
=
to_integer
(
unsigned
(
r_data
(
RX_COUNTER_VAL_H
downto
RX_COUNTER_VAL_L
)
));
--------------------------------------------
-- Generate the CAN frames to send
...
...
@@ -137,9 +137,9 @@ package body traf_meas_feature is
-- Check the TX RX counters
--------------------------------------------
CAN_read
(
r_data
,
TX_COUNTER_ADR
,
ID_1
,
mem_bus_1
);
tx_ctr_2
:
=
to_integer
(
unsigned
(
r_data
));
tx_ctr_2
:
=
to_integer
(
unsigned
(
r_data
(
TX_COUNTER_VAL_H
downto
TX_COUNTER_VAL_L
)
));
CAN_read
(
r_data
,
RX_COUNTER_ADR
,
ID_2
,
mem_bus_2
);
rx_ctr_2
:
=
to_integer
(
unsigned
(
r_data
));
rx_ctr_2
:
=
to_integer
(
unsigned
(
r_data
(
RX_COUNTER_VAL_H
downto
RX_COUNTER_VAL_L
)
));
if
(
tx_ctr
+
aux
+
1
/=
tx_ctr_2
)
then
outcome
:
=
false
;
...
...
test/feature/tran_delay_feature.vhd
View file @
f61e1cb0
...
...
@@ -62,6 +62,7 @@ USE work.CANtestLib.All;
USE
work
.
randomLib
.
All
;
use
work
.
CAN_FD_register_map
.
all
;
use
work
.
CAN_FD_frame_format
.
all
;
package
tran_delay_feature
is
...
...
@@ -111,9 +112,9 @@ package body tran_delay_feature is
--Generate CAN frame
----------------------------------------------
CAN_generate_frame
(
rand_ctr
,
CAN_frame
);
CAN_frame
.
rtr
:
=
'0'
;
CAN_frame
.
frame_format
:
=
'1'
;
CAN_frame
.
brs
:
=
'1'
;
CAN_frame
.
rtr
:
=
NO_RTR_FRAME
;
CAN_frame
.
frame_format
:
=
FD_CAN
;
CAN_frame
.
brs
:
=
BR_SHIFT
;
CAN_send_frame
(
CAN_frame
,
1
,
ID_1
,
mem_bus_1
,
frame_sent
);
CAN_wait_frame_sent
(
ID_2
,
mem_bus_2
);
...
...
test/feature/tx_arb_time_tran.vhd
View file @
f61e1cb0
...
...
@@ -251,11 +251,11 @@ package body tx_arb_time_tran_feature is
--report "Checking the data";
CAN_read
(
r_data
,
TX_STATUS_ADR
,
ID_1
,
mem_bus_1
);
if
(
rand_value
<
rand_value_2
)
then
if
(
r_data
(
0
)
=
'0'
or
r_data
(
1
)
=
'1'
)
then
if
(
r_data
(
TXT1_EMPTY_IND
)
=
'0'
or
r_data
(
TXT2_EMPTY_IND
)
=
'1'
)
then
outcome
:
=
false
;
end
if
;
else
if
(
r_data
(
1
)
=
'0'
or
r_data
(
0
)
=
'1'
)
then
if
(
r_data
(
TXT2_EMPTY_IND
)
=
'0'
or
r_data
(
TXT1_EMPTY_IND
)
=
'1'
)
then
outcome
:
=
false
;
end
if
;
end
if
;
...
...
@@ -309,11 +309,11 @@ package body tx_arb_time_tran_feature is
------------------------------------------
CAN_read
(
r_data
,
TX_STATUS_ADR
,
ID_1
,
mem_bus_1
);
if
(
CAN_frame
.
identifier
<=
CAN_frame_2
.
identifier
)
then
if
(
r_data
(
0
)
=
'0'
or
r_data
(
1
)
=
'1'
)
then
if
(
r_data
(
TXT1_EMPTY_IND
)
=
'0'
or
r_data
(
TXT2_EMPTY_IND
)
=
'1'
)
then
outcome
:
=
false
;
end
if
;
else
if
(
r_data
(
1
)
=
'0'
or
r_data
(
0
)
=
'1'
)
then
if
(
r_data
(
TXT2_EMPTY_IND
)
=
'0'
or
r_data
(
TXT1_EMPTY_IND
)
=
'1'
)
then
outcome
:
=
false
;
end
if
;
end
if
;
...
...
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