sc_main.cc (13373:962c151f213c) sc_main.cc (13498:f6fb1bbfa39e)
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 29 unchanged lines hidden (view full) ---

38 public:
39 sc_core::sc_in<const char *> input;
40
41 SC_CTOR(Printer)
42 {
43 SC_THREAD(print);
44 }
45
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 29 unchanged lines hidden (view full) ---

38 public:
39 sc_core::sc_in<const char *> input;
40
41 SC_CTOR(Printer)
42 {
43 SC_THREAD(print);
44 }
45
46 using sc_core::sc_object::print;
46 void
47 print()
48 {
49 int i = 0;
50 while (true) {
51 wait(input.value_changed_event());
52 DPRINTFN("Word %d: %s\n", i++, input.read());
53 }

--- 55 unchanged lines hidden ---
47 void
48 print()
49 {
50 int i = 0;
51 while (true) {
52 wait(input.value_changed_event());
53 DPRINTFN("Word %d: %s\n", i++, input.read());
54 }

--- 55 unchanged lines hidden ---