Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MINOTAuR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MINOTAuR
MINOTAuR
Commits
7eb528cb
Commit
7eb528cb
authored
3 years ago
by
Alban Gruin
Browse files
Options
Downloads
Patches
Plain Diff
lru: improvements (?)
Signed-off-by:
Alban Gruin
<
alban.gruin@irit.fr
>
parent
f580ad77
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cache_subsystem/lru_4way.sv
+1
-5
1 addition, 5 deletions
src/cache_subsystem/lru_4way.sv
with
1 addition
and
5 deletions
src/cache_subsystem/lru_4way.sv
+
1
−
5
View file @
7eb528cb
...
@@ -47,15 +47,13 @@ module lru_4way (
...
@@ -47,15 +47,13 @@ module lru_4way (
// assign ways[3] = (ages_i[4]) ? ordered_ways[2] : ordered_ways[3];
// assign ways[3] = (ages_i[4]) ? ordered_ways[2] : ordered_ways[3];
assign
evicted_o
=
ways
[
3
];
assign
evicted_o
=
ways
[
3
];
assign
updated_o
=
miss_i
||
(
ways
[
0
]
!=
hit_i
)
||
(
ways
[
1
]
!=
ages_i
[
3
:
2
]);
always_comb
begin
:
encode
always_comb
begin
:
encode
ages_o
=
ages_i
;
ages_o
=
ages_i
;
new_ways
=
ways
[
2
:
0
];
new_ways
=
ways
[
2
:
0
];
updated_o
=
1'b0
;
if
(
miss_i
||
ways
[
0
]
!=
hit_i
)
begin
if
(
miss_i
||
ways
[
0
]
!=
hit_i
)
begin
updated_o
=
1'b1
;
if
(
miss_i
||
ways
[
1
]
!=
hit_i
)
begin
if
(
miss_i
||
ways
[
1
]
!=
hit_i
)
begin
new_ways
[
0
]
=
(
miss_i
)
?
ways
[
3
]
:
hit_i
;
new_ways
[
0
]
=
(
miss_i
)
?
ways
[
3
]
:
hit_i
;
new_ways
[
1
]
=
ways
[
0
];
new_ways
[
1
]
=
ways
[
0
];
...
@@ -64,8 +62,6 @@ module lru_4way (
...
@@ -64,8 +62,6 @@ module lru_4way (
new_ways
[
0
]
=
ways
[
1
];
new_ways
[
0
]
=
ways
[
1
];
new_ways
[
1
]
=
ways
[
0
];
new_ways
[
1
]
=
ways
[
0
];
end
end
end
else
if
(
ways
[
1
]
!=
ages_i
[
3
:
2
])
begin
updated_o
=
1'b1
;
end
end
new_ways_ordered
[
0
]
=
(
new_ways
[
0
]
<
new_ways
[
1
])
?
new_ways
[
0
]
:
new_ways
[
1
];
new_ways_ordered
[
0
]
=
(
new_ways
[
0
]
<
new_ways
[
1
])
?
new_ways
[
0
]
:
new_ways
[
1
];
...
...
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