Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Trigger Distribution
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Trigger Distribution
Commits
8e6143ad
Commit
8e6143ad
authored
Sep 30, 2019
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[hdl][sw] update and unify WRTD Node identification value
parent
68990667
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
13 deletions
+28
-13
wrtd_ref_spec150t_adc.vhd
hdl/top/wrtd_ref_spec150t_adc/wrtd_ref_spec150t_adc.vhd
+5
-2
wrtd_ref_svec_tdc_fd.vhd
hdl/top/wrtd_ref_svec_tdc_fd/wrtd_ref_svec_tdc_fd.vhd
+5
-2
wrtd-ref-spec150t-adc-core.c
software/drivers/wrtd-ref-spec150t-adc-core.c
+2
-2
wrtd-ref-svec-tdc-fd-core.c
software/drivers/wrtd-ref-svec-tdc-fd-core.c
+2
-2
libwrtd-private.h
software/lib/libwrtd-private.h
+12
-0
libwrtd.c
software/lib/libwrtd.c
+2
-5
No files found.
hdl/top/wrtd_ref_spec150t_adc/wrtd_ref_spec150t_adc.vhd
View file @
8e6143ad
...
...
@@ -206,6 +206,9 @@ architecture arch of wrtd_ref_spec150t_adc is
-- Constants
-----------------------------------------------------------------------------
-- WRTD Node identification (WTN1)
constant
c_WRTD_NODE_ID
:
std_logic_vector
(
31
downto
0
)
:
=
x"5754_4E01"
;
-- Number of masters attached to the primary wishbone crossbar
constant
c_NUM_WB_MASTERS
:
integer
:
=
1
;
...
...
@@ -238,7 +241,7 @@ architecture arch of wrtd_ref_spec150t_adc is
constant
c_MT_CONFIG
:
t_mt_config
:
=
(
app_id
=>
x"115790d1"
,
app_id
=>
c_WRTD_NODE_ID
,
cpu_count
=>
1
,
cpu_config
=>
(
0
=>
(
...
...
@@ -350,7 +353,7 @@ begin -- architecture arch
cmp_xwb_metadata
:
entity
work
.
xwb_metadata
generic
map
(
g_VENDOR_ID
=>
x"0000_10DC"
,
g_DEVICE_ID
=>
x"574E_0001"
,
-- WRTD Node (WN) 1
g_DEVICE_ID
=>
c_WRTD_NODE_ID
,
g_VERSION
=>
x"0100_0000"
,
g_CAPABILITIES
=>
x"0000_0000"
,
g_COMMIT_ID
=>
(
others
=>
'0'
))
...
...
hdl/top/wrtd_ref_svec_tdc_fd/wrtd_ref_svec_tdc_fd.vhd
View file @
8e6143ad
...
...
@@ -293,6 +293,9 @@ architecture arch of wrtd_ref_svec_tdc_fd is
-- Constants
-----------------------------------------------------------------------------
-- WRTD Node identification (WTN2)
constant
c_WRTD_NODE_ID
:
std_logic_vector
(
31
downto
0
)
:
=
x"5754_4E02"
;
-- Number of masters attached to the primary wishbone crossbar
constant
c_NUM_WB_MASTERS
:
integer
:
=
1
;
...
...
@@ -333,7 +336,7 @@ architecture arch of wrtd_ref_svec_tdc_fd is
constant
c_MT_CONFIG
:
t_mt_config
:
=
(
app_id
=>
x"115790de"
,
app_id
=>
c_WRTD_NODE_ID
,
cpu_count
=>
2
,
cpu_config
=>
(
0
|
1
=>
(
...
...
@@ -484,7 +487,7 @@ begin -- architecture arch
cmp_xwb_metadata
:
entity
work
.
xwb_metadata
generic
map
(
g_VENDOR_ID
=>
x"0000_10DC"
,
g_DEVICE_ID
=>
x"574E_0002"
,
-- WRTD Node (WN) 2
g_DEVICE_ID
=>
c_WRTD_NODE_ID
,
g_VERSION
=>
x"0100_0000"
,
g_CAPABILITIES
=>
x"0000_0000"
,
g_COMMIT_ID
=>
(
others
=>
'0'
))
...
...
software/drivers/wrtd-ref-spec150t-adc-core.c
View file @
8e6143ad
...
...
@@ -126,10 +126,10 @@ static const struct platform_device_id wrtd_s150a_id_table[] = {
.
name
=
"wrtd-s150a"
,
.
driver_data
=
WRTD_S150A_VER
,
},
{
.
name
=
"id:000010DC57
4E00
01"
,
.
name
=
"id:000010DC57
544E
01"
,
.
driver_data
=
WRTD_S150A_VER
,
},
{
.
name
=
"id:000010dc57
4e00
01"
,
.
name
=
"id:000010dc57
544e
01"
,
.
driver_data
=
WRTD_S150A_VER
,
},
{},
...
...
software/drivers/wrtd-ref-svec-tdc-fd-core.c
View file @
8e6143ad
...
...
@@ -188,10 +188,10 @@ static const struct platform_device_id wrtd_stf_id_table[] = {
.
name
=
"wrtd-stf"
,
.
driver_data
=
WRTD_STF_VER
,
},
{
.
name
=
"id:000010DC57
4E00
02"
,
.
name
=
"id:000010DC57
544E
02"
,
.
driver_data
=
WRTD_STF_VER
,
},
{
.
name
=
"id:000010dc57
4e00
02"
,
.
name
=
"id:000010dc57
544e
02"
,
.
driver_data
=
WRTD_STF_VER
,
},
{},
...
...
software/lib/libwrtd-private.h
View file @
8e6143ad
...
...
@@ -15,6 +15,18 @@
#define WRTD_DEFAULT_TIMEOUT 1000
/* Used to detect WRTD Nodes */
#define WRTD_NODE_ID 0x57544E00
#define WRTD_NODE_ID_MASK 0xFFFFFF00
inline
int
wrtd_node_id_match
(
uint32_t
id
)
{
if
((
id
&
WRTD_NODE_ID_MASK
)
==
WRTD_NODE_ID
)
return
1
;
else
return
0
;
}
/* Add nanoseconds to an existing wrtd timestamp */
static
inline
void
wrtd_ts_add_ns
(
struct
wrtd_tstamp
*
ts
,
uint32_t
ns
)
{
...
...
software/lib/libwrtd.c
View file @
8e6143ad
...
...
@@ -46,8 +46,7 @@ wrtd_status wrtd_get_node_count(uint32_t *count)
return
WRTD_ERROR_RESOURCE_UNKNOWN
;
}
cfgrom
=
trtl_config_get
(
trtl
);
/* WRTD = 0x57525444 */
if
(
cfgrom
->
app_id
==
0x57525444
)
if
(
wrtd_node_id_match
(
cfgrom
->
app_id
))
dev_count
++
;
trtl_close
(
trtl
);
}
...
...
@@ -81,7 +80,6 @@ wrtd_status wrtd_get_node_id(uint32_t index, uint32_t *node_id)
if
(
!
dev_list
)
return
WRTD_ERROR_INTERNAL
;
*
node_id
=
0
;
for
(
i
=
0
;
dev_list
[
i
];
i
++
)
{
...
...
@@ -91,8 +89,7 @@ wrtd_status wrtd_get_node_id(uint32_t index, uint32_t *node_id)
return
WRTD_ERROR_RESOURCE_UNKNOWN
;
}
cfgrom
=
trtl_config_get
(
trtl
);
/* WRTD = 0x57525444 */
if
(
cfgrom
->
app_id
==
0x57525444
)
if
(
wrtd_node_id_match
(
cfgrom
->
app_id
))
dev_count
++
;
if
(
dev_count
==
index
)
{
char
*
eptr
;
...
...
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