update import script to initialize broker
This commit is contained in:
		| @@ -173,7 +173,7 @@ if(SystemC_FOUND) | ||||
|         string(TOUPPER ${CORE_NAME_LC} CORE_NAME) | ||||
|         target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_${CORE_NAME}) | ||||
|     endforeach() | ||||
|     target_link_libraries(${PROJECT_NAME} PUBLIC dbt-rise-tgc scc) | ||||
|     target_link_libraries(${PROJECT_NAME} PUBLIC dbt-rise-tgc scc-sysc) | ||||
|     if(WITH_LLVM) | ||||
|         target_link_libraries(${PROJECT_NAME} PUBLIC ${llvm_libs}) | ||||
|     endif() | ||||
|   | ||||
							
								
								
									
										2
									
								
								contrib/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								contrib/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| /results | ||||
| /cwr | ||||
| @@ -1,19 +1,43 @@ | ||||
|  # requires conan version 1.59 | ||||
|  # requires decent cmake version 3.23 for instance | ||||
|  git clone --recursive -b develop https://git.minres.com/TGFS/TGC-ISS.git | ||||
|  cd TGC-ISS/ | ||||
|  setenv COWAREHOME /scratch/rocco/workarea/tools/synopsys/T-2022.06-3 | ||||
|  setenv SNPSLMD_LICENSE_FILE 27001@lic02.arteris.com:5285@lic-node0:5285@lic03:5285@lic-node1 | ||||
|  source $COWAREHOME/SLS/linux/setup.csh pae | ||||
|  setenv SNPS_ENABLE_MEM_ON_DEMAND_IN_GENERIC_MEM 1 | ||||
|  setenv PATH $COWAREHOME/common/bin/:${PATH} | ||||
|  setenv LD_LIBRARY_PATH /scratch/rocco/workarea/tools/gcc-9.3.0-install/lib64/ | ||||
|  setenv CC /scratch/rocco/workarea/tools/synopsys/T-2022.06-3/SLS/linux/common/bin//gcc | ||||
|  setenv CXX /scratch/rocco/workarea/tools/synopsys/T-2022.06-3/SLS/linux/common/bin//g++ | ||||
|  cmake -S . -B build/Debug-PA -DCMAKE_BUILD_TYPE=Debug -DUSE_CWR_SYSTEMC=ON -DBUILD_SHARED_LIBS=ON -DCODEGEN=OFF -DCMAKE_INSTALL_PREFIX=/scratch/rocco/partners/minres/TGC-ISS/install | ||||
|  cd build/Debug-PA/ | ||||
|  make -j 16 install | ||||
|  cd ../../dbt-rise-tgc/contrib | ||||
|  setenv TGFS_INSTALL_ROOT /scratch/rocco/partners/minres/TGC-ISS/install/ | ||||
|  # import the TGC core itself | ||||
|  pct tgc_import.tcl | ||||
| # Notes | ||||
|  | ||||
| * requires conan version 1.59 | ||||
| * requires decent cmake version 3.23 | ||||
|  | ||||
| Setup for tcsh: | ||||
|  | ||||
| ``` | ||||
| git clone --recursive -b develop https://git.minres.com/TGFS/TGC-ISS.git | ||||
| cd TGC-ISS/ | ||||
| setenv TGFS_INSTALL_ROOT `pwd`/install | ||||
| setenv COWAREHOME <your SNPS PA installation> | ||||
| setenv SNPSLMD_LICENSE_FILE <your SNPS PA license file> | ||||
| source $COWAREHOME/SLS/linux/setup.csh pae | ||||
| setenv SNPS_ENABLE_MEM_ON_DEMAND_IN_GENERIC_MEM 1 | ||||
| setenv PATH $COWAREHOME/common/bin/:${PATH} | ||||
| setenv CC  $COWAREHOME/SLS/linux/common/bin/gcc | ||||
| setenv CXX $COWAREHOME/SLS/linux/common/bin/g++ | ||||
| cmake -S . -B build/PA -DCMAKE_BUILD_TYPE=Debug -DUSE_CWR_SYSTEMC=ON -DBUILD_SHARED_LIBS=ON \ | ||||
|     -DCODEGEN=OFF -DCMAKE_INSTALL_PREFIX=${TGFS_INSTALL_ROOT} | ||||
| cmake --build build/PA --target install -j16 | ||||
| cd dbt-rise-tgc/contrib | ||||
| # import the TGC core itself | ||||
| pct tgc_import_tb.tcl | ||||
| ``` | ||||
|  | ||||
| Setup for bash: | ||||
|  | ||||
| ``` | ||||
| git clone --recursive -b develop https://git.minres.com/TGFS/TGC-ISS.git | ||||
| cd TGC-ISS/ | ||||
| export TGFS_INSTALL_ROOT `pwd`/install | ||||
| module load tools/pa/T-2022.06 | ||||
| export SNPS_ENABLE_MEM_ON_DEMAND_IN_GENERIC_MEM=1 | ||||
| export CC=$COWAREHOME/SLS/linux/common/bin/gcc | ||||
| export CXX=$COWAREHOME/SLS/linux/common/bin/g++ | ||||
| cmake -S . -B build/PA -DCMAKE_BUILD_TYPE=Debug -DUSE_CWR_SYSTEMC=ON -DBUILD_SHARED_LIBS=ON \ | ||||
|     -DCODEGEN=OFF -DCMAKE_INSTALL_PREFIX=${TGFS_INSTALL_ROOT} | ||||
| cmake --build build/PA --target install -j16 | ||||
| cd dbt-rise-tgc/contrib | ||||
| # import the TGC core itself | ||||
| pct tgc_import_tb.tcl | ||||
| ``` | ||||
| @@ -16,7 +16,7 @@ namespace eval Specification { | ||||
|                 set libdir "${install_dir}/lib64" | ||||
|                 set preprocessorOptions [concat $preprocessorOptions "-I${incldir}"] | ||||
|                 # Set the Linker paths. | ||||
|                 set linkerOptions [concat $linkerOptions "-Wl,-rpath,${libdir} -L${libdir} -ldbt-rise-tgc_sc"] | ||||
|                 set linkerOptions [concat $linkerOptions "-Wl,-rpath,${libdir} -L${libdir} -ldbt-rise-tgc_sc -lscc-sysc"] | ||||
|             } | ||||
|             default { | ||||
|                puts stderr "ERROR: \"$target\" is not supported, [::scsh::version]" | ||||
|   | ||||
| @@ -9,8 +9,8 @@ proc getScriptDirectory {} { | ||||
|     set hardware /HARDWARE/HW/HW | ||||
|  | ||||
| set scriptDir [getScriptDirectory] | ||||
| #set top_design_name sysc::tgfs::core_complex | ||||
| set top_design_name core_complex | ||||
| set encap_name sysc::tgfs::${top_design_name} | ||||
| set clocks clk_i | ||||
| set resets rst_i | ||||
| set model_prefix "i_" | ||||
| @@ -25,7 +25,8 @@ set model_postfix "" | ||||
| ::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 | ||||
| ::pct::set_import_encap_prop_as_extra_prop_flag true | ||||
| ::pct::load_modules --set-category modules ${scriptDir}/tgc_import.cc | ||||
|  | ||||
| # Set Port Protocols correctly | ||||
| set block ${top_design_name} | ||||
| @@ -39,9 +40,9 @@ foreach reset ${resets} { | ||||
|  | ||||
| # Set compile settings and look | ||||
| set block SYSTEM_LIBRARY:${top_design_name} | ||||
| ::pct::set_encap_build_script $block/sysc::tgfs::${top_design_name} $scriptDir/build.tcl | ||||
| ::pct::set_encap_build_script $block/${encap_name} $scriptDir/build.tcl | ||||
| ::pct::set_background_color_rgb $block 255 255 255 255 | ||||
| ::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}()  | ||||
| ::pct::create_instance SYSTEM_LIBRARY:${top_design_name}  ${hardware} ${model_prefix}${top_design_name}${model_postfix} ${encap_name} ${encap_name}()  | ||||
| ::pct::set_bounds i_${top_design_name} 200 300 100 400 | ||||
|  | ||||
| # export the result as component | ||||
|   | ||||
| @@ -40,10 +40,10 @@ puts "setting parameters for DBT-RISE-TGC/Bus and memory components" | ||||
| ::pct::set_param_value $hardware/i_core_complex {Scml Properties} elf_file ${FW_name} | ||||
| ::pct::set_address i_core_complex/initiator:i_Memory_Generic/MEM 0x0 | ||||
|  | ||||
| #::pct::set_main_configuration Default {{#include <scc/report.h>} {::scc::init_logging(::scc::LogConfig().logLevel(::scc::log::INFO).coloredOutput(false).logAsync(false));} {} {} {}} | ||||
| #::pct::set_main_configuration Debug {{#include <scc/report.h>} {::scc::init_logging(::scc::LogConfig().logLevel(::scc::log::DEBUG).coloredOutput(false).logAsync(false));} {} {} {}} | ||||
| #::pct::create_simulation_build_config Debug | ||||
| #::pct::set_simulation_build_project_setting Debug "Main Configuration" Default | ||||
| ::pct::set_main_configuration Default {{#include <scc/report.h>} {::scc::init_logging(::scc::LogConfig().logLevel(::scc::log::INFO).coloredOutput(false).logAsync(false));} {} {} {}} | ||||
| ::pct::set_main_configuration Debug {{#include <scc/report.h>} {::scc::init_logging(::scc::LogConfig().logLevel(::scc::log::DEBUG).coloredOutput(false).logAsync(false));} {} {} {}} | ||||
| ::pct::create_simulation_build_config Debug | ||||
| ::pct::set_simulation_build_project_setting Debug "Main Configuration" Default | ||||
| # add build settings and save design for next steps | ||||
| #::pct::set_simulation_build_project_setting "Debug" "Linker Flags" "-Wl,-z,muldefs $::env(VERILATOR_ROOT)/include/verilated.cpp $::env(VERILATOR_ROOT)/include/verilated_vcd_sc.cpp $::env(VERILATOR_ROOT)/include/verilated_vcd_c.cpp" | ||||
| #::pct::set_simulation_build_project_setting "Debug" "Include Paths" $::env(VERILATOR_ROOT)/include/ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user