简介
- 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种触发器。