【发布时间】:2018-02-27 20:24:48
【问题描述】:
我正在尝试使用 Vivado 模拟 AXI4(Full) 主控。它应该在从端写入以下值(在我的情况下,这将是我的 zedboard PS 中的一些寄存器)
0x0000fe01 to 0xe000a204
0x0000fe01 to 0xe000a208
0x00000001 to 0xe000a040
这是块级设计。
当我运行行为综合时,它会起作用。
但是,当我尝试运行综合后功能仿真(据说更接近实际设计并包括门延迟)时,我得到了一些不确定的值
这里是完整的项目和主IP,如果需要查看。
vivado project(using vivado 2015.2) axi_controller
以下是自上而下的各个 verilog 文件(只是为了便于访问):
axi_controller_v1_1.v(这是我为 FSM 进行状态计算的地方,我将状态发送到接口单元,以便它可以为端口分配适当的值)
axi_controller_v1_1_M00_AXI.v(这是IP中的接口单元)
我已将问题缩小到代码中的这一部分。
//state updation
always @(posedge m00_axi_aclk) begin
if(m00_axi_aresetn==1'b0) begin
cur<=t_0;
next<=t_0;
end
else begin
cur<=next;
end
end
//state calculation
always @(*) begin
case(cur)
t_0: begin
if(m00_axi_init_axi_txn) next=t_1;
else next=t_0;
end
t_1: begin
next=t_2;
end
t_2: begin
if(m00_axi_awready) begin
if(m00_axi_wready) next=t_4;
else next=t_3;
end
else next=t_2;
end
t_3: begin
if(m00_axi_wready) next=t_4;
else next=t_3;
end
t_4: begin
if(m00_axi_awready) begin
if(m00_axi_wready) next=t_6;
else next=t_5;
end
else next=t_4;
end
t_5: begin
if(m00_axi_wready) next=t_6;
else next=t_5;
end
t_6: begin
next=t_6;
end
default next=t_0;
endcase
end
在哪里,
parameter t_0=3'b000,
parameter t_1=3'b001,
parameter t_2=3'b010,
parameter t_3=3'b011,
parameter t_4=3'b100,
parameter t_5=3'b101,
parameter t_6=3'b110,
在100ns,当INIT_AXI_TRANS从0变为1next变为00x
因为cur 是000(或t_0),所以应该实现第一种情况。当next 变为00x 时,我认为无法找到INIT_AXI_TRANS 是0 还是1。然后这种效应会通过电路的其余部分传播。
谁能帮我看看我该如何解决这个问题。
提前致谢。
我按照第一条评论中的建议做了,并在此处和 git 存储库中更新了代码。可悲的是,这似乎不是问题,因为我仍然得到相同的结果。
【问题讨论】:
-
你必须深入挖掘大门。但在此之前,我建议你清理你的代码。主要错误:AXI 在时钟上升沿工作,不要在 always ( * ) 部分使用非阻塞分配。
标签: verilog simulation fpga hdl vivado