Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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
Software for White Rabbit PTP Core
Commits
098116fc
Commit
098116fc
authored
Apr 12, 2017
by
Alessandro Rubini
Committed by
Adam Wujek
Jun 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
softpll: remove unused filters
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
f46d263b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
72 deletions
+0
-72
spll_common.c
softpll/spll_common.c
+0
-45
spll_common.h
softpll/spll_common.h
+0
-27
No files found.
softpll/spll_common.c
View file @
098116fc
...
...
@@ -93,24 +93,6 @@ void ld_init(spll_lock_det_t *ld)
ld
->
lock_changed
=
0
;
}
void
lowpass_init
(
spll_lowpass_t
*
lp
,
int
alpha
)
{
lp
->
y_d
=
0x80000000
;
lp
->
alpha
=
alpha
;
}
int
lowpass_update
(
spll_lowpass_t
*
lp
,
int
x
)
{
if
(
lp
->
y_d
==
0x80000000
)
{
lp
->
y_d
=
x
;
return
x
;
}
else
{
int
scaled
=
(
lp
->
alpha
*
(
x
-
lp
->
y_d
))
>>
15
;
lp
->
y_d
=
lp
->
y_d
+
(
scaled
>>
1
)
+
(
scaled
&
1
);
return
lp
->
y_d
;
}
}
/* Enables/disables DDMTD tag generation on a given (channel).
Channels (0 ... splL_n_chan_ref - 1) are the reference channels
...
...
@@ -142,33 +124,6 @@ void spll_enable_tagger(int channel, int enable)
pll_verbose
(
"%s: ch %d, OCER 0x%x, RCER 0x%x
\n
"
,
__FUNCTION__
,
channel
,
SPLL
->
OCER
,
SPLL
->
RCER
);
}
void
biquad_init
(
spll_biquad_t
*
bq
,
const
int
*
coefs
,
int
shift
)
{
memset
(
bq
,
0
,
sizeof
(
spll_biquad_t
));
memcpy
(
bq
->
coefs
,
coefs
,
5
*
sizeof
(
int
));
bq
->
shift
=
shift
;
}
int
biquad_update
(
spll_biquad_t
*
bq
,
int
x
)
{
register
int
y
=
0
;
y
+=
bq
->
coefs
[
0
]
*
x
;
y
+=
bq
->
coefs
[
1
]
*
bq
->
xd
[
0
];
y
+=
bq
->
coefs
[
2
]
*
bq
->
xd
[
1
];
y
-=
bq
->
coefs
[
3
]
*
bq
->
yd
[
0
];
y
-=
bq
->
coefs
[
4
]
*
bq
->
yd
[
1
];
y
>>=
bq
->
shift
;
bq
->
xd
[
1
]
=
bq
->
xd
[
0
];
bq
->
xd
[
0
]
=
x
;
bq
->
yd
[
1
]
=
bq
->
yd
[
0
];
bq
->
yd
[
0
]
=
y
;
return
y
;
}
const
char
*
stringlist_lookup
(
const
struct
stringlist_entry
*
slist
,
int
id
)
{
int
i
;
...
...
softpll/spll_common.h
View file @
098116fc
...
...
@@ -50,28 +50,6 @@ typedef struct {
int
lock_changed
;
}
spll_lock_det_t
;
/* simple, 1st-order lowpass filter */
typedef
struct
{
int
alpha
;
int
y_d
;
}
spll_lowpass_t
;
typedef
struct
{
int
coefs
[
5
];
/* Biquad coefficients: b0 b1 b2 a1 a2 */
int
shift
;
/* bit shift for the coeffs / output */
int
yd
[
2
],
xd
[
2
];
/* I/O delay lines */
}
spll_biquad_t
;
/* long-term-average filter */
typedef
struct
{
int
acc
;
int
n
;
int
window
;
int
pos
;
int
size
;
int
log
[
16
];
}
spll_lta_t
;
struct
stringlist_entry
{
int
id
;
const
char
*
str
;
...
...
@@ -86,14 +64,9 @@ int pi_update(spll_pi_t *pi, int x);
void
ld_init
(
spll_lock_det_t
*
ld
);
int
ld_update
(
spll_lock_det_t
*
ld
,
int
y
);
void
lowpass_init
(
spll_lowpass_t
*
lp
,
int
alpha
);
int
lowpass_update
(
spll_lowpass_t
*
lp
,
int
x
);
void
spll_enable_tagger
(
int
channel
,
int
enable
);
void
biquad_init
(
spll_biquad_t
*
bq
,
const
int
*
coefs
,
int
shift
);
int
biquad_update
(
spll_biquad_t
*
bq
,
int
x
);
const
char
*
stringlist_lookup
(
const
struct
stringlist_entry
*
slist
,
int
id
);
#endif // __SPLL_COMMON_H
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