Skip to content

Conversation

@paulusmack
Copy link
Collaborator

The main thing here is optional inclusion of vector/VSX instructions and registers.

Other useful things here include:

  • My sr_bisect script, indispensable for finding out which particular instruction is buggy
  • Ability to include/exclude 64-bit instructions easily
  • Turned on cmprb, cmpeqb, setb, mcrxrx, bpermd so they get tested
  • Added addpcis
  • Include memory contents in the checksum printed
  • Use console.c from the microwatt repo rather than our own potato uart accessors
  • Print total number of instructions executed along with number of timebase ticks

antonblanchard and others added 26 commits May 6, 2020 14:06
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This means we get code for driving the 16550-style UART that microwatt
now has.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This adds the vector and VSX instructions currently implemented by
Microwatt into the mix.  The 128 doublewords of FP/VR/VSRs are added
to the gprs array.  Memory size is expanded to 1024 bytes.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
With this, to get the old non-interactive mode, you need to put
"-o" as the first parameter, like this:

	./simple_random -o file $seed $nr_insns

(actually anything starting with "-" will work as the first parameter).

You can do a single test with

	./simple_random $seed $nr_insns

or multiple tests like this:

	./simple_random $seed $nr_insns $nr_tests

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
FPSCR and VSCR now participate in the final checksum, and are printed
if registers=1.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This speeds up test_many output by flushing stdout in
getchar_unbuffered() rather than putchar_unbuffered().

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This avoids getting the prompt at the start of non-interactive output.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Also make all tests on argc/argv depend on __STDC_HOSTED__.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Also enable a few instructions that were disabled before: extswsli[.],
cmprb, cmpeqb, setb, bpermd; and add mcrxrx and addpcis.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
sr_bisect is an expect script that connects to two Microwatt instances
that are running simple_random and compares their outputs for a range
of seed values.  When a difference is found, it then uses a bisection
search on the number of instructions to find the first instruction
where the results differ.  It then prints the registers from both
instances and the last (up to) 10 instructions generated.

The instances can be invoked by running a command (for instance,
"ssh arty ./simple_random") or connecting to a serial port.  There are
options to set the starting seed, the number of seed values to test,
and the maximum number of instructions (these default to 0, 1000 and
8000 respectively).  If the simple_random instances print FP/VEC/VSX
register contents, then give the '-v' flag to sr_bisect so it knows to
expect them.

An example invocation is:

$ sr_bisect 'ssh arty ./simple_random' /dev/ttyUSB0 -s 1234

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
By including -DVECTOR_INSNS=true on the gcc command line (or not), we
can have vector/VSX instructions generated and vector/VSX registers
initialized, recorded and printed (or not).

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Presumably to get more parallelism.  Changes from July 2022.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants