SOC设计:关于时钟门控的细节

本文详细描述了软件配置的时钟门控电路,涉及输入信号如rstnsync_clk、clk和test_mode,以及控制信号clk_sub_en。通过时钟同步和工艺库中的门控单元生成门控时钟clk_sub,适用于不同工艺技术的FPGA、ARM和TSMC平台。
摘要由CSDN通过智能技术生成

有如下几个信号

输入信号

1、同步后的rstnsync_clk

2、时钟:clk

3、test_mode

4、软件控制信号:clk_sub_en

输出信号

1、clk_sub

功能:软件配置的使能信号clk_sub_en经过时钟clk 2拍同步处理后产生clk 域下的enable信号,然后使用工艺库里的时钟门控cell产生门控时钟clk_sub

使用工艺库里的门控时钟原因如下

clkgating_lte u0_clk_sub_gen (
    .rstn                           (rstnsync_clk                            ), // input  
    .clk_in                         (clk                                     ), // input  
    .test_mode                      (test_mode                                  ), // input  
    .gating                         (clk_sub_en                               ), // input  
    .clk_out                        (clk_sub                                  )  // output
);
 

module clkgating_lte (
        rstn,
        clk_in,
        test_mode,
        gating,
                clk_out
        );

input        rstn;
input        clk_in;
input        test_mode;
input        gating;
output        clk_out;

wire            gatingSync1;
wire            gatingSync2;
 

dsync2s u_dsync2s(.q(gatingSync2), .d(gating), .clk(clk_in), .rst_(rstn));

clk_gate u_gating (.TE(test_mode), .E(gatingSync2), .CK(clk_in), .QCK(clk_out));

endmodule

// clock gate
module clk_gate (CK, E, TE, QCK);
input    CK;
input    E;
input    TE;
output    QCK;
`ifdef    FPGA
    assign QCK = CK;
`else
    `ifdef    ARM_22ULP_9T
        PREICG_X4B_A9PP140ZTS_C35 U_gate (
        .SE(TE),
        .E (E),
        .CK(CK),
        .ECK(QCK)
        );
    `elsif  ARM_22ULP_6T
        PREICG_X4B_A6P5PP140ZTS_C35 U_gate (
        .SE(TE),
        .E (E),
        .CK(CK),
        .ECK(QCK)
        );
    `elsif    TSMC_22NM_9T
        CKLNQD2BWP35P140 donttouch_cg_pos (
        .TE(TE),
        .E (E),
        .CP(CK),
        .Q (QCK)
        );
    `else
        CKLNQD2BWP7T35P140 donttouch_cg_pos (
        .TE(TE),
        .E (E),
        .CP(CK),
        .Q (QCK)
        );
    `endif
`endif
endmodule // pmu_clk_gate

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值