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
6a6ae866
Commit
6a6ae866
authored
Sep 02, 2018
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added comments to bus start bench.
parent
badb6f59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
test/feature/bus_start_feature_tb.vhd
test/feature/bus_start_feature_tb.vhd
+9
-2
No files found.
test/feature/bus_start_feature_tb.vhd
View file @
6a6ae866
...
...
@@ -131,6 +131,7 @@ package body bus_start_feature is
------------------------------------------------------------------------
-- Turn on Node 1, Wait until it starts transmitting
------------------------------------------------------------------------
report
"Turning ON Node 1."
;
CAN_turn_controller
(
true
,
ID_1
,
mem_bus
(
1
));
while
(
protocol_type
'VAL
(
to_integer
(
unsigned
(
iout
(
1
)
.
stat_bus
(
STAT_PC_STATE_HIGH
downto
STAT_PC_STATE_LOW
))))
...
...
@@ -143,6 +144,7 @@ package body bus_start_feature is
-- Modify frame to have ID 9, and insert it to Node 2 for transmission.
-- Enable Node 2, so that it may start integration.
------------------------------------------------------------------------
report
"Turning ON Node 2."
;
wait_rand_cycles
(
rand_ctr
,
mem_bus
(
1
)
.
clk_sys
,
10
,
11
);
CAN_frame
.
identifier
:
=
9
;
CAN_send_frame
(
CAN_frame
,
1
,
ID_2
,
mem_bus
(
2
),
frame_sent
);
...
...
@@ -161,10 +163,12 @@ package body bus_start_feature is
-- Assuming default timing configuration -> 200 cycles per Bit
-- Wait through CRC Delimiter + little bit
wait_rand_cycles
(
rand_ctr
,
mem_bus
(
1
)
.
clk_sys
,
210
,
210
);
report
"Started delim_ack"
;
wait_rand_cycles
(
rand_ctr
,
mem_bus
(
1
)
.
clk_sys
,
209
,
210
);
report
"Forcing ACK"
;
so
.
bl_inject
<=
DOMINANT
;
so
.
bl_force
<=
true
;
wait_rand_cycles
(
rand_ctr
,
mem_bus
(
1
)
.
clk_sys
,
200
,
20
0
);
wait_rand_cycles
(
rand_ctr
,
mem_bus
(
1
)
.
clk_sys
,
200
,
20
1
);
so
.
bl_force
<=
false
;
so
.
bl_inject
<=
RECESSIVE
;
...
...
@@ -172,12 +176,14 @@ package body bus_start_feature is
-- Wait until bus is idle.
------------------------------------------------------------------------
CAN_wait_bus_idle
(
ID_1
,
mem_bus
(
1
));
report
"Bus is idle"
;
------------------------------------------------------------------------
-- Now wait until another frame is transmitted. This one should be
-- arbitrated, and Node 2 should have won.
------------------------------------------------------------------------
CAN_wait_frame_sent
(
ID_1
,
mem_bus
(
1
));
report
"Second frame was sent!"
;
------------------------------------------------------------------------
-- Read status of RX Buffer in Node 1! It should have sent ACK and
...
...
@@ -186,6 +192,7 @@ package body bus_start_feature is
-- minimal necessary time, and test fails!
------------------------------------------------------------------------
get_rx_buf_state
(
rx_state
,
ID_1
,
mem_bus
(
1
));
report
"Read RX Buffer state"
;
if
(
rx_state
.
rx_empty
)
then
-- LCOV_EXCL_START
...
...
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