OpenCores
URL https://opencores.org/ocsvn/cdc_ufifo/cdc_ufifo/trunk

Subversion Repositories cdc_ufifo

[/] [cdc_ufifo/] [trunk/] [prim_dffe.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 AlexRayne
module prim_dffe(d, clk, ena, clrn, prn, q);
2
parameter lpm_width = 1;
3
parameter lpm_avalue = 0;
4
 
5
input clk, ena;
6
input clrn,prn;
7
input [lpm_width-1 : 0] d;
8
output [lpm_width-1 : 0] q;
9
 
10
tri1 clrn,prn;
11
wire i_clr, i_prn;
12
buf(i_clr, clrn);
13
buf(i_prn, prn);
14
 
15
reg [lpm_width-1 : 0] q;
16
 
17
always @(posedge clk or negedge i_clr or negedge i_prn) begin
18
    if (!i_clr)
19
        q <= {lpm_width{1'b0}};
20
    else if (!i_prn)
21
        q <= {lpm_width{1'b1}};
22
    else if (ena)
23
        q <= d;
24
end
25
 
26
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.