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
e06bad87
Commit
e06bad87
authored
3 years ago
by
Alban Gruin
Browse files
Options
Downloads
Patches
Plain Diff
Revert "sras: size improvements"
This reverts commit
cd7dabb4
.
parent
562b13a7
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
+18
-18
18 additions, 18 deletions
src/frontend/sras.sv
with
18 additions
and
18 deletions
src/frontend/sras.sv
+
18
−
18
View file @
e06bad87
...
...
@@ -54,10 +54,6 @@ module sras #(
logic
overflow
;
assign
overflow
=
|
ovf_counter_q
[
ptr_spec_q
];
logic
[
SZ_OVF
-
1
:
0
]
ovf_plus_one
,
ovf_minus_one
;
assign
ovf_plus_one
=
ovf_counter_q
[
ptr_spec_q
]
+
1'b1
;
assign
ovf_minus_one
=
ovf_counter_q
[
ptr_spec_q
]
-
1'b1
;
always_comb
begin
ovf_counter_d
=
ovf_counter_q
;
...
...
@@ -66,23 +62,23 @@ module sras #(
end
else
if
(
!
bad_spec_i
)
begin
if
(
push_i
&&
!
pop_i
)
begin
if
(
overflow
||
prev_plus_one
==
'0
||
pp_plus_one
==
'0
)
begin
ovf_counter_d
[
ptr_spec_d
]
=
ovf_
plus_one
;
ovf_counter_d
[
ptr_spec_d
]
=
ovf_
counter_q
[
ptr_spec_q
]
+
1'b1
;
end
if
((
prev_plus_one
==
'0
||
pp_plus_one
==
'0
)
&&
begin_spec_i
)
begin
ovf_counter_d
[
ptr_spec_q
]
=
ovf_
plus_one
;
ovf_counter_d
[
ptr_spec_q
]
=
ovf_
counter_q
[
ptr_spec_q
]
+
1'b1
;
end
end
else
if
(
!
push_i
&&
pop_i
)
begin
if
(
ovf_counter_q
[
ptr_spec_q
]
==
'0
)
begin
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
];
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_
minus_one
;
ovf_counter_d
[
ptr_spec_d
]
=
ovf_
counter_q
[
ptr_spec_q
]
-
1'b1
;
end
end
else
if
(
begin_spec_i
)
begin
ovf_counter_d
[
ptr_spec_d
]
=
ovf_counter_q
[
ptr_spec_q
];
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_
minus_one
;
ovf_counter_d
[
ptr_spec_d
]
=
ovf_
counter_q
[
ptr_spec_q
]
-
1'b1
;
end
end
...
...
@@ -116,8 +112,7 @@ module sras #(
assign
data_o
=
stack_q
[
previous_tos_addr
][
previous_tos
];
ariane_pkg
::
ras_t
to_push
;
assign
to_push
.
ra
=
data_i
;
// assign to_push.ra = (can_push) ? data_i : 0;
assign
to_push
.
ra
=
(
can_push
)
?
data_i
:
0
;
assign
to_push
.
valid
=
can_push
;
ariane_pkg
::
ras_t
[
DEPTH
-
1
:
0
]
new_stack
,
prev_stack
;
...
...
@@ -131,14 +126,19 @@ module sras #(
if
(
can_pop
)
begin
new_stack
[
previous_tos
]
=
to_push
;
end
else
if
(
can_push
)
begin
end
if
(
can_push
)
begin
new_stack
[
prev_plus_one
]
=
to_push
;
end
end
for
(
genvar
i
=
0
;
i
<
DEPTH
;
i
++
)
begin
assign
prev_stack
[
i
]
=
(
i
==
pp_plus_one
&&
can_push
&&
begin_spec_i
)
?
to_push
:
stack_q
[
ptr_spec_q
][
i
];
always_comb
begin
prev_stack
=
stack_q
[
ptr_spec_q
];
if
(
can_push
&&
begin_spec_i
)
begin
prev_stack
[
pp_plus_one
]
=
to_push
;
end
end
for
(
genvar
i
=
0
;
i
<
SpecDepth
;
i
++
)
begin
...
...
@@ -148,16 +148,16 @@ module sras #(
stack_q
[
i
];
end
//
initial stack_q
<
= '0;
initial
stack_q
=
'0
;
always_ff
@
(
posedge
clk_i
or
negedge
rst_ni
)
begin
stack_q
<=
stack_d
;
if
(
~
rst_ni
)
begin
stack_q
<=
'0
;
ptr_spec_q
<=
'0
;
ptr_backup_q
<=
'0
;
tos_q
<=
'0
;
ovf_counter_q
<=
'0
;
end
else
begin
stack_q
<=
stack_d
;
ptr_spec_q
<=
ptr_spec_d
;
ptr_backup_q
<=
ptr_backup_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