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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [fp/] [implementation/] [mmix/] [permu-langdon.mms] - Blame information for rev 320

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 hellwig
* Permutation generator a la Langdon
2
N  IS   6               $n$ (2, 3, ..., 15)
3
t  IS   $255
4
k  IS   $0
5
kk IS   $1
6
c  IS   $2
7
d  IS   $3
8
a  GREG 0
9
ones GREG #1111111111111111&(1<<(4*N)-1)
10
 
11
     LOC  #100
12
     GREG @
13
ElGordo OCTA #fedcba9876543210&(1<<(4*N)-1)
14
Main LDOU a,ElGordo         $a\gets\.{\#...3210}$.
15
     JMP  2F
16
1H   SRU  a,a,4*(16-N)
17
     OR   a,a,t
18
 
19
2H   ADDU c,a,ones    Trace this location to see the perm!
20
 
21
     SRU  t,a,4*(N-1)
22
     SLU  a,a,4*(17-N)
23
     PBNZ t,1B
24
     SET  k,1
25
3H   SRU  d,a,60
26
     SLU  a,a,4
27
     CMP  c,d,k
28
     SLU  kk,k,2
29
     SLU  d,d,kk
30
     OR   t,t,d
31
     PBNZ c,1B
32
     INCL k,1
33
     PBNZ a,3B
34
     TRAP 0,Halt,0
35
 

powered by: WebSVN 2.1.0

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