Skip to content

Commit

Permalink
Merge pull request #5 from PAICookers/dev
Browse files Browse the repository at this point in the history
🐛 fix: `chip_addr` offset
  • Loading branch information
KafCoppelia authored Apr 6, 2023
2 parents ad351d5 + d278356 commit 8f41063
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 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.5 Prerelease](https://github.com/PAICookers/PAITest/releases/tag/v0.0.5)
[v0.0.6 Prerelease](https://github.com/PAICookers/PAITest/releases/tag/v0.0.6)

## 🛠️ 使用

Expand Down
17 changes: 8 additions & 9 deletions paitest/frames/frame.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .frame_utils import FrameTypes as FT, FrameMasks as FM
from .frame_params import *
from typing import List, Tuple, Union, Optional
from typing import List, Tuple, Union


class FrameGen:
Expand All @@ -20,10 +20,10 @@ def GenFrame(
core_star_addr = core_star_addr & FM.GENERAL_CORE_STAR_ADDR_MASK
payload = payload & FM.GENERAL_PAYLOAD_MASK

return (header << FM.GENERAL_HEADER_OFFSET) | \
(chip_addr << FM.GENERAL_CORE_ADDR_OFFSET) | \
(core_addr << FM.GENERAL_CORE_ADDR_OFFSET) | \
(core_star_addr << FM.GENERAL_CORE_STAR_ADDR_OFFSET) | \
return (header << FM.GENERAL_HEADER_OFFSET) | \
(chip_addr << FM.GENERAL_CHIP_ADDR_OFFSET) | \
(core_addr << FM.GENERAL_CORE_ADDR_OFFSET) | \
(core_star_addr << FM.GENERAL_CORE_STAR_ADDR_OFFSET) | \
(payload << FM.GENERAL_PAYLOAD_OFFSET)

@staticmethod
Expand All @@ -38,7 +38,7 @@ def GenConfig1FrameGroup(
payload_list: List[int] = [
random_seed >> 34,
random_seed >> 4,
random_seed & 0xf << 26
(random_seed & 0xf) << 26
]
frames: List[int] = []
ref_out_frames: List[int] = []
Expand Down Expand Up @@ -176,8 +176,7 @@ def GenTest4InFrame(
chip_addr: int = 0,
core_addr: int = 0,
core_star_addr: int = 0,
sram_start_addr: int = 0,
package_num: int = 0
package_info: int = ...
) -> int:
return FrameGen.GenTestFrame(
FT.TEST_TYPE4, chip_addr, core_addr, core_star_addr, sram_start_addr=sram_start_addr, package_num=package_num)
FT.TEST_TYPE4, chip_addr, core_addr, core_star_addr, package_info)
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.5"
version = "0.0.6"
description = "Test module for PAICORE 2.0"
authors = ["KafCoppelia <[email protected]>"]
license = "AGPL v3.0"
Expand Down

0 comments on commit 8f41063

Please sign in to comment.