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. | ||
− | |||
− | |||
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). | ||
− | |||
− | |||
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. | ||
− | |||
− | |||
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 | + | will find a subfolder with the same name as your Simulink design. |
− | |||
− | |||
− | |||
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, | + | To watch ROACH boot, you need to connect to it using a serial port. Under Linux, minicom is |
− | + | a standard tool for communicating over the serial port. On Windows, try HyperTerminal. | |
− | + | 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. | + | you do not interrupt it, the default is to boot off FLASH. If your filesystem is on |
− | a network computer, so type | + | 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 | + | where to find the filesystem. |
− | |||
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 | + | You can connect to your ROACH board by SSHing directly into it. Under Linux, use the command "ssh". |
− | + | On Windows, try Putty. Connect using the IP address of your ROACH. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Upon entering a username and password, you will 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. |