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
654b7bd9
Commit
654b7bd9
authored
3 years ago
by
Felipe Lisboa
Browse files
Options
Downloads
Patches
Plain Diff
Changed Arbiter_trace_t to Implementation_t
parent
0dff9182
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
coq2/Arbiter.v
+11
-8
11 additions, 8 deletions
coq2/Arbiter.v
coq2/FIFO.v
+7
-2
7 additions, 2 deletions
coq2/FIFO.v
coq2/TDM.v
+2
-2
2 additions, 2 deletions
coq2/TDM.v
with
20 additions
and
12 deletions
coq2/Arbiter.v
+
11
−
8
View file @
654b7bd9
...
...
@@ -3,6 +3,7 @@ Set Printing Projections.
From
sdram
Require
Export
Trace
.
Section
Arbiter
.
Context
{
REQESTOR_CFG
:
Requestor_configuration
}
.
Context
{
ARBITER_CFG
:
Arbiter_configuration
}
.
Context
{
BANK_CFG
:
Bank_configuration
}
.
...
...
@@ -22,6 +23,8 @@ Section Arbiter.
{
Arbiter_Commands
:
Commands_t
;
Arbiter_Time
:
nat
;
(
*
This
is
implementation
specific
*
)
Arbiter_State
:
State_t
;
Arbiter_Commands_date
:
...
...
@@ -29,7 +32,7 @@ Section Arbiter.
c
\
in
Arbiter_Commands
->
c
.(
CDate
)
<=
Arbiter_Time
}
.
Class
Arbiter_trace_t
:=
mkArbiterTrace
Class
Implementation_t
:=
mkImplementation
{
Init
:
Requests_t
->
Arbiter_state_t
;
Next
:
Requests_t
->
Arbiter_state_t
->
Arbiter_state_t
;
...
...
@@ -93,14 +96,14 @@ Section Arbiter.
by
rewrite
filter_uniq
.
Qed
.
Fixpoint
Default_arbitrate
{
AF
:
Arrival_function_t
}
{
AT
:
Arbiter_trace
_t
}
t
:
Arbiter_state_t
:=
Fixpoint
Default_arbitrate
{
AF
:
Arrival_function_t
}
{
IM
:
Implementation
_t
}
t
:
Arbiter_state_t
:=
let
R
:=
Arrival_at
t
in
match
t
with
|
0
=>
Init
R
|
S
(
t
'
)
=>
Next
R
(
Default_arbitrate
t
'
)
end
.
Lemma
Default_arbitrate_time_match
{
AF
:
Arrival_function_t
}
{
AT
:
Arbiter_trace
_t
}
t
:
Lemma
Default_arbitrate_time_match
{
AF
:
Arrival_function_t
}
{
IM
:
Implementation
_t
}
t
:
(
Default_arbitrate
t
).(
Arbiter_Time
)
==
t
.
Proof
.
induction
t
;
unfold
Default_arbitrate
.
...
...
@@ -111,13 +114,13 @@ Section Arbiter.
by
rewrite
IHt
in
H
.
Qed
.
Lemma
Default_arbitrate_time
{
AF
:
Arrival_function_t
}
{
AT
:
Arbiter_trace
_t
}
t
:
Lemma
Default_arbitrate_time
{
AF
:
Arrival_function_t
}
{
IM
:
Implementation
_t
}
t
:
(
Default_arbitrate
t
).(
Arbiter_Time
)
=
t
.
Proof
.
apply
/
eqP
.
apply
Default_arbitrate_time_match
.
Qed
.
Lemma
Default_arbitrate_cmds_sorted
{
AF
:
Arrival_function_t
}
{
AT
:
Arbiter_trace
_t
}
t
:
Lemma
Default_arbitrate_cmds_sorted
{
AF
:
Arrival_function_t
}
{
IM
:
Implementation
_t
}
t
:
seq_sorted
Command_lt
(
Default_arbitrate
t
).(
Arbiter_Commands
).
Proof
.
induction
t
;
simpl
.
...
...
@@ -137,7 +140,7 @@ Section Arbiter.
-
move
:
Hd
=>
/
eqP
Hd
.
by
rewrite
Hd
.
Qed
.
Lemma
Default_arbitrate_notin_cmd
{
AF
:
Arrival_function_t
}
{
AT
:
Arbiter_trace
_t
}
t
(
c
:
Command_t
)
:
Lemma
Default_arbitrate_notin_cmd
{
AF
:
Arrival_function_t
}
{
IM
:
Implementation
_t
}
t
(
c
:
Command_t
)
:
c
.(
CDate
)
>
t
->
c
\
notin
(
Default_arbitrate
t
).(
Arbiter_Commands
).
Proof
.
intros
.
...
...
@@ -152,7 +155,7 @@ Section Arbiter.
by
apply
/
negPn
.
Qed
.
Lemma
Default_arbitrate_cmds_uniq
{
AF
:
Arrival_function_t
}
{
AT
:
Arbiter_trace
_t
}
t
:
Lemma
Default_arbitrate_cmds_uniq
{
AF
:
Arrival_function_t
}
{
IM
:
Implementation
_t
}
t
:
uniq
((
Default_arbitrate
t
).(
Arbiter_Commands
)).
Proof
.
induction
t
;
simpl
.
...
...
@@ -171,7 +174,7 @@ Section Arbiter.
-
done
.
Qed
.
Lemma
Default_arbitrate_cmds_date
{
AF
:
Arrival_function_t
}
{
AT
:
Arbiter_trace
_t
}
t
cmd
:
Lemma
Default_arbitrate_cmds_date
{
AF
:
Arrival_function_t
}
{
IM
:
Implementation
_t
}
t
cmd
:
cmd
\
in
(
Default_arbitrate
t
).(
Arbiter_Commands
)
->
cmd
.(
CDate
)
<=
(
Default_arbitrate
t
).(
Arbiter_Time
).
Proof
.
rewrite
Default_arbitrate_time
.
...
...
This diff is collapsed.
Click to expand it.
coq2/FIFO.v
+
7
−
2
View file @
654b7bd9
...
...
@@ -195,8 +195,8 @@ Section FIFO.
all:
move
:
eqseq_cons
H
=>
->
/
andP
[
/
eqP
H
_
];
by
rewrite
<-
H
.
Qed
.
Global
Instance
FIFO_arbiter_trace
:
Arbiter_trace
_t
:=
mk
ArbiterTrace
Init_state
Next_state
Init_time
Next_time
Init_Cmds
Next_Cmds
Next_CDate
.
Global
Instance
FIFO_arbiter_trace
:
Implementation
_t
:=
mk
Implementation
Init_state
Next_state
Init_time
Next_time
Init_Cmds
Next_Cmds
Next_CDate
.
Ltac
isCommand
:=
unfold
isPRE
,
isACT
,
isCAS
,
PRE_of_req
,
ACT_of_req
,
CAS_of_req
,
Kind_of_req
;
...
...
@@ -1127,6 +1127,11 @@ Section FIFO.
(
*
------------------------------------------------------------------
*
)
(
*
TODO
:
remove
*
)
(
*
At
this
point
,
two
things
have
to
be
defined
*
)
(
*
1
-
Arbiter_trace_t
:
has
definitions
of
Init
and
Next
*
)
(
*
2
-
An
arrival
function
:
here
this
is
just
defined
in
the
context
*
)
Obligation
Tactic
:=
simpl
.
Program
Definition
FIFO_arbitrate
t
:=
mkTrace
(
Default_arbitrate
t
).(
Arbiter_Commands
)
(
Default_arbitrate
t
).(
Arbiter_Time
)
...
...
This diff is collapsed.
Click to expand it.
coq2/TDM.v
+
2
−
2
View file @
654b7bd9
...
...
@@ -340,8 +340,8 @@ Section TDM.
Qed
.
(
*
Instantiation
of
Arbiter_trace_t
class
*
)
Local
Instance
TDM_arbiter_trace
:
Arbiter_trace
_t
:=
mk
ArbiterTrace
Init_state
Next_state
Init_time
Next_time
Init_Cmds
Next_Cmds
Next_CDate
.
Local
Instance
TDM_arbiter_trace
:
Implementation
_t
:=
mk
Implementation
Init_state
Next_state
Init_time
Next_time
Init_Cmds
Next_Cmds
Next_CDate
.
Lemma
ACT_neq_ZCycle
:
(
OACT_date
==
OZCycle
)
=
false
.
...
...
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