OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [include/] [ResetSC.h] - Blame information for rev 164

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 julius
// ----------------------------------------------------------------------------
2
 
3
// SystemC reset signal generator header
4
 
5
// Copyright (C) 2008  Embecosm Limited <info@embecosm.com>
6
 
7
// Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
8
 
9
// This file is part of the cycle accurate model of the OpenRISC 1000 based
10
// system-on-chip, ORPSoC, built using Verilator.
11
 
12
// This program is free software: you can redistribute it and/or modify it
13
// under the terms of the GNU Lesser General Public License as published by
14
// the Free Software Foundation, either version 3 of the License, or (at your
15
// option) any later version.
16
 
17
// This program is distributed in the hope that it will be useful, but WITHOUT
18
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
20
// License for more details.
21
 
22
// You should have received a copy of the GNU Lesser General Public License
23
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
24
 
25
// ----------------------------------------------------------------------------
26
 
27
// $Id: ResetSC.h 286 2009-02-03 11:19:30Z jeremy $
28
 
29
#ifndef RESET_SC__H
30
#define RESET_SC__H
31
 
32
#include "systemc"
33
 
34
 
35
//! Provide a SystemC reset signal at startup
36
 
37
//! The reset signal is driven for a specified number of cycles after
38
//! creation. For convenience synchronous versions of the reset signal are
39
//! provided in both active high and active low formats.
40
 
41
class ResetSC
42
  : public sc_core::sc_module
43
{
44
public:
45
 
46
  // Constructor
47
  ResetSC (sc_core::sc_module_name  name,
48
           int                      _resetCounter = 5);
49
 
50
  // Method to drive the reset
51
  void  driveReset();
52
 
53
  // The ports
54
  sc_core::sc_in<bool>   clk;
55
  sc_core::sc_out<bool>  rst;           // Active high reset
56
  sc_core::sc_out<bool>  rstn;          // Active low reset
57
 
58
private:
59
 
60
  int  resetCounter;
61
 
62
};      // ResetSC ()
63
 
64
#endif  // RESET_SC__H

powered by: WebSVN 2.1.0

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