Xilinx FPGA的4种触发器综合

简介

  • FDRE:同步复位触发器
  • FDSE:同步置位触发器
  • FDCE:异步复位触发器
  • FDPE:异步置位触发器

综合

module fd (
    input      clk,
    input      rst,
    input      din0,
    output reg dout0,   
    output reg dout1,
    output reg dout2,
    output reg dout3
    
);

//FDRE:同步复位触发器
always @(posedge clk) begin
    if(rst)
        dout0 <= 1'b0;
    else
        dout0 <= din0;
end
//FDSE:同步置位触发器
always @(posedge clk) begin
    if(rst)
        dout1 <= 1'b1;
    else
        dout1 <= din0;
end
//FDCE:异步复位触发器
always @(posedge clk or posedge rst) begin
    if(rst)
        dout2 <= 1'b0;
    else
        dout2 <= din0;
end
//FDPE:异步置位触发器
always @(posedge clk or posedge rst) begin
    if(rst)
        dout3 <= 1'b1;
    else
        dout3 <= din0;
end

    
endmodule

 利用vivado进行综合后得到的结果:可以看到综合出来的4种触发器。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值