Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit core collection
Manage
Activity
Members
Labels
Plan
Issues
34
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit core collection
Commits
66676ef2
Commit
66676ef2
authored
13 years ago
by
Maciej Lipinski
Committed by
Tomasz Wlostowski
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sim[sink/slave]: added permanent stall
Signed-off-by:
Tomasz Włostowski
<
tomasz.wlostowski@cern.ch
>
parent
191c3bd6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
sim/eth_packet.svh
+2
-0
2 additions, 0 deletions
sim/eth_packet.svh
sim/if_wb_slave.svh
+28
-3
28 additions, 3 deletions
sim/if_wb_slave.svh
sim/if_wishbone_accessor.svh
+10
-0
10 additions, 0 deletions
sim/if_wishbone_accessor.svh
sim/wb_packet_sink.svh
+7
-0
7 additions, 0 deletions
sim/wb_packet_sink.svh
with
47 additions
and
3 deletions
sim/eth_packet.svh
+
2
−
0
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
...
...
This diff is collapsed.
Click to expand it.
sim/if_wb_slave.svh
+
28
−
3
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
;
...
...
This diff is collapsed.
Click to expand it.
sim/if_wishbone_accessor.svh
+
10
−
0
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)
...
...
This diff is collapsed.
Click to expand it.
sim/wb_packet_sink.svh
+
7
−
0
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment