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

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [lib/] [9x8/] [tb/] [cmp_8bit_uu/] [uc.s] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sinclairrf
; Copyright 2013, Sinclair R.F., Inc.
2 4 sinclairrf
; Test bench for ../../cmp_8bit_uu.s
3 2 sinclairrf
 
4
.include cmp_8bit_uu.s
5
 
6
.main
7
 
8
  ; Test all combinations of msbs where the second argument is smaller than the
9
  ; first argument.
10
  0x08 0x04 .call(test)
11
  0x88 0x04 .call(test)
12
  0x88 0x84 .call(test)
13
 
14
  ; terminate and wait forever
15
  .outstrobe(O_TERMINATE) :infinite .jump(infinite)
16
 
17
; Test all combinations of the 8-bit comparison operations against the two
18
; provided values.
19
; ( u_larger u_smaller - )
20
.function test
21
 
22
  over over      .call(cmp_8bit_uu_eq) .outport(O_VALUE) ;  0
23
  over over swap .call(cmp_8bit_uu_eq) .outport(O_VALUE) ;  0
24
  over dup       .call(cmp_8bit_uu_eq) .outport(O_VALUE) ; -1
25
 
26
  over over      .call(cmp_8bit_uu_ne) .outport(O_VALUE) ; -1
27
  over over swap .call(cmp_8bit_uu_ne) .outport(O_VALUE) ; -1
28
  over dup       .call(cmp_8bit_uu_ne) .outport(O_VALUE) ;  0
29
 
30
  over over      .call(cmp_8bit_uu_lt) .outport(O_VALUE) ;  0
31
  over over swap .call(cmp_8bit_uu_lt) .outport(O_VALUE) ; -1
32
  over dup       .call(cmp_8bit_uu_lt) .outport(O_VALUE) ;  0
33
 
34
  over over      .call(cmp_8bit_uu_ge) .outport(O_VALUE) ; -1
35
  over over swap .call(cmp_8bit_uu_ge) .outport(O_VALUE) ;  0
36
  over dup       .call(cmp_8bit_uu_ge) .outport(O_VALUE) ; -1
37
 
38
  over over      .call(cmp_8bit_uu_le) .outport(O_VALUE) ;  0
39
  over over swap .call(cmp_8bit_uu_le) .outport(O_VALUE) ; -1
40
  over dup       .call(cmp_8bit_uu_le) .outport(O_VALUE) ; -1
41
 
42
  over over      .call(cmp_8bit_uu_gt) .outport(O_VALUE) ; -1
43
  over over swap .call(cmp_8bit_uu_gt) .outport(O_VALUE) ;  0
44
  over dup       .call(cmp_8bit_uu_gt) .outport(O_VALUE) ;  0
45
 
46
  over over      .call(min_u8)         .outport(O_VALUE)
47
  over over swap .call(min_u8)         .outport(O_VALUE)
48
  over dup       .call(min_u8)         .outport(O_VALUE)
49
 
50
  drop .return(drop)

powered by: WebSVN 2.1.0

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