URL
https://opencores.org/ocsvn/vhld_tb/vhld_tb/trunk
Subversion Repositories vhld_tb
[/] [vhld_tb/] [trunk/] [examples/] [packet_gen/] [vhdl/] [packet_gen_users.txt.txt] - Rev 19
Compare with Previous | Blame | View Log
This file contains the users interface instructions for the packet generator BFM.
To trigger the generation of a new packet on the packet_out interface, a rising edge
must be applied to the request input pin. The output ready is indicated by the
packet_out.drdy output pin going high. The BMF must also be configured to be enabled.
The stimulus access port address mapping is presented below:
---
Name Address Bit(s) Description
Control Register 0 0 Enable
1 Open file trigger, Write a '1'
to this bit to trigger file open
This bit is self clearing.
31 - 2 Don't care
Configuration 1 3-0 Data coding mode
Register 0000 Incrementing
0001 Random
0010 Load from file
0011 User Data
31 - 4 Don't care
Error Register 2 Read only definition of error indications
Seed Register 3 31-0 Seed value for random number
generation
addressed location.
The fname, stm_text type, input enables the definition of a file name to be dynamic.
Set the file name, stm_text input, to the file you wish to open for loading data
from. Then write the open file trigger bit to open the file. Any previouslly
opened files will be closed first, so you do not have to worry about that. Once
a file is opened, it will be read from until there is no more lines to read, or,
the output packet size has been met. The next request will have the file being
loaded from where it left off on the last load. This enables many packets to be
placed in one file, and loaded request to request without having to deal with file
details.
To set the user data, write the desired packet to the User Data Memory before the
request for data. Configure generation to be User Data.
The generic on the BFM enables a particular BMF to be identified if there are
more than one of this type in an environment.