HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu,...

27
HW/SW Co-design HW/SW Co-design Lecture 2: Lecture 2: Lab Environment Setup Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NT RA: Yi-Chiun Fang, EE Dept, NTHU

Transcript of HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu,...

Page 1: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

HW/SW Co-designHW/SW Co-design

Lecture 2:Lecture 2:Lab Environment SetupLab Environment Setup

Course material designed by Professor Yarsun Hsu, EE Dept, NTHURA: Yi-Chiun Fang, EE Dept, NTHU

Page 2: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

OutlineOutline

Hardware Environment SetupSoftware Environment Setup

Page 3: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

HARDWARE ENVIRONMENT HARDWARE ENVIRONMENT SETUPSETUP

Page 4: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

GR-XC3S-1500 Dev. Board (1/2)GR-XC3S-1500 Dev. Board (1/2)

Connect the power supply, serial interface, ethernet interface, and JTAG interfaceSet the IP address of the host PC to 10.0.0.1, with subnet mask 255.255.255.0

Power supply

JTAG interface

Ethernet interface

Serial interface

Page 5: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

GR-XC3S-1500 Dev. Board (2/2)GR-XC3S-1500 Dev. Board (2/2)

Install jumpers JP9 1-2 and 5-6

This sets the FPGA in JTAG configuration mode and allows the configuration process to be controlled from the Host PC via the JTAG cable

Page 6: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

SOFTWARE ENVIRONMENT SOFTWARE ENVIRONMENT SETUPSETUP

Page 7: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

Xilinx ISE (1/5)Xilinx ISE (1/5)

9.2i WEBPACKExtract and install

Page 8: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

Xilinx ISE (2/5)Xilinx ISE (2/5)

Page 9: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

Xilinx ISE (3/5)Xilinx ISE (3/5)

Do not check “Launch WebUpdate”

Page 10: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

Xilinx ISE (4/5)Xilinx ISE (4/5)

Service Pack 9.2.04iRun the installer to install

Page 11: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

Xilinx ISE (5/5)Xilinx ISE (5/5)

Page 12: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

Cygwin (1/4)Cygwin (1/4)

The setup.exe utility tracks the versions of all installed components and provides the mechanism for installing or updating everything available for CygwinUsed Cygwin DLL release version is 1.5.25-15

Page 13: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

Cygwin (2/4)Cygwin (2/4)

Remember to choose the Unix text mode

Page 14: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

Cygwin (3/4)Cygwin (3/4)

Make sure the following packages are installed

autoconfigautomakegccmakesharutilstcltkzlib

Page 15: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

Cygwin (4/4)Cygwin (4/4)

Start Cygwin from desktop after installation for system initialization

Page 16: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

BCC & GRMON (1/2)BCC & GRMON (1/2)

Obtain the Cygwin version of BCC hereUsed version: sparc-elf-3.4.4-1.0.29d-cygwin.tar.bz2

Obtain the Evaluation/Academic version of GRMON here

Used version: grmon-eval-1.1.32.tar.gzPut the two files in your CYGWIN_INSTALL_DIR\home\USER\

Page 17: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

BCC & GRMON (2/2)BCC & GRMON (2/2)

Start CygwinUnder the home of the user

mkdir /opttar zxf grmon-eval-1.1.32.tar.gz -C /opttar jxf sparc-elf-3.4.4-1.0.29d-cygwin.tar.bz2 -C /opt

Open file .bashrc under your home, and append the following line at the end of the file

export PATH=/opt/grmon-eval/cygwin:/opt/sparc-elf-3.4.4/bin:$PATH

The paths will take effect after Cygwin restart

Page 18: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

GHDLGHDL

Obtain GHDL Cygwin build hereUsed version: ghdl-0.27-cygwin.bz2

Put the file in your Cygwin home directorytar jxf ghdl-0.27-cygwin.bz2 -C /

Open file .bashrc under your home, and append the following line at the end of the fileexport PATH="$PATH":/usr/local/ghdl-0.27/bin

The paths will take effect after Cygwin restart

Page 19: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

GTKWaveGTKWave

Obtain GTKWave Windows port and the needed DLLs here

Used version: GTKWave 3.1.6Extract the two files into the same folder

Page 20: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

eCos Library (1/8)eCos Library (1/8)

Obtain the eCos source package hereUsed version: ecos-rep-1.0.8.tar.gz

Put the file in your CYGWIN_INSTALL_DIR\home\USER\Start CygwinUnder the home of the user

tar zxf ecos-rep-1.0.8.tar.gz -C /opt

Obtain the eCos Configuration Tool hereUsed version: configtool-2.11-setup.exe

Run the installer to install

Page 21: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

eCos Library (2/8)eCos Library (2/8)

Start eCos Configuration ToolChoose folder for eCos repository

Choose the folder where you just extract your eCos source package (i.e. under your /opt directory)The folder can also be set through Build → Repository

Page 22: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

eCos Library (3/8)eCos Library (3/8)

Build → TemplateSelect: LEON3 processor with GRETH ethermacSelect “net” under “Packages” to include the TCP/IP stack in the OSClick “Continue” to resolve symbol conflicts

Page 23: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

eCos Library (4/8)eCos Library (4/8)

Tools → Paths → Build ToolsChoose the ‘bin’ directory under your LEON BCC directory

Page 24: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

eCos Library (5/8)eCos Library (5/8)

Tools → Paths → User ToolsChoose your /bin directory

Page 25: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

eCos Library (6/8)eCos Library (6/8)

Network initializationMake sure “Basic network framework → INET support” is checked to support IP network processingCheck “Basic network framework → TFTP (RFC-1350) support” for TFTP supportSet up the addresses for the network interface under “Address setups for ‘eth0’”

Page 26: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

eCos Library (7/8)eCos Library (7/8)

File → SaveThe configuration file is for further reconfiguration of eCosSave the file under your home directory (i.e. CYGWIN_INSTALL_DIR\home\USER\)You will see three additionalfolders in your homedirectory along withyour ecc fileThese folders are laterused to link eCos withyour application

Page 27: HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.

eCos Library (8/8)eCos Library (8/8)

Build → LibraryBuild the customized eCos library using BCCYou should see the build messages in the Configuration ToolCheck the messagesto see if the build isdoneExit the program afterbuilding completion