|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
module mcc
(
msr_pmode,
dev_busy_late,
dev_busy_early,
test_mode,
int_test_mode,
func_clk_en,
func_clk,
reset,
scan_clk,
int_clk,
clk_active
);
input msr_pmode; //专用寄存器电源模式
input dev_busy_late; //VGA忙信号 vg_mb_slv
input dev_busy_early; //mb_slv_busy vg_mb_slv
input test_mode; //文本模式
output int_test_mode //内部文本模式
input func_clk_en;
input func_clk;
input reset;
// There is only one scan_clk per MCC. Gating multiple
// sub-blocks within a module requires separate
// MCC's (separate busys are used). Once a clock tree
// is driven, all flops on the clock tree get the edges,
// MCP still supports multiple scan chains within
// a clock domain.
input scan_clk; //扫描时钟
output int_clk; //内部时钟
output clk_active; //时钟激活
reg dev_busy_late_s1;
wire gate_en;
assign int_test_mode = test_mode || !func_clk_en;
assign clk_active = dev_busy_late_s1 || dev_busy_early || ~msr_pmode; //电源管理模式时时钟不激活且只要有忙信号,时钟便激活
assign gate_en = (clk_active && func_clk_en) || reset; //复位或者激活时钟和使能功能时钟
// The flop off of the raw func_clk is not on a scan chain
always @(posedge func_clk)
begin
dev_busy_late_s1 <= dev_busy_late | ~msr_pmode | reset;
end
wire gated_clk;
// TLATNTSCAX12HS imcc_clk_gate ( .E(gate_en), .SE(test_mode), .CK(func_clk), .ECK(gated_clk));
// OR2X8HS iclk_out_or ( .Y(int_clk), .A(gated_clk), .B(scan_clk));
// modify:2011/04/17 22:30
TLATNTSCAX12 imcc_clk_gate ( .E(gate_en), .SE(test_mode), .CK(func_clk), .ECK(gated_clk));
OR2X8 iclk_out_or ( .Y(int_clk), .A(gated_clk), .B(scan_clk));
// Synthesis directives
//synopsys dc_script_begin
//set_dont_touch{imcc_clk_gate}
//set_dont_touch{iclk_out_or}
//synopsys dc_script_end
endmodule
module OR2X8 (Y, A, B);
output Y;
input A, B;
or (Y, A, B);
specify
delay parameters
specparam
tplh$A$Y = 1.0, //A-Y的从低到高时延时的参数???
tphl$A$Y = 1.0,
tplh$B$Y = 1.0,
tphl$B$Y = 1.0;
path delays //路径延时(全延时)
(A *> Y) = (tplh$A$Y, tphl$A$Y);
(B *> Y) = (tplh$B$Y, tphl$B$Y);
endspecify
endmodule // OR2X8
module TLATNTSCAX12 (ECK, E, SE, CK);
output ECK;
input E, SE, CK; //E可能是用于时序检测的参考信号
reg NOTIFIER; //需要的最小建立时间
supply1 R, S; //电源建模时采用supply1线网
or I0 (n1, SE, E);
udp_tlat I1 (n0, n1, CK, R, S, NOTIFIER);
and I2 (ECK, n0, CK);
specify
specparam
tplh$E$ECK = 1.0,
tphl$E$ECK = 1.0,
tplh$SE$ECK = 1.0,
tphl$SE$ECK = 1.0,
tplh$CK$ECK = 1.0,
tphl$CK$ECK = 1.0,
tsetup$E$CK = 1.0,
thold$E$CK = 0.5,
tsetup$SE$CK = 1.0,
thold$SE$CK = 0.5,
tminpwl$CK = 1.0;
// path delays
(posedge CK *> (ECK +: E)) = (tplh$CK$ECK, tphl$CK$ECK);
(negedge CK *> (ECK +: E)) = (tplh$CK$ECK, tphl$CK$ECK);
// timing checks
$setuphold(posedge CK &&& (SE == 0), posedge E, tsetup$E$CK, thold$E$CK, NOTIFIER);
$setuphold(posedge CK &&& (SE == 0), negedge E, tsetup$E$CK, thold$E$CK, NOTIFIER);
$width(negedge CK, tminpwl$CK, 0, NOTIFIER);
$setuphold(posedge CK, posedge SE, tsetup$SE$CK, thold$SE$CK, NOTIFIER);
$setuphold(posedge CK, negedge SE, tsetup$SE$CK, thold$SE$CK, NOTIFIER);
endspecify
endmodule //TLATNTSCAX12
primitive udp_tlat (out, in, hold, clr_, set_, NOTIFIER);
output out;
input in, hold, clr_, set_, NOTIFIER;
reg out;
table
// in hold clr_ set_ NOT : Qt : Qt+1
//
1 0 1 ? ? : ? : 1 ; //
0 0 ? 1 ? : ? : 0 ; //
1 * 1 ? ? : 1 : 1 ; // reduce pessimism
0 * ? 1 ? : 0 : 0 ; // reduce pessimism
* 1 ? ? ? : ? : - ; // no changes when in switches
? ? ? 0 ? : ? : 1 ; // set output
? 1 1 * ? : 1 : 1 ; // cover all transistions on set_
1 ? 1 * ? : 1 : 1 ; // cover all transistions on set_
? ? 0 1 ? : ? : 0 ; // reset output
? 1 * 1 ? : 0 : 0 ; // cover all transistions on clr_
0 ? * 1 ? : 0 : 0 ; // cover all transistions on clr_
? ? ? ? * : ? : x ; // any notifier changed
endtable
endprimitive |
|