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
05563a9f
Commit
05563a9f
authored
Sep 28, 2022
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update mockturtle to latest development version
parent
815da0cd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
104 deletions
+71
-104
mock-turtle
dependencies/mock-turtle
+1
-1
urv-core
dependencies/urv-core
+1
-1
wrtd_driver.svh
hdl/testbench/include/wrtd_driver.svh
+69
-82
main.sv
hdl/testbench/wrtd_ref_spec150t_adc/main.sv
+0
-10
main.sv
hdl/testbench/wrtd_ref_svec_tdc_fd/main.sv
+0
-8
wrtd-rt-common.h
software/firmware/common/wrtd-rt-common.h
+0
-2
No files found.
mock-turtle
@
b2260e1d
Subproject commit
add8319c68770cd2dac9c10842aad8487aeb171
7
Subproject commit
b2260e1d00566b02c7355ea6b373de3770dc47d
7
urv-core
@
193f15db
Subproject commit
5c7e906ceb6b15f53830061c9087cce0befef13
a
Subproject commit
193f15dbf7516fa1e0163156bbf41168c1f3044
a
hdl/testbench/include/wrtd_driver.svh
View file @
05563a9f
...
...
@@ -32,7 +32,6 @@
`include
"mock_turtle_driver.svh"
class
WrtdDrv
;
uint32_t
ready
;
protected
string
name
;
protected
byte
unsigned
enable_logging
;
protected
MockTurtleDriver
mt
;
...
...
@@ -64,7 +63,7 @@ class WrtdDrv;
$
display
(
tmp
)
;
endtask
// mdisplay
task
init
(
)
;
task
init
(
time
update_delay
=
1u
s
)
;
int
i
,
j
;
uint32_t
val
,
cpu_ready
;
...
...
@@ -75,9 +74,7 @@ class WrtdDrv;
uint32_t
data
[]
;
this
.
ready
=
0
;
mt
.
init
(
)
;
mt
.
init
(
update_delay
)
;
this
.
nbr_cpus
=
mt
.
rom
.
getCoreCount
(
)
;
...
...
@@ -96,83 +93,74 @@ class WrtdDrv;
mt
.
reset_core
(
i
,
0
)
;
end
fork
begin
for
(
i
=
0
;
i
<
this
.
nbr_cpus
;
i
++
)
begin
// wait for ready notification from firmware
cpu_ready
=
0
;
while
(
cpu_ready
==
0
)
begin
val
=
0
;
if
(
mt
.
pending_cpu_notifications
(
i
)
!=
0
)
begin
mt
.
get_single_cpu_notification
(
i
,
val
)
;
if
(
val
==
TRTL_CPU_NOTIFY_MAIN
)
cpu_ready
=
1
;
end
#
1u
s
;
end
// retrieve address of root
msg_get_config
(
i
,
data
)
;
this
.
roots
[
i
]
.
addr
=
data
[
0
]
;
// retrieve root
msg_readw
(
i
,
this
.
roots
[
i
]
.
addr
,
`WRTD_ROOT_WORD_SIZE
,
data
)
;
this
.
roots
[
i
]
.
fw_name
=
new
()
;
this
.
roots
[
i
]
.
fw_name
.
data_unpack
(
data
[
1
:
4
])
;
this
.
roots
[
i
]
.
fw_id
=
data
[
5
]
;
this
.
roots
[
i
]
.
capabilities
=
(
data
[
6
]
&
'hff000000
)
>>
24
;
this
.
roots
[
i
]
.
nbr_rules
=
(
data
[
6
]
&
'h00ff0000
)
>>
16
;
this
.
roots
[
i
]
.
nbr_alarms
=
(
data
[
6
]
&
'h0000ff00
)
>>
8
;
this
.
roots
[
i
]
.
nbr_devs
=
(
data
[
6
]
&
'h000000ff
)
>>
0
;
for
(
j
=
0
;
j
<
4
;
j
++
)
begin
this
.
roots
[
i
]
.
nbr_channels
[
j
]
=
(
data
[
9
]
>>
j
*
8
)
&
'hff
;
this
.
roots
[
i
]
.
channel_dir
[
j
]
=
(
data
[
10
]
>>
j
*
8
)
&
'hff
;
end
this
.
roots
[
i
]
.
rules_addr
=
data
[
11
]
;
this
.
roots
[
i
]
.
alarms_addr
=
data
[
12
]
;
// init free rule slots
this
.
free_rule_slots
[
i
]
=
this
.
roots
[
i
]
.
nbr_rules
;
// turn on all logging if enabled
if
(
this
.
enable_logging
)
msg_writew
(
i
,
this
.
roots
[
i
]
.
addr
+
32
,
1
,
{
data
[
8
]
|
32'hff
}
)
;
mdisplay
(
$
sformatf
(
"CPU %0d: WRTD app '%s', id '0x%x'"
,
i
,
this
.
roots
[
i
]
.
fw_name
.
get
()
,
this
.
roots
[
i
]
.
fw_id
)
)
;
end
// initialise rules
this
.
rules
=
new
(
this
.
name
)
;
for
(
i
=
0
;
i
<
this
.
nbr_cpus
;
i
++
)
for
(
j
=
0
;
j
<
this
.
roots
[
i
]
.
nbr_rules
;
j
++
)
begin
new_rule
=
new
(
this
.
name
)
;
this
.
rules
.
collection
.
push_back
(
new_rule
)
;
end
// initialise alarms
this
.
alarms
=
new
(
this
.
name
)
;
for
(
i
=
0
;
i
<
this
.
nbr_cpus
;
i
++
)
for
(
j
=
0
;
j
<
this
.
roots
[
i
]
.
nbr_alarms
;
j
++
)
begin
new_alarm
=
new
(
this
.
name
)
;
this
.
alarms
.
collection
.
push_back
(
new_alarm
)
;
end
for
(
i
=
0
;
i
<
this
.
nbr_cpus
;
i
++
)
begin
// wait for ready notification from firmware
cpu_ready
=
0
;
while
(
cpu_ready
==
0
)
begin
val
=
0
;
if
(
mt
.
pending_cpu_notifications
(
i
)
!=
0
)
begin
mt
.
get_single_cpu_notification
(
i
,
val
)
;
if
(
val
==
TRTL_CPU_NOTIFY_MAIN
)
cpu_ready
=
1
;
end
#
1u
s
;
end
// retrieve address of root
msg_get_config
(
i
,
data
)
;
this
.
roots
[
i
]
.
addr
=
data
[
0
]
;
// retrieve root
msg_readw
(
i
,
this
.
roots
[
i
]
.
addr
,
`WRTD_ROOT_WORD_SIZE
,
data
)
;
this
.
roots
[
i
]
.
fw_name
=
new
()
;
this
.
roots
[
i
]
.
fw_name
.
data_unpack
(
data
[
1
:
4
])
;
this
.
roots
[
i
]
.
fw_id
=
data
[
5
]
;
this
.
roots
[
i
]
.
capabilities
=
(
data
[
6
]
&
'hff000000
)
>>
24
;
this
.
roots
[
i
]
.
nbr_rules
=
(
data
[
6
]
&
'h00ff0000
)
>>
16
;
this
.
roots
[
i
]
.
nbr_alarms
=
(
data
[
6
]
&
'h0000ff00
)
>>
8
;
this
.
roots
[
i
]
.
nbr_devs
=
(
data
[
6
]
&
'h000000ff
)
>>
0
;
for
(
j
=
0
;
j
<
4
;
j
++
)
begin
this
.
roots
[
i
]
.
nbr_channels
[
j
]
=
(
data
[
9
]
>>
j
*
8
)
&
'hff
;
this
.
roots
[
i
]
.
channel_dir
[
j
]
=
(
data
[
10
]
>>
j
*
8
)
&
'hff
;
end
this
.
roots
[
i
]
.
rules_addr
=
data
[
11
]
;
this
.
roots
[
i
]
.
alarms_addr
=
data
[
12
]
;
// init free rule slots
this
.
free_rule_slots
[
i
]
=
this
.
roots
[
i
]
.
nbr_rules
;
// turn on all logging if enabled
if
(
this
.
enable_logging
)
msg_writew
(
i
,
this
.
roots
[
i
]
.
addr
+
32
,
1
,
{
data
[
8
]
|
32'hff
}
)
;
mdisplay
(
$
sformatf
(
"CPU %0d: WRTD app '%s', id '0x%x'"
,
i
,
this
.
roots
[
i
]
.
fw_name
.
get
()
,
this
.
roots
[
i
]
.
fw_id
)
)
;
end
end
// initialise rules
this
.
rules
=
new
(
this
.
name
)
;
for
(
i
=
0
;
i
<
this
.
nbr_cpus
;
i
++
)
for
(
j
=
0
;
j
<
this
.
roots
[
i
]
.
nbr_rules
;
j
++
)
begin
new_rule
=
new
(
this
.
name
)
;
this
.
rules
.
collection
.
push_back
(
new_rule
)
;
end
begin
while
(
i
!=
this
.
nbr_cpus
)
begin
mt
.
update
(
)
;
#
1u
s
;
end
end
join
// initialise alarms
this
.
alarms
=
new
(
this
.
name
)
;
for
(
i
=
0
;
i
<
this
.
nbr_cpus
;
i
++
)
for
(
j
=
0
;
j
<
this
.
roots
[
i
]
.
nbr_alarms
;
j
++
)
begin
new_alarm
=
new
(
this
.
name
)
;
this
.
alarms
.
collection
.
push_back
(
new_alarm
)
;
end
this
.
ready
=
1
;
fork
forever
begin
_u
pdate
()
;
#(
update_delay
)
;
end
join_none
endtask
// init
...
...
@@ -544,11 +532,10 @@ class WrtdDrv;
end
endtask
// check_logs
task
update
(
)
;
mt
.
update
(
)
;
task
_u
pdate
(
)
;
if
(
this
.
enable_logging
)
check_logs
(
)
;
endtask
// update
endtask
//
_
update
endclass
// WrtdDrv
...
...
hdl/testbench/wrtd_ref_spec150t_adc/main.sv
View file @
05563a9f
...
...
@@ -233,16 +233,6 @@ module main;
end
initial
begin
forever
begin
if
(
(
devA
!=
null
)
&&
(
devA
.
ready
)
)
devA
.
update
()
;
if
(
(
devB
!=
null
)
&&
(
devB
.
ready
)
)
devB
.
update
()
;
#
1u
s
;
end
end
initial
begin
$
display
()
;
$
display
(
"Start of simulation"
)
;
...
...
hdl/testbench/wrtd_ref_svec_tdc_fd/main.sv
View file @
05563a9f
...
...
@@ -114,12 +114,4 @@ module main;
end
initial
begin
forever
begin
if
(
(
dev
!=
null
)
&&
(
dev
.
ready
)
)
dev
.
update
()
;
#
1u
s
;
end
end
endmodule
// main
software/firmware/common/wrtd-rt-common.h
View file @
05563a9f
...
...
@@ -468,7 +468,6 @@ static void wrtd_log_discard(struct wrtd_rule *rule,
static
void
wrtd_init_tx
(
void
)
{
static
const
struct
trtl_ep_eth_address
addr
=
{
.
type
=
TRTL_EP_FRAME_UDP
,
.
dst_mac
=
{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
},
.
dst_ip
=
0xE000179F
,
/* multicast on 224.0.23.159 */
.
src_ip
=
0xC0A85A11
,
...
...
@@ -692,7 +691,6 @@ static void wrtd_route_in(struct wrtd_event *ev)
static
void
wrtd_init_rx
(
void
)
{
static
const
struct
trtl_ep_eth_address
addr
=
{
.
type
=
TRTL_EP_FRAME_UDP
,
.
dst_mac
=
{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
},
.
dst_ip
=
0xE000179F
,
/* multicast on 224.0.23.159 */
.
dst_port
=
WRTD_UDP_PORT
,
...
...
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