OpenCores
URL https://opencores.org/ocsvn/fwrisc/fwrisc/trunk

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32ui/] [rv64ui/] [slt.S] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mballance
# See LICENSE for license details.
2
 
3
#*****************************************************************************
4
# slt.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test slt instruction.
8
#
9
 
10
#include "riscv_test.h"
11
#include "compliance_test.h"
12
#include "compliance_io.h"
13
#include "aw_test_macros.h"
14
 
15
 
16
RVTEST_RV64U
17
RVTEST_CODE_BEGIN
18
 
19
  #-------------------------------------------------------------
20
  # Arithmetic tests
21
  #-------------------------------------------------------------
22
 
23
  TEST_RR_OP( 2,  slt, 0, 0x0000000000000000, 0x0000000000000000 );
24
  TEST_RR_OP( 3,  slt, 0, 0x0000000000000001, 0x0000000000000001 );
25
  TEST_RR_OP( 4,  slt, 1, 0x0000000000000003, 0x0000000000000007 );
26
  TEST_RR_OP( 5,  slt, 0, 0x0000000000000007, 0x0000000000000003 );
27
 
28
  TEST_RR_OP( 6,  slt, 0, 0x0000000000000000, 0xffffffffffff8000 );
29
  TEST_RR_OP( 7,  slt, 1, 0xffffffff80000000, 0x0000000000000000 );
30
  TEST_RR_OP( 8,  slt, 1, 0xffffffff80000000, 0xffffffffffff8000 );
31
 
32
  TEST_RR_OP( 9,  slt, 1, 0x0000000000000000, 0x0000000000007fff );
33
  TEST_RR_OP( 10, slt, 0, 0x000000007fffffff, 0x0000000000000000 );
34
  TEST_RR_OP( 11, slt, 0, 0x000000007fffffff, 0x0000000000007fff );
35
 
36
  TEST_RR_OP( 12, slt, 1, 0xffffffff80000000, 0x0000000000007fff );
37
  TEST_RR_OP( 13, slt, 0, 0x000000007fffffff, 0xffffffffffff8000 );
38
 
39
  TEST_RR_OP( 14, slt, 0, 0x0000000000000000, 0xffffffffffffffff );
40
  TEST_RR_OP( 15, slt, 1, 0xffffffffffffffff, 0x0000000000000001 );
41
  TEST_RR_OP( 16, slt, 0, 0xffffffffffffffff, 0xffffffffffffffff );
42
 
43
  #-------------------------------------------------------------
44
  # Source/Destination tests
45
  #-------------------------------------------------------------
46
 
47
  TEST_RR_SRC1_EQ_DEST( 17, slt, 0, 14, 13 );
48
  TEST_RR_SRC2_EQ_DEST( 18, slt, 1, 11, 13 );
49
  TEST_RR_SRC12_EQ_DEST( 19, slt, 0, 13 );
50
 
51
  #-------------------------------------------------------------
52
  # Bypassing tests
53
  #-------------------------------------------------------------
54
 
55
  TEST_RR_DEST_BYPASS( 20, 0, slt, 1, 11, 13 );
56
  TEST_RR_DEST_BYPASS( 21, 1, slt, 0, 14, 13 );
57
  TEST_RR_DEST_BYPASS( 22, 2, slt, 1, 12, 13 );
58
 
59
  TEST_RR_SRC12_BYPASS( 23, 0, 0, slt, 0, 14, 13 );
60
  TEST_RR_SRC12_BYPASS( 24, 0, 1, slt, 1, 11, 13 );
61
  TEST_RR_SRC12_BYPASS( 25, 0, 2, slt, 0, 15, 13 );
62
  TEST_RR_SRC12_BYPASS( 26, 1, 0, slt, 1, 10, 13 );
63
  TEST_RR_SRC12_BYPASS( 27, 1, 1, slt, 0, 16, 13 );
64
  TEST_RR_SRC12_BYPASS( 28, 2, 0, slt, 1,  9, 13 );
65
 
66
  TEST_RR_SRC21_BYPASS( 29, 0, 0, slt, 0, 17, 13 );
67
  TEST_RR_SRC21_BYPASS( 30, 0, 1, slt, 1,  8, 13 );
68
  TEST_RR_SRC21_BYPASS( 31, 0, 2, slt, 0, 18, 13 );
69
  TEST_RR_SRC21_BYPASS( 32, 1, 0, slt, 1,  7, 13 );
70
  TEST_RR_SRC21_BYPASS( 33, 1, 1, slt, 0, 19, 13 );
71
  TEST_RR_SRC21_BYPASS( 34, 2, 0, slt, 1,  6, 13 );
72
 
73
  TEST_RR_ZEROSRC1( 35, slt, 0, -1 );
74
  TEST_RR_ZEROSRC2( 36, slt, 1, -1 );
75
  TEST_RR_ZEROSRC12( 37, slt, 0 );
76
  TEST_RR_ZERODEST( 38, slt, 16, 30 );
77
 
78
  TEST_PASSFAIL
79
 
80
RVTEST_CODE_END
81
 
82
  .data
83
RV_COMPLIANCE_DATA_BEGIN
84
test_res:
85
    .fill 40, 4, -1
86
RV_COMPLIANCE_DATA_END
87
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.