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
c300c75f
Commit
c300c75f
authored
Jul 14, 2018
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTR prefferred bugfixes.
parent
9401cc36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
test/feature/rtr_pref_feature_tb.vhd
test/feature/rtr_pref_feature_tb.vhd
+13
-13
No files found.
test/feature/rtr_pref_feature_tb.vhd
View file @
c300c75f
...
...
@@ -92,7 +92,7 @@ package body rtr_pref_feature is
variable
o
:
out
feature_outputs_t
;
signal
so
:
out
feature_signal_outputs_t
;
signal
rand_ctr
:
inout
natural
range
0
to
RAND_POOL_SIZE
;
signal
iout
:
in
instance_
in
puts_arr_t
;
signal
iout
:
in
instance_
out
puts_arr_t
;
signal
mem_bus
:
inout
mem_bus_arr_t
;
signal
bus_level
:
in
std_logic
)
is
...
...
@@ -123,29 +123,29 @@ package body rtr_pref_feature is
-- Set the RTR preferred behaviour to send the DLC all zeroes..
------------------------------------------------------------------------
mode
.
rtr_pref
:
=
true
;
set_core_mode
(
mode
,
ID_2
,
mem_bus
_2
);
set_core_mode
(
mode
,
ID_1
,
mem_bus
_1
);
set_core_mode
(
mode
,
ID_2
,
mem_bus
(
2
)
);
set_core_mode
(
mode
,
ID_1
,
mem_bus
(
1
)
);
------------------------------------------------------------------------
-- Restart the content of the Node 2 RX Buffer
------------------------------------------------------------------------
command
.
release_rec_buffer
:
=
true
;
give_controller_command
(
command
,
ID_2
,
mem_bus
_2
);
give_controller_command
(
command
,
ID_2
,
mem_bus
(
2
)
);
command
.
release_rec_buffer
:
=
false
;
------------------------------------------------------------------------
-- Insert the frame for transmittion and wait until it was sent
------------------------------------------------------------------------
CAN_send_frame
(
tx_frame
,
1
,
ID_1
,
mem_bus
_1
,
frame_sent
);
CAN_send_frame
(
tx_frame
,
1
,
ID_1
,
mem_bus
(
1
)
,
frame_sent
);
if
(
not
frame_sent
)
then
o
.
outcome
:
=
false
;
end
if
;
CAN_wait_frame_sent
(
ID_2
,
mem_bus
_2
);
CAN_wait_frame_sent
(
ID_2
,
mem_bus
(
2
)
);
------------------------------------------------------------------------
-- Check that recieved DLC is zero
------------------------------------------------------------------------
CAN_read_frame
(
rx_frame
,
ID_2
,
mem_bus
_2
);
CAN_read_frame
(
rx_frame
,
ID_2
,
mem_bus
(
2
)
);
if
(
rx_frame
.
dlc
/=
x"0"
)
then
o
.
outcome
:
=
false
;
end
if
;
...
...
@@ -158,29 +158,29 @@ package body rtr_pref_feature is
-- Set the RTR preferred behaviour to send the original DLC
------------------------------------------------------------------------
mode
.
rtr_pref
:
=
false
;
set_core_mode
(
mode
,
ID_2
,
mem_bus
_2
);
set_core_mode
(
mode
,
ID_1
,
mem_bus
_1
);
set_core_mode
(
mode
,
ID_2
,
mem_bus
(
2
)
);
set_core_mode
(
mode
,
ID_1
,
mem_bus
(
1
)
);
------------------------------------------------------------------------
-- Restart the content of the Node 2 RX Buffer
------------------------------------------------------------------------
command
.
release_rec_buffer
:
=
true
;
give_controller_command
(
command
,
ID_2
,
mem_bus
_2
);
give_controller_command
(
command
,
ID_2
,
mem_bus
(
2
)
);
command
.
release_rec_buffer
:
=
false
;
------------------------------------------------------------------------
-- Insert the frame for transmittion and wait until recieved
------------------------------------------------------------------------
CAN_send_frame
(
tx_frame
,
1
,
ID_1
,
mem_bus
_1
,
frame_sent
);
CAN_send_frame
(
tx_frame
,
1
,
ID_1
,
mem_bus
(
1
)
,
frame_sent
);
if
(
not
frame_sent
)
then
o
.
outcome
:
=
false
;
end
if
;
CAN_wait_frame_sent
(
ID_2
,
mem_bus
_2
);
CAN_wait_frame_sent
(
ID_2
,
mem_bus
(
2
)
);
------------------------------------------------------------------------
-- Check that recieved DLC is matching transmitted DLC
------------------------------------------------------------------------
CAN_read_frame
(
rx_frame
,
ID_2
,
mem_bus
_2
);
CAN_read_frame
(
rx_frame
,
ID_2
,
mem_bus
(
2
)
);
if
(
rx_frame
.
dlc
/=
tx_frame
.
dlc
)
then
o
.
outcome
:
=
false
;
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