Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr2rf-vme
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
wr2rf-vme
Commits
62af4949
Commit
62af4949
authored
Nov 25, 2021
by
John Robert Gill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added helper conversion functions for ftw <--> freq.
parent
9c542be8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
freq2ftw.sh
software/scripts/freq2ftw.sh
+12
-0
ftw2freq.sh
software/scripts/ftw2freq.sh
+2
-2
No files found.
software/scripts/freq2ftw.sh
0 → 100755
View file @
62af4949
#!/bin/bash
freq
=
$1
sps_h
=
4620
freq_h1
=
`
echo
"
$freq
/
$sps_h
"
| bc
-q
`
freq_wrclk
=
125000000
prod
=
`
echo
"
$freq_h1
*(2^48)"
| bc
-q
`
ftw
=
`
echo
"
$prod
/
$freq_wrclk
"
| bc
-q
`
ftw_hex
=
`
echo
"obase=16;ibase=10;
$ftw
"
| bc
-q
`
echo
"RF Input frequency(
$freq
Hz) has an FTW=0x
$ftw_hex
"
software/scripts/ftw2freq.sh
View file @
62af4949
...
...
@@ -4,9 +4,9 @@ ftw_hex=`echo $1 | tr a-f A-F`
freq_wrclk
=
125000000
ftw
=
`
echo
"ibase=16;
$ftw_hex
"
| bc
-q
`
echo
"ftw=
$ftw
"
#
echo "ftw=$ftw"
prod
=
`
echo
"
$ftw
*
$freq_wrclk
"
| bc
-q
`
echo
"prod=
$prod
"
#
echo "prod=$prod"
fout
=
`
echo
"
$prod
/(2^48)"
| bc
-q
`
echo
"Fout=
$fout
"
fout_rf
=
`
echo
"
$fout
*4620"
| bc
-q
`
...
...
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