Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Platform-independent core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
18
Issues
18
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Platform-independent core collection
Commits
5e934bac
Commit
5e934bac
authored
Mar 22, 2022
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsp: fixed sync (LO phase align) input in the I/Q (de)modulators
parent
bd3892f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
gc_iq_demodulator.vhd
modules/dsp/gc_iq_demodulator.vhd
+10
-5
gc_iq_modulator.vhd
modules/dsp/gc_iq_modulator.vhd
+2
-2
No files found.
modules/dsp/gc_iq_demodulator.vhd
View file @
5e934bac
...
...
@@ -26,6 +26,8 @@ entity gc_iq_demodulator is
clk_i
:
in
std_logic
;
rst_i
:
in
std_logic
;
sync_p1_i
:
in
std_logic
;
-- ADC data input, 2's complement
adc_data_i
:
in
std_logic_vector
(
g_N
-1
downto
0
);
...
...
@@ -53,25 +55,28 @@ begin
state
<=
S_0
;
iacc
<=
(
others
=>
'0'
);
qacc
<=
(
others
=>
'0'
);
elsif
sync_p1_i
=
'1'
then
state
<=
S_PI2
;
iacc
<=
resize
(
signed
(
adc_data_i
),
g_N
+
1
);
qacc
<=
(
others
=>
'0'
);
else
case
state
is
when
S_0
=>
state
<=
S_PI2
;
iacc
<=
resize
(
signed
(
adc_data_i
),
g_N
+
1
);
iacc
<=
resize
(
signed
(
adc_data_i
),
g_N
+
1
);
qacc
<=
(
others
=>
'0'
);
when
S_PI2
=>
state
<=
S_PI
;
iacc
<=
(
others
=>
'0'
);
qacc
<=
resize
(
signed
(
adc_data_i
),
g_N
+
1
);
qacc
<=
resize
(
signed
(
adc_data_i
),
g_N
+
1
);
when
S_PI
=>
state
<=
S_3PI2
;
iacc
<=
resize
(
-
signed
(
adc_data_i
),
g_N
+
1
);
iacc
<=
resize
(
-
signed
(
adc_data_i
),
g_N
+
1
);
qacc
<=
(
others
=>
'0'
);
when
S_3PI2
=>
state
<=
S_0
;
iacc
<=
(
others
=>
'0'
);
qacc
<=
resize
(
-
signed
(
adc_data_i
),
g_N
+
1
);
qacc
<=
resize
(
-
signed
(
adc_data_i
),
g_N
+
1
);
end
case
;
end
if
;
end
if
;
...
...
modules/dsp/gc_iq_modulator.vhd
View file @
5e934bac
...
...
@@ -45,7 +45,7 @@ entity gc_iq_modulator is
port
(
clk_i
:
in
std_logic
;
en_i
:
in
std_logic
;
sync_i
:
in
std_logic
;
sync_
p1_
i
:
in
std_logic
;
rst_i
:
in
std_logic
;
i_i
:
in
std_logic_vector
(
g_N
-1
downto
0
);
...
...
@@ -74,7 +74,7 @@ begin
if
rising_edge
(
clk_i
)
then
iin
<=
signed
(
i_i
);
qin
<=
signed
(
q_i
);
sync
<=
sync_i
;
sync
<=
sync_
p1_
i
;
end
if
;
end
process
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment