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

Subversion Repositories brisc

[/] [brisc/] [trunk/] [register_e.v] - Diff between revs 2 and 3

Show entire file | Details | Blame | View Log

Rev 2 Rev 3
Line 1... Line 1...
 
module register_e(in, out, clk, reset_n, enable);
 
 
 No newline at end of file
 No newline at end of file
 
parameter dw = 8 ;
 
 
 
input [dw-1:0] in;
 
input clk;
 
input reset_n;
 
input enable;
 
 
 
output reg [dw-1:0] out;
 
 
 
always @(posedge clk or negedge reset_n)
 
begin
 
        if (!reset_n)
 
                out <= 0;
 
        else if (enable)
 
                out <= in;
 
//      else
 
//              out <= {dw{1'bx}};
 
end
 
 
 
endmodule
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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