Line 39... |
Line 39... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.3 2002/01/23 10:28:16 mohor
|
|
// Link in the header changed.
|
|
//
|
// Revision 1.2 2001/10/19 08:43:51 mohor
|
// Revision 1.2 2001/10/19 08:43:51 mohor
|
// eth_timescale.v changed to timescale.v This is done because of the
|
// eth_timescale.v changed to timescale.v This is done because of the
|
// simulation of the few cores in a one joined project.
|
// simulation of the few cores in a one joined project.
|
//
|
//
|
// Revision 1.1 2001/08/06 14:44:29 mohor
|
// Revision 1.1 2001/08/06 14:44:29 mohor
|
Line 63... |
Line 66... |
//
|
//
|
|
|
`include "timescale.v"
|
`include "timescale.v"
|
|
|
|
|
module eth_register(DataIn, DataOut, Write, Clk, Reset, Default);
|
module eth_register(DataIn, DataOut, Write, Clk, Reset);
|
|
|
parameter WIDTH = 8; // default parameter of the register width
|
parameter WIDTH = 8; // default parameter of the register width
|
|
parameter ResetValue = 0;
|
|
|
input [WIDTH-1:0] DataIn;
|
input [WIDTH-1:0] DataIn;
|
|
|
input Write;
|
input Write;
|
input Clk;
|
input Clk;
|
input Reset;
|
input Reset;
|
input [WIDTH-1:0] Default;
|
|
|
|
output [WIDTH-1:0] DataOut;
|
output [WIDTH-1:0] DataOut;
|
reg [WIDTH-1:0] DataOut;
|
reg [WIDTH-1:0] DataOut;
|
|
|
|
|
|
|
always @ (posedge Clk or posedge Reset)
|
always @ (posedge Clk or posedge Reset)
|
begin
|
begin
|
if(Reset)
|
if(Reset)
|
DataOut<=#1 Default;
|
DataOut<=#1 ResetValue;
|
else
|
else
|
if(Write) // write
|
if(Write) // write
|
DataOut<=#1 DataIn;
|
DataOut<=#1 DataIn;
|
end
|
end
|
|
|