University of California at Berkeley Department of Electrical Engineering & Computer Sciences Instructional Support Group /share/b/pub/cs152.help Oct 10 2008 CONTENTS: About CS152, CS194-6 and CS151 Computing Resources for CS152 Calinx Technical Notes About CS152, CS194-6 and CS151 ------------------------------ Until Spring 2008, CS152 ran Xilinx with the FPGA boards on Windows in 119 amnd 125 Cory, in synch with CS150. After that, CS152 stopped using the FPGA boards and moved to the UNIX computers in Soda Hall. In Fall 2008, CS194-6 efffectively replaced CS152 in 125 Cory, using the FPGA boards. CS194-6 may become a new course called "CS151" in a future semester. CS194-6 shares room 125 Cory with CS150. In Fall 2008, the former CS152 lab in 119 Cory was converted for use by another class. Some of the information below is historical and may not be needed anymore. Computing Resources for CS194-6 ------------------------------- 125 Cory is the primary computing lab for CS194-6 running Xilinx. CS194-6 uses these Windows-based application programs: Xilinx (/share/b/pub/xilinx.help) Matlab (/share/b/pub/matlab.help) Modelsim (/share/b/pub/modelsim.help) Synplify Pro (/share/b/pub/synplify.help) ChipScope (/share/b/pub/chipscope.help) CS194-6 also uses programmable Calinx FPGA boards that were developed here in EECS for CS150 (see http://calinx.eecs.berkeley.edu/). For software and technical notes, see \\fileservice\iesg\EESoftware\Xilinx \\fileservice\Software\EE-Software\xilinx Calinx Technical Notes ---------------------- This is a summary from Spring 2003 for the sys admins. Connecting to the Calinx boards from Xilinx: 1) Install the parallel cable drivers from the "Ise 4.1 i Design Env - PC" CD. Choose custom setup (full setup not needed) and select "Parallel cable" only. Reboot system after the update. This resolved a problem we used to have with non-privelged users being unable to use Impact. That appeared to be a permission problem. We loaded the "Parallel 3" drivers from the Xilinx 4 CD and rebooted. The data cable has "Parallel IV" printed on it, but Xilinx 4 only has Parellel 3 drivers. The PCs parallel port had to be in a specific mode. The Quick Start Guide says that the "ECP parallel port operation must be enabled in the system BIOS." The Windows Device Manager shows that we have EDP printer ports, so I think that's not a problem. 2) Impact (C:\Xilinx\bin\nt\impact.exe) is the tool for downloading *.bit files to the board. The Project Navigator (C:\Xilinx\bin\nt\ise.exe) gives the same functionality, but it is more convenient to just start Impact, because you don't have to load a project as you do with the Project Navigator. 3) The Xilinx Quick Start Guide shows how to do a download. See the section called "Impact Quickstart for Slave Serial Mode". Turn on the Calinx board (toggle switch next to the A/C input). Start Impact, select "Configure Devices" and "Slave Serial Mode" (even though the cable is parallel). Once the "Connecting to download cable..." succeeds, you get an "Add Device" window, in which you enter a *.bit file name. A picture of an IC appears. You right-click on that, select "Program" from the menu and wait for the file to download. You are happy if you get a "Programming Succeeded" response. You can also get to the "Add Device" window if you select File/New and then Edit/Add Device/Xilinx Device. Until Fall 2008, this Calinx server was running on a PC in 119 Cory: hostname c119-calinx.eecs.berkeley.edu operating system Debian LINUX external IP address 128.32.40.240 external mac address 00:a0:c9:36:97:33 internal mac address 00:a0:c9:39:f2:38 119 Cory port 115-119-005 "streampackets" is a C program that runs on the Linux server. See \\fileservice\cs152\Calinx-RTP\streampackets\README for usage. It was built on c119-calinx.eecs. The source is stored under /usr/local/cs152/streampackets. The rest of the code in \\fileservice\cs152\Calinx-RTP\ is Verilog for programming the Calinx boards. eth0 is the device on the eecs network, you should not stream packets there, eth1 is the device on the internal network. Currently, eth1 doesn't have an ip address, but that could be changed if ip is needed on the internal network. Root has the standard Linux client root password. CS194-6 users can login as EECS\cs152-xx with their windows password. (pathma added 25Oct04)={ As of Fall 2004 //fileservice/cs152 is smbmounted onto c119-calinx so when users login as EECS/cs152-xx they will be placed in their fileservice folder, and have access to their files. So the section on copying images is not needed. However they will not be able to write to their fileservice folders from c119-calinx, so if they want to do a "ftp get" they should do it from /tmp. c119-calinx OS (debian linux) was upgraded to 2.6.7 kernel. Samba upgraded from 2.2.3 to 3.0.5-1. With the newer linux OS, the calinx ftp and ping could not handle packets with the DF (Don't Fragment) bit set. ftp and ping from other windows/linux box is OK. To work around this, we need to disable Path MTU Discovery after a system reboot. This may cause fragmentation, but the impact is minimal in our case. PMTUD was introduced to maximize performance by minimizing fragmentation. Do the following if the system had rebooted. echo 1 >/proc/sys/net/ipv4/ip_no_pmtu_disc } Bem Ajani Jones-Bey explains how to copy images from the workstations to the Calinx server: 1. Open up SSH Secure File Transfer Client 2. Press the Quick Connect button 3. Type in c119-calinx.eecs.berkeley.edu as the Host Name 4. For username, they should use their cs152 account with 'EECS\' prepended. For example, 'EECS\cs152test' 5. At the password prompt, type in their password 6. Upload their image to their home directory (the file transfer client will put them there automatically, but home directories are of the form /home/EECS/cs152test Then they can do the following to upload to their board using tftp: 1. Open up SSH Secure Shell Client 2. Press the Quick Connect button 3. Type in c119-calinx.eecs.berkeley.edu as the Host Name 4. For username, they should use their cs152 account with 'EECS\' prepended. For example, 'EECS\cs152test' 5. At the password prompt, type in their password 6. At the command prompt, type: 'tftp host' where host is the ip address of their board. For example, if the board is at 10.42.42.42, then the command would be: tftp 10.42.42.42 7. At the tftp prompt, type 'put file' where file is the file to upload to the board. When get is implemented on the board, downloading will be able to be done by typing 'get file'. A '?' as input to the tftp client will list the possible commands, and 'man tftp' describes in more detail the use of the program. That should be all they need to know to upload images to their boards. They should make sure that they get the ipaddress right so that they don't inadvertently upload or download from some one else's board, since there is no authentication in tftp. Greg Gibeling (gdgib@sbcglobal.net) wrote the TFTP client for the Calinx boards. Here's what the dip switches do on the board when TFTPex is loaded: All switches are active high. SW10 bit 7: Controls TFTP_BadFileName_, turning this on will prevent file transfers. SW10 bit 6: Controls TFTP_GoodFileName_, turning this on will allow file transfers (if bit7 is off) SW10 bits 0,1: Control the mode of the tester. Setting to 00 will present the contents of the file on the 7Seg LEDs. Setting this to 01 will show the first 4 bytes of the file name on the 7Seg LEDs. Setting this to 10 will show the last 2 bytes of the file name on the 7Seg LEDs. Setting this to 11 will show the number of bytes in the file, note that since the data bus is 32b this will always be a multiple of 4 (a 2B file would be rounded up to 4B for example) SW9: In mode 0 this selects the memory address to show on the 7Seg LEDs, setting this to 0 will show you the first 4B of the file, setting this to 1 will show the second 4B of the file. Button 4: Reset everything. Instructional Support Group 378/384/386 Cory, 333 Soda inst@eecs.berkeley.edu