在线咨询 切换到宽版
eetop公众号 创芯大讲堂 创芯人才网

 找回密码
 注册

手机号码,快捷登录

手机号码,快捷登录

搜帖子
楼主: ZhengQC

vcs_gnu_vW-2024.09

[复制链接]
发表于 2025-8-12 10:55:23 | 显示全部楼层
thanks
回复 支持 反对

使用道具 举报

发表于 2025-8-12 14:08:00 | 显示全部楼层
根本装不上啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-8-12 17:16:03 | 显示全部楼层


   
yl5495 发表于 2025-8-12 14:08
根本装不上啊




README for VG Gnu package tools:        2024.09 / Jul 08, 2024
================================
This directory contains the gnu prebuilt binaries for GCC, BINUTILS,
MAKE and VALGRIND from Gnu, ready to use for 32-bit and also for
64-bit simulations. Several gcc versions are available.

Read the license agreement in files GNU_GENERAL_PUBLIC_LICENSE and
VG_Gnu_Notice.

On Linux, different gcc versions are provided:
* gcc 13.2.0
* gcc 12.3.0 (default)
* gcc 9.5.0
* gcc 9.2.0
* gcc 7.3.0
* gcc 6.2.0

The linux package can be used with Linux AL8.4, CS6, CS7, RH6, Suse10 and Suse11 hosts.
The host must have a 64-bit CPU, even if you create 32-bit simulations;
virtual OS with an emulated 32-bit CPU/OS are not supported.

No compiler is provided for Solaris/SPARC (sparcOS5, sparc64) and
Solaris/AMD64 (X86sol, x86sol64), because this platform is no longer
supported by VCS for SystemC.

There are three different methods to use the VG Gnu package:
(1) Installation + setup outside of the VCS image,
    add gcc + binutils to the PATH
(2) Using the VG Gnu package without changing PATH
(3) Installation + setup inside of the VCS image

In most cases, the Linux gcc 12.3.0 used with method (1) is what you
need. If so, download just the Linux default tar ball, detar it at
some place and use the source_me.* scripts to activate it.



(1) Instructions for installation + setup outside an VCS image
==============================================================

Follow these instructions when
- you do not want to install the VG Gnu package inside the VCS image, or
- you want to use the package for all VCS applications, not just for
  SystemC.

You need to add both gcc and bintutils to the PATH, also update your
LD_LIBRARY_PATH which is easily done with the help of the source_me
scripts.

To install the default gcc version on linux, please do the following:

    donwload VG_GNU_PACKAGE_2024.09/linux_gcc1230_default.tar.gz from EST
    setenv VCS_HOME <your-VCS-installation>

    cd $VCS_HOME
    mkdir gnu
    cd gnu
    gtar -zxvf linux_gcc1230_default.tar.gz

Usage for sh users:

   VG_GNU_PACKAGE=<path to this directory>
   export VG_GNU_PACKAGE
   . $VG_GNU_PACKAGE/source_me.sh

Usage for csh or tcsh users:

   setenv VG_GNU_PACKAGE <path to this directory>
   source $VG_GNU_PACKAGE/source_me.csh

This will add the bin directories of GCC and binutils to the front of
PATH, so typing "gcc", "g++", "ld", etc will pick these tools from the
VG Gnu package. The source_me_* scripts will also add the lib and
lib64 directories of GCC to the front of LD_LIBRARY_PATH.

There is an exception on Ubuntu, when using a source_me* script for
gcc 13.2.0,12.3.0,9.5.0,9.2.0,7.3.0,6.2.0. Here, the "xbin" of GCC is added instead of
"bin" which will automatically pick the binutils from the VG Gnu
package and system libs from /usr/lib any time that you call the
compiler (see also below, Using the VG Gnu package without changing PATH).


Hints regarding 32-bit versus 64-bit:
----
The same gcc installation and setup is used in this VG Gnu package for
creating 32-bit as well as 64-bit simulations. The gcc compiler
creates 64-bit object code per default; flag '-m32' is needed to
create 32-bit object code. VCS and syscan will automatically add the
'-m32' flag when you a 32-bit simulation, so you do not need to worry
about specifying the '-m32' yourself. If you create a 64-bit simulation
with 'vcs -full64 ...', then VCS will automatically invoke gcc with
the '-m64' flag. Ditto, 'syscan -full64 ...' automatically invokes gcc
with the '-m64' flag.

When you invoke gcc directly, then make sure to specify the '-m32'
flag when you intend to create a 32-bit simulation.




Installing and using gcc 13.2.0, 12.3.0, 9.5.0, 9.2.0, 7.3.0, 6.2.0
-------------------------------------------------------------------

The default gcc version on Linux to be used with VCS is gcc 12.3.0.
See above for download, install and setup.

This package also contain a gcc 13.2.0, 12.3.0, 9.5.0, 9.2.0, 7.3.0, 6.2.0  for
32/64-bit. To use the gcc compiler, you need to first install
it:

    download VG_GNU_PACKAGE_2024.09/linux_gcc1230_default.tar.gz  from EST
    setenv VCS_HOME <your-VCS-installation>

    cd $VCS_HOME
    mkdir gnu
    cd gnu
    gtar -zxvf linux_gcc1230_default.tar.gz

Usage for csh or tcsh users:

   setenv VG_GNU_PACKAGE <path to this directory>
   source $VG_GNU_PACKAGE/source_me_gcc1230.csh

To use the gcc 13.2.0, follow the same instructions but with
'linux_gcc1320_default.tar.gz' instead of 'linux_gcc1230_default.tar.gz'.

To use the gcc 9.5.0, follow the same instructions but with
'linux_gcc950_default.tar.gz' instead of 'linux_gcc1230_default.tar.gz'.

To use the gcc 9.2.0, follow the same instructions but with
'linux_gcc920_default.tar.gz' instead of 'linux_gcc1230_default.tar.gz'.

To use the gcc 7.3.0, follow the same instructions but with
'linux_gcc730_default.tar.gz' instead of 'linux_gcc1230_default.tar.gz'.

To use the gcc 6.2.0, follow the same instructions but with
'linux_gcc620_default.tar.gz' instead of 'linux_gcc1230_default.tar.gz'.

Just like the default compiler, there is only one gcc 12.3.0
installation for both 32- and 64-bit, also only one rest gcc
installation. Use compiler option '-m32' to create 32-bit object code
when you invoke gcc/g++ directly. VCS will automatically add this
option.

Note that several files inside the linux directory are contained in
the tar files for gcc 13.2.0, gcc 9.5.0, gcc 9.2.0, gcc 7.3.0 as well as 6.2.0. That means some files
will be overwritten, however, with identical content. For example,
this README file in part of all these tar files. If you install all of
them, then you can either allow to overwrite README or deny it. This
makes no difference because all copies of README are identical.


(2) Using the VG Gnu package without changing PATH
================================================================

See instructions (1) above how to download + install the tar balls.

If sourcing the source_me files is not possible, then use the "xbin"
directory as an alternative. It is not neccessary to modify PATH nor
is it necessary to set or modify any other environment variable.

Instead, call gcc directly, for example:
    <path>/gcc-12.3.0/xbin/gcc myfile.c
  or
    syscan -cpp <path>/gcc-12.3.0/xbin/g++ model.cpp
    vcs -sysc top.v \
      -cpp <path>/gcc-12.3.0/xbin/g++ \
      -gcc <path>/gcc-12.3.0/xbin/gcc

Notice that "xbin" and not "bin" is used.

Calling the compiler via the xbin directory will automatically select
the corresponding binutils (assembler, linker, ...). Overriding the
binutils location is not possible.

If "gcc" or "g++" of 13.2.0/12.3.0/9.5.0/9.2.0/7.3.0/6.2.0 is called as linker on Ubuntu,
then libraries /usr/lib/i386-linux-gnu (32-bit) or
/usr/lib/x86_64-linux-gnu (64-bit) will be automatically added.



(3) Instructions for installation + setup inside an VCS image
=============================================================

The easiest way to use this VG Gnu package for VCS simulations that
contain SystemC is to install the package inside a VCS image. Once
installed, VCS will automatically use it for SystemC files in
combination with UUM flow.

To activate this flow, please install the image at $VCS_HOME/gnu .
We expect the following structure:

        $VCS_HOME/
            gnu/
                linux/
                    gcc-32   --> link to gcc-64
                    gcc-64
                    binutils-32
                    binutils-64

On Linux, gcc 12.3.0 will be used per default. Selecting a different
gcc version (e.g. 13.2.0 or 9.5.0 or 9.2.0 or 7.3.0 or 6.2.0) as the default compiler is not possible.

To install the package on linux, please do the following:

    donwload VG_GNU_PACKAGE_2024.09/linux_gcc1230_default.tar.gz from EST
    setenv VCS_HOME <your-VCS-installation>

    cd $VCS_HOME
    mkdir gnu
    cd gnu
    gtar -zxvf linux_gcc1230_default.tar.gz

It is NOT necessary to set the environment variable VG_GNU_PACKAGE and
it is also NOT necessary to source any setup script. The compiler in
the current path does not matter. If the VG Gnu package is installed in
this form, then it will be automatically used for the VcsSystemC flow
in combination with UUM flow.

Example:
    syscan A.cpp B.cpp
    syscan C.cpp:C
    vlogan top.v
    vcs TOP -sysc

Files A.cpp, B.cpp and C.cpp will be compiled with the default gcc
from the VG Gnu package, independant of the definition of $PATH.

However, if you set environment variable VG_GNU_PACKAGE to any value, then
this automatic selection of gcc from $VCS_HOME/gnu is disabled. So make
sure to "unsetenv VG_GNU_PACKAGE" if you really want to use the feature.

Please note that you can override this default with explicit command
line arguments "-cc", "-cpp" or "-ld". Command line arguments have
always precedence over the default Gnu package. They are the only
way to override the default compiler version.

Also note that the VG Gnu package is not automatically used when you
are outside of the VcsSystemC flow. For example, calling "vcs top.v"
without the "-sysc" argument will NOT automatically infer the VG Gnu
package. Instead the compiler in the current path is used as usual.
Similarly, "vcs TOP my_dpi_file.c" will invoke the compiler in the
current path for file "my_dpi_file.c".

Also note that the VG Gnu package is not automatically used if you
elaborate with the non-UUM flow, for example with "syscsim
sctop.cpp". Only the UUM flow is supported.


(4) Extra source* scripts for backward compatibility
====================================================
VG Gnu packages of previous VCS releases shipped the same GCC version
in different installations, e.g. 4 installations of gcc 4.2.2: 32-bit
as well as 64-bit and also static (libstdc++.a) as well as shared
(libstdc++.so). This increases the size of the VG Gnu package and also
required to have many sourceme* scripts for the various GCC
installations. Nowadays, there is just one installation of a specific
GCC version, e.g. gcc 12.3.0 as 64-bit, shared -- but no other
installation. This makes most of the former sourceme* scripts
redundant because they all point to the vary same GCC installation.
Similarly, there are symbolic links where are also redundant.


These redundant sourceme* scripts are no longer of the default tar file.
Only these scripts are installed per default:
    source_me_gcc1230.sh
    source_me_gcc1230.csh
    source_me.sh
    source_me.csh
and these links:
    gcc
    gcc-12.3.0
    binutils

But you can install the redundant scripts in order to have backwards
compatibility with compile/setup scripts:

    download VG_GNU_PACKAGE_2024.09/linux_extra_scripts.tar.gz from EST
    gtar -zxvf linux_extra_scripts.tar.gz

This will install the following scripts and links:
    source_me_32.sh
    source_me_32.csh
    source_me_64.sh
    source_me_64.csh
    source_me_gcc1230_32.sh
    source_me_gcc1230_32.csh
    source_me_gcc1230_32-shared.sh
    source_me_gcc1230_32-shared.csh
    source_me_gcc1230_64-shared.sh
    source_me_gcc1230_64-shared.csh
    gcc-32
    gcc-64
    binutils-32
    binutils-64



(5) Extra tools
===============
The VG Gnu package also contains an optional installation of valgrind.
Valgrind is a debugging tool for memory related bugs, capable to
detect errors such as reading uninitialized memory or accessing
pointers with illegal addresses leading to crashes (SEGV) . See
http://valgrind.org for more details.

To install valgrind on linux, please do the following:

    download VG_GNU_PACKAGE_2024.09/linux_extra_tools.tar.gz from EST
    gtar -zxvf linux_extra_tools.tar.gz


(6) History:
============
Nov 30th, 2011: First version of the VG Gnu package 2014.03
Mar  9th, 2012: upgrade to binutils 2.22 for gcc 4.5.2; add valgrind
Apr  17, 2012:  build gcc 3.3.6 on solaris-sparc again
June 11, 2012:
- add make 3.8.2 to all binutils
- always put lib/lib64 of gcc to front of LD_LIBRARY_PATH
Aug  21, 2012: added symbolic link gmake->make to all binutils
Apr 9th, 2013: ported to VCS 2014.03; removed gcc34, solaris_gcc3.
Aug 1, 2013:   reorg sourceme scripts, fix gcc 4.7.2 for RH6, fix README
Apr 9, 2014:
- added 'make' and 'gmake' back to binutils-2.22_64
- fixed typo in VG_Gnu_Notice, removed broken links
- described gcc 4.2.2 as optional and deprecated
- documented that host must have a 64-bit CPU
- removed dead link <gcc>/xbin/gccbug
June 10, 2014:        branch into 2016.06, minor changes
- add symbolic links source_me_32.csh source_me_64.csh, ditto .sh
- bug fix gcc-4.5.2/xbin: use binutils 2.22 not 2.18
- removed test/cat of VG_Gnu_Notice in source_me* scripts
Feb 11, 2015:  
- new 2016.06 package
- add 4.8.3 as default compiler
- gcc 4.2.2 is no longer marked as deprecated
July 2, 2015:
- Ubuntu fixes: xbin of gcc 4.5.2, 4.7.2, 4.8.3 add -B/usr/lib/...
- Updated README, state that gcc 4.2.2 is only supported on RH5, Suse11.
Dec 14, 2015:
- Created 2016.06 package
- Updated README, bug fix: Put back Symbolic link for gcc (9000968204)
Aug 19, 2016:
- Created 2017.03 package:add gcc 5.2.0 (new default compiler), binutils 2.25
- Updated README, bug fix: Put back Symbolic link for gcc (9000968204)
Jul 8, 2024:
- Created 2024.09 package:add gcc 12.3.0 (new default compiler), binutils 2.33.1
- Updated README
- gcc 4.* and gcc 5.* is no longer suppoted and marked as deprecated


回复 支持 反对

使用道具 举报

发表于 2025-8-13 01:08:40 | 显示全部楼层
thanks for the info
回复 支持 反对

使用道具 举报

发表于 2025-8-13 03:49:30 | 显示全部楼层
thanks for the info
回复 支持 反对

使用道具 举报

发表于 2025-8-13 05:02:26 | 显示全部楼层
kankan
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /3 下一条

手机版| 小黑屋| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-9-4 18:30 , Processed in 0.016650 second(s), 4 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表