;;; Memory setup and addressing
;;
- (define (make-core core-size initial-instr . set-functions)
+ (define INITIAL-INSTR (make-instr 'DAT 'F 'immediate 0 'immediate 0))
+
+ (define (make-core core-size . set-functions)
(let ((core-vec (make-vector core-size '()))
(names-vec (make-vector core-size '())))
(define (norm-addr i)
(print))
(let loop ((i 0))
(unless (>= i core-size)
- (vector-set! core-vec i (initial-instr 'make-copy))
+ (vector-set! core-vec i (INITIAL-INSTR 'make-copy))
(loop (+ i 1))))
(lambda args
(match args
(lambda (fname)
(string->prog (with-input-from-file fname read-string)))
files))
- (empty-instr (make-instr 'DAT 'F 'immediate 0 'immediate 0))
(core (if visualization
(let* ((colors '("red" "blue" "green" "magenta" "cyan"))
(color-map (make-color-map progs colors))
(vis (make-vis 640 480 core-size color-map)))
- (make-core 8000 empty-instr (lambda (i n)
- (vis 'update-owner i n))))
- (make-core 8000 empty-instr)))
+ (make-core 8000 (lambda (i n)
+ (vis 'update-owner i n))))
+ (make-core 8000)))
(queues (run-mars core (install-progs core progs) iters)))
(for-each (lambda (q)
(print)