summaryrefslogblamecommitdiff
path: root/sched/test/ram.mj
blob: 5bd4f2949fbffa639401b774ff01d28af2487e6d (plain) (tree)
1
2
3
4
5
6
7
8






                                    
                                                  






                                                           
const addr = 2
const word = 4

or_n<n>(a:[n],b:[n]) = (o:[n]) where
  if n = 0 then
    o = []
  else
    o = (a[0] or b[0]).(or_n<n-1>(a[1..], b[1..]))
  end if
end where

main(ra:[addr], we, wa:[addr], c:[word]) = (o:[word]) where
  o = ram<addr, word>(ra, we, wa, or_n<word>(o, c))
end where