总是出来后几个地址的结果。。。如图,图一是ise
仿真结果,addr为242时的结果为-1400(ip核有时延),但在
matlab里看rom的内容242对应的是-1408(图二),-1400是后面3位的。之后的结果也是这样,大部分出来的结果是延后的,新人求帮助,是不是我操作有不规范的地方。
- always @(posedge clk)
- begin
- if(data>1200||data<-1200)
- begin
- c<=3'd1;
- end
- else
- if(data>600||data<-600)
- begin
- c<=3'd2;
- end
- else
- if(data>300||data<-300)
- begin
- c<=3'd3;
- end
- else
- begin
- addr<=data+300;
- c<=3'd4;
- end
- end
-
- arc_ip p2( //rom
- .clka(clk),
- .rsta(rst_n),
- .addra(addr),
- .douta(ip_out)
- );
-
- always @(*)
- begin
- case (c)
- 3'd1: k<=1570;
- 3'd2: k<=1553;
- 3'd3: k<=1535;
- 3'd4: k<=ip_out;
- default: $display("No related phase info");
- endcase
- end
-
- assign result=k;