From 685795659c2f201ef4d0ff54807b04cecd042cce Mon Sep 17 00:00:00 2001 From: Mohammed Buirat Date: Mon, 30 Mar 2026 23:09:04 +0300 Subject: [PATCH] Replace systemc.h with systemc header Signed-off-by: Mohammed Buirat --- examples/sysc/2.1/dpipe/main.cpp | 6 +++++- examples/sysc/2.1/forkjoin/forkjoin.cpp | 5 ++++- examples/sysc/2.1/reset_signal_is/reset_signal_is.cpp | 5 ++++- examples/sysc/2.1/sc_export/main.cpp | 5 ++++- examples/sysc/2.1/sc_report/main.cpp | 5 ++++- examples/sysc/2.1/scx_barrier/main.cpp | 6 +++++- .../sysc/2.1/scx_mutex_w_policy/scx_mutex_w_policy.cpp | 7 ++++++- examples/sysc/2.3/sc_rvd/main.cpp | 6 +++++- examples/sysc/2.3/sc_ttd/main.cpp | 6 +++++- examples/sysc/2.3/simple_async/main.cpp | 5 ++++- examples/sysc/2.4/in_class_initialization/adder.h | 3 ++- .../2.4/in_class_initialization/adder_int_5_pimpl.h | 3 ++- .../in_class_initialization.cpp | 4 +++- examples/sysc/async_suspend/async_suspend.cpp | 6 +++++- examples/sysc/async_suspend/collector.h | 2 ++ examples/sysc/fft/fft_flpt/fft.cpp | 6 +++++- examples/sysc/fft/fft_flpt/main.cpp | 5 ++++- examples/sysc/fft/fft_flpt/sink.cpp | 7 ++++++- examples/sysc/fft/fft_flpt/source.cpp | 8 +++++++- examples/sysc/fft/fft_fxpt/fft.cpp | 6 +++++- examples/sysc/fft/fft_fxpt/main.cpp | 6 +++++- examples/sysc/fft/fft_fxpt/sink.cpp | 8 +++++++- examples/sysc/fft/fft_fxpt/source.cpp | 9 ++++++++- examples/sysc/fir/display.cpp | 5 ++++- examples/sysc/fir/fir.cpp | 4 +++- examples/sysc/fir/fir_data.cpp | 6 +++++- examples/sysc/fir/fir_fsm.cpp | 6 +++++- examples/sysc/fir/fir_top.h | 4 +++- examples/sysc/fir/main.cpp | 4 +++- examples/sysc/fir/main_rtl.cpp | 4 +++- examples/sysc/fir/stimulus.cpp | 6 +++++- examples/sysc/pipe/display.cpp | 4 +++- examples/sysc/pipe/main.cpp | 3 ++- examples/sysc/pipe/numgen.cpp | 3 ++- examples/sysc/pipe/stage1.cpp | 3 ++- examples/sysc/pipe/stage2.cpp | 3 ++- examples/sysc/pipe/stage3.cpp | 3 ++- examples/sysc/pkt_switch/fifo.h | 5 ++++- examples/sysc/pkt_switch/main.cpp | 5 ++++- examples/sysc/pkt_switch/pkt.h | 5 ++++- examples/sysc/pkt_switch/receiver.cpp | 2 ++ examples/sysc/pkt_switch/receiver.h | 5 ++++- examples/sysc/pkt_switch/sender.cpp | 2 ++ examples/sysc/pkt_switch/sender.h | 5 ++++- examples/sysc/pkt_switch/switch.cpp | 8 +++++++- examples/sysc/pkt_switch/switch.h | 5 ++++- examples/sysc/pkt_switch/switch_clk.h | 3 ++- examples/sysc/risc_cpu/bios.cpp | 10 +++++++++- examples/sysc/risc_cpu/dcache.cpp | 9 ++++++++- examples/sysc/risc_cpu/decode.cpp | 7 ++++++- examples/sysc/risc_cpu/exec.cpp | 6 +++++- examples/sysc/risc_cpu/fetch.cpp | 7 ++++++- examples/sysc/risc_cpu/floating.cpp | 6 +++++- examples/sysc/risc_cpu/icache.cpp | 10 +++++++++- examples/sysc/risc_cpu/main.cpp | 9 ++++++++- examples/sysc/risc_cpu/mmxu.cpp | 7 ++++++- examples/sysc/risc_cpu/paging.cpp | 6 +++++- examples/sysc/risc_cpu/pic.cpp | 3 ++- examples/sysc/rsa/rsa.cpp | 10 +++++++++- examples/sysc/simple_bus/simple_bus.h | 4 +++- examples/sysc/simple_bus/simple_bus_arbiter.h | 4 +++- examples/sysc/simple_bus/simple_bus_arbiter_if.h | 4 +++- examples/sysc/simple_bus/simple_bus_blocking_if.h | 4 +++- examples/sysc/simple_bus/simple_bus_direct_if.h | 3 ++- examples/sysc/simple_bus/simple_bus_fast_mem.h | 4 +++- examples/sysc/simple_bus/simple_bus_main.cpp | 3 ++- examples/sysc/simple_bus/simple_bus_master_blocking.h | 4 +++- examples/sysc/simple_bus/simple_bus_master_direct.h | 3 ++- .../sysc/simple_bus/simple_bus_master_non_blocking.h | 4 +++- examples/sysc/simple_bus/simple_bus_non_blocking_if.h | 4 +++- examples/sysc/simple_bus/simple_bus_slave_if.h | 4 +++- examples/sysc/simple_bus/simple_bus_slow_mem.h | 4 +++- examples/sysc/simple_bus/simple_bus_test.h | 3 ++- examples/sysc/simple_bus/simple_bus_types.h | 4 +++- examples/sysc/simple_fifo/simple_fifo.cpp | 6 +++++- examples/sysc/simple_perf/simple_perf.cpp | 7 ++++++- 76 files changed, 318 insertions(+), 73 deletions(-) diff --git a/examples/sysc/2.1/dpipe/main.cpp b/examples/sysc/2.1/dpipe/main.cpp index c3f3e28a1..41f5ce1f0 100644 --- a/examples/sysc/2.1/dpipe/main.cpp +++ b/examples/sysc/2.1/dpipe/main.cpp @@ -38,7 +38,11 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::cout; +using std::endl; // This program implements a delay pipe which passes values through a fifo // in a specified number of clocks. A value may be inserted at each clock diff --git a/examples/sysc/2.1/forkjoin/forkjoin.cpp b/examples/sysc/2.1/forkjoin/forkjoin.cpp index 1874726e5..e64cd2282 100644 --- a/examples/sysc/2.1/forkjoin/forkjoin.cpp +++ b/examples/sysc/2.1/forkjoin/forkjoin.cpp @@ -37,7 +37,10 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using std::cout; +using std::endl; int test_function(double d) diff --git a/examples/sysc/2.1/reset_signal_is/reset_signal_is.cpp b/examples/sysc/2.1/reset_signal_is/reset_signal_is.cpp index 2f94e2d15..72ee600c2 100644 --- a/examples/sysc/2.1/reset_signal_is/reset_signal_is.cpp +++ b/examples/sysc/2.1/reset_signal_is/reset_signal_is.cpp @@ -38,7 +38,10 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; SC_MODULE(CONSUMER) { SC_CTOR(CONSUMER) diff --git a/examples/sysc/2.1/sc_export/main.cpp b/examples/sysc/2.1/sc_export/main.cpp index e9514bd67..fa3181167 100644 --- a/examples/sysc/2.1/sc_export/main.cpp +++ b/examples/sysc/2.1/sc_export/main.cpp @@ -68,7 +68,10 @@ bound to ports P1 and P2 of module X. */ -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; // Interface class C_if : virtual public sc_interface diff --git a/examples/sysc/2.1/sc_report/main.cpp b/examples/sysc/2.1/sc_report/main.cpp index 66c16b4a5..9f2e06006 100644 --- a/examples/sysc/2.1/sc_report/main.cpp +++ b/examples/sysc/2.1/sc_report/main.cpp @@ -40,7 +40,10 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using std::cout; +using std::endl; /* diff --git a/examples/sysc/2.1/scx_barrier/main.cpp b/examples/sysc/2.1/scx_barrier/main.cpp index a11f87c44..9efdbe508 100644 --- a/examples/sysc/2.1/scx_barrier/main.cpp +++ b/examples/sysc/2.1/scx_barrier/main.cpp @@ -39,7 +39,11 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; +using std::printf; #include "scx_barrier.h" using sc_core::scx_barrier; diff --git a/examples/sysc/2.1/scx_mutex_w_policy/scx_mutex_w_policy.cpp b/examples/sysc/2.1/scx_mutex_w_policy/scx_mutex_w_policy.cpp index ac8de1bf8..1a6f5ba05 100644 --- a/examples/sysc/2.1/scx_mutex_w_policy/scx_mutex_w_policy.cpp +++ b/examples/sysc/2.1/scx_mutex_w_policy/scx_mutex_w_policy.cpp @@ -56,7 +56,12 @@ // See section 7.4, page 120 of "System Design with SystemC" for // additional discussion -#include +#include +using namespace sc_core; +using std::cout; +using std::endl; +using std::rand; +using std::remove; class scx_mutex_w_policy : public sc_mutex { diff --git a/examples/sysc/2.3/sc_rvd/main.cpp b/examples/sysc/2.3/sc_rvd/main.cpp index e5686dc4d..a0e971633 100644 --- a/examples/sysc/2.3/sc_rvd/main.cpp +++ b/examples/sysc/2.3/sc_rvd/main.cpp @@ -37,7 +37,11 @@ // Andy Goodrich: new example using a ready-valid handshake for communication. // -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::cout; +using std::endl; #include #include "sc_rvd.h" diff --git a/examples/sysc/2.3/sc_ttd/main.cpp b/examples/sysc/2.3/sc_ttd/main.cpp index 56c2f342c..f5c778038 100644 --- a/examples/sysc/2.3/sc_ttd/main.cpp +++ b/examples/sysc/2.3/sc_ttd/main.cpp @@ -37,7 +37,11 @@ // Andy Goodrich: new example using a toggle-toggle handshake for communication. // -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::cout; +using std::endl; #include #include "sc_ttd.h" diff --git a/examples/sysc/2.3/simple_async/main.cpp b/examples/sysc/2.3/simple_async/main.cpp index 2aa328c4a..9ccd81eba 100644 --- a/examples/sysc/2.3/simple_async/main.cpp +++ b/examples/sysc/2.3/simple_async/main.cpp @@ -28,7 +28,10 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; #include "async_event.h" #if SC_CPLUSPLUS >= 201103L diff --git a/examples/sysc/2.4/in_class_initialization/adder.h b/examples/sysc/2.4/in_class_initialization/adder.h index 2f52cc6a1..1ae325976 100644 --- a/examples/sysc/2.4/in_class_initialization/adder.h +++ b/examples/sysc/2.4/in_class_initialization/adder.h @@ -30,7 +30,8 @@ #ifndef ADDER_H_ #define ADDER_H_ -#include +#include +using namespace sc_core; template struct adder : sc_module { diff --git a/examples/sysc/2.4/in_class_initialization/adder_int_5_pimpl.h b/examples/sysc/2.4/in_class_initialization/adder_int_5_pimpl.h index 64c7f04b6..84df522e7 100644 --- a/examples/sysc/2.4/in_class_initialization/adder_int_5_pimpl.h +++ b/examples/sysc/2.4/in_class_initialization/adder_int_5_pimpl.h @@ -31,7 +31,8 @@ #ifndef ADDER_PIMPL_H_ #define ADDER_PIMPL_H_ -#include +#include +using namespace sc_core; // Demonstrates how to remove compile dependency on adder.h header using PImpl class adder_int_5_pimpl { diff --git a/examples/sysc/2.4/in_class_initialization/in_class_initialization.cpp b/examples/sysc/2.4/in_class_initialization/in_class_initialization.cpp index 1490440a4..ab0840bf2 100644 --- a/examples/sysc/2.4/in_class_initialization/in_class_initialization.cpp +++ b/examples/sysc/2.4/in_class_initialization/in_class_initialization.cpp @@ -26,7 +26,9 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using std::cout; #ifdef USE_PIMPL_ADDER #include "adder_int_5_pimpl.h" diff --git a/examples/sysc/async_suspend/async_suspend.cpp b/examples/sysc/async_suspend/async_suspend.cpp index e9271c846..dd76a1488 100644 --- a/examples/sysc/async_suspend/async_suspend.cpp +++ b/examples/sysc/async_suspend/async_suspend.cpp @@ -22,7 +22,11 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using std::rand; +using std::size_t; +using std::srand; #include "node.h" #include diff --git a/examples/sysc/async_suspend/collector.h b/examples/sysc/async_suspend/collector.h index 7e71c6fb3..00e36b4c3 100644 --- a/examples/sysc/async_suspend/collector.h +++ b/examples/sysc/async_suspend/collector.h @@ -31,6 +31,8 @@ namespace plt = matplotlibcpp; #endif +using std::cout; + /* thread-safe collector to enable pretty-printing the output of the * simulation as a csv style output (import it into a spreadsheet and draw some * nice graphs !*/ diff --git a/examples/sysc/fft/fft_flpt/fft.cpp b/examples/sysc/fft/fft_flpt/fft.cpp index e1ca5f216..09ddf6f55 100644 --- a/examples/sysc/fft/fft_flpt/fft.cpp +++ b/examples/sysc/fft/fft_flpt/fft.cpp @@ -36,7 +36,11 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::cout; +using std::endl; #include "fft.h" void fft::entry() diff --git a/examples/sysc/fft/fft_flpt/main.cpp b/examples/sysc/fft/fft_flpt/main.cpp index 70e1cfc16..a8054c3fe 100644 --- a/examples/sysc/fft/fft_flpt/main.cpp +++ b/examples/sysc/fft/fft_flpt/main.cpp @@ -37,7 +37,10 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::FILE; +using std::fclose; #include "fft.h" #include "source.h" #include "sink.h" diff --git a/examples/sysc/fft/fft_flpt/sink.cpp b/examples/sysc/fft/fft_flpt/sink.cpp index f6f85c0f2..847308616 100644 --- a/examples/sysc/fft/fft_flpt/sink.cpp +++ b/examples/sysc/fft/fft_flpt/sink.cpp @@ -37,7 +37,12 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::FILE; +using std::fclose; +using std::fopen; +using std::fprintf; #include "sink.h" void sink::entry() diff --git a/examples/sysc/fft/fft_flpt/source.cpp b/examples/sysc/fft/fft_flpt/source.cpp index d3042c487..486249b01 100644 --- a/examples/sysc/fft/fft_flpt/source.cpp +++ b/examples/sysc/fft/fft_flpt/source.cpp @@ -37,7 +37,13 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::FILE; +using std::cout; +using std::endl; +using std::fopen; +using std::fscanf; #include "source.h" void source::entry() { FILE *fp_real, *fp_imag; diff --git a/examples/sysc/fft/fft_fxpt/fft.cpp b/examples/sysc/fft/fft_fxpt/fft.cpp index a97baf385..f0494f7c1 100644 --- a/examples/sysc/fft/fft_fxpt/fft.cpp +++ b/examples/sysc/fft/fft_fxpt/fft.cpp @@ -37,7 +37,11 @@ /* This is the implementation file for the synchronous process "fft" */ -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::cout; +using std::endl; #include "fft.h" diff --git a/examples/sysc/fft/fft_fxpt/main.cpp b/examples/sysc/fft/fft_fxpt/main.cpp index 49fc4c71e..1be362bc5 100644 --- a/examples/sysc/fft/fft_fxpt/main.cpp +++ b/examples/sysc/fft/fft_fxpt/main.cpp @@ -37,7 +37,11 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::FILE; +using std::fclose; #include "fft.h" #include "source.h" #include "sink.h" diff --git a/examples/sysc/fft/fft_fxpt/sink.cpp b/examples/sysc/fft/fft_fxpt/sink.cpp index 8eaececdb..00985f40d 100644 --- a/examples/sysc/fft/fft_fxpt/sink.cpp +++ b/examples/sysc/fft/fft_fxpt/sink.cpp @@ -37,7 +37,13 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::FILE; +using std::fclose; +using std::fopen; +using std::fprintf; #include "sink.h" void sink::entry() diff --git a/examples/sysc/fft/fft_fxpt/source.cpp b/examples/sysc/fft/fft_fxpt/source.cpp index 43983e47a..54372b0a4 100644 --- a/examples/sysc/fft/fft_fxpt/source.cpp +++ b/examples/sysc/fft/fft_fxpt/source.cpp @@ -37,7 +37,14 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::FILE; +using std::cout; +using std::endl; +using std::fopen; +using std::fscanf; #include "source.h" void source::entry() diff --git a/examples/sysc/fir/display.cpp b/examples/sysc/fir/display.cpp index fca2983cf..2e7b83ac2 100644 --- a/examples/sysc/fir/display.cpp +++ b/examples/sysc/fir/display.cpp @@ -35,7 +35,10 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using std::cout; +using std::endl; #include "display.h" void display::entry(){ diff --git a/examples/sysc/fir/fir.cpp b/examples/sysc/fir/fir.cpp index 3744851f2..a7aec4d43 100644 --- a/examples/sysc/fir/fir.cpp +++ b/examples/sysc/fir/fir.cpp @@ -35,7 +35,9 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using namespace sc_dt; #include "fir.h" void fir::entry() { diff --git a/examples/sysc/fir/fir_data.cpp b/examples/sysc/fir/fir_data.cpp index 0413b91bc..484b3da56 100644 --- a/examples/sysc/fir/fir_data.cpp +++ b/examples/sysc/fir/fir_data.cpp @@ -35,7 +35,11 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using namespace sc_dt; +using std::cout; +using std::endl; #include "fir_data.h" void fir_data::entry() diff --git a/examples/sysc/fir/fir_fsm.cpp b/examples/sysc/fir/fir_fsm.cpp index 5df6cd73b..e950f0085 100644 --- a/examples/sysc/fir/fir_fsm.cpp +++ b/examples/sysc/fir/fir_fsm.cpp @@ -35,7 +35,11 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using namespace sc_dt; +using std::cout; +using std::endl; #include "fir_fsm.h" void fir_fsm::entry() { diff --git a/examples/sysc/fir/fir_top.h b/examples/sysc/fir/fir_top.h index 10474034b..482b63463 100644 --- a/examples/sysc/fir/fir_top.h +++ b/examples/sysc/fir/fir_top.h @@ -35,7 +35,9 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using namespace sc_dt; #include "fir_fsm.h" #include "fir_data.h" diff --git a/examples/sysc/fir/main.cpp b/examples/sysc/fir/main.cpp index caf3a3d06..f80d54093 100644 --- a/examples/sysc/fir/main.cpp +++ b/examples/sysc/fir/main.cpp @@ -35,7 +35,9 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using namespace sc_dt; #include "stimulus.h" #include "display.h" #include "fir.h" diff --git a/examples/sysc/fir/main_rtl.cpp b/examples/sysc/fir/main_rtl.cpp index e827bb3c2..8732c1c25 100644 --- a/examples/sysc/fir/main_rtl.cpp +++ b/examples/sysc/fir/main_rtl.cpp @@ -35,7 +35,9 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using namespace sc_dt; #include "stimulus.h" #include "display.h" #include "fir_top.h" diff --git a/examples/sysc/fir/stimulus.cpp b/examples/sysc/fir/stimulus.cpp index 38642fc8b..353f42dcf 100644 --- a/examples/sysc/fir/stimulus.cpp +++ b/examples/sysc/fir/stimulus.cpp @@ -35,7 +35,11 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using namespace sc_dt; +using std::cout; +using std::endl; #include "stimulus.h" void stimulus::entry() { diff --git a/examples/sysc/pipe/display.cpp b/examples/sysc/pipe/display.cpp index 9cb52828e..b314c1ef3 100644 --- a/examples/sysc/pipe/display.cpp +++ b/examples/sysc/pipe/display.cpp @@ -35,7 +35,9 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::printf; #include "display.h" #include diff --git a/examples/sysc/pipe/main.cpp b/examples/sysc/pipe/main.cpp index abf755110..dc7586935 100644 --- a/examples/sysc/pipe/main.cpp +++ b/examples/sysc/pipe/main.cpp @@ -36,7 +36,8 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; #include "stage1.h" #include "stage2.h" #include "stage3.h" diff --git a/examples/sysc/pipe/numgen.cpp b/examples/sysc/pipe/numgen.cpp index 10f5c75fb..42c1a09e9 100644 --- a/examples/sysc/pipe/numgen.cpp +++ b/examples/sysc/pipe/numgen.cpp @@ -35,7 +35,8 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; #include "numgen.h" // definition of the `generate' method diff --git a/examples/sysc/pipe/stage1.cpp b/examples/sysc/pipe/stage1.cpp index 185b15e3e..9db875f49 100644 --- a/examples/sysc/pipe/stage1.cpp +++ b/examples/sysc/pipe/stage1.cpp @@ -35,7 +35,8 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; #include "stage1.h" //Definition of addsub method diff --git a/examples/sysc/pipe/stage2.cpp b/examples/sysc/pipe/stage2.cpp index 808b80314..fef42bc65 100644 --- a/examples/sysc/pipe/stage2.cpp +++ b/examples/sysc/pipe/stage2.cpp @@ -35,7 +35,8 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; #include "stage2.h" //definition of multdiv method diff --git a/examples/sysc/pipe/stage3.cpp b/examples/sysc/pipe/stage3.cpp index 739327e9f..3f798c9ed 100644 --- a/examples/sysc/pipe/stage3.cpp +++ b/examples/sysc/pipe/stage3.cpp @@ -35,7 +35,8 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; #include "stage3.h" //Definition of power method diff --git a/examples/sysc/pkt_switch/fifo.h b/examples/sysc/pkt_switch/fifo.h index ced047a68..dabd495fd 100644 --- a/examples/sysc/pkt_switch/fifo.h +++ b/examples/sysc/pkt_switch/fifo.h @@ -38,7 +38,10 @@ #ifndef FIFO_H_INCLUDED #define FIFO_H_INCLUDED -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::ostream; #include "pkt.h" struct fifo { diff --git a/examples/sysc/pkt_switch/main.cpp b/examples/sysc/pkt_switch/main.cpp index 1f7f6c38a..8061fb79f 100644 --- a/examples/sysc/pkt_switch/main.cpp +++ b/examples/sysc/pkt_switch/main.cpp @@ -36,7 +36,10 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::ostream; #include "pkt.h" #include "switch_clk.h" #include "sender.h" diff --git a/examples/sysc/pkt_switch/pkt.h b/examples/sysc/pkt_switch/pkt.h index 442f2b28b..6ec3b3cf1 100644 --- a/examples/sysc/pkt_switch/pkt.h +++ b/examples/sysc/pkt_switch/pkt.h @@ -37,7 +37,10 @@ #ifndef PKT_H_INCLUDED #define PKT_H_INCLUDED -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::ostream; struct pkt { sc_int<8> data; diff --git a/examples/sysc/pkt_switch/receiver.cpp b/examples/sysc/pkt_switch/receiver.cpp index dbe3891b6..803e06de1 100644 --- a/examples/sysc/pkt_switch/receiver.cpp +++ b/examples/sysc/pkt_switch/receiver.cpp @@ -37,6 +37,8 @@ *****************************************************************************/ #include "receiver.h" +using std::cout; +using std::endl; void receiver:: entry() diff --git a/examples/sysc/pkt_switch/receiver.h b/examples/sysc/pkt_switch/receiver.h index bcab71d77..fbf5ca8c7 100644 --- a/examples/sysc/pkt_switch/receiver.h +++ b/examples/sysc/pkt_switch/receiver.h @@ -39,7 +39,10 @@ #ifndef RECEIVER_H_INCLUDED #define RECEIVER_H_INCLUDED -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::ostream; #include "pkt.h" struct receiver: sc_module { diff --git a/examples/sysc/pkt_switch/sender.cpp b/examples/sysc/pkt_switch/sender.cpp index 363813c2b..97ea754f6 100644 --- a/examples/sysc/pkt_switch/sender.cpp +++ b/examples/sysc/pkt_switch/sender.cpp @@ -40,6 +40,8 @@ #include #include #include "sender.h" +using std::cout; +using std::endl; void sender:: entry() { diff --git a/examples/sysc/pkt_switch/sender.h b/examples/sysc/pkt_switch/sender.h index 025b55775..83a0bc01e 100644 --- a/examples/sysc/pkt_switch/sender.h +++ b/examples/sysc/pkt_switch/sender.h @@ -38,7 +38,10 @@ #ifndef SENDER_H_INCLUDED #define SENDER_H_INCLUDED -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::ostream; #include "pkt.h" struct sender: sc_module { diff --git a/examples/sysc/pkt_switch/switch.cpp b/examples/sysc/pkt_switch/switch.cpp index b8b1750b9..de9bb08f6 100644 --- a/examples/sysc/pkt_switch/switch.cpp +++ b/examples/sysc/pkt_switch/switch.cpp @@ -36,7 +36,13 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::cout; +using std::endl; +using std::free; +using std::ostream; #include "pkt.h" #include "switch.h" #include "fifo.h" diff --git a/examples/sysc/pkt_switch/switch.h b/examples/sysc/pkt_switch/switch.h index 8a4fbe8f7..6a73b897f 100644 --- a/examples/sysc/pkt_switch/switch.h +++ b/examples/sysc/pkt_switch/switch.h @@ -38,7 +38,10 @@ #ifndef SWITCH_H_INCLUDED #define SWITCH_H_INCLUDED -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::ostream; #include "pkt.h" struct mcast_pkt_switch : sc_module { diff --git a/examples/sysc/pkt_switch/switch_clk.h b/examples/sysc/pkt_switch/switch_clk.h index 6d09a659b..6d5aa9b3b 100644 --- a/examples/sysc/pkt_switch/switch_clk.h +++ b/examples/sysc/pkt_switch/switch_clk.h @@ -39,7 +39,8 @@ #ifndef SWITCH_CLK_H_INCLUDED #define SWITCH_CLK_H_INCLUDED -#include "systemc.h" +#include +using namespace sc_core; struct switch_clk: sc_module { sc_out switch_cntrl; diff --git a/examples/sysc/risc_cpu/bios.cpp b/examples/sysc/risc_cpu/bios.cpp index 29337719d..bb1397b70 100644 --- a/examples/sysc/risc_cpu/bios.cpp +++ b/examples/sysc/risc_cpu/bios.cpp @@ -36,7 +36,15 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::FILE; +using std::cout; +using std::endl; +using std::fopen; +using std::fscanf; +using std::ios; +using std::printf; #include "bios.h" #include "directive.h" diff --git a/examples/sysc/risc_cpu/dcache.cpp b/examples/sysc/risc_cpu/dcache.cpp index a69036aea..4d43c29e0 100644 --- a/examples/sysc/risc_cpu/dcache.cpp +++ b/examples/sysc/risc_cpu/dcache.cpp @@ -36,7 +36,14 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::FILE; +using std::cout; +using std::endl; +using std::fopen; +using std::fscanf; +using std::printf; #include "dcache.h" #include "directive.h" diff --git a/examples/sysc/risc_cpu/decode.cpp b/examples/sysc/risc_cpu/decode.cpp index c11de67f1..480956211 100644 --- a/examples/sysc/risc_cpu/decode.cpp +++ b/examples/sysc/risc_cpu/decode.cpp @@ -37,7 +37,12 @@ #include // for definition on value 's MAX -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; +using std::ios; +using std::printf; #include "decode.h" #include "directive.h" diff --git a/examples/sysc/risc_cpu/exec.cpp b/examples/sysc/risc_cpu/exec.cpp index 535bc9364..73ab1cc68 100644 --- a/examples/sysc/risc_cpu/exec.cpp +++ b/examples/sysc/risc_cpu/exec.cpp @@ -36,7 +36,11 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; +using std::printf; #include "exec.h" #include "directive.h" diff --git a/examples/sysc/risc_cpu/fetch.cpp b/examples/sysc/risc_cpu/fetch.cpp index 41b81122e..b1df2afad 100644 --- a/examples/sysc/risc_cpu/fetch.cpp +++ b/examples/sysc/risc_cpu/fetch.cpp @@ -36,7 +36,12 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; +using std::ios; +using std::printf; #include "fetch.h" #include "directive.h" diff --git a/examples/sysc/risc_cpu/floating.cpp b/examples/sysc/risc_cpu/floating.cpp index f0b0fdabb..00130e61e 100644 --- a/examples/sysc/risc_cpu/floating.cpp +++ b/examples/sysc/risc_cpu/floating.cpp @@ -36,7 +36,11 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; +using std::printf; #include "floating.h" #include "directive.h" diff --git a/examples/sysc/risc_cpu/icache.cpp b/examples/sysc/risc_cpu/icache.cpp index c6bb98ad8..8837d6eac 100644 --- a/examples/sysc/risc_cpu/icache.cpp +++ b/examples/sysc/risc_cpu/icache.cpp @@ -39,7 +39,15 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::FILE; +using std::cout; +using std::endl; +using std::fopen; +using std::fscanf; +using std::ios; +using std::printf; #include "icache.h" #include "directive.h" diff --git a/examples/sysc/risc_cpu/main.cpp b/examples/sysc/risc_cpu/main.cpp index 9f7f0ec92..b853c764b 100644 --- a/examples/sysc/risc_cpu/main.cpp +++ b/examples/sysc/risc_cpu/main.cpp @@ -40,7 +40,14 @@ #include "directive.h" -#include "systemc.h" +#include +using namespace sc_core; +using std::FILE; +using std::cout; +using std::endl; +using std::fopen; +using std::fscanf; +using std::printf; #include "bios.h" #include "paging.h" #include "icache.h" diff --git a/examples/sysc/risc_cpu/mmxu.cpp b/examples/sysc/risc_cpu/mmxu.cpp index 60af7b085..ce03508ce 100644 --- a/examples/sysc/risc_cpu/mmxu.cpp +++ b/examples/sysc/risc_cpu/mmxu.cpp @@ -36,7 +36,12 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; +using std::ios; +using std::printf; #include "mmxu.h" #include "directive.h" diff --git a/examples/sysc/risc_cpu/paging.cpp b/examples/sysc/risc_cpu/paging.cpp index b9763b3ae..13c1aa98d 100644 --- a/examples/sysc/risc_cpu/paging.cpp +++ b/examples/sysc/risc_cpu/paging.cpp @@ -36,7 +36,11 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; +using std::cout; +using std::endl; +using std::printf; #include "paging.h" #include "directive.h" diff --git a/examples/sysc/risc_cpu/pic.cpp b/examples/sysc/risc_cpu/pic.cpp index d24b64618..8a596bb02 100644 --- a/examples/sysc/risc_cpu/pic.cpp +++ b/examples/sysc/risc_cpu/pic.cpp @@ -36,7 +36,8 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; #include "pic.h" void pic::entry(){ diff --git a/examples/sysc/rsa/rsa.cpp b/examples/sysc/rsa/rsa.cpp index f113fa12b..5db889770 100644 --- a/examples/sysc/rsa/rsa.cpp +++ b/examples/sysc/rsa/rsa.cpp @@ -66,7 +66,15 @@ #include #include #include // drand48, srand48 -#include "systemc.h" +#include +using namespace sc_core; +using namespace sc_dt; +using std::atoi; +using std::cout; +using std::endl; +using std::rand; +using std::size_t; +using std::srand; #define DEBUG_SYSTEMC // #undef this to disable assertions. diff --git a/examples/sysc/simple_bus/simple_bus.h b/examples/sysc/simple_bus/simple_bus.h index 69ff67a31..eb601fa51 100644 --- a/examples/sysc/simple_bus/simple_bus.h +++ b/examples/sysc/simple_bus/simple_bus.h @@ -44,7 +44,9 @@ #ifndef __simple_bus_h #define __simple_bus_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" #include "simple_bus_request.h" diff --git a/examples/sysc/simple_bus/simple_bus_arbiter.h b/examples/sysc/simple_bus/simple_bus_arbiter.h index f599030b9..e7a9f91b4 100644 --- a/examples/sysc/simple_bus/simple_bus_arbiter.h +++ b/examples/sysc/simple_bus/simple_bus_arbiter.h @@ -38,7 +38,9 @@ #ifndef __simple_bus_arbiter_h #define __simple_bus_arbiter_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" #include "simple_bus_request.h" diff --git a/examples/sysc/simple_bus/simple_bus_arbiter_if.h b/examples/sysc/simple_bus/simple_bus_arbiter_if.h index c97b0b254..270ffeb38 100644 --- a/examples/sysc/simple_bus/simple_bus_arbiter_if.h +++ b/examples/sysc/simple_bus/simple_bus_arbiter_if.h @@ -38,7 +38,9 @@ #ifndef __simple_bus_arbiter_if_h #define __simple_bus_arbiter_if_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" diff --git a/examples/sysc/simple_bus/simple_bus_blocking_if.h b/examples/sysc/simple_bus/simple_bus_blocking_if.h index e8e14b302..179b2a41c 100644 --- a/examples/sysc/simple_bus/simple_bus_blocking_if.h +++ b/examples/sysc/simple_bus/simple_bus_blocking_if.h @@ -38,7 +38,9 @@ #ifndef __simple_bus_blocking_if_h #define __simple_bus_blocking_if_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" diff --git a/examples/sysc/simple_bus/simple_bus_direct_if.h b/examples/sysc/simple_bus/simple_bus_direct_if.h index 5dbadaef9..f83e31d1a 100644 --- a/examples/sysc/simple_bus/simple_bus_direct_if.h +++ b/examples/sysc/simple_bus/simple_bus_direct_if.h @@ -38,7 +38,8 @@ #ifndef __simple_bus_direct_if_h #define __simple_bus_direct_if_h -#include +#include +using namespace sc_core; class simple_bus_direct_if : public virtual sc_interface diff --git a/examples/sysc/simple_bus/simple_bus_fast_mem.h b/examples/sysc/simple_bus/simple_bus_fast_mem.h index a1e8b0809..4dd2ef00e 100644 --- a/examples/sysc/simple_bus/simple_bus_fast_mem.h +++ b/examples/sysc/simple_bus/simple_bus_fast_mem.h @@ -38,7 +38,9 @@ #ifndef __simple_bus_fast_mem_h #define __simple_bus_fast_mem_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" #include "simple_bus_slave_if.h" diff --git a/examples/sysc/simple_bus/simple_bus_main.cpp b/examples/sysc/simple_bus/simple_bus_main.cpp index 05e4bac2e..e130d6d66 100644 --- a/examples/sysc/simple_bus/simple_bus_main.cpp +++ b/examples/sysc/simple_bus/simple_bus_main.cpp @@ -35,7 +35,8 @@ *****************************************************************************/ -#include "systemc.h" +#include +using namespace sc_core; #include "simple_bus_test.h" int sc_main(int, char **) diff --git a/examples/sysc/simple_bus/simple_bus_master_blocking.h b/examples/sysc/simple_bus/simple_bus_master_blocking.h index 0a01e67ca..36388c3aa 100644 --- a/examples/sysc/simple_bus/simple_bus_master_blocking.h +++ b/examples/sysc/simple_bus/simple_bus_master_blocking.h @@ -38,7 +38,9 @@ #ifndef __simple_bus_master_blocking_h #define __simple_bus_master_blocking_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" #include "simple_bus_blocking_if.h" diff --git a/examples/sysc/simple_bus/simple_bus_master_direct.h b/examples/sysc/simple_bus/simple_bus_master_direct.h index 449c96263..4a9b80d77 100644 --- a/examples/sysc/simple_bus/simple_bus_master_direct.h +++ b/examples/sysc/simple_bus/simple_bus_master_direct.h @@ -39,7 +39,8 @@ #ifndef __simple_bus_master_direct_h #define __simple_bus_master_direct_h -#include +#include +using namespace sc_core; #include "simple_bus_direct_if.h" diff --git a/examples/sysc/simple_bus/simple_bus_master_non_blocking.h b/examples/sysc/simple_bus/simple_bus_master_non_blocking.h index 7120b3a4e..32e99c497 100644 --- a/examples/sysc/simple_bus/simple_bus_master_non_blocking.h +++ b/examples/sysc/simple_bus/simple_bus_master_non_blocking.h @@ -39,7 +39,9 @@ #ifndef __simple_bus_master_non_blocking_h #define __simple_bus_master_non_blocking_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" #include "simple_bus_non_blocking_if.h" diff --git a/examples/sysc/simple_bus/simple_bus_non_blocking_if.h b/examples/sysc/simple_bus/simple_bus_non_blocking_if.h index 44e3c6318..1d78d2383 100644 --- a/examples/sysc/simple_bus/simple_bus_non_blocking_if.h +++ b/examples/sysc/simple_bus/simple_bus_non_blocking_if.h @@ -38,7 +38,9 @@ #ifndef __simple_bus_non_blocking_if_h #define __simple_bus_non_blocking_if_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" diff --git a/examples/sysc/simple_bus/simple_bus_slave_if.h b/examples/sysc/simple_bus/simple_bus_slave_if.h index b46c8c453..1b43d6db2 100644 --- a/examples/sysc/simple_bus/simple_bus_slave_if.h +++ b/examples/sysc/simple_bus/simple_bus_slave_if.h @@ -38,7 +38,9 @@ #ifndef __simple_bus_slave_if_h #define __simple_bus_slave_if_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" #include "simple_bus_direct_if.h" diff --git a/examples/sysc/simple_bus/simple_bus_slow_mem.h b/examples/sysc/simple_bus/simple_bus_slow_mem.h index 3bca468dc..8969e52ad 100644 --- a/examples/sysc/simple_bus/simple_bus_slow_mem.h +++ b/examples/sysc/simple_bus/simple_bus_slow_mem.h @@ -38,7 +38,9 @@ #ifndef __simple_bus_slow_mem_h #define __simple_bus_slow_mem_h -#include +#include +using namespace sc_core; +using std::FILE; #include "simple_bus_types.h" #include "simple_bus_slave_if.h" diff --git a/examples/sysc/simple_bus/simple_bus_test.h b/examples/sysc/simple_bus/simple_bus_test.h index 2d836ed80..ac3f36ba6 100644 --- a/examples/sysc/simple_bus/simple_bus_test.h +++ b/examples/sysc/simple_bus/simple_bus_test.h @@ -38,7 +38,8 @@ #ifndef __simple_bus_test_h #define __simple_bus_test_h -#include +#include +using namespace sc_core; #include "simple_bus_master_blocking.h" #include "simple_bus_master_non_blocking.h" diff --git a/examples/sysc/simple_bus/simple_bus_types.h b/examples/sysc/simple_bus/simple_bus_types.h index 4d3155d89..46ca848ad 100644 --- a/examples/sysc/simple_bus/simple_bus_types.h +++ b/examples/sysc/simple_bus/simple_bus_types.h @@ -39,7 +39,9 @@ #define __simple_bus_types_h #include -#include +#include +using namespace sc_core; +using std::FILE; enum simple_bus_status { SIMPLE_BUS_OK = 0 , SIMPLE_BUS_REQUEST diff --git a/examples/sysc/simple_fifo/simple_fifo.cpp b/examples/sysc/simple_fifo/simple_fifo.cpp index 4880f2f57..f379e740a 100644 --- a/examples/sysc/simple_fifo/simple_fifo.cpp +++ b/examples/sysc/simple_fifo/simple_fifo.cpp @@ -40,7 +40,11 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using std::cout; +using std::endl; +using std::flush; class write_if : virtual public sc_interface { diff --git a/examples/sysc/simple_perf/simple_perf.cpp b/examples/sysc/simple_perf/simple_perf.cpp index bcfe40760..eb87c063a 100644 --- a/examples/sysc/simple_perf/simple_perf.cpp +++ b/examples/sysc/simple_perf/simple_perf.cpp @@ -84,7 +84,12 @@ *****************************************************************************/ -#include +#include +using namespace sc_core; +using std::atoi; +using std::cout; +using std::endl; +using std::rand; class write_if : virtual public sc_interface {