Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp-filtre-etudiant-e24wolff
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
Show more breadcrumbs
UEEE
sar-signal-audio
gr-vhdl-e24wolff
tp-filtre-etudiant-e24wolff
Commits
5b0fe30c
Commit
5b0fe30c
authored
1 month ago
by
Emilien WOLFF
Browse files
Options
Downloads
Patches
Plain Diff
ope
parent
9271fa9d
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/operativeUnit.vhd
+23
-16
23 additions, 16 deletions
src/hdl/operativeUnit.vhd
with
23 additions
and
16 deletions
src/hdl/operativeUnit.vhd
+
23
−
16
View file @
5b0fe30c
...
...
@@ -114,37 +114,44 @@ begin
);
-- Process to describe the shift register storing the input samples
shift
:
process
(
_
BLANK_
)
is
shift
:
process
(
I_clock
,
I_reset
)
is
begin
-- process shift
if
I_reset
=
'1'
then
-- asynchronous reset (active high)
SR_shiftRegister
<=
(
others
=>
(
others
=>
'0'
));
elsif
_
BLANK_
elsif
rising_edge
(
I_clock
)
then
if
I_loadShift
=
'1'
then
for
i
in
15
downto
1
loop
SR_shiftRegister
(
i
)
<=
SR_shiftRegister
(
i
-1
);
end
loop
;
SR_shiftRegister
(
0
)
<=
signed
(
I_inputSample
);
end
if
;
end
if
;
end
process
shift
;
-- Process to describe the counter providing the selection adresses
-- of the multiplexers
incr_address
:
process
(
_
BLANK_
)
is
-- Process for incrementing and initializing the read address
incr_address
:
process
(
I_clock
,
I_reset
)
is
begin
if
I_reset
=
'1'
then
-- asynchronous reset (active high)
if
I_reset
=
'1'
then
SR_readAddress
<=
0
;
elsif
_
BLANK_
elsif
rising_edge
(
I_clock
)
then
if
I_initAddress
=
'1'
then
SR_readAddress
<=
0
;
elsif
I_incrAddress
=
'1'
then
SR_readAddress
<=
SR_readAddress
+
1
;
end
if
;
end
if
;
end
process
incr_address
;
-- Signal detecting that the next cycle will be the one
-- providing the last product used to compute the convolution
O_processingDone
<=
'1'
when
_
BLANK_
;
-- Signals connected with multiplexers (SIMPLY inferred with table indices)
SC_multOperand1
<=
_
BLANK_
;
-- 16 bits
SC_multOperand2
<=
_
BLANK_
;
-- 16 bits
O_processingDone
<=
'1'
when
SR_readAddress
=
15
else
'0'
;
-- Multiplication of the operands
SC_MultResult
<=
_
BLANK_
;
-- 32 bits
-- Multiplication operands
SC_multOperand1
<=
SR_shiftRegister
(
SR_readAddress
);
SC_multOperand2
<=
SR_coefRegister
(
SR_readAddress
);
-- Multiplication
SC_MultResult
<=
resize
(
SC_multOperand1
,
32
)
*
resize
(
SC_multOperand2
,
32
);
-- Sum of the multiplication result and the accumulated value
SC_addResult
<=
resize
(
SC_MultResult
,
SC_addResult
'length
)
+
SR_sum
;
...
...
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