|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我写了一个测试程序,输入为数据信号,数据有效信号及随路时钟24MHz 经过FPGA后,转换成198M的时钟频率输出。代码如下:
module Test(
iClk,
iDval,
iData_2,
oDval,
oData_2
);
input iClk;
input iDval;
input [1:0] iData_2;
output reg oDval;
output reg [1:0] oData_2;
wire Clk198M;
PLL_Cfg pll0(
.iClk(iClk), //24M
.oClk1(Clk198M), //198M
.oClk2(),
.oClk3(),
.oClk4(),
.oClk5(),
.oClk6(),
.oPllLocked()
);
reg Dval0;
reg [1:0] Data0;
always @ (posedge iClk)
begin
Dval0 <= iDval;
Data0 <= iData_2;
end
wire prog_empty;
reg RdFifoEn;
wire [1:0] FifoOut;
TsetFifo fof0(
.rst (1'b0),
.wr_clk (iClk),
.rd_clk (Clk198M),
.din (iData_2),
.wr_en (iDval),
.rd_en (RdFifoEn),
.dout (FifoOut),
.full (),
.empty (),
.prog_empty (prog_empty)
);
always @ (posedge Clk198M)
begin
if(!prog_empty)
RdFifoEn <= 1'b1;
else
RdFifoEn <= 1'b0;
end
always @ (posedge Clk198M)
begin
oData_2 <= FifoOut;
oDval <= RdFifoEn;
end
endmodule
对于输入端的时序约束我用如下方式实现:
;时钟周期约束
NET "iClk" TNM_NET = iClk;
TIMESPEC TS_iClk = PERIOD "iClk" 41.667 ns HIGH 50%;
;OFFSET_IN约束
INST "iData_2<0>" TNM = group_in;
INST "iData_2<1>" TNM = group_in;
INST "iDval" TNM = group_in;
TIMEGRP "group_in" OFFSET = IN 10 ns BEFORE "iClk" RISING;
现在我想对输出端做OFFSET_OUT约束,但是相应的时钟已经变为了Clk198M,请教各位大神,该如何OFFSET_OUT的约束? |
|