ProtoFlex   Carnegie Mellon

Differences

This shows you the differences between two versions of the page.

documentation:iiswc2010_tutorial_protoflex [2010/12/02 23:27]
127.0.0.1 external edit
documentation:iiswc2010_tutorial_protoflex [2010/12/03 02:48] (current)
papamix
Line 1: Line 1:
-====== ISPASS 2010 Tutorial  ====== +====== IISWC 2010 Tutorial  ====== 
-Welcome to the ISPASS 2010 Protoflex tutorial! Download the {{:documentation:ispass_tutorial_2010.pptx|tutorial slides here}}.+Welcome to the IISWC 2010 Protoflex tutorial! Download the {{:documentation:iiswc_tutorial_2010.pptx|tutorial slides here}}.
===== Introduction ===== ===== Introduction =====
During this tutorial we will first briefly cover the basic **ProtoFlex simulation architecture** concepts and we will then move onto a hands-on session, where we will test-drive the recently released **ProtoFlex Simulator**. In particular we will go over the hardware and software installation procedures, and the process for staging and running your first simulation on the FPGA. This tutorial assumes you are familiar with basic computer architecture concepts and general simulation tools.  No prior knowledge of FPGAs is required. During this tutorial we will first briefly cover the basic **ProtoFlex simulation architecture** concepts and we will then move onto a hands-on session, where we will test-drive the recently released **ProtoFlex Simulator**. In particular we will go over the hardware and software installation procedures, and the process for staging and running your first simulation on the FPGA. This tutorial assumes you are familiar with basic computer architecture concepts and general simulation tools.  No prior knowledge of FPGAs is required.
Line 243: Line 243:
\\++++ \\++++
-=====2. Preparing a Simics checkpoint=====+<html><h2> <span style="opacity:0.5;filter: alpha(opacity=50) ;"> SKIP - 2. Preparing a Simics checkpoint </span> </h2> </html>
{{ :documentation:timeline_step2.png?400| }} {{ :documentation:timeline_step2.png?400| }}
-++++CLICK - Expand/Collapse|+Since we will be using the checkpoint you created during the Flexus part of the tutorial (~/checkpoints/final), you can skip this step. 
 +++++SKIP- Expand/Collapse|
The ProtoFlex simulator uses the notion of Simics checkpoints to initialize the machine state of a simulated target system (e.g., CPU registers, main memory) that is hosted on the FPGA.  A Simics checkpoint is simply a snapshot of simulated machine state in the form of one or more CPU's worth of registers, a physical main memory image, and device state.  Checkpoints allow us to stage and position our workloads without having to reboot the target machine over and over. When running Simics, the simulation of a target machine can be interrupted at any moment in order to save a checkpoint. The ProtoFlex simulator uses the notion of Simics checkpoints to initialize the machine state of a simulated target system (e.g., CPU registers, main memory) that is hosted on the FPGA.  A Simics checkpoint is simply a snapshot of simulated machine state in the form of one or more CPU's worth of registers, a physical main memory image, and device state.  Checkpoints allow us to stage and position our workloads without having to reboot the target machine over and over. When running Simics, the simulation of a target machine can be interrupted at any moment in order to save a checkpoint.
Line 273: Line 274:
++++ ++++
-==== Boot Solaris and Save Checkpoint ====+<html><h3> <span style="opacity:0.5;filter: alpha(opacity=50) ;">SKIP - Boot Solaris and Save Checkpoint </span> </h3> </html>
++++CLICK - Expand/Collapse| ++++CLICK - Expand/Collapse|
**With a finalized disk image, we are now ready to boot the operating system and create our first Simics checkpoint.** **With a finalized disk image, we are now ready to boot the operating system and create our first Simics checkpoint.**
Line 296: Line 297:
++++ ++++
-======3. Preparing a test workload======+<html><h2> <span style="opacity:0.5;filter: alpha(opacity=50) ;"> SKIP - 3. Preparing a test workload </span> </h2> </html> 
 +============
{{ :documentation:timeline_step3.png?400| }} {{ :documentation:timeline_step3.png?400| }}
-++++CLICK - Expand/Collapse|+Since we will be using the checkpoint you created during the Flexus part of the tutorial (~/checkpoints/final), you can skip this step. 
 +++++SKIP - Expand/Collapse|
In this section, we will cover the basics necessary to prepare a simple multithreaded microbenchmark for executing within the target system.  This process of moving the workload into the target machine and executing until a breakpoint is usually carried out entirely within a Simics-only environment. The microbenchmark that we will be providing is a simple pthreads example that can be downloaded from {{:documentation:microbenchmarks.tgz|}}. In this section, we will cover the basics necessary to prepare a simple multithreaded microbenchmark for executing within the target system.  This process of moving the workload into the target machine and executing until a breakpoint is usually carried out entirely within a Simics-only environment. The microbenchmark that we will be providing is a simple pthreads example that can be downloaded from {{:documentation:microbenchmarks.tgz|}}.
Line 462: Line 465:
  * Open up Impact from the start menu. When asked, create a new project and click ''Finish'' to start the boundary scan.  This will detect 5 components on the JTAG chain, with the last component being the FPGA.  When prompted by an Open Window dialog, click ''Cancel all''.   * Open up Impact from the start menu. When asked, create a new project and click ''Finish'' to start the boundary scan.  This will detect 5 components on the JTAG chain, with the last component being the FPGA.  When prompted by an Open Window dialog, click ''Cancel all''.
-  * Right-click on the last component (xc5vlx110t), and click ''Assign New Configuration File''.  When prompted, select the ''download.bit'' file copied over from the Primary PC. Leave all default options and proceed with the programming. This should only take a few seconds.  +  * Right-click on the last component (xc5vlx110t), and click ''Assign New Configuration File''.  When prompted, select the ''download.bit'' file copied over from the Primary PC. Leave all default options and proceed with the programming. To do this right-click on the last component (xc5vlx110t), and click ''Program''. This should only take a few seconds.   
 + 
 +  * Quit Impact.
  * Open a Cygwin command prompt by navigating to ''Start->Programs->Xilinx->EDK->Accessories->Launch EDK Shell''. Within the shell, navigate over to the directory where you saved ''pfserver.elf''.  If we assume that these files were on the ''C:\'' drive, type:   * Open a Cygwin command prompt by navigating to ''Start->Programs->Xilinx->EDK->Accessories->Launch EDK Shell''. Within the shell, navigate over to the directory where you saved ''pfserver.elf''.  If we assume that these files were on the ''C:\'' drive, type:
Line 479: Line 484:
=== Configuring the PCI express driver === === Configuring the PCI express driver ===
++++CLICK - Expand/Collapse| ++++CLICK - Expand/Collapse|
-  * Power on the Primary PC. **Don't forget to select the correct kernel at the GRUB menu (we use 2.6.27.29-0.1)**.+  * Power on the Primary PC. (you will need to ask one of the tutorial speakers to carry out this step remotely) **Don't forget to select the correct kernel at the GRUB menu (we use 2.6.27.29-0.1)**.
  * During bootup, your startup screen should show the FPGA board as a ''Memory Controller'':   * During bootup, your startup screen should show the FPGA board as a ''Memory Controller'':
Line 485: Line 490:
{{:documentation:bios.png?350|Bootup Screen}} {{:documentation:bios.png?350|Bootup Screen}}
-  * After the Primary PC is booted, navigate over to the ''<protoflex>/drivers/xupv5_pcie/module'' directory. Load the driver by typing ''sudo make load''. +  * After the Primary PC is booted login and navigate over to the ''<protoflex>/drivers/xupv5_pcie/module'' directory. Load the driver by typing ''sudo make load''.
  * Last but not least, when you have completed loading the driver, you should type ''dmesg''. Your output should resemble something like this (the addresses may not match up exactly):   * Last but not least, when you have completed loading the driver, you should type ''dmesg''. Your output should resemble something like this (the addresses may not match up exactly):