Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hammer FPGA backend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container 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
Kia
Hammer FPGA backend
Commits
5382fdd6
Commit
5382fdd6
authored
4 years ago
by
Kia
Browse files
Options
Downloads
Patches
Plain Diff
reordering
parent
9d0c75bb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rtl_lib/pipe_stage.py
+16
-13
16 additions, 13 deletions
rtl_lib/pipe_stage.py
with
16 additions
and
13 deletions
rtl_lib/pipe_stage.py
+
16
−
13
View file @
5382fdd6
...
@@ -22,38 +22,41 @@ class PipeStage(Elaboratable):
...
@@ -22,38 +22,41 @@ class PipeStage(Elaboratable):
def
elaborate
(
self
,
platform
):
def
elaborate
(
self
,
platform
):
m
=
Module
()
m
=
Module
()
#
INTERFACE
FORMAL PROPERTIES
# FORMAL PROPERTIES
# UPSTREAM INTERFACE
# Stable Ready for the upstream interface cannot be guarantted if we have a register in
# Stable Ready for the upstream interface cannot be guarantted if we have a register in
# the way (otherwise we'd need a combinatorial circuit which would defeat the point).
# the way (otherwise we'd need a combinatorial circuit which would defeat the point).
if
(
self
.
registered_ready
==
False
):
if
(
self
.
registered_ready
==
False
):
with
m
.
If
((
Past
(
self
.
upstream_ready_out
)
&
(
~
Past
(
self
.
upstream_valid_in
)))
==
1
):
with
m
.
If
((
Past
(
self
.
upstream_ready_out
)
&
(
~
Past
(
self
.
upstream_valid_in
)))
==
1
):
m
.
d
.
comb
+=
Assert
(
self
.
upstream_ready_out
==
1
)
m
.
d
.
comb
+=
Assert
(
self
.
upstream_ready_out
==
1
)
# Assumption of Stable
Ready on down
stream interface is not needed for this proof
#
#
Assumption of Stable
data/valid on up
stream interface is not needed for this proof
:
#
with m.If((Past(self.
down
stream_ready_
in
) & (
~
Past(self.
down
stream_valid_
out
))) == 1):
#
with m.If((
~
Past(self.
up
stream_ready_
out
) & (Past(self.
up
stream_valid_
in
))) == 1):
#
m.d.comb += Assume(self.
down
stream_
ready_in == 1
)
#
m.d.comb += Assume(
Stable(
self.
up
stream_
data_in) & self.upstream_valid_in
)
# Cover interface transactions and stalls:
m
.
d
.
comb
+=
Cover
(
self
.
upstream_ready_out
&
self
.
upstream_valid_in
)
m
.
d
.
comb
+=
Cover
((
~
self
.
upstream_ready_out
)
&
self
.
upstream_valid_in
)
# DOWNSTREAM INTERFACE
# Assumption of Stable
data/valid on up
stream interface is not needed for this proof
:
#
#
Assumption of Stable
Ready on down
stream interface is not needed for this proof
#
with m.If((
~
Past(self.
up
stream_ready_
out
) & (Past(self.
up
stream_valid_
in
))) == 1):
#
with m.If((Past(self.
down
stream_ready_
in
) & (
~
Past(self.
down
stream_valid_
out
))) == 1):
#
m.d.comb += Ass
ert(Stable(self.upstream_data_in) & self.upstream_valid_in
)
#
m.d.comb += Ass
ume(self.downstream_ready_in == 1
)
with
m
.
If
(
Past
(
ResetSignal
())
==
0
):
with
m
.
If
(
Past
(
ResetSignal
())
==
0
):
with
m
.
If
((
~
Past
(
self
.
downstream_ready_in
)
&
(
Past
(
self
.
downstream_valid_out
)))
==
1
):
with
m
.
If
((
~
Past
(
self
.
downstream_ready_in
)
&
(
Past
(
self
.
downstream_valid_out
)))
==
1
):
m
.
d
.
comb
+=
Assert
(
Stable
(
self
.
downstream_data_out
)
&
self
.
downstream_valid_out
)
m
.
d
.
comb
+=
Assert
(
Stable
(
self
.
downstream_data_out
)
&
self
.
downstream_valid_out
)
# Cover interface transactions
# Cover interface transactions and stalls:
m
.
d
.
comb
+=
Cover
(
self
.
upstream_ready_out
&
self
.
upstream_valid_in
)
m
.
d
.
comb
+=
Cover
(
self
.
downstream_ready_in
&
self
.
downstream_valid_out
)
m
.
d
.
comb
+=
Cover
(
self
.
downstream_ready_in
&
self
.
downstream_valid_out
)
# Cover interface stalls
m
.
d
.
comb
+=
Cover
((
~
self
.
upstream_ready_out
)
&
self
.
upstream_valid_in
)
m
.
d
.
comb
+=
Cover
((
~
self
.
downstream_ready_in
)
&
self
.
downstream_valid_out
)
m
.
d
.
comb
+=
Cover
((
~
self
.
downstream_ready_in
)
&
self
.
downstream_valid_out
)
# IMPLEMENTATION
if
(
self
.
registered_ready
==
False
):
if
(
self
.
registered_ready
==
False
):
m
.
d
.
comb
+=
self
.
upstream_ready_out
.
eq
(
self
.
downstream_ready_in
|
(
~
self
.
downstream_valid_out
))
m
.
d
.
comb
+=
self
.
upstream_ready_out
.
eq
(
self
.
downstream_ready_in
|
(
~
self
.
downstream_valid_out
))
...
...
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