This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem generating VCD file on Ubuntu

Other Parts Discussed in Thread: C2000WARE

Hello
I have imported the "clb_ex10_timer_two_states" project for test.
I am able to open the "clb_ex10_timer_two_states.syscfg" file and I have added in the Tile Design the option to generate the CLB simulation file.

When I run a build with diagram generation in the "Post-build steps". The build is OK and I can see the diagram files.

echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in 
the Global Parameters of the Tile Design SysConfig module) ============="
${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js"  "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
mkdir "${BuildDirectory}/diagrams"
${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"


Now the problem:
In the CPU1_RAM/syscfg, when I open the clb_simulation.sh here is what I see:
mkdir "../simulation/"
g++ -c -DCLB_SIM -I/usr/bin/systemc-2.3.3/src -I/home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc/include/type3 -I -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF../simulation/clb_sim.d -MT../simulation/clb_sim.o -I/syscfg   -fno-threadsafe-statics  -o../simulation/clb_sim.o ../syscfg/clb_sim.cpp
g++ -DCLB_SIM -Og -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,../simulation/simulation_output.map -L/usr/bin/systemc-2.3.3/build/src -o../simulation/simulation_output ../simulation/clb_sim.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_FSM_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_HLC_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_AOC_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_LUT4_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_OutputLUT_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_counter_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_counter_top_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_FSM_top_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_LUT4_top_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_OutputLUT_top_SC_model.o  -Wl,--start-group -lsystemc -Wl,--end-group
cd "../simulation/"
"./simulation_output"

The path to system-c.2.3.3 is wrong (not in /usr/bin/). How can I change it automatically?
The path to systemc & system_linux are corrects.

When I run the file with correct path to system-c.2.3.3 on both lines, I have some errors and the vsd file is not generated.
The clb_simulation folder is not empty (clb_sim.d, clb_sim.o, simulation_output (4.8Mo), simulation_output.map)
/usr/bin/ld: BFD assertion (GNU Binutils for Ubuntu) 2.38 a échoué ../../bfd/reloc.c:8580
/home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc-2.3.3/build/src/libsystemc.a(sc_clock.cpp.obj):sc_clock.cpp:(.pdata$_ZNK7sc_core9sc_object16get_child_eventsEv+0x0) : relocalisation dangereuse : collect2: fatal error: ld terminated with signal 11 [Erreur de segmentation], core dumped
compilation terminated.

When I copy/paste the content of clb_simulation.sh in "Post-build steps" I have the same problem.

echo "========= Build the vsd file for simulation ========= "
mkdir "${BuildDirectory}/simulation/"
g++ -c -DCLB_SIM -I/home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc-2.3.3/src -I/home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc/include/type3 -I -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF${BuildDirectory}/simulation/clb_sim.d -MT${BuildDirectory}/simulation/clb_sim.o -I${BuildDirectory}/syscfg   -fno-threadsafe-statics  -o${BuildDirectory}/simulation/clb_sim.o ${BuildDirectory}/syscfg/clb_sim.cpp
#g++ -DCLB_SIM -Og -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,${BuildDirectory}/simulation/simulation_output.map -L/home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc-2.3.3/build/src -o${BuildDirectory}/simulation/simulation_output ${BuildDirectory}/simulation/clb_sim.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_FSM_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_HLC_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_AOC_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_LUT4_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_OutputLUT_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_counter_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_counter_top_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_FSM_top_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_LUT4_top_SC_model.o /home/jerome/ti/c2000/C2000Ware_5_00_00_00/utilities/clb_tool/clb_syscfg/systemc_linux/src/type3/CLB_OutputLUT_top_SC_model.o  -Wl,--start-group -lsystemc -Wl,--end-group
cd "${BuildDirectory}/simulation/"
chmod +x "simulation_output"
"./simulation_output"

Do you have any advice to help me?
My configuration is :
Ubuntu 22.04
CCS 12.4.0.00007
C2000Ware 5.00.00.00
ti-cgt-c2000_22.6.0LTS

Thanks you for your help.

Jérôme

  • Hello Jerome,

    Please refer to the CLB Tool User's Guide for information on how to setup the simulation to work on Ubuntu; keep in mind that because you're not using Windows, the systemc-2.3.3 that's included in C2000Ware is not usable for you, you will need to get those files included separately at the designated location. Page 8 within section 2.3.2 of the User's Guide details some of these steps. Let me know if you have any problems doing this.

    Best regards,

    Omer Amir

  • Hi Omer

    I have followed the CLB Tool User's Guide however I still have troubles.

    Still in clb_simulation.sh the path to /usr/bin/systemc-2.3.3/src is correct now but /usr/bin/systemc-2.3.3/build/src is wrong (I don't have any build folder in /usr/bin/systemc-2.3.3)

    Finally I still have an issue with -lsystemc (no folder or file of this type)

    Sincerely.

    Jérôme

  • Hello Jerome,

    Still in clb_simulation.sh the path to /usr/bin/systemc-2.3.3/src is correct now but /usr/bin/systemc-2.3.3/build/src is wrong (I don't have any build folder in /usr/bin/systemc-2.3.3)

    The build folder is separate from the src folder. I will double-check how to get this folder included and get back to you on this.

    Finally I still have an issue with -lsystemc (no folder or file of this type)

    This is a system variable you need to define which will point to the System C directory (I believe this is the write console command, but let me know if it doesn't work):

    export systemc=/usr/local/systemc-2.3.3/

    Best regards,

    Omer Amir

  • Hello Jerome,

    The build folder is separate from the src folder. I will double-check how to get this folder included and get back to you on this.

    Unfortunately the only Linux machine we have available is not working currently, and I don't have an estimate when it will be available. To prevent a delay I want to see what may be possible from your side. If you try to run the shell file as provided, I'm assuming that there is an error about the paths, so can you try copying the "build" file from C2000Ware_5_00_00_00\utilities\clb_tool\clb_syscfg\systemc-2.3.3 into your System C folder location so it is on the same directory level as the "src" folder? Try to run the shell file with this change and let me know if it works or if there's an error still.

    Best regards,

    Omer Amir