We must install SystemC, Visual Studio Code environment and GTKWave on the computer.
-
For more details for SystemC, see: https://www.accellera.org/downloads/standards/systemc
-
In Visual Studio Code, check that the C/C++ extension is installed. If this is not the case, go to the "extension" menu and click on "Install".
-
As of VS-code v1.56.1 integrated terminals require additional configuration to work correctly. see https://code.visualstudio.com/docs/getstarted/settings#_settings-file-locations to edit the
setting.json
file and add the following entry:
"terminal.integrated.allowWorkspaceConfiguration":true
1. To use project template without modification path, install SystemC in ~/systemc/systemc
as below:
- Create folder:
cd ~
mkdir systemc
cd systemc
- Copy the
systemc-2.3.3.zip
orsystemc-2.3.3.tar.gz
file in the~/systemc
folder and unzip as below:
unzip systemc-2.3.3.zip
or
tar -zxvf systemc-2.3.3.tar.gz
- Rename the folder:
mv systemc-2.3.3 systemc
2. Follow the INSTALL text file to install SystemC. To better debug, use the command below with option at step 5 in INSTALL file (Configure the package for your system)
../configure --enable-debug
-
http://gtkwave.sourceforge.net/
Tip for Linux installation:
sudo apt install gtkwave
Firstly, you have to clone the systemc-vscode-project-template
project and follow the next steps.
git clone https://github.com/fmuller-pns/systemc-vscode-project-template.git
mv systemc-vscode-project-template <my_project_name>
cd <my_project_name>
rm -fR .git
export SYSTEMC_PATH=~/systemc/systemc
2 solutions are proposed:
- Copy contents to the end of the
.bashrc
file just once (best solution)
cat systemc_env.sh >> ~/.bashrc
- At each time you open a Terminal, you must enter this command before launching Visual Studio Code:
source systemc_env.sh
code .
"SYSTEMC_PATH": "~/systemc/systemc"
This step renames the executable file. By default, the executable file is main
.
- Open
Makefile
and replacemain
by <my_project_name> - Open
.vscode/launch.json
and replacemain
by <my_project_name> (lines 13)
In the Menu, Run Start Debugging
or Run Without Debbuging
To exit monitoring, typing Ctrl+AltGr+]
- using keyboard shortcut:
Ctrl+Shift+C
- or pressing
F1
key and typingexternal
- using keyboard shortcut:
Ctrl+Shift+
2 - or pressing
F1
key and typingintegrated
make clean
make run
To exit monitoring, typing Ctrl+AltGr+]
make help
- In the menu, select
Run Task...
- Select the task you want to launch:
SystemC - Build
: build the projectSystemC - Run
: Run the projectSystemC - Run GTKWave
: Run GTKWaveSystemC - Clean
: Clean project (Full clean)SystemC - Doxygen - HTML doc.
: Generate HTML documentation with Doxygen
cd <project_name>
git config --global user.name "your name"
git config --global user.email "your email address"
This is useful when connecting your GIT to GitHub.
git config credential.helper store
We consider you have followed the sections above:
- Getting Started
- Configure GIT for your new project
Now, how to communicate with GitHub ?
- Open visual studio code.
- Click on the
Source Control
icon on your left side or useCtrl+Shift+G
shortcut. - For the first time, click on
Initialize Repository
button - Enter a message for your first commit (ex: first commit) and click on Commit icon
- Press
F1
and typinggit add remote
and entering :- remote name : your github repository previously created
- remote url : https://github.com/xxx/your_project.git
- username and password
- Push to the GitHub server (master branch)
See https://code.visualstudio.com/docs/editor/versioncontrol for more details.
You can use Using Tasks for SystemC or follow the steps below.
- Open external terminal from vscode, using keyboard shortcut:
Ctrl+Shift+C
, or pressingF1
key and typingexternal
- Generate HTML documentation
- From the User interface (allow you updating the
Doxyfile
configuration file)
doxywizard
- Directly from
Doxyfile
configuration file
doxygen
- A new
html
folder is created, the entry file isindex.html