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
8b89b80a
Commit
8b89b80a
authored
3 years ago
by
Alban Gruin
Browse files
Options
Downloads
Patches
Plain Diff
Revert "sras: size improvements"
This reverts commit
434ff5a4
.
parent
fa209d0a
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/frontend/sras.sv
+21
-28
21 additions, 28 deletions
src/frontend/sras.sv
with
21 additions
and
28 deletions
src/frontend/sras.sv
+
21
−
28
View file @
8b89b80a
...
@@ -54,44 +54,38 @@ module sras #(
...
@@ -54,44 +54,38 @@ module sras #(
assign
overflow
=
|
ovf_counter_q
[
ptr_spec_q
];
assign
overflow
=
|
ovf_counter_q
[
ptr_spec_q
];
always_comb
begin
always_comb
begin
tos_d
=
tos_q
;
ovf_counter_d
=
ovf_counter_q
;
ovf_counter_d
=
ovf_counter_q
;
if
(
flush_i
)
begin
if
(
flush_i
)
begin
tos_d
=
'0
;
ovf_counter_d
=
'0
;
ovf_counter_d
=
'0
;
end
else
if
(
!
bad_spec_i
)
begin
end
else
if
(
!
bad_spec_i
)
begin
if
(
push_i
&&
!
pop_i
)
begin
if
(
push_i
&&
!
pop_i
)
begin
if
(
overflow
)
begin
if
(
overflow
)
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
else
if
(
prev_plus_one
==
'0
||
pp_plus_one
==
'0
)
begin
end
else
begin
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
]
+
1'b1
;
if
(
prev_plus_one
==
'0
||
pp_plus_one
==
'0
)
begin
if
(
begin_spec_i
)
begin
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
]
+
1'b1
;
ovf_counter_d
[
ptr_spec_q
]
=
ovf_counter_q
[
ptr_spec_q
]
+
1'b1
;
if
(
begin_spec_i
)
begin
ovf_counter_d
[
ptr_spec_q
]
=
ovf_counter_q
[
ptr_spec_q
]
+
1'b1
;
end
end
else
begin
tos_d
[
ptr_spec_d
]
=
prev_plus_one
;
if
(
begin_spec_i
)
begin
tos_d
[
ptr_spec_q
]
=
pp_plus_one
;
end
end
end
end
end
end
else
if
(
!
push_i
&&
pop_i
&&
ovf_counter_q
[
ptr_spec_q
]
!=
'0
)
begin
end
else
if
(
!
push_i
&&
pop_i
)
begin
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
]
-
1'b1
;
if
(
ovf_counter_q
[
ptr_spec_q
]
!=
'0
)
begin
end
else
if
(
!
bad_spec_i
&&
begin_spec_i
)
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
];
end
else
begin
end
tos_d
[
ptr_spec_d
]
=
prev_minus_one
;
end
end
always_comb
begin
tos_d
=
tos_q
;
if
(
flush_i
)
begin
tos_d
=
'0
;
end
else
if
(
!
bad_spec_i
)
begin
if
(
push_i
&&
!
pop_i
&&
!
overflow
&&
prev_plus_one
!=
'0
&&
pp_plus_one
!=
'0
)
begin
tos_d
[
ptr_spec_d
]
=
prev_plus_one
;
if
(
begin_spec_i
)
begin
tos_d
[
ptr_spec_q
]
=
pp_plus_one
;
end
end
end
else
if
(
!
push_i
&&
pop_i
&&
ovf_counter_q
[
ptr_spec_q
]
==
'0
)
begin
tos_d
[
ptr_spec_d
]
=
prev_minus_one
;
end
else
if
(
!
bad_spec_i
&&
begin_spec_i
)
begin
end
else
if
(
!
bad_spec_i
&&
begin_spec_i
)
begin
tos_d
[
ptr_spec_d
]
=
tos_q
[
ptr_spec_q
];
tos_d
[
ptr_spec_d
]
=
tos_q
[
ptr_spec_q
];
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
];
end
end
end
end
end
end
...
@@ -139,16 +133,15 @@ module sras #(
...
@@ -139,16 +133,15 @@ module sras #(
stack_q
[
i
];
stack_q
[
i
];
end
end
initial
stack_q
=
'0
;
always_ff
@
(
posedge
clk_i
or
negedge
rst_ni
)
begin
always_ff
@
(
posedge
clk_i
or
negedge
rst_ni
)
begin
stack_q
<=
stack_d
;
if
(
~
rst_ni
)
begin
if
(
~
rst_ni
)
begin
stack_q
<=
'0
;
ptr_spec_q
<=
'0
;
ptr_spec_q
<=
'0
;
ptr_backup_q
<=
'0
;
ptr_backup_q
<=
'0
;
tos_q
<=
'0
;
tos_q
<=
'0
;
ovf_counter_q
<=
'0
;
ovf_counter_q
<=
'0
;
end
else
begin
end
else
begin
stack_q
<=
stack_d
;
ptr_spec_q
<=
ptr_spec_d
;
ptr_spec_q
<=
ptr_spec_d
;
ptr_backup_q
<=
ptr_backup_d
;
ptr_backup_q
<=
ptr_backup_d
;
tos_q
<=
tos_d
;
tos_q
<=
tos_d
;
...
...
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