.en
.ps 11
.vs 13
.hy 0
.nr sf .25i
.ps +2
.vs +2
.ce 1000
.ft B
Creating and Running Circuits with the TME Ports Package
.sp
.ps -2
.vs -2
.ft I
Dave Galloway
.sp
Edward S. Rogers Sr. Department of Electrical and Computer Engineering
University of Toronto
.sp
January 2014
.ce 0
.ft R
.ds TL ''- % -''
.su
Communicating with your Circuit
.pp
The TME ports package can be used to communicate with your circuit.
See \fIThe TME Ports Package\fP
document for details.
If you want to use the ports package,
create a port description file,
giving it the same
name as the top level netlist, but with a .ports extension.
You must also instantiate a component in your netlist called
\f(CWpcie_portmux\fP, passing it the signals that you want to connect to the
ports package.
.pp
For a DE-4 circuit, run the \f(CWtme\fP command like this:
.sp
.ce
.ft CW
tme toplevelname
.ft P
.pp
This will run the Altera CAD software,
creating a new directory called \f(CWpcie_portmux\fP
containing the Verilog source for the pcie_portmux wrapper component.
It will also copy your ports file to a file called \f(CWfpgaN.ports\fP.
.pp
For a DE-5 circuit, run the command like this:
.sp
.ce
.ft CW
tme -de5 toplevelname
.ft P
.pp
.su
Compiling your Circuit
.pp
Add these lines to your .qsf file, so that Altera's Quartus software
can find the source for the pcie_portmux component:
.pp
.in .25i
.nf
.ft CW
set_global_assignment -name SEARCH_PATH pcie_portmux
set_global_assignment -name QIP_FILE pcie_portmux/qsys/qsys/synthesis/qsys.qip
.ft P
.fi
.in -.25i
.pp
Compile your circuit using Quartus.
.su
Using the demonstration board
.pp
In order to use the demonstration board,
the \f(CWtmemon\fP daemon must be running on the machine
named \f(CWskynet.eecg\fP.
This daemon is normally started when the machine is booted, and will continue
running.
If the daemon stops for some reason, you can re-start it by signing on to
that machine and typing:
.pp
.ce
.ft CW
tmemon &
.ft P
.pp
The \f(CWtm\fP command can then be used to communicate with the tmemon daemon.
See \fIThe tmemon Program\fP document for details.
.pp
You can check the status of the demonstration board remotely by running the
\f(CWtmstatus\fP program.
It will use X-windows to create an popup window on your screen
that shows the current status of the board.
.pp
The \f(CWtmget\fP command will attempt to reserve the board for a specified
number of minutes (default 10).
If it succeeds, your name will be shown on everyone's tmstatus display.
When you are finished, run the \f(CWtmrelease\fP command so that others
may use the board.
.pp
Once you have ensured that no one else is using the board, you can program
your circuit into the board.
To do this, follow these steps (note that steps 2 and 3 must be executed as
root on the machine that is connected to the demonstration board):
.sp
.in 1i
1) download your circuit to the board using the \f(CWtmrun\fP command
.br
2) \f(CWecho 1 > /sys/bus/pci/devices/0000:03:00.0/remove\fP
.br
3) \f(CWecho 1 > /sys/bus/pci/rescan\fP
.in -1i
.pp
To communicate with the circuit, run your program that uses the ports library
in the directory that contains the \f(CWfpgaN.ports\fP file.
You do not have to be signed on to the machine that has the demonstration
board, as your program will communicate with tmemon (and the board) over
the network.
