(임시) Cosim SSH 접속 후 해줘야 할 명령어 정리

YumeIroVillain·2022년 6월 29일
0

개발노트

목록 보기
12/28
set_vivado
set_cosim
set_dlr
export LANG="C"
export LC_ALL="C"

source /tools/Xilinx/Vivado/2019.1/settings64.sh
source ~/anaconda3/etc/profile.d/conda.sh

(필수는 아닌듯)
export DLB_HOME=/home/takeyama/work/DPU/Deep_Learning_Blocks

(필수여부 불확실)
sudo /tools/Xilinx/Vivado/2019.1/data/xicom/cable_drivers/lin64/install_script/install_drivers/install_drivers

사실 .zshrc 에 넣으면 자동으로 해주긴 할텐데, 일단 수동으로 하기로 한다.
추후 업데이트될 수 있다.


세팅시

sudo apt update
sudo apt-get update
sudo apt install -y git vim build-essential cmake unzip pkg-config gtkwave libtinfo-dev libtinfo5
sudo ln -s /lib/x86_64-linux-gnu/libtinfo.so.6 /lib/x86_64-linux-gnu/libtinfo.so.5
sudo apt-get install libncurses5

sudo apt -y install zsh

chsh -s /usr/bin/zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" 
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
perl -pi -w -e 's/plugins=.*/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/g;' ~/.zshrc
vim ~/.zshrc
    plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
source .zshrc

cd /tmp
curl -O https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
bash anaconda3-2021.05-Linux-x86_64.sh
source ~/anaconda3/etc/profile.d/conda.sh
conda activate
conda install pytorch torchvision torchaudio cpuonly -c pytorch
pip3 install matplotlib tensorboard tensorboardX
conda deactivate

cd ~/Downloads
sudo chmod 777 ./Xi
./Xi

vim ~/.zshrc
(추가)---------------------
unsetopt INTERACTIVE_COMMENTS
unsetopt BAD_PATTERN

set_vivado(){
    if [ -z "$1" ]; then
        version=2019.1
    else
        version=$1
    fi
    if [ -f /tools/Xilinx/Vivado/${version}/settings64.sh ]; then
        source /tools/Xilinx/Vivado/${version}/settings64.sh
    else
        echo "Error could not find ${version}"
        return -1
    fi
    return 0
}

set_cosim(){
    export COSIM_HOME=$HOME/work/DPU/cosim_bfm_library
    if [ -n "${PYTHONPATH}" ]; then
        export PYTHONPATH=$COSIM_HOME/include/python:$PYTHONPATH
    else
        export PYTHONPATH=$COSIM_HOME/include/python
    fi
}

set_dlr(){
    export DLR_HOME=$HOME/work/DPU/Deep_Learning_Routines/v1.4
    if [ -n "$PYTHONPATH}" ]; then
        export PYTHONPATH=$DLR_HOME/python/modules:$PYTHONPATH
    else
        export PYTHONPATH=$DLR_HOME/python/torch
    fi
}
set_vivado
set_cosim
set_dlr
export LANG="C"
export LC_ALL="C"
source /tools/Xilinx/Vivado/2019.1/settings64.sh
source ~/anaconda3/etc/profile.d/conda.sh
-----------------
cd ~/work/DPU/cosim_bfm_library/lib_bfm
make -f Makefile.xsim
make -f Makefile.xsim install
# 막줄은 둘째줄에서 만들어준 .a 파일 없으면 안돌아감

cd ~/work/DPU/Deep_Learning_Routines/v1.4/src
source /tools/Xilinx/Vivado/2019.1/settings64.sh
make
make install
profile
HW SW 둘다 공부하는 혼종의 넋두리 블로그 / SKKU SSE 17 / SWM 11th

0개의 댓글