corrected typos in comments and added more comments
This commit is contained in:
@@ -6,8 +6,8 @@ use Math::Round; # for round()
|
|||||||
use List::Util qw(max); # for max @list
|
use List::Util qw(max); # for max @list
|
||||||
|
|
||||||
### configure the pattern here ###
|
### configure the pattern here ###
|
||||||
my $divider = 1; # configured freq divieder
|
my $divider = 1; # configured freq divider
|
||||||
my $sig_period_c = 5; # periode of RF during pulse in [base_cliqs]
|
my $sig_period_c = 5; # period of RF during pulse in [base_cliqs]
|
||||||
my $pulse_time = 9000; # B1 puls duration in [ns]
|
my $pulse_time = 9000; # B1 puls duration in [ns]
|
||||||
my $short_time = 1000; # short switch on time in [ns]
|
my $short_time = 1000; # short switch on time in [ns]
|
||||||
my $receive_time = 9900; # receiver on time in [ns]
|
my $receive_time = 9900; # receiver on time in [ns]
|
||||||
@@ -16,16 +16,16 @@ my $recovery_time = 100; # safety buffer between Rx and pulse in [ns]
|
|||||||
|
|
||||||
### these are given or computed parameters ###
|
### these are given or computed parameters ###
|
||||||
my $base_freq = 125000000; # sample freq of moku:GO
|
my $base_freq = 125000000; # sample freq of moku:GO
|
||||||
my $base_cliq = 8; # sample periode in ns
|
my $base_cliq = 8; # sample period in ns
|
||||||
my $max_cliqs = 32764; # max sample length
|
my $max_cliqs = 32764; # max sample length
|
||||||
|
|
||||||
my @pins = (1,2,3,4,5,6);
|
my @pins = (1,2,3,4,5,6);
|
||||||
my @pin_names = ("LS1", "LS2", "HS", "SS", "LSS", "Rx");
|
my @pin_names = ("LS1", "LS2", "HS", "SS", "LSS", "Rx");
|
||||||
|
|
||||||
$base_cliq *= $divider;
|
$base_cliq *= $divider; # apply pre-division
|
||||||
my $baudrate = round($base_freq/$divider);
|
my $baudrate = round($base_freq/$divider); # sample rate after pre-divider
|
||||||
my $sig_period = $sig_period_c * $base_cliq * 2;
|
my $sig_period = $sig_period_c * $base_cliq * 2; # calculate period
|
||||||
my $sig_freq = round(1/($sig_period*1e-9)); # B1 frequency
|
my $sig_freq = round(1/($sig_period*1e-9)); # B1 frequency derived from period
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
### function to return the float remainder of a division ###
|
### function to return the float remainder of a division ###
|
||||||
|
|||||||
Reference in New Issue
Block a user