├── .gitignore ├── CMakeLists.txt ├── LICENSE.txt ├── README.md ├── SECURITY.md ├── cmake ├── CMakeLists.top ├── SVCConfig.cmake.in ├── setenv.sh └── svc_target.cmake ├── components └── common │ ├── sct_assert.patch │ ├── sctcommon │ ├── sct_assert.h │ ├── sct_buffer.h │ ├── sct_clock.h │ ├── sct_comb_signal.h │ ├── sct_common.h │ ├── sct_fifo.h │ ├── sct_initiator.h │ ├── sct_ipc_if.h │ ├── sct_pipe.h │ ├── sct_ports.h │ ├── sct_prim_fifo.h │ ├── sct_prim_signal.h │ ├── sct_property.h │ ├── sct_register.h │ ├── sct_sel_type.h │ ├── sct_signal.h │ ├── sct_static_log.h │ ├── sct_target.h │ ├── sct_utils.h │ └── sct_zero_width.h │ └── test │ ├── CMakeLists.txt │ ├── sct_assert │ ├── CMakeLists.txt │ ├── sc_main.cpp │ └── sc_main2.cpp │ ├── sct_fifo_shared │ ├── CMakeLists.txt │ ├── check_size_test.h │ ├── method_sig_test.h │ ├── method_test.h │ ├── sc_main.cpp │ ├── thread_multi_put_test.h │ └── thread_test.h │ ├── sct_pipe │ ├── CMakeLists.txt │ ├── sc_main.cpp │ └── single_test.h │ └── sct_simple │ ├── CMakeLists.txt │ ├── bput_test.h │ ├── clkres_traits_test.h │ ├── def_traits_test.h │ ├── method_sig_test.h │ ├── method_test.h │ ├── multi_state_thread.h │ ├── sc_main.cpp │ ├── sc_main2.cpp │ ├── targ_vect.h │ ├── thread_multi_put_test.h │ └── thread_test.h ├── contributing.md ├── designs ├── examples │ ├── CMakeLists.txt │ ├── asserts │ │ ├── CMakeLists.txt │ │ ├── imm_assert.cpp │ │ └── temp_assert.cpp │ ├── counter │ │ ├── CMakeLists.txt │ │ ├── dut.h │ │ └── example.cpp │ ├── decoder │ │ ├── CMakeLists.txt │ │ ├── dut.h │ │ └── example.cpp │ ├── dm_paranut │ │ ├── CMakeLists.txt │ │ ├── base.cpp │ │ ├── base.h │ │ ├── debug_rom.h │ │ ├── dm.cpp │ │ ├── dm.h │ │ ├── dm_tb.cpp │ │ └── paranut-config.h │ ├── dma │ │ ├── CMakeLists.txt │ │ ├── GenDma_sc.h │ │ ├── GenDma_tb.cpp │ │ └── register.h │ ├── dvcon20 │ │ ├── AdvFifo.h │ │ ├── CMakeLists.txt │ │ ├── dvcon_fifo.sv │ │ ├── dvcon_simple.sv │ │ ├── test_fifo.cpp │ │ └── test_simple.cpp │ ├── fsm │ │ ├── CMakeLists.txt │ │ ├── dut.h │ │ └── example.cpp │ ├── int_error │ │ ├── CMakeLists.txt │ │ └── example.cpp │ ├── intrinsic │ │ ├── CMakeLists.txt │ │ └── verilog_intrinsic.cpp │ ├── latch_ff │ │ ├── CMakeLists.txt │ │ ├── dut.h │ │ └── example.cpp │ ├── sct_always_ready │ │ ├── CMakeLists.txt │ │ ├── method_test.h │ │ ├── sc_main.cpp │ │ ├── sct_always_ready_meth.sv │ │ ├── sct_always_ready_thread.sv │ │ └── thread_test.h │ ├── sct_fifo │ │ ├── CMakeLists.txt │ │ ├── fifo_shared.h │ │ ├── fifo_single.h │ │ ├── sc_main.cpp │ │ ├── sct_fifo_shared.sv │ │ ├── sct_fifo_single.sv │ │ ├── sct_target_fifo.sv │ │ └── target_fifo.h │ ├── sct_initiator │ │ ├── CMakeLists.txt │ │ ├── sc_main.cpp │ │ ├── sct_initiator_thread.sv │ │ └── thread_test.h │ ├── sct_signal │ │ ├── CMakeLists.txt │ │ ├── sc_main.cpp │ │ ├── sct_in_out_ports.sv │ │ ├── sct_signal.sv │ │ ├── signal_port_test.h │ │ └── signal_thrd_test.h │ └── sct_target │ │ ├── CMakeLists.txt │ │ ├── method_test.h │ │ ├── sc_main.cpp │ │ └── sct_target_method.sv ├── single_source │ ├── CMakeLists.txt │ ├── sct_fifo_shared │ │ ├── method_test.h │ │ ├── sc_main.cpp │ │ └── thread_test.h │ ├── sct_pipe │ │ ├── sc_main.cpp │ │ └── single_test.h │ ├── sct_simple │ │ ├── bput_test.h │ │ ├── method_test.h │ │ ├── sc_main.cpp │ │ ├── targ_vect.h │ │ └── thread_test.h │ ├── ss_fifo_shared_meth.sv │ ├── ss_fifo_shared_thread.sv │ ├── ss_pipe_single.sv │ ├── ss_simple_bput.sv │ ├── ss_simple_method.sv │ ├── ss_simple_targ_vect.sv │ └── ss_simple_thread.sv ├── template │ ├── CMakeLists.txt │ ├── dut.h │ └── example.cpp └── tests │ ├── CMakeLists.txt │ ├── const_prop │ ├── CMakeLists.txt │ ├── const_negative.sv │ ├── test_const_negative.cpp │ ├── test_const_prop_basic.cpp │ ├── test_const_prop_cthread.cpp │ ├── test_const_prop_cthread_wait_return.cpp │ ├── test_const_prop_dead_state.cpp │ ├── test_const_prop_deep_fork.cpp │ ├── test_const_prop_deep_wait.cpp │ ├── test_const_prop_dowhile.cpp │ ├── test_const_prop_eval_stmts.cpp │ ├── test_const_prop_fcall_simple.cpp │ ├── test_const_prop_float.cpp │ ├── test_const_prop_fork_break.cpp │ ├── test_const_prop_fork_continue.cpp │ ├── test_const_prop_fork_inner_loop.cpp │ ├── test_const_prop_fork_return.cpp │ ├── test_const_prop_inner_loop_wait.cpp │ ├── test_const_prop_logic_term.cpp │ ├── test_const_prop_loops.cpp │ ├── test_const_prop_many_forks.cpp │ ├── test_const_prop_multiple_inheritance.cpp │ ├── test_const_prop_recursive.cpp │ ├── test_const_prop_sc_dt.cpp │ ├── test_const_prop_sc_dt_unsupported.cpp │ ├── test_const_prop_stop_wait.cpp │ ├── test_const_prop_switch.cpp │ ├── test_const_prop_unknown_iters.cpp │ ├── test_const_prop_virtual_calls.cpp │ ├── test_const_prop_virtual_inheritance.cpp │ └── test_nonsynth_cant_unroll.cpp │ ├── cthread │ ├── CMakeLists.txt │ ├── bhv_fifo.sv │ ├── cthread_alive_loop.sv │ ├── cthread_array.sv │ ├── cthread_array_access.sv │ ├── cthread_array_comb_reg.sv │ ├── cthread_break.sv │ ├── cthread_break_via_func.sv │ ├── cthread_concat.sv │ ├── cthread_const_array.sv │ ├── cthread_const_prop.sv │ ├── cthread_continue.sv │ ├── cthread_do_while.sv │ ├── cthread_do_while_always1.sv │ ├── cthread_do_while_const.sv │ ├── cthread_do_while_other_types.sv │ ├── cthread_duplicate_states.sv │ ├── cthread_fcall.sv │ ├── cthread_fcall_const_eval.sv │ ├── cthread_fcall_in_reset.sv │ ├── cthread_fcall_ref.sv │ ├── cthread_for.sv │ ├── cthread_for_cntr_scint.sv │ ├── cthread_for_if.sv │ ├── cthread_for_other_types.sv │ ├── cthread_if.sv │ ├── cthread_if_const.sv │ ├── cthread_initvar_inf_loop.sv │ ├── cthread_inner_loops.sv │ ├── cthread_mif_array_differ.sv │ ├── cthread_mod_array_differ.sv │ ├── cthread_mult_resets.sv │ ├── cthread_multi_wait_reset.sv │ ├── cthread_multiwait.sv │ ├── cthread_pointer_to_bool.sv │ ├── cthread_pointers.sv │ ├── cthread_read_defined.sv │ ├── cthread_read_defined_0.sv │ ├── cthread_read_defined_1.sv │ ├── cthread_read_defined_2.sv │ ├── cthread_read_defined_3.sv │ ├── cthread_read_defined_param1.sv │ ├── cthread_read_defined_param2.sv │ ├── cthread_read_defined_param3.sv │ ├── cthread_read_defined_param4.sv │ ├── cthread_read_defined_ref.sv │ ├── cthread_read_defined_unknown.sv │ ├── cthread_read_only.sv │ ├── cthread_redundant_code.sv │ ├── cthread_reset.sv │ ├── cthread_reset_after.sv │ ├── cthread_reset_fail.sv │ ├── cthread_reset_noninit_read.sv │ ├── cthread_reset_warning.sv │ ├── cthread_return.sv │ ├── cthread_sel_bit.sv │ ├── cthread_sel_range.sv │ ├── cthread_simple.sv │ ├── cthread_simple2.sv │ ├── cthread_simple_reset.sv │ ├── cthread_switch.sv │ ├── cthread_switch_after.sv │ ├── cthread_switch_default.sv │ ├── cthread_switch_empty_case.sv │ ├── cthread_switch_inside.sv │ ├── cthread_sync_async_reset.sv │ ├── cthread_var_comb.sv │ ├── cthread_var_const.sv │ ├── cthread_var_multiple_use.sv │ ├── cthread_var_ref.sv │ ├── cthread_var_reg.sv │ ├── cthread_var_reset.sv │ ├── cthread_varname.sv │ ├── cthread_virtual_wait.sv │ ├── cthread_wait_n.sv │ ├── cthread_wait_states.sv │ ├── cthread_while.sv │ ├── cthread_while_const.sv │ ├── cthread_while_other_types.sv │ ├── rtl_fifo.sv │ ├── simple_fsm.sv │ ├── test_bhv_fifo.cpp │ ├── test_break.cpp │ ├── test_continue.cpp │ ├── test_cthread_alive_loop.cpp │ ├── test_cthread_array.cpp │ ├── test_cthread_array_access.cpp │ ├── test_cthread_array_comb_reg.cpp │ ├── test_cthread_break_via_func.cpp │ ├── test_cthread_concat.cpp │ ├── test_cthread_const_array.cpp │ ├── test_cthread_const_fail.cpp │ ├── test_cthread_const_prop.cpp │ ├── test_cthread_duplicate_states.cpp │ ├── test_cthread_fcall.cpp │ ├── test_cthread_fcall_const_eval.cpp │ ├── test_cthread_for.cpp │ ├── test_cthread_for_cntr_scint.cpp │ ├── test_cthread_for_if.cpp │ ├── test_cthread_for_other_types.cpp │ ├── test_cthread_initvar_inf_loop.cpp │ ├── test_cthread_inner_loops.cpp │ ├── test_cthread_loop_fail.cpp │ ├── test_cthread_loop_fail2.cpp │ ├── test_cthread_loop_fail3.cpp │ ├── test_cthread_loop_fail4.cpp │ ├── test_cthread_loop_fail5.cpp │ ├── test_cthread_loop_fail6.cpp │ ├── test_cthread_loop_fail7.cpp │ ├── test_cthread_mult_resets.cpp │ ├── test_cthread_multi_wait_reset.cpp │ ├── test_cthread_read_defined.cpp │ ├── test_cthread_read_defined_0.cpp │ ├── test_cthread_read_defined_1.cpp │ ├── test_cthread_read_defined_2.cpp │ ├── test_cthread_read_defined_3.cpp │ ├── test_cthread_read_defined_param1.cpp │ ├── test_cthread_read_defined_param2.cpp │ ├── test_cthread_read_defined_param3.cpp │ ├── test_cthread_read_defined_param4.cpp │ ├── test_cthread_read_defined_ref.cpp │ ├── test_cthread_read_defined_unknown.cpp │ ├── test_cthread_read_only.cpp │ ├── test_cthread_reset.cpp │ ├── test_cthread_reset_after.cpp │ ├── test_cthread_reset_fail.cpp │ ├── test_cthread_reset_warning.cpp │ ├── test_cthread_sel_bit.cpp │ ├── test_cthread_sel_range.cpp │ ├── test_cthread_simple.cpp │ ├── test_cthread_simple2.cpp │ ├── test_cthread_simple_reset.cpp │ ├── test_cthread_switch.cpp │ ├── test_cthread_switch_after.cpp │ ├── test_cthread_switch_default.cpp │ ├── test_cthread_switch_empty_case.cpp │ ├── test_cthread_switch_inside.cpp │ ├── test_cthread_sync_async_reset.cpp │ ├── test_cthread_var_comb.cpp │ ├── test_cthread_var_const.cpp │ ├── test_cthread_var_multiple_use.cpp │ ├── test_cthread_var_ref.cpp │ ├── test_cthread_var_reg.cpp │ ├── test_cthread_var_reset.cpp │ ├── test_cthread_varname.cpp │ ├── test_cthread_virtual_wait.cpp │ ├── test_cthread_wait_n.cpp │ ├── test_cthread_wait_n_fail.cpp │ ├── test_cthread_wait_n_fail2.cpp │ ├── test_cthread_wait_states.cpp │ ├── test_do_while.cpp │ ├── test_do_while_always1.cpp │ ├── test_do_while_const.cpp │ ├── test_do_while_other_types.cpp │ ├── test_fcall_in_reset.cpp │ ├── test_fcall_loop_fail.cpp │ ├── test_fcall_ref.cpp │ ├── test_if.cpp │ ├── test_if_const.cpp │ ├── test_mif_array_differ.cpp │ ├── test_mod_array_differ.cpp │ ├── test_no_reset_fail.cpp │ ├── test_pointer_to_bool.cpp │ ├── test_pointers.cpp │ ├── test_reset_noninit_read.cpp │ ├── test_return.cpp │ ├── test_rtl_fifo.cpp │ ├── test_while.cpp │ ├── test_while_const.cpp │ └── test_while_other_types.cpp │ ├── method │ ├── CMakeLists.txt │ ├── method_array.sv │ ├── method_array_in_if.sv │ ├── method_array_init.sv │ ├── method_array_param.sv │ ├── method_array_return.sv │ ├── method_array_unknown.sv │ ├── method_auto_type.sv │ ├── method_binary.sv │ ├── method_binary_expr_signed.sv │ ├── method_binary_sc_types.sv │ ├── method_binary_signed.sv │ ├── method_bit_range_access.sv │ ├── method_bitwise_compl.sv │ ├── method_bool.sv │ ├── method_break.sv │ ├── method_cast.sv │ ├── method_clock_sensitive.sv │ ├── method_compound.sv │ ├── method_concat.sv │ ├── method_cond_cast.sv │ ├── method_cond_oper.sv │ ├── method_cond_side_effect.sv │ ├── method_const.sv │ ├── method_const_array.sv │ ├── method_const_binary.sv │ ├── method_const_compl_cond.sv │ ├── method_const_cond_narrow.sv │ ├── method_const_if.sv │ ├── method_const_if2.sv │ ├── method_const_liter.sv │ ├── method_const_liter_compound.sv │ ├── method_const_prop.sv │ ├── method_const_prop_loop.sv │ ├── method_const_prop_range.sv │ ├── method_const_static_mem.sv │ ├── method_continue.sv │ ├── method_decoder.sv │ ├── method_dowhile.sv │ ├── method_dowhile_other.sv │ ├── method_empty_sensvty.sv │ ├── method_enum.sv │ ├── method_explicit_specialz_templ.sv │ ├── method_explicit_type_conv.sv │ ├── method_fcall.sv │ ├── method_fcall_base.sv │ ├── method_fcall_const_eval.sv │ ├── method_fcall_const_eval2.sv │ ├── method_fcall_ref.sv │ ├── method_fcall_ref_arr_unkwn.sv │ ├── method_ff_latch.sv │ ├── method_for.sv │ ├── method_for_fcall.sv │ ├── method_forloop_other_types.sv │ ├── method_generic_fcall.sv │ ├── method_if.sv │ ├── method_latch.sv │ ├── method_level1.sv │ ├── method_level2.sv │ ├── method_level_error.sv │ ├── method_liter_width.sv │ ├── method_mix_signed_unsigned_types.sv │ ├── method_non_sensvty.sv │ ├── method_pointers.sv │ ├── method_port_array_bind.sv │ ├── method_return.sv │ ├── method_sc_bv.sv │ ├── method_sc_int_const_array.sv │ ├── method_sc_types.sv │ ├── method_shift_type_ext.sv │ ├── method_shifts_signed.sv │ ├── method_sig_array_access.sv │ ├── method_standard_collection.sv │ ├── method_std_array.sv │ ├── method_stdouts_prints.sv │ ├── method_string_liter.sv │ ├── method_switch.sv │ ├── method_switch_after.sv │ ├── method_switch_const.sv │ ├── method_switch_empty_case.sv │ ├── method_switch_enum.sv │ ├── method_switch_inside.sv │ ├── method_trace.sv │ ├── method_unary.sv │ ├── method_unary_sc.sv │ ├── method_var.sv │ ├── method_var_multiple_use.sv │ ├── method_var_multiple_use2.sv │ ├── method_var_multiple_use3.sv │ ├── method_var_ref.sv │ ├── method_var_ref_arr_unkwn.sv │ ├── method_var_usedef_same_proc.sv │ ├── method_virtual1.sv │ ├── method_virtual2.sv │ ├── method_virtual3.sv │ ├── method_virtual4.sv │ ├── method_virtual_cast.sv │ ├── method_virtual_field.sv │ ├── method_virtual_pure.sv │ ├── method_vname.sv │ ├── method_while.sv │ ├── method_while_const.sv │ ├── method_while_other.sv │ ├── test_array.cpp │ ├── test_array_in_if.cpp │ ├── test_array_init.cpp │ ├── test_array_param.cpp │ ├── test_array_return.cpp │ ├── test_array_return_fail.cpp │ ├── test_array_unknown.cpp │ ├── test_auto_type.cpp │ ├── test_binary.cpp │ ├── test_binary_expr_signed.cpp │ ├── test_binary_sc_types.cpp │ ├── test_binary_signed.cpp │ ├── test_binary_signed_fail.cpp │ ├── test_bit_range_access.cpp │ ├── test_bit_range_fail.cpp │ ├── test_bitwise_compl.cpp │ ├── test_bitwise_not_bool_fail.cpp │ ├── test_bool.cpp │ ├── test_break.cpp │ ├── test_cast.cpp │ ├── test_child_module.cpp │ ├── test_clock_sensitive.cpp │ ├── test_compound.cpp │ ├── test_concat.cpp │ ├── test_concat_fail.cpp │ ├── test_cond_cast.cpp │ ├── test_cond_oper.cpp │ ├── test_cond_side_effect.cpp │ ├── test_const.cpp │ ├── test_const_array.cpp │ ├── test_const_binary.cpp │ ├── test_const_compl_cond.cpp │ ├── test_const_cond_narrow.cpp │ ├── test_const_fail.cpp │ ├── test_const_if.cpp │ ├── test_const_if2.cpp │ ├── test_const_liter.cpp │ ├── test_const_liter_compound.cpp │ ├── test_const_prop.cpp │ ├── test_const_prop_fail.cpp │ ├── test_const_prop_fail2.cpp │ ├── test_const_prop_loop.cpp │ ├── test_const_prop_range.cpp │ ├── test_const_static_mem.cpp │ ├── test_continue.cpp │ ├── test_decoder.cpp │ ├── test_dowhile.cpp │ ├── test_dowhile_other.cpp │ ├── test_empty_sensvty.cpp │ ├── test_empty_sensvty1_fail.cpp │ ├── test_empty_sensvty2_fail.cpp │ ├── test_empty_sensvty3_fail.cpp │ ├── test_empty_sensvty4_fail.cpp │ ├── test_empty_sensvty_dupl_fail.cpp │ ├── test_enum.cpp │ ├── test_explicit_specialz_templ.cpp │ ├── test_explicit_type_conv.cpp │ ├── test_fcall.cpp │ ├── test_fcall_base.cpp │ ├── test_fcall_const_eval.cpp │ ├── test_fcall_const_eval2.cpp │ ├── test_fcall_ref.cpp │ ├── test_fcall_ref_arr_unkwn.cpp │ ├── test_ff_latch.cpp │ ├── test_for.cpp │ ├── test_for_fcall_fail.cpp │ ├── test_forloop_other_types.cpp │ ├── test_generic_fcall.cpp │ ├── test_if.cpp │ ├── test_latch.cpp │ ├── test_latch_fail.cpp │ ├── test_level1.cpp │ ├── test_level2.cpp │ ├── test_level_error.cpp │ ├── test_liter_width.cpp │ ├── test_loop_cond_fail.cpp │ ├── test_mix_signed_unsigned_types.cpp │ ├── test_non_sensvty_arr_fail.cpp │ ├── test_non_sensvty_fail.cpp │ ├── test_pointers.cpp │ ├── test_port_array_bind.cpp │ ├── test_return.cpp │ ├── test_return_fail.cpp │ ├── test_sc_bv.cpp │ ├── test_sc_int_const_array.cpp │ ├── test_sc_types.cpp │ ├── test_sc_types_fail.cpp │ ├── test_shift_type_ext.cpp │ ├── test_shifts_signed.cpp │ ├── test_sig_array_access.cpp │ ├── test_standard_collection.cpp │ ├── test_std_array.cpp │ ├── test_stdouts_prints.cpp │ ├── test_string_liter.cpp │ ├── test_switch.cpp │ ├── test_switch_after.cpp │ ├── test_switch_const.cpp │ ├── test_switch_empty_case.cpp │ ├── test_switch_empty_fail.cpp │ ├── test_switch_enum.cpp │ ├── test_switch_inside.cpp │ ├── test_trace.cpp │ ├── test_unary.cpp │ ├── test_unary_sc.cpp │ ├── test_unsupport_types_fail.cpp │ ├── test_var.cpp │ ├── test_var_multiple_use.cpp │ ├── test_var_multiple_use2.cpp │ ├── test_var_multiple_use3.cpp │ ├── test_var_ref.cpp │ ├── test_var_ref_arr_unkwn.cpp │ ├── test_var_ref_fail.cpp │ ├── test_var_usedef_same_proc.cpp │ ├── test_virtual1.cpp │ ├── test_virtual2.cpp │ ├── test_virtual3.cpp │ ├── test_virtual4.cpp │ ├── test_virtual_cast.cpp │ ├── test_virtual_field.cpp │ ├── test_virtual_pure.cpp │ ├── test_vname.cpp │ ├── test_while.cpp │ ├── test_while_const.cpp │ ├── test_while_fcall_fail.cpp │ └── test_while_other.cpp │ ├── mif │ ├── CMakeLists.txt │ ├── cthread_mif.sv │ ├── cthread_mif_array_fcall.sv │ ├── cthread_mif_array_ptr.sv │ ├── cthread_mif_array_ptr2.sv │ ├── cthread_mif_array_ptr_unkwn.sv │ ├── cthread_mif_array_ptr_unkwn2.sv │ ├── cthread_mif_array_ptr_unkwn3.sv │ ├── dttc2021.sv │ ├── mif_array1.sv │ ├── mif_array2.sv │ ├── mif_array3.sv │ ├── mif_array4.sv │ ├── mif_array_const_unkwn.sv │ ├── mif_array_differ.sv │ ├── mif_array_ptr.sv │ ├── mif_array_ptr2.sv │ ├── mif_array_record_cthread.sv │ ├── mif_array_record_meth.sv │ ├── mif_array_sc_vector.sv │ ├── mif_array_sens.sv │ ├── mif_array_unkwn.sv │ ├── mif_array_with_chan.sv │ ├── mif_array_with_ports.sv │ ├── mif_array_with_ptr.sv │ ├── mif_array_with_ptr2.sv │ ├── mif_array_with_ptr3.sv │ ├── mif_array_with_ptr_array.sv │ ├── mif_const1.sv │ ├── mif_const2.sv │ ├── mif_glob_const.sv │ ├── mif_inherit1.sv │ ├── mif_name_conflict1.sv │ ├── mif_name_conflict2.sv │ ├── mif_name_conflict3.sv │ ├── mif_record_cthread.sv │ ├── mif_record_meth.sv │ ├── mif_sc_vector.sv │ ├── mif_sc_vector_mif1.sv │ ├── mif_sc_vector_mif2.sv │ ├── mif_sc_vector_mif3.sv │ ├── mif_sc_vector_mif4.sv │ ├── mif_sc_vector_mif5.sv │ ├── mif_sc_vector_mif6.sv │ ├── mif_sc_vector_mif_2d.sv │ ├── mif_sc_vector_ptr.sv │ ├── mif_simple.sv │ ├── mif_simple1.sv │ ├── mif_simple2.sv │ ├── mif_simple3.sv │ ├── mif_simple4.sv │ ├── mif_simple5.sv │ ├── mif_use_def1.sv │ ├── mif_use_def2.sv │ ├── mif_use_def3.sv │ ├── mif_var_in_reset.sv │ ├── mif_var_multiple_use.sv │ ├── mif_with_chan_array.sv │ ├── test_access_violation1.cpp │ ├── test_array_heterogenous.cpp │ ├── test_array_record_cthread.cpp │ ├── test_array_record_meth.cpp │ ├── test_array_sc_vector.cpp │ ├── test_cthread_mif.cpp │ ├── test_cthread_mif_array_fcall.cpp │ ├── test_cthread_mif_array_ptr.cpp │ ├── test_cthread_mif_array_ptr2.cpp │ ├── test_cthread_mif_array_ptr_unkwn.cpp │ ├── test_cthread_mif_array_ptr_unkwn2.cpp │ ├── test_cthread_mif_array_ptr_unkwn3.cpp │ ├── test_dttc2021.cpp │ ├── test_glob_const.cpp │ ├── test_mif_array1.cpp │ ├── test_mif_array2.cpp │ ├── test_mif_array3.cpp │ ├── test_mif_array4.cpp │ ├── test_mif_array_const_unkwn.cpp │ ├── test_mif_array_differ.cpp │ ├── test_mif_array_ptr.cpp │ ├── test_mif_array_ptr2.cpp │ ├── test_mif_array_sens.cpp │ ├── test_mif_array_unkwn.cpp │ ├── test_mif_array_with_chan.cpp │ ├── test_mif_array_with_ports.cpp │ ├── test_mif_array_with_ptr.cpp │ ├── test_mif_array_with_ptr2.cpp │ ├── test_mif_array_with_ptr3.cpp │ ├── test_mif_array_with_ptr_array.cpp │ ├── test_mif_const1.cpp │ ├── test_mif_const2.cpp │ ├── test_mif_inherit1.cpp │ ├── test_mif_simple1.cpp │ ├── test_mif_simple2.cpp │ ├── test_mif_simple3.cpp │ ├── test_mif_simple4.cpp │ ├── test_mif_simple5.cpp │ ├── test_mif_var_multiple_use.cpp │ ├── test_mif_with_chan_array.cpp │ ├── test_name_conflict1.cpp │ ├── test_name_conflict2.cpp │ ├── test_name_conflict3.cpp │ ├── test_record_cthread.cpp │ ├── test_record_meth.cpp │ ├── test_sc_vector.cpp │ ├── test_sc_vector_mif1.cpp │ ├── test_sc_vector_mif2.cpp │ ├── test_sc_vector_mif3.cpp │ ├── test_sc_vector_mif4.cpp │ ├── test_sc_vector_mif5.cpp │ ├── test_sc_vector_mif6.cpp │ ├── test_sc_vector_mif_2d.cpp │ ├── test_sc_vector_ptr.cpp │ ├── test_use_def1.cpp │ ├── test_use_def2.cpp │ ├── test_use_def3.cpp │ └── test_var_in_reset.cpp │ ├── misc │ ├── CMakeLists.txt │ ├── misc_array_in_top.sv │ ├── misc_array_module.sv │ ├── misc_array_ptr_noninit.sv │ ├── misc_array_to_pointer.sv │ ├── misc_comb_signal.sv │ ├── misc_comb_signal_clear.sv │ ├── misc_const_array.sv │ ├── misc_const_enum_namespace.sv │ ├── misc_const_global.sv │ ├── misc_const_init.sv │ ├── misc_const_init_fcall.sv │ ├── misc_const_keep_var1.sv │ ├── misc_const_keep_var2.sv │ ├── misc_const_keep_var3.sv │ ├── misc_const_large.sv │ ├── misc_const_pointer.sv │ ├── misc_const_radix.sv │ ├── misc_const_remove.sv │ ├── misc_constexpr.sv │ ├── misc_cross_hierarchy_bind1.sv │ ├── misc_cross_hierarchy_bind2.sv │ ├── misc_cross_hierarchy_bind3.sv │ ├── misc_cross_hierarchy_bind_vector.sv │ ├── misc_dynamic_array.sv │ ├── misc_dynamic_ports.sv │ ├── misc_empty_process.sv │ ├── misc_fcall_array.sv │ ├── misc_fcall_array_unknown.sv │ ├── misc_fcall_empty.sv │ ├── misc_fcall_in_loop_cond.sv │ ├── misc_fcall_loop.sv │ ├── misc_fcall_multi_state.sv │ ├── misc_fcall_params.sv │ ├── misc_func_in_cpp.sv │ ├── misc_init_local_var1.sv │ ├── misc_init_local_var2.sv │ ├── misc_init_local_var2_comb.sv │ ├── misc_init_reset_local_var.sv │ ├── misc_init_reset_local_var_comb.sv │ ├── misc_keep_template_param.sv │ ├── misc_large_array.sv │ ├── misc_localparam.sv │ ├── misc_localparam_mif.sv │ ├── misc_mif_array_differ.sv │ ├── misc_mod_array_differ.sv │ ├── misc_module_base_array.sv │ ├── misc_module_binds_array.sv │ ├── misc_module_binds_double.sv │ ├── misc_module_binds_simple.sv │ ├── misc_module_port_array.sv │ ├── misc_module_port_sig.sv │ ├── misc_module_prefix.sv │ ├── misc_module_sections.sv │ ├── misc_module_typedef.sv │ ├── misc_multi_bind1.sv │ ├── misc_multi_bind2.sv │ ├── misc_multiple_pointers_mod.sv │ ├── misc_multiple_pointers_var.sv │ ├── misc_name_conflict0.sv │ ├── misc_name_conflict1.sv │ ├── misc_name_conflict2.sv │ ├── misc_name_conflict3.sv │ ├── misc_name_conflict4.sv │ ├── misc_name_conflict5.sv │ ├── misc_name_conflict6.sv │ ├── misc_name_conflict7.sv │ ├── misc_pointer_null_arr.sv │ ├── misc_pointer_warning.sv │ ├── misc_proc_kind.sv │ ├── misc_process_simple.sv │ ├── misc_promote_port_types.sv │ ├── misc_promote_ports.sv │ ├── misc_promote_ports_2.sv │ ├── misc_promote_ports_simple.sv │ ├── misc_read_notdef_chan.sv │ ├── misc_read_notdef_var.sv │ ├── misc_reference_met.sv │ ├── misc_sc_assert_enable.sv │ ├── misc_sc_port.sv │ ├── misc_sc_port3.sv │ ├── misc_sc_port4.sv │ ├── misc_sc_port_array1.sv │ ├── misc_sc_port_array2.sv │ ├── misc_sc_port_array3.sv │ ├── misc_sc_port_dyn.sv │ ├── misc_sc_port_ptr.sv │ ├── misc_sc_port_ptr2.sv │ ├── misc_sc_port_ptr_dyn.sv │ ├── misc_sc_vector1.sv │ ├── misc_sc_vector2.sv │ ├── misc_sig_access_reset.sv │ ├── misc_signal_reset.sv │ ├── misc_single_source.sv │ ├── misc_single_state_thread.sv │ ├── misc_static_array.sv │ ├── misc_statistic.sv │ ├── misc_string.sv │ ├── misc_sva_assert.sv │ ├── misc_sva_generate.sv │ ├── misc_sva_generate_base_mod.sv │ ├── misc_sva_generate_mod.sv │ ├── misc_sva_generate_proc.sv │ ├── misc_sva_generate_proc_loop.sv │ ├── misc_sva_generate_proc_nogen.sv │ ├── misc_sva_generate_proc_off.sv │ ├── misc_sva_generate_stable.sv │ ├── misc_unsigned_mode.sv │ ├── misc_unused_remove_array.sv │ ├── misc_unused_remove_fcall.sv │ ├── misc_unused_remove_general.sv │ ├── misc_unused_remove_local.sv │ ├── misc_unused_remove_member.sv │ ├── misc_unused_remove_mif.sv │ ├── misc_unused_remove_rec_sig.sv │ ├── misc_unused_remove_record.sv │ ├── misc_unused_remove_register.sv │ ├── misc_unused_remove_signal.sv │ ├── misc_vector_in_top.sv │ ├── misc_vendor_memory.sv │ ├── misc_vendor_memory_if.sv │ ├── misc_vendor_memory_sem.sv │ ├── misc_verilog_intrinsic.sv │ ├── misc_verilog_intrinsic2.sv │ ├── misc_verilog_intrinsic3.sv │ ├── misc_verilog_keyword.sv │ ├── misc_zero_width_func.sv │ ├── misc_zero_width_int.sv │ ├── misc_zero_width_sens.sv │ ├── misc_zero_width_sig.sv │ ├── test_array_in_top.cpp │ ├── test_array_module.cpp │ ├── test_array_module_fail.cpp │ ├── test_array_no_indx_fail.cpp │ ├── test_array_ptr_noninit.cpp │ ├── test_array_to_pointer.cpp │ ├── test_array_to_pointer_fail.cpp │ ├── test_comb_signal.cpp │ ├── test_comb_signal_clear.cpp │ ├── test_comb_signal_fail.cpp │ ├── test_cond_side_effect_fail.cpp │ ├── test_const_array.cpp │ ├── test_const_enum_namespace.cpp │ ├── test_const_global.cpp │ ├── test_const_init.cpp │ ├── test_const_init_fcall.cpp │ ├── test_const_keep_var1.cpp │ ├── test_const_keep_var2.cpp │ ├── test_const_keep_var3.cpp │ ├── test_const_large.cpp │ ├── test_const_pointer.cpp │ ├── test_const_radix.cpp │ ├── test_const_remove.cpp │ ├── test_constexpr.cpp │ ├── test_cross_hierarchy_bind1.cpp │ ├── test_cross_hierarchy_bind2.cpp │ ├── test_cross_hierarchy_bind3.cpp │ ├── test_cross_hierarchy_bind_vector.cpp │ ├── test_dac2019_apb.cpp │ ├── test_dac2019_apb.sv │ ├── test_demo_nov27.cpp │ ├── test_demo_nov27.sv │ ├── test_double_alloc.cpp │ ├── test_dynamic_array.cpp │ ├── test_dynamic_ports.cpp │ ├── test_empty_process.cpp │ ├── test_fcall_array.cpp │ ├── test_fcall_array_unknown.cpp │ ├── test_fcall_empty.cpp │ ├── test_fcall_in_loop_cond.cpp │ ├── test_fcall_loop.cpp │ ├── test_fcall_multi_state.cpp │ ├── test_fcall_params.cpp │ ├── test_fcall_return_fail1.cpp │ ├── test_fcall_return_fail2.cpp │ ├── test_fcall_return_fail3.cpp │ ├── test_fcall_return_fail4.cpp │ ├── test_func_in_cpp.cpp │ ├── test_func_in_cpp.h │ ├── test_init_local_var1.cpp │ ├── test_init_local_var2.cpp │ ├── test_init_reset_local_var.cpp │ ├── test_keep_template_param.cpp │ ├── test_large_array.cpp │ ├── test_localparam.cpp │ ├── test_localparam_mif.cpp │ ├── test_loop_return_fail.cpp │ ├── test_mif_array_differ.cpp │ ├── test_mod_array_differ.cpp │ ├── test_module_base_array.cpp │ ├── test_module_binds_array.cpp │ ├── test_module_binds_double.cpp │ ├── test_module_binds_simple.cpp │ ├── test_module_port_array.cpp │ ├── test_module_port_sig.cpp │ ├── test_module_prefix.cpp │ ├── test_module_sections.cpp │ ├── test_module_typedef.cpp │ ├── test_multi_bind1.cpp │ ├── test_multi_bind2.cpp │ ├── test_multi_bind_fail.cpp │ ├── test_multiple_pointers_mod.cpp │ ├── test_multiple_pointers_var.cpp │ ├── test_name_conflict0.cpp │ ├── test_name_conflict1.cpp │ ├── test_name_conflict2.cpp │ ├── test_name_conflict3.cpp │ ├── test_name_conflict4.cpp │ ├── test_name_conflict5.cpp │ ├── test_name_conflict6.cpp │ ├── test_name_conflict7.cpp │ ├── test_neg_range_fail.cpp │ ├── test_pointer_dangling2_fail.cpp │ ├── test_pointer_dangling3_fail.cpp │ ├── test_pointer_dangling_fail.cpp │ ├── test_pointer_null2_fail.cpp │ ├── test_pointer_null3_fail.cpp │ ├── test_pointer_null_arr.cpp │ ├── test_pointer_null_arr_fail.cpp │ ├── test_pointer_null_fail.cpp │ ├── test_pointer_warning.cpp │ ├── test_process_simple.cpp │ ├── test_promote_port_types.cpp │ ├── test_promote_ports.cpp │ ├── test_promote_ports_simple.cpp │ ├── test_read_notdef_chan.cpp │ ├── test_read_notdef_var.cpp │ ├── test_reference_met.cpp │ ├── test_reg_array_target.cpp │ ├── test_sc_assert_enable.cpp │ ├── test_sc_port.cpp │ ├── test_sc_port2_fail.cpp │ ├── test_sc_port3.cpp │ ├── test_sc_port4.cpp │ ├── test_sc_port_array1.cpp │ ├── test_sc_port_array1_fail.cpp │ ├── test_sc_port_array2.cpp │ ├── test_sc_port_array2_fail.cpp │ ├── test_sc_port_array3.cpp │ ├── test_sc_port_array_bug.cpp │ ├── test_sc_port_dyn.cpp │ ├── test_sc_port_ptr.cpp │ ├── test_sc_port_ptr2.cpp │ ├── test_sc_port_ptr_dyn.cpp │ ├── test_sc_vector1.cpp │ ├── test_sc_vector2.cpp │ ├── test_sensitivity.cpp │ ├── test_sig_access_reset.cpp │ ├── test_signal_reset.cpp │ ├── test_single_state_thread.cpp │ ├── test_static_array.cpp │ ├── test_statistic.cpp │ ├── test_string.cpp │ ├── test_sva_assert.cpp │ ├── test_sva_generate.cpp │ ├── test_sva_generate_base_mod.cpp │ ├── test_sva_generate_func_fail1.cpp │ ├── test_sva_generate_func_fail2.cpp │ ├── test_sva_generate_mod.cpp │ ├── test_sva_generate_mod_fail.cpp │ ├── test_sva_generate_proc.cpp │ ├── test_sva_generate_proc_fail.cpp │ ├── test_sva_generate_proc_loop.cpp │ ├── test_sva_generate_proc_nogen.cpp │ ├── test_sva_generate_proc_off.cpp │ ├── test_sva_generate_stable.cpp │ ├── test_unsigned_mode.cpp │ ├── test_unused_remove_array.cpp │ ├── test_unused_remove_fcall.cpp │ ├── test_unused_remove_general.cpp │ ├── test_unused_remove_local.cpp │ ├── test_unused_remove_member.cpp │ ├── test_unused_remove_mif.cpp │ ├── test_unused_remove_rec_sig.cpp │ ├── test_unused_remove_record.cpp │ ├── test_unused_remove_register.cpp │ ├── test_unused_remove_signal.cpp │ ├── test_vector_in_top.cpp │ ├── test_vendor_memory.cpp │ ├── test_vendor_memory_fail.cpp │ ├── test_vendor_memory_if.cpp │ ├── test_vendor_memory_sem.cpp │ ├── test_verilog_intrinsic.cpp │ ├── test_verilog_intrinsic2.cpp │ ├── test_verilog_intrinsic3.cpp │ ├── test_verilog_intrinsic_fail.cpp │ ├── test_verilog_keyword.cpp │ ├── test_zero_width_func.cpp │ ├── test_zero_width_int.cpp │ ├── test_zero_width_sens.cpp │ └── test_zero_width_sig.cpp │ ├── record │ ├── CMakeLists.txt │ ├── record_array_cthread.sv │ ├── record_array_decl_in_scope.sv │ ├── record_array_fcall_method.sv │ ├── record_array_if_method.sv │ ├── record_array_loops_method.sv │ ├── record_array_method.sv │ ├── record_array_method2.sv │ ├── record_array_unknown_cthread.sv │ ├── record_array_unknown_method.sv │ ├── record_array_var_indices_method.sv │ ├── record_assign_concat_cthread.sv │ ├── record_assign_concat_method.sv │ ├── record_base_multi_record.sv │ ├── record_base_record0.sv │ ├── record_base_record1.sv │ ├── record_base_record2.sv │ ├── record_base_record_chan.sv │ ├── record_chan_const_field.sv │ ├── record_chan_type_meth.sv │ ├── record_chan_type_misc.sv │ ├── record_chan_type_thrd.sv │ ├── record_complex_method.sv │ ├── record_fcall_cthread.sv │ ├── record_fcall_glob_cthread.sv │ ├── record_func_in_ctor.sv │ ├── record_func_param_cthread.sv │ ├── record_func_param_method.sv │ ├── record_if_method.sv │ ├── record_member_array_copy.sv │ ├── record_member_array_cthread.sv │ ├── record_member_array_method1.sv │ ├── record_member_array_method2.sv │ ├── record_member_array_method3.sv │ ├── record_member_array_unkwn.sv │ ├── record_member_func_cthread.sv │ ├── record_member_func_method.sv │ ├── record_operator_equal.sv │ ├── record_ptr_arr_cthread.sv │ ├── record_ptr_arr_method.sv │ ├── record_read_defined.sv │ ├── record_reg_arr_cthread.sv │ ├── record_reg_cthread0.sv │ ├── record_reg_cthread1.sv │ ├── record_reg_func_cthread1.sv │ ├── record_reg_func_cthread2.sv │ ├── record_return_assert_method.sv │ ├── record_return_cthread.sv │ ├── record_return_cthread1.sv │ ├── record_return_cthread2.sv │ ├── record_return_cthread3.sv │ ├── record_return_method.sv │ ├── record_return_method2.sv │ ├── record_return_method3.sv │ ├── record_return_method_mif.sv │ ├── record_return_method_mif2.sv │ ├── record_return_method_mif3.sv │ ├── record_return_static_func_cthread.sv │ ├── record_simple_method.sv │ ├── record_simple_method3.sv │ ├── record_use_def.sv │ ├── record_use_def_arr.sv │ ├── record_wait_call.sv │ ├── test_array_cthread.cpp │ ├── test_array_decl_in_scope.cpp │ ├── test_array_fcall_method.cpp │ ├── test_array_if_method.cpp │ ├── test_array_loops_method.cpp │ ├── test_array_method.cpp │ ├── test_array_method2.cpp │ ├── test_array_unknown_cthread.cpp │ ├── test_array_unknown_method.cpp │ ├── test_array_var_indices_method.cpp │ ├── test_assign_concat_cthread.cpp │ ├── test_assign_concat_method.cpp │ ├── test_base_multi_record.cpp │ ├── test_base_record0.cpp │ ├── test_base_record1.cpp │ ├── test_base_record2.cpp │ ├── test_base_record_chan.cpp │ ├── test_chan_const_field.cpp │ ├── test_chan_type_meth.cpp │ ├── test_chan_type_misc.cpp │ ├── test_chan_type_thrd.cpp │ ├── test_complex_method.cpp │ ├── test_fcall_cthread.cpp │ ├── test_fcall_glob_cthread.cpp │ ├── test_func_in_ctor.cpp │ ├── test_func_param_cthread.cpp │ ├── test_func_param_method.cpp │ ├── test_if_method.cpp │ ├── test_member_array_copy.cpp │ ├── test_member_array_cthread.cpp │ ├── test_member_array_method1.cpp │ ├── test_member_array_method2.cpp │ ├── test_member_array_method3.cpp │ ├── test_member_array_unkwn.cpp │ ├── test_member_func_cthread.cpp │ ├── test_member_func_method.cpp │ ├── test_member_record1.cpp │ ├── test_member_record_func.cpp │ ├── test_operator_equal.cpp │ ├── test_ptr_arr_cthread.cpp │ ├── test_ptr_arr_method.cpp │ ├── test_read_defined.cpp │ ├── test_reg_arr_cthread.cpp │ ├── test_reg_cthread0.cpp │ ├── test_reg_cthread1.cpp │ ├── test_reg_func_cthread1.cpp │ ├── test_reg_func_cthread2.cpp │ ├── test_return_assert_method.cpp │ ├── test_return_cthread.cpp │ ├── test_return_cthread1.cpp │ ├── test_return_cthread2.cpp │ ├── test_return_cthread3.cpp │ ├── test_return_method.cpp │ ├── test_return_method2.cpp │ ├── test_return_method3.cpp │ ├── test_return_method_mif.cpp │ ├── test_return_method_mif2.cpp │ ├── test_return_method_mif3.cpp │ ├── test_return_static_func_cthread.cpp │ ├── test_simple_cthread.cpp │ ├── test_simple_method.cpp │ ├── test_simple_method3.cpp │ ├── test_use_def.cpp │ ├── test_use_def_arr.cpp │ └── test_wait_call.cpp │ ├── state │ ├── CMakeLists.txt │ ├── test_method_basic.cpp │ ├── test_state_array_el_ptr.cpp │ ├── test_state_array_int.cpp │ ├── test_state_bases.cpp │ ├── test_state_dyn_sig.cpp │ ├── test_state_dynalloc.cpp │ ├── test_state_init.cpp │ ├── test_state_mdim_array.cpp │ ├── test_state_pointers.cpp │ ├── test_state_sc_vector.cpp │ ├── test_state_static_const.cpp │ └── test_state_struct_member.cpp │ └── uniquify │ ├── CMakeLists.txt │ ├── test_uniquify_basic.cpp │ ├── test_uniquify_basic.sv │ ├── test_uniquify_cross_bind.cpp │ ├── test_uniquify_cross_bind.sv │ ├── test_uniquify_proc.cpp │ └── test_uniquify_proc.sv ├── doc ├── assertions.tex ├── errors.tex ├── extensions.tex ├── install.tex ├── overview.tex ├── papers │ ├── common_library_2022.pdf │ ├── icsc.pdf │ ├── icsc_slides.pdf │ ├── preprint_single_source_2024.pdf │ ├── sct_assert.pdf │ ├── sct_assert_slides.pdf │ ├── single_source_training.pdf │ └── slides_single_source_2024.pdf ├── pics │ ├── ss_buff_conn.jpg │ ├── ss_buff_fifo_conn.jpg │ ├── ss_buffer.jpg │ ├── ss_channels.jpg │ ├── ss_clock.jpg │ ├── ss_comb_conn.jpg │ ├── ss_fifo.jpg │ ├── ss_fifo_port.jpg │ ├── ss_parent_mod.jpg │ ├── ss_prot_mm.jpg │ ├── ss_prot_tt.jpg │ ├── ss_reg.jpg │ ├── ss_sig_usage.jpg │ ├── ss_targ_init.jpg │ ├── ss_top_mod.jpg │ └── ss_usage.jpg ├── preamble.tex ├── prepare.tex ├── single_source.tex ├── tool_options.tex ├── trans_flow.tex ├── ug.pdf └── ug.tex ├── gdb ├── gdbinit-example.txt └── sysc_printers │ ├── singlsrc_printers.py │ ├── sysc23x_printers.py │ └── sysc30x_printers.py ├── install.sh ├── install2.sh ├── install_icsc.sh ├── sc_elab ├── CMakeLists.txt └── sc_elab.proto ├── sc_tool ├── CMakeLists.txt └── lib │ ├── rtti_sysc │ ├── SystemCRTTI.cpp │ └── SystemCRTTI.h │ └── sc_tool │ ├── SCTool.cpp │ ├── SCTool.h │ ├── SCToolFrontendAction.cpp │ ├── SCToolFrontendAction.h │ ├── ScCommandLine.cpp │ ├── ScCommandLine.h │ ├── ScProcAnalyzer.cpp │ ├── ScProcAnalyzer.h │ ├── cfg │ ├── SValue.cpp │ ├── SValue.h │ ├── ScState.cpp │ ├── ScState.h │ ├── ScStmtInfo.cpp │ ├── ScStmtInfo.h │ ├── ScTraverseCommon.cpp │ ├── ScTraverseCommon.h │ ├── ScTraverseConst.cpp │ ├── ScTraverseConst.h │ ├── ScTraverseProc.cpp │ └── ScTraverseProc.h │ ├── cthread │ ├── ScCFGAnalysis.cpp │ ├── ScCFGAnalysis.h │ ├── ScCThreadStates.cpp │ ├── ScCThreadStates.h │ ├── ScCfgCursor.cpp │ ├── ScCfgCursor.h │ ├── ScFindWaitCallVisitor.cpp │ ├── ScFindWaitCallVisitor.h │ ├── ScThreadBuilder.cpp │ └── ScThreadBuilder.h │ ├── diag │ ├── ScToolDiagnostic.cpp │ └── ScToolDiagnostic.h │ ├── dyn_elab │ ├── Demangle.cpp │ ├── Demangle.h │ ├── DesignDbGenerator.cpp │ ├── DesignDbGenerator.h │ ├── ElabTypeManager.cpp │ ├── ElabTypeManager.h │ ├── GlobalContext.cpp │ ├── GlobalContext.h │ ├── MangledTypeDB.cpp │ ├── MangledTypeDB.h │ ├── Reflection.cpp │ └── Reflection.h │ ├── elab │ ├── ScElabDatabase.cpp │ ├── ScElabDatabase.h │ ├── ScElabModuleBuilder.cpp │ ├── ScElabModuleBuilder.h │ ├── ScElabProcBuilder.cpp │ ├── ScElabProcBuilder.h │ ├── ScObjectView.cpp │ ├── ScObjectView.h │ ├── ScVerilogModule.cpp │ └── ScVerilogModule.h │ ├── expr │ ├── ScGenerateExpr.cpp │ ├── ScGenerateExpr.h │ ├── ScParseExpr.cpp │ ├── ScParseExpr.h │ ├── ScParseExprValue.cpp │ ├── ScParseExprValue.h │ └── ScParseRangeExpr.h │ ├── scope │ ├── ScScopeGraph.cpp │ ├── ScScopeGraph.h │ ├── ScVerilogWriter.cpp │ └── ScVerilogWriter.h │ ├── systemc │ ├── ScChannel.cpp │ ├── ScChannel.h │ ├── ScModule.cpp │ ├── ScModule.h │ ├── ScObject.cpp │ └── ScObject.h │ └── utils │ ├── BitUtils.cpp │ ├── BitUtils.h │ ├── CfgFabric.cpp │ ├── CfgFabric.h │ ├── CheckCppInheritance.cpp │ ├── CheckCppInheritance.h │ ├── CommandLine.cpp │ ├── CommandLine.h │ ├── CppTypeTraits.cpp │ ├── CppTypeTraits.h │ ├── DebugOptions.cpp │ ├── DebugOptions.h │ ├── InsertionOrderSet.h │ ├── NameGenerator.cpp │ ├── NameGenerator.h │ ├── RawIndentOstream.cpp │ ├── RawIndentOstream.h │ ├── ScTypeTraits.cpp │ ├── ScTypeTraits.h │ ├── StringFormat.cpp │ ├── StringFormat.h │ ├── VerilogKeywords.cpp │ └── VerilogKeywords.h └── systemc ├── AUTHORS.md ├── CMakeLists.txt ├── CONTRIBUTING.md ├── INSTALL.md ├── LICENSE ├── Makefile.am ├── NOTICE ├── README.md ├── RELEASENOTES.md ├── cmake ├── INSTALL_USING_CMAKE.md ├── SystemCLanguageConfig.cmake.in ├── SystemCTLMConfig.cmake.in ├── SystemCTesting.cmake ├── run-example.cmake └── run-test.py ├── cmake_install.cmake ├── config ├── Make-rules.common ├── Make-rules.examples ├── Make-rules.sysc ├── ax_check_define.m4 ├── ax_pthread.m4 ├── bootstrap ├── config.guess ├── config.sub └── test.sh.in ├── configure.ac ├── docker ├── alma.dockerfile ├── entrypoint.sh └── ubuntu.dockerfile ├── docs ├── CMakeLists.txt ├── Makefile.am ├── cmake_install.cmake ├── git_branches.svg ├── sysc │ ├── README │ ├── SIGN_EXTENSION.md │ └── doxygen │ │ └── Doxyfile.in └── tlm │ ├── doxygen │ └── Doxyfile.in │ └── tlm_README.md ├── examples ├── CMakeLists.txt ├── Makefile.am ├── build-msvc │ ├── Makefile │ ├── Makefile.config │ ├── Makefile.rules │ ├── READMEcommandlinemsvc.txt │ ├── SystemC_examples.props │ ├── SystemC_examples.sln │ ├── openhere.bat │ ├── tlm_examples.props │ ├── tlm_examples.sln │ └── vsvars.bat ├── build-unix │ ├── Makefile │ ├── Makefile.config │ └── Makefile.rules ├── sysc │ ├── 2.1 │ │ ├── dpipe │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── dpipe.sln │ │ │ ├── dpipe.vcxproj │ │ │ ├── main.cpp │ │ │ └── test.am │ │ ├── forkjoin │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── forkjoin.cpp │ │ │ ├── forkjoin.sln │ │ │ ├── forkjoin.vcxproj │ │ │ └── test.am │ │ ├── reset_signal_is │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── reset_signal_is.cpp │ │ │ ├── reset_signal_is.sln │ │ │ ├── reset_signal_is.vcxproj │ │ │ └── test.am │ │ ├── sc_export │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── README.txt │ │ │ ├── main.cpp │ │ │ ├── sc_export.sln │ │ │ ├── sc_export.vcxproj │ │ │ └── test.am │ │ ├── sc_report │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── README.txt │ │ │ ├── main.cpp │ │ │ ├── sc_report.sln │ │ │ ├── sc_report.vcxproj │ │ │ └── test.am │ │ ├── scx_barrier │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── main.cpp │ │ │ ├── scx_barrier.h │ │ │ ├── scx_barrier.sln │ │ │ ├── scx_barrier.vcxproj │ │ │ └── test.am │ │ ├── scx_mutex_w_policy │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── scx_mutex_w_policy.cpp │ │ │ ├── scx_mutex_w_policy.sln │ │ │ ├── scx_mutex_w_policy.vcxproj │ │ │ └── test.am │ │ └── specialized_signals │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── main.cpp │ │ │ ├── scx_signal_int.cpp │ │ │ ├── scx_signal_int.h │ │ │ ├── scx_signal_signed.cpp │ │ │ ├── scx_signal_signed.h │ │ │ ├── scx_signal_uint.cpp │ │ │ ├── scx_signal_uint.h │ │ │ ├── scx_signal_unsigned.cpp │ │ │ ├── scx_signal_unsigned.h │ │ │ ├── specialized_signals.sln │ │ │ ├── specialized_signals.vcxproj │ │ │ └── test.am │ ├── 2.3 │ │ ├── include │ │ │ ├── sc_rvd.h │ │ │ └── sc_ttd.h │ │ ├── sc_rvd │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── main.cpp │ │ │ ├── sc_rvd.sln │ │ │ ├── sc_rvd.vcxproj │ │ │ └── test.am │ │ ├── sc_ttd │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── main.cpp │ │ │ ├── sc_ttd.sln │ │ │ ├── sc_ttd.vcxproj │ │ │ └── test.am │ │ └── simple_async │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── async_event.h │ │ │ ├── main.cpp │ │ │ ├── simple_async.sln │ │ │ ├── simple_async.vcxproj │ │ │ └── test.am │ ├── 2.4 │ │ └── in_class_initialization │ │ │ ├── CMakeLists.txt │ │ │ ├── README_COMPILE_TIME │ │ │ ├── adder.h │ │ │ ├── adder_int_5_pimpl.cpp │ │ │ ├── adder_int_5_pimpl.h │ │ │ └── in_class_initialization.cpp │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── README.txt │ ├── async_suspend │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── async_event.h │ │ ├── async_suspend.cpp │ │ ├── collector.h │ │ ├── matplotlibcpp.h │ │ ├── node.h │ │ └── test.am │ ├── fft │ │ ├── README │ │ ├── fft_flpt │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── fft.cpp │ │ │ ├── fft.h │ │ │ ├── fft_flpt.sln │ │ │ ├── fft_flpt.vcxproj │ │ │ ├── in_imag │ │ │ ├── in_imag.1 │ │ │ ├── in_imag.2 │ │ │ ├── in_imag.3 │ │ │ ├── in_imag.4 │ │ │ ├── in_real │ │ │ ├── in_real.1 │ │ │ ├── in_real.2 │ │ │ ├── in_real.3 │ │ │ ├── in_real.4 │ │ │ ├── main.cpp │ │ │ ├── out_imag.1.golden │ │ │ ├── out_imag.2.golden │ │ │ ├── out_imag.3.golden │ │ │ ├── out_imag.4.golden │ │ │ ├── out_real.1.golden │ │ │ ├── out_real.2.golden │ │ │ ├── out_real.3.golden │ │ │ ├── out_real.4.golden │ │ │ ├── sink.cpp │ │ │ ├── sink.h │ │ │ ├── source.cpp │ │ │ ├── source.h │ │ │ └── test.am │ │ └── fft_fxpt │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── fft.cpp │ │ │ ├── fft.h │ │ │ ├── fft_fxpt.sln │ │ │ ├── fft_fxpt.vcxproj │ │ │ ├── in_imag │ │ │ ├── in_imag.1 │ │ │ ├── in_imag.2 │ │ │ ├── in_imag.3 │ │ │ ├── in_imag.4 │ │ │ ├── in_real │ │ │ ├── in_real.1 │ │ │ ├── in_real.2 │ │ │ ├── in_real.3 │ │ │ ├── in_real.4 │ │ │ ├── main.cpp │ │ │ ├── out_imag.1.golden │ │ │ ├── out_imag.2.golden │ │ │ ├── out_imag.3.golden │ │ │ ├── out_imag.4.golden │ │ │ ├── out_real.1.golden │ │ │ ├── out_real.2.golden │ │ │ ├── out_real.3.golden │ │ │ ├── out_real.4.golden │ │ │ ├── sink.cpp │ │ │ ├── sink.h │ │ │ ├── source.cpp │ │ │ ├── source.h │ │ │ └── test.am │ ├── fir │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── README │ │ ├── display.cpp │ │ ├── display.h │ │ ├── fir.cpp │ │ ├── fir.h │ │ ├── fir.sln │ │ ├── fir.vcxproj │ │ ├── fir_common.vcxproj │ │ ├── fir_const.h │ │ ├── fir_data.cpp │ │ ├── fir_data.h │ │ ├── fir_fsm.cpp │ │ ├── fir_fsm.h │ │ ├── fir_rtl.vcxproj │ │ ├── fir_top.h │ │ ├── log │ │ ├── main.cpp │ │ ├── main_rtl.cpp │ │ ├── rtl_log │ │ ├── stimulus.cpp │ │ ├── stimulus.h │ │ └── test.am │ ├── pipe │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── README │ │ ├── display.cpp │ │ ├── display.h │ │ ├── main.cpp │ │ ├── numgen.cpp │ │ ├── numgen.h │ │ ├── pipe.sln │ │ ├── pipe.vcxproj │ │ ├── stage1.cpp │ │ ├── stage1.h │ │ ├── stage2.cpp │ │ ├── stage2.h │ │ ├── stage3.cpp │ │ ├── stage3.h │ │ └── test.am │ ├── pkt_switch │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── README │ │ ├── fifo.cpp │ │ ├── fifo.h │ │ ├── main.cpp │ │ ├── pkt.h │ │ ├── pkt_switch.sln │ │ ├── pkt_switch.vcxproj │ │ ├── receiver.cpp │ │ ├── receiver.h │ │ ├── sender.cpp │ │ ├── sender.h │ │ ├── switch.cpp │ │ ├── switch.h │ │ ├── switch_clk.cpp │ │ ├── switch_clk.h │ │ ├── switch_reg.h │ │ └── test.am │ ├── risc_cpu │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── README │ │ ├── README_TYPESCRIPT │ │ ├── abc.asm │ │ ├── assembler.pl │ │ ├── bios.cpp │ │ ├── bios.h │ │ ├── bios.img │ │ ├── dcache.cpp │ │ ├── dcache.h │ │ ├── dcache.img │ │ ├── decode.cpp │ │ ├── decode.h │ │ ├── directive.h │ │ ├── exec.cpp │ │ ├── exec.h │ │ ├── fetch.cpp │ │ ├── fetch.h │ │ ├── floating.cpp │ │ ├── floating.h │ │ ├── icache.cpp │ │ ├── icache.h │ │ ├── icache.img │ │ ├── main.cpp │ │ ├── mmxu.cpp │ │ ├── mmxu.h │ │ ├── paging.cpp │ │ ├── paging.h │ │ ├── pic.cpp │ │ ├── pic.h │ │ ├── printout.img │ │ ├── program.img │ │ ├── register.img │ │ ├── risc_cpu.sln │ │ ├── risc_cpu.vcxproj │ │ ├── test.am │ │ ├── test.asm │ │ └── test1.asm │ ├── rsa │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── README │ │ ├── rsa.cpp │ │ ├── rsa.sln │ │ ├── rsa.vcxproj │ │ └── test.am │ ├── simple_bus │ │ ├── CMakeLists.txt │ │ ├── ChangeLog │ │ ├── LEGAL │ │ ├── Makefile │ │ ├── README │ │ ├── SLIDES.pdf │ │ ├── simple_bus.cpp │ │ ├── simple_bus.h │ │ ├── simple_bus.sln │ │ ├── simple_bus.vcxproj │ │ ├── simple_bus_arbiter.cpp │ │ ├── simple_bus_arbiter.h │ │ ├── simple_bus_arbiter_if.h │ │ ├── simple_bus_blocking_if.h │ │ ├── simple_bus_direct_if.h │ │ ├── simple_bus_fast_mem.h │ │ ├── simple_bus_main.cpp │ │ ├── simple_bus_master_blocking.cpp │ │ ├── simple_bus_master_blocking.h │ │ ├── simple_bus_master_direct.cpp │ │ ├── simple_bus_master_direct.h │ │ ├── simple_bus_master_non_blocking.cpp │ │ ├── simple_bus_master_non_blocking.h │ │ ├── simple_bus_non_blocking_if.h │ │ ├── simple_bus_request.h │ │ ├── simple_bus_slave_if.h │ │ ├── simple_bus_slow_mem.h │ │ ├── simple_bus_test.h │ │ ├── simple_bus_tools.cpp │ │ ├── simple_bus_types.cpp │ │ ├── simple_bus_types.h │ │ └── test.am │ ├── simple_fifo │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── simple_fifo.cpp │ │ ├── simple_fifo.sln │ │ ├── simple_fifo.vcxproj │ │ └── test.am │ └── simple_perf │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── simple_perf.cpp │ │ ├── simple_perf.sln │ │ ├── simple_perf.vcxproj │ │ └── test.am └── tlm │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── README.txt │ ├── at_1_phase │ ├── CMakeLists.txt │ ├── build-msvc │ │ ├── Makefile │ │ ├── at_1_phase.sln │ │ └── at_1_phase.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── at_1_phase_example.pdf │ │ └── at_1_phase_example.ppt │ ├── include │ │ ├── at_1_phase_top.h │ │ └── initiator_top.h │ ├── src │ │ ├── at_1_phase.cpp │ │ ├── at_1_phase_top.cpp │ │ └── initiator_top.cpp │ └── test.am │ ├── at_2_phase │ ├── CMakeLists.txt │ ├── build-msvc │ │ ├── Makefile │ │ ├── at_2_phase.sln │ │ └── at_2_phase.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── at_2_phase_example.pdf │ │ └── at_2_phase_example.ppt │ ├── include │ │ ├── at_2_phase_top.h │ │ └── initiator_top.h │ ├── src │ │ ├── at_2_phase.cpp │ │ ├── at_2_phase_top.cpp │ │ └── initiator_top.cpp │ └── test.am │ ├── at_4_phase │ ├── CMakeLists.txt │ ├── build-msvc │ │ ├── Makefile │ │ ├── at_4_phase.sln │ │ └── at_4_phase.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── at_4_phase_example.pdf │ │ └── at_4_phase_example.ppt │ ├── include │ │ ├── at_4_phase_top.h │ │ └── initiator_top.h │ ├── src │ │ ├── at_4_phase.cpp │ │ ├── at_4_phase_top.cpp │ │ └── initiator_top.cpp │ └── test.am │ ├── at_extension_optional │ ├── CMakeLists.txt │ ├── build-msvc │ │ ├── Makefile │ │ ├── at_extension_optional.sln │ │ └── at_extension_optional.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── at_extension_optional_example.pdf │ │ └── at_extension_optional_example.ppt │ ├── include │ │ ├── at_extension_optional_top.h │ │ └── initiator_top.h │ ├── src │ │ ├── at_extension_optional.cpp │ │ ├── at_extension_optional_top.cpp │ │ └── initiator_top.cpp │ └── test.am │ ├── at_mixed_targets │ ├── CMakeLists.txt │ ├── build-msvc │ │ ├── Makefile │ │ ├── at_mixed_targets.sln │ │ └── at_mixed_targets.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── at_mixed_targets_example.pdf │ │ └── at_mixed_targets_example.ppt │ ├── include │ │ ├── at_mixed_targets_top.h │ │ └── initiator_top.h │ ├── src │ │ ├── at_mixed_targets.cpp │ │ ├── at_mixed_targets_top.cpp │ │ └── initiator_top.cpp │ └── test.am │ ├── at_ooo │ ├── CMakeLists.txt │ ├── build-msvc │ │ ├── Makefile │ │ ├── at_ooo.sln │ │ └── at_ooo.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── at_ooo_example.pdf │ │ └── at_ooo_example.ppt │ ├── include │ │ ├── at_ooo_top.h │ │ ├── at_target_ooo_2_phase.h │ │ └── initiator_top.h │ ├── src │ │ ├── at_ooo.cpp │ │ ├── at_ooo_top.cpp │ │ ├── at_target_ooo_2_phase.cpp │ │ └── initiator_top.cpp │ └── test.am │ ├── common │ ├── Makefile.am │ ├── include │ │ ├── at_initiator_annotated.h │ │ ├── at_initiator_explicit.h │ │ ├── at_initiator_temporal_decoupling.h │ │ ├── at_target_1_phase.h │ │ ├── at_target_1_phase_dmi.h │ │ ├── at_target_2_phase.h │ │ ├── at_target_4_phase.h │ │ ├── dmi_memory.h │ │ ├── extension_initiator_id.h │ │ ├── lt_dmi_initiator.h │ │ ├── lt_dmi_target.h │ │ ├── lt_initiator.h │ │ ├── lt_synch_target.h │ │ ├── lt_target.h │ │ ├── lt_td_initiator.h │ │ ├── memory.h │ │ ├── models │ │ │ ├── README.txt │ │ │ ├── SimpleBusAT.h │ │ │ └── SimpleBusLT.h │ │ ├── reporting.h │ │ ├── select_initiator.h │ │ └── traffic_generator.h │ └── src │ │ ├── at_initiator_annotated.cpp │ │ ├── at_initiator_explicit.cpp │ │ ├── at_initiator_temporal_decoupling.cpp │ │ ├── at_target_1_phase.cpp │ │ ├── at_target_1_phase_dmi.cpp │ │ ├── at_target_2_phase.cpp │ │ ├── at_target_4_phase.cpp │ │ ├── dmi_memory.cpp │ │ ├── extension_initiator_id.cpp │ │ ├── lt_dmi_initiator.cpp │ │ ├── lt_dmi_target.cpp │ │ ├── lt_initiator.cpp │ │ ├── lt_synch_target.cpp │ │ ├── lt_target.cpp │ │ ├── lt_td_initiator.cpp │ │ ├── memory.cpp │ │ ├── report.cpp │ │ ├── select_initiator.cpp │ │ └── traffic_generator.cpp │ ├── lt │ ├── CMakeLists.txt │ ├── README │ ├── build-msvc │ │ ├── Makefile │ │ ├── lt.sln │ │ └── lt.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── lt_example.pdf │ │ └── lt_example.ppt │ ├── include │ │ ├── initiator_top.h │ │ └── lt_top.h │ ├── src │ │ ├── initiator_top.cpp │ │ ├── lt.cpp │ │ └── lt_top.cpp │ └── test.am │ ├── lt_dmi │ ├── CMakeLists.txt │ ├── README │ ├── build-msvc │ │ ├── Makefile │ │ ├── lt_dmi.sln │ │ └── lt_dmi.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── lt_dmi_example.pdf │ │ └── lt_dmi_example.ppt │ ├── include │ │ ├── initiator_top.h │ │ └── lt_dmi_top.h │ ├── src │ │ ├── initiator_top.cpp │ │ ├── lt_dmi.cpp │ │ └── lt_dmi_top.cpp │ └── test.am │ ├── lt_extension_mandatory │ ├── CMakeLists.txt │ ├── build-msvc │ │ ├── Makefile │ │ ├── lt_extension_mandatory.sln │ │ └── lt_extension_mandatory.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── lt_extension_mandatory_example.pdf │ │ └── lt_extension_mandatory_example.ppt │ ├── include │ │ ├── lt_extension_mandatory_top.h │ │ ├── lt_initiator_extension_mandatory.h │ │ └── lt_target_extension_mandatory.h │ ├── src │ │ ├── lt_extension_mandatory.cpp │ │ ├── lt_extension_mandatory_top.cpp │ │ ├── lt_initiator_extension_mandatory.cpp │ │ └── lt_target_extension_mandatory.cpp │ └── test.am │ ├── lt_mixed_endian │ ├── CMakeLists.txt │ ├── README │ ├── build-msvc │ │ ├── Makefile │ │ ├── README.txt │ │ ├── lt_mixed_endian.sln │ │ └── lt_mixed_endian.vcxproj │ ├── build-unix │ │ └── Makefile │ ├── docs │ │ ├── lt_mixed_endian_example.pdf │ │ └── lt_mixed_endian_example.ppt │ ├── include │ │ ├── initiator_top.h │ │ ├── lt_top.h │ │ └── me_traffic_generator.h │ ├── results │ │ └── input.txt │ ├── src │ │ ├── initiator_top.cpp │ │ ├── lt.cpp │ │ ├── lt_top.cpp │ │ └── me_traffic_generator.cpp │ └── test.am │ └── lt_temporal_decouple │ ├── CMakeLists.txt │ ├── README │ ├── build-msvc │ ├── Makefile │ ├── lt_temporal_decouple.sln │ └── lt_temporal_decouple.vcxproj │ ├── build-unix │ └── Makefile │ ├── docs │ ├── lt_temporal_decouple_example.pdf │ └── lt_temporal_decouple_example.ppt │ ├── include │ ├── initiator_top.h │ ├── lt_temporal_decouple_top.h │ └── td_initiator_top.h │ ├── src │ ├── initiator_top.cpp │ ├── lt_temporal_decouple.cpp │ ├── lt_temporal_decouple_top.cpp │ └── td_initiator_top.cpp │ └── test.am ├── msvc16 └── SystemC │ ├── SystemC-core.vcxproj │ ├── SystemC.props │ ├── SystemC.sln │ └── SystemC.vcxproj ├── sc_elab_patch_3_0_1.txt └── src ├── CMakeLists.txt ├── Makefile.am ├── README_TLM.txt ├── cmake_install.cmake ├── sc_elab ├── allocated_node.h ├── elab_alloc.cpp ├── elab_alloc.h ├── process_type_info.h ├── sc_tool_opts.cpp ├── sc_tool_opts.h └── sensitivity.h ├── sysc ├── Makefile.am ├── communication │ ├── files.am │ ├── sc_buffer.h │ ├── sc_clock.cpp │ ├── sc_clock.h │ ├── sc_clock_ports.h │ ├── sc_communication_ids.h │ ├── sc_event_finder.cpp │ ├── sc_event_finder.h │ ├── sc_event_queue.cpp │ ├── sc_event_queue.h │ ├── sc_export.cpp │ ├── sc_export.h │ ├── sc_fifo.h │ ├── sc_fifo_ifs.h │ ├── sc_fifo_ports.h │ ├── sc_host_mutex.h │ ├── sc_host_semaphore.h │ ├── sc_interface.cpp │ ├── sc_interface.h │ ├── sc_mutex.cpp │ ├── sc_mutex.h │ ├── sc_mutex_if.h │ ├── sc_port.cpp │ ├── sc_port.h │ ├── sc_prim_channel.cpp │ ├── sc_prim_channel.h │ ├── sc_semaphore.cpp │ ├── sc_semaphore.h │ ├── sc_semaphore_if.h │ ├── sc_signal.cpp │ ├── sc_signal.h │ ├── sc_signal_ifs.h │ ├── sc_signal_ports.cpp │ ├── sc_signal_ports.h │ ├── sc_signal_resolved.cpp │ ├── sc_signal_resolved.h │ ├── sc_signal_resolved_ports.cpp │ ├── sc_signal_resolved_ports.h │ ├── sc_signal_rv.h │ ├── sc_signal_rv_ports.h │ ├── sc_stub.h │ └── sc_writer_policy.h ├── datatypes │ ├── bit │ │ ├── sc_bit.cpp │ │ ├── sc_bit.h │ │ ├── sc_bit_ids.h │ │ ├── sc_bit_proxies.h │ │ ├── sc_bv.h │ │ ├── sc_bv_base.cpp │ │ ├── sc_bv_base.h │ │ ├── sc_logic.cpp │ │ ├── sc_logic.h │ │ ├── sc_lv.h │ │ ├── sc_lv_base.cpp │ │ ├── sc_lv_base.h │ │ └── sc_proxy.h │ ├── files.am │ ├── fx │ │ ├── fx.h │ │ ├── sc_context.h │ │ ├── sc_fix.h │ │ ├── sc_fixed.h │ │ ├── sc_fx_ids.h │ │ ├── sc_fxcast_switch.cpp │ │ ├── sc_fxcast_switch.h │ │ ├── sc_fxdefs.cpp │ │ ├── sc_fxdefs.h │ │ ├── sc_fxnum.cpp │ │ ├── sc_fxnum.h │ │ ├── sc_fxnum_observer.cpp │ │ ├── sc_fxnum_observer.h │ │ ├── sc_fxtype_params.cpp │ │ ├── sc_fxtype_params.h │ │ ├── sc_fxval.cpp │ │ ├── sc_fxval.h │ │ ├── sc_fxval_observer.cpp │ │ ├── sc_fxval_observer.h │ │ ├── sc_ufix.h │ │ ├── sc_ufixed.h │ │ ├── scfx_ieee.h │ │ ├── scfx_mant.cpp │ │ ├── scfx_mant.h │ │ ├── scfx_other_defs.h │ │ ├── scfx_params.h │ │ ├── scfx_pow10.cpp │ │ ├── scfx_pow10.h │ │ ├── scfx_rep.cpp │ │ ├── scfx_rep.h │ │ ├── scfx_string.h │ │ ├── scfx_utils.cpp │ │ └── scfx_utils.h │ ├── int │ │ ├── sc_big_ops.h │ │ ├── sc_bigint.h │ │ ├── sc_bigint_inlines.h │ │ ├── sc_biguint.h │ │ ├── sc_biguint_inlines.h │ │ ├── sc_int.h │ │ ├── sc_int32_mask.cpp │ │ ├── sc_int64_io.cpp │ │ ├── sc_int64_mask.cpp │ │ ├── sc_int_base.cpp │ │ ├── sc_int_base.h │ │ ├── sc_int_ids.h │ │ ├── sc_int_inlines.h │ │ ├── sc_length_param.cpp │ │ ├── sc_length_param.h │ │ ├── sc_nbdefs.h │ │ ├── sc_nbutils.cpp │ │ ├── sc_nbutils.h │ │ ├── sc_signed.cpp │ │ ├── sc_signed.h │ │ ├── sc_signed_friends.h │ │ ├── sc_signed_inlines.h │ │ ├── sc_signed_ops.h │ │ ├── sc_uint.h │ │ ├── sc_uint_base.cpp │ │ ├── sc_uint_base.h │ │ ├── sc_uint_inlines.h │ │ ├── sc_unsigned.cpp │ │ ├── sc_unsigned.h │ │ ├── sc_unsigned_friends.h │ │ ├── sc_unsigned_inlines.h │ │ └── sc_vector_utils.h │ └── misc │ │ ├── sc_concatref.h │ │ ├── sc_value_base.cpp │ │ └── sc_value_base.h ├── kernel │ ├── files.am │ ├── sc_attribute.cpp │ ├── sc_attribute.h │ ├── sc_cmnhdr.h │ ├── sc_constants.h │ ├── sc_cor.h │ ├── sc_cor_fiber.cpp │ ├── sc_cor_fiber.h │ ├── sc_cor_pthread.cpp │ ├── sc_cor_pthread.h │ ├── sc_cor_qt.cpp │ ├── sc_cor_qt.h │ ├── sc_cthread_process.cpp │ ├── sc_cthread_process.h │ ├── sc_dynamic_processes.h │ ├── sc_event.cpp │ ├── sc_event.h │ ├── sc_except.cpp │ ├── sc_except.h │ ├── sc_externs.h │ ├── sc_initializer_function.h │ ├── sc_join.cpp │ ├── sc_join.h │ ├── sc_kernel_ids.h │ ├── sc_macros.h │ ├── sc_main.cpp │ ├── sc_main_main.cpp │ ├── sc_method_process.cpp │ ├── sc_method_process.h │ ├── sc_module.cpp │ ├── sc_module.h │ ├── sc_module_name.cpp │ ├── sc_module_name.h │ ├── sc_module_registry.cpp │ ├── sc_module_registry.h │ ├── sc_name_gen.cpp │ ├── sc_name_gen.h │ ├── sc_object.cpp │ ├── sc_object.h │ ├── sc_object_int.h │ ├── sc_object_manager.cpp │ ├── sc_object_manager.h │ ├── sc_process.cpp │ ├── sc_process.h │ ├── sc_process_handle.h │ ├── sc_reset.cpp │ ├── sc_reset.h │ ├── sc_runnable.h │ ├── sc_runnable_int.h │ ├── sc_sensitive.cpp │ ├── sc_sensitive.h │ ├── sc_simcontext.cpp │ ├── sc_simcontext.h │ ├── sc_simcontext_int.h │ ├── sc_spawn.h │ ├── sc_spawn_options.cpp │ ├── sc_spawn_options.h │ ├── sc_stage_callback_if.h │ ├── sc_stage_callback_registry.cpp │ ├── sc_stage_callback_registry.h │ ├── sc_status.h │ ├── sc_thread_process.cpp │ ├── sc_thread_process.h │ ├── sc_time.cpp │ ├── sc_time.h │ ├── sc_ver.cpp │ ├── sc_ver.h │ ├── sc_wait.cpp │ ├── sc_wait.h │ ├── sc_wait_cthread.cpp │ └── sc_wait_cthread.h ├── packages │ ├── qt.am │ └── qt │ │ ├── CHANGES │ │ ├── INSTALL │ │ ├── Makefile.am │ │ ├── Makefile.base │ │ ├── README │ │ ├── README.MISC │ │ ├── README.PORT │ │ ├── b.h │ │ ├── config │ │ ├── copyright.h │ │ ├── md │ │ ├── aarch64.h │ │ ├── aarch64.s │ │ ├── axp.1.Makefile │ │ ├── axp.2.Makefile │ │ ├── axp.Makefile │ │ ├── axp.README │ │ ├── axp.c │ │ ├── axp.h │ │ ├── axp.s │ │ ├── axp_b.s │ │ ├── default.Makefile │ │ ├── hppa-cnx.Makefile │ │ ├── hppa.Makefile │ │ ├── hppa.h │ │ ├── hppa.s │ │ ├── hppa_b.s │ │ ├── i386.README │ │ ├── i386.h │ │ ├── i386.s │ │ ├── i386_b.s │ │ ├── iX86_64.h │ │ ├── iX86_64.s │ │ ├── ksr1.Makefile │ │ ├── ksr1.h │ │ ├── ksr1.s │ │ ├── ksr1_b.s │ │ ├── m88k.Makefile │ │ ├── m88k.c │ │ ├── m88k.h │ │ ├── m88k.s │ │ ├── m88k_b.s │ │ ├── mips-irix5.s │ │ ├── mips.h │ │ ├── mips.s │ │ ├── mips_b.s │ │ ├── multi.s │ │ ├── null.README │ │ ├── null.c │ │ ├── null.s │ │ ├── powerpc.README │ │ ├── powerpc.c │ │ ├── powerpc_mach.h │ │ ├── powerpc_mach.s │ │ ├── powerpc_mach_b.s │ │ ├── powerpc_sys5.h │ │ ├── powerpc_sys5.s │ │ ├── powerpc_sys5_b.s │ │ ├── pthreads.Makefile │ │ ├── solaris.README │ │ ├── sparc.h │ │ ├── sparc.s │ │ ├── sparc_b.s │ │ ├── vax.h │ │ ├── vax.s │ │ └── vax_b.s │ │ ├── meas.c │ │ ├── qt.c │ │ ├── qt.h │ │ ├── qtmd.h │ │ ├── stp.c │ │ ├── stp.h │ │ └── time │ │ ├── README.time │ │ ├── assim │ │ ├── cswap │ │ ├── go │ │ ├── init │ │ ├── prim │ │ └── raw ├── tracing │ ├── files.am │ ├── sc_trace.cpp │ ├── sc_trace.h │ ├── sc_trace_file_base.cpp │ ├── sc_trace_file_base.h │ ├── sc_tracing_ids.h │ ├── sc_vcd_trace.cpp │ ├── sc_vcd_trace.h │ ├── sc_wif_trace.cpp │ └── sc_wif_trace.h └── utils │ ├── files.am │ ├── sc_hash.cpp │ ├── sc_hash.h │ ├── sc_iostream.h │ ├── sc_list.cpp │ ├── sc_list.h │ ├── sc_machine.h │ ├── sc_mempool.cpp │ ├── sc_mempool.h │ ├── sc_pq.cpp │ ├── sc_pq.h │ ├── sc_ptr_flag.h │ ├── sc_pvector.h │ ├── sc_report.cpp │ ├── sc_report.h │ ├── sc_report_handler.cpp │ ├── sc_report_handler.h │ ├── sc_stop_here.cpp │ ├── sc_stop_here.h │ ├── sc_string.h │ ├── sc_string_view.h │ ├── sc_temporary.h │ ├── sc_utils_ids.cpp │ ├── sc_utils_ids.h │ ├── sc_vector.cpp │ └── sc_vector.h ├── systemc ├── systemc.h ├── systemc.pc.in ├── tlm ├── tlm.h ├── tlm.pc.in ├── tlm_core ├── Makefile.am ├── tlm_1 │ ├── README.txt │ ├── tlm_analysis │ │ ├── tlm_analysis.h │ │ ├── tlm_analysis_fifo.h │ │ ├── tlm_analysis_if.h │ │ ├── tlm_analysis_port.h │ │ ├── tlm_analysis_triple.h │ │ └── tlm_write_if.h │ └── tlm_req_rsp │ │ ├── tlm_1_interfaces │ │ ├── tlm_core_ifs.h │ │ ├── tlm_fifo_ifs.h │ │ ├── tlm_master_slave_ifs.h │ │ └── tlm_tag.h │ │ ├── tlm_adapters │ │ └── tlm_adapters.h │ │ ├── tlm_channels │ │ ├── tlm_fifo │ │ │ ├── circular_buffer.h │ │ │ ├── tlm_fifo.h │ │ │ ├── tlm_fifo_peek.h │ │ │ ├── tlm_fifo_put_get.h │ │ │ └── tlm_fifo_resize.h │ │ └── tlm_req_rsp_channels │ │ │ ├── tlm_put_get_imp.h │ │ │ └── tlm_req_rsp_channels.h │ │ ├── tlm_ports │ │ ├── tlm_event_finder.h │ │ └── tlm_nonblocking_port.h │ │ └── tlm_req_rsp.h └── tlm_2 │ ├── README.txt │ ├── tlm_2_interfaces │ ├── tlm_2_interfaces.h │ ├── tlm_dmi.h │ └── tlm_fw_bw_ifs.h │ ├── tlm_generic_payload │ ├── tlm_array.h │ ├── tlm_endian_conv.h │ ├── tlm_generic_payload.h │ ├── tlm_gp.cpp │ ├── tlm_gp.h │ ├── tlm_helpers.h │ ├── tlm_phase.cpp │ └── tlm_phase.h │ ├── tlm_quantum │ ├── tlm_global_quantum.cpp │ ├── tlm_global_quantum.h │ └── tlm_quantum.h │ ├── tlm_sockets │ ├── tlm_base_socket_if.h │ ├── tlm_initiator_socket.h │ ├── tlm_sockets.h │ └── tlm_target_socket.h │ └── tlm_version.h └── tlm_utils ├── Makefile.am ├── README.txt ├── convenience_socket_bases.cpp ├── convenience_socket_bases.h ├── instance_specific_extensions.cpp ├── instance_specific_extensions.h ├── instance_specific_extensions_int.h ├── multi_passthrough_initiator_socket.h ├── multi_passthrough_target_socket.h ├── multi_socket_bases.h ├── passthrough_target_socket.h ├── peq_with_cb_and_phase.h ├── peq_with_get.h ├── simple_initiator_socket.h ├── simple_target_socket.h └── tlm_quantumkeeper.h /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. 3 | 4 | ## Reporting a Vulnerability 5 | Please report any security vulnerabilities in this project utilizing the guidelines [here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html). 6 | -------------------------------------------------------------------------------- /cmake/CMakeLists.top: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | # 8 | # Intel(r) Compiler for SystemC*, version 1.6.10 9 | # 10 | # ***************************************************************************** 11 | 12 | cmake_minimum_required(VERSION 3.12) 13 | project (icsc_designs) 14 | 15 | ## C++ standard 16 | set(CMAKE_CXX_STANDARD 20) 17 | 18 | enable_testing() 19 | 20 | ## SVC package contains ICSC and SystemC libraries 21 | find_package(SVC REQUIRED) 22 | 23 | ## Add examples, tests and user designs 24 | add_subdirectory(designs/examples) 25 | #add_subdirectory(designs/tests) 26 | #add_subdirectory(designs/single_source) 27 | #add_subdirectory(designs/template) -------------------------------------------------------------------------------- /cmake/setenv.sh: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020-2024, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | # 8 | # Intel(r) Compiler for SystemC*, version 1.6.10 9 | # 10 | # ***************************************************************************** 11 | 12 | # Setup environment to run examples, tests and user designs 13 | 14 | #!/bin/bash 15 | export SHELL=/bin/sh 16 | 17 | export LLVM_VER=18.1.8 18 | export ICSC_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 19 | 20 | export CMAKE_PREFIX_PATH=$ICSC_HOME 21 | export PATH=$ICSC_HOME/bin:$ICSC_HOME/include:$PATH 22 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ICSC_HOME/lib64:$ICSC_HOME/lib 23 | export SYSTEMC_HOME=$ICSC_HOME 24 | 25 | -------------------------------------------------------------------------------- /components/common/sct_assert.patch: -------------------------------------------------------------------------------- 1 | --- sc_process.h 2020-10-16 04:28:17.408738000 -0700 2 | +++ sc_process.h_last 2020-03-23 10:38:36.000000000 -0700 3 | @@ -356,6 +356,7 @@ 4 | inline sc_curr_proc_kind proc_kind() const; 5 | sc_event& reset_event(); 6 | sc_event& terminated_event(); 7 | + const std::vector& get_static_events() {return m_static_events;} 8 | 9 | public: 10 | static inline sc_process_handle last_created_process_handle(); 11 | -------------------------------------------------------------------------------- /components/common/sctcommon/sct_common.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2023, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /* 9 | * SystemC common library include required headers. 10 | * 11 | * Author: Mikhail Moiseev, Leonid Azarenkov 12 | */ 13 | 14 | #ifndef SCT_COMMON_H 15 | #define SCT_COMMON_H 16 | 17 | #include "sct_assert.h" 18 | 19 | #include "sct_ipc_if.h" 20 | 21 | #include "sct_target.h" 22 | #include "sct_initiator.h" 23 | #include "sct_fifo.h" 24 | #include "sct_buffer.h" 25 | #include "sct_pipe.h" 26 | #include "sct_signal.h" 27 | #include "sct_register.h" 28 | #include "sct_ports.h" 29 | 30 | #include "sct_clock.h" 31 | 32 | #include "sct_static_log.h" 33 | #include "sct_sel_type.h" 34 | 35 | using namespace sct; 36 | 37 | #endif /* SCT_COMMON_H */ 38 | 39 | -------------------------------------------------------------------------------- /components/common/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(sct_assert) 2 | add_subdirectory(sct_fifo_shared) 3 | add_subdirectory(sct_simple) 4 | add_subdirectory(sct_pipe) -------------------------------------------------------------------------------- /components/common/test/sct_pipe/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Single source testbench for sct_pipe and others 3 | # 4 | 5 | if (RTL_MODE_TESTS) 6 | add_executable(sct_pipe_single-rtl sc_main.cpp) 7 | target_compile_definitions(sct_pipe_single-rtl PUBLIC SINGLE) 8 | add_test(NAME sct_pipe_single-rtl COMMAND sct_pipe_single-rtl) 9 | endif() 10 | 11 | if (TLM_MODE_TESTS) 12 | add_executable(sct_pipe_single-tlm sc_main.cpp) 13 | target_compile_definitions(sct_pipe_single-tlm PUBLIC SINGLE SCT_TLM_MODE) 14 | add_test(NAME sct_pipe_single-tlm COMMAND sct_pipe_single-tlm) 15 | endif() 16 | -------------------------------------------------------------------------------- /components/common/test/sct_pipe/sc_main.cpp: -------------------------------------------------------------------------------- 1 | #include "single_test.h" 2 | #include 3 | 4 | class Test_top : public sc_module 5 | { 6 | public: 7 | sc_clock clk{"clk", 1, SC_NS}; 8 | sc_signal nrst{"nrst"}; 9 | 10 | simple_test dut{"dut"}; 11 | 12 | SC_CTOR(Test_top) { 13 | dut.clk(clk); 14 | dut.nrst(nrst); 15 | 16 | SC_CTHREAD(testProc, clk); 17 | } 18 | 19 | void testProc() { 20 | nrst = 0; 21 | wait(2); 22 | nrst = 1; 23 | wait(1000); 24 | 25 | cout << endl; 26 | cout << "--------------------------------" << endl; 27 | cout << "| Test passed OK |" << endl; 28 | cout << "--------------------------------" << endl; 29 | sc_stop(); 30 | } 31 | }; 32 | 33 | int sc_main(int argc, char* argv[]) 34 | { 35 | Test_top test_top{"test_top"}; 36 | sc_start(); 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /contributing.md: -------------------------------------------------------------------------------- 1 | Welcome to Intel Compiler to SystemC community! 2 | 3 | We appreciate any kind of contributions, including: 4 | * SystemC unit tests to demonstrate and check ICSC features, 5 | * SystemC designs to use as illustrative example or best design practices, 6 | * Found issues, not-supported SystemC or incorrect SystemVerilog code generated, 7 | * Found incorrect or unclear text in the [user guide](https://github.com/intel/systemc-compiler/blob/main/doc/ug.pdf) or at [wiki pages](https://github.com/intel/systemc-compiler/wiki), 8 | * Feature requests, ideally with a piece of code to explain the feature. 9 | 10 | Please submit your code with a [pull request](https://github.com/intel/systemc-compiler/pulls). 11 | 12 | To get help please [submit your question or issue](https://github.com/intel/systemc-compiler/issues). 13 | -------------------------------------------------------------------------------- /designs/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | cmake_minimum_required(VERSION 3.12) 9 | 10 | enable_testing() 11 | 12 | if(NOT DEFINED ENV{ICSC_HOME}) 13 | message("ICSC_HOME is not defined!") 14 | return() 15 | endif() 16 | 17 | project(icsc_examples) 18 | 19 | ## SVC package contains ScTool and SystemC libraries 20 | find_package(SVC REQUIRED) 21 | 22 | # C++ standard must be the same as in ScTool, $(SystemC_CXX_STANDARD) contains 20 23 | set(CMAKE_CXX_STANDARD 20) 24 | 25 | add_subdirectory(asserts) 26 | add_subdirectory(counter) 27 | add_subdirectory(decoder) 28 | add_subdirectory(dma) 29 | add_subdirectory(dm_paranut) 30 | add_subdirectory(dvcon20) 31 | add_subdirectory(fsm) 32 | add_subdirectory(intrinsic) 33 | add_subdirectory(latch_ff) 34 | 35 | add_subdirectory(sct_fifo) 36 | add_subdirectory(sct_initiator) 37 | add_subdirectory(sct_target) 38 | add_subdirectory(sct_signal) 39 | add_subdirectory(sct_always_ready) 40 | -------------------------------------------------------------------------------- /designs/examples/asserts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | # Example immediate assertions (sct_assert) 9 | 10 | # All synthesizable source files must be listed here (not in libraries) 11 | add_executable(imm_assert imm_assert.cpp) 12 | add_executable(temp_assert temp_assert.cpp) 13 | 14 | # Test source directory 15 | target_include_directories(imm_assert PUBLIC 16 | $ENV{ICSC_HOME}/examples/asserts 17 | ) 18 | target_include_directories(temp_assert PUBLIC 19 | $ENV{ICSC_HOME}/examples/asserts 20 | ) 21 | 22 | svc_target(imm_assert ELAB_TOP tb_mod.assert_mod) 23 | svc_target(temp_assert ELAB_TOP tb_mod.assert_mod) 24 | -------------------------------------------------------------------------------- /designs/examples/counter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | # Example counter 9 | project(counter) 10 | 11 | # All synthesizable source files must be listed here (not in libraries) 12 | add_executable(counter example.cpp) 13 | 14 | # Test source directory 15 | target_include_directories(counter PUBLIC $ENV{ICSC_HOME}/examples/counter) 16 | 17 | # Add compilation options 18 | # target_compile_definitions(example PUBLIC -DMYOPTION) 19 | # target_compile_options(example PUBLIC -Wall) 20 | 21 | # Add optional library, no add SystemC library (it added by svc_target) 22 | #target_link_libraries(example sometestbenchlibrary) 23 | 24 | # svc_target will create @example_sctool executable that runs code generation 25 | # and @example that runs general SystemC simulation 26 | # ELAB_TOP parameter accepts hierarchical name of DUT 27 | # (that is SystemC name, returned by sc_object::name() method) 28 | svc_target(counter ELAB_TOP tb.dut_inst) -------------------------------------------------------------------------------- /designs/examples/counter/dut.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | struct Dut : sc_module 11 | { 12 | sc_in clk{"clk"}; 13 | sc_in rstn{"rstn"}; 14 | sc_out > counter{"counter"}; 15 | sc_out even{"even"}; 16 | 17 | SC_CTOR(Dut) 18 | { 19 | SC_CTHREAD(threadProc, clk.pos()); 20 | async_reset_signal_is(rstn, false); 21 | 22 | SC_METHOD(methodProc); 23 | sensitive << counter; 24 | } 25 | 26 | void threadProc() { 27 | counter = 0; 28 | wait(); 29 | while(1) { 30 | counter = counter.read() + 1; 31 | wait(); 32 | } 33 | } 34 | 35 | void methodProc() { 36 | even = counter.read() % 2; 37 | } 38 | 39 | }; -------------------------------------------------------------------------------- /designs/examples/decoder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | # Example encoder and decoder 9 | project(decoder) 10 | 11 | # All synthesizable source files must be listed here (not in libraries) 12 | add_executable(decoder example.cpp) 13 | 14 | # Test source directory 15 | target_include_directories(decoder PUBLIC 16 | $ENV{ICSC_HOME}/examples/decoder 17 | ) 18 | 19 | # Add compilation options 20 | # target_compile_options(${PROJECT_NAME} PUBLIC -Wall) 21 | 22 | # Add optional library, no add SystemC library (it added by svc_target) 23 | #target_link_libraries(${PROJECT_NAME} sometestbenchlibrary) 24 | 25 | # svc_target will create ${PROJECT_NAME}_sctool executable that runs code generation 26 | # and ${PROJECT_NAME} that runs general SystemC simulation 27 | # ELAB_TOP parameter accepts hierarchical name of design 28 | # (that is SystemC name, returned by sc_object::name() method) 29 | svc_target(decoder ELAB_TOP tb.dut_inst) 30 | -------------------------------------------------------------------------------- /designs/examples/dvcon20/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(dvcon_simple test_simple.cpp) 2 | svc_target(dvcon_simple ELAB_TOP tb.dut) 3 | 4 | add_executable(dvcon_fifo test_fifo.cpp) 5 | svc_target(dvcon_fifo ELAB_TOP tb.dut GOLDEN dvcon_fifo.sv) 6 | 7 | -------------------------------------------------------------------------------- /designs/examples/fsm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | # Example FSM implementation 9 | project(fsm) 10 | 11 | # All synthesizable source files must be listed here (not in libraries) 12 | add_executable(fsm example.cpp) 13 | 14 | # Test source directory 15 | target_include_directories(fsm PUBLIC 16 | $ENV{ICSC_HOME}/examples/fsm 17 | ) 18 | 19 | # Add compilation options 20 | # target_compile_options(${PROJECT_NAME} PUBLIC -Wall) 21 | 22 | # Add optional library, no add SystemC library (it added by svc_target) 23 | #target_link_libraries(${PROJECT_NAME} sometestbenchlibrary) 24 | 25 | # svc_target will create ${PROJECT_NAME}_sctool executable that runs code generation 26 | # and ${PROJECT_NAME} that runs general SystemC simulation 27 | # ELAB_TOP parameter accepts hierarchical name of design 28 | # (that is SystemC name, returned by sc_object::name() method) 29 | svc_target(fsm ELAB_TOP tb.dut_inst) 30 | -------------------------------------------------------------------------------- /designs/examples/fsm/example.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "dut.h" 9 | #include 10 | 11 | // SVC requires DUT top should be instantiated inside wrapper (typically TB) 12 | // and all DUT ports are bound. 13 | struct Tb : sc_module 14 | { 15 | sc_clock clk{"clk", sc_time(1, SC_NS)}; 16 | sc_signal rst{"rst"}; 17 | sc_signal> a; 18 | sc_signal> zs; 19 | sc_signal> zv; 20 | 21 | Dut dut_inst{"dut_inst"}; 22 | 23 | SC_CTOR(Tb) 24 | { 25 | dut_inst.clk(clk); 26 | dut_inst.rst(rst); 27 | dut_inst.a(a); 28 | dut_inst.zs(zs); 29 | dut_inst.zv(zv); 30 | } 31 | }; 32 | 33 | int sc_main (int argc, char **argv) 34 | { 35 | Tb tb("tb"); 36 | sc_start(); 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /designs/examples/int_error/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | # Example counter 9 | project(int_error) 10 | 11 | # All synthesizable source files must be listed here (not in libraries) 12 | add_executable(int_error example.cpp) 13 | 14 | # Test source directory 15 | target_include_directories(int_error PUBLIC $ENV{ICSC_HOME}/examples/counter) 16 | 17 | # Add compilation options 18 | # target_compile_definitions(example PUBLIC -DMYOPTION) 19 | # target_compile_options(example PUBLIC -Wall) 20 | 21 | # Add optional library, no add SystemC library (it added by svc_target) 22 | #target_link_libraries(example sometestbenchlibrary) 23 | 24 | # svc_target will create @example_sctool executable that runs code generation 25 | # and @example that runs general SystemC simulation 26 | # ELAB_TOP parameter accepts hierarchical name of DUT 27 | # (that is SystemC name, returned by sc_object::name() method) 28 | svc_target(int_error ELAB_TOP dut WILL_FAIL) -------------------------------------------------------------------------------- /designs/examples/int_error/example.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "systemc.h" 9 | 10 | // Internal error reporting 11 | struct Dut : sc_module 12 | { 13 | // Dangling pointer 14 | sc_uint<4>* x; 15 | sc_signal s; 16 | 17 | SC_CTOR(Dut) 18 | { 19 | SC_METHOD(methodProc); 20 | sensitive << s; 21 | } 22 | 23 | void methodProc() { 24 | if (x) { 25 | int i = 42; 26 | } 27 | } 28 | 29 | }; 30 | 31 | int sc_main (int argc, char **argv) 32 | { 33 | Dut dut("dut"); 34 | sc_start(); 35 | return 0; 36 | } -------------------------------------------------------------------------------- /designs/examples/intrinsic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | # Example Verilog code intrinsic 9 | project(intrinsic) 10 | 11 | # All synthesizable source files must be listed here (not in libraries) 12 | add_executable(intrinsic verilog_intrinsic.cpp) 13 | 14 | # Test source directory 15 | target_include_directories(intrinsic PUBLIC 16 | $ENV{ICSC_HOME}/examples/intrinsic 17 | ) 18 | 19 | # Add compilation options 20 | # target_compile_options(${PROJECT_NAME} PUBLIC -Wall) 21 | 22 | # Add optional library, no add SystemC library (it added by svc_target) 23 | #target_link_libraries(${PROJECT_NAME} sometestbenchlibrary) 24 | 25 | # svc_target will create ${PROJECT_NAME}_sctool executable that runs code generation 26 | # and ${PROJECT_NAME} that runs general SystemC simulation 27 | # ELAB_TOP parameter accepts hierarchical name of design 28 | # (that is SystemC name, returned by sc_object::name() method) 29 | svc_target(intrinsic ELAB_TOP top) 30 | -------------------------------------------------------------------------------- /designs/examples/latch_ff/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | # Example latch and FF 9 | project(latch_ff) 10 | 11 | # All synthesizable source files must be listed here (not in libraries) 12 | add_executable(latch_ff example.cpp) 13 | 14 | # Test source directory 15 | target_include_directories(latch_ff PUBLIC 16 | $ENV{ICSC_HOME}/examples/latch_ff 17 | ) 18 | 19 | # Add compilation options 20 | # target_compile_options(${PROJECT_NAME} PUBLIC -Wall) 21 | 22 | # Add optional library, no add SystemC library (it added by svc_target) 23 | #target_link_libraries(${PROJECT_NAME} sometestbenchlibrary) 24 | 25 | # svc_target will create ${PROJECT_NAME}_sctool executable that runs code generation 26 | # and ${PROJECT_NAME} that runs general SystemC simulation 27 | # ELAB_TOP parameter accepts hierarchical name of design 28 | # (that is SystemC name, returned by sc_object::name() method) 29 | svc_target(latch_ff ELAB_TOP tb.dut_inst) 30 | -------------------------------------------------------------------------------- /designs/examples/sct_always_ready/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | add_executable(sct_always_ready_meth sc_main.cpp) 9 | svc_target(sct_always_ready_meth ELAB_TOP test_top.dut GOLDEN sct_always_ready_meth.sv) 10 | 11 | add_executable(sct_always_ready_thread sc_main.cpp) 12 | target_compile_definitions(sct_always_ready_thread PUBLIC -DTHREAD) 13 | svc_target(sct_always_ready_thread ELAB_TOP test_top.dut GOLDEN sct_always_ready_thread.sv) 14 | 15 | -------------------------------------------------------------------------------- /designs/examples/sct_always_ready/sc_main.cpp: -------------------------------------------------------------------------------- 1 | #ifdef THREAD 2 | #include "thread_test.h" 3 | #else 4 | #include "method_test.h" 5 | #endif 6 | #include 7 | 8 | class Test_top : public sc_module 9 | { 10 | public: 11 | sc_clock clk{"clk", 1, SC_NS}; 12 | sc_signal nrst{"nrst"}; 13 | 14 | simple_test dut{"dut"}; 15 | 16 | SC_CTOR(Test_top) { 17 | dut.clk(clk); 18 | dut.nrst(nrst); 19 | 20 | SC_CTHREAD(testProc, clk); 21 | } 22 | 23 | void testProc() { 24 | nrst = 0; 25 | wait(); 26 | nrst = 1; 27 | wait(100); 28 | 29 | cout << endl; 30 | cout << "--------------------------------" << endl; 31 | cout << "| Test passed OK |" << endl; 32 | cout << "--------------------------------" << endl; 33 | sc_stop(); 34 | } 35 | }; 36 | 37 | int sc_main(int argc, char* argv[]) 38 | { 39 | Test_top test_top{"test_top"}; 40 | sc_start(); 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /designs/examples/sct_fifo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | add_executable(sct_fifo_shared sc_main.cpp) 9 | target_compile_definitions(sct_fifo_shared PUBLIC -DSHARED) 10 | svc_target(sct_fifo_shared ELAB_TOP test_top.dut GOLDEN sct_fifo_shared.sv) 11 | 12 | add_executable(sct_fifo_single sc_main.cpp) 13 | target_compile_definitions(sct_fifo_single PUBLIC -DSINGLE) 14 | svc_target(sct_fifo_single ELAB_TOP test_top.dut GOLDEN sct_fifo_single.sv) 15 | 16 | add_executable(sct_target_fifo sc_main.cpp) 17 | target_compile_definitions(sct_target_fifo PUBLIC -DTARGET_FIFO -DMETHOD) 18 | svc_target(sct_target_fifo ELAB_TOP test_top.dut GOLDEN sct_target_fifo.sv) 19 | -------------------------------------------------------------------------------- /designs/examples/sct_initiator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | ## Initiator used in THREAD 9 | add_executable(sct_initiator_thread sc_main.cpp) 10 | svc_target(sct_initiator_thread ELAB_TOP test_top.dut GOLDEN sct_initiator_thread.sv) 11 | -------------------------------------------------------------------------------- /designs/examples/sct_signal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | add_executable(sct_signal sc_main.cpp) 9 | target_compile_definitions(sct_signal PUBLIC -DSIGNAL) 10 | svc_target(sct_signal ELAB_TOP test_top.dut GOLDEN sct_signal.sv) 11 | 12 | add_executable(sct_in_out_ports sc_main.cpp) 13 | target_compile_definitions(sct_in_out_ports PUBLIC -DPORT) 14 | svc_target(sct_in_out_ports ELAB_TOP test_top.dut GOLDEN sct_in_out_ports.sv) 15 | -------------------------------------------------------------------------------- /designs/examples/sct_target/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | ## Target used in METHOD 9 | add_executable(sct_target_method sc_main.cpp) 10 | svc_target(sct_target_method ELAB_TOP test_top.dut GOLDEN sct_target_method.sv) 11 | -------------------------------------------------------------------------------- /designs/single_source/sct_pipe/sc_main.cpp: -------------------------------------------------------------------------------- 1 | #include "single_test.h" 2 | #include 3 | 4 | class Test_top : public sc_module 5 | { 6 | public: 7 | sc_clock clk{"clk", 1, SC_NS}; 8 | sc_signal nrst{"nrst"}; 9 | 10 | simple_test dut{"dut"}; 11 | 12 | SC_CTOR(Test_top) { 13 | dut.clk(clk); 14 | dut.nrst(nrst); 15 | 16 | SC_CTHREAD(testProc, clk); 17 | } 18 | 19 | void testProc() { 20 | nrst = 0; 21 | wait(2); 22 | nrst = 1; 23 | wait(1000); 24 | 25 | cout << endl; 26 | cout << "--------------------------------" << endl; 27 | cout << "| Test passed OK |" << endl; 28 | cout << "--------------------------------" << endl; 29 | sc_stop(); 30 | } 31 | }; 32 | 33 | int sc_main(int argc, char* argv[]) 34 | { 35 | Test_top test_top{"test_top"}; 36 | sc_start(); 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /designs/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(const_prop) 2 | add_subdirectory(cthread) 3 | add_subdirectory(method) 4 | add_subdirectory(mif) 5 | add_subdirectory(misc) 6 | add_subdirectory(record) 7 | add_subdirectory(state) 8 | add_subdirectory(uniquify) 9 | 10 | -------------------------------------------------------------------------------- /designs/tests/const_prop/test_const_prop_eval_stmts.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 7/26/18. 10 | // 11 | 12 | #include 13 | #include 14 | 15 | 16 | SC_MODULE(top) { 17 | 18 | SC_CTOR(top) { 19 | SC_METHOD(test_method); 20 | sensitive << din; 21 | } 22 | 23 | sc_signal din {"din",1}; 24 | 25 | void test_method () { 26 | 27 | for (size_t i = 0; i < 2; ++i) { 28 | } 29 | 30 | int x = 1; 31 | if (x) { 32 | 33 | } 34 | 35 | if (din) { 36 | if(x) { 37 | 38 | } 39 | 40 | } else { 41 | if (!x) { 42 | 43 | } 44 | 45 | } 46 | 47 | } 48 | 49 | }; 50 | 51 | int sc_main (int argc, char ** argv ) { 52 | 53 | top t_inst{"t_inst"}; 54 | sc_start(); 55 | 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /designs/tests/const_prop/test_const_prop_float.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 7/30/18. 10 | // 11 | 12 | #include 13 | #include 14 | 15 | 16 | SC_MODULE(top) { 17 | 18 | SC_CTOR(top) { 19 | SC_METHOD(test_float); 20 | } 21 | 22 | const float cf = 12.1; 23 | 24 | void test_float () { 25 | int x = 3.14; 26 | int k = 3.14f; 27 | 28 | double y = 0; 29 | float z = 0; 30 | 31 | cout << "test_float done\n"; 32 | } 33 | 34 | }; 35 | 36 | int sc_main (int argc, char ** argv ) { 37 | 38 | top t_inst{"t_inst"}; 39 | sc_start(); 40 | 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /designs/tests/const_prop/test_const_prop_fork_break.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 7/9/18. 10 | // 11 | 12 | #include 13 | #include 14 | 15 | SC_MODULE(top) { 16 | 17 | SC_CTOR(top) { 18 | SC_METHOD(test_method); 19 | } 20 | 21 | sc_signal din{"din"}; 22 | 23 | void test_method() { 24 | 25 | int x = 0; 26 | int y = 0; 27 | int z = 0; 28 | 29 | for (size_t i = 0; i < 10; ++i) { 30 | x++; 31 | y = 1; 32 | if (din) 33 | break; 34 | z = 1; 35 | } 36 | 37 | sct_assert_unknown(x); 38 | sct_assert_unknown(z); 39 | sct_assert_const(y == 1); 40 | 41 | } 42 | 43 | }; 44 | 45 | int sc_main (int argc, char ** argv ) { 46 | 47 | top t_inst{"t_inst"}; 48 | sc_start(); 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /designs/tests/const_prop/test_const_prop_inner_loop_wait.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 7/10/18. 10 | // 11 | 12 | #include 13 | #include 14 | 15 | SC_MODULE(top) { 16 | 17 | sc_in clk; 18 | sc_signal nrst; 19 | 20 | SC_CTOR(top) { 21 | SC_CTHREAD(test_thread, clk.pos()); 22 | async_reset_signal_is(nrst, 0); 23 | } 24 | 25 | sc_signal din; 26 | 27 | int x; 28 | 29 | void test_thread() { 30 | while (1) { 31 | 32 | for (size_t i = 0; i < 2; ++i) { 33 | wait(); 34 | } 35 | 36 | } 37 | 38 | } 39 | 40 | }; 41 | 42 | int sc_main (int argc, char ** argv ) { 43 | 44 | sc_clock clk{"clk", 10, SC_NS}; 45 | top top_inst{"top_inst"}; 46 | top_inst.clk(clk); 47 | sc_start(100, SC_NS); 48 | 49 | return 0; 50 | } 51 | 52 | -------------------------------------------------------------------------------- /designs/tests/const_prop/test_const_prop_recursive.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 7/15/18. 10 | // 11 | 12 | 13 | -------------------------------------------------------------------------------- /designs/tests/const_prop/test_nonsynth_cant_unroll.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 7/9/18. 10 | // 11 | 12 | #include 13 | #include 14 | 15 | SC_MODULE(top) { 16 | 17 | sc_clock clk_gen{"clk_gen", 10 , SC_NS}; 18 | 19 | SC_CTOR(top) { 20 | SC_METHOD(test_method); 21 | } 22 | 23 | sc_signal din{"din", true}; 24 | 25 | void test_method() { 26 | 27 | int x = 0; 28 | 29 | for (size_t i = 0; i < 1000000; ++i) { 30 | x++; 31 | } 32 | 33 | } 34 | 35 | 36 | }; 37 | 38 | int sc_main (int argc, char ** argv ) { 39 | 40 | top t_inst{"t_inst"}; 41 | sc_start(100, SC_NS); 42 | 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /designs/tests/cthread/cthread_simple_reset.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: A () 11 | // 12 | module A // "a_mod" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | // Variables generated for SystemC signals 18 | 19 | //------------------------------------------------------------------------------ 20 | // Clocked THREAD: simple_rst (test_cthread_simple_reset.cpp:32:5) 21 | // Empty process, no code generated 22 | 23 | //------------------------------------------------------------------------------ 24 | // Clocked THREAD: simple_rst_p (test_cthread_simple_reset.cpp:40:5) 25 | // Empty process, no code generated 26 | 27 | endmodule 28 | 29 | 30 | -------------------------------------------------------------------------------- /designs/tests/cthread/test_cthread_wait_n_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | // wait(N) where N is unknown 11 | SC_MODULE(test_mod) { 12 | 13 | sc_signal clk{"clk"}; 14 | sc_signal rstn{"rstn"}; 15 | 16 | SC_CTOR(test_mod) { 17 | SC_CTHREAD(wait_n_inf, clk); 18 | async_reset_signal_is(rstn, false); 19 | } 20 | 21 | sc_signal s; 22 | void wait_n_inf() 23 | { 24 | unsigned n = s.read(); 25 | wait(); 26 | 27 | while (1) { 28 | wait(n); 29 | } 30 | } 31 | }; 32 | 33 | 34 | int sc_main(int argc, char **argv) { 35 | test_mod tmod{"tmod"}; 36 | sc_start(); 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /designs/tests/cthread/test_cthread_wait_n_fail2.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | // wait(N) where N is not constant, changed at next loop iteration, failed 11 | SC_MODULE(test_mod) { 12 | 13 | sc_signal clk{"clk"}; 14 | sc_signal rstn{"rstn"}; 15 | 16 | SC_CTOR(test_mod) { 17 | SC_CTHREAD(wait_n_inf, clk); 18 | async_reset_signal_is(rstn, false); 19 | } 20 | 21 | void wait_n_inf() 22 | { 23 | sc_uint<10> n = 1; 24 | wait(); 25 | 26 | while (1) { 27 | wait(n); 28 | n++; 29 | } 30 | } 31 | }; 32 | 33 | 34 | int sc_main(int argc, char **argv) { 35 | test_mod tmod{"tmod"}; 36 | sc_start(); 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /designs/tests/method/method_enum.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.5.12 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: test_enum () 11 | // 12 | module test_enum // "tenum" 13 | ( 14 | ); 15 | 16 | // Variables generated for SystemC signals 17 | 18 | // Local parameters generated for C++ constants 19 | localparam logic [7:0] nm = 3; 20 | 21 | //------------------------------------------------------------------------------ 22 | // Method process: test_method (test_enum.cpp:28:5) 23 | 24 | // Process-local variables 25 | logic [31:0] color; 26 | 27 | always_comb 28 | begin : test_method // test_enum.cpp:28:5 29 | integer icolor; 30 | logic [1:0] dir; 31 | integer x; 32 | color = 1; 33 | icolor = 3; 34 | dir = 1; 35 | x = 0; 36 | x = 1; 37 | end 38 | 39 | endmodule 40 | 41 | 42 | -------------------------------------------------------------------------------- /designs/tests/method/method_port_array_bind.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.3 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | -------------------------------------------------------------------------------- /designs/tests/method/method_trace.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.5.12 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: ports_arrays () 11 | // 12 | module ports_arrays // "PORT_ARRAY" 13 | ( 14 | input logic [1:0] a[4], 15 | input logic [1:0] b[4], 16 | output logic [2:0] o[4] 17 | ); 18 | 19 | //------------------------------------------------------------------------------ 20 | // Method process: body (test_trace.cpp:38:3) 21 | 22 | always_comb 23 | begin : body // test_trace.cpp:38:3 24 | integer i; 25 | for (i = 0; i < 4; i++) 26 | begin 27 | o[i] = a[i] + b[i]; 28 | end 29 | end 30 | 31 | endmodule 32 | 33 | 34 | -------------------------------------------------------------------------------- /designs/tests/method/test_bitwise_not_bool_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "systemc.h" 9 | #include "sct_assert.h" 10 | 11 | 12 | // Bitwise not for boolean, error reported 13 | class A : public sc_module 14 | { 15 | public: 16 | sc_signal s{"s"}; 17 | 18 | SC_CTOR(A) 19 | { 20 | SC_METHOD(test_bool_bitwise); 21 | sensitive << s; 22 | } 23 | 24 | void test_bool_bitwise() { 25 | bool b = s.read(); 26 | b = ~b; 27 | } 28 | }; 29 | 30 | 31 | int sc_main(int argc, char* argv[]) 32 | { 33 | A a_mod{"a_mod"}; 34 | sc_start(); 35 | return 0; 36 | } 37 | 38 | -------------------------------------------------------------------------------- /designs/tests/method/test_const_prop_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "systemc.h" 9 | #include 10 | 11 | using namespace sc_core; 12 | 13 | // Incorrect SC range, test fails 14 | class A : public sc_module 15 | { 16 | public: 17 | sc_signal a{"a"}; 18 | sc_uint<4> x; 19 | 20 | SC_CTOR(A) 21 | { 22 | SC_METHOD(extraRange); sensitive << a; 23 | } 24 | 25 | // Range wider than variable 26 | void extraRange() 27 | { 28 | sc_uint<4> y = 3; 29 | x = y.range(4,1); 30 | } 31 | }; 32 | 33 | class B_top : public sc_module 34 | { 35 | 36 | public: 37 | A a_mod{"a_mod"}; 38 | 39 | SC_CTOR(B_top) { 40 | } 41 | }; 42 | 43 | int sc_main(int argc, char* argv[]) 44 | { 45 | B_top b_mod{"b_mod"}; 46 | sc_start(); 47 | return 0; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /designs/tests/method/test_const_prop_fail2.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "systemc.h" 9 | #include 10 | 11 | using namespace sc_core; 12 | 13 | // Incorrect SC range, test fails 14 | class A : public sc_module 15 | { 16 | public: 17 | sc_signal a{"a"}; 18 | sc_uint<4> x; 19 | 20 | SC_CTOR(A) 21 | { 22 | SC_METHOD(extraRange); sensitive << a; 23 | } 24 | 25 | // Lo higher than hi 26 | void extraRange() 27 | { 28 | sc_uint<4> y = 3; 29 | x = y.range(1,2); 30 | } 31 | }; 32 | 33 | class B_top : public sc_module 34 | { 35 | 36 | public: 37 | A a_mod{"a_mod"}; 38 | 39 | SC_CTOR(B_top) { 40 | } 41 | }; 42 | 43 | int sc_main(int argc, char* argv[]) 44 | { 45 | B_top b_mod{"b_mod"}; 46 | sc_start(); 47 | return 0; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /designs/tests/method/test_empty_sensvty_dupl_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "sct_assert.h" 9 | #include "systemc.h" 10 | 11 | using namespace sc_core; 12 | 13 | // Method with empty sensitivity list with duplicated initialization failed 14 | class A : public sc_module { 15 | public: 16 | static const unsigned CONST_A = 1; 17 | static const unsigned CONST_Z = 0; 18 | 19 | sc_signal s1; 20 | sc_signal s2; 21 | 22 | SC_CTOR(A) { 23 | SC_METHOD(empty); 24 | } 25 | 26 | void empty() 27 | { 28 | s1 = 0; 29 | if (!CONST_Z) { 30 | s1 = 1; 31 | } 32 | int i = 1; 33 | if (CONST_A) { 34 | i = 2; 35 | s2 = i+1; 36 | } 37 | } 38 | 39 | }; 40 | 41 | int sc_main(int argc, char *argv[]) { 42 | A a_mod{"a_mod"}; 43 | sc_start(); 44 | return 0; 45 | } 46 | 47 | -------------------------------------------------------------------------------- /designs/tests/method/test_return_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | // Function return from loop, test fails 11 | SC_MODULE(test) { 12 | 13 | sc_signal in{"in"}; 14 | sc_signal out{"out"}; 15 | sc_signal> a{"a"}; 16 | 17 | SC_CTOR(test) { 18 | SC_METHOD(return_from_loop); 19 | sensitive << in; 20 | } 21 | 22 | // Conditional @return from loop 23 | // Incorrect code generated now as code after return is not supported 24 | bool f2() 25 | { 26 | for (int i = 0; i < 3; i++) { 27 | if (in) return true; 28 | } 29 | return false; 30 | } 31 | 32 | void return_from_loop() { 33 | bool b = f2(); 34 | } 35 | 36 | }; 37 | 38 | int sc_main(int argc, char **argv) { 39 | test t_inst{"t_inst"}; 40 | sc_start(); 41 | return 0; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /designs/tests/method/test_var_ref_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "systemc.h" 9 | 10 | // ... 11 | class A : public sc_module { 12 | public: 13 | sc_signal s; 14 | 15 | 16 | SC_CTOR(A) { 17 | SC_METHOD(reference_inc_decr); sensitive << s; 18 | } 19 | 20 | 21 | int f (int& i) { 22 | return 42; 23 | } 24 | 25 | void reference_inc_decr() 26 | { 27 | int a; 28 | int m = 1; 29 | // Double increment 30 | int& r = ++m; 31 | a = r + r; 32 | 33 | // Decrement not used in function 34 | f(--m); 35 | } 36 | 37 | 38 | }; 39 | 40 | int sc_main(int argc, char *argv[]) { 41 | A a_mod{"a_mod"}; 42 | sc_start(); 43 | return 0; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /designs/tests/mif/mif_array3.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: Top () 11 | // 12 | module Top // "top" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | // Variables generated for SystemC signals 18 | logic signed [31:0] t0; 19 | 20 | //------------------------------------------------------------------------------ 21 | // Method process: top_method (test_mif_array3.cpp:48:5) 22 | 23 | // Process-local variables 24 | logic [3:0] minst_vv[2]; 25 | 26 | always_comb 27 | begin : top_method // test_mif_array3.cpp:48:5 28 | minst_vv[1] = 2; 29 | t0 = minst_vv[1]; 30 | end 31 | 32 | endmodule 33 | 34 | 35 | -------------------------------------------------------------------------------- /designs/tests/mif/mif_array_with_chan.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: top () 11 | // 12 | module top // "tb_inst.top_inst" 13 | ( 14 | input logic clk, 15 | input logic rst 16 | ); 17 | 18 | // Variables generated for SystemC signals 19 | logic minst_s[2]; 20 | logic signed [31:0] minst_t1[2]; 21 | 22 | //------------------------------------------------------------------------------ 23 | // Method process: minst_metProc (test_mif_array_with_chan.cpp:26:5) 24 | 25 | // Modular interfaces array generate block 26 | generate 27 | for (genvar sct_i = 0; sct_i != 2; sct_i = sct_i + 1) 28 | begin : minst_metProc_sct_i 29 | 30 | always_comb 31 | begin : minst_metProc // test_mif_array_with_chan.cpp:26:5 32 | logic d; 33 | d = minst_s[sct_i]; 34 | minst_t1[sct_i] = d; 35 | end 36 | 37 | end 38 | endgenerate 39 | 40 | endmodule 41 | 42 | 43 | -------------------------------------------------------------------------------- /designs/tests/mif/mif_sc_vector_ptr.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: Top () 11 | // 12 | module Top // "top" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | // Variables generated for SystemC signals 18 | logic [31:0] b_p_s; 19 | logic [31:0] b_res; 20 | 21 | //------------------------------------------------------------------------------ 22 | // Method process: b_methProc (test_sc_vector_ptr.cpp:61:5) 23 | 24 | always_comb 25 | begin : b_methProc // test_sc_vector_ptr.cpp:61:5 26 | integer unsigned TMP_0; 27 | b_res = 0; 28 | if (1) 29 | begin 30 | // Call get() begin 31 | TMP_0 = b_p_s; 32 | // Call get() end 33 | b_res = TMP_0; 34 | end 35 | end 36 | 37 | endmodule 38 | 39 | 40 | -------------------------------------------------------------------------------- /designs/tests/mif/mif_simple.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.3.31 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: Top () 11 | // 12 | module Top // "top" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | // Variables generated for SystemC signals 18 | 19 | endmodule 20 | 21 | 22 | -------------------------------------------------------------------------------- /designs/tests/mif/mif_simple1.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: Top () 11 | // 12 | module Top // "top" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | // Variables generated for SystemC signals 18 | 19 | endmodule 20 | 21 | 22 | -------------------------------------------------------------------------------- /designs/tests/mif/mif_simple2.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: Dut () 11 | // 12 | module Dut // "dut" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | // Variables generated for SystemC signals 18 | logic s; 19 | logic minst_s; 20 | 21 | //------------------------------------------------------------------------------ 22 | // Method process: minst_mifProc (test_mif_simple2.cpp:22:5) 23 | 24 | always_comb 25 | begin : minst_mifProc // test_mif_simple2.cpp:22:5 26 | logic b; 27 | b = minst_s; 28 | minst_s = !b; 29 | end 30 | 31 | //------------------------------------------------------------------------------ 32 | // Method process: topProc (test_mif_simple2.cpp:45:5) 33 | 34 | always_comb 35 | begin : topProc // test_mif_simple2.cpp:45:5 36 | logic b; 37 | b = minst_s; 38 | s = !b; 39 | end 40 | 41 | endmodule 42 | 43 | 44 | -------------------------------------------------------------------------------- /designs/tests/mif/test_mif_simple1.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | // Modular interface without processes 11 | struct mod_if : public sc_module, sc_interface 12 | { 13 | sc_in_clk clk{"clk"}; 14 | sc_in in; 15 | 16 | static const unsigned A = 42; 17 | sc_uint<16> b; 18 | 19 | SC_CTOR(mod_if) 20 | {} 21 | }; 22 | 23 | SC_MODULE(Top) { 24 | 25 | sc_in_clk clk{"clk"}; 26 | mod_if minst{"minst"}; 27 | 28 | sc_signal s; 29 | 30 | SC_CTOR(Top) { 31 | minst.clk(clk); 32 | minst.in(s); 33 | } 34 | }; 35 | 36 | int sc_main(int argc, char **argv) 37 | { 38 | sc_clock clk("clk", sc_time(1, SC_NS)); 39 | Top top{"top"}; 40 | top.clk(clk); 41 | 42 | sc_start(); 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_array_ptr_noninit.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: A () 11 | // 12 | module A // "a_mod" 13 | ( 14 | ); 15 | 16 | // Variables generated for SystemC signals 17 | logic [3:0] s[3]; 18 | 19 | //------------------------------------------------------------------------------ 20 | // Method process: methProc (test_array_ptr_noninit.cpp:35:5) 21 | 22 | always_comb 23 | begin : methProc // test_array_ptr_noninit.cpp:35:5 24 | logic l; 25 | l = 0; 26 | for (integer i = 0; i < 3; i++) 27 | begin 28 | if (1) 29 | begin 30 | l = l || |s[i]; 31 | end 32 | end 33 | end 34 | 35 | endmodule 36 | 37 | 38 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_const_keep_var3.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: A () 11 | // 12 | module A // "mod1" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | // Variables generated for SystemC signals 18 | 19 | // Local parameters generated for C++ constants 20 | localparam logic [31:0] N = 3; 21 | localparam logic [31:0] HN = 3; 22 | localparam logic [31:0] HNN = 3; 23 | 24 | //------------------------------------------------------------------------------ 25 | // Method process: methProc (test_const_keep_var3.cpp:52:5) 26 | 27 | always_comb 28 | begin : methProc // test_const_keep_var3.cpp:52:5 29 | logic [7:0] indx; 30 | if (0) 31 | begin 32 | end 33 | if (0) 34 | begin 35 | end 36 | if (0) 37 | begin 38 | end 39 | indx = 3; 40 | end 41 | 42 | endmodule 43 | 44 | 45 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_cross_hierarchy_bind1.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: Top () 11 | // 12 | module Top // "top" 13 | ( 14 | ); 15 | 16 | // Variables generated for SystemC signals 17 | 18 | 19 | //------------------------------------------------------------------------------ 20 | // Child module instances 21 | 22 | A a 23 | ( 24 | 25 | ); 26 | 27 | endmodule 28 | 29 | 30 | 31 | //============================================================================== 32 | // 33 | // Module: A (test_cross_hierarchy_bind1.cpp:31:5) 34 | // 35 | module A // "top.a" 36 | ( 37 | ); 38 | 39 | // Variables generated for SystemC signals 40 | 41 | endmodule 42 | 43 | 44 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_empty_process.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: A () 11 | // 12 | module A // "a" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | // Variables generated for SystemC signals 18 | 19 | //------------------------------------------------------------------------------ 20 | // Clocked THREAD: emptyThread (test_empty_process.cpp:31:5) 21 | // Empty process, no code generated 22 | 23 | //------------------------------------------------------------------------------ 24 | // Method process: emptyMethod (test_empty_process.cpp:43:5) 25 | // Empty process, no code generated 26 | 27 | endmodule 28 | 29 | 30 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_func_in_cpp.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: Top () 11 | // 12 | module Top // "top" 13 | ( 14 | input logic clk, 15 | input logic rst 16 | ); 17 | 18 | // Variables generated for SystemC signals 19 | logic s; 20 | logic signed [31:0] t0; 21 | 22 | //------------------------------------------------------------------------------ 23 | // Method process: methProc (test_func_in_cpp.h:29:5) 24 | 25 | always_comb 26 | begin : methProc // test_func_in_cpp.h:29:5 27 | logic [3:0] l; 28 | l = 0; 29 | // Call f1() begin 30 | l = s; 31 | // Call f1() end 32 | t0 = l; 33 | end 34 | 35 | endmodule 36 | 37 | 38 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_keep_template_param.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: A () 11 | // 12 | module A // "a" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | // Variables generated for SystemC signals 18 | logic signed [31:0] s; 19 | logic [2:0] c; 20 | logic [6:0] d; 21 | logic [3:0] n; 22 | 23 | // Local parameters generated for C++ constants 24 | localparam logic signed [31:0] C = 3; 25 | localparam logic signed [31:0] D = 7; 26 | 27 | //------------------------------------------------------------------------------ 28 | // Method process: methProc (test_keep_template_param.cpp:32:5) 29 | 30 | always_comb 31 | begin : methProc // test_keep_template_param.cpp:32:5 32 | integer i; 33 | i = 4 + C + D; 34 | s = i; 35 | c = i; 36 | d = i; 37 | n = i; 38 | end 39 | 40 | endmodule 41 | 42 | 43 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_large_array.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: top () 11 | // 12 | module top // "top_inst" 13 | ( 14 | ); 15 | 16 | // Variables generated for SystemC signals 17 | logic [7:0] arr[4096]; 18 | logic [7:0] out; 19 | 20 | //------------------------------------------------------------------------------ 21 | // Method process: proc (test_large_array.cpp:24:5) 22 | 23 | always_comb 24 | begin : proc // test_large_array.cpp:24:5 25 | out = arr[0]; 26 | end 27 | 28 | endmodule 29 | 30 | 31 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_module_typedef.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: Top () 11 | // 12 | module Top // "top" 13 | ( 14 | input logic clk, 15 | input logic rst 16 | ); 17 | 18 | 19 | //------------------------------------------------------------------------------ 20 | // Child module instances 21 | 22 | A a 23 | ( 24 | 25 | ); 26 | 27 | B b 28 | ( 29 | .clk(clk) 30 | ); 31 | 32 | endmodule 33 | 34 | 35 | 36 | //============================================================================== 37 | // 38 | // Module: A (test_module_typedef.cpp:35:5) 39 | // 40 | module A // "top.a" 41 | ( 42 | ); 43 | 44 | endmodule 45 | 46 | 47 | 48 | //============================================================================== 49 | // 50 | // Module: B (test_module_typedef.cpp:36:5) 51 | // 52 | module B // "top.b" 53 | ( 54 | input logic clk 55 | ); 56 | 57 | endmodule 58 | 59 | 60 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_multiple_pointers_mod.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: A () 11 | // 12 | module A // "a_mod" 13 | ( 14 | ); 15 | 16 | // Variables generated for SystemC signals 17 | 18 | //------------------------------------------------------------------------------ 19 | // Method process: meth (test_multiple_pointers_mod.cpp:43:5) 20 | // Empty process, no code generated 21 | 22 | 23 | //------------------------------------------------------------------------------ 24 | // Child module instances 25 | 26 | B b 27 | ( 28 | 29 | ); 30 | 31 | B dpb 32 | ( 33 | 34 | ); 35 | 36 | endmodule 37 | 38 | 39 | 40 | //============================================================================== 41 | // 42 | // Module: B (test_multiple_pointers_mod.cpp:21:5) 43 | // 44 | module B // "a_mod.b" 45 | ( 46 | ); 47 | 48 | endmodule 49 | 50 | 51 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_process_simple.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: MyModule () 11 | // 12 | module MyModule // "tb_inst.top_mod" 13 | ( 14 | input logic in, 15 | output logic out 16 | ); 17 | 18 | // Variables generated for SystemC signals 19 | logic signed [31:0] sig; 20 | 21 | //------------------------------------------------------------------------------ 22 | // Method process: methodProc (test_process_simple.cpp:20:5) 23 | 24 | always_comb 25 | begin : methodProc // test_process_simple.cpp:20:5 26 | logic b; 27 | b = in; 28 | if (sig != 0) 29 | begin 30 | out = b; 31 | end else begin 32 | out = 0; 33 | end 34 | end 35 | 36 | endmodule 37 | 38 | 39 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_reference_met.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: test_referece_met () 11 | // 12 | module test_referece_met // "tinst" 13 | ( 14 | ); 15 | 16 | // Variables generated for SystemC signals 17 | logic sig; 18 | logic sigArray[2]; 19 | logic signed [31:0] t0; 20 | 21 | //------------------------------------------------------------------------------ 22 | // Method process: test_method (test_reference_met.cpp:29:5) 23 | 24 | // Process-local variables 25 | logic signed [31:0] x; 26 | 27 | always_comb 28 | begin : test_method // test_reference_met.cpp:29:5 29 | x = sig; 30 | x = 2; 31 | t0 = x; 32 | sigArray[0] = 1; 33 | end 34 | 35 | endmodule 36 | 37 | 38 | -------------------------------------------------------------------------------- /designs/tests/misc/misc_verilog_intrinsic.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.14 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: testbench () 11 | // 12 | module testbench // "tb_inst" 13 | ( 14 | ); 15 | 16 | // Variables generated for SystemC signals 17 | logic sig; 18 | 19 | 20 | //------------------------------------------------------------------------------ 21 | // Child module instances 22 | 23 | my_module a 24 | ( 25 | .in(sig) 26 | ); 27 | 28 | endmodule 29 | 30 | 31 | 32 | //============================================================================== 33 | // 34 | // Verilog intrinsic for module: my_module (test_verilog_intrinsic.cpp:34:5) 35 | // 36 | module my_module(input in); 37 | // Some verilog code 38 | endmodule 39 | 40 | -------------------------------------------------------------------------------- /designs/tests/misc/test_array_to_pointer_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "systemc.h" 9 | #include 10 | 11 | using namespace sc_core; 12 | 13 | // Pointer to non-zero array element not supported yet -- error reported 14 | class A : public sc_module 15 | { 16 | public: 17 | sc_in clk{"clk"}; 18 | sc_signal nrst{"nrst"}; 19 | 20 | int* pp; 21 | int pa[3]; 22 | 23 | sc_signal s; 24 | 25 | SC_CTOR(A) 26 | { 27 | pp = &pa[1]; 28 | 29 | SC_METHOD(read_pointer); 30 | sensitive << s; 31 | } 32 | 33 | void read_pointer() 34 | { 35 | int i; 36 | i = pp[1]; 37 | } 38 | }; 39 | 40 | int sc_main(int argc, char* argv[]) 41 | { 42 | sc_clock clk("clk", 1, SC_NS); 43 | A a_mod{"b_mod"}; 44 | a_mod.clk(clk); 45 | sc_start(); 46 | return 0; 47 | } 48 | 49 | -------------------------------------------------------------------------------- /designs/tests/misc/test_cross_hierarchy_bind1.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "sct_assert.h" 9 | #include "systemc.h" 10 | 11 | // Port bound to signal located in the same module, no port promoted outside 12 | // warning generated (not error because such style used in MemoCat for CG) 13 | 14 | struct A : sc_module { 15 | sc_in in{"in"}; 16 | sc_out out{"out"}; 17 | sc_signal s; 18 | 19 | SC_CTOR(A) 20 | { 21 | out(s); 22 | in(s); 23 | } 24 | }; 25 | 26 | struct Top : sc_module 27 | { 28 | sc_signal in_s; 29 | sc_signal out_s; 30 | 31 | A a{"a"}; 32 | 33 | SC_CTOR(Top) 34 | { 35 | a.in(in_s); 36 | a.out(out_s); 37 | } 38 | }; 39 | 40 | int sc_main(int argc, char** argv) 41 | { 42 | Top top("top"); 43 | 44 | sc_start(); 45 | return 0; 46 | } 47 | 48 | -------------------------------------------------------------------------------- /designs/tests/misc/test_fcall_return_fail3.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | // Code after return -- error reported 11 | struct A : public sc_module 12 | { 13 | sc_in clk; 14 | sc_signal nrst; 15 | 16 | SC_HAS_PROCESS(A); 17 | 18 | A(const sc_module_name& name) : 19 | sc_module(name) 20 | { 21 | SC_METHOD(meth1); 22 | sensitive << s; 23 | } 24 | 25 | sc_signal s; 26 | 27 | int f(int i) { 28 | int k = i+1; 29 | if (s.read() == k) { 30 | return k; 31 | } 32 | k--; 33 | return 0; 34 | } 35 | 36 | void meth1() 37 | { 38 | if (s.read()) { 39 | f(42); 40 | } 41 | } 42 | }; 43 | 44 | int sc_main(int argc, char *argv[]) 45 | { 46 | A a_mod{"a_mod"}; 47 | sc_clock clk{"clk", 1, SC_NS}; 48 | a_mod.clk(clk); 49 | 50 | sc_start(); 51 | return 0; 52 | } 53 | 54 | -------------------------------------------------------------------------------- /designs/tests/misc/test_fcall_return_fail4.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | // Code after return -- error reported 11 | struct A : public sc_module 12 | { 13 | sc_in clk; 14 | sc_signal nrst; 15 | 16 | SC_HAS_PROCESS(A); 17 | 18 | A(const sc_module_name& name) : 19 | sc_module(name) 20 | { 21 | SC_METHOD(meth1); 22 | sensitive << s; 23 | } 24 | 25 | sc_signal s; 26 | 27 | sc_uint<16> f() { 28 | if (s.read() == 1) { 29 | return 1; 30 | } 31 | if (s.read() == 2) { 32 | return 2; 33 | } 34 | } 35 | 36 | void meth1() 37 | { 38 | int k = 0; 39 | f(); 40 | } 41 | }; 42 | 43 | int sc_main(int argc, char *argv[]) 44 | { 45 | A a_mod{"a_mod"}; 46 | sc_clock clk{"clk", 1, SC_NS}; 47 | a_mod.clk(clk); 48 | 49 | sc_start(); 50 | return 0; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /designs/tests/misc/test_func_in_cpp.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "test_func_in_cpp.h" 9 | 10 | // Function implementation in cpp file, for #293 11 | 12 | void Top::f1 (sc_uint<4>& par) { 13 | par = s.read(); 14 | } 15 | 16 | 17 | int sc_main(int argc, char **argv) { 18 | 19 | sc_clock clock_gen{"clock_gen", 10, SC_NS}; 20 | sc_signal rst{"rst"}; 21 | 22 | Top top{"top"}; 23 | 24 | top.clk(clock_gen); 25 | top.rst(rst); 26 | 27 | sc_start(); 28 | 29 | return 0; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /designs/tests/misc/test_func_in_cpp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | // Function implementation in cpp file, for #293 11 | 12 | struct Top : public sc_module 13 | { 14 | sc_in clk{"clk"}; 15 | sc_in rst{"rst"}; 16 | 17 | sc_signal s; 18 | 19 | SC_HAS_PROCESS(Top); 20 | Top (const sc_module_name& name) : sc_module(name) 21 | { 22 | SC_METHOD(methProc); 23 | sensitive << s; 24 | } 25 | 26 | void f1 (sc_uint<4>& par); 27 | 28 | sc_signal t0; 29 | void methProc() { 30 | sc_uint<4> l; 31 | f1(l); 32 | t0 = l; 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /designs/tests/misc/test_large_array.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | // Large array test to improve @ProcBuilder performance 11 | struct top : sc_module 12 | { 13 | static const unsigned ARR_SIZE = 4*1024; 14 | sc_signal> arr[ARR_SIZE]; 15 | sc_signal> out; 16 | 17 | sc_signal s; 18 | 19 | SC_CTOR(top) { 20 | SC_METHOD(proc); 21 | sensitive << arr[0]; 22 | } 23 | 24 | void proc() { 25 | out = arr[0]; 26 | } 27 | 28 | }; 29 | 30 | int sc_main(int argc, char** argv) 31 | { 32 | cout << "test virtual ports\n"; 33 | auto t0 = std::make_unique("top_inst"); 34 | sc_start(); 35 | return 0; 36 | } 37 | 38 | -------------------------------------------------------------------------------- /designs/tests/misc/test_loop_return_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | // Return in loop in METHOD -- error reported 11 | struct A : public sc_module 12 | { 13 | sc_in clk; 14 | sc_signal nrst; 15 | 16 | SC_HAS_PROCESS(A); 17 | 18 | A(const sc_module_name& name) : 19 | sc_module(name) 20 | { 21 | SC_METHOD(meth1); 22 | sensitive << s; 23 | } 24 | 25 | sc_signal s; 26 | 27 | void meth1() 28 | { 29 | int k = s.read(); 30 | for (int i = 0; i < 4; ++i) { 31 | if (i == k) { 32 | k--; 33 | return; 34 | } 35 | } 36 | } 37 | }; 38 | 39 | int sc_main(int argc, char *argv[]) 40 | { 41 | A a_mod{"a_mod"}; 42 | sc_clock clk{"clk", 1, SC_NS}; 43 | a_mod.clk(clk); 44 | 45 | sc_start(); 46 | return 0; 47 | } 48 | 49 | -------------------------------------------------------------------------------- /designs/tests/misc/test_multiple_pointers_mod.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | using namespace sc_core; 11 | 12 | // Multiple pointers to module, 1 warning reported 13 | class B : public sc_module { 14 | public: 15 | SC_CTOR(B) { 16 | } 17 | }; 18 | 19 | class A : public sc_module { 20 | public: 21 | B b{"b"}; 22 | 23 | B* pb; 24 | B* qb; 25 | 26 | B* dpb; 27 | B* dqb; 28 | 29 | sc_signal dummy; 30 | 31 | SC_CTOR(A) 32 | { 33 | pb = &b; 34 | qb = &b; 35 | 36 | dpb = new B("bb"); 37 | dqb = dpb; 38 | 39 | SC_METHOD(meth); 40 | sensitive << dummy; 41 | } 42 | 43 | void meth() {} 44 | }; 45 | 46 | int sc_main(int argc, char *argv[]) { 47 | A a_mod{"a_mod"}; 48 | sc_start(); 49 | return 0; 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /designs/tests/misc/test_neg_range_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include "systemc.h" 9 | 10 | // Negative range/bit index, or high index less than low -- error reported 11 | SC_MODULE(MyModule) 12 | { 13 | sc_signal> s; 14 | 15 | SC_CTOR(MyModule) { 16 | SC_METHOD(methodProc); 17 | sensitive << s; 18 | } 19 | 20 | void methodProc() { 21 | sc_uint<1> b = s.read().range(-1, 0); 22 | sc_uint<1> c = s.read().range(1, 3); 23 | bool d = s.read().bit(-1); 24 | } 25 | }; 26 | 27 | 28 | int sc_main(int argc, char **argv) 29 | { 30 | MyModule top_mod{"top_mod"}; 31 | sc_start(); 32 | 33 | return 0; 34 | } 35 | 36 | 37 | -------------------------------------------------------------------------------- /designs/tests/misc/test_pointer_dangling2_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | using namespace sc_core; 11 | 12 | // Non-initialized pointer access error detection 13 | class A : public sc_module { 14 | public: 15 | sc_signal* s; 16 | 17 | sc_signal dummy; 18 | 19 | SC_CTOR(A) { 20 | SC_METHOD(meth); 21 | sensitive << dummy; 22 | } 23 | 24 | void meth() 25 | { 26 | *s = 42; 27 | } 28 | 29 | }; 30 | 31 | class B_top : public sc_module { 32 | public: 33 | A a_mod{"a_mod"}; 34 | 35 | SC_CTOR(B_top) { 36 | } 37 | }; 38 | 39 | int sc_main(int argc, char *argv[]) { 40 | B_top b_mod{"b_mod"}; 41 | sc_start(); 42 | return 0; 43 | } 44 | 45 | 46 | -------------------------------------------------------------------------------- /designs/tests/misc/test_pointer_dangling3_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | using namespace sc_core; 11 | 12 | // Non-initialized pointer access error detection 13 | class A : public sc_module { 14 | public: 15 | sc_uint<4>* x; 16 | sc_signal dummy; 17 | 18 | SC_CTOR(A) { 19 | SC_METHOD(meth); 20 | sensitive << dummy; 21 | } 22 | 23 | void meth() 24 | { 25 | if (x) { 26 | int i = 42; 27 | } 28 | } 29 | 30 | }; 31 | 32 | class B_top : public sc_module { 33 | public: 34 | A a_mod{"a_mod"}; 35 | 36 | SC_CTOR(B_top) { 37 | } 38 | }; 39 | 40 | int sc_main(int argc, char *argv[]) { 41 | B_top b_mod{"b_mod"}; 42 | sc_start(); 43 | return 0; 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /designs/tests/misc/test_pointer_dangling_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | using namespace sc_core; 11 | 12 | // Null and non-initialized pointer access error detection 13 | class A : public sc_module { 14 | public: 15 | bool* a; 16 | sc_signal dummy; 17 | 18 | SC_CTOR(A) { 19 | SC_METHOD(meth); 20 | sensitive << dummy; 21 | } 22 | 23 | void meth() 24 | { 25 | bool b = !(*a); 26 | } 27 | 28 | }; 29 | 30 | class B_top : public sc_module { 31 | public: 32 | A a_mod{"a_mod"}; 33 | 34 | SC_CTOR(B_top) { 35 | } 36 | }; 37 | 38 | int sc_main(int argc, char *argv[]) { 39 | B_top b_mod{"b_mod"}; 40 | sc_start(); 41 | return 0; 42 | } 43 | 44 | 45 | -------------------------------------------------------------------------------- /designs/tests/misc/test_pointer_null2_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | using namespace sc_core; 11 | 12 | // Null and non-initialized pointer access error detection 13 | class A : public sc_module { 14 | public: 15 | sc_signal* s; 16 | sc_signal dummy; 17 | 18 | SC_CTOR(A) : s(nullptr) { 19 | SC_METHOD(meth); 20 | sensitive << dummy; 21 | } 22 | 23 | void meth() 24 | { 25 | int i = s->read(); 26 | } 27 | 28 | }; 29 | 30 | class B_top : public sc_module { 31 | public: 32 | A a_mod{"a_mod"}; 33 | 34 | SC_CTOR(B_top) { 35 | } 36 | }; 37 | 38 | int sc_main(int argc, char *argv[]) { 39 | B_top b_mod{"b_mod"}; 40 | sc_start(); 41 | return 0; 42 | } 43 | 44 | 45 | -------------------------------------------------------------------------------- /designs/tests/misc/test_pointer_null3_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | using namespace sc_core; 11 | 12 | // Null and non-initialized pointer access error detection 13 | class A : public sc_module { 14 | public: 15 | sc_uint<4>* x; 16 | sc_signal dummy; 17 | 18 | SC_CTOR(A) { 19 | x = nullptr; 20 | SC_METHOD(meth); 21 | sensitive << dummy; 22 | } 23 | 24 | void meth() 25 | { 26 | x->bit(0) = 1; 27 | } 28 | 29 | }; 30 | 31 | class B_top : public sc_module { 32 | public: 33 | A a_mod{"a_mod"}; 34 | 35 | SC_CTOR(B_top) { 36 | } 37 | }; 38 | 39 | int sc_main(int argc, char *argv[]) { 40 | B_top b_mod{"b_mod"}; 41 | sc_start(); 42 | return 0; 43 | } 44 | 45 | 46 | -------------------------------------------------------------------------------- /designs/tests/misc/test_pointer_null_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | 10 | using namespace sc_core; 11 | 12 | // Null pointer access error detection 13 | class A : public sc_module { 14 | public: 15 | bool* a = nullptr; 16 | sc_signal dummy; 17 | 18 | SC_CTOR(A) { 19 | SC_METHOD(meth); 20 | sensitive << dummy; 21 | } 22 | 23 | void meth() 24 | { 25 | *a = true; 26 | } 27 | 28 | }; 29 | 30 | class B_top : public sc_module { 31 | public: 32 | A a_mod{"a_mod"}; 33 | 34 | SC_CTOR(B_top) { 35 | } 36 | }; 37 | 38 | int sc_main(int argc, char *argv[]) { 39 | B_top b_mod{"b_mod"}; 40 | sc_start(); 41 | return 0; 42 | } 43 | 44 | 45 | -------------------------------------------------------------------------------- /designs/tests/misc/test_reference_met.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 10/3/18. 10 | // 11 | 12 | #include 13 | 14 | SC_MODULE(test_referece_met) { 15 | 16 | sc_signal sig{"sig"}; 17 | sc_signal sigArray[2]; 18 | 19 | int x; 20 | int &xref = x; 21 | 22 | 23 | SC_CTOR(test_referece_met) { 24 | SC_METHOD(test_method); 25 | sensitive << sig; 26 | } 27 | 28 | sc_signal t0; 29 | void test_method() { 30 | x = sig.read(); 31 | xref = 2; 32 | t0 = x; 33 | sigArray[0] = 1; 34 | } 35 | 36 | }; 37 | 38 | int sc_main(int argc, char **argv) { 39 | test_referece_met tinst{"tinst"}; 40 | sc_start(); 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /designs/tests/misc/test_verilog_intrinsic.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | #include 10 | 11 | // Intrinsic modified in module constructor 12 | struct my_module : public sc_module { 13 | 14 | sc_in in; 15 | 16 | std::string __SC_TOOL_VERILOG_MOD__; 17 | 18 | SC_CTOR(my_module) : 19 | __SC_TOOL_VERILOG_MOD__( 20 | R"( 21 | module my_module(input in); 22 | // Some verilog code 23 | endmodule 24 | )") 25 | {} 26 | 27 | }; 28 | 29 | 30 | SC_MODULE(testbench) 31 | { 32 | sc_signal sig; 33 | 34 | my_module a; 35 | 36 | SC_CTOR(testbench) : a("a") { 37 | a.in(sig); 38 | } 39 | }; 40 | 41 | int sc_main(int argc, char **argv) { 42 | 43 | testbench tb_inst{"tb_inst"}; 44 | sc_start(); 45 | 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /designs/tests/misc/test_verilog_intrinsic_fail.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | #include 9 | #include 10 | 11 | // static constexpr char not supported more, use std::string instead 12 | struct my_module : public sc_module { 13 | 14 | sc_in in; 15 | 16 | static constexpr char __SC_TOOL_VERILOG_MOD__[] = R"( 17 | module my_module(input in); 18 | // Some verilog code 19 | endmodule 20 | )"; 21 | 22 | SC_CTOR(my_module) 23 | {} 24 | 25 | }; 26 | 27 | 28 | SC_MODULE(testbench) 29 | { 30 | sc_signal sig; 31 | 32 | my_module a; 33 | 34 | SC_CTOR(testbench) : a("a") { 35 | a.in(sig); 36 | } 37 | }; 38 | 39 | int sc_main(int argc, char **argv) { 40 | 41 | testbench tb_inst{"tb_inst"}; 42 | sc_start(); 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /designs/tests/record/record_array_unknown_cthread.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.6 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: B_top () 11 | // 12 | module B_top // "b_mod" 13 | ( 14 | input logic clk 15 | ); 16 | 17 | 18 | //------------------------------------------------------------------------------ 19 | // Child module instances 20 | 21 | A a_mod 22 | ( 23 | .clk(clk) 24 | ); 25 | 26 | endmodule 27 | 28 | 29 | 30 | //============================================================================== 31 | // 32 | // Module: A (test_array_unknown_cthread.cpp:147:5) 33 | // 34 | module A // "b_mod.a_mod" 35 | ( 36 | input logic clk 37 | ); 38 | 39 | // Variables generated for SystemC signals 40 | 41 | endmodule 42 | 43 | 44 | -------------------------------------------------------------------------------- /designs/tests/record/record_base_record1.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.17 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | 8 | //============================================================================== 9 | // 10 | // Module: A () 11 | // 12 | module A // "a_mod" 13 | ( 14 | ); 15 | 16 | // Variables generated for SystemC signals 17 | logic signed [31:0] sig; 18 | 19 | //------------------------------------------------------------------------------ 20 | // Method process: base_record1 (test_base_record1.cpp:48:5) 21 | 22 | always_comb 23 | begin : base_record1 // test_base_record1.cpp:48:5 24 | logic s_a; 25 | logic [7:0] s_b; 26 | logic [3:0] s_c; 27 | logic TMP_0; 28 | logic TMP_1; 29 | integer unsigned s_offset; 30 | s_b = sig; 31 | s_c = 0; 32 | // Call getB() begin 33 | s_offset = 4; 34 | // Call getB() begin 35 | TMP_1 = 1'(s_b[s_offset]); 36 | // Call getB() end 37 | TMP_0 = TMP_1; 38 | // Call getB() end 39 | end 40 | 41 | endmodule 42 | 43 | 44 | -------------------------------------------------------------------------------- /designs/tests/record/record_operator_equal.sv: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // The code is generated by Intel Compiler for SystemC, version 1.6.6 4 | // see more information at https://github.com/intel/systemc-compiler 5 | // 6 | //============================================================================== 7 | -------------------------------------------------------------------------------- /designs/tests/state/test_state_array_int.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 3/8/18. 10 | // 11 | 12 | #include 13 | 14 | class top : sc_module { 15 | public: 16 | 17 | const int const_array [2][2] = {1, 2, 3, 4}; 18 | int nonconst_array [2][2] = {44, 44, 44, 44}; 19 | 20 | const sc_int<12> scint_const_array [2][2] = {10, 11, 12, 13}; 21 | 22 | SC_HAS_PROCESS(top); 23 | top (sc_module_name) { 24 | SC_METHOD(test_method); 25 | } 26 | 27 | void test_method() { 28 | } 29 | 30 | }; 31 | 32 | 33 | int sc_main(int argc, char* argv[]) 34 | { 35 | cout << "test_state_array_int\n"; 36 | top t{"t"}; 37 | sc_start(); 38 | return 0; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /designs/tests/state/test_state_bases.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 3/8/18. 10 | // 11 | 12 | #include 13 | 14 | struct virt_base { 15 | int v = 1; 16 | }; 17 | 18 | struct nonvirt_base { 19 | int nv = 2; 20 | }; 21 | 22 | struct base0 : virtual virt_base, nonvirt_base { 23 | int x = 3; 24 | }; 25 | 26 | struct base1 : virtual virt_base, nonvirt_base { 27 | int y = 4; 28 | }; 29 | 30 | class top : sc_module, base0, base1 { 31 | public: 32 | 33 | int z = 5; 34 | 35 | SC_HAS_PROCESS(top); 36 | top (sc_module_name) { 37 | SC_METHOD(test_method); 38 | } 39 | 40 | void test_method() { 41 | } 42 | 43 | }; 44 | 45 | 46 | int sc_main(int argc, char* argv[]) 47 | { 48 | cout << "test_state_bases\n"; 49 | top t{"t"}; 50 | sc_start(); 51 | return 0; 52 | } 53 | 54 | -------------------------------------------------------------------------------- /designs/tests/state/test_state_dyn_sig.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 6/13/18. 10 | // 11 | 12 | #include 13 | 14 | class top : sc_module { 15 | public: 16 | 17 | sc_signal *sigp = new sc_signal("sigp"); 18 | sc_signal *sigp2 = new sc_signal("sigp2"); 19 | 20 | SC_HAS_PROCESS(top); 21 | top (sc_module_name) { 22 | 23 | SC_METHOD(test_method); 24 | sensitive << *sigp; 25 | } 26 | 27 | void test_method() { 28 | *sigp2 = sigp->read() + 1; 29 | sigp2->write(*sigp); 30 | } 31 | 32 | }; 33 | 34 | int sc_main(int argc, char* argv[]) 35 | { 36 | cout << "test_state_dyn_sig\n"; 37 | top t{"t"}; 38 | sc_start(); 39 | return 0; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /designs/tests/state/test_state_dynalloc.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 3/8/18. 10 | // 11 | 12 | #include 13 | 14 | class top : sc_module { 15 | public: 16 | 17 | sc_signal *sig_ptr = new sc_signal ("sig_ptr"); 18 | 19 | sc_signal *sig_parray[2]; 20 | 21 | const int *int_array = new int[2]{22,33}; 22 | 23 | 24 | SC_HAS_PROCESS(top); 25 | top (sc_module_name) { 26 | sig_parray[0] = new sc_signal("sig_parray0"); 27 | sig_parray[1] = new sc_signal("sig_parray1"); 28 | 29 | SC_METHOD(test_method); 30 | sensitive << *sig_ptr << *sig_parray[1]; 31 | } 32 | 33 | void test_method() { 34 | } 35 | 36 | }; 37 | 38 | 39 | int sc_main(int argc, char* argv[]) 40 | { 41 | cout << "test_state_dynalloc\n"; 42 | top t{"t"}; 43 | sc_start(); 44 | return 0; 45 | } 46 | 47 | -------------------------------------------------------------------------------- /designs/tests/state/test_state_mdim_array.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 12/7/18. 10 | // 11 | 12 | #include 13 | 14 | class top : sc_module { 15 | public: 16 | 17 | SC_HAS_PROCESS(top); 18 | top (sc_module_name) { 19 | SC_METHOD(test_method); 20 | sensitive << dummy; 21 | } 22 | 23 | sc_signal dummy{"dummy"}; 24 | 25 | int array2d[2][2]; 26 | int array3d[2][2][2]; 27 | 28 | void test_method() { 29 | array2d[1][1] = array3d[0][1][1]; 30 | } 31 | 32 | }; 33 | 34 | 35 | int sc_main(int argc, char* argv[]) 36 | { 37 | top t{"t"}; 38 | sc_start(); 39 | return 0; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /designs/tests/state/test_state_pointers.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 3/8/18. 10 | // 11 | 12 | 13 | #include 14 | 15 | class top : sc_module { 16 | public: 17 | 18 | sc_signal *sp0; 19 | sc_signal sigint{"sigint"}; 20 | sc_signal *sp1 = &sigint; 21 | 22 | 23 | SC_HAS_PROCESS(top); 24 | top (sc_module_name) { 25 | sp0 = &sigint; 26 | SC_METHOD(test_method); 27 | } 28 | 29 | void test_method() { 30 | } 31 | 32 | }; 33 | 34 | 35 | int sc_main(int argc, char* argv[]) 36 | { 37 | cout << "test_state_pointers\n"; 38 | top t{"t"}; 39 | sc_start(); 40 | return 0; 41 | } 42 | 43 | -------------------------------------------------------------------------------- /designs/tests/state/test_state_sc_vector.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 3/8/18. 10 | // 11 | 12 | #include 13 | 14 | class top : sc_module { 15 | public: 16 | 17 | sc_vector> sig_vec{"sig_vec",3}; 18 | sc_vector> in_vec{"in_vec",3}; 19 | sc_vector> out_vec{"out_vec",3}; 20 | 21 | 22 | SC_HAS_PROCESS(top); 23 | top (sc_module_name) { 24 | 25 | out_vec.bind(sig_vec); 26 | in_vec.bind(sig_vec); 27 | 28 | SC_METHOD(test_method); 29 | } 30 | 31 | void test_method() { 32 | } 33 | 34 | }; 35 | 36 | 37 | int sc_main(int argc, char* argv[]) 38 | { 39 | cout << "test_state_sc_vector\n"; 40 | top t{"t"}; 41 | sc_start(); 42 | return 0; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /designs/tests/state/test_state_static_const.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 3/8/18. 10 | // 11 | 12 | #include 13 | 14 | class top : sc_module { 15 | public: 16 | 17 | static const unsigned const_unsigned0 = 1 + 2 + 3; 18 | static const unsigned const_unsigned1 = 1 + 2 + 3 + const_unsigned0; 19 | 20 | constexpr static const int const_array [2] = {1+1, 2+2}; 21 | 22 | constexpr static const int const_array2d [2][2] = {40 + 1 + const_unsigned0 23 | , 40+2, 40+3, 40+4}; 24 | 25 | constexpr static const unsigned const_array3d[1][1][1] = {111}; 26 | 27 | SC_HAS_PROCESS(top); 28 | top (sc_module_name) { 29 | SC_METHOD(test_method); 30 | } 31 | 32 | void test_method() { 33 | } 34 | 35 | }; 36 | 37 | 38 | int sc_main(int argc, char* argv[]) 39 | { 40 | cout << "test_state_static_const\n"; 41 | top t{"t"}; 42 | sc_start(); 43 | return 0; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /designs/tests/state/test_state_struct_member.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | // 9 | // Created by ripopov on 3/8/18. 10 | // 11 | 12 | #include 13 | 14 | struct complex { 15 | int re = 10101; 16 | int im = 10101; 17 | }; 18 | 19 | class top : sc_module { 20 | public: 21 | 22 | complex cmplx {1,2}; 23 | complex cmparray[2]; 24 | 25 | SC_HAS_PROCESS(top); 26 | top (sc_module_name) { 27 | SC_METHOD(test_method); 28 | } 29 | 30 | void test_method() { 31 | } 32 | 33 | }; 34 | 35 | 36 | int sc_main(int argc, char* argv[]) 37 | { 38 | cout << "test_state_struct_member\n"; 39 | top t{"t"}; 40 | sc_start(); 41 | return 0; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /designs/tests/uniquify/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | add_executable(test_uniquify_basic test_uniquify_basic.cpp) 9 | svc_target(test_uniquify_basic GOLDEN test_uniquify_basic.sv) 10 | 11 | add_executable(test_uniquify_proc test_uniquify_proc.cpp) 12 | svc_target(test_uniquify_proc GOLDEN test_uniquify_proc.sv) 13 | 14 | add_executable(test_uniquify_cross_bind test_uniquify_cross_bind.cpp) 15 | svc_target(test_uniquify_cross_bind GOLDEN test_uniquify_cross_bind.sv) 16 | -------------------------------------------------------------------------------- /doc/papers/common_library_2022.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/papers/common_library_2022.pdf -------------------------------------------------------------------------------- /doc/papers/icsc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/papers/icsc.pdf -------------------------------------------------------------------------------- /doc/papers/icsc_slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/papers/icsc_slides.pdf -------------------------------------------------------------------------------- /doc/papers/preprint_single_source_2024.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/papers/preprint_single_source_2024.pdf -------------------------------------------------------------------------------- /doc/papers/sct_assert.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/papers/sct_assert.pdf -------------------------------------------------------------------------------- /doc/papers/sct_assert_slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/papers/sct_assert_slides.pdf -------------------------------------------------------------------------------- /doc/papers/single_source_training.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/papers/single_source_training.pdf -------------------------------------------------------------------------------- /doc/papers/slides_single_source_2024.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/papers/slides_single_source_2024.pdf -------------------------------------------------------------------------------- /doc/pics/ss_buff_conn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_buff_conn.jpg -------------------------------------------------------------------------------- /doc/pics/ss_buff_fifo_conn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_buff_fifo_conn.jpg -------------------------------------------------------------------------------- /doc/pics/ss_buffer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_buffer.jpg -------------------------------------------------------------------------------- /doc/pics/ss_channels.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_channels.jpg -------------------------------------------------------------------------------- /doc/pics/ss_clock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_clock.jpg -------------------------------------------------------------------------------- /doc/pics/ss_comb_conn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_comb_conn.jpg -------------------------------------------------------------------------------- /doc/pics/ss_fifo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_fifo.jpg -------------------------------------------------------------------------------- /doc/pics/ss_fifo_port.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_fifo_port.jpg -------------------------------------------------------------------------------- /doc/pics/ss_parent_mod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_parent_mod.jpg -------------------------------------------------------------------------------- /doc/pics/ss_prot_mm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_prot_mm.jpg -------------------------------------------------------------------------------- /doc/pics/ss_prot_tt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_prot_tt.jpg -------------------------------------------------------------------------------- /doc/pics/ss_reg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_reg.jpg -------------------------------------------------------------------------------- /doc/pics/ss_sig_usage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_sig_usage.jpg -------------------------------------------------------------------------------- /doc/pics/ss_targ_init.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_targ_init.jpg -------------------------------------------------------------------------------- /doc/pics/ss_top_mod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_top_mod.jpg -------------------------------------------------------------------------------- /doc/pics/ss_usage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/pics/ss_usage.jpg -------------------------------------------------------------------------------- /doc/ug.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/doc/ug.pdf -------------------------------------------------------------------------------- /gdb/gdbinit-example.txt: -------------------------------------------------------------------------------- 1 | # To enable pretty-printing for SystemC/SingleSource data types 2 | # copy/rename gdbinit-example.txt to ~/.gdbinit 3 | 4 | python 5 | import sys, os 6 | # Configure paths to pretty-printers 7 | libstdcxx_printers_path = '/usr/intel/pkgs/gcc/13.2.0/share/gcc-13.2.0/python/' 8 | sysc_printers_path = '$ICSC_HOME/share/gdb/python/sysc_printers/' 9 | # 10 | libstdcxx_printers_path = os.path.expandvars(libstdcxx_printers_path) 11 | sysc_printers_path = os.path.expandvars(sysc_printers_path) 12 | sys.path.insert(0, libstdcxx_printers_path) 13 | sys.path.insert(0, sysc_printers_path) 14 | from libstdcxx.v6.printers import register_libstdcxx_printers 15 | register_libstdcxx_printers (None) 16 | from sysc30x_printers import register_sysc30x_printers 17 | register_sysc30x_printers (None) 18 | from singlsrc_printers import register_singlsrc_printers 19 | register_singlsrc_printers (None) 20 | end 21 | 22 | # If you are debugging systemc, the following idioms break in the debugger 23 | # when you hit an error 24 | #break sc_core::sc_report_handler::report if (severity >= sc_core::SC_ERROR) 25 | #break sc_core::sc_report_handler::report 26 | -------------------------------------------------------------------------------- /sc_elab/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | # 6 | # ***************************************************************************** 7 | 8 | # Generate C++ API for protobuf DB 9 | find_package(Protobuf REQUIRED) 10 | message("Using Protobuf from ${Protobuf_INCLUDE_DIRS}") 11 | 12 | protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS sc_elab.proto) 13 | 14 | add_library(sc_elab_proto ${PROTO_SRCS} ${PROTO_HDRS} ) 15 | target_link_libraries(sc_elab_proto ${Protobuf_LIBRARIES}) 16 | target_include_directories(sc_elab_proto PUBLIC ${Protobuf_INCLUDE_DIRS} 17 | $ 18 | $ 19 | ) 20 | 21 | target_compile_definitions(sc_elab_proto PUBLIC GOOGLE_PROTOBUF_NO_RTTI) 22 | 23 | install(TARGETS sc_elab_proto EXPORT SVCTargets DESTINATION lib) 24 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/cthread/ScCfgCursor.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #include "ScCfgCursor.h" 13 | 14 | namespace sc { 15 | 16 | const clang::CFGBlock *curBlock(const CfgCursorStack &stack) 17 | { 18 | if (stack.empty()) 19 | return nullptr; 20 | return stack.back().getBlock(); 21 | } 22 | 23 | size_t curElem(const CfgCursorStack &stack) 24 | { 25 | if (stack.empty()) 26 | return 0; 27 | return stack.back().getElementID(); 28 | } 29 | 30 | } // namespace sc 31 | 32 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/dyn_elab/Demangle.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | 17 | #ifndef _MSC_VER 18 | 19 | #include 20 | 21 | namespace sc_elab { 22 | 23 | std::string demangle(const char* mangledName) { 24 | 25 | int status = -4; // some arbitrary value to eliminate the compiler warning 26 | 27 | // enable c++11 by passing the flag -std=c++11 to g++ 28 | std::unique_ptr res { 29 | abi::__cxa_demangle(mangledName, NULL, NULL, &status), 30 | std::free 31 | }; 32 | 33 | return (status==0) ? res.get() : mangledName ; 34 | } 35 | 36 | } // namespace sc_elab 37 | 38 | #else 39 | 40 | std::string demangle(const char* mangledName) { 41 | // TODO 42 | return mangledName; 43 | } 44 | 45 | #endif -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/dyn_elab/Demangle.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #ifndef SCTOOL_DEMANGLE_H 13 | #define SCTOOL_DEMANGLE_H 14 | 15 | #include 16 | 17 | namespace sc_elab 18 | { 19 | 20 | /// C++ ABI demangle 21 | std::string demangle(const char* mangledName); 22 | 23 | } // namespace sc_elab 24 | 25 | #endif //SCTOOL_DEMANGLE_H 26 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/dyn_elab/ElabTypeManager.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #include 13 | 14 | namespace sc_elab 15 | { 16 | 17 | ElabTypeManager::ID 18 | ElabTypeManager::getOrCreateTypeID(clang::QualType qualType) 19 | { 20 | 21 | auto iter = type2idMap.find(qualType); 22 | 23 | if (iter != type2idMap.end()) 24 | return iter->second; 25 | 26 | ID newID = type2idMap.size(); 27 | 28 | *designDB.add_types() = qualType.getAsString(); 29 | type2idMap[qualType] = newID; 30 | id2typeMap[newID] = qualType; 31 | 32 | return newID; 33 | } 34 | 35 | clang::QualType 36 | ElabTypeManager::getTypeByID(ElabTypeManager::ID typeID) 37 | { 38 | assert(typeID < id2typeMap.size()); 39 | return id2typeMap.at(typeID); 40 | } 41 | 42 | 43 | } -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/dyn_elab/GlobalContext.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #include 13 | 14 | namespace sc_elab 15 | { 16 | 17 | static clang::ASTContext * globalAstCtx = nullptr; 18 | static MangledTypeDB *mangledTypeDB = nullptr; 19 | 20 | void initGlobalContext(clang::ASTContext *astCtx, MangledTypeDB *typeDB) 21 | { 22 | globalAstCtx = astCtx; 23 | mangledTypeDB = typeDB; 24 | } 25 | 26 | clang::ASTContext *getAstCtx() 27 | { 28 | assert(globalAstCtx != nullptr); 29 | return globalAstCtx; 30 | } 31 | 32 | MangledTypeDB *getMangledTypeDB() 33 | { 34 | assert(mangledTypeDB != nullptr); 35 | return mangledTypeDB; 36 | } 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/dyn_elab/GlobalContext.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #ifndef SCTOOL_GLOBALCONTEXT_H 13 | #define SCTOOL_GLOBALCONTEXT_H 14 | 15 | #include 16 | #include 17 | 18 | namespace sc_elab { 19 | 20 | clang::ASTContext * getAstCtx(); 21 | MangledTypeDB * getMangledTypeDB(); 22 | 23 | void initGlobalContext(clang::ASTContext *astCtx, MangledTypeDB *typeDB); 24 | 25 | } 26 | 27 | #endif //SCTOOL_GLOBALCONTEXT_H 28 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/dyn_elab/MangledTypeDB.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #ifndef SCTOOL_MANGLEDTYPES_H 13 | #define SCTOOL_MANGLEDTYPES_H 14 | 15 | #include 16 | #include 17 | 18 | #include 19 | 20 | namespace sc_elab { 21 | 22 | /// Maps mangled type name to clang::QualType 23 | struct MangledTypeDB 24 | { 25 | MangledTypeDB(clang::ASTContext &astCtx); 26 | 27 | clang::QualType getType(llvm::StringRef mangledTypeName); 28 | 29 | private: 30 | 31 | std::unordered_map typeMap; 32 | 33 | }; 34 | 35 | } // namespace sc_elab 36 | 37 | 38 | #endif //SCTOOL_MANGLEDTYPES_H 39 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/elab/ScElabModuleBuilder.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #ifndef SCELABMODULEBUILDER_H 13 | #define SCELABMODULEBUILDER_H 14 | 15 | #include 16 | 17 | namespace sc_elab { 18 | 19 | class ElabDatabase; 20 | 21 | /// Creates Verilog modules inside elaboration database 22 | void buildVerilogModules(sc_elab::ElabDatabase *elabDB, 23 | const std::unordered_map& movedObjs); 24 | 25 | } // end namespace sc 26 | 27 | 28 | #endif // SCELABMODULEBUILDER_H 29 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/systemc/ScObject.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Mikhail Moiseev 10 | */ 11 | 12 | #include "sc_tool/systemc/ScObject.h" 13 | 14 | namespace sc { 15 | 16 | /// Unique ID generator 17 | uint64_t ScObject::id_gen = 0; 18 | 19 | bool ScObject::operator == (const ScObject& rhs) { 20 | return (id == rhs.id); 21 | } 22 | } -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/utils/BitUtils.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #include "BitUtils.h" 13 | #include 14 | 15 | // Number of bits required to represent @n 16 | size_t bitsInNumber(size_t n) 17 | { 18 | if (n == 0) { 19 | return 1; 20 | } 21 | 22 | size_t res = 0; 23 | do { 24 | res += 1; 25 | n >>= 1; 26 | } while (n != 0); 27 | 28 | return res; 29 | } 30 | 31 | // Number of bits required to represent index for @n objects, (0...@n-1) 32 | size_t bitsForIndex(size_t n) 33 | { 34 | if (n == 0) { 35 | return 1; 36 | } 37 | return bitsInNumber(n-1); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/utils/BitUtils.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | #ifndef SCTOOL_BITUTILS_H 12 | #define SCTOOL_BITUTILS_H 13 | 14 | #include 15 | 16 | /// Number of bits required to represent @n 17 | size_t bitsInNumber(size_t n); 18 | 19 | /// Number of bits required to represent index for @n objects, (0...@n-1) 20 | size_t bitsForIndex(size_t n); 21 | 22 | #endif //SCTOOL_BITUTILS_H 23 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/utils/CommandLine.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #ifndef SCTOOL_COMMANDLINE_H 13 | #define SCTOOL_COMMANDLINE_H 14 | 15 | #include 16 | 17 | namespace sc_elab { 18 | 19 | struct ArgcArgv { 20 | int argc; 21 | const char **argv; 22 | }; 23 | 24 | ArgcArgv parseToArgcArgv(const std::string &commandLine); 25 | 26 | } // namespace sc_elab 27 | 28 | #endif //SCTOOL_COMMANDLINE_H 29 | -------------------------------------------------------------------------------- /sc_tool/lib/sc_tool/utils/RawIndentOstream.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2020, Intel Corporation. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. 5 | * 6 | *****************************************************************************/ 7 | 8 | /** 9 | * Author: Roman Popov 10 | */ 11 | 12 | #include "RawIndentOstream.h" 13 | 14 | namespace sc { 15 | 16 | void RawIndentOstream::write_impl(const char *ptr, size_t size) 17 | { 18 | for (size_t i = 0; i < size; ++i) { 19 | if(indentNext) { 20 | for (auto &fillStr : fillVec) 21 | backend << fillStr; 22 | indentNext = false; 23 | } 24 | 25 | backend << *ptr; 26 | 27 | if (*ptr == '\n') 28 | indentNext = true; 29 | 30 | ptr++; 31 | } 32 | 33 | backend.flush(); 34 | } 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /systemc/cmake/SystemCLanguageConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # - Config file for the SystemCLanguage package 2 | # It defines the following variables: 3 | # SystemC_TARGET_ARCH - Target architecture according to the Accellera SystemC conventions 4 | # SystemC_CXX_STANDARD - Preferred C++ standard 5 | # SystemC_CXX_STANDARD_REQUIRED - Determine whether the selected C++ standard is a requirement 6 | 7 | @PACKAGE_INIT@ 8 | 9 | include(CMakeFindDependencyMacro) 10 | 11 | # SystemC requires Pthreads under certain conditions 12 | if (@CMAKE_USE_PTHREADS_INIT@) 13 | set (THREADS_PREFER_PTHREAD_FLAG ON) 14 | find_dependency (Threads) 15 | if (NOT CMAKE_USE_PTHREADS_INIT) 16 | message (SEND_ERROR "Failed to find the Pthreads library required to implement the SystemC coroutines and async_request_update() of primitive channels on Unix.") 17 | endif (NOT CMAKE_USE_PTHREADS_INIT) 18 | endif (@CMAKE_USE_PTHREADS_INIT@) 19 | 20 | include ("${CMAKE_CURRENT_LIST_DIR}/SystemCLanguageTargets.cmake") 21 | 22 | set (SystemC_TARGET_ARCH @SystemC_TARGET_ARCH@) 23 | set (SystemC_CXX_STANDARD @CMAKE_CXX_STANDARD@) 24 | set (SystemC_CXX_STANDARD_REQUIRED @CMAKE_CXX_STANDARD_REQUIRED@) 25 | -------------------------------------------------------------------------------- /systemc/cmake/SystemCTLMConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # - Config file for the SystemCTLM package 2 | 3 | # TLM is part of the SystemC language library. 4 | include(CMakeFindDependencyMacro) 5 | find_dependency (SystemCLanguage @SystemCLanguage_VERSION_MAJOR@.@SystemCLanguage_VERSION_MINOR@.@SystemCLanguage_VERSION_PATCH@.@SystemCLanguage_VERSION_RELEASE_DATE@ EXACT) 6 | -------------------------------------------------------------------------------- /systemc/config/Make-rules.common: -------------------------------------------------------------------------------- 1 | # top-level SystemC include directory is added in Make-rules.{sysc,examples} 2 | 3 | # build flags 4 | 5 | DEFS=$(PKGCONFIG_DEFINES) $(EXTRA_DEFINES) 6 | AM_CPPFLAGS= 7 | AM_CFLAGS=$(EXTRA_CFLAGS) 8 | AM_CXXFLAGS=$(EXTRA_CXXFLAGS) 9 | AM_CCASFLAGS=$(EXTRA_ASFLAGS) 10 | AM_LDFLAGS=$(EXTRA_LDFLAGS) 11 | 12 | if WANT_DEBUG 13 | AM_CXXFLAGS+=$(DEBUG_CXXFLAGS) 14 | AM_CFLAGS+=$(DEBUG_CXXFLAGS) 15 | AM_CCASFLAGS+=$(DEBUG_CXXFLAGS) 16 | endif 17 | 18 | if WANT_OPTIMIZE 19 | AM_CXXFLAGS+=$(OPT_CXXFLAGS) 20 | AM_CFLAGS+=$(OPT_CXXFLAGS) 21 | endif 22 | 23 | # for pthread processes 24 | if USES_PTHREADS_LIB 25 | AM_CXXFLAGS+=$(PTHREAD_CFLAGS) 26 | AM_CFLAGS+=$(PTHREAD_CFLAGS) 27 | AM_LDFLAGS+=$(PTHREAD_LIBS) 28 | endif 29 | 30 | # always add fix-point support 31 | EXTRA_DEFINES=-DSC_INCLUDE_FX 32 | 33 | # initialize some useful variables (filled later) 34 | 35 | CLEANFILES= 36 | EXTRA_DIST= 37 | -------------------------------------------------------------------------------- /systemc/config/Make-rules.sysc: -------------------------------------------------------------------------------- 1 | include $(top_srcdir)/config/Make-rules.common 2 | 3 | AM_CPPFLAGS += -I$(top_srcdir)/src 4 | 5 | EXTRA_DEFINES+=-DSC_BUILD 6 | 7 | if WANT_PTHREADS_THREADS 8 | EXTRA_DEFINES+=-DSC_USE_PTHREADS 9 | endif 10 | 11 | if DISABLE_VCD_SCOPES 12 | EXTRA_DEFINES+=-DSC_DISABLE_VCD_SCOPES 13 | endif 14 | -------------------------------------------------------------------------------- /systemc/config/bootstrap: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | LIBTOOLIZE=libtoolize 4 | if test x"`uname -s`" = "xDarwin" ; then 5 | LIBTOOLIZE=glibtoolize 6 | fi 7 | 8 | aclocal -I config && \ 9 | $LIBTOOLIZE --automake --force --copy && \ 10 | automake --add-missing --copy && \ 11 | autoconf 12 | 13 | # Taf! 14 | -------------------------------------------------------------------------------- /systemc/docker/alma.dockerfile: -------------------------------------------------------------------------------- 1 | ARG ALMA_VERSION=8 2 | ARG IMAGE=almalinux:$ALMA_VERSION 3 | 4 | FROM $IMAGE 5 | 6 | WORKDIR /app 7 | 8 | RUN dnf install -y \ 9 | cmake \ 10 | gcc \ 11 | gcc-c++ \ 12 | clang \ 13 | libasan \ 14 | libubsan \ 15 | && dnf clean all 16 | 17 | # Copy the current directory contents into the container at /app 18 | COPY . /app 19 | # Setup entrypoint CI script 20 | COPY ./docker/entrypoint.sh /entrypoint.sh 21 | ENTRYPOINT ["/entrypoint.sh"] 22 | -------------------------------------------------------------------------------- /systemc/docker/ubuntu.dockerfile: -------------------------------------------------------------------------------- 1 | ARG UBUNTU_VERSION=20.04 2 | ARG IMAGE=ubuntu:$UBUNTU_VERSION 3 | 4 | FROM $IMAGE 5 | 6 | WORKDIR /app 7 | 8 | RUN apt-get update && \ 9 | apt-get install -y \ 10 | cmake \ 11 | gcc \ 12 | g++ \ 13 | clang \ 14 | && rm -rf /var/lib/apt/lists/* 15 | 16 | # Copy the current directory contents into the container at /app 17 | COPY . /app 18 | # Setup entrypoint CI script 19 | COPY ./docker/entrypoint.sh /entrypoint.sh 20 | ENTRYPOINT ["/entrypoint.sh"] 21 | -------------------------------------------------------------------------------- /systemc/docs/sysc/README: -------------------------------------------------------------------------------- 1 | ========================================== 2 | README for the SystemC 3.0.0 documentation 3 | ========================================== 4 | 5 | This directory contains 6 | 7 | doxygen/ 8 | 9 | A folder containing a command file (template) for doxygen which may be 10 | used to generate browseable documentation of the SystemC class library. 11 | Please see www.doxygen.org for usage. 12 | 13 | SIGN_EXTENSION.md 14 | 15 | A description of how SystemC datatypes are sign extended. 16 | 17 | README - this file. 18 | -------------------------------------------------------------------------------- /systemc/examples/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <.\Makefile.config> 2 | 3 | SUBDIRS = \ 4 | ..\tlm\at_1_phase \ 5 | ..\tlm\at_2_phase \ 6 | ..\tlm\at_4_phase \ 7 | ..\tlm\at_extension_optional \ 8 | ..\tlm\at_mixed_targets \ 9 | ..\tlm\at_ooo \ 10 | ..\tlm\lt \ 11 | ..\tlm\lt_dmi \ 12 | ..\tlm\lt_extension_mandatory \ 13 | ..\tlm\lt_mixed_endian \ 14 | ..\tlm\lt_temporal_decouple 15 | 16 | TARGETS = build run check clean 17 | 18 | # default target 19 | all: build 20 | 21 | # see 22 | # - Makefile.rules for actual implementation 23 | # - Makefile.config for available configuration options 24 | $(TARGETS): 25 | @for %%i in ($(SUBDIRS)) do \ 26 | @( chdir $(MAKEDIR)\%%i\build-msvc && \ 27 | $(MAKE) /nologo FLAG_BATCH=1 \ 28 | CONFIG=$(CONFIG) PLATFORM=$(PLATFORM) $@ ) 29 | -------------------------------------------------------------------------------- /systemc/examples/build-msvc/SystemC_examples.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | msvc16 5 | 6 | 7 | false 8 | 9 | 10 | 11 | /vmg %(AdditionalOptions) 12 | Level3 13 | 4996;%(DisableSpecificWarnings) 14 | SC_ENABLE_ASSERTIONS;%(PreprocessorDefinitions) 15 | 16 | 17 | 18 | 19 | $(MSVC) 20 | true 21 | 22 | 23 | -------------------------------------------------------------------------------- /systemc/examples/build-msvc/openhere.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | %~d1 3 | cd %~p1 4 | cd %1 5 | %SystemRoot%\system32\cmd.exe 6 | -------------------------------------------------------------------------------- /systemc/examples/build-msvc/tlm_examples.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | msvc16 5 | 6 | 7 | <_ProjectFileVersion>10.0.30319.1 8 | false 9 | 10 | 11 | 12 | /vmg %(AdditionalOptions) 13 | $(SYSTEMC_HOME)\src;%(AdditionalIncludeDirectories) 14 | true 15 | Level4 16 | 4100;4127;4267;4996;%(DisableSpecificWarnings) 17 | SC_ENABLE_ASSERTIONS;%(PreprocessorDefinitions) 18 | 19 | 20 | 21 | 22 | $(MSVC) 23 | 24 | 25 | -------------------------------------------------------------------------------- /systemc/examples/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIRS := $(dir $(wildcard ../sysc/*/Makefile ../sysc/*/*/Makefile)) 2 | SUBDIRS += $(wildcard ../tlm/*/build-unix) 3 | 4 | TARGETS := all build run check clean 5 | .PHONY: $(TARGETS) 6 | 7 | $(TARGETS): %: 8 | @set -e ; for i in $(SUBDIRS); do \ 9 | $(MAKE) -C $$i FLAG_BATCH=1 $@ ; \ 10 | done 11 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.1/dpipe/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = dpipe 5 | OBJS = main.o 6 | 7 | include ../../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.1/forkjoin/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = forkjoin 5 | OBJS = $(PROJECT).o 6 | 7 | include ../../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.1/reset_signal_is/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = reset_signal_is 5 | OBJS = $(PROJECT).o 6 | 7 | include ../../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.1/sc_export/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = sc_export 5 | OBJS = main.o 6 | 7 | include ../../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.1/sc_report/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = sc_report 5 | OBJS = main.o 6 | 7 | include ../../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.1/scx_barrier/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = scx_barrier 5 | OBJS = main.o 6 | 7 | include ../../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.1/scx_mutex_w_policy/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = scx_mutex_w_policy 5 | OBJS = $(PROJECT).o 6 | 7 | include ../../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.1/specialized_signals/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = specialized_signals 5 | SRCS = $(wildcard *.cpp) 6 | OBJS = $(SRCS:.cpp=.o) 7 | 8 | include ../../../build-unix/Makefile.rules 9 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.3/sc_rvd/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = sc_rvd 5 | OBJS = main.o 6 | INCDIR = -I ../include 7 | 8 | include ../../../build-unix/Makefile.rules 9 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.3/sc_ttd/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = sc_ttd 5 | OBJS = main.o 6 | INCDIR = -I ../include 7 | 8 | include ../../../build-unix/Makefile.rules 9 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.3/simple_async/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = simple_async 5 | OBJS = main.o 6 | 7 | include ../../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.4/in_class_initialization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(SOURCE_FILES 3 | in_class_initialization.cpp 4 | adder_int_5_pimpl.h 5 | adder_int_5_pimpl.cpp 6 | adder.h 7 | ) 8 | 9 | add_executable (in_class_initialization ${SOURCE_FILES}) 10 | target_link_libraries (in_class_initialization SystemC::systemc) 11 | configure_and_add_test (in_class_initialization) 12 | 13 | add_executable (in_class_initialization_pimpl ${SOURCE_FILES}) 14 | target_compile_definitions(in_class_initialization_pimpl PRIVATE USE_PIMPL_ADDER) 15 | target_link_libraries (in_class_initialization_pimpl SystemC::systemc) 16 | configure_and_add_test (in_class_initialization_pimpl) 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/2.4/in_class_initialization/README_COMPILE_TIME: -------------------------------------------------------------------------------- 1 | Large portion of SystemC designs are implemented as header-only libraries. 2 | This is especially true for parameterizable synthesizable modules, which 3 | are often implemented as templates. Support for in-class initialization 4 | may even further motivate SystemC users to implement modules as header-only 5 | classes. 6 | 7 | Unfortunately, implementing everything in headers removes benefit of separate 8 | compilation: fast incremental builds. While compile time is not always an issue, 9 | it can become a real problem when working with large systems. 10 | 11 | Here are two advices: 12 | 13 | 1) Use a precompiled header (PCH) for . It includes large portion of C++ 14 | standard library, so it is a very good candidate for PCH for every SystemC project. 15 | (With C++14 it is already ~80000 lines of code after preprocessing) 16 | 17 | 2) Use a PImpl idiom to break dependencies on large header-only libraries. 18 | In SystemC interface of a module is usually defined by ports and exports, everything 19 | else can be hidden. 20 | 21 | Example of PImpl for template specialization: 22 | adder_int_5_pimpl.cpp 23 | adder_int_5_pimpl.h -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = fft_flpt 5 | SRCS = $(wildcard *.cpp) 6 | OBJS = $(SRCS:.cpp=.o) 7 | EXTRA_CLEAN = out_real out_imag 8 | 9 | include ../../../build-unix/Makefile.rules 10 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_imag: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | 1 18 | 0 19 | 0 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 34 | 35 | 456 36 | 234 37 | 120 38 | 0 39 | -120 40 | -234 41 | -456 42 | -768 43 | -456 44 | -234 45 | -120 46 | 0 47 | 120 48 | 234 49 | 456 50 | 768 51 | 52 | 29 53 | 34 54 | 85 55 | 206 56 | 336 57 | 593 58 | 823 59 | 422 60 | -12 61 | -103 62 | -599 63 | -734 64 | -339 65 | -188 66 | -23 67 | 22 68 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_imag.1: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_imag.2: -------------------------------------------------------------------------------- 1 | 1 2 | 0 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | 18 | 19 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_imag.3: -------------------------------------------------------------------------------- 1 | 456 2 | 234 3 | 120 4 | 0 5 | -120 6 | -234 7 | -456 8 | -768 9 | -456 10 | -234 11 | -120 12 | 0 13 | 120 14 | 234 15 | 456 16 | 768 17 | 18 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_imag.4: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | 1 18 | 0 19 | 0 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 34 | 35 | 456 36 | 234 37 | 120 38 | 0 39 | -120 40 | -234 41 | -456 42 | -768 43 | -456 44 | -234 45 | -120 46 | 0 47 | 120 48 | 234 49 | 456 50 | 768 51 | 52 | 29 53 | 34 54 | 85 55 | 206 56 | 336 57 | 593 58 | 823 59 | 422 60 | -12 61 | -103 62 | -599 63 | -734 64 | -339 65 | -188 66 | -23 67 | 22 68 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_real: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | 1 18 | 0 19 | 0 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 34 | 35 | 0 36 | 120 37 | 234 38 | 456 39 | 768 40 | 456 41 | 234 42 | 120 43 | 0 44 | -120 45 | -234 46 | -456 47 | -768 48 | -456 49 | -234 50 | -120 51 | 52 | 53 | 123 54 | 34 55 | -23 56 | 12 57 | 45 58 | 0 59 | 67 60 | 134 61 | -45 62 | 30 63 | 96 64 | 189 65 | 234 66 | 535 67 | 105 68 | 576 69 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_real.1: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_real.2: -------------------------------------------------------------------------------- 1 | 1 2 | 0 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | 18 | 19 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_real.3: -------------------------------------------------------------------------------- 1 | 0 2 | 120 3 | 234 4 | 456 5 | 768 6 | 456 7 | 234 8 | 120 9 | 0 10 | -120 11 | -234 12 | -456 13 | -768 14 | -456 15 | -234 16 | -120 17 | 18 | 19 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/in_real.4: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | 1 18 | 0 19 | 0 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 34 | 35 | 0 36 | 120 37 | 234 38 | 456 39 | 768 40 | 456 41 | 234 42 | 120 43 | 0 44 | -120 45 | -234 46 | -456 47 | -768 48 | -456 49 | -234 50 | -120 51 | 52 | 53 | 123 54 | 34 55 | -23 56 | 12 57 | 45 58 | 0 59 | 67 60 | 134 61 | -45 62 | 30 63 | 96 64 | 189 65 | 234 66 | 535 67 | 105 68 | 576 69 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/out_imag.1.golden: -------------------------------------------------------------------------------- 1 | 3.217600e+04 2 | 0.000000e+00 3 | 0.000000e+00 4 | 0.000000e+00 5 | 0.000000e+00 6 | 0.000000e+00 7 | 0.000000e+00 8 | 0.000000e+00 9 | 0.000000e+00 10 | 0.000000e+00 11 | 0.000000e+00 12 | 0.000000e+00 13 | 0.000000e+00 14 | 0.000000e+00 15 | 0.000000e+00 16 | 0.000000e+00 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/out_imag.2.golden: -------------------------------------------------------------------------------- 1 | 1.000000e+00 2 | 1.000000e+00 3 | 1.000000e+00 4 | 1.000000e+00 5 | 1.000000e+00 6 | 1.000000e+00 7 | 1.000000e+00 8 | 1.000000e+00 9 | 1.000000e+00 10 | 1.000000e+00 11 | 1.000000e+00 12 | 1.000000e+00 13 | 1.000000e+00 14 | 1.000000e+00 15 | 1.000000e+00 16 | 1.000000e+00 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/out_imag.3.golden: -------------------------------------------------------------------------------- 1 | 0.000000e+00 2 | -3.095583e+02 3 | 0.000000e+00 4 | 1.560636e+03 5 | 0.000000e+00 6 | -8.567042e+02 7 | 0.000000e+00 8 | 2.504492e+01 9 | 0.000000e+00 10 | -6.329711e+02 11 | 0.000000e+00 12 | 3.824861e+02 13 | 0.000000e+00 14 | -6.967664e+02 15 | 0.000000e+00 16 | 7.823833e+03 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/out_real.1.golden: -------------------------------------------------------------------------------- 1 | 3.217600e+04 2 | 0.000000e+00 3 | 0.000000e+00 4 | 0.000000e+00 5 | 0.000000e+00 6 | 0.000000e+00 7 | 0.000000e+00 8 | 0.000000e+00 9 | 0.000000e+00 10 | 0.000000e+00 11 | 0.000000e+00 12 | 0.000000e+00 13 | 0.000000e+00 14 | 0.000000e+00 15 | 0.000000e+00 16 | 0.000000e+00 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/out_real.2.golden: -------------------------------------------------------------------------------- 1 | 1.000000e+00 2 | 1.000000e+00 3 | 1.000000e+00 4 | 1.000000e+00 5 | 1.000000e+00 6 | 1.000000e+00 7 | 1.000000e+00 8 | 1.000000e+00 9 | 1.000000e+00 10 | 1.000000e+00 11 | 1.000000e+00 12 | 1.000000e+00 13 | 1.000000e+00 14 | 1.000000e+00 15 | 1.000000e+00 16 | 1.000000e+00 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_flpt/out_real.3.golden: -------------------------------------------------------------------------------- 1 | 0.000000e+00 2 | -1.556257e+03 3 | 0.000000e+00 4 | -1.042783e+03 5 | 0.000000e+00 6 | -5.724320e+02 7 | 0.000000e+00 8 | -1.259072e+02 9 | 0.000000e+00 10 | 1.259054e+02 11 | 0.000000e+00 12 | 5.724309e+02 13 | 0.000000e+00 14 | 1.042783e+03 15 | 0.000000e+00 16 | 1.556260e+03 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/Makefile: -------------------------------------------------------------------------------- 1 | SYSTEMC_HOME ?= ../../../.. 2 | include ../../../build-unix/Makefile.config 3 | 4 | PROJECT = fft_fxpt 5 | SRCS = $(wildcard *.cpp) 6 | OBJS = $(SRCS:.cpp=.o) 7 | EXTRA_CLEAN = out_real out_imag 8 | 9 | include ../../../build-unix/Makefile.rules 10 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_imag: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | 1 18 | 0 19 | 0 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 34 | 35 | 456 36 | 234 37 | 120 38 | 0 39 | -120 40 | -234 41 | -456 42 | -768 43 | -456 44 | -234 45 | -120 46 | 0 47 | 120 48 | 234 49 | 456 50 | 768 51 | 52 | 29 53 | 34 54 | 85 55 | 206 56 | 336 57 | 593 58 | 823 59 | 422 60 | -12 61 | -103 62 | -599 63 | -734 64 | -339 65 | -188 66 | -23 67 | 22 68 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_imag.1: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_imag.2: -------------------------------------------------------------------------------- 1 | 1 2 | 0 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | 18 | 19 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_imag.3: -------------------------------------------------------------------------------- 1 | 456 2 | 234 3 | 120 4 | 0 5 | -120 6 | -234 7 | -456 8 | -768 9 | -456 10 | -234 11 | -120 12 | 0 13 | 120 14 | 234 15 | 456 16 | 768 17 | 18 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_imag.4: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | 1 18 | 0 19 | 0 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 34 | 35 | 456 36 | 234 37 | 120 38 | 0 39 | -120 40 | -234 41 | -456 42 | -768 43 | -456 44 | -234 45 | -120 46 | 0 47 | 120 48 | 234 49 | 456 50 | 768 51 | 52 | 29 53 | 34 54 | 85 55 | 206 56 | 336 57 | 593 58 | 823 59 | 422 60 | -12 61 | -103 62 | -599 63 | -734 64 | -339 65 | -188 66 | -23 67 | 22 68 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_real: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | 1 18 | 0 19 | 0 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 34 | 35 | 0 36 | 120 37 | 234 38 | 456 39 | 768 40 | 456 41 | 234 42 | 120 43 | 0 44 | -120 45 | -234 46 | -456 47 | -768 48 | -456 49 | -234 50 | -120 51 | 52 | 53 | 123 54 | 34 55 | -23 56 | 12 57 | 45 58 | 0 59 | 67 60 | 134 61 | -45 62 | 30 63 | 96 64 | 189 65 | 234 66 | 535 67 | 105 68 | 576 69 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_real.1: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_real.2: -------------------------------------------------------------------------------- 1 | 1 2 | 0 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | 18 | 19 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_real.3: -------------------------------------------------------------------------------- 1 | 0 2 | 120 3 | 234 4 | 456 5 | 768 6 | 456 7 | 234 8 | 120 9 | 0 10 | -120 11 | -234 12 | -456 13 | -768 14 | -456 15 | -234 16 | -120 17 | 18 | 19 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/in_real.4: -------------------------------------------------------------------------------- 1 | 2011 2 | 2011 3 | 2011 4 | 2011 5 | 2011 6 | 2011 7 | 2011 8 | 2011 9 | 2011 10 | 2011 11 | 2011 12 | 2011 13 | 2011 14 | 2011 15 | 2011 16 | 2011 17 | 1 18 | 0 19 | 0 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 34 | 35 | 0 36 | 120 37 | 234 38 | 456 39 | 768 40 | 456 41 | 234 42 | 120 43 | 0 44 | -120 45 | -234 46 | -456 47 | -768 48 | -456 49 | -234 50 | -120 51 | 52 | 53 | 123 54 | 34 55 | -23 56 | 12 57 | 45 58 | 0 59 | 67 60 | 134 61 | -45 62 | 30 63 | 96 64 | 189 65 | 234 66 | 535 67 | 105 68 | 576 69 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/out_imag.1.golden: -------------------------------------------------------------------------------- 1 | 32176 2 | 0 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/out_imag.2.golden: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 1 4 | 1 5 | 1 6 | 1 7 | 1 8 | 1 9 | 1 10 | 1 11 | 1 12 | 1 13 | 1 14 | 1 15 | 1 16 | 1 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/out_imag.3.golden: -------------------------------------------------------------------------------- 1 | 0 2 | -316 3 | 0 4 | 1543 5 | 0 6 | -821 7 | 0 8 | 163 9 | 0 10 | -592 11 | 0 12 | 453 13 | 0 14 | -655 15 | 0 16 | 7521 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/out_imag.4.golden: -------------------------------------------------------------------------------- 1 | 32176 2 | 0 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | 1 18 | 1 19 | 1 20 | 1 21 | 1 22 | 1 23 | 1 24 | 1 25 | 1 26 | 1 27 | 1 28 | 1 29 | 1 30 | 1 31 | 1 32 | 1 33 | 0 34 | -316 35 | 0 36 | 1543 37 | 0 38 | -821 39 | 0 40 | 163 41 | 0 42 | -592 43 | 0 44 | 453 45 | 0 46 | -655 47 | 0 48 | 7521 49 | 552 50 | 877 51 | 1128 52 | -41 53 | 35 54 | 586 55 | 255 56 | 592 57 | 48 58 | -407 59 | -900 60 | 179 61 | -579 62 | -148 63 | -403 64 | -1310 65 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/out_real.1.golden: -------------------------------------------------------------------------------- 1 | 32176 2 | 0 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/out_real.2.golden: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 1 4 | 1 5 | 1 6 | 1 7 | 1 8 | 1 9 | 1 10 | 1 11 | 1 12 | 1 13 | 1 14 | 1 15 | 1 16 | 1 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/out_real.3.golden: -------------------------------------------------------------------------------- 1 | 0 2 | -1501 3 | 0 4 | -951 5 | 0 6 | -526 7 | 0 8 | -76 9 | 0 10 | 121 11 | 0 12 | 519 13 | 0 14 | 974 15 | 0 16 | 1440 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fft/fft_fxpt/out_real.4.golden: -------------------------------------------------------------------------------- 1 | 32176 2 | 0 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | 1 18 | 1 19 | 1 20 | 1 21 | 1 22 | 1 23 | 1 24 | 1 25 | 1 26 | 1 27 | 1 28 | 1 29 | 1 30 | 1 31 | 1 32 | 1 33 | 0 34 | -1501 35 | 0 36 | -951 37 | 0 38 | -526 39 | 0 40 | -76 41 | 0 42 | 121 43 | 0 44 | 519 45 | 0 46 | 974 47 | 0 48 | 1440 49 | 2112 50 | 4126 51 | -2477 52 | 279 53 | 523 54 | -183 55 | 85 56 | -413 57 | -908 58 | -458 59 | -505 60 | 921 61 | -299 62 | -165 63 | 2093 64 | -2763 65 | -------------------------------------------------------------------------------- /systemc/examples/sysc/fir/Makefile: -------------------------------------------------------------------------------- 1 | include ../../build-unix/Makefile.config 2 | 3 | PROJECTS := fir fir_rtl 4 | COMMON_TARGETS := all build run check clean ultraclean 5 | 6 | COMMON_SRCS = \ 7 | stimulus.cpp \ 8 | display.cpp 9 | 10 | fir_SRCS = \ 11 | $(COMMON_SRCS) \ 12 | fir.cpp \ 13 | main.cpp 14 | 15 | fir_rtl_SRCS = \ 16 | $(COMMON_SRCS) \ 17 | fir_fsm.cpp \ 18 | fir_data.cpp \ 19 | main_rtl.cpp 20 | 21 | # project not set -> all projects 22 | ifeq (,$(strip $(PROJECT))) 23 | 24 | $(COMMON_TARGETS):: 25 | @for prj in $(PROJECTS) ; do \ 26 | $(MAKE) $@ FLAG_BATCH=1 PROJECT=$$prj ; \ 27 | done 28 | 29 | else # module-specific rules 30 | 31 | OBJS := $($(PROJECT)_SRCS:.cpp=.o) 32 | 33 | include ../../build-unix/Makefile.rules 34 | 35 | endif # project switch 36 | 37 | ## Taf! 38 | -------------------------------------------------------------------------------- /systemc/examples/sysc/pipe/Makefile: -------------------------------------------------------------------------------- 1 | include ../../build-unix/Makefile.config 2 | 3 | PROJECT := pipe 4 | SRCS := $(wildcard *.cpp) 5 | OBJS := $(SRCS:.cpp=.o) 6 | 7 | include ../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/pipe/README: -------------------------------------------------------------------------------- 1 | README for Pipe 2 | ================================================================= 3 | 4 | This is a basic example to show how to use SystemC and user 5 | can use it as a template to create more complex models. 6 | 7 | It consists of 3 processes that form individual stages of a pipleline. 8 | 9 | | +-----------+ +-----------+ +-----------+ | 10 | | | | | | | | | 11 | | | stage1 |---->| stage2 |-->| stage3 | | 12 | | | | | | | | | 13 | | +-----------+ +-----------+ +-----------+ | 14 | 15 | The first stage of the pipeline accepts 2 inputs and computes their sum 16 | and difference. The second stage accepts the results of the first 17 | stage and computes their product and quotient. Finally stage3 18 | accepts these outputs from second stage and computes the first input raised to 19 | the power of the second. 20 | 21 | In order to compile this model, you have to execute gmake/make, 22 | then you should find a run.x executable after the compilation. Execute 23 | run.x and it will print out the results to your screen. 24 | -------------------------------------------------------------------------------- /systemc/examples/sysc/pkt_switch/Makefile: -------------------------------------------------------------------------------- 1 | include ../../build-unix/Makefile.config 2 | 3 | PROJECT = pkt_switch 4 | SRCS = $(wildcard *.cpp) 5 | OBJS = $(SRCS:.cpp=.o) 6 | 7 | include ../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/risc_cpu/Makefile: -------------------------------------------------------------------------------- 1 | include ../../build-unix/Makefile.config 2 | 3 | PROJECT := risc_cpu 4 | SRCS := $(wildcard *.cpp) 5 | OBJS := $(SRCS:.cpp=.o) 6 | 7 | include ../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/risc_cpu/bios.img: -------------------------------------------------------------------------------- 1 | 0x0f000000 2 | 0x0f000001 3 | 0x0f000002 4 | 0x0f000003 5 | 0x0f000004 6 | 0x0f000005 7 | -------------------------------------------------------------------------------- /systemc/examples/sysc/risc_cpu/dcache.img: -------------------------------------------------------------------------------- 1 | 0x00000001 2 | 0x00000002 3 | 0x00000003 4 | 0x00000004 5 | 0x00000005 6 | 0x00000006 7 | 0x00000007 8 | 0x00000008 9 | 0x00000009 10 | 0x00000010 11 | 0x00000011 12 | 0x00000012 13 | 0x00000013 14 | 0x00000014 15 | 0x00000015 16 | 0x00000016 17 | 0x00000017 18 | 0x00000018 19 | 0x00000019 20 | 0x00000020 21 | 0x00000021 22 | 0x00000022 23 | 0x00000023 24 | 0x00000024 25 | 0x00000025 26 | 0x00000026 27 | 0x00000027 28 | 0x00000028 29 | 0x00000029 30 | 0x00000030 31 | -------------------------------------------------------------------------------- /systemc/examples/sysc/risc_cpu/icache.img: -------------------------------------------------------------------------------- 1 | 0x00000000 2 | 0x00000000 3 | 0x00000000 4 | 0x00000000 5 | 0x00000000 6 | 0xf160000a 7 | 0x00000000 8 | 0xf160000a 9 | 0x00000000 10 | 0xf160000a 11 | 0x00000000 12 | 0xf160000a 13 | 0x00000000 14 | 0xf160000a 15 | 0x00000000 16 | 0xf160000a 17 | 0x00000000 18 | 0xf1500005 19 | 0x00000000 20 | 0x0f550000 21 | 0x00000000 22 | 0x0f550000 23 | 0x00000000 24 | 0x0f550000 25 | 0x00000000 26 | 0x0f550000 27 | 0x00000000 28 | 0x0f550000 29 | 0x00000000 30 | 0x02550001 31 | 0x00000000 32 | 0x1156fffa 33 | 0x00000000 34 | 0x01123000 35 | 0x00000000 36 | 0x01234000 37 | 0x00000000 38 | 0xffffffff 39 | -------------------------------------------------------------------------------- /systemc/examples/sysc/risc_cpu/program.img: -------------------------------------------------------------------------------- 1 | Input source name = test.m 2 | 0x00000000 3 | 0x00000000 4 | 0x00000000 5 | 0x00000000 6 | 0x00000000 7 | 0x01010203 /* add R1, R2, R3 */ 8 | 0x00000000 9 | 0x0202030e /* addi R2, R3, 14 */ 10 | 0x00000000 11 | 0x04040506 /* sub R4, R5, R6 */ 12 | 0x00000000 13 | 0x0504051c /* subi R4, R5, 28 */ 14 | 0x00000000 15 | 0x07010204 /* mul R1, R2, R4 */ 16 | 0x00000000 17 | 0x090a0d0f /* nand R10, R13, R15 */ 18 | 0x00000000 19 | /* lw R11, R0, 1 */ 20 | 0x00000000 21 | -------------------------------------------------------------------------------- /systemc/examples/sysc/risc_cpu/register.img: -------------------------------------------------------------------------------- 1 | 0x00000000 2 | 0x00000001 3 | 0xfff000e2 4 | 0xffffffff 5 | 0x00000004 6 | 0x00000005 7 | 0x00000006 8 | 0xfcf0fdef 9 | 0x00000008 10 | 0x00000009 11 | 0x00000010 12 | 0x0000ff31 13 | 0x0000ff12 14 | 0x00000013 15 | 0x00000014 16 | 0x00000015 17 | 0x00000016 18 | 0x00fe0117 19 | 0x00fe0118 20 | 0x00fe0119 21 | 0x00fe0220 22 | 0x00fe0321 23 | 0x00fe0322 24 | 0x00ff0423 25 | 0x00ff0524 26 | 0x00ff0625 27 | 0x00ff0726 28 | 0x00ff0727 29 | 0x00f70728 30 | 0x00000029 31 | 0x00000030 32 | 0x00000031 33 | -------------------------------------------------------------------------------- /systemc/examples/sysc/risc_cpu/test.asm: -------------------------------------------------------------------------------- 1 | movi R6, 10 2 | movi R6, 10 3 | movi R6, 10 4 | movi R6, 10 5 | movi R6, 10 6 | movi R6, 10 7 | movi R5, 5 8 | mov R5, R5 9 | mov R5, R5 10 | mov R5, R5 11 | mov R5, R5 12 | mov R5, R5 13 | addi R5, R5, 1 14 | bne R5, R6, -6 15 | add R1, R2, R3 16 | add R2, R3, R4 17 | -------------------------------------------------------------------------------- /systemc/examples/sysc/risc_cpu/test1.asm: -------------------------------------------------------------------------------- 1 | ldpid 0 2 | add R1, R1, R3 3 | addi R1, R3, 14 4 | fadd R3, R2, R2 5 | fmul R10, R11, R11 6 | sub R4, R5, R6 7 | movi R5, 10 8 | movi Re, 0 9 | subi R4, R5, 18 10 | mul R1, R1, R4 11 | addi R4, R6, 14 12 | nand R10, R13, R15 13 | addi Re, Re, 1 14 | movi R11, 10 15 | beq R5, Re, 1 16 | lw R11, R11, 1 17 | and R10, R13, R15 18 | mmxadds R13, R11, R11 19 | mmxsub R9, R10, R3 20 | mov R13, R13 21 | sub R4, R5, R6 22 | beq R4, R4, 2 23 | not R4, R6 24 | nand R10, R13, R15 25 | mmxadds R13, R11, R11 26 | and R11, R14, R15 27 | mmxsub R9, R10, R3 28 | mul R1, R10, R1 29 | fadd R3, R2, R2 30 | movi R11, 10 31 | fmul R10, R11, R11 32 | beq R4, R4, 2 33 | xor R13, R14, R1 34 | div R1, R1, R3 35 | pmadd R3, R11, R14 36 | mmxck R1, R1, R4 37 | movi R11, 8 38 | movi R12, 4 39 | fdiv R13, R11, R12 40 | sw R13, R0, 10 41 | sub R3, R3, R11 42 | mod R4, R5, R5 43 | pack R11, R13, R15 44 | lw R11, R0, 5 45 | and R10, R13, R15 46 | mmxadds R13, R11, R11 47 | mmxsub R9, R10, R3 48 | mov R13, R13 49 | sub R4, R5, R6 50 | nand R10, R13, R15 51 | mmxadds R13, R11, R11 52 | and R11, R14, R15 53 | mov R1, R3 54 | -------------------------------------------------------------------------------- /systemc/examples/sysc/rsa/Makefile: -------------------------------------------------------------------------------- 1 | include ../../build-unix/Makefile.config 2 | 3 | PROJECT = rsa 4 | OBJS = $(PROJECT).o 5 | 6 | include ../../build-unix/Makefile.rules 7 | -------------------------------------------------------------------------------- /systemc/examples/sysc/simple_bus/ChangeLog: -------------------------------------------------------------------------------- 1 | 2001-10-19 Ric Hilderink 2 | 3 | * Simple bus version 2 released. 4 | 5 | This version is a drastic simplification of the first version, 6 | focussing on the most elementary features and capabilities of a 7 | bus modeled at the Transaction-Level with SystemC 2.0. 8 | 9 | 2001-11-09 Martin Janssen 10 | 11 | * Simple bus version 2.1 released. 12 | 13 | This version supports the Windows NT platform, in addition to 14 | the UNIX platforms already supported in the previous release. 15 | 16 | 2001-11-27 Martin Janssen 17 | 18 | * Simple bus version 2.2 released. 19 | 20 | This version includes improvements in the README file and in 21 | the verbose output of the bus arbiter model. 22 | 23 | 2002-01-28 Holger Keding 24 | 25 | * Simple bus version 2.3 released. 26 | 27 | This version uses byte addressing throughout all models. 28 | Also, before simulation starts this version is performing a 29 | one-time check for overlapping address spaces of the slaves 30 | attached to the bus. 31 | -------------------------------------------------------------------------------- /systemc/examples/sysc/simple_bus/LEGAL: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | 3 | Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 | more contributor license agreements. See the NOTICE file distributed 5 | with this work for additional information regarding copyright ownership. 6 | Accellera licenses this file to you under the Apache License, Version 2.0 7 | (the "License"); you may not use this file except in compliance with the 8 | License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 15 | implied. See the License for the specific language governing 16 | permissions and limitations under the License. 17 | 18 | *****************************************************************************/ 19 | 20 | /***************************************************************************** 21 | 22 | Original Author: Ric Hilderink, Synopsys, Inc., 2001-10-11 23 | 24 | *****************************************************************************/ 25 | -------------------------------------------------------------------------------- /systemc/examples/sysc/simple_bus/Makefile: -------------------------------------------------------------------------------- 1 | include ../../build-unix/Makefile.config 2 | 3 | PROJECT := simple_bus 4 | SRCS := $(wildcard *.cpp) 5 | OBJS := $(SRCS:.cpp=.o) 6 | 7 | include ../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/simple_bus/SLIDES.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/sysc/simple_bus/SLIDES.pdf -------------------------------------------------------------------------------- /systemc/examples/sysc/simple_fifo/Makefile: -------------------------------------------------------------------------------- 1 | include ../../build-unix/Makefile.config 2 | 3 | PROJECT := simple_fifo 4 | SRCS := $(wildcard *.cpp) 5 | OBJS := $(SRCS:.cpp=.o) 6 | 7 | include ../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/sysc/simple_perf/Makefile: -------------------------------------------------------------------------------- 1 | include ../../build-unix/Makefile.config 2 | 3 | PROJECT := simple_perf 4 | SRCS := $(wildcard *.cpp) 5 | OBJS := $(SRCS:.cpp=.o) 6 | 7 | include ../../build-unix/Makefile.rules 8 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_1_phase/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT = at_1_phase 4 | 5 | OBJS=\ 6 | $(OUTDIR)\$(PROJECT).obj \ 7 | $(OUTDIR)\$(PROJECT)_top.obj \ 8 | $(OUTDIR)\initiator_top.obj \ 9 | \ 10 | $(OUTDIR)\at_target_1_phase.obj \ 11 | $(OUTDIR)\memory.obj \ 12 | $(OUTDIR)\report.obj \ 13 | $(OUTDIR)\select_initiator.obj \ 14 | $(OUTDIR)\traffic_generator.obj 15 | 16 | !include <..\..\..\build-msvc\Makefile.rules> 17 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_1_phase/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = at_1_phase 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | $(PROJECT).o \ 15 | $(PROJECT)_top.o \ 16 | initiator_top.o \ 17 | \ 18 | at_target_1_phase.o \ 19 | memory.o \ 20 | report.o \ 21 | select_initiator.o \ 22 | traffic_generator.o 23 | 24 | include ../../../build-unix/Makefile.rules 25 | 26 | # DO NOT DELETE 27 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_1_phase/docs/at_1_phase_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_1_phase/docs/at_1_phase_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/at_1_phase/docs/at_1_phase_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_1_phase/docs/at_1_phase_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/at_2_phase/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT=at_2_phase 4 | 5 | OBJS=\ 6 | $(OUTDIR)\$(PROJECT).obj \ 7 | $(OUTDIR)\$(PROJECT)_top.obj \ 8 | $(OUTDIR)\initiator_top.obj \ 9 | \ 10 | $(OUTDIR)\at_target_2_phase.obj \ 11 | \ 12 | $(OUTDIR)\memory.obj \ 13 | $(OUTDIR)\report.obj \ 14 | $(OUTDIR)\select_initiator.obj \ 15 | $(OUTDIR)\traffic_generator.obj 16 | 17 | !include <..\..\..\build-msvc\Makefile.rules> 18 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_2_phase/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = at_2_phase 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | $(PROJECT).o \ 15 | $(PROJECT)_top.o \ 16 | initiator_top.o \ 17 | \ 18 | at_target_2_phase.o \ 19 | memory.o \ 20 | report.o \ 21 | select_initiator.o \ 22 | traffic_generator.o 23 | 24 | include ../../../build-unix/Makefile.rules 25 | 26 | # DO NOT DELETE 27 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_2_phase/docs/at_2_phase_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_2_phase/docs/at_2_phase_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/at_2_phase/docs/at_2_phase_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_2_phase/docs/at_2_phase_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/at_4_phase/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT = at_4_phase 4 | 5 | OBJS = \ 6 | $(OUTDIR)\$(PROJECT).obj \ 7 | $(OUTDIR)\$(PROJECT)_top.obj \ 8 | $(OUTDIR)\initiator_top.obj \ 9 | \ 10 | $(OUTDIR)\at_target_4_phase.obj \ 11 | $(OUTDIR)\memory.obj \ 12 | $(OUTDIR)\report.obj \ 13 | $(OUTDIR)\select_initiator.obj \ 14 | $(OUTDIR)\traffic_generator.obj 15 | 16 | !include <..\..\..\build-msvc\Makefile.rules> 17 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_4_phase/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = at_4_phase 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | $(PROJECT).o \ 15 | $(PROJECT)_top.o \ 16 | initiator_top.o \ 17 | \ 18 | at_target_4_phase.o \ 19 | memory.o \ 20 | report.o \ 21 | select_initiator.o \ 22 | traffic_generator.o 23 | 24 | include ../../../build-unix/Makefile.rules 25 | 26 | # DO NOT DELETE 27 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_4_phase/docs/at_4_phase_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_4_phase/docs/at_4_phase_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/at_4_phase/docs/at_4_phase_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_4_phase/docs/at_4_phase_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/at_extension_optional/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT = at_extension_optional 4 | 5 | CXXFLAGS_DEFINES = \ 6 | $(CXXFLAGS_DEFINES) \ 7 | /DUSING_EXTENSION_OPTIONAL 8 | 9 | OBJS = \ 10 | $(OUTDIR)\$(PROJECT).obj \ 11 | $(OUTDIR)\$(PROJECT)_top.obj \ 12 | $(OUTDIR)\initiator_top.obj \ 13 | \ 14 | $(OUTDIR)\at_target_2_phase.obj \ 15 | $(OUTDIR)\at_target_4_phase.obj \ 16 | $(OUTDIR)\extension_initiator_id.obj \ 17 | $(OUTDIR)\memory.obj \ 18 | $(OUTDIR)\report.obj \ 19 | $(OUTDIR)\select_initiator.obj \ 20 | $(OUTDIR)\traffic_generator.obj 21 | 22 | 23 | !include <..\..\..\build-msvc/Makefile.rules> 24 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_extension_optional/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = at_extension_optional 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | CXXFLAGS += -DUSING_EXTENSION_OPTIONAL 14 | 15 | OBJS = \ 16 | $(PROJECT).o \ 17 | $(PROJECT)_top.o \ 18 | initiator_top.o \ 19 | \ 20 | at_target_2_phase.o \ 21 | at_target_4_phase.o \ 22 | extension_initiator_id.o \ 23 | memory.o \ 24 | report.o \ 25 | select_initiator.o \ 26 | traffic_generator.o 27 | 28 | include ../../../build-unix/Makefile.rules 29 | 30 | # DO NOT DELETE 31 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_extension_optional/docs/at_extension_optional_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_extension_optional/docs/at_extension_optional_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/at_extension_optional/docs/at_extension_optional_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_extension_optional/docs/at_extension_optional_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/at_mixed_targets/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT=at_mixed_targets 4 | 5 | OBJS = \ 6 | $(OUTDIR)\$(PROJECT).obj \ 7 | $(OUTDIR)\$(PROJECT)_top.obj \ 8 | $(OUTDIR)\initiator_top.obj \ 9 | \ 10 | $(OUTDIR)\at_target_1_phase.obj \ 11 | $(OUTDIR)\at_target_2_phase.obj \ 12 | $(OUTDIR)\at_target_4_phase.obj \ 13 | $(OUTDIR)\memory.obj \ 14 | $(OUTDIR)\report.obj \ 15 | $(OUTDIR)\select_initiator.obj \ 16 | $(OUTDIR)\traffic_generator.obj 17 | 18 | !include <..\..\..\build-msvc\Makefile.rules> 19 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_mixed_targets/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = at_mixed_targets 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | $(PROJECT).o \ 15 | $(PROJECT)_top.o \ 16 | initiator_top.o \ 17 | \ 18 | at_target_1_phase.o \ 19 | at_target_2_phase.o \ 20 | at_target_4_phase.o \ 21 | memory.o \ 22 | report.o \ 23 | select_initiator.o \ 24 | traffic_generator.o 25 | 26 | include ../../../build-unix/Makefile.rules 27 | 28 | # DO NOT DELETE 29 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_mixed_targets/docs/at_mixed_targets_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_mixed_targets/docs/at_mixed_targets_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/at_mixed_targets/docs/at_mixed_targets_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_mixed_targets/docs/at_mixed_targets_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/at_ooo/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT = at_ooo 4 | 5 | OBJS = \ 6 | $(OUTDIR)\$(PROJECT).obj \ 7 | $(OUTDIR)\$(PROJECT)_top.obj \ 8 | $(OUTDIR)\initiator_top.obj \ 9 | \ 10 | $(OUTDIR)\at_target_2_phase.obj \ 11 | $(OUTDIR)\at_target_ooo_2_phase.obj \ 12 | $(OUTDIR)\memory.obj \ 13 | $(OUTDIR)\report.obj \ 14 | $(OUTDIR)\select_initiator.obj \ 15 | $(OUTDIR)\traffic_generator.obj 16 | 17 | !include <..\..\..\build-msvc\Makefile.rules> 18 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_ooo/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = at_ooo 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | $(PROJECT).o \ 15 | $(PROJECT)_top.o \ 16 | initiator_top.o \ 17 | \ 18 | at_target_2_phase.o \ 19 | at_target_ooo_2_phase.o \ 20 | memory.o \ 21 | report.o \ 22 | select_initiator.o \ 23 | traffic_generator.o 24 | 25 | include ../../../build-unix/Makefile.rules 26 | 27 | # DO NOT DELETE 28 | -------------------------------------------------------------------------------- /systemc/examples/tlm/at_ooo/docs/at_ooo_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_ooo/docs/at_ooo_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/at_ooo/docs/at_ooo_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/at_ooo/docs/at_ooo_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/common/include/models/README.txt: -------------------------------------------------------------------------------- 1 | SimpleBus 2 | --------- 3 | 4 | - Simple bus model 5 | - Runtime switcheable between LT and AT (can only switch if no transactions 6 | are pending) 7 | - No limitation on number of pending transactions (all targets that can return 8 | false must support multiple transactions) 9 | - added support for DMI and debug transactions 10 | - LT mode: 11 | -- Forward nb_transport calls to initiator/targets 12 | -- Only one active request/response phase 13 | - AT mode: 14 | -- Incoming transactions are queued 15 | -- AT protocol is executed from a different SC_THREAD 16 | -- A target is notified immediately of the end of a transaction (using timing 17 | annotation). This is needed because the initiator can re-use the 18 | transaction (and the target may use the transaction pointer to identify the 19 | transaction) 20 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt/README: -------------------------------------------------------------------------------- 1 | This directory contains an example of a simple TLM platform implemented on top of the blocking transport interface. 2 | 3 | The convenience API is the same as in the example lt_min_system. 4 | 5 | Using: 6 | 7 | * cd build-unix 8 | * set SYSTEMC_HOME environment variable 9 | * make 10 | * make run 11 | 12 | 13 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT = lt 4 | 5 | OBJS = \ 6 | $(OUTDIR)\$(PROJECT).obj \ 7 | $(OUTDIR)\$(PROJECT)_top.obj \ 8 | $(OUTDIR)\lt_initiator.obj \ 9 | \ 10 | $(OUTDIR)\at_target_1_phase.obj \ 11 | $(OUTDIR)\lt_target.obj \ 12 | $(OUTDIR)\initiator_top.obj \ 13 | $(OUTDIR)\memory.obj \ 14 | $(OUTDIR)\report.obj \ 15 | $(OUTDIR)\traffic_generator.obj 16 | 17 | !include <..\..\..\build-msvc\Makefile.rules> 18 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = lt 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | $(PROJECT).o \ 15 | $(PROJECT)_top.o \ 16 | lt_initiator.o \ 17 | \ 18 | at_target_1_phase.o \ 19 | lt_target.o \ 20 | initiator_top.o \ 21 | memory.o \ 22 | report.o \ 23 | traffic_generator.o 24 | 25 | include ../../../build-unix/Makefile.rules 26 | 27 | # DO NOT DELETE 28 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt/docs/lt_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt/docs/lt_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/lt/docs/lt_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt/docs/lt_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_dmi/README: -------------------------------------------------------------------------------- 1 | This directory contains an example of a simple TLM platform implemented on top of the blocking transport interface. 2 | 3 | The convenience API is the same as in the example lt_min_system. 4 | 5 | Using: 6 | 7 | * cd build-unix 8 | * set SYSTEMC_HOME environment variable 9 | * make 10 | * make run 11 | 12 | 13 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_dmi/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT = lt_dmi 4 | 5 | OBJS = \ 6 | $(OUTDIR)\$(PROJECT).obj \ 7 | $(OUTDIR)\$(PROJECT)_top.obj \ 8 | $(OUTDIR)\initiator_top.obj \ 9 | \ 10 | $(OUTDIR)\dmi_memory.obj \ 11 | $(OUTDIR)\lt_dmi_initiator.obj \ 12 | $(OUTDIR)\lt_dmi_target.obj \ 13 | $(OUTDIR)\memory.obj \ 14 | $(OUTDIR)\report.obj \ 15 | $(OUTDIR)\traffic_generator.obj 16 | 17 | !include <..\..\..\build-msvc\Makefile.rules> 18 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_dmi/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = lt_dmi 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | $(PROJECT).o \ 15 | $(PROJECT)_top.o \ 16 | initiator_top.o \ 17 | \ 18 | dmi_memory.o \ 19 | lt_dmi_initiator.o \ 20 | lt_dmi_target.o \ 21 | memory.o \ 22 | report.o \ 23 | traffic_generator.o 24 | 25 | include ../../../build-unix/Makefile.rules 26 | 27 | # DO NOT DELETE 28 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_dmi/docs/lt_dmi_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt_dmi/docs/lt_dmi_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_dmi/docs/lt_dmi_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt_dmi/docs/lt_dmi_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_extension_mandatory/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT = lt_extension_mandatory 4 | 5 | OBJS = \ 6 | $(OUTDIR)\$(PROJECT).obj \ 7 | $(OUTDIR)\$(PROJECT)_top.obj \ 8 | $(OUTDIR)\lt_initiator_extension_mandatory.obj \ 9 | $(OUTDIR)\lt_target_extension_mandatory.obj \ 10 | \ 11 | $(OUTDIR)\extension_initiator_id.obj \ 12 | $(OUTDIR)\report.obj 13 | 14 | !include <..\..\..\build-msvc\Makefile.rules> 15 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_extension_mandatory/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = lt_extension_mandatory 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | $(PROJECT).o \ 15 | $(PROJECT)_top.o \ 16 | lt_initiator_extension_mandatory.o \ 17 | lt_target_extension_mandatory.o \ 18 | \ 19 | extension_initiator_id.o \ 20 | report.o 21 | 22 | include ../../../build-unix/Makefile.rules 23 | 24 | # DO NOT DELETE 25 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_extension_mandatory/docs/lt_extension_mandatory_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt_extension_mandatory/docs/lt_extension_mandatory_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_extension_mandatory/docs/lt_extension_mandatory_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt_extension_mandatory/docs/lt_extension_mandatory_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_mixed_endian/README: -------------------------------------------------------------------------------- 1 | This directory contains an example of a simple TLM platform implemented on top of the blocking transport interface. 2 | 3 | The convenience API is the same as in the example lt_min_system. 4 | 5 | Using: 6 | 7 | * cd build-unix 8 | * set SYSTEMC_HOME environment variable 9 | * make 10 | * make run 11 | 12 | 13 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_mixed_endian/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc/Makefile.config> 2 | 3 | PROJECT = lt_mixed_endian 4 | 5 | OBJS = \ 6 | $(OUTDIR)\lt.obj \ 7 | $(OUTDIR)\lt_top.obj \ 8 | $(OUTDIR)\initiator_top.obj \ 9 | $(OUTDIR)\me_traffic_generator.obj \ 10 | \ 11 | $(OUTDIR)\at_target_1_phase.obj \ 12 | $(OUTDIR)\at_target_4_phase.obj \ 13 | $(OUTDIR)\lt_initiator.obj \ 14 | $(OUTDIR)\memory.obj \ 15 | $(OUTDIR)\report.obj 16 | 17 | INPUT = ../results/input.txt 18 | FILTER = "::" 19 | 20 | !include <..\..\..\build-msvc/Makefile.rules> 21 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_mixed_endian/build-msvc/README.txt: -------------------------------------------------------------------------------- 1 | Command line 2 | ~~~~~~~~~~~~ 3 | If you run using nmake and the Makefile, the example should pass. 4 | 5 | Visual C++ GUI 6 | ~~~~~~~~~~~~~~ 7 | If you run using the supplied Visual C++ .sln (solution), you will need to supply a command 8 | line input of ..\results\input.txt and also filter out any lines in the run.log file 9 | that *DO NOT* contain the string "::" (without the quotes) before comparing to the expected.log file. 10 | 11 | To supply a command line input in Visual C++ 12 | 13 | 1. click on the project lt in the solution explorer 14 | 15 | 2. right click on project and select Properties 16 | 17 | 3. In the lt Project Properties page, browse to Configuration Properties > Debugging 18 | 19 | 4. Click in the Command Arguments box and type in 20 | 21 | < ..\results\input.txt 22 | 23 | and click OK. 24 | 25 | Now you can run the program. 26 | 27 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_mixed_endian/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = lt_mixed_endian 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | lt.o \ 15 | lt_top.o \ 16 | initiator_top.o \ 17 | me_traffic_generator.o \ 18 | \ 19 | at_target_1_phase.o \ 20 | at_target_4_phase.o \ 21 | lt_initiator.o \ 22 | memory.o \ 23 | report.o 24 | 25 | INPUT = ../results/input.txt 26 | FILTER = grep "::" 27 | 28 | include ../../../build-unix/Makefile.rules 29 | 30 | # DO NOT DELETE 31 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_mixed_endian/docs/lt_mixed_endian_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt_mixed_endian/docs/lt_mixed_endian_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_mixed_endian/docs/lt_mixed_endian_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt_mixed_endian/docs/lt_mixed_endian_example.ppt -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_temporal_decouple/README: -------------------------------------------------------------------------------- 1 | This directory contains an example of a simple TLM platform implemented on top of the blocking transport interface. 2 | 3 | The convenience API is the same as in the example lt_min_system. 4 | 5 | Using: 6 | 7 | * cd build-unix 8 | * set SYSTEMC_HOME environment variable 9 | * make 10 | * make run 11 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_temporal_decouple/build-msvc/Makefile: -------------------------------------------------------------------------------- 1 | !include <..\..\..\build-msvc\Makefile.config> 2 | 3 | PROJECT = lt_temporal_decouple 4 | 5 | OBJS = \ 6 | $(OUTDIR)\$(PROJECT).obj \ 7 | $(OUTDIR)\$(PROJECT)_top.obj \ 8 | $(OUTDIR)\initiator_top.obj \ 9 | $(OUTDIR)\td_initiator_top.obj \ 10 | \ 11 | $(OUTDIR)\lt_initiator.obj \ 12 | $(OUTDIR)\lt_synch_target.obj \ 13 | $(OUTDIR)\lt_target.obj \ 14 | $(OUTDIR)\lt_td_initiator.obj \ 15 | $(OUTDIR)\memory.obj \ 16 | $(OUTDIR)\report.obj \ 17 | $(OUTDIR)\traffic_generator.obj 18 | 19 | !include <..\..\..\build-msvc\Makefile.rules> 20 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_temporal_decouple/build-unix/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../build-unix/Makefile.config 2 | 3 | PROJECT = lt_temporal_decouple 4 | 5 | VPATH = \ 6 | ../src \ 7 | ../../common/src 8 | 9 | INCDIR = \ 10 | -I../include \ 11 | -I../../common/include 12 | 13 | OBJS = \ 14 | $(PROJECT).o \ 15 | $(PROJECT)_top.o \ 16 | initiator_top.o \ 17 | td_initiator_top.o \ 18 | \ 19 | lt_initiator.o \ 20 | lt_synch_target.o \ 21 | lt_target.o \ 22 | lt_td_initiator.o \ 23 | memory.o \ 24 | report.o \ 25 | traffic_generator.o 26 | 27 | include ../../../build-unix/Makefile.rules 28 | 29 | # DO NOT DELETE 30 | -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_temporal_decouple/docs/lt_temporal_decouple_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt_temporal_decouple/docs/lt_temporal_decouple_example.pdf -------------------------------------------------------------------------------- /systemc/examples/tlm/lt_temporal_decouple/docs/lt_temporal_decouple_example.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/examples/tlm/lt_temporal_decouple/docs/lt_temporal_decouple_example.ppt -------------------------------------------------------------------------------- /systemc/src/README_TLM.txt: -------------------------------------------------------------------------------- 1 | 2 | TLM-2.0 standard header files 3 | ============================= 4 | 5 | Dir: include/ 6 | 7 | SubDirs: tlm_core/ 8 | tlm_1/ 9 | tlm_2/ 10 | tlm_utils/ 11 | 12 | Files: README.txt 13 | tlm 14 | tlm.h 15 | 16 | 17 | Comments 18 | ======== 19 | 20 | To use the TLM-2.0 interoperability standard, a user should only include the tlm 21 | or tlm.h header file. The same holds for the TLM-1.0 implementation that is 22 | included as part of this kit; only include tlm or tlm.h. These header files 23 | refer to all the header files within the tlm_core/ subdirectory, everything 24 | within tlm or tlm.h is contained in the tlm namespace. 25 | 26 | The tlm_utils subdirectory contains a set of additional definitions supported 27 | by the TLM-2.0 standard, but which are not part of the interoperability 28 | requirements. It contains ease-of-use and convenience implementations for the 29 | interoperability standard. All objects defined in the tlm_utils directory are 30 | contained in the tlm_util namespace. 31 | 32 | See the README.txt files in the subdirectories for an explanation of the 33 | internal organization of the header files. 34 | -------------------------------------------------------------------------------- /systemc/src/sc_elab/allocated_node.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by ripopov on 9/25/18. 3 | // 4 | 5 | #ifndef SCTOOL_ALLOCATED_NODE_H 6 | #define SCTOOL_ALLOCATED_NODE_H 7 | 8 | #include 9 | #include 10 | 11 | namespace sc_core 12 | { 13 | class sc_module; 14 | } 15 | 16 | namespace sc_elab 17 | { 18 | 19 | /// allocated_node - information about memory allocation 20 | struct allocated_node { 21 | void *ptr; /// ptr to allocated block 22 | sc_core::sc_module* host_mod_p; /// owning sc_module 23 | std::size_t size_bytes; /// size of allocation in bytes 24 | bool is_array; /// true for new[] allocations 25 | std::string mangled_type_name; 26 | std::size_t array_size; // number of elements in array for new [X] 27 | }; 28 | 29 | /// get traced dynamic allocations for specified module 30 | const std::vector& 31 | get_module_allocs(const sc_core::sc_module* mod_ptr); 32 | 33 | /// Calls before_end_of_elaboration callbacks 34 | void finalize_elaboration(); 35 | 36 | /// Generate mangled names for sc_objects, allocated using raw new or new[] 37 | void finalize_module_allocations(); 38 | 39 | } 40 | 41 | #endif //SCTOOL_ALLOCATED_NODE_H 42 | -------------------------------------------------------------------------------- /systemc/src/sc_elab/process_type_info.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by ripopov on 10/3/18. 3 | // 4 | 5 | #ifndef SCTOOL_PROCESS_TYPE_INFO_H 6 | #define SCTOOL_PROCESS_TYPE_INFO_H 7 | 8 | namespace sc_elab 9 | { 10 | 11 | struct process_type_info { 12 | std::string mangled_host_type; /// Linkage name of host module 13 | std::string function_name; /// Name of function 14 | }; 15 | 16 | } 17 | 18 | #endif //SCTOOL_PROCESS_TYPE_INFO_H 19 | -------------------------------------------------------------------------------- /systemc/src/sc_elab/sc_tool_opts.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by ripopov on 10/30/18. 3 | // 4 | 5 | #include "sc_tool_opts.h" 6 | 7 | std::string *sctool_extra_opts = nullptr; 8 | -------------------------------------------------------------------------------- /systemc/src/sc_elab/sc_tool_opts.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by ripopov on 10/30/18. 3 | // 4 | 5 | #ifndef SCTOOL_SC_TOOL_OPTS_H 6 | #define SCTOOL_SC_TOOL_OPTS_H 7 | 8 | #include 9 | 10 | extern std::string *sctool_extra_opts; 11 | 12 | #endif //SCTOOL_SC_TOOL_OPTS_H 13 | -------------------------------------------------------------------------------- /systemc/src/sc_elab/sensitivity.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by ripopov on 9/28/18. 3 | // 4 | 5 | #ifndef SCTOOL_SENSITIVITY_H 6 | #define SCTOOL_SENSITIVITY_H 7 | 8 | namespace sc_core { 9 | class sc_process_b; 10 | } 11 | 12 | namespace sc_elab { 13 | 14 | struct port_sens_proc { 15 | enum EVENT_KIND {DEFAULT, POSEDGE, NEGEDGE} kind; 16 | sc_core::sc_process_b * proc_ptr; 17 | }; 18 | 19 | } 20 | 21 | #endif //SCTOOL_SENSITIVITY_H 22 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/CHANGES: -------------------------------------------------------------------------------- 1 | QuickThreads 002: Changes since QuickThreads 001. 2 | 3 | - Now can be used by C++ programs. 4 | - Now *really* works with stacks that grow up. 5 | - Supports AXP OSF 2.x cc's varargs. 6 | - Supports HP Precision (HP-PA) on workstations and Convex. 7 | - Supports assemblers for Intel iX86 ith only '//'-style comments. 8 | - Supports Silicon Graphics Irix 5.x with dynamic linking. 9 | - Supports System V and Solaris 2.x with no `_' on compiler-generated 10 | identifiers; *some* platforms only. 11 | 12 | Note: not all "./config" arguments are compatible with QT 001. 13 | 14 | 15 | QuickThreads 001: Base version. 16 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/b.h: -------------------------------------------------------------------------------- 1 | #ifndef B_H 2 | #define B_H "$Header: /Users/acg/CVSROOT/systemc-2.3/src/sysc/qt/b.h,v 1.1.1.1 2006/12/15 20:20:06 acg Exp $" 3 | 4 | #include "copyright.h" 5 | 6 | extern void b_call_reg (int n); 7 | extern void b_call_imm (int n); 8 | extern void b_add (int n); 9 | extern void b_load (int n); 10 | 11 | #endif /* ndef B_H */ 12 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/copyright.h: -------------------------------------------------------------------------------- 1 | /* 2 | * QuickThreads -- Threads-building toolkit. 3 | * Copyright (c) 1993 by David Keppel 4 | * 5 | * Permission to use, copy, modify and distribute this software and 6 | * its documentation for any purpose and without fee is hereby 7 | * granted, provided that the above copyright notice and this notice 8 | * appear in all copies. This software is provided as a 9 | * proof-of-concept and for demonstration purposes; there is no 10 | * representation about the suitability of this software for any 11 | * purpose. 12 | */ 13 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/axp.1.Makefile: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Compiling for the DEC AXP (alpha) with GNU CC or version 1.x of OSF. 4 | # 5 | CC = cc -std1 -D__AXP__ -D__OSF1__ 6 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/axp.2.Makefile: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Compiling for the DEC AXP (alpha) with GNU CC or version 2.x of OSF. 4 | # 5 | CC = cc -std1 -D__AXP__ -D__OSF2__ 6 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/axp.Makefile: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # GNU CC 4 | # 5 | CC = gcc -D__AXP__ 6 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/axp.README: -------------------------------------------------------------------------------- 1 | The handling of varargs is platform-dependent. Assar Westerlund 2 | stared at the problem for a while and deduces the following table: 3 | 4 | vers / compiler cc gcc 5 | ---------------------------------------------------------------------- 6 | 1.3 a0, offset __base, __offset 7 | 2.0 _a0, _offset __base, __offset 8 | 9 | The current code should handle both cc and gcc versions, provided 10 | you configure for the correct compiler. 11 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/default.Makefile: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # `Normal' configuration. 4 | # 5 | CC = gcc -ansi -Wall -pedantic 6 | 7 | .o.s: 8 | as -o $@ $< 9 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/hppa-cnx.Makefile: -------------------------------------------------------------------------------- 1 | # This file (cnx_spp.Makefile) is part of the port of QuickThreads for 2 | # PA-RISC 1.1 architecture on a Convex SPP. This file is a machine dependent 3 | # makefile for QuickThreads. It was written in 1994 by Uwe Reder 4 | # (`uereder@cip.informatik.uni-erlangen.de') for the Operating Systems 5 | # Department (IMMD4) at the University of Erlangen/Nuernberg Germany. 6 | 7 | # `Normal' configuration. 8 | 9 | CC = /usr/convex/bin/cc 10 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/hppa.Makefile: -------------------------------------------------------------------------------- 1 | # This file (pa-risc.Makefile) is part of the port of QuickThreads for 2 | # PA-RISC 1.1 architecture. This file is a machine dependent makefile 3 | # for QuickThreads. It was written in 1994 by Uwe Reder 4 | # (`uereder@cip.informatik.uni-erlangen.de') for the Operating Systems 5 | # Department (IMMD4) at the University of Erlangen/Nuernberg Germany. 6 | 7 | # `Normal' configuration. 8 | 9 | CC = cc -Aa 10 | 11 | .s.o: 12 | /usr/ccs/bin/as -o $@ $< 13 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/i386.README: -------------------------------------------------------------------------------- 1 | Note that some machines want labels to have leading underscores, 2 | while others (e.g. System V) do not. Thus, several labels appear 3 | duplicated except for the leading underscore, e.g. 4 | 5 | _qt_cswap: 6 | qt_cswap: 7 | 8 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/i386_b.s: -------------------------------------------------------------------------------- 1 | /* 2 | // QuickThreads -- Threads-building toolkit. 3 | // Copyright (c) 1993 by David Keppel 4 | // 5 | // Permission to use, copy, modify and distribute this software and 6 | // its documentation for any purpose and without fee is hereby 7 | // granted, provided that the above copyright notice and this notice 8 | // appear in all copies. This software is provided as a 9 | // proof-of-concept and for demonstration purposes; there is no 10 | // representation about the suitability of this software for any 11 | // purpose. */ 12 | 13 | .globl _b_call_reg 14 | .globl b_call_reg 15 | .globl _b_call_imm 16 | .globl b_call_imm 17 | .globl _b_add 18 | .globl b_add 19 | .globl _b_load 20 | .globl b_load 21 | 22 | _b_call_reg: 23 | b_call_reg: 24 | _b_call_imm: 25 | b_call_imm: 26 | _b_add: 27 | b_add: 28 | _b_load: 29 | b_load: 30 | hlt 31 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/ksr1.Makefile: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # KSR1 configuration. 4 | # 5 | CC = cc -ansi 6 | 7 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/ksr1_b.s: -------------------------------------------------------------------------------- 1 | /* 2 | * QuickThreads -- Threads-building toolkit. 3 | * Copyright (c) 1993 by David Keppel 4 | * 5 | * Permission to use, copy, modify and distribute this software and 6 | * its documentation for any purpose and without fee is hereby 7 | * granted, provided that the above copyright notice and this notice 8 | * appear in all copies. This software is provided as a 9 | * proof-of-concept and for demonstration purposes; there is no 10 | * representation about the suitability of this software for any 11 | * purpose. 12 | */ 13 | 14 | .file "ksr1_b.s" 15 | .def .debug; .endef 16 | 17 | .globl b_call_reg$TXT 18 | .globl b_call_reg 19 | .globl b_call_imm$TXT 20 | .globl b_call_imm 21 | .globl b_add$TXT 22 | .globl b_add 23 | .globl b_load$TXT 24 | .globl b_load 25 | 26 | 27 | b_call_reg: 28 | b_call_imm: 29 | b_add: 30 | b_load: 31 | .word b_call_reg$TXT 32 | .word qt_error 33 | .word qt_error$TXT 34 | 35 | 36 | b_call_reg$TXT: 37 | b_call_imm$TXT: 38 | b_add$TXT: 39 | b_load$TXT: 40 | finop ; cxnop 41 | finop ; cxnop 42 | finop ; ld8 16(%cp),%c4 43 | finop ; ld8 8(%cp),%cp 44 | finop ; cxnop 45 | finop ; cxnop 46 | finop ; jsr %c4,0(%c4) 47 | finop ; cxnop 48 | finop ; cxnop 49 | 50 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/m88k.Makefile: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Hosted compilers for 88k for Meerkat. 4 | # 5 | CC = gcc88 -Dm88k -ansi -pedantic -Wall -fno-builtin 6 | AS = as88 7 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/multi.s: -------------------------------------------------------------------------------- 1 | /* multi.s -- arm64,i386,x86_64 assembly support. */ 2 | 3 | #if defined(__aarch64__) || defined(__arm64__) 4 | #include "aarch64.s" 5 | #elif defined(__i386) 6 | #include "i386.s" 7 | #elif defined(__x86_64__) 8 | #include "iX86_64.s" 9 | #endif 10 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/null.README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/systemc-compiler/6fa138eb8731e818bba15b945fb2546cfafe4cdb/systemc/src/sysc/packages/qt/md/null.README -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/null.c: -------------------------------------------------------------------------------- 1 | /* 2 | * QuickThreads -- Threads-building toolkit. 3 | * Copyright (c) 1993 by David Keppel 4 | * 5 | * Permission to use, copy, modify and distribute this software and 6 | * its documentation for any purpose and without fee is hereby 7 | * granted, provided that the above copyright notice and this notice 8 | * appear in all copies. This software is provided as a 9 | * proof-of-concept and for demonstration purposes; there is no 10 | * representation about the suitability of this software for any 11 | * purpose. 12 | */ 13 | 14 | char const qtmd_rcsid[] = "$Header: /Users/acg/CVSROOT/systemc-2.3/src/sysc/qt/md/null.c,v 1.1.1.1 2006/12/15 20:20:06 acg Exp $"; 15 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/null.s: -------------------------------------------------------------------------------- 1 | /* 2 | * QuickThreads -- Threads-building toolkit. 3 | * Copyright (c) 1993 by David Keppel 4 | * 5 | * Permission to use, copy, modify and distribute this software and 6 | * its documentation for any purpose and without fee is hereby 7 | * granted, provided that the above copyright notice and this notice 8 | * appear in all copies. This software is provided as a 9 | * proof-of-concept and for demonstration purposes; there is no 10 | * representation about the suitability of this software for any 11 | * purpose. 12 | */ 13 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/powerpc.README: -------------------------------------------------------------------------------- 1 | 2 | PowerPC assembly support 3 | 4 | 5 | 1) MacOS X, Darwin, MKLinux and other systems based on Mach kernel ABI: 6 | 7 | - Configuration command: ./config powerpc-darwin 8 | 9 | - See documentation inside powerpc_mach.h, powerpc_mach.s, powerpc.c. 10 | 11 | 12 | 2) LinuxPPC, and other systems based on System V ABI: 13 | 14 | - Configuration command: ./config powerpc 15 | 16 | - See documentation inside powerpc_sys5.h, powerpc_sys5.s, powerpc.c. 17 | 18 | 19 | Marco Bucci 20 | December 2002 21 | 22 | 23 | * This software is largely based on the original PowerPC-Linux porting 24 | * developed by Ken Aaker 25 | * 26 | * Marco Bucci 27 | * December 2002 28 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/md/solaris.README: -------------------------------------------------------------------------------- 1 | Solaris 2.x is like System V (maybe it *is* System V?) and is different 2 | from older versions in that it uses no leading underscore for variable 3 | and function names. That is, the old convention was: 4 | 5 | foo(){} 6 | 7 | got compiled as 8 | 9 | .globl _foo 10 | _foo: 11 | 12 | and is now compiled as 13 | 14 | .globl foo 15 | foo: 16 | 17 | The `config' script should fix up the older (leading underscore) versions 18 | of the machine-dependent files to use the newer (no leading underscore) 19 | calling conventions. 20 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/qtmd.h: -------------------------------------------------------------------------------- 1 | #if defined( __sparc ) || defined( __sparc__ ) 2 | #include "sysc/packages/qt/md/sparc.h" 3 | #elif defined( __hppa ) 4 | #include "sysc/packages/qt/md/hppa.h" 5 | #elif defined( __x86_64__ ) 6 | #include "sysc/packages/qt/md/iX86_64.h" 7 | #elif defined( __i386 ) 8 | #include "sysc/packages/qt/md/i386.h" 9 | #elif defined( __ppc__ ) 10 | #include "sysc/packages/qt/md/powerpc_mach.h" 11 | #elif defined( __powerpc ) 12 | #include "sysc/packages/qt/md/powerpc_sys5.h" 13 | #elif defined( __aarch64__ ) 14 | #include "sysc/packages/qt/md/aarch64.h" 15 | #endif 16 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/time/README.time: -------------------------------------------------------------------------------- 1 | The program `raw', when run in `..' runs the program `run' produced 2 | from `meas.c'. It produces a raw output file (see `../tmp/*.raw'). 3 | `raw' will die with an error if run in the current directory. Note 4 | that some versions of `time' produce output in an unexpected format; 5 | edit them by hand. 6 | 7 | `prim', `init', `cswap' and `go' produce formatted table entries used 8 | in the documentation (in `../doc'). For example, from `..', 9 | 10 | foreach i (tmp/*.raw) 11 | time/prim $i 12 | end 13 | 14 | See notes in the QuickThreads document about the applicability of 15 | these microbenchmark measurements -- in general, you can expect all 16 | QuickThreads operations to be a bit slower when used in a real 17 | application. 18 | -------------------------------------------------------------------------------- /systemc/src/sysc/packages/qt/time/assim: -------------------------------------------------------------------------------- 1 | #! /bin/awk -f 2 | 3 | BEGIN { 4 | nmach = 0; 5 | 6 | init_test = "1"; 7 | abort_test = "6"; 8 | blocki_test = "7"; 9 | block_test = "8"; 10 | } 11 | 12 | { 13 | mach = $1 14 | test = $2 15 | iter = $3 16 | time = $6 + $8 17 | 18 | if (machi[mach] == 0) { 19 | machn[nmach] = mach; 20 | machi[mach] = 1; 21 | ++nmach; 22 | } 23 | 24 | us_per_op = time / iter * 1000000 25 | times[mach "_" test] = us_per_op; 26 | } 27 | 28 | 29 | END { 30 | for (i=0; i