Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
M
MGPUSim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Akita
MGPUSim
Commits
36b1be59
Commit
36b1be59
authored
5 years ago
by
Yifan Sun
Browse files
Options
Downloads
Patches
Plain Diff
Add read and write to bottom to the transaction
Former-commit-id:
0135e7ac
Former-commit-id:
4ef23d91
Former-commit-id:
cc4cfeab
parent
a8aedf60
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
timing/newcaches/l1v/directory.go
+4
-0
4 additions, 0 deletions
timing/newcaches/l1v/directory.go
timing/newcaches/l1v/directory_test.go
+8
-1
8 additions, 1 deletion
timing/newcaches/l1v/directory_test.go
with
12 additions
and
1 deletion
timing/newcaches/l1v/directory.go
+
4
−
0
View file @
36b1be59
...
...
@@ -135,6 +135,8 @@ func (d *directory) fetchFromBottom(
return
false
}
trans
.
readToBottom
=
readToBottom
mshrEntry
:=
d
.
mshr
.
Add
(
cacheLineID
)
mshrEntry
.
Requests
=
append
(
mshrEntry
.
Requests
,
trans
)
mshrEntry
.
ReadReq
=
readToBottom
...
...
@@ -186,6 +188,8 @@ func (d *directory) writeBottom(now akita.VTimeInSec, trans *transaction) bool {
if
err
!=
nil
{
return
false
}
trans
.
writeToBottom
=
writeToBottom
return
true
}
...
...
This diff is collapsed.
Click to expand it.
timing/newcaches/l1v/directory_test.go
+
8
−
1
View file @
36b1be59
...
...
@@ -179,6 +179,7 @@ var _ = Describe("Directory", func() {
Expect
(
block
.
Tag
)
.
To
(
Equal
(
uint64
(
0x100
)))
Expect
(
block
.
IsLocked
)
.
To
(
BeTrue
())
Expect
(
block
.
IsValid
)
.
To
(
BeTrue
())
Expect
(
trans
.
readToBottom
)
.
To
(
BeIdenticalTo
(
readToBottom
))
})
It
(
"should stall is victim block is locked"
,
func
()
{
...
...
@@ -242,12 +243,14 @@ var _ = Describe("Directory", func() {
})
It
(
"should add to mshr entry"
,
func
()
{
var
writeToBottom
*
mem
.
WriteReq
inBuf
.
EXPECT
()
.
Peek
()
.
Return
(
trans
)
inBuf
.
EXPECT
()
.
Pop
()
mshr
.
EXPECT
()
.
Query
(
uint64
(
0x100
))
.
Return
(
mshrEntry
)
lowModuleFinder
.
EXPECT
()
.
Find
(
uint64
(
0x104
))
bottomPort
.
EXPECT
()
.
Send
(
gomock
.
Any
())
.
Do
(
func
(
write
*
mem
.
WriteReq
)
{
writeToBottom
=
write
Expect
(
write
.
Address
)
.
To
(
Equal
(
uint64
(
0x104
)))
Expect
(
write
.
Data
)
.
To
(
Equal
([]
byte
{
1
,
2
,
3
,
4
}))
Expect
(
write
.
PID
)
.
To
(
Equal
(
ca
.
PID
(
1
)))
...
...
@@ -257,6 +260,7 @@ var _ = Describe("Directory", func() {
Expect
(
madeProgress
)
.
To
(
BeTrue
())
Expect
(
mshrEntry
.
Requests
)
.
To
(
ContainElement
(
trans
))
Expect
(
trans
.
writeToBottom
)
.
To
(
BeIdenticalTo
(
writeToBottom
))
})
})
...
...
@@ -301,6 +305,7 @@ var _ = Describe("Directory", func() {
Expect
(
madeProgress
)
.
To
(
BeTrue
())
Expect
(
block
.
IsLocked
)
.
To
(
BeTrue
())
Expect
(
trans
.
writeToBottom
)
.
NotTo
(
BeNil
())
})
It
(
"should stall is the block is locked"
,
func
()
{
...
...
@@ -398,9 +403,10 @@ var _ = Describe("Directory", func() {
Expect
(
block
.
IsLocked
)
.
To
(
BeTrue
())
Expect
(
block
.
Tag
)
.
To
(
Equal
(
uint64
(
0x100
)))
Expect
(
block
.
IsValid
)
.
To
(
BeFalse
())
Expect
(
trans
.
writeToBottom
)
.
NotTo
(
BeNil
())
})
It
(
"should
send to bank in case of write miss
"
,
func
()
{
It
(
"should
write full block
"
,
func
()
{
block
.
Tag
=
0x200
block
.
IsValid
=
false
write
.
Address
=
0x100
...
...
@@ -432,6 +438,7 @@ var _ = Describe("Directory", func() {
Expect
(
block
.
IsLocked
)
.
To
(
BeTrue
())
Expect
(
block
.
Tag
)
.
To
(
Equal
(
uint64
(
0x100
)))
Expect
(
block
.
IsValid
)
.
To
(
BeTrue
())
Expect
(
trans
.
writeToBottom
)
.
NotTo
(
BeNil
())
})
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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