Xilinx UG129 Answering Machine User Manual


 
78 www.xilinx.com PicoBlaze 8-bit Embedded Microcontroller
UG129 (v1.1.2) June 24, 2008
Chapter 11: Assembler Directives
R
specifies a text file that records the result of any output operations to this during
instruction set simulation. Figure 11-5 provides an example.
The values recorded in the optional output file are always written as hexadecimal values.
During instruction set simulation, pBlazIDE displays the write-only output port as shown
in Figure 11-6. Output ports are write-only and cannot be modified from the graphical
interface.
The DSOUT directive is also useful to create stimulus files later read using DSIN directives
in another pBlazIDE application program. For example, to create a stimulus input file
containing incrementing data values, create a quick pBlazIDE program that increments a
value and writes the value to an output port declared using a DSOUT directive, complete
with file specification. Once the program completes, this resulting file can be read by
another pBlazIDE program during instruction set simulation using the DSIN directive.
Input/Output Ports
The DSIO directive defines the name and the port address (or port identification number)
for an output port. However, the DSIO directive differs from the DSOUT directive in that
the PicoBlaze microcontroller can also read DSIO output values. The DSIO directive
models an output port that connects to both the PicoBlaze microcontroller’s IN_PORT and
OUT_PORT ports and has the same port address for input and output operations. An
optional field specifies a text file that records the result of any output operations to this
during instruction set simulation. Figure 11-7 provides an example.
The values recorded in the optional output file are always written as hexadecimal values.
Figure 11-5: Example of pBlazIDE DSOUT Directive
Figure 11-6: The pBlazIDE DSOUT Directive Defines an Output Port
; pBlazIDE syntax to define a write-only output port
; output_port_name DSOUT <port_id#>[, “<output_file_name>”]
;
LEDs DSOUT $01, “output_values.txt”
writeport DSOUT $1E
Figure 11-7: Example of pBlazIDE DSIO Directive
; pBlazIDE syntax to define a readable output port
; input_output_port_name DSIO <port_id#>[“<output_file_name>”]
mailbox DSIO $02, “mailbox_out.txt”
readwrite DSIO $1D