Install SimpleScalar in Ubuntu10.10

Source: Internet
Author: User
Environment: Ubuntu10.10; gcc4.4.5; required for architecture experiment. Installation is troublesome. The main reason is that the cross-compiler gcc version is 2.7.2. SimpleScalar writes "newerversion" (compared with its own version 2.6 ). Basically, each make operation is an error... According to the instructor's instruction, there are still errors in step-by-step installation, or I have encountered errors in step-by-step installation. It takes a lot of effort to complete the installation. The last thing we rely on is

Environment: Ubuntu 10.10; gcc 4.4.5;

Architecture experiments are required. Installation is troublesome. The main reason is that the cross-compiler gcc version is 2.7.2. SimpleScalar writes "newer version" (compared with its own version 2.6 ). Basically, each make operation is an error... According to the instructor's instruction, there are still errors in step-by-step installation, or I have encountered errors in step-by-step installation. It takes a lot of effort to complete the installation. Finally, it depends on the resources of foreign universities. There is an installation script on the website, which is successfully executed on my Ubuntu10.10.

First the web site drying: http://www.ann.ece.ufl.edu/courses/eel5764_10fal/project/

It seems to be the materials used by an assistant professor at the University of Florida for teaching, including some installation of SimpleScalar and an installation script buildSS. The installation instructions are basically the same as those in my lab guide. The installation script is the most useful. Thank you!

Directly paste the script code for future use:

  1. NAME = Simplescalar
  2. PACKAGE = simplescalar
  3. TOOL = simpletools-2v0
  4. UTIL = simpleutils
  5. SIM = simplesim
  6. # Update Ubuntu Software Package
  7. Sudo apt-get update
  8. # Getting required applications
  9. Sudo apt-get install flex-old bison build-essential
  10. # Create Simplescalar Directory
  11. Cd
  12. Mkdir $ NAME
  13. Cd $ NAME
  14. # Getting simplescalar tar file
  15. Wget http://csrl.unt.edu/downloads/?package.tgz
  16. # Extraction
  17. Tar xvfz $ PACKAGE. tgz
  18. Export CC = "gcc"
  19. # Setting up installation
  20. Export HOST = i686-unknown-linux
  21. Export TARGET = sslittle-na-sstrix
  22. Export IDIR = ~ /$ NAME
  23. # Build Simplescalar tools
  24. Cd ~ /$ NAME
  25. Tar xvfz $ TOOL. tgz
  26. Rm-rf gcc-2.6.3
  27. # Build Simplescalar utils
  28. Cd ~ /$ NAME
  29. Tar xvfz $UTIL-990811.tar.gz
  30. UTIL-990811 cd $
  31. ./Configure -- host = $ HOST -- target = $ TARGET -- with-gnu-as -- with-gnu-ld -- prefix = $ IDIR
  32. Make CC = gcc
  33. Sudo make install CC = gcc
  34. # Build Simplescalar
  35. Cd ~ /$ NAME
  36. Tar xvfz$ SIM-3v0d.tgz
  37. SIM-3.0 cd $
  38. Make config-pisa
  39. Make CC = gcc
  40. # Build Compiler
  41. Cd ~ /$ NAME
  42. Tar xvfz gcc-2.7.2.3.ss.tar.gz
  43. Cd ~ /$ NAME/gcc-2.7.2.3
  44. Export PATH = $ PATH: $ IDIR/simpleutils-990811/sslittle-na-sstrix/bin
  45. ./Configure -- host = $ HOST -- target = $ TARGET -- with-gnu-as -- with-gnu-ld -- prefix = $ IDIR
  46. # Fix file errors
  47. Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
  48. Sed-I's/return \ "FIXME \ n/return \" FIXME \ n \/G '~ /$ NAME/gcc-2.7.2.3/insn-output.c
  49. Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
  50. Wget http://www.ict.kth.se/courses/IS2202/ar
  51. Wget http://www.ict.kth.se/courses/IS2202/ranlib
  52. Chmod 700 ar
  53. Chmod 700 ranlib
  54. Sudo cp ar $ IDIR/sslittle-na-sstrix/bin/ar
  55. Sudo cp ranlib $ IDIR/sslittle-na-sstrix/bin/ranlib
  56. Rm ar
  57. Rm ranlib
  58. Chmod + w ~ /$ NAME/gcc-2.7.2.3/obstack. h
  59. Sed-I's/next_free) ++/next_free ++)/G '~ /$ NAME/gcc-2.7.2.3/obstack. h
  60. Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
  61. Sed-I '98i \
  62. # Define BITS_PER_UNIT 8
  63. '~ /$ NAME/gcc-2.7.2.3/libgcc2.c
  64. # Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
  65. Cp $ IDIR/gcc-2.7.2.3/patched/sys/cdefs. h $ IDIR/sslittle-na-sstrix/include/sys/cdefs. h
  66. Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
  67. Make enquire CC = gcc
  68. Sudo make install versions ages = "c ++" CFLASS =-O3 CC = "gcc" PATH = $ PATH :~ /$ NAME/bin
  69. # Done!
  70. Exit 0

If you have downloaded the required tar package, you can

  1. Wget http://csrl.unt.edu/downloads/?package.tgz

Remove this line. You can also download it directly, that is, the speed may be a little slow. This package contains all required tools. Use the simscalar-cheetath script.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.