Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp-filtre-etudiant-k24fomba
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Admin message
La purge estivale des projets de gitlab-df sera réalisée jeudi 10 juillet vers 10h.
Show more breadcrumbs
UEEE
sar-signal-audio
gr-vhdl-k24fomba
tp-filtre-etudiant-k24fomba
Commits
dfe70402
Commit
dfe70402
authored
1 month ago
by
Kani FOMBA
Browse files
Options
Downloads
Patches
Plain Diff
fichier filtre
parent
a0f3a451
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/hdl/controlUnit.vhd
+33
-15
33 additions, 15 deletions
src/hdl/controlUnit.vhd
with
33 additions
and
15 deletions
src/hdl/controlUnit.vhd
+
33
−
15
View file @
dfe70402
...
@@ -54,37 +54,55 @@ begin
...
@@ -54,37 +54,55 @@ begin
-- Process to describe the state register
-- Process to describe the state register
-- Current state is provide at the output of the register
-- Current state is provide at the output of the register
-- and is updated with the next state at each rising edge of clock
-- and is updated with the next state at each rising edge of clock
process
(
_
BLANK_
)
is
process
(
I_clock
,
I_reset
)
is
begin
begin
if
I_reset
=
'1'
then
-- asynchronous reset (active high)
if
I_reset
=
'1'
then
-- asynchronous reset (active high)
SR_currentState
<=
_
BLANK_
SR_currentState
<=
WAIT_SAMPLE
;
elsif
rising_edge
(
I_clock
)
then
-- rising clock edge
elsif
(
rising_edge
(
I_clock
)
)
then
-- rising clock edge
_
BLANK_
SR_currentState
<=
SR_nextState
;
end
if
;
end
if
;
end
process
;
end
process
;
-- Combinatorial process computing the next state which depends on
-- Combinatorial process computing the next state which depends on
-- the current state and on the inputs
-- the current state and on the inputs
process
(
_
BLANK_
)
is
process
(
SR_currentState
,
I_inputSampleValid
,
I_processingDone
)
is
begin
begin
case
SR_currentState
is
case
SR_currentState
is
when
WAIT_SAMPLE
=>
when
WAIT_SAMPLE
=>
_
BLANK_
if
I_inputSampleValid
=
'1'
then
SR_nextState
<=
STORE
;
end
if
;
when
WAIT_END_SAMPLE
=>
if
I_inputSampleValid
=
'0'
then
SR_nextState
<=
WAIT_SAMPLE
;
end
if
;
when
PROCESSING_LOOP
=>
if
I_processingDone
=
'1'
then
SR_nextState
<=
OUTPUT
;
end
if
;
when
STORE
=>
SR_nextState
<=
PROCESSING_LOOP
;
when
OUTPUT
=>
SR_nextState
<=
WAIT_END_SAMPLE
;
when
others
=>
null
;
when
others
=>
null
;
end
case
;
end
case
;
end
process
;
end
process
;
-- Rules to compute the outputs depending on the current state
-- Rules to compute the outputs depending on the current state
-- (and on the inputs, if you want a Mealy machine).
-- (and on the inputs, if you want a Mealy machine).
O_loadShift
<=
'1'
when
_
BLANK_
else
'0'
;
O_loadShift
<=
'1'
when
SR_currentState
=
STORE
else
'0'
;
O_initAddress
<=
'1'
when
_
BLANK_
else
'0'
;
O_initAddress
<=
'1'
when
SR_currentState
=
STORE
else
'0'
;
O_incrAddress
<=
'1'
when
_
BLANK_
else
'0'
;
O_incrAddress
<=
'1'
when
SR_currentState
=
PROCESSING_LOOP
else
'0'
;
O_initSum
<=
'1'
when
_
BLANK_
else
'0'
;
O_initSum
<=
'1'
when
SR_currentState
=
STORE
else
'0'
;
O_loadSum
<=
'1'
when
_
BLANK_
else
'0'
;
O_loadSum
<=
'1'
when
SR_currentState
=
PROCESSING_LOOP
else
'0'
;
O_loadOutput
<=
'1'
when
_
BLANK_
else
'0'
;
O_loadOutput
<=
'1'
when
SR_currentState
=
OUTPUT
else
'0'
;
O_FilteredSampleValid
<=
'1'
when
_
BLANK_
else
'0'
;
O_FilteredSampleValid
<=
'1'
when
SR_currentState
=
WAIT_END_SAMPLE
else
'0'
;
...
...
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