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

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [lib/] [9x8/] [tb/] [cmp_8bit_uu/] [uc.s] - Diff between revs 2 and 4

Only display areas with differences | Details | Blame | View Log

Rev 2 Rev 4
; Copyright 2013, Sinclair R.F., Inc.
; Copyright 2013, Sinclair R.F., Inc.
; Test bench for ../cmp_8bit_uu.s
; Test bench for ../../cmp_8bit_uu.s
 
 
.include cmp_8bit_uu.s
.include cmp_8bit_uu.s
 
 
.main
.main
 
 
  ; Test all combinations of msbs where the second argument is smaller than the
  ; Test all combinations of msbs where the second argument is smaller than the
  ; first argument.
  ; first argument.
  0x08 0x04 .call(test)
  0x08 0x04 .call(test)
  0x88 0x04 .call(test)
  0x88 0x04 .call(test)
  0x88 0x84 .call(test)
  0x88 0x84 .call(test)
 
 
  ; terminate and wait forever
  ; terminate and wait forever
  .outstrobe(O_TERMINATE) :infinite .jump(infinite)
  .outstrobe(O_TERMINATE) :infinite .jump(infinite)
 
 
; Test all combinations of the 8-bit comparison operations against the two
; Test all combinations of the 8-bit comparison operations against the two
; provided values.
; provided values.
; ( u_larger u_smaller - )
; ( u_larger u_smaller - )
.function test
.function test
 
 
  over over      .call(cmp_8bit_uu_eq) .outport(O_VALUE) ;  0
  over over      .call(cmp_8bit_uu_eq) .outport(O_VALUE) ;  0
  over over swap .call(cmp_8bit_uu_eq) .outport(O_VALUE) ;  0
  over over swap .call(cmp_8bit_uu_eq) .outport(O_VALUE) ;  0
  over dup       .call(cmp_8bit_uu_eq) .outport(O_VALUE) ; -1
  over dup       .call(cmp_8bit_uu_eq) .outport(O_VALUE) ; -1
 
 
  over over      .call(cmp_8bit_uu_ne) .outport(O_VALUE) ; -1
  over over      .call(cmp_8bit_uu_ne) .outport(O_VALUE) ; -1
  over over swap .call(cmp_8bit_uu_ne) .outport(O_VALUE) ; -1
  over over swap .call(cmp_8bit_uu_ne) .outport(O_VALUE) ; -1
  over dup       .call(cmp_8bit_uu_ne) .outport(O_VALUE) ;  0
  over dup       .call(cmp_8bit_uu_ne) .outport(O_VALUE) ;  0
 
 
  over over      .call(cmp_8bit_uu_lt) .outport(O_VALUE) ;  0
  over over      .call(cmp_8bit_uu_lt) .outport(O_VALUE) ;  0
  over over swap .call(cmp_8bit_uu_lt) .outport(O_VALUE) ; -1
  over over swap .call(cmp_8bit_uu_lt) .outport(O_VALUE) ; -1
  over dup       .call(cmp_8bit_uu_lt) .outport(O_VALUE) ;  0
  over dup       .call(cmp_8bit_uu_lt) .outport(O_VALUE) ;  0
 
 
  over over      .call(cmp_8bit_uu_ge) .outport(O_VALUE) ; -1
  over over      .call(cmp_8bit_uu_ge) .outport(O_VALUE) ; -1
  over over swap .call(cmp_8bit_uu_ge) .outport(O_VALUE) ;  0
  over over swap .call(cmp_8bit_uu_ge) .outport(O_VALUE) ;  0
  over dup       .call(cmp_8bit_uu_ge) .outport(O_VALUE) ; -1
  over dup       .call(cmp_8bit_uu_ge) .outport(O_VALUE) ; -1
 
 
  over over      .call(cmp_8bit_uu_le) .outport(O_VALUE) ;  0
  over over      .call(cmp_8bit_uu_le) .outport(O_VALUE) ;  0
  over over swap .call(cmp_8bit_uu_le) .outport(O_VALUE) ; -1
  over over swap .call(cmp_8bit_uu_le) .outport(O_VALUE) ; -1
  over dup       .call(cmp_8bit_uu_le) .outport(O_VALUE) ; -1
  over dup       .call(cmp_8bit_uu_le) .outport(O_VALUE) ; -1
 
 
  over over      .call(cmp_8bit_uu_gt) .outport(O_VALUE) ; -1
  over over      .call(cmp_8bit_uu_gt) .outport(O_VALUE) ; -1
  over over swap .call(cmp_8bit_uu_gt) .outport(O_VALUE) ;  0
  over over swap .call(cmp_8bit_uu_gt) .outport(O_VALUE) ;  0
  over dup       .call(cmp_8bit_uu_gt) .outport(O_VALUE) ;  0
  over dup       .call(cmp_8bit_uu_gt) .outport(O_VALUE) ;  0
 
 
  over over      .call(min_u8)         .outport(O_VALUE)
  over over      .call(min_u8)         .outport(O_VALUE)
  over over swap .call(min_u8)         .outport(O_VALUE)
  over over swap .call(min_u8)         .outport(O_VALUE)
  over dup       .call(min_u8)         .outport(O_VALUE)
  over dup       .call(min_u8)         .outport(O_VALUE)
 
 
  drop .return(drop)
  drop .return(drop)
 
 

powered by: WebSVN 2.1.0

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