Skip to content

Commit f2e51df

Browse files
feat(channel): 实现基于S参数的多方法通道建模模块
- 新增ChannelSParamTdf类,支持简单滤波器、理性函数拟合和脉冲响应卷积三种建模方法 - 支持从JSON配置文件加载理性函数滤波器参数和脉冲响应数据 - 实现理性函数和脉冲响应方法的初始化及处理流程 - 添加FFT加速长脉冲响应卷积的功能 - 扩展ChannelParams结构,增加采样率等参数支持 - 重构参数相关结构,改进默认值设定 - 新增benchmark_channel.py,用于性能基准测试不同通道处理方法 - 添加compare_vf_ir.py脚本,比较Vector Fitting与Impulse Response方法一致性 - 增加diagnose_issues.py脚本,辅助诊断VF和IR方法不一致的根因 - 删除冗余Dockerfile,优化CMakeLists.txt以编译AMS模块 - 新增channel_config.json示例配置文件,提供滤波器和脉冲响应数据示例
1 parent b28989e commit f2e51df

20 files changed

Lines changed: 20820 additions & 162 deletions

CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,13 @@ include_directories(
163163
# ============================================================================
164164
# Source files
165165
# ============================================================================
166-
# 暂时只编译测试所需的模块
166+
# 编译所有必要的模块以支持测试
167167
file(GLOB_RECURSE DE_SOURCES "src/de/*.cpp")
168168
file(GLOB_RECURSE SYSTEM_SOURCES "src/system/*.cpp")
169+
file(GLOB AMS_SOURCES "src/ams/*.cpp")
169170

170171
set(ALL_SOURCES
171-
src/ams/rx_ctle.cpp
172-
src/ams/rx_vga.cpp
173-
src/ams/rx_sampler.cpp
174-
src/ams/rx_cdr.cpp
172+
${AMS_SOURCES}
175173
${DE_SOURCES}
176174
${SYSTEM_SOURCES}
177175
)

Dockerfile

Lines changed: 0 additions & 139 deletions
This file was deleted.

config/channel_config.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"version": "1.0",
3+
"fs": 100000000000.0,
4+
"method": "rational",
5+
"filters": {
6+
"S21": {
7+
"num": [
8+
0.7943,
9+
1.2e-10,
10+
3.5e-21,
11+
2.1e-32
12+
],
13+
"den": [
14+
1.0,
15+
1.8e-10,
16+
5.2e-21,
17+
3.8e-32
18+
],
19+
"order": 8,
20+
"dc_gain": 0.7943,
21+
"mse": 1.2e-4,
22+
"max_error": 0.015
23+
}
24+
},
25+
"impulse_responses": {
26+
"S21": {
27+
"time": [0, 1e-11, 2e-11, 3e-11, 4e-11, 5e-11],
28+
"impulse": [0.001, 0.012, 0.045, 0.089, 0.123, 0.098],
29+
"length": 2048,
30+
"dt": 1e-11,
31+
"energy": 0.9987,
32+
"peak_time": 5.2e-10
33+
}
34+
},
35+
"port_mapping": {
36+
"forward": [[1, 2]],
37+
"crosstalk": []
38+
},
39+
"metadata": {
40+
"source_file": "example.s2p",
41+
"n_ports": 2,
42+
"freq_min_hz": 1000000.0,
43+
"freq_max_hz": 50000000000.0
44+
}
45+
}

0 commit comments

Comments
 (0)