Skip to content

Commit

Permalink
feature: add support for Iceriver KS5 and submodels
Browse files Browse the repository at this point in the history
  • Loading branch information
UpstreamData committed Nov 6, 2024
1 parent 14533ce commit 6c09175
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyasic/device/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ class IceRiverModels(str, Enum):
KS3 = "KS3"
KS3L = "KS3L"
KS3M = "KS3M"
KS5 = "KS5"
KS5L = "KS5L"
KS5M = "KS5M"

def __str__(self):
return self.value
Expand Down
36 changes: 36 additions & 0 deletions pyasic/miners/device/models/iceriver/KSX/KS5.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions pyasic/miners/device/models/iceriver/KSX/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
from .KS1 import KS1
from .KS2 import KS2
from .KS3 import KS3, KS3L, KS3M
from .KS5 import KS5, KS5L, KS5M
3 changes: 3 additions & 0 deletions pyasic/miners/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ class MinerTypes(enum.Enum):
"KS3": IceRiverKS3,
"KS3L": IceRiverKS3L,
"KS3M": IceRiverKS3M,
"KS5": IceRiverKS5,
"KS5L": IceRiverKS5L,
"KS5M": IceRiverKS5M,
},
}

Expand Down
14 changes: 14 additions & 0 deletions pyasic/miners/iceriver/iceminer/KSX/KS5.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions pyasic/miners/iceriver/iceminer/KSX/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
from .KS1 import IceRiverKS1
from .KS2 import IceRiverKS2
from .KS3 import IceRiverKS3, IceRiverKS3L, IceRiverKS3M
from .KS5 import IceRiverKS5, IceRiverKS5L, IceRiverKS5M

0 comments on commit 6c09175

Please sign in to comment.