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
d39363a6
Commit
d39363a6
authored
Sep 11, 2018
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added "CAN_wait_tx_rx" starts procedure.
parent
1bc1df89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
test/lib/CANtestLib.vhd
test/lib/CANtestLib.vhd
+40
-0
No files found.
test/lib/CANtestLib.vhd
View file @
d39363a6
...
...
@@ -1235,6 +1235,24 @@ package CANtestLib is
);
----------------------------------------------------------------------------
-- Waits until transmission or reception is started by a Node.
--
-- Arguments:
-- bits Number of Bit times to wait for
-- exit_trans Exit when unit turns transceiver.
-- exit_rec Exit when unit turns receiver.
-- ID Index of CTU CAN FD Core instance
-- mem_bus Avalon memory bus to execute the access on.
----------------------------------------------------------------------------
procedure
CAN_wait_tx_rx_start
(
constant
exit_trans
:
in
boolean
;
constant
exit_rec
:
in
boolean
;
constant
ID
:
in
natural
range
0
to
15
;
signal
mem_bus
:
inout
Avalon_mem_type
);
----------------------------------------------------------------------------
-- Calculate length of CAN Frame in bits (stuff bits not included).
--
...
...
@@ -3128,6 +3146,28 @@ package body CANtestLib is
end
procedure
;
procedure
CAN_wait_tx_rx_start
(
constant
exit_trans
:
in
boolean
;
constant
exit_rec
:
in
boolean
;
constant
ID
:
in
natural
range
0
to
15
;
signal
mem_bus
:
inout
Avalon_mem_type
)
is
variable
r_data
:
std_logic_vector
(
31
downto
0
);
begin
-- Wait until unit starts to transmitt or recieve
while
(
true
)
loop
CAN_read
(
r_data
,
MODE_ADR
,
ID
,
mem_bus
);
if
(
exit_trans
and
r_data
(
RS_IND
)
=
'1'
)
then
exit
;
end
if
;
if
(
exit_rec
and
r_data
(
TS_IND
)
=
'1'
)
then
exit
;
end
if
;
end
loop
;
end
procedure
;
procedure
CAN_calc_frame_length
(
constant
frame
:
in
SW_CAN_frame_type
;
variable
bit_length
:
inout
natural
...
...
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