1//
2// Copyright 2011 Ettus Research LLC
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program.  If not, see <http://www.gnu.org/licenses/>.
16//
17
18
19
20module reset_sync
21  (input clk,
22   input reset_in,
23   output reg reset_out);
24
25   reg 	      reset_int;
26
27   always @(posedge clk or posedge reset_in)
28     if(reset_in)
29       {reset_out,reset_int} <= 2'b11;
30     else
31       {reset_out,reset_int} <= {reset_int,1'b0};
32
33endmodule // reset_sync
34