Quick links: usage summary, usage details, example
Location: ./noc/bendime (program) and ./noc/vidime (sources)
Syntax: bendime [-b bitfile] (-[w|r] <memtrans>)* [-v][-R][-t <sec>][-s]
bendime.exe does one or more of the following things:
Table 1: Components of <memtrans> and their meanings.
|<mem>||Value used for the memory select word (see table 2) to specify the memory to read from or write to.|
|<startaddr_mem>||Address of the first byte in the memory selected by <mem> where reading/writing should begin.|
|<size>||Number of words to read or write (a word is 4 bytes in the current implementation).|
|<file>||The input of output file, e.g. mips_rom.x0y0.bin.|
|<startaddr_file>||The address of the first byte in <file> where reading/writing should begin. A value of -1 means that the file should be emptied first if it exists.|
Table 2: Memory select word usage for a 2x2 network
|Bit (<mem> value)||memory (without cache)||memory (with cache)|
|0 (1)||instructions of dp_x0y0||not used|
|1 (2)||data of dp_x0y0||local instruction/data memory of dp_x0y0|
|2 (4)||instructions of dp_x1y0||not used|
|3 (8)||data of dp_x1y0||local instruction/data memory of dp_x1y0|
|4 (16)||instructions of dp_x0y1||not used|
|5 (32)||data of dp_x0y1||local instruction/data memory of dp_x0y1|
|6 (64)||instructions of dp_x1y1||not used|
|7 (128)||data of dp_x1y1||local instruction/data memory of dp_x1y1|
If -v is specified then each write transfer is verified with a read back transfer.
The option -R prevents an initial reset and clock setup and -s skips blocks of more than 4 zero-words when writing. See the NOC system architecture for more information about communication between the User FPGA and a PC. The remainder of this section gives the usage details of bendime.exe and an example.
bendime.exe is a compiled C program that uses the C API to communicate from a PC with the Nallatech FUSE software which comes with the development board. The User FPGA contains two modules, Comm.Core and BENIF_NET_WRAPPER, to support this interface. bendime.exe performs the following operations:
Note that all the write transfers are performed before the processors are enabled, and all the read transfers are performed after all processors are stopped.
The following call:
bendime.exe -b bennoc.bit -w 1 0 80 mem.x0y0.bin 0 -w 2 0 16 mem.x0y0.bin 4096 -w 4 0 80 mem.x1y0.bin 0 -w 8 0 16 mem.x1y0.bin 4096 -v -r 2 0 32 ram.x0y0.dump -1 -r 8 0 32 ram.x1y0.dump -1
will program the User FPGA with the bitfile bennoc.bit.
Then it will transfer 80 words starting at position 0 in file mem.x0y0.bin to
the address 0 of the memory selected by memory-select-word 1
(i.e. memory #0 - instruction memory of processor x0y0, see table 2).
Then it will transfer 16 words starting at position 4096 in file mem.x0y0.bin to
the address 0 of the data memory of processor x0y0 (memory #1,
select-word binary b10 = 2);
80 words from position 0 of mem.x1y0.bin to instruction memory of
processor x1y0; and finally 16 words from position 4096 of
mem.x1y0.bin to the data memory of processor x1y0.
All the write transfers will be verified by reading back the
written data (-v switch).
After the transfers, the processors will run until the user presses any key. Then, the current contest of the data memories of processors x0y0 and x1y0 (memories 1 and 3, i.e. memory-select-words 2 and 8) will be stored in files ram.x0y0.dump and ram.x1y0.dump, respectively (in fact, the first 32 words of both memories will be read). The -1 used as offset parameter of the read transfer indicates that the target dump file, if it exists, should be truncated before the memory block is stored in it.
Other examples are in the batch files bennoc.bat and benapp.bat in ./noc/bendime.