Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software for White Rabbit PTP Core
Manage
Activity
Members
Labels
Plan
Issues
39
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Projects
Software for White Rabbit PTP Core
Commits
098116fc
Commit
098116fc
authored
7 years ago
by
Alessandro Rubini
Committed by
Adam Wujek
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
softpll: remove unused filters
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
f46d263b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
softpll/spll_common.c
+0
-45
0 additions, 45 deletions
softpll/spll_common.c
softpll/spll_common.h
+0
-27
0 additions, 27 deletions
softpll/spll_common.h
with
0 additions
and
72 deletions
softpll/spll_common.c
+
0
−
45
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
;
...
...
This diff is collapsed.
Click to expand it.
softpll/spll_common.h
+
0
−
27
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
This diff is collapsed.
Click to expand it.
Preview
0%
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