Difference between revisions of "CasperTutorial01"

From AstroBaki
Jump to navigationJump to search
(Removing text relating to the specific setup used at the workshop)
Line 91: Line 91:
 
a slice block, which Xilinx provides. Xilinx Blockset $\rightarrow$ Basic
 
a slice block, which Xilinx provides. Xilinx Blockset $\rightarrow$ Basic
 
Elements $\rightarrow$ Slice.
 
Elements $\rightarrow$ Slice.
 
\begin{figure}[h!]\centering\includegraphics[scale=.5]{tut1_fig8.png}\end{figure}
 
  
 
Double-click on the newly added slice block. There are multiple ways to select
 
Double-click on the newly added slice block. There are multiple ways to select
Line 107: Line 105:
  
 
(BEE\_XPS library $\rightarrow$ gpio).
 
(BEE\_XPS library $\rightarrow$ gpio).
 
\begin{figure}[h!]\centering\includegraphics[scale=.5]{tut1_fig10.png}\end{figure}
 
  
 
Set it to use ROACH's LED bank as output, GPIO bit index 0 (the first LED).
 
Set it to use ROACH's LED bank as output, GPIO bit index 0 (the first LED).
Line 130: Line 126:
 
the CASPER blocks (like the GPIO block) do this for you with "sim\_in" and
 
the CASPER blocks (like the GPIO block) do this for you with "sim\_in" and
 
"sim\_out". We will see later how to use a 'scope to monitor these lines.
 
"sim\_out". We will see later how to use a 'scope to monitor these lines.
 
 
  
 
\subsubsection{Connect your design}
 
\subsubsection{Connect your design}
Line 156: Line 150:
  
 
Please save your design in c:\verb=\=projects\verb=\=<YOUR\_INITIALS>\_tut1.mdl.
 
Please save your design in c:\verb=\=projects\verb=\=<YOUR\_INITIALS>\_tut1.mdl.
 
  
  
Line 175: Line 168:
 
read its current value. From the BEE\_XPS System Blockset library, drag two
 
read its current value. From the BEE\_XPS System Blockset library, drag two
 
Software Registers onto your design.
 
Software Registers onto your design.
 
\begin{figure}[h!]\centering\includegraphics[scale=.5]{tut1_fig15.png}\end{figure}
 
  
 
Set the I/O direction to From Processor on the first one to enable dataflow from PowerPC to the FPGA fabric. Set it to To Processor on the second one.
 
Set the I/O direction to From Processor on the first one to enable dataflow from PowerPC to the FPGA fabric. Set it to To Processor on the second one.
Line 361: Line 352:
  
 
If you navigate to the directory containing your *.mdl file, you
 
If you navigate to the directory containing your *.mdl file, you
will find a subfolder with the name of your Simulink design.
+
will find a subfolder with the same name as your Simulink design.
 
 
\begin{figure}[h!]\centering\includegraphics[scale=.5]{tut1_fig32.png}\end{figure}
 
 
 
 
You will find your bitstreams inside the folder called bit\_files. There are
 
You will find your bitstreams inside the folder called bit\_files. There are
 
two files with names of the form  
 
two files with names of the form  
 
<design\_name>\_<start\_compile\_time>.XXX.
 
<design\_name>\_<start\_compile\_time>.XXX.
The .bit is the raw FPGA bitstream that you could load manually using a Xilinx
+
The *.bit is the raw FPGA bitstream that you could load manually using a Xilinx
JTAG programmer. Of interest to us now is the .bof file. This is a BORPH
+
JTAG programmer. Of interest to us now is the *.bof file. This is a BORPH
 
executable. We will transfer this to your ROACH board now.
 
executable. We will transfer this to your ROACH board now.
  
Line 388: Line 376:
 
\subsection{Booting your ROACH}
 
\subsection{Booting your ROACH}
  
To watch ROACH boot, we will connect to it using a serial port. Double-click on
+
To watch ROACH boot, you need to connect to it using a serial port. Under Linux, minicom is
roach\_serial.ht on your desktop. This will open HyperTerminal (a serial
+
a standard tool for communicating over the serial port.  On Windows, try HyperTerminal.
terminal program) and set it to connect to com1 at 115200 baud, 8N1 with no
+
Set the serial connection to use your serial port (usually of the form /dev/tty* on Linux or
flow control.
+
com1 on Windows) at 115200 baud, 8N1 with no flow control.
  
\subsection{Turn the ROACH on.}
+
\subsection{Turn the ROACH on}
  
 
You will be greeted with a printout similar to this one:
 
You will be greeted with a printout similar to this one:
Line 432: Line 420:
 
You have four boot options: network, onboard flash, USB or MMC/SD. See the
 
You have four boot options: network, onboard flash, USB or MMC/SD. See the
 
ROACH getting started guide on the CASPER wiki for details of these options. If
 
ROACH getting started guide on the CASPER wiki for details of these options. If
you do not interrupt it, the default is to boot off FLASH. Our filesystem is on
+
you do not interrupt it, the default is to boot off FLASH. If your filesystem is on
a network computer, so type run netboot to initiate a network boot.
+
a network computer, so type netboot to initiate a network boot.
  
 
It will acquire an IP address along with a bunch of DHCP options which define
 
It will acquire an IP address along with a bunch of DHCP options which define
where to find the filesystem. The lab's server is pre-configured to provide
+
where to find the filesystem.  
this info.
 
  
 
After Linux has completed its boot process, you will be greeted with a Debian prompt.
 
After Linux has completed its boot process, you will be greeted with a Debian prompt.
Line 447: Line 434:
 
\end{verbatim}
 
\end{verbatim}
  
You can connect to your ROACH board by SSH'ing directly into it. Windows does
+
You can connect to your ROACH board by SSHing directly into it. Under Linux, use the command "ssh".
not include an SSH client natively, but you can use Putty. There is an icon on
+
On Windows, try Putty. Connect using the IP address of your ROACH.
your desktop. Double-click it.
 
 
 
You will be greeted with a dialog box which will ask you for the hostname. Our
 
server assigns roaches IP addresses and hostnames based on the serial number.
 
Complete roach<SerialNumber>. There is a sticker on the front of your ROACH
 
with its 6-digit serial number. For example, if it is 020112, then complete
 
roach020112. Leave everything else default. Click Open.
 
 
 
\begin{figure}[h!]\centering\includegraphics[scale=.5]{tut1_fig35.png}\end{figure}
 
  
You will now be prompted for a username and password. You may login as user
+
Upon entering a username and password, you will be greeted with the same prompt that you
root with no password. You will now be greeted with the same prompt that you
 
 
got over the serial port. You can use either interface to control your ROACH
 
got over the serial port. You can use either interface to control your ROACH
 
from this point forward.
 
from this point forward.

Revision as of 09:34, 26 March 2010