Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp-synthe-etudiant-o24torjm
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-o24torjm
tp-synthe-etudiant-o24torjm
Commits
84d30184
Commit
84d30184
authored
1 month ago
by
Oren TORJMAN
Browse files
Options
Downloads
Patches
Plain Diff
tp-fini
parent
490d4bad
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/hdl/module_B.vhd
+2
-2
2 additions, 2 deletions
src/hdl/module_B.vhd
src/hdl/wave_generator.vhd
+30
-30
30 additions, 30 deletions
src/hdl/wave_generator.vhd
with
32 additions
and
32 deletions
src/hdl/module_B.vhd
+
2
−
2
View file @
84d30184
...
@@ -20,7 +20,7 @@ end module_B;
...
@@ -20,7 +20,7 @@ end module_B;
architecture
behavioral
of
module_B
is
architecture
behavioral
of
module_B
is
signal
SR_val_reg
:
natural
range
0
to
G_MAX_VAL
:
=
0
;
signal
SR_val_reg
:
natural
range
0
to
G_MAX_VAL
:
=
0
;
constant
C_middle_val
:
natural
:
=
G_MAX_VAL
/
2
;
constant
C_middle_val
:
natural
:
=
G_MAX_VAL
/
2
;
-- = 12 (round(25/2))
begin
begin
...
@@ -28,7 +28,7 @@ begin
...
@@ -28,7 +28,7 @@ begin
begin
begin
if
rising_edge
(
I_clk
)
then
if
rising_edge
(
I_clk
)
then
if
I_rst
=
'1'
then
if
I_rst
=
'1'
then
SR_val_reg
<=
0
;
SR_val_reg
<=
0
;
-- REVIENT à 0 à CHAQUE RESET
else
else
if
I_u_d
=
'1'
then
if
I_u_d
=
'1'
then
SR_val_reg
<=
SR_val_reg
+
1
;
SR_val_reg
<=
SR_val_reg
+
1
;
...
...
This diff is collapsed.
Click to expand it.
src/hdl/wave_generator.vhd
+
30
−
30
View file @
84d30184
...
@@ -64,12 +64,12 @@ begin
...
@@ -64,12 +64,12 @@ begin
G_MAX_VAL
=>
natural
(
floor
(
G_fs
/
(
2
.
0
*
G_f0
)))
G_MAX_VAL
=>
natural
(
floor
(
G_fs
/
(
2
.
0
*
G_f0
)))
)
)
port
map
(
port
map
(
I_clk
=>
,
I_clk
=>
I_clk
,
I_rst
=>
,
I_rst
=>
I_rst
,
I_u_d
=>
,
I_u_d
=>
S_u_d
,
O_val
=>
,
O_val
=>
S_addr
,
O_last
=>
,
O_last
=>
S_last
,
O_middle
=>
O_middle
=>
S_middle
);
);
-- Module C
-- Module C
...
@@ -94,10 +94,10 @@ begin
...
@@ -94,10 +94,10 @@ begin
G_fs
=>
G_fs
G_fs
=>
G_fs
)
)
port
map
(
port
map
(
I_clk
=>
,
I_clk
=>
I_clk
,
I_rst
=>
,
I_rst
=>
I_rst
,
I_addr
=>
,
I_addr
=>
S_addr
(
C_addr_half_w
-1
downto
0
)
,
O_triangle
=>
O_triangle
=>
S_triangle_out_lut
);
);
-- Module E
-- Module E
...
@@ -108,10 +108,10 @@ begin
...
@@ -108,10 +108,10 @@ begin
G_fs
=>
G_fs
G_fs
=>
G_fs
)
)
port
map
(
port
map
(
I_clk
=>
,
I_clk
=>
I_clk
,
I_rst
=>
,
I_rst
=>
I_rst
,
I_addr
=>
,
I_addr
=>
S_addr
,
O_saw_tooth
=>
O_saw_tooth
=>
S_saw_tooth_out_lut
);
);
S_square
<=
((
G_N
-1
)
=>
'0'
,
others
=>
'1'
);
S_square
<=
((
G_N
-1
)
=>
'0'
,
others
=>
'1'
);
...
@@ -119,12 +119,12 @@ begin
...
@@ -119,12 +119,12 @@ begin
-- Module F
-- Module F
F_inst
:
entity
work
.
module_F
F_inst
:
entity
work
.
module_F
port
map
(
port
map
(
I_sel
=>
,
I_sel
=>
I_wave_sel
,
I_din0
=>
,
I_din0
=>
S_sine_out_lut
,
I_din1
=>
,
I_din1
=>
S_square
,
I_din2
=>
,
I_din2
=>
S_saw_tooth_out_lut
,
I_din3
=>
,
I_din3
=>
S_triangle_out_lut
,
O_dout
=>
O_dout
=>
S_wave_sample
);
);
-- Module G
-- Module G
...
@@ -133,17 +133,17 @@ begin
...
@@ -133,17 +133,17 @@ begin
G_N
=>
G_N
G_N
=>
G_N
)
)
port
map
(
port
map
(
I_din
=>
,
I_din
=>
S_wave_sample
,
O_dout
=>
O_dout
=>
S_opposite_wave_sample
);
);
-- Module H
-- Module H
H_inst
:
entity
work
.
module_H
H_inst
:
entity
work
.
module_H
port
map
(
port
map
(
I_sel
=>
,
I_sel
=>
S_sign_sel
,
I_din0
=>
,
I_din0
=>
S_wave_sample
,
I_din1
=>
,
I_din1
=>
S_opposite_wave_sample
,
O_dout
=>
O_dout
=>
S_wave_value
);
);
-- Module I
-- Module I
...
@@ -152,10 +152,10 @@ begin
...
@@ -152,10 +152,10 @@ begin
G_N
=>
G_N
G_N
=>
G_N
)
)
port
map
(
port
map
(
I_clk
=>
,
I_clk
=>
I_clk
,
I_rst
=>
,
I_rst
=>
I_rst
,
I_din
=>
,
I_din
=>
S_wave_value
,
O_dout
=>
O_dout
=>
O_wav
);
);
end
arch
;
end
arch
;
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