feature: add support for Iceriver KS5 and submodels

This commit is contained in:
Upstream Data
2024-11-06 09:04:38 -07:00
parent 14533ce4fe
commit 6c091756d2
6 changed files with 58 additions and 0 deletions

View File

@@ -355,6 +355,9 @@ class IceRiverModels(str, Enum):
KS3 = "KS3" KS3 = "KS3"
KS3L = "KS3L" KS3L = "KS3L"
KS3M = "KS3M" KS3M = "KS3M"
KS5 = "KS5"
KS5L = "KS5L"
KS5M = "KS5M"
def __str__(self): def __str__(self):
return self.value return self.value

View File

@@ -0,0 +1,36 @@
# ------------------------------------------------------------------------------
# Copyright 2024 Upstream Data Inc -
# -
# Licensed under the Apache License, Version 2.0 (the "License"); -
# you may not use this file except in compliance with the License. -
# You may obtain a copy of the License at -
# -
# http://www.apache.org/licenses/LICENSE-2.0 -
# -
# Unless required by applicable law or agreed to in writing, software -
# distributed under the License is distributed on an "AS IS" BASIS, -
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.device.models import MinerModel
from pyasic.miners.device.makes import IceRiverMake
class KS5(IceRiverMake):
raw_model = MinerModel.ICERIVER.KS5
expected_fans = 4
class KS5L(IceRiverMake):
raw_model = MinerModel.ICERIVER.KS5L
expected_fans = 4
expected_chips = 18
class KS5M(IceRiverMake):
raw_model = MinerModel.ICERIVER.KS5M
expected_fans = 4

View File

@@ -2,3 +2,4 @@ from .KS0 import KS0
from .KS1 import KS1 from .KS1 import KS1
from .KS2 import KS2 from .KS2 import KS2
from .KS3 import KS3, KS3L, KS3M from .KS3 import KS3, KS3L, KS3M
from .KS5 import KS5, KS5L, KS5M

View File

@@ -473,6 +473,9 @@ MINER_CLASSES = {
"KS3": IceRiverKS3, "KS3": IceRiverKS3,
"KS3L": IceRiverKS3L, "KS3L": IceRiverKS3L,
"KS3M": IceRiverKS3M, "KS3M": IceRiverKS3M,
"KS5": IceRiverKS5,
"KS5L": IceRiverKS5L,
"KS5M": IceRiverKS5M,
}, },
} }

View File

@@ -0,0 +1,14 @@
from pyasic.miners.backends.iceriver import IceRiver
from pyasic.miners.device.models.iceriver import KS5, KS5L, KS5M
class IceRiverKS5(IceRiver, KS5):
pass
class IceRiverKS5L(IceRiver, KS5L):
pass
class IceRiverKS5M(IceRiver, KS5M):
pass

View File

@@ -2,3 +2,4 @@ from .KS0 import IceRiverKS0
from .KS1 import IceRiverKS1 from .KS1 import IceRiverKS1
from .KS2 import IceRiverKS2 from .KS2 import IceRiverKS2
from .KS3 import IceRiverKS3, IceRiverKS3L, IceRiverKS3M from .KS3 import IceRiverKS3, IceRiverKS3L, IceRiverKS3M
from .KS5 import IceRiverKS5, IceRiverKS5L, IceRiverKS5M