Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Sep 27, 2024
1 parent aedbd39 commit f118556
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 43 deletions.
1 change: 0 additions & 1 deletion adijif/clocks/ad9523_1_bf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def list_available_references(self, divider_set):
]

def find_dividers(self, vcxo, required_output_rates, find=3):

if self.use_vcxo_double:
vcxo *= 2

Expand Down
1 change: 0 additions & 1 deletion adijif/clocks/ad9528_bf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def list_available_references(self, divider_set):
]

def find_dividers(self, vcxo, required_output_rates, find=3):

if self.use_vcxo_double:
vcxo *= 2

Expand Down
2 changes: 0 additions & 2 deletions adijif/clocks/hmc7044.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ def _get_clock_constraint(
Exception: Invalid solver
"""
if self.solver == "gekko":

__d = self._d if isinstance(self._d, list) else [self._d]

if __d.sort() != self.d_available.sort():
Expand Down Expand Up @@ -496,7 +495,6 @@ def set_requested_clocks(

# Add requested clocks to output constraints
for d_n, out_freq in enumerate(out_freqs):

if self.solver == "gekko":
__d = self._d if isinstance(self._d, list) else [self._d]
if __d.sort() != self.d_available.sort():
Expand Down
1 change: 0 additions & 1 deletion adijif/clocks/hmc7044_bf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def list_available_references(self, divider_set):
return [divider_set["vco"] / div for div in self.d_available]

def find_dividers(self, vcxo, rates, find=3):

if self.use_vcxo_double:
vcxo *= 2

Expand Down
2 changes: 0 additions & 2 deletions adijif/clocks/ltc6952.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ def _get_clock_constraint(
Exception: Invalid solver
"""
if self.solver == "gekko":

__d = self._d if isinstance(self._d, list) else [self._d]

if __d.sort() != self.d_available.sort():
Expand Down Expand Up @@ -594,7 +593,6 @@ def set_requested_clocks(

# Add requested clocks to output constraints
for out_freq in out_freqs:

if self.solver == "gekko":
__d = self._d if isinstance(self._d, list) else [self._d]
if __d.sort() != self.d_available.sort():
Expand Down
1 change: 0 additions & 1 deletion adijif/clocks/ltc6952_bf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def list_available_references(self, divider_set):
return [divider_set["vco"] / div for div in self.d_available]

def find_dividers(self, vcxo, rates, find=3):

v = []
for mp in range(0, 32):
for nx in range(0, 8):
Expand Down
2 changes: 0 additions & 2 deletions adijif/clocks/ltc6953.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ def _setup_solver_constraints(self, input_ref: int) -> None:
)

def _setup(self, input_ref: int) -> None:

if isinstance(input_ref, (float, int)):
assert self.input_freq_max >= input_ref >= 0, "Input frequency out of range"

Expand Down Expand Up @@ -486,7 +485,6 @@ def set_requested_clocks(

# Add requested clocks to output constraints
for out_freq in out_freqs:

if self.solver == "gekko":
__m = self._d if isinstance(self.__m, list) else [self.__m]
if __m.sort() != self.m_available.sort():
Expand Down
1 change: 0 additions & 1 deletion adijif/converters/ad9081.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ def _converter_clock_config(self) -> None:
raise NotImplementedError

def _pll_config(self, rxtx: bool = False) -> Dict:

self._converter_clock_config() # type: ignore

self.config["ad9081_m_vco"] = self._convert_input([5, 7, 8, 11], "ad9081_m_vco")
Expand Down
2 changes: 0 additions & 2 deletions adijif/converters/ad9144.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ def _check_valid_internal_configuration(self) -> None:
assert self.K == 32, "K must be 32 for JESD mode 0, 4, or 9"

def _pll_config(self) -> Dict:

dac_clk = self.interpolation * self.sample_clock
self.config["dac_clk"] = self._convert_input(dac_clk, "dac_clk")

Expand All @@ -195,7 +194,6 @@ def _pll_config(self) -> Dict:
# a div of 32 would put you under supported range

if self.solver == "gekko":

self.config["ref_div_factor"] = self.model.sos1(
self.input_clock_divider_available
)
Expand Down
1 change: 0 additions & 1 deletion adijif/fpgas/xilinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,6 @@ def get_required_clocks(
self.ref_clocks = []
# obs = []
for cnv in converter: # type: ignore

# rsl = self._get_conv_prop(
# cnv, self.requires_separate_link_layer_out_clock
# )
Expand Down
2 changes: 0 additions & 2 deletions adijif/plls/adf4371.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ def _setup_solver_constraints(

# Configure INT setting based on prescalers
if self.solver == "CPLEX":

self.config["frac1"] = integer_var(
min=self._frac1_min_max[0], max=self._frac1_min_max[1], name="frac1"
)
Expand Down Expand Up @@ -370,7 +369,6 @@ def _setup_solver_constraints(
)

def _setup(self, input_ref: int) -> None:

if isinstance(input_ref, (float, int)):
assert (
self.input_freq_max >= input_ref >= self.input_freq_min
Expand Down
3 changes: 0 additions & 3 deletions adijif/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ def solve(self) -> Dict:
clock_names: List[str] = []
config = {}
if self.enable_converter_clocks:

convs: List[convc] = (
self.converter if isinstance(self.converter, list) else [self.converter]
)
Expand All @@ -319,7 +318,6 @@ def solve(self) -> Dict:
sys_refs = []

for conv in convs:

serdes_used += conv.L
if serdes_used > self.fpga.max_serdes_lanes:
raise Exception(
Expand Down Expand Up @@ -431,7 +429,6 @@ def solve(self) -> Dict:
# Setup fpga
if conv._nested:
for name in names:

if need_separate_link_clock:
self.fpga.get_required_clocks(
getattr(conv, name),
Expand Down
4 changes: 0 additions & 4 deletions tests/test_adf4371.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


def test_adf4371_datasheet_example():

pll = adijif.adf4371()
pll._MOD2 = 1536
pll.rf_div = 2
Expand Down Expand Up @@ -43,7 +42,6 @@ def test_adf4371_datasheet_example():


def test_adf4371_ad9081_sys_example():

vcxo = 100e6

sys = adijif.system("ad9081", "hmc7044", "xilinx", vcxo, solver="CPLEX")
Expand Down Expand Up @@ -104,7 +102,6 @@ def test_adf4371_ad9081_sys_example():
["4/5", "8/9", ["4/5", "8/9"]],
)
def test_adf4371_vary_modes(mode, int_prescaler):

pll = adijif.adf4371()
pll.mode = mode
pll._prescaler = int_prescaler
Expand Down Expand Up @@ -140,7 +137,6 @@ def test_adf4371_vary_modes(mode, int_prescaler):


def test_adf4371_touch_all_properties():

pll = adijif.adf4371()

# read/write all
Expand Down
1 change: 0 additions & 1 deletion tests/test_bf.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ def test_ad9523_1_daq2_config_force_m2():


def test_daq2_fpga_qpll_rxtx_zc706_config():

# Full bandwidth example 1b
clk = adijif.ad9523_1()
rates = 1e9
Expand Down
13 changes: 0 additions & 13 deletions tests/test_clocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

@pytest.mark.parametrize("solver", ["gekko", "CPLEX"])
def test_ad9545_validate_fail(solver):

msg = r"Solution Not Found"

with pytest.raises(Exception, match=msg):
Expand All @@ -32,7 +31,6 @@ def test_ad9545_validate_fail(solver):
@pytest.mark.parametrize("solver", ["gekko", "CPLEX"])
@pytest.mark.parametrize("out_freq", [30720000, 25e6])
def test_ad9545_validate_pass(solver, out_freq):

clk = adijif.ad9545(solver=solver)

clk.avoid_min_max_PLL_rates = True
Expand Down Expand Up @@ -77,7 +75,6 @@ def test_ad9545_validate_pass(solver, out_freq):


def test_ad9545_fail_no_solver():

with pytest.raises(Exception, match=r"Unknown solver NAN"):
clk = adijif.ad9545(solver="NAN")

Expand All @@ -93,7 +90,6 @@ def test_ad9545_fail_no_solver():


def test_ad9523_1_daq2_validate():

vcxo = 125000000
n2 = 24

Expand Down Expand Up @@ -124,7 +120,6 @@ def test_ad9523_1_daq2_validate():


def test_ad9523_1_daq2_cplex_validate():

vcxo = 125000000
n2 = 24

Expand Down Expand Up @@ -161,7 +156,6 @@ def test_ad9523_1_daq2_cplex_validate():

@pytest.mark.parametrize("solver", ["geko", "CPLEX"])
def test_ad9523_1_daq2_validate_fail(solver):

msg = r"Solution Not Found"

with pytest.raises(Exception, match=msg):
Expand Down Expand Up @@ -194,7 +188,6 @@ def test_ad9523_1_daq2_validate_fail(solver):


def test_ad9523_1_daq2_validate_fail_cplex():

with pytest.raises(Exception, match=r"Solution Not Found"):
vcxo = 125000000
n2 = 12
Expand Down Expand Up @@ -224,7 +217,6 @@ def test_ad9523_1_daq2_validate_fail_cplex():

@pytest.mark.parametrize("solver", ["gekko", "CPLEX"])
def test_ad9523_1_daq2_variable_vcxo_validate(solver):

vcxo = adijif.types.range(100000000, 126000000, 1000000, "vcxo")
n2 = 24

Expand Down Expand Up @@ -257,7 +249,6 @@ def test_ad9523_1_daq2_variable_vcxo_validate(solver):


def test_ad9523_1_fail_no_solver():

with pytest.raises(Exception, match=r"Unknown solver NAN"):
clk = adijif.ad9523_1(solver="NAN")
output_clocks = [1e9, 500e6, 7.8125e6]
Expand All @@ -267,7 +258,6 @@ def test_ad9523_1_fail_no_solver():


def test_ad9523_1_fail_no_solver2():

with pytest.raises(Exception, match=r"Unknown solver NAN2"):
vcxo = 125000000
clk = adijif.ad9523_1()
Expand All @@ -279,7 +269,6 @@ def test_ad9523_1_fail_no_solver2():


def test_ad9523_1_fail_no_solver3():

with pytest.raises(Exception, match=r"Unknown solver NAN3"):
vcxo = 125000000
clk = adijif.ad9523_1()
Expand All @@ -291,15 +280,13 @@ def test_ad9523_1_fail_no_solver3():


def test_system_fail_no_solver3():

with pytest.raises(Exception, match=r"Unknown solver NAN4"):
vcxo = 125000000
sys = adijif.system("ad9680", "hmc7044", "xilinx", vcxo, solver="NAN4")
sys.solve()


def test_ltc6953_validate():

ref_in = adijif.types.range(1000000000, 4500000000, 1000000, "ref_in")

clk = adijif.ltc6953(solver="CPLEX")
Expand Down
6 changes: 0 additions & 6 deletions tests/test_daq2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@pytest.mark.parametrize("solver", solvers_to_test)
def test_smoke_solver(solver):

vcxo = 125000000
sys = adijif.system("ad9680", "hmc7044", "xilinx", vcxo, solver=solver)
sys.fpga.setup_by_dev_kit_name("zc706")
Expand All @@ -34,7 +33,6 @@ def test_smoke_solver(solver):
@pytest.mark.parametrize("clockchip", ["ad9528", "hmc7044", "ad9523_1"])
@pytest.mark.parametrize("fpga_kit", ["zc706", "zcu102"])
def test_smoke_all_clocks(solver, converter, clockchip, fpga_kit):

vcxo = 125000000
sys = adijif.system(converter, clockchip, "xilinx", vcxo, solver=solver)
sys.fpga.setup_by_dev_kit_name(fpga_kit)
Expand Down Expand Up @@ -76,7 +74,6 @@ def test_smoke_all_clocks(solver, converter, clockchip, fpga_kit):
def test_ad9680_all_clk_chips_fpga_pll_modes_solver(
qpll, cpll, rate, clock_chip, solver, fpga_kit
):

if fpga_kit == "zcu102" and clock_chip == "hmc7044" and rate == 1e9:
pytest.skip()

Expand Down Expand Up @@ -123,7 +120,6 @@ def test_ad9680_all_clk_chips_fpga_pll_modes_solver(

@pytest.mark.parametrize("solver", solvers_to_test)
def test_daq2_split_rates_solver(solver):

vcxo = 125000000
sys = adijif.system(["ad9680", "ad9144"], "ad9523_1", "xilinx", vcxo, solver=solver)
sys.fpga.setup_by_dev_kit_name("zc706")
Expand Down Expand Up @@ -158,7 +154,6 @@ def test_daq2_split_rates_solver(solver):


def test_ad9680_clock_check1_solver():

vcxo = 125000000
sys = adijif.system("ad9680", "ad9523_1", "xilinx", vcxo)

Expand All @@ -181,7 +176,6 @@ def test_ad9680_clock_check1_solver():
@pytest.mark.xfail(reason="Need to verify settings")
@pytest.mark.parametrize("solver", solvers_to_test)
def test_ad9680_clock_check2_solver(solver):

vcxo = 125000000

sys = adijif.system("ad9680", "ad9523_1", "xilinx", vcxo, solver=solver)
Expand Down

0 comments on commit f118556

Please sign in to comment.