fpga系列 HDL:Quartus II SignalTap的Create Signal Tap List File功能

Create Signal Tap List File

  • SignalTap II 需要JTAG与FPGA连接,程序在真实硬件中运行。

设置

  • Filter 选择 SignalTap II: pre-synthessis 项(否则可能找不到网络标识)
  • SignalTap II设置完成之后再次进行综合。

抓取

  • 保存stp后,下载程序,进行波形分析

Create Signal Tap List File

  • 生成的数据示例:

    Signal Legend:

    Key Signal Name

    0 = top:BANK0|CS
    1 = top:BANK0|STA
    2 = top:BANK0|STA[2]
    3 = top:BANK0|STA[1]
    4 = top:BANK0|STA[0]

    Data Table:

    Signals-> 0 1 2 3 4

    sample

    -64 1 3h 0 1 1
    -63 1 3h 0 1 1
    -62 1 3h 0 1 1
    ......
    -3 1 3h 0 1 1
    -2 1 0h 0 0 0
    -1 1 1h 0 0 1
    0 1 2h 0 1 0
    1 1 3h 0 1 1
    2 1 3h 0 1 1
    3 1 3h 0 1 1
    ......
    440 1 3h 0 1 1
    441 1 3h 0 1 1
    442 1 3h 0 1 1
    443 1 3h 0 1 1
    444 1 3h 0 1 1
    445 1 3h 0 1 1
    446 1 3h 0 1 1
    447 1 3h 0 1 1

数据在仿真中使用

文本处理

复制代码
03 00 01 01  // 去掉h字符,处理为可读数据
03 00 01 01
03 00 01 01
03 00 01 01

测试代码

复制代码
module top (
    input wire clk,
    input wire rst_n,
    input wire [15:0] data_in,
    output reg [15:0] data_out
);

reg [15:0] intermediate_data;

//(* preserve *)
reg [7:0] intermediate_data; 


always @(posedge clk or negedge rst_n) begin
    if (!rst_n) begin
        intermediate_data <= 8'b0;
        data_out <= 8'b0;
    end else begin
        intermediate_data <= data_in;
        data_out <= data_in;
    end
end

endmodule
  • $readmemh("<数据文件名>",<数组名>,<起始地址>,<结束地址>)函数读取

    module top_test;
    reg [7:0] memory [0:15];
    initial begin
    // 使用 readmemh 加载数据 readmemh("E:\Projects\top\data.dat", memory);
    end
    // 信号声明
    reg clk;
    reg rst_n;
    reg [15:0] data_in;
    wire [15:0] data_out;

    复制代码
      // 实例化被测模块
      top uut (
          .clk(clk),
          .rst_n(rst_n),
          .data_in(data_in),
          .data_out(data_out)
      );
    
      // 时钟生成
      initial begin
          clk = 0;
          forever #5 clk = ~clk;  // 10个时间单位的周期
      end
    
      // 复位和测试序列
      initial begin
          // 初始化信号
          rst_n = 0;
          data_in = 8'b0;
    
          // 施加复位
          #10 rst_n = 1;  // 释放复位
    
          // 等待几个时钟周期
          #20;
    
          // 提供一些测试向量
          @(posedge clk) data_in = memory[0];
          @(posedge clk) data_in = memory[1];
          @(posedge clk) data_in = memory[2];
          @(posedge clk) data_in = memory[3];
          @(posedge clk) data_in = memory[4];
          @(posedge clk) data_in = memory[5];
    
          // 结束仿真
          #20 $finish;
      end

    endmodule

仿真结果

相关推荐
风_峰16 小时前
Ubuntu Linux SD卡分区操作
嵌入式硬件·ubuntu·fpga开发
FPGA_Linuxer16 小时前
FPGA 40 DAC线缆和光模块带光纤实现40G UDP差异
网络协议·fpga开发·udp
风_峰1 天前
Petalinux相关配置——ZYNQ通过eMMC启动
嵌入式硬件·ubuntu·fpga开发
风_峰1 天前
【ZYNQ开发篇】Petalinux和电脑端的静态ip地址配置
网络·嵌入式硬件·tcp/ip·ubuntu·fpga开发
碎碎思1 天前
一块板子,玩转 HDMI、USB、FPGA ——聊聊开源项目 HDMI2USB-Numato-Opsis
fpga开发
ooo-p1 天前
FPGA学习篇——Verilog学习Led灯的实现
学习·fpga开发
嵌入式-老费1 天前
Zynq开发实践(FPGA之选择开发板)
fpga开发
风_峰2 天前
PuTTY软件访问ZYNQ板卡的Linux系统
linux·服务器·嵌入式硬件·fpga开发
电子凉冰2 天前
FPGA入门-状态机
fpga开发
Aczone282 天前
硬件(十)IMX6ULL 中断与时钟配置
arm开发·单片机·嵌入式硬件·fpga开发