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

Subversion Repositories versatile_library

[/] [versatile_library/] [trunk/] [rtl/] [verilog/] [registers.v] - Diff between revs 5 and 8

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 5 Rev 8
Line 98... Line 98...
                if (ce)
                if (ce)
                        q <= d;
                        q <= d;
 
 
endmodule
endmodule
 
 
 
module dff_ce_clear ( d, ce, clear, q, clk, rst);
 
 
 
        parameter width = 1;
 
        parameter reset_value = 0;
 
 
 
        input [width-1:0] d;
 
        input ce, clk, rst;
 
        output reg [width-1:0] q;
 
 
 
        always @ (posedge clk or posedge rst)
 
        if (rst)
 
            q <= reset_value;
 
        else
 
            if (ce)
 
                if (clear)
 
                    q <= {width{1'b0}};
 
                else
 
                    q <= d;
 
 
 
endmodule
 
 
`ifdef ALTERA
`ifdef ALTERA
// megafunction wizard: %LPM_FF%
// megafunction wizard: %LPM_FF%
// GENERATION: STANDARD
// GENERATION: STANDARD
// VERSION: WM1.0
// VERSION: WM1.0
// MODULE: lpm_ff 
// MODULE: lpm_ff 

powered by: WebSVN 2.1.0

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