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
66676ef2
Commit
66676ef2
authored
Mar 07, 2012
by
Maciej Lipinski
Committed by
Tomasz Wlostowski
Mar 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sim[sink/slave]: added permanent stall
Signed-off-by:
Tomasz Włostowski
<
tomasz.wlostowski@cern.ch
>
parent
191c3bd6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
3 deletions
+47
-3
eth_packet.svh
sim/eth_packet.svh
+2
-0
if_wb_slave.svh
sim/if_wb_slave.svh
+28
-3
if_wishbone_accessor.svh
sim/if_wishbone_accessor.svh
+10
-0
wb_packet_sink.svh
sim/wb_packet_sink.svh
+7
-0
No files found.
sim/eth_packet.svh
View file @
66676ef2
...
...
@@ -388,6 +388,8 @@ virtual class EthPacketSink;
static
int
_
null
=
0
;
pure
virtual
function
int
poll
()
;
pure
virtual
function
int
permanent_stall_enable
()
;
pure
virtual
function
int
permanent_stall_disable
()
;
pure
virtual
task
recv
(
ref
EthPacket
pkt
,
ref
int
result
=
_
null
)
;
endclass
// EthPacketSink
...
...
sim/if_wb_slave.svh
View file @
66676ef2
...
...
@@ -63,8 +63,11 @@ interface IWishboneSlave
real
stall_prob
;
}
settings
;
int
permanent_stall
=
0
;
function
automatic
int
_
poll
()
;
return
poll
()
;
endfunction
function
automatic
int
_
permanent_stall_enable
()
;
return
permanent_stall_enable
()
;
endfunction
function
automatic
int
_
permanent_stall_disable
()
;
return
permanent_stall_disable
()
;
endfunction
task
automatic
_
get
(
ref
wb_cycle_t
xfer
)
;
get
(
xfer
)
;
endtask
class
CIWBSlaveAccessor
extends
CWishboneAccessor
;
...
...
@@ -72,7 +75,15 @@ interface IWishboneSlave
function
automatic
int
poll
()
;
return
_
poll
()
;
endfunction
function
automatic
int
permanent_stall_enable
()
;
return
_
permanent_stall_enable
()
;
endfunction
function
automatic
int
permanent_stall_disable
()
;
return
_
permanent_stall_disable
()
;
endfunction
task
get
(
ref
wb_cycle_t
xfer
)
;
_
get
(
xfer
)
;
endtask
...
...
@@ -88,7 +99,18 @@ interface IWishboneSlave
tmp
=
new
;
return
tmp
;
endfunction
// get_accessor
function
automatic
int
permanent_stall_enable
()
;
permanent_stall
=
1
;
$
display
(
"permanent stall ON"
)
;
return
permanent_stall
;
endfunction
function
automatic
int
permanent_stall_disable
()
;
permanent_stall
=
0
;
$
display
(
"permanent stall OFF"
)
;
return
permanent_stall
;
endfunction
function
automatic
int
poll
()
;
return
c_queue
.
size
()
!=
0
;
...
...
@@ -152,7 +174,10 @@ interface IWishboneSlave
task
pipelined_fsm
()
;
if
(
settings
.
gen_random_stalls
)
// ML
if
(
permanent_stall
)
stall
<=
1
;
else
if
(
settings
.
gen_random_stalls
)
gen_random_stalls
()
;
else
stall
<=
0
;
...
...
sim/if_wishbone_accessor.svh
View file @
66676ef2
...
...
@@ -21,6 +21,16 @@ virtual class CWishboneAccessor extends CBusAccessor;
virtual
function
automatic
int
poll
()
;
return
0
;
endfunction
// poll
// ML stuff [slave only]
virtual
function
automatic
int
permanent_stall_enable
()
;
$
display
(
"CWisboneAccessor: permanent_stall: ON"
)
;
endfunction
;
// ML stuff [slave only]
virtual
function
automatic
int
permanent_stall_disable
()
;
$
display
(
"CWisboneAccessor: permanent_stall: OFF"
)
;
endfunction
;
// [slave only] adds a simulation event (e.g. a forced STALL, RETRY, ERROR)
// evt = event type (STALL, ERROR, RETRY)
...
...
sim/wb_packet_sink.svh
View file @
66676ef2
...
...
@@ -21,6 +21,13 @@ class WBPacketSink extends EthPacketSink;
return
m_acc
.
poll
()
;
endfunction
// poll
function
int
permanent_stall_enable
()
;
return
m_acc
.
permanent_stall_enable
()
;
endfunction
function
int
permanent_stall_disable
()
;
return
m_acc
.
permanent_stall_disable
()
;
endfunction
protected
task
decode_status
(
uint64_t
stat
,
ref
EthPacket
pkt
)
;
if
(
stat
&
'h2
)
pkt
.
error
=
1'b1
;
...
...
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