Skip to content

Commit

Permalink
Merge pull request #8 from PAICookers/dev
Browse files Browse the repository at this point in the history
🔖 v0.0.9
  • Loading branch information
KafCoppelia authored Apr 7, 2023
2 parents 5d2b25c + bccc0f4 commit 5d1c480
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## 📦 版本

[v0.0.8 Prerelease](https://github.com/PAICookers/PAITest/releases/tag/v0.0.8)
[v0.0.9 Prerelease](https://github.com/PAICookers/PAITest/releases/tag/v0.0.9)

## 🛠️ 使用

Expand Down
3 changes: 2 additions & 1 deletion paitest/cores/cores_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def CoordGenerator():
while True:
x = random.randint(0, 31)
y = random.randint(0, 31)
if (x, y) not in coordinates and (x <= 0b11100 or y <= 0b11100):
if (x, y) not in coordinates and (x < 0b11100 or y < 0b11100):
coordinates.add((x, y))
yield (x, y)

Expand All @@ -30,6 +30,7 @@ def GenCoreAddr(
core_addr_list: List[Tuple[int, int]] = []

if isinstance(fixed_core_addr, Tuple):
assert fixed_core_addr[0] < 32 and fixed_core_addr[1] < 32
assert not (fixed_core_addr[0] >=
0b11100 and fixed_core_addr[1] >= 0b11100)

Expand Down
3 changes: 3 additions & 0 deletions paitest/paitest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def GenTestCases(
test_chip_dirc: TestChipDirection = TestChipDirection[direction.upper()]

'''Generate 'groups' random core address first'''
if groups > 1008:
raise ValueError(f"Value of groups is no more than 1008")

core_addr_list = GenCoreAddr(groups, fixed_core_addr)

with open(frames_dir / "config.bin", "wb") as fc, \
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "PAITest"
version = "0.0.8"
version = "0.0.9"
description = "Test module for PAICORE 2.0"
authors = ["KafCoppelia <[email protected]>"]
license = "AGPL v3.0"
Expand Down

0 comments on commit 5d1c480

Please sign in to comment.