Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coqdram
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
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
sdram20
coqdram
Commits
648758e4
Commit
648758e4
authored
3 years ago
by
Florian Brandner
Browse files
Options
Downloads
Patches
Plain Diff
correct Req_handled constraint and its proof.
parent
32701650
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
coq/Arbiter.v
+1
-15
1 addition, 15 deletions
coq/Arbiter.v
coq/FIFO.v
+13
-21
13 additions, 21 deletions
coq/FIFO.v
with
14 additions
and
36 deletions
coq/Arbiter.v
+
1
−
15
View file @
648758e4
...
...
@@ -4,20 +4,6 @@ From sdram Require Export Trace.
Section
Arbiter
.
Context
{
BANK_CFG
:
Bank_configuration
}
.
Definition
Match
(
req
:
Request_t
)
(
cmd
:
Command_t
)
:
bool
:=
match
req
.(
Kind
),
cmd
.(
CKind
)
with
|
RD
,
CRD
|
WR
,
CWR
=>
(
cmd
.(
Request
)
==
req
)
|
_
,
_
=>
false
end
.
Lemma
Match_CmdT
req
t
:
Match
req
(
Cmd_of_req
req
t
).
Proof
.
unfold
Match
,
Cmd_of_req
,
Kind_of_req
.
destruct
(
Kind
_
);
by
simpl
.
Qed
.
Class
Arbiter_t
:=
mkArbiter
{
Input
:
Requests_t
;
...
...
@@ -26,6 +12,6 @@ Section Arbiter.
(
*
All
Requests
must
handled
*
)
Req_handled
:
forall
req
,
req
\
in
Requests
->
exists
cmd
:
Command_
t
,
(
c
md
\
in
Arbitrate
.(
Commands
)
)
&&
((
Match
req
cmd
))
exists
t
,
(
C
md
_of_req
req
t
)
\
in
Arbitrate
.(
Commands
)
}
.
End
Arbiter
.
This diff is collapsed.
Click to expand it.
coq/FIFO.v
+
13
−
21
View file @
648758e4
...
...
@@ -301,32 +301,24 @@ Section FIFO.
-
by
apply
(
FIFO_trace_uniq
a
)
in
IHl
.
*
)
Lemma
FIFO_
arbiter
_handled
r
eq
:
req
\
in
Req
uest
s
->
exists
cmd
:
Command_t
,
(
cmd
\
in
FIFO_arbitrate
.(
Commands
))
/
\
((
cmd
\
in
FIFO_
arbitrate
.(
Commands
))
->
Match
req
cmd
).
Lemma
FIFO_
trace_Req
_handled
R
eq
s
:
forall
req
,
req
\
in
Reqs
->
exists
t
,
(
Cmd_of_req
req
t
)
\
in
(
FIFO_
trace
Reqs
).(
Cmds
).
Proof
.
intros
.
exists
(
Cmd_of_req
req
5
).
split
.
-
admit
.
-
unfold
FIFO_arbitrate
in
*
.
simpl
in
*
.
induction
Requests
.
-
by
rewrite
in_nil
in
H
.
-
rewrite
in_cons
in
H
.
destruct
(
req
==
a
)
eqn
:
Heq
;
move
:
Heq
=>
/
eqP
Heq
.
-
intros
.
subst
.
by
apply
Match_CmdT
.
-
intros
Hc
.
simpl
in
Hc
.
rewrite
->
3
in_cons
in
Hc
.
decompose_FIFO_cmds
Hc
Cmdb
.
-
contradict
Cmdb
.
by
apply
/
eqP
/
Command_neq_req_CMD
.
-
contradict
Cmdb
.
by
apply
/
eqP
/
Command_neq_CMD_ACT
.
-
contradict
Cmdb
.
by
apply
/
eqP
/
Command_neq_CMD_PRE
.
-
rewrite
Bool
.
orb_false_l
in
H
.
by
apply
IHl
.
induction
Reqs
.
-
by
contradict
H
.
-
move
:
H
=>
/
orP
[
/
eqP
Heq
|
H
].
-
exists
((
maxn
(
FIFO_trace
Reqs
).(
Time
)
req
.(
Date
))
+
FIFO_CMD_date
).
subst
.
rewrite
in_cons
.
apply
/
orP
.
by
left
.
-
apply
IHReqs
in
H
.
destruct
H
as
[
t
IH
].
exists
(
t
).
by
do
3
(
rewrite
in_cons
;
apply
/
orP
;
right
).
Qed
.
Instance
FIFO_arbiter
:
Arbiter_t
:=
mkArbiter
Input
FIFO_arbitrate
FIFO_
arbiter_handled
.
mkArbiter
Input
FIFO_arbitrate
(
FIFO_
trace_Req_handled
Requests
)
.
End
FIFO
.
Section
Test
.
...
...
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