2021-08-16 16:59:23 +02:00
|
|
|
#############################################################################
|
|
|
|
#
|
|
|
|
#############################################################################
|
|
|
|
proc getScriptDirectory {} {
|
|
|
|
set dispScriptFile [file normalize [info script]]
|
|
|
|
set scriptFolder [file dirname $dispScriptFile]
|
|
|
|
return $scriptFolder
|
|
|
|
}
|
|
|
|
set hardware /HARDWARE/HW/HW
|
|
|
|
|
|
|
|
set scriptDir [getScriptDirectory]
|
2023-04-19 14:20:58 +02:00
|
|
|
#set top_design_name sysc::tgfs::core_complex
|
2021-08-16 16:59:23 +02:00
|
|
|
set top_design_name core_complex
|
|
|
|
set clocks clk_i
|
|
|
|
set resets rst_i
|
|
|
|
set model_prefix "i_"
|
|
|
|
set model_postfix ""
|
|
|
|
|
|
|
|
::pct::new_project
|
|
|
|
::pct::open_library TLM2_PL
|
|
|
|
::pct::clear_systemc_defines
|
|
|
|
::pct::clear_systemc_include_path
|
|
|
|
::pct::add_to_systemc_include_path $::env(TGFS_INSTALL_ROOT)/include
|
|
|
|
::pct::set_import_protocol_generation_flag false
|
|
|
|
::pct::set_update_existing_encaps_flag true
|
|
|
|
::pct::set_dynamic_port_arrays_flag true
|
|
|
|
::pct::set_import_scml_properties_flag true
|
|
|
|
::pct::load_modules --set-category modules tgc_import.cc
|
|
|
|
|
|
|
|
# Set Port Protocols correctly
|
|
|
|
set block ${top_design_name}
|
|
|
|
foreach clock ${clocks} {
|
|
|
|
::pct::set_block_port_protocol --set-category SYSTEM_LIBRARY:$block/${clock} SYSTEM_LIBRARY:CLOCK
|
|
|
|
}
|
|
|
|
foreach reset ${resets} {
|
|
|
|
::pct::set_block_port_protocol --set-category SYSTEM_LIBRARY:$block/${reset} SYSTEM_LIBRARY:RESET
|
|
|
|
}
|
2023-04-19 14:20:58 +02:00
|
|
|
#::pct::set_encap_port_array_size SYSTEM_LIBRARY:$block/local_irq_i 16
|
2021-08-16 16:59:23 +02:00
|
|
|
|
|
|
|
# Set compile settings and look
|
|
|
|
set block SYSTEM_LIBRARY:${top_design_name}
|
2023-04-19 14:20:58 +02:00
|
|
|
::pct::set_encap_build_script $block/sysc::tgfs::${top_design_name} $scriptDir/build.tcl
|
2021-08-16 16:59:23 +02:00
|
|
|
::pct::set_background_color_rgb $block 255 255 255 255
|
2023-04-19 14:20:58 +02:00
|
|
|
::pct::create_instance SYSTEM_LIBRARY:${top_design_name} ${hardware} ${model_prefix}${top_design_name}${model_postfix} sysc::tgfs::${top_design_name} sysc::tgfs::${top_design_name}()
|
2023-04-24 17:44:12 +02:00
|
|
|
::pct::set_bounds i_${top_design_name} 200 300 100 400
|
2021-08-16 16:59:23 +02:00
|
|
|
|
|
|
|
# export the result as component
|
|
|
|
::pct::export_system_library ${top_design_name} ${top_design_name}.xml
|