Computer Laboratory

Building an Internet Router

Lab Machine Setup


We STRONGLY encourage you to use revision control. This setup procedure will create a svn repository on your nf-test machine; you may wish to orgainize your revision-control a different way at some future date.


Step-by-step instructions to set up your lab account

Note: Using vncserver, generating cores or viewing simulations require an X connection

  1. Log in to one of the (SW02) lab machines (if the machine is running Windows - reboot into Linux).
  2. Collect your groups machine number, ssh key and login password from the TAs. You will wish to add this ssh key to your key-chain

    ssh-add id_rsa-nf-testXX
  3. Add the following lines to your $HOME/.ssh/config (creating it if necessary)

    $ mkdir .ssh && chmod 0700 .ssh
    $ cat >> .ssh/config
    ForwardAgent yes
    ForwardX11 yes
    ForwardX11trusted yes
    ^D
    $ chmod 0600 .ssh/config
    
  4. Login to your machine using ssh
     ssh root@nf-testXX
  5. Create a new subversion (or git) repository. To create a new repository with svn:
       svnadmin create netfpga_repo
  6. Download and extract the hardware starter code:
       wget http://www.cl.cam.ac.uk/teaching/0910/P33/files/BIR-hw-20091009.tgz
       tar -xvzf BIR-hw-20091009.tgz
  7. Import the newly extracted files into subversion:
       svn -m "NF2 starter pack" import NF2 file:///$PWD/netfpga_repo/NF2
  8. Remove the NF2 directory
       rm -rf NF2
  9. Checkout from your svn repository the starter pack code
      svn co file:///root/netfpga_repo/NF2 
  10. Verify that you have a direcory /root/NF2 and then logout and then log back in again. (This ensures the environment variables are all set correctly.)
      exit 
  11. Create the necessary IP cores for the project as follows:

       cd NF2/projects/bir_starter/synth
       make cores

    Note: this process may be slow and can take 20-30 minutes.

  12. Now synthesis the starter pack code in the same directory (NF2/projects/bir_starter/synth):

     make 

    Note: this process may be slow and can take 20-30 minutes.

    Note also: this process will emit a considerable number of warnings, at this stage these are not of concern.

  13. Verify that you can run the Xilinx synthesis tools:
       xst

    If you are presented with a prompt similar the following then the synthesis tool works. (Type quit to exit):

       Release 9.2.04i - xst J.40
       Copyright (c) 1995-2007 Xilinx, Inc.  All rights reserved.
       -->
  14. Verify that you can run ModelSim:

       vsim

    If ModelSim loads then your environment is set up correctly. Quit ModelSim and proceed with the lab

Warning: Files stored on nf-test machines are not backed up - and may be lost at any time. You must make sure that you regularly copy your files into your REAL home directory as a backed up.