xinput and fed into SPLASH by the XL processor. It is passed around from PE to PE until it returns to the XR processor whereupon it is written to the output file
xoutput. It is called the LED tutorial since each PE has a single LED output on the back of SPLASH. The signal leading to this LED (XP_LED) is driven from the LSB of the data coming in to the left side of the PE. By watching the LED's on the back of SPLASH one can determine whether the execution is proceeding correctly.
The code for this example lives in the directory $SPLASH2/tutorial/LED and consists of the following required files:
led.vhd
system.vhd
$SPLASH2/simulator/system/system.vhd.
config.vhd
xinput
xoutput
led.vhd contains the VHDL code. It has been commented to indicate required elements. Data is pumped in from the left channel, through two registers and out the right channel. This use of registers for all input and output values is recommended by Jeff Arnold, one of the SPLASH developers
The input data is 36 bits wide. The top 4 bits are tag bits while the lower 32 bits are the actual data. See the discussion below on the input file format to understand the use of the tag bits and how to encode them in the input file.
Finally, note that XP_LED = left_reg(0) which means that the LSB of the data input from the left port is tied to the LED on the back of SPLASH.
config.vhd contains the VHDL configuration to create a full SPLASH system for simulation. It has been
commented to show how it could be changed to accomodate other designs. Important elements include:
xinput and the output will go to file
xoutput.
xinput is specified to be a "Hex" file (as opposed to decimal).
Further down in this file you find the various XILINX chip specifications. Note that for each XILINX chip a specific VHDL entity/architecture is defined. In the case of this example, all of the chips get the entity work.Xilinx_Processing_Part and its associated architecture led. This is the VHDL design contained in the file led.vhd. Note that for each processor, an entity/architecture must also be specified for each Memory_Part. For this example we use the dynamic architecture which is a pre-defined model provided by SRC.
The output file format is the same as the input file format.
This will create the file
vhdlan system led config
TOP.sim which is the file which
will be simulated using VHDLDBX.
At times the license server will be down when you attempt to run the VHDL
analyzer. If you are informed it is down when you attempt to compile,
you may execute the UNIX command /etc/rc.synopsys to
restart it (this only works on fpga at the current time).
vhdldbx TOP
The command file cmds.sim may be used to drive the simulation like this:
include cmds.sim
where cmds.sim contains the needed commands to exercise the design.
After simulating, the output file xoutput should contain the same data as was found in
xinput to begin with.
vhdl2xnf led.vhd
If all goes well the above should result in the file
led.xnf. Currently, when I run I get errors of the form:
Error: Cannot find resolution function 'resolved'.
Resolution function ignored. (HDL-165)
It seems these can be safely ignored.
At this point you may finish the compilation process by typing:
which should result in the file
xnf2bit led
led.bit. In the process
of creating the BIT file, this script does the physical place and
route step (PPR). If the CAD software's license server is down then
PPR will attempt to restart it. Watch closely to see if this happens.
In order for the license server to be restarted, you must have a login
on newt, one of the department HP 700's. In addition, your
.rhosts file must be set to allow the machine you are
running xnf2bit on to rlogin to newt.
If you use XBLOX elements in your designs, you should refer to Processing Designs with XBLOX to find out how to process the designs.
led.vhd, led.bit, led.sym, and xinput.
symtobsym led.sym
The files led.bsym and
led.bsym.dis will result and may be used during t2 execution to look up signal values in the SPLASH array.
/usr/etc/modstat
and look to see if the SPLASH2 driver is listed as running. If not, you may execute:
/etc/splash2/reload
to load a new one. In order to avoid kicking another user off SPLASH, you should only restart the driver if you are certain one is not running or are certain no-one else is running on SPLASH.
robocop
$SPLASH2/bin/robocop -a
on splash. This will run diagnostics indefinitely so you will have to kill it after a while of watching the results.
t2t2 is an interactive program allowing you to execute your design on SPLASH. The alternative, which will be shown later, is to write a C program to drive SPLASH.
A series of commands, contained in the file cmds.t2 which you may use to drive your
t2 execution is explained below (you run the commands by
executing source cmds.t2 in t2):
t2 that you wish every processor on board 0 in SPLASH to execute the design found in led.bit.
led.raw so that in subsequent runs you may simply execute the command
LoadRaw led.raw rather than doing the association and merging as shown above.
xinput, pump them into the array one data item per clock cycle, and write any valid results that come
out of the array into the file xoutput. In this example,
this will be done 100 times or until the input file is exhausted.
Since I know of no way in t2 to clock the array and write
outputs to an output file, we must pad the end of the
xinput with dummy data values to flush the array.
Otherwise we may see no output.
t2 Executiont2 execution environment:
config.vhd controls the number of processors and SPLASH array configuration for simulation. The t2 commands
Associate, Merge, and ConfigArray perform this function for execution.
StepAscIO is to read a data item from the input file, write it to the SPLASH array, and then single step the clock.
xinput file must contain the VALID tag bit set if the array is to
get valid tag bits.
Also, the output
file may contain data items in addition to the desired ones since the
command StepAscIO writes the values from RBUS to the output file
on every clock cycle .
StepAscIO while collecting
the final results into the output file.
t2 for execution you may write a custom C-based driver program. Although tracing signals during execution is easier in t2, in other ways the custom driver is preferable. For example, the feeding of data into the array, clocking, and monitoring array results is more easily controlled in the custom driver code.
The file drive.c is a sample driver created
for this tutorial example. It was written to exactly mimic the operation of
the t2 commands above. The comments in the code should
explain its operation. A Makefile is also included
to compile the driver code to execute on splash.