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
e17128ee
Commit
e17128ee
authored
3 years ago
by
Alban Gruin
Browse files
Options
Downloads
Patches
Plain Diff
sras: handle unhandled cases wrt. the overflow
Signed-off-by:
Alban Gruin
<
alban.gruin@irit.fr
>
parent
594e3bd6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/frontend/frontend.sv
+9
-8
9 additions, 8 deletions
src/frontend/frontend.sv
src/frontend/sras.sv
+6
-1
6 additions, 1 deletion
src/frontend/sras.sv
with
15 additions
and
9 deletions
src/frontend/frontend.sv
+
9
−
8
View file @
e17128ee
...
@@ -380,14 +380,15 @@ module frontend import ariane_pkg::*; #(
...
@@ -380,14 +380,15 @@ module frontend import ariane_pkg::*; #(
)
i_ras
(
)
i_ras
(
.
clk_i
,
.
clk_i
,
.
rst_ni
,
.
rst_ni
,
.
flush_i
(
flush_bp_i
),
.
flush_i
(
flush_bp_i
),
.
push_i
(
ras_push
),
.
push_i
(
ras_push
),
.
pop_i
(
ras_pop
),
.
pop_i
(
ras_pop
),
.
data_i
(
ras_update
),
.
data_i
(
ras_update
),
.
begin_spec_i
(
begin_spec_o
),
.
begin_spec_i
(
begin_spec_o
),
.
valid_spec_i
(
is_correct_predict
),
.
valid_spec_i
(
is_correct_predict
),
.
bad_spec_i
(
is_mispredict
),
.
bad_spec_i
(
is_mispredict
),
.
data_o
(
ras_predict
)
.
resolved_type_i
(
resolved_branch_i
.
cf_type
),
.
data_o
(
ras_predict
)
);
);
btb
#(
btb
#(
...
...
This diff is collapsed.
Click to expand it.
src/frontend/sras.sv
+
6
−
1
View file @
e17128ee
...
@@ -28,6 +28,7 @@ module sras #(
...
@@ -28,6 +28,7 @@ module sras #(
input
logic
begin_spec_i
,
input
logic
begin_spec_i
,
input
logic
valid_spec_i
,
input
logic
valid_spec_i
,
input
logic
bad_spec_i
,
input
logic
bad_spec_i
,
input
ariane_pkg
::
cf_t
resolved_type_i
,
output
ariane_pkg
::
ras_t
data_o
output
ariane_pkg
::
ras_t
data_o
);
);
...
@@ -68,12 +69,16 @@ module sras #(
...
@@ -68,12 +69,16 @@ module sras #(
ovf_counter_d
[
ptr_spec_q
]
=
ovf_counter_q
[
ptr_spec_q
]
+
1'b1
;
ovf_counter_d
[
ptr_spec_q
]
=
ovf_counter_q
[
ptr_spec_q
]
+
1'b1
;
end
end
end
else
if
(
!
push_i
&&
pop_i
)
begin
end
else
if
(
!
push_i
&&
pop_i
)
begin
if
(
ovf_counter_q
[
ptr_spec_q
]
!=
'0
)
begin
if
(
ovf_counter_q
[
ptr_spec_q
]
==
'0
)
begin
ovf_counter_d
[
ptr_spec_d
]
=
'0
;
// ovf_counter_d[ptr_spec_d] = ovf_counter_q[ptr_spec_q];
end
else
begin
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
]
-
1'b1
;
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
]
-
1'b1
;
end
end
end
else
if
(
begin_spec_i
)
begin
end
else
if
(
begin_spec_i
)
begin
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
];
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
];
end
end
end
else
if
(
bad_spec_i
&&
resolved_type_i
==
ariane_pkg
::
Return
&&
ovf_counter_q
[
ptr_spec_q
]
!=
'0
)
begin
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
]
-
1'b1
;
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
Ghost User
@ghost
mentioned in commit
c8b4b7b6
·
8 months ago
mentioned in commit
c8b4b7b6
mentioned in commit c8b4b7b62aa113b37e3d3dfa90d4f1fb5d93feba
Toggle commit list
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