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

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [examples/] [half_adder.h] - Blame information for rev 36

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 jcastillo
// File: half_adder.h            /* Line 1 */
2
 
3
#include "systemc.h"             /* Line 2 */
4
 
5
SC_MODULE (half_adder) {         /* Line 3 */
6
  sc_in<bool> a, b;              /* Line 4 */
7
 
8
  sc_out<bool> sum, carry;       /* Line 5 */
9
 
10
  void prc_half_adder ();        /* Line 6 */
11
 
12
  SC_CTOR (half_adder) {         /* Line 7 */
13
    SC_METHOD (prc_half_adder);  /* Line 8 */
14
    sensitive << a << b;         /* Line 9 */
15
  }                              /* Line 10 */
16
};                               /* Line 11 */

powered by: WebSVN 2.1.0

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