Test module for PAICORE 2.0
Project description
PAITest
📦 版本
🛠️ 使用生成
配置帧及对应测试输入帧,以实现硬件通路的简单测试,后续将芯片实际测试输出帧与预期结果进行对比即可。
⚠️ 由于配置帧/测试帧I型需要配合串口配置使用,因此目前仅采用配置/测试帧II型方案,且 CHIP_ADDR
与 CORE*_ADDR
均固定为 (0, 0)
。
-
实例化
PAITest
from paitest import paitest # Define the direction of test chip PAITestManager = paitest("EAST")
-
Get1GroupForNCoresWithNParams
,产生一组针对N
个核的配置-测试帧,每个核配置不同参数。可以指定单个需要屏蔽的核坐标。verbose=True
以开启日志显示,默认关闭。groups = 10 # Generate 10 groups save_to_dir="./test" # Save frames into ./test directory # Generate configuration frames, testin & testout frames cf, ti, to = PAITestManager.Get1GroupForNCoresWithNParams(groups, save_dir=save_to_dir) # Mask a cord coordinate so that avoid generating the same coordinate. # And enable verbose logging cf, ti, to = PAITestManager.Get1GroupForNCoresWithNParams(groups, save_dir=save_to_dir, masked_core_coord=(12, 16), verbose=True)
-
Get1GroupForNCoresWith1Param
,产生1组针对N
个核的配置-测试帧,每个核配置相同参数。可以指定单个需要屏蔽的核坐标# Same as Get1GroupForNCoresWithNParams cf, ti, to = PAITestManager.Get1GroupForNCoresWith1Param(10, save_dir="./test")
-
GetNGroupsFor1CoreWithNParams
,产生N
组针对1个核的配置-测试帧,每个核配置不同参数。可以指定单个需要屏蔽的核坐标# Same as Get1GroupForNCoresWithNParams cf, ti, to = PAITestManager.GetNGroupsFor1CoreWithNParams(1, save_dir="./test")
-
ReplaceCoreCoord
,替换单个或一组帧中的CORE_ADDR
为指定坐标。# Replaced core coordinate with (9, 9) replaced = PAITestManager.ReplaceCoreCoord(original_frames, (9, 9))
⚠️ 一组指一组完整的配置帧,包含3帧。对于测试输入帧,即为单帧。
-
SaveFrames
,保存帧数据至.bin
文件# Save into ./test/config.bin PAITestManager.SaveFrames("./test/config.bin", replaced)
🗓️ TODO
- 上板验证
- 参数检验
- 配置/测试帧III/IV型
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
paitest-1.0.0-py3-none-any.whl
(24.7 kB
view details)
File details
Details for the file paitest-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: paitest-1.0.0-py3-none-any.whl
- Upload date:
- Size: 24.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.9 Linux/5.15.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba3c52d339fabc33b9ce3ebede5c4f720b4c40a4575d23c96d26d91b27688e59 |
|
MD5 | 91b8e5f28130234cf31b049d53646833 |
|
BLAKE2b-256 | d6e67a78b7637001deef66790f33923d34aae8ed7445f2b6f8e1c44bbe5c1998 |