5.5.2. Command syntax

The filename of the stimulus data file is specified using a parameter Verilog, at the point of instantiation in the HDL code.

The syntax uses a single letter for each command followed by a number of fields.

Command syntax

Table 5.7 lists the stimulus command syntax.

Table 5.7. Stimulus command syntax

CmdFields        
WAddressData [Size][Burst][Prot][Lock][Resp][Comment]
RAddressData[Mask][Size][Burst][Prot][Lock][Resp][Comment]
S Data[Mask]    [Resp][Comment]
B       [Wait][Comment]
I[Address][Dir] [Size][Burst][Prot][Lock][Wait][Comment]
PAddressData[Mask][Size][Burst][Prot][Timeout] [Comment]
LNumber       [Comment]
CMessage       [Comment]
Q        [Comment]

Note

Items in brackets [] are optional. See Table 5.8 for default values.

The commands are:

W

The write command starts a write burst and can be followed by one or more S vectors. The number of S vectors is set by the size and burst fields for fixed length bursts. There is no limit to the number of S vectors for undefined length bursts, as long as it does not cause the address to cross a 1k boundary.

R

The read command starts a read burst and can be followed by one or more S vectors. The number of S vectors is set by the size and burst fields for fixed length bursts. There is no limit to the number of S vectors for undefined length bursts, as long as it does not cause the address to cross a 1k boundary.

S

The sequential vector provides data for a single beat in the burst. The file reader calculates the address required.

B

The busy command inserts either a BUSY cycle or a BUSY transfer mid burst, depending on the value of the Wait field. An INCR burst can have a busy after its last transfer, while the master determines whether it has another transfer to complete. It is not valid to have a busy command when a burst is not in progress.

I

The Idle command performs either an IDLE cycle or an IDLE transfer, depending on the value of the Wait field. The options enable you to set up the control information during the idle transfer, and to specify if the transfer is locked or unlocked.

P

Poll command performs a read transfer that repeats until the data matches the required value. If it repeats this Number times and the value is not read, then an error is reported. Either omitting TimeOut or setting to value zero causes the Poll to repeat continually until the data matches the required value. The poll vector can only be used for INCR or SINGLE burst types and for aligned addresses.

L

Loop command repeats the last command a number of times. An L command must only follow a W or R when the burst type is INCR or SINGLE.

C

The comment command C sends a message to the simulation window.

Q

The quit command Q causes the simulation to terminate immediately. Additionally, the quit command gives a summary of the number of commands and errors.

Table 5.8 shows the stimulus command fields.

Table 5.8. Command fields

FieldDefaultValuesPrefixDescription
Address0x0000000032-bit hex value0x (optional)First address of burst.
Data-8, 16, 32, or 64-bit hex value0x (optional)Data field for read, write, sequential, and poll commands. The width of the Data field must match either the specified transfer size or the bus width of the FRM.
Mask0xFF for each active byte lane as determined by Address and Size, and 0x00 for inactive byte lanes, or 0xFFFFFFFF if adk1 switch is set8, 16, 32, or 64-bit hex value0x (optional)Bit mask. Enables masking of read data when testing against required data. You must write the Mask and Data fields as the same size. They must match either the specified transfer size or the bus width of the FRM.
Sizeword or doubleword depending on user-defined -buswidth switchb | byte | size8 | h | hword | size16 | w | word | size32 | d | dword | size64-Data size for read, write, sequential, and poll commands.
Burstincrsing | single | incr | incr4 | wrap4 | incr8 | wrap8 | incr16 | wrap16-Burst type for read, write, and idle transfer commands. For poll commands, the only permitted values for Burst are sing, single, or incr.
Prot00004-bit binaryp | PIndicates the HPROT value for the transfer.
Locknolocknolock | lock-Transfers lock.
     
Respokayokay | ok | errcanc | errcanc-

When errcont is specified:[1]

  • If an ERROR response occurs, no warning is generated. A burst in progress continues.

  • If no ERROR response occurs, a warning is generated. A burst in progress continues.

When errcanc is specified:

  • If an ERROR response occurs, no warning is generated. A burst in progress is cancelled.[2]

  • If no ERROR response occurs, a warning is generated. A burst in progress continues.

Dirreadread | write-Controls the value of HWRITE during an idle command.
Number-Decimal value from 1-(2^32-1)-Loops repeat value.
Timeout0Decimal value from 0-(2^32-1)t | TNumber of times the poll command repeats data check before generating an error when data does not match expected value. Specifying 0 repeats continuously.
Waitnowaitwait | nowait-Waits for HREADY before continuing. Makes an IDLE or BUSY cycle.
Message-1 to 80 characters and symbols. See Table 5.9 for supported characters.comment contained within double quotesSends a user-defined comment to the simulation window.
Comment Delimiter-; | # | // | ---All common comment delimiters are valid.

[1] The value err or error can be used as a synonym for errcont for compatibility with legacy BFM versions but is not recommended for use in new development.

[2] An IDLE transfer is always inserted in the last cycle of the ERROR response if the burst is cancelled. No attempt is made to retransmit the erroneous transfer. The stimulus file does not have to contain the remaining transfers of the burst.

Table 5.9 lists the keyboard characters that are supported by the comment command. Any other characters are replaced with a - (dash) by the script.

Table 5.9. Characters supported by comment command

Character

Symbol

a-z (lower case)

!

$

%

^

&

*

(

)

A-Z (upper case)

_

-

+

=

{

}

[

]

0-9

:

;

@

'~

#

<

>

(white space)

,

.

?

/

|

Copyright © 2003, 2007 ARM Limited. All rights reserved.ARM DDI 0243C
Non-Confidential