ZHDA076A March 2026 – March 2026 AM68A , AM69A , TDA4VM
用于仅分析 DSS 事务的过滤器如下:
路由 ID值:0xA20
路由 ID 掩码:0xFFE
采样窗口:0x4000
仅对 EMIF0 进行了分析。
每帧发送的总字节通过以下公式计算:dss-frame-thru-calc.py
# Author: Jared McArthur
import csv
import matplotlib.pyplot as plt
from argparse import ArgumentParser
from textwrap import dedent
def main():
total_bytes = []
time_stamps = []
parser = ArgumentParser(prog="dss-frame-thru-calc.py")
parser.add_argument("file", type=str)
parser.add_argument("frame_start", type=float)
parser.add_argument("frame_end", type=float)
args = parser.parse_args()
start = args.frame_start
end = args.frame_end
with open(args.file, "r") as csvfile:
data = csv.DictReader(csvfile)
first_stamp = 0
for row in data:
if row.get("Master ID") != "":
total_byte = int(row.get("Byte Transactions"), base=16)
time_stamp = int(row.get("Global Timestamp"), base=16)
if len(time_stamps) == 0:
first_stamp = time_stamp
total_bytes.append(total_byte)
time_stamps.append((time_stamp - first_stamp) / (1000000000 / 5))
stamps_len = len(time_stamps)
for index, stamp in enumerate(reversed(time_stamps)):
if stamp < start or stamp > end:
time_stamps.pop(stamps_len - 1 - index)
total_bytes.pop(stamps_len - 1 - index)
bytes_in_frame = 0
for val in total_bytes:
bytes_in_frame += val
print(dedent(f"""
Num periods in segment: {len(time_stamps)}
Time elapsed in segment: {time_stamps[-1] - time_stamps[0]}
Bytes sent in segment: {bytes_in_frame}"""))
plt.plot(time_stamps, total_bytes)
plt.show()
if __name__ == "__main__":
main()