Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
30
Issues
30
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Schedules
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 core collection
Commits
2ec01ad9
Commit
2ec01ad9
authored
Oct 24, 2011
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simulation models: WBPacketSink: added partial OOB decoding
parent
44adb846
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
wb_packet_sink.svh
sim/wb_packet_sink.svh
+21
-7
No files found.
sim/wb_packet_sink.svh
View file @
2ec01ad9
...
...
@@ -38,9 +38,24 @@ class WBPacketSink extends EthPacketSink;
end
endtask
// decode_status
protected
task
decode_oob
(
uint64_t
oob
,
ref
EthPacket
pkt
)
;
$
display
(
"DecodeOOB: %x"
,
oob
)
;
protected
task
decode_oob
(
uint64_t
oob
,
int
size
,
ref
EthPacket
pkt
)
;
if
(
!
size
)
return
;
else
if
(
size
==
2
&&
(
oob
>>
28
)
==
WRF_OOB_TX_FID
)
begin
// $display("GotTxOOB");
pkt
.
oob_type
=
TX_FID
;
pkt
.
ts
.
frame_id
=
oob
&
'hffff
;
end
else
if
(
size
==
3
&&
(
oob
>>
46
)
==
WRF_OOB_RX_TIMESTAMP
)
begin
$
display
(
"GotRXOOB"
)
;
end
else
begin
$
error
(
"Invalid OOB!"
)
;
$
stop
;
end
endtask
// decode_oob
...
...
@@ -50,7 +65,7 @@ class WBPacketSink extends EthPacketSink;
byte
tmp
[]
;
wb_cycle_t
cyc
;
int
i
,
size
=
0
,
n
=
0
,
n_oob
=
0
;
bit
with_oob
=
0
;
int
oob_size
=
0
;
...
...
@@ -92,14 +107,13 @@ class WBPacketSink extends EthPacketSink;
WRF_OOB:
begin
oob
=
(
oob
<<
16
)
|
xf
.
d
;
with_oob
=
1
;
oob_size
++
;
end
endcase
// case (xf.a)
end
pkt
.
deserialize
(
tmp
)
;
if
(
with_oob
)
decode_oob
(
oob
,
pkt
)
;
decode_oob
(
oob
,
oob_size
,
pkt
)
;
...
...
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