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
ccae98dd
Commit
ccae98dd
authored
Jan 15, 2019
by
Ing. Viktor Fúra
Committed by
Ille, Ondrej, Ing.
Jan 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_lib: Add Timestamp read-out procedure.
parent
bfbe8fbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
test/lib/CANtestLib.vhd
test/lib/CANtestLib.vhd
+34
-0
No files found.
test/lib/CANtestLib.vhd
View file @
ccae98dd
...
@@ -1788,6 +1788,22 @@ package CANtestLib is
...
@@ -1788,6 +1788,22 @@ package CANtestLib is
signal
mem_bus
:
inout
Avalon_mem_type
signal
mem_bus
:
inout
Avalon_mem_type
);
);
----------------------------------------------------------------------------
-- Read Timestamp from TIMESTAMP_LOW and TIMESTAMP_HIGH registers
--
-- Arguments:
-- ts Variable in which timestamp will be stored
-- ID Index of CTU CAN FD Core instance.
-- mem_bus Avalon memory bus to execute the access on.
----------------------------------------------------------------------------
procedure
CAN_read_timestamp
(
variable
ts
:
out
std_logic_vector
(
63
downto
0
);
constant
ID
:
in
natural
range
0
to
15
;
signal
mem_bus
:
inout
Avalon_mem_type
);
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Component declarations
-- Component declarations
...
@@ -4383,6 +4399,24 @@ package body CANtestLib is
...
@@ -4383,6 +4399,24 @@ package body CANtestLib is
trv_delay
:
=
to_integer
(
unsigned
(
data
(
trv_delay
:
=
to_integer
(
unsigned
(
data
(
TRV_DELAY_VALUE_H
downto
TRV_DELAY_VALUE_L
)));
TRV_DELAY_VALUE_H
downto
TRV_DELAY_VALUE_L
)));
end
procedure
;
end
procedure
;
procedure
CAN_read_timestamp
(
variable
ts
:
out
std_logic_vector
(
63
downto
0
);
constant
ID
:
in
natural
range
0
to
15
;
signal
mem_bus
:
inout
Avalon_mem_type
)
is
variable
lower_word
:
std_logic_vector
(
31
downto
0
);
variable
upper_word
:
std_logic_vector
(
31
downto
0
);
begin
CAN_read
(
lower_word
,
TIMESTAMP_L_W_ADR
,
ID
,
mem_bus
);
CAN_read
(
upper_word
,
TIMESTAMP_U_W_ADR
,
ID
,
mem_bus
);
ts
:
=
upper_word
&
lower_word
;
end
procedure
;
end
package
body
;
end
package
body
;
...
...
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