243 lines
8.8 KiB
Plaintext
243 lines
8.8 KiB
Plaintext
PCK_FIO.out: TESTBENCH OUTPUT FOR PCK_FIO
|
|
-----------------------------------------
|
|
|
|
This is the result of running the PCK_FIO testbench.
|
|
This file should be compared with PCK_FIO.out.gold, which is
|
|
the reference output. Any difference indicates a portability
|
|
issue or a simulator non-compliance or bug.
|
|
|
|
|
|
--------------------
|
|
-- Basic features --
|
|
--------------------
|
|
|
|
-- First some auxiliary declarations
|
|
> file RESULT: text is out "PCK_FIO.out";
|
|
> variable L: line;
|
|
> variable BoolTrue: boolean := TRUE;
|
|
> variable BoolFalse: boolean := FALSE;
|
|
> variable IntPos: integer := 5678;
|
|
> variable BigIntPos: integer := 12345678;
|
|
> variable IntNeg: integer := -8765;
|
|
> variable BigIntNeg: integer := -87654321;
|
|
> variable Uns: unsigned(6 downto 0) := unsigned'("1010010");
|
|
> variable Unk: unsigned(6 downto 0) := unsigned'("1X10Z10");
|
|
> variable Std: std_logic_vector(6 downto 0) := std_logic_vector'("0010010");
|
|
> variable SigPos: signed(6 downto 0) := signed'("0010010");
|
|
> variable SigNeg: signed(6 downto 0) := signed'("1010010");
|
|
> variable BitX: std_logic := 'X';
|
|
> variable Bit1: std_logic := '1';
|
|
> variable Bit0: std_logic := '0';
|
|
> constant TempString: string := "ABC" & NUL & "DEF";
|
|
|
|
|
|
-- fprint call with no arguments
|
|
> fprint(RESULT, L, "No arguments.\n");
|
|
No arguments.
|
|
|
|
-- Special characters need to be escaped
|
|
> fprint(RESULT, L, "Special characters: \% \\ " \n");
|
|
Special characters: % \ "
|
|
|
|
-- Various format specifiers interprete the same object differently
|
|
> fprint(RESULT, L, "Format specifiers: %r %d %b %q\n",
|
|
> fo(Uns), fo(Uns), fo(Uns), fo(Uns)
|
|
> );
|
|
Format specifiers: 0x52 82 1010010 U:1010010
|
|
|
|
-- Format string can be shortened by using the iteration specifier
|
|
> fprint(RESULT, L, "Iteration specifier: %4{%r }\n",
|
|
> fo(Uns), fo(SigPos), fo(SigNeg), fo(Std)
|
|
> );
|
|
Iteration specifier: 0x52 0x12 0x52 0x12
|
|
|
|
-------------------------------
|
|
--Testing string manipulation--
|
|
-------------------------------
|
|
--testing done using the string TempString : "ABC" & NUL & "DEF"
|
|
|
|
--test for NUL ending in strings
|
|
> fprint(RESULT, L, fo(TempString));
|
|
ABC
|
|
--same without fo,so without NUL testing
|
|
> fprint(RESULT, L, TempString);
|
|
ABC |