id
int64
0
45.1k
file_name
stringlengths
4
68
file_path
stringlengths
14
193
content
stringlengths
32
9.62M
size
int64
32
9.62M
language
stringclasses
1 value
extension
stringclasses
6 values
total_lines
int64
1
136k
avg_line_length
float64
3
903k
max_line_length
int64
3
4.51M
alphanum_fraction
float64
0
1
repo_name
stringclasses
779 values
repo_stars
int64
0
882
repo_forks
int64
0
108
repo_open_issues
int64
0
90
repo_license
stringclasses
8 values
repo_extraction_date
stringclasses
146 values
sha
stringlengths
64
64
__index_level_0__
int64
0
45.1k
exdup_ids_cmlisp_stkv2
sequencelengths
1
47
27,030
lexer.lisp
zeller_cl-simpledb/lexer.lisp
(in-package :simpledb) ;; lex an input-stream to symbols for use in the parser (defun maybe-unread (char stream) (when char (unread-char char stream))) (defun intern-id (string) (let ((*package* '#.*package*)) (read-from-string string))) (defun read-id (stream) (let ((v '())) (loop (let ((c (read-char stream nil nil))) (when (or (null c) (not (or (digit-char-p c) (alpha-char-p c) (eql c #\_)))) (maybe-unread c stream) (when (null v) (lexer-error c)) (return-from read-id (intern-id (coerce (nreverse v) 'string)))) (push c v))))) (defun read-string (stream) (let ((v '())) (loop (let ((c (read-char stream nil nil))) (if (eql c #\") (when (not (null v)) (return-from read-string (coerce (nreverse v) 'string))) (if (null c) (lexer-error c) (push c v))))))) (defun read-operator (stream) (let ((v '())) (let ((c (read-char stream nil nil))) (cond ((member c '(#\< #\>)) (push c v) (let ((c (read-char stream nil nil))) (if (char= c #\=) (push c v) (maybe-unread c stream)))) ((member c '(#\=)) (push c v)))) (return-from read-operator (intern-id (coerce (nreverse v) 'string))))) (defun read-number (stream) (let ((v nil)) (loop (let ((c (read-char stream nil nil))) (when (or (null c) (not (digit-char-p c))) (maybe-unread c stream) (when (null v) (lexer-error c)) (return-from read-number v)) (setf v (+ (* (or v 0) 10) (- (char-code c) (char-code #\0)))))))) ;; read standard-input into a list of symbols ;; pass back the symbols or nil if quitting (defun lexer (&optional (stream *standard-input*)) (loop (let ((c (read-char stream nil nil))) (cond ((member c '(#\Space #\Tab))) ((member c '(nil #\Newline)) (return-from lexer c)) ((member c '(#\, #\. #\; #\( #\) #\*)) (return-from lexer c)) ((member c '(#\< #\> #\=)) (unread-char c stream) (return-from lexer (read-operator stream))) ((digit-char-p c) (unread-char c stream) (return-from lexer (read-number stream))) ((char= c #\") (unread-char c stream) (return-from lexer (read-string stream))) ((alpha-char-p c) (unread-char c stream) (return-from lexer (read-id stream))) (t nil))))) (defun lex (&optional (newlines? nil)) (let ((e '())) (loop (let ((symbol (lexer))) (when (or (null symbol) (and (not newlines?) (eq #\Newline symbol))) (return-from lex (nreverse e))) (when (not (eq #\Newline symbol)) (push symbol e))))))
2,908
Common Lisp
.lisp
83
26.566265
76
0.506392
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
8b2674663deaec7ae6946e7130eb366a0318828dd84a8b5ce312b2f790d73518
27,030
[ -1 ]
27,031
package.lisp
zeller_cl-simpledb/package.lisp
;; package.lisp -- ;; Copyright (C) 2010 Michael Zeller ;; ;; This file is part of simpledb. ;; ;; simpledb is free software; you can redistribute it and/or modify it ;; under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; simpledb is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this software; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, ;; Boston, MA 02111-1307 USA (defpackage :simpledb (:use :cl)) (defpackage :simpledb-user (:use :cl :simpledb))
899
Common Lisp
.lisp
21
41.333333
70
0.753723
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
7798870c4b0440a10df6312fcdc50a1adfd2bcb1d03657880d7d1fd0e497dbbb
27,031
[ -1 ]
27,032
catalog.lisp
zeller_cl-simpledb/catalog.lisp
(in-package :simpledb) ;;** catalog ;; table-info keeps track of the table name and the column names, ;; which are stored in the catalog ;; note: not currently used yet (defclass table-info () ((table-name :initarg :table-name :accessor table-name) (column-names :initarg :column-names :accessor column-names))) ;; catalog stores the information about tables via a mapping to a table-number (defclass catalog () ((table-file :initform (make-hash-table) :accessor table-file) (table-indexes :initform (make-hash-table) :accessor table-indexes) (table-info :initform (make-hash-table) :accessor table-info) (table-numbers :initform (make-hash-table) :accessor table-numbers))) (defun clear-catalog () (setf *catalog* (make-instance 'catalog))) ;; file methods (defgeneric catalog-add-file (table-number file) (:documentation "Addes a file to the catalog and maps it to a table.")) (defun catalog-lookup-file (table-number) (gethash table-number (table-file *catalog*))) (defmethod catalog-add-file (table-number (file file)) (setf (gethash table-number (table-file *catalog*)) file)) (defun catalog-lookup-table-number (table-name) (write-debug "Looking up ~S in table-numbers~%" table-name) (let ((table-number (gethash table-name (table-numbers *catalog*)))) (if (null table-number) (error 'table-does-not-exist-error :name table-name) table-number))) ;; info methods (defgeneric catalog-add-info (table-number info) (:documentation "Adds information about a file to the catalog.")) (defun catalog-lookup-info (table-number) (gethash table-number (table-info *catalog*))) (defmethod catalog-add-info (table-number (info table-info)) (setf (gethash table-number (table-info *catalog*)) info) (setf (gethash (table-name info) (table-numbers *catalog*)) table-number)) ;; indexing methods (defgeneric catalog-add-index (table-number index) (:documentation "Adds an index to the catalog and maps it to a table.")) ;; @todo return a list of available indexes (defun catalog-lookup-index (table-number) (gethash table-number (table-indexes *catalog*))) ;; @todo allow more than one index on a table and key-field (defmethod catalog-add-index (table-number (index index)) (setf (gethash table-number (table-indexes *catalog*)) index)) (defvar *catalog* (make-instance 'catalog) "Catalog of information about the database")
2,401
Common Lisp
.lisp
48
47.25
78
0.742392
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
4329359ee43944c4ba51d6acdf5fcf06bfede077226d006aceb1d51c3be8646a
27,032
[ -1 ]
27,033
utils.lisp
zeller_cl-simpledb/utils.lisp
(in-package :simpledb) ;;** some helper functions (defmacro write-debug (&rest args) (if t ;; set to t or nil to toggle debugging information output `(format t ,@args))) ;;** some utility methods (defun parse-csv-file (file-name type-descriptor) (write-debug "Parsing CSV file.~%") (with-open-file (f file-name) (loop for line = (read-line f nil) while line collecting (mapcar #'(lambda (string-data type) (case type ('int (parse-integer string-data)) ('string string-data) (otherwise nil))) (cl-ppcre:split "," line) type-descriptor)))) (defun heap-file-encoder (input-file-name output-file-name type-descriptor) (write-debug "Encoding heap file.~%") (let ((heap-file (make-instance 'heap-file :file-name output-file-name :type-descriptor type-descriptor :new? t)) (tuples (parse-csv-file input-file-name type-descriptor))) (write-debug "Parsed tuples: ~S~%" tuples) (loop for tuple in tuples do (add-tuple heap-file tuple)) (write-debug "Clearing the bufferpool.~%") (clear-bufferpool) ;; flushes all pages to disk heap-file)) (defun change-file-type (input-file-name file-type) (let ((input-dir-name-end (position #\/ input-file-name :from-end t)) (input-file-name-end (position #\. input-file-name :from-end t :test #'char=))) (when input-dir-name-end (let ((input-dir (subseq input-file-name 0 input-dir-name-end)) (input-file (string-upcase (subseq input-file-name (+ input-dir-name-end 1))))) (setf input-file-name (format nil "~a/~a" input-dir input-file)))) (concatenate 'string (subseq input-file-name 0 input-file-name-end) file-type))) (defun parse-type-descriptor (type-descriptor-string) (map 'list #'(lambda (type) (cond ((string= "int" type) 'int) ((string= "string" type) 'string) (t nil))) (cl-ppcre:split "," type-descriptor-string))) (defun reorder (list-of-items order) (if order (mapcar #'(lambda (pos) (nth pos list-of-items)) order) list-of-items)) (defun flatten (l) (cond ((null l) nil) ((atom l) (list l)) (t (append (flatten (car l)) (flatten (cdr l))))))
2,452
Common Lisp
.lisp
59
32.627119
91
0.587075
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
82c4d77c2f347dd48a93acc537cf161a822b3d6d9abc1252844a207cd19ad6f5
27,033
[ -1 ]
27,034
simpledb.lisp
zeller_cl-simpledb/simpledb.lisp
#| exec sbcl --noinform --load $0 --end-toplevel-options "$@" |# ;; -*- mode: lisp; mode: outline-minor; -*- ;; Copyright (C) 2010 Michael Zeller ;;* Commentary ;; ;; This file implements a simple database that is influenced by the SimpleDB project @ MIT ;; ;;* Tasks ;; - Add unit tests ;; - Support aliases in SELECT ;; - Keep tuples sorted on page (only tiny overhead when ;; inserting/deleting) ;; - Fix table ids, currently they are not completely unique (based on ;; filename) ;; - Support WHERE clauses using the filter ;; - Push projections deeper once a query optimizer is implemented. ;; - Need to look at index-files, made some breaking changes. For ;; instance, a cursor is needed for searching a index instead of the ;; previous callback method. The initialize-instance for index-file ;; also requires the record-id of the tuple from the cursor, which ;; is not currently supported. See cursor.lisp:filter and ;; file.lisp:index-file ;; - Create a reader for getting the table-number for a file from the ;; file-name, this should encapsulate sxhash, and I can easily try ;; my idea below. ;; - Allow multiple indexes per table, need to iterate over a list of ;; indexes in add-tuple-to-page and delete-tuple-from-page. ;; - There is the issue of DUPLICATES, and how they should best be ;; handled. Currently duplicates are removed together, since there ;; is no way to distinguish between the two. Similarly, all code ;; below assumes that if a tuple is being requested to be deleted ;; from an index, then all tuples with that key in the heap-file ;; have been deleted (which could not be the case if (200 1) (200 2) ;; are entries, and (200 1) is deleted and the key-field is 0). The ;; only way around this is to automatically make a unique field and ;; store this for all tuples, or to use slot numbers. The unique ;; field idea is probably the best option. ;; - Add update-tuple, and update indexes if the page-number changes ;; for a tuple (hopefully this is rare) ;; - INT type needs to write arbitrary number of bytes, since Lisp can ;; store arbitrary precision numbers. Currently the max INT is set ;; as a parameter. ;;* Ideas ;; - Can I remove sxhash and just hash the file object itself? ;; Wouldn't that make more sense record-id would then contain a ;; pointer to the heap-file itself and no need for a catalog (except ;; for looking up the names and column names of tables) ;;* Code (in-package :simpledb) (export '(simpledb)) (defparameter *usage-string* " usage: simpledb convert <input-file-name> <type-descriptor> simpledb parser <schema-file-name> convert ------- <input-file-name> - Pathname of CSV file containing data, prefix of filename will be used as tablename <type-descriptor> - Comma seperated list of column types parser ------ <schema-file-name> - Pathname of file containing information about tables examples -------- simpledb convert data/first.txt int,string simpledb convert data/last.txt string,int simpledb parser data/schema.txt ") (defun convert (input-file-name output-file-name index-file-name type-descriptor) ;; create a heap-file on disk from <input-file-name> in <output-file-name> (heap-file-encoder input-file-name output-file-name type-descriptor) ;; reread the heap-file from disk, create index-file from heap-file (write-debug "Reading heap file from disk.~%") (let ((heap-file (make-instance 'heap-file :file-name output-file-name :type-descriptor type-descriptor))) ;; print the contents of the file (write-debug "Printing heap file.~%") (print-file heap-file) (write-debug "Building index file.~%") (make-instance 'index-file :file-name index-file-name :source-file heap-file :key-field 0 :new? t) ;; force index-file to disk (clear-bufferpool))) (define-condition table-does-not-exist-error (error) ((name :initarg :name :reader name))) (define-condition field-does-not-exist-error (error) ((name :initarg :name :reader name))) (define-condition unsupported-feature-error (error) ((name :initarg :name :reader name))) (define-condition ambiguous-field-error (error) ((name :initarg :name :reader name))) (defun parser (schema-file-name) ;; 1. parse schema file and read tables and indexes (handler-case (parse-schema schema-file-name) (sb-int:simple-file-error () (format t "abort: schema file does not exist~%") (return-from parser)) (error () (format t "abort: could not load schema~%") (return-from parser))) ;; 2. REPL for SQL from *standard-input* (format t "Type a SQL query, or an empty line to quit.~%") (loop (with-simple-restart (abort "Return to simpledb toplevel.") (format t "> ") (finish-output *standard-output*) (handler-case (let ((e (lex))) (when (null e) (return-from parser)) (evaluate e)) (fucc:lr-parse-error-condition () (format t "error: SQL malformed~%")) (ambiguous-field-error (e) (format t "error: ~a is ambiguous.~%" (name e))) (unsupported-feature-error (e) (format t "error: ~a is currently unsupported~%" (name e))) (field-does-not-exist-error (e) (format t "error: field (~a) does not exist~%" (name e))) (table-does-not-exist-error (e) (format t "error: table (~a) does not exist~%" (name e))))))) (defun simpledb () ;;** command-line arguments (let ((tool-name (second sb-ext:*posix-argv*))) (cond ((string= tool-name "convert") (when (not (= 4 (length sb-ext:*posix-argv*))) (format t *usage-string*) (return-from simpledb 1)) (let* ((input-file-name (nth 2 sb-ext:*posix-argv*)) (output-file-name (change-file-type input-file-name ".dat")) (index-file-name (change-file-type input-file-name ".idx")) (type-descriptor (parse-type-descriptor (nth 3 sb-ext:*posix-argv*)))) (convert input-file-name output-file-name index-file-name type-descriptor))) ((string= tool-name "parser") (when (not (= 3 (length sb-ext:*posix-argv*))) (format t *usage-string*) (return-from simpledb 1)) (let ((schema-file-name (nth 2 sb-ext:*posix-argv*))) (parser schema-file-name))) (t (format t *usage-string*) (return-from simpledb 1)))))
6,640
Common Lisp
.lisp
150
38.826667
90
0.665061
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
b236abf0e7b92ba0f2e22b29aba557df4be4e45d7995adef421e2f39a033ee1e
27,034
[ -1 ]
27,035
parser.lisp
zeller_cl-simpledb/parser.lisp
(in-package :simpledb) #+asdf(eval-when (:compile-toplevel :execute :load-toplevel) (asdf:oos 'asdf:load-op :fucc-parser)) #+asdf(eval-when (:compile-toplevel :execute) (asdf:oos 'asdf:load-op :fucc-generator)) (fucc:defparser *query-parser* s (= < > <= >= :semicolon :id :const :asterisk :comma :period select delete from where or and :lparen :rparen) ((s -> (:var query-list (:list query :semicolon)) (:maybe :semicolon) (:do query-list)) (query -> (:or select-query delete-query)) (select-query -> select (:var fields (:or :asterisk fields)) from (:var tables tables) (:var where (:maybe where-statement)) (:do `(select ,fields ,tables ,@where))) (delete-query -> delete from (:var table table) (:var where where-statement) (:do `(delete ,table ,@where))) (where-statement -> where (:var clause clause) (:do (list 'where clause))) (clause -> :lparen (:var clause clause) :rparen (:do clause) -> clause0 (:or or and) clause (:call (lambda (a op b) (list op a b))) -> clause0) (clause0 -> field (:or = < > <= >=) value (:call (lambda (field op value) (list op field value)))) (value -> field -> :const) (tables -> (:var table :id) :comma (:var tables tables) (:do (push table tables)) -> (:var table table) (:do (list table))) (table -> (:var table :id) (:do table)) (fields -> (:var field field) :comma (:var fields fields) (:do (push field fields)) -> (:var field field) (:do (list field))) (field -> table :period (:or :id :asterisk) (:call (lambda (table op field) (cons table field))) -> :id)) :prec-info ((:right or and))) (fucc:defparser *schema-parser* s (:id string int :comma :semicolon :lparen :rparen) ((s -> (:var table-list (:list table :semicolon)) (:maybe :semicolon) (:do table-list)) (table -> (:var table :id) :lparen (:var fields fields) :rparen (:do (list table fields))) (fields -> (:var field field) :comma (:var fields fields) (:do (push field fields)) -> (:var field field) (:do (list field))) (field -> :id (:or int string) (:call (lambda (name type) (cons name type)))))) (defun simpledb-lexer (list) "Return lexical analizer for list of tokens" (lambda () (let ((next-value (pop list))) (cond ((null next-value) (values nil nil)) ((member next-value '(:semicolon #\;)) (values :semicolon :semicolon)) ((member next-value '(:comma #\,)) (values :comma :comma)) ((member next-value '(:lparen #\()) (values :lparen :lparen)) ((member next-value '(:rparen #\))) (values :rparen :rparen)) ((member next-value '(:period #\.)) (values :period :period)) ((member next-value '(:asterisk #\*)) (values :asterisk :asterisk)) ((member next-value '(select delete from where = < > <= >= or and int string)) (values next-value next-value)) ((symbolp next-value) (values :id next-value)) ((numberp next-value) (values :const next-value)) ((stringp next-value) (values :const next-value)) (t (error "Unknown token: ~S" next-value)))))) (defun evaluate (expression) (let ((abstract-syntax-tree (fucc:parser-lr (simpledb-lexer expression) *query-parser*))) (loop for query = (pop abstract-syntax-tree) do (write-debug "~A~%" query) (case (first query) ('delete (write-debug "DELETE STATEMENT~%") (let ((table (second query)) (where-clause (fourth query))) (write-debug "Table: ~A~%" table) (write-debug "Where: ~A~%" where-clause)) (error 'unsupported-feature-error :name "DELETE")) ('select (write-debug "SELECT STATEMENT~%") (let ((fields (second query)) (tables (mapcar #'(lambda (table) (cons (string table) (catalog-lookup-table-number table))) (third query))) (where-clause (fifth query))) (write-debug "Fields: ~S~%" fields) (write-debug "Tables: ~S~%" tables) (write-debug "Where: ~S~%" where-clause) (when where-clause (error 'unsupported-feature-error :name "WHERE")) (let ((cursor (projection (join tables) fields))) (format t "Header: ~S~%" (cursor-info cursor)) (cursor-open cursor) (loop until (cursor-finished-p cursor) for tuple = (cursor-next cursor) do (print-tuple tuple (cursor-type-descriptor cursor))))))) while abstract-syntax-tree))) (defun parse-schema (schema-file-name) (with-open-file (*standard-input* schema-file-name) (let ((schema-dir-name (subseq schema-file-name 0 (+ (position #\/ schema-file-name :from-end t) 1))) (expression (lex t))) (write-debug "~A~%" expression) (let ((abstract-syntax-tree (fucc:parser-lr (simpledb-lexer expression) *schema-parser*))) (format t "Loaded schema: ~A~%" abstract-syntax-tree) (loop for table = (pop abstract-syntax-tree) do (write-debug "~A~%" table) (let* ((table-name (first table)) (fields (second table)) (column-names (mapcar #'car fields)) (type-descriptor (mapcar #'cdr fields)) (heap-file-name (concatenate 'string schema-dir-name (string table-name) ".dat")) (index-file-name (concatenate 'string schema-dir-name (string table-name) ".idx"))) (write-debug "Loading table ~a~%" table-name) (write-debug "Reading heap file from disk (~a).~%" heap-file-name) (write-debug "Reading index file from disk (~a).~%" index-file-name) (let* ((heap-file (make-instance 'heap-file :file-name heap-file-name :type-descriptor type-descriptor)) (index-file (make-instance 'index-file :file-name index-file-name :source-file heap-file :key-field 0)) (table-info (make-instance 'table-info :table-name table-name :column-names column-names))) (write-debug "Adding the info ~a to the catalog~%" table-info) (catalog-add-info (sxhash heap-file-name) table-info))) while abstract-syntax-tree)))))
7,616
Common Lisp
.lisp
189
27.412698
103
0.495806
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
ef6ce2ea055ae6e184a2b7db28cbb0c09cbafcfc0607e2a421fa089b84940683
27,035
[ -1 ]
27,036
bufferpool.lisp
zeller_cl-simpledb/bufferpool.lisp
(in-package :simpledb) ;;** bufferpool (defclass bufferpool () ((pool :initform (make-hash-table) :reader pool) (front :initform nil :accessor front) (back :initform nil :accessor back) (queue-length :initform 0 :accessor queue-length))) (defun clear-bufferpool () (loop while (front *bufferpool*) do (evict-page-from-bufferpool)) (setq *bufferpool* (make-instance 'bufferpool))) (defun fetch-from-bufferpool (id) (gethash id (pool *bufferpool*))) (defun add-to-bufferpool (id page) (write-debug "Attempting to add page (~a) to the bufferpool~%" id) ;; if full, evict a page (with-slots (queue-length pool front back) *bufferpool* (when (= queue-length *bufferpool-max-size*) (evict-page-from-bufferpool)) ;; add page (setf (gethash id pool) page) (let ((id-node (cons id nil))) (if (zerop queue-length) (setf front id-node) (setf (cdr back) id-node)) (setf back id-node)) (incf queue-length))) (defun evict-page-from-bufferpool () (with-slots (queue-length pool front back) *bufferpool* (let* ((evicted-id (pop front)) (evicted-page (gethash evicted-id pool))) (write-debug "Evicting page (~a) from the bufferpool~%" evicted-id) ;; write evicted-page to disk and remove entry (with-slots (record-id dirty?) evicted-page (when dirty? (write-page (catalog-lookup-file (table-number record-id)) evicted-page))) (remhash evicted-id pool) (when (not front) (setf back nil)) (decf queue-length)))) (defvar *bufferpool* (make-instance 'bufferpool) "Buffer of pages")
1,662
Common Lisp
.lisp
43
32.976744
73
0.654467
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
a75b0190e6114aecd12c10421b05d100b6893dace9f41841fa236fa5b9bc7fe4
27,036
[ -1 ]
27,037
cursor.lisp
zeller_cl-simpledb/cursor.lisp
(in-package :simpledb) ;; iterator methods in lisp (defclass cursor () ((next :initarg :next :accessor next :initform nil))) (defgeneric cursor-next (cursor) (:documentation "Gets the next tuple or nil")) (defmethod cursor-next ((cursor cursor)) (with-slots (next) cursor (unless (cursor-finished-p cursor) (let ((temp next)) (setf next nil) temp)))) (defgeneric cursor-peek (cursor) (:documentation "Returns the next tuple, but does not consume it")) (defmethod cursor-peek ((cursor cursor)) (with-slots (next) cursor (unless (cursor-finished-p cursor) (write-debug "Peeking: ~a~%" next) next))) (defgeneric cursor-type-descriptor (cursor) (:documentation "Returns the type-descriptor of the tuples returned by this cursor")) (defgeneric cursor-info (cursor) (:documentation "Returns the field info of the tuples returned by this cursor")) (defgeneric cursor-finished-p (cursor) (:documentation "Returns if there are any tuples left. Stores the next tuple in a cache")) (defgeneric cursor-rewind (cursor) (:documentation "Rewinds the cursor back to its original position")) (defgeneric cursor-open (cursor) (:documentation "Initializes cursor")) (defmethod cursor-open ((cursor cursor)) (cursor-rewind cursor)) (defgeneric make-cursor-for (collection) (:documentation "Creates a cursor for any type of collection")) ;;* page cursors (defclass page-scan (cursor) ((page :initarg :page :accessor page) (tuples :initform nil :accessor tuples))) (defmethod make-cursor-for ((page page)) (make-instance 'page-scan :page page)) (defmethod cursor-rewind ((cursor page-scan)) (with-slots (tuples page) cursor (setf tuples (copy-list (tuples page))))) (defmethod cursor-finished-p ((cursor page-scan)) (with-slots (next tuples) cursor (unless (or next (null tuples)) (write-debug "Caching next tuple from page cursor~%") (setf next (pop tuples))) (not next))) ;;* file cursors ;;** scan ;; sequentially scan a file for all tuples (defclass file-scan (cursor) ((file :initarg :file :accessor file) (current-page-number :initform 0) (current-page-cursor :initform nil))) (defmethod make-cursor-for ((file file)) (make-instance 'file-scan :file file)) (defmethod cursor-finished-p ((cursor file-scan)) (with-slots (file next current-page-number current-page-cursor) cursor ;; find the cursor to the next page with tuples (loop while (and current-page-cursor (cursor-finished-p current-page-cursor) (< current-page-number (page-count file))) do (setf current-page-cursor (make-cursor-for (read-page file current-page-number))) (cursor-open current-page-cursor) (incf current-page-number)) ;; if current-page-cursor is nil, cursor has not been open (unless (or next (null current-page-cursor) (cursor-finished-p current-page-cursor)) (setf next (cursor-next current-page-cursor))) (null next))) (defmethod cursor-rewind ((cursor file-scan)) (with-slots (current-page-number current-page-cursor file) cursor (setf current-page-number 0) (setf current-page-cursor (make-cursor-for (read-page file current-page-number))) (cursor-open current-page-cursor) (incf current-page-number))) (defmethod cursor-type-descriptor ((cursor file-scan)) (type-descriptor (file cursor))) (defmethod cursor-info ((cursor file-scan)) (with-slots (file) cursor (let ((table-info (catalog-lookup-info (sxhash (file-name file))))) (with-slots (table-name column-names) table-info (mapcar #'(lambda (column-name) (cons table-name column-name)) column-names))))) ;;** join ;; join two cursors using nested loops join (defclass join (cursor) ((inner :initarg :inner :accessor inner) (outer :initarg :outer :accessor outer))) (defmethod cursor-rewind ((cursor join)) (with-slots (inner outer) cursor (cursor-rewind inner) (cursor-rewind outer))) ;; does this fail if outer is a cursor that starts out empty? (defmethod cursor-finished-p ((cursor join)) (with-slots (next inner outer) cursor (unless (or next (cursor-finished-p inner)) (let ((inner-tuple (cursor-peek inner)) (outer-tuple (cursor-next outer))) (setf next (append inner-tuple outer-tuple)) (write-debug "Join (next): ~a~%" next)) (when (cursor-finished-p outer) (cursor-rewind outer) (cursor-next inner))) (null next))) (defmethod cursor-type-descriptor ((cursor join)) (with-slots (inner outer) cursor (let ((type-descriptor (append (cursor-type-descriptor inner) (cursor-type-descriptor outer)))) (write-debug "Join (type-descriptor): ~a~%" type-descriptor) type-descriptor))) (defmethod cursor-info ((cursor join)) (with-slots (inner outer) cursor (let ((info (append (cursor-info inner) (cursor-info outer)))) (write-debug "Join (info): ~a~%" info) info))) (defun join (tables) (if (= (length tables) 1) (make-cursor-for (catalog-lookup-file (cdr (first tables)))) (make-instance 'join :inner (make-cursor-for (catalog-lookup-file (cdr (first tables)))) :outer (join (rest tables))))) ;;** predicate (defclass predicate () ((op :initarg :op :accessor op) (field :initarg :field :initform 0 :accessor field) (value :initarg :value :accessor value))) ;;** filter ;; filter the results of a cursor using a predicate ;; @todo untested (defclass filter (cursor) ((child :initarg :child :accessor child) (predicate :initarg :predicate :accessor predicate))) (defmethod cursor-rewind ((cursor filter)) (cursor-rewind (child cursor))) (defmethod cursor-type-descriptor ((cursor filter)) (cursor-type-descriptor (child cursor))) (defmethod cursor-info ((cursor filter)) (cursor-info (child cursor))) (defmethod cursor-finished-p ((cursor filter)) (with-slots (child next predicate) cursor (loop until (or next (cursor-finished-p child)) for tuple = (cursor-next child) do ;; find the next tuple that matches the predicate (when (or (not predicate) (case (nth (field predicate) type-descriptor) ('int (case (op predicate) ('= (= (nth (field predicate) tuple) (value predicate))) ('< (< (nth (field predicate) tuple) (value predicate))) ('> (> (nth (field predicate) tuple) (value predicate))) ('<= (<= (nth (field predicate) tuple) (value predicate))) ('>= (>= (nth (field predicate) tuple) (value predicate))))) ('string (case (op predicate) ('= (string= (nth (field predicate) tuple) (value predicate))) ('< (string< (nth (field predicate) tuple) (value predicate))) ('> (string> (nth (field predicate) tuple) (value predicate))) ('<= (string<= (nth (field predicate) tuple) (value predicate))) ('>= (string>= (nth (field predicate) tuple) (value predicate))))))) (setf next tuple))))) ;;** projection (defclass projection (cursor) ((child :initarg :child :accessor child) (order :initarg :order :accessor order))) (defmethod cursor-rewind ((cursor projection)) (cursor-rewind (child cursor))) (defmethod cursor-type-descriptor ((cursor projection)) (with-slots (child order) cursor (reorder (cursor-type-descriptor child) order))) (defmethod cursor-info ((cursor projection)) (with-slots (child order) cursor (reorder (cursor-info child) order))) (defmethod cursor-finished-p ((cursor projection)) (with-slots (child next order) cursor (unless (cursor-finished-p child) (let ((child-tuple (cursor-next child))) (setf next (reorder child-tuple order)))) (null next))) (defun projection (child fields) (write-debug "Fields: ~S~%" fields) (write-debug "Child cursor info: ~S~%" (cursor-info child)) (let* ((child-info (cursor-info child)) (order (flatten (if (eq :asterisk fields) nil (mapcar #'(lambda (field) (let ((match-position (position field child-info :test #'equal))) (if match-position match-position (cond ((and (listp field) (eq :asterisk (cdr field))) ;; add all fields in this place, flatten ;; will take care of splicing in the list ;; into the order (let (matches) (loop for child-field in child-info for index from 0 below (length child-info) when (eq (car child-field) (car field)) do (push index matches)) (nreverse matches))) (t ;; try searching using cdr, but check for ;; ambiguity (write-debug "Searching for generic field~%") (let ((match-position-start (position field (mapcar #'cdr child-info) :from-end nil)) (match-position-end (position field (mapcar #'cdr child-info) :from-end t))) (if (eq match-position-start match-position-end) (if match-position-end match-position-end (error 'field-does-not-exist-error :name field)) (error 'ambiguous-field-error :name field)))))))) fields))))) (write-debug "Projection order: ~S~%" order) (make-instance 'projection :child child :order order))) ;;** index cursors ;; @todo re-write as a cursor on index-files ;; (defmethod filter ((file index-file) filter callback) ;; ;; @todo IMPORTANT: assumes key is unique, and hence there is only ;; ;; one page to fetch from source-file. need to address this issue. ;; (with-slots (source-file bin-count type-descriptor key-field) file ;; ;; check if the filter is = and the field is our key-field, if so ;; ;; we can use the index to filter ;; (if (and filter (eq (op filter) '=) (eq (field filter) key-field)) ;; ;; use (value filter) to find correct page(s) in the index ;; (let ((page-number (mod (sxhash (value filter)) bin-count))) ;; (loop for page = (read-page file page-number) ;; do ;; ;; search page for key, and if found, calls filter-page ;; ;; on the page the tuple can be found ;; (filter-page page type-descriptor (make-instance 'filter :op '= ;; :value (value filter)) ;; #'(lambda (tuple type-descriptor record-id) ;; (filter-page (read-page source-file (nth 1 tuple)) ;; (type-descriptor source-file) filter callback))) ;; until (zerop (setf page-number (next-page-number page))))) ;; ;; defer to the source-file to see if it can do any better ;; (filter source-file filter callback))))
12,229
Common Lisp
.lisp
261
36.681992
96
0.578408
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
e5dddf7678183bb9176805f21ed55f1974d1cf8e50e129f29cd2dec2c79994ec
27,037
[ -1 ]
27,038
parameters.lisp
zeller_cl-simpledb/parameters.lisp
(in-package :simpledb) ;;** parameters (defparameter *max-int-size* 4294967296 "The maximum storable INT") (defparameter *int-size* (ceiling (/ (ceiling (log *max-int-size* 2)) 8)) "The number of bytes needed for storing an int") (defparameter *max-table-size* 2147483648 "The max allowable size of a table (file) on disk") (defparameter *page-size* 32 ;; 65536 "The size in bytes of a page.") (defparameter *index-bin-count* 10 "Number of bins for static hashing in index.") (defparameter *max-pages* (floor (/ *max-table-size* *page-size*)) "The maximum allowable number of pages, computed from *max-table-size*") (defparameter *page-offset-size* (ceiling (/ (ceiling (log *max-pages* 2)) 8)) "The size in bytes of the offset storing a page number.") (defparameter *offset-size* (ceiling (/ (ceiling (log *page-size* 2)) 8)) "The size in bytes of the offsets within a page.") (defparameter *bufferpool-max-size* 50 "Number of pages in the bufferpool")
982
Common Lisp
.lisp
20
46.7
78
0.722689
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
07c6182bacca3ba090e8b82d89332861b08b1c9692def6325787f59211c097de
27,038
[ -1 ]
27,039
make-image.lisp.in
zeller_cl-simpledb/make-image.lisp.in
(require 'asdf) (require 'simpledb) (sb-ext:save-lisp-and-die "simpledb" :toplevel (lambda () ;; asdf requires sbcl_home to be set, so set it to the value when the image was built (sb-posix:putenv (format nil "SBCL_HOME=~A" #.(sb-ext:posix-getenv "SBCL_HOME"))) (simpledb:simpledb) 0) :executable t)
359
Common Lisp
.lisp
10
29
98
0.616715
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
66fc564f6adfdc789219ae6c5891e74b104af521bcb561b2310c844ffb4ae604
27,039
[ -1 ]
27,040
simpledb.asd
zeller_cl-simpledb/simpledb.asd
;; -*- mode: lisp -*- (defpackage :simpledb-system (:use :cl :asdf)) (in-package :simpledb-system) (defsystem :simpledb :name "SimpleDB" :author "Michael Zeller <[email protected]>" :version "0.1" :maintainer "Michael Zeller <[email protected]>" ;; :license "GNU General Public License" :description "A Common Lisp implementation of SimpleDB @ MIT" :serial t :depends-on (:cl-ppcre :fucc-parser :fucc-generator :flexi-streams :sb-posix) :components ((:file "package") (:file "utils") (:file "parameters") (:file "lexer") (:file "parser") (:file "file") (:file "cursor") (:file "bufferpool") (:file "catalog") (:file "simpledb")))
766
Common Lisp
.asd
23
26.652174
79
0.597297
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
f9335952a2c70567ac4ffb829137a6d8b5fea6803912e2be483d8fc4642048cf
27,040
[ -1 ]
27,049
Makefile.in
zeller_cl-simpledb/Makefile.in
LISP=@LISP_PROGRAM@ sbcl_BUILDOPTS=--load ./make-image.lisp datarootdir = @datarootdir@ prefix=@prefix@ exec_prefix= @exec_prefix@ bindir=@bindir@ infodir=@infodir@ # You shouldn't have to edit past this # This is copied from the .asd file. It'd be nice to have the list in # one place, but oh well. FILES=package.lisp lexer.lisp parser.lisp cursor.lisp file.lisp \ utils.lisp parameters.lisp catalog.lisp bufferpool.lisp simpledb.lisp all: simpledb simpledb: $(FILES) $(LISP) $(@LISP@_BUILDOPTS) clean: rm -f *.fasl *.fas *.lib *.*fsl simpledb install: simpledb test -z "$(destdir)$(bindir)" || mkdir -p "$(destdir)$(bindir)" install -m 755 simpledb "$(destdir)$(bindir)" uninstall: rm "$(destdir)$(bindir)/simpledb" # End of file
748
Common Lisp
.l
23
30.869565
69
0.73986
zeller/cl-simpledb
1
0
0
GPL-2.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
19095580b9f1a18a45132fc51ced43060b6dea743f8b9c8d5e851555b91ee712
27,049
[ -1 ]
27,069
agents.lsp
plazajan_Wall-Follower-Evolutionary-Programming/agents.lsp
;; agents.lsp (Trees representing Boolean conditions) ;; Evolutionary programming in LISP ;; educational software inspired by Nils. J. Nilsson ;; March 16, 2000 ;; https://github.com/plazajan ;; (c) 2000 Jan A. Plaza ;; This file is part of LISP-Evolutionary-Programming-Wall-Follower. ;; LISP-Evolutionary-Programming-Wall-Follower is free software: ;; you can redistribute it and/or modify it under the terms of ;; the GNU General Public License as published by the Free Software Foundation, ;; either version 3 of the License, or (at your option) any later version. ;; LISP-Evolutionary-Programming-Wall-Follower is distributed in the hope ;; that it will be useful, but WITHOUT ANY WARRANTY; ;; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. ;; See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with LISP-Evolutionary-Programming-Wall-Follower. ;; If not, see https://www.gnu.org/licenses/. ;; Notes ;; 1. The trees obtained through the crossover and mutation operations ;; are getting bigger and bigger. (This is not necessarily bad.) ;; 2. Nilsson, in his book, uses a different representation of an agent ;; which seems to give the agents memory of past steps. ;;----------------------------------------------------------------------------- ;; Our and-or-trees may have atoms ;; or negated atoms as leaves, ;; (not *e*) is considered a single node. ;; Nodes in our trees are numbered using the depth-first left-to-right ;; method, with root having number 1. ;;============================================================================= ;; count-nodes <tree> ;; Returns the number of nodes in <tree> ;; Could be re-implemented as tail-recursive. (defun count-nodes (tree) (if (or (atom tree) (eq (first tree) 'not)) 1 (+ 1 (count-nodes (second tree)) (count-nodes (third tree))) ) ) ;;----------------------------------------------------------------------------- (defun replace-subtree (tree node replacement) (cond ((or (atom tree) (eq (first tree) 'not)) replacement) ((eq node 1) replacement ) ((<= (1- node) (count-nodes (second tree))) `(,(first tree) ,(replace-subtree (second tree) (1- node) replacement) ,(third tree) ) ) (T `(,(first tree) ,(second tree) ,(replace-subtree (third tree) (- node 1 (count-nodes (second tree))) replacement ) ) ) ) ) ;;----------------------------------------------------------------------------- (defun nth-subtree (n tree) (cond ((eq n 1) tree) ((<= (1- n) (count-nodes (second tree))) (nth-subtree (1- n) (second tree)) ) (T (nth-subtree (- n 1 (count-nodes (second tree))) (third tree))) ) ) ;;----------------------------------------------------------------------------- ;; This function returns a pair: ;; node number and the subtree starting at that node. (defun random-subtree (tree) (let ;; local variable ((node (1+ (random (count-nodes tree))))) ;; body `(,node ,(nth-subtree node tree)) ) ) ;;============================================================================= ;; random-leaf ;; *e* means that the way to the east is free; similarly for *ne*, *w*, etc. ;; The GCL compiler requires that macros definitions are given before calls. ;; Note this macro is called in random-tree. (defmacro random-leaf () '(case (random 16) ( 0 '*e*) ( 1 '*se*) ( 2 '*s*) ( 3 '*sw*) ( 4 '*w*) ( 5 '*nw*) ( 6 '*n*) ( 7 '*ne*) ( 8 '(not *e*)) ( 9 '(not *se*)) (10 '(not *s*)) (11 '(not *sw*)) (12 '(not *w*)) (13 '(not *nw*)) (14 '(not *n*)) (15 '(not *ne*)) ) ) ;;----------------------------------------------------------------------------- ;; Precondition: max-height is a positive integer ;; Postcondition: return a random tree of hight <= max-hight ;; built of and's, or's and leafs. ;; The distribution is uniform for max-height <= 2 and ;; not uniform for higher trees -- it prefers short trees/branches. (defun random-tree (max-height) (case max-height (1 (random-leaf)) (2 (let ;; all trees of height <=2 are generated with the same probability ;; local variables ((random (random 33)) ;; there are 16*33 trees of height <=2 (new-height (1- max-height)) ) ;; body (cond ((= random 0) (random-leaf)) ((<= random 16) ;; 16 = (33-1)/2 `(and ,(random-tree new-height) ,(random-tree new-height))) (T `(or ,(random-tree new-height) ,(random-tree new-height))) ) ) ) (otherwise (let ;; local variables ((random (random 101)) ;; There are 16*1057 trees of height <=3 ;; We are using 101 instead of 1057 ;; thus giving preference to shorter trees. (new-height (1- max-height)) ) ;; body (cond ((= random 0) (random-leaf)) ((<= random 50) ;; 50 = (101-1)/2 `(and ,(random-tree new-height) ,(random-tree new-height))) (T `(or ,(random-tree new-height) ,(random-tree new-height))) ) ) ) ) ) ;;----------------------------------------------------------------------------- ;; This function replaces randomly selected subtree by a new random tree. ;; Notice that the resulting tree may exceed *agent-size* (defun tree-mutation (tree mutation-size) (replace-subtree tree (first (random-subtree tree)) (random-tree mutation-size) ) ) ;;----------------------------------------------------------------------------- ;; This function returns a pair of trees resulting ;; from a swap of randomly selected subtrees. (defun tree-crossover (tree1 tree2) (let* ((sub1 (random-subtree tree1)) (sub2 (random-subtree tree2)) (new1 (replace-subtree tree1 (first sub1) (second sub2))) (new2 (replace-subtree tree2 (first sub2) (second sub1))) ) `(,new1 ,new2) ) ) ;;============================================================================= ;; An agent is represented by three Boolean expressions, called ;; main-condition, e-w-condition and s-n-condition. ;; The agent will move according to the following program ;; (if main-condition ;; (if e-w-condition (try-to-move-east) (try-to-move-west)) ;; (if s-n-condition (try-to-move-south) (try-to-move-north)) ;; ) (defun random-agent1 () "(if c1 (if c2 #\e #\w) (if c3 #\s #\n))" `(if ,(random-tree *agent-size*) (if ,(random-tree *agent-size*) #\e #\w) (if ,(random-tree *agent-size*) #\s #\n) ) ) ;;----------------------------------------------------------------------------- (defmacro cadaddr (list) `(cadr (caddr ,list)) ) (defmacro cadadddr (list) `(cadr (cadddr ,list)) ) ;;----------------------------------------------------------------------------- ;; select a random node and replace the corresponding subtree ;; by a random tree of height <= *agent-size*. ;; Notice that agent most likely will grow higher than *agent-size*. (defun mutation1 (agent) (let* ((treeA (cadr agent)) (treeB (cadaddr agent)) (treeC (cadadddr agent)) (i (random 3)) (new-tree (case i (0 (tree-mutation treeA *agent-size*)) (1 (tree-mutation treeB *agent-size*)) (2 (tree-mutation treeC *agent-size*)) ) ) ) ;; body (case i (0 `(if ,new-tree (if ,treeB #\e #\w) (if ,treeC #\s #\n))) (1 `(if ,treeA (if ,new-tree #\e #\w) (if ,treeC #\s #\n))) (2 `(if ,treeA (if ,treeB #\e #\w) (if ,new-tree #\s #\n))) ) ) ) ;;----------------------------------------------------------------------------- ;; Returns a list with two agents. (defun crossover1 (agent1 agent2) (let* ;; Local variables. ((tree1a (cadr agent1)) (tree1b (cadaddr agent1)) (tree1c (cadadddr agent1)) (tree2a (cadr agent2)) (tree2b (cadaddr agent2)) (tree2c (cadadddr agent2)) (i (random 3)) (tree-pair (case i (0 (tree-crossover tree1a tree2a)) (1 (tree-crossover tree1b tree2b)) (2 (tree-crossover tree1c tree2c)) ) ) (new-tree1 (first tree-pair)) (new-tree2 (second tree-pair)) ) ;; Body. (case i (0 `( (if ,new-tree1 (if ,tree1B #\e #\w) (if ,tree1C #\s #\n)) (if ,new-tree2 (if ,tree2B #\e #\w) (if ,tree2C #\s #\n)) ) ) (1 `( (if ,tree1A (if ,new-tree1 #\e #\w) (if ,tree1C #\s #\n)) (if ,tree2A (if ,new-tree2 #\e #\w) (if ,tree2C #\s #\n)) ) ) (2 `( (if ,tree1A (if ,tree1B #\e #\w) (if ,new-tree1 #\s #\n)) (if ,tree2A (if ,tree2B #\e #\w) (if ,new-tree2 #\s #\n)) ) ) ) ) ) ;;============================================================================= (defun random-agent2 () "(cond (c1 #\e) (c2 #\s) (c3 #\w) (t #\n))" `(cond (,(random-tree *agent-size*) #\e) (,(random-tree *agent-size*) #\s) (,(random-tree *agent-size*) #\w) (T #\n) ) ) ;;----------------------------------------------------------------------------- ;; select a random node and replace the corresponding subtree ;; by a random tree of height <= *agent-size*. ;; Notice that agent most likely will grow higher than *agent-size*. (defun mutation2 (agent) (let* ((treeA (caadr agent)) (treeB (caaddr agent)) (treeC (car (cadddr agent))) (i (random 3)) (new-tree (case i (0 (tree-mutation treeA *agent-size*)) (1 (tree-mutation treeB *agent-size*)) (2 (tree-mutation treeC *agent-size*)) ) ) ) ;; body (case i (0 `(cond (,new-tree #\e) (,treeB #\s) (,treeC #\w) (t #\n)) ) (1 `(cond (,treeA #\e) (,new-tree #\s) (,treeC #\w) (t #\n)) ) (2 `(cond (,treeA #\e) (,treeB #\s) (,new-tree #\w) (t #\n)) ) ) ) ) ;;----------------------------------------------------------------------------- ;; Returns a list with two agents. (defun crossover2 (agent1 agent2) (let* ;; Local variables. ((tree1a (caadr agent1)) (tree1b (caaddr agent1)) (tree1c (car (cadddr agent1))) (tree2a (caadr agent2)) (tree2b (caaddr agent2)) (tree2c (car (cadddr agent2))) (i (random 3)) (tree-pair (case i (0 (tree-crossover tree1a tree2a)) (1 (tree-crossover tree1b tree2b)) (2 (tree-crossover tree1c tree2c)) ) ) (new-tree1 (first tree-pair)) (new-tree2 (second tree-pair)) ) ;; Body. (case i (0 `( (cond (,new-tree1 #\e) (,tree1B #\s) (,tree1C #\w) (t #\n)) (cond (,new-tree2 #\e) (,tree2B #\s) (,tree2C #\w) (t #\n)) ) ) (1 `( (cond (,tree1A #\e) (,new-tree1 #\s) (,tree1C #\w) (t #\n)) (cond (,tree2A #\e) (,new-tree2 #\s) (,tree2C #\w) (t #\n)) ) ) (2 `( (cond (,tree1A #\e) (,tree1B #\s) (,new-tree1 #\w) (t #\n)) (cond (,tree2A #\e) (,tree2B #\s) (,new-tree2 #\w) (t #\n)) ) ) ) ) ) ;;=============================================================================
11,557
Common Lisp
.l
353
27.354108
80
0.502374
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
0e6c17ffc1879b39b9e7ba5eeade691a48c55b667ca7764ef5cebcb6437da71d
27,069
[ -1 ]
27,070
main.lsp
plazajan_Wall-Follower-Evolutionary-Programming/main.lsp
;; main.lsp ;; Evolutionary programming in LISP ;; educational software inspired by Nils. J. Nilsson ;; March 25, 2000 ;; https://github.com/plazajan ;; (c) 2000 Jan A. Plaza ;; This file is part of LISP-Evolutionary-Programming-Wall-Follower. ;; LISP-Evolutionary-Programming-Wall-Follower is free software: ;; you can redistribute it and/or modify it under the terms of ;; the GNU General Public License as published by the Free Software Foundation, ;; either version 3 of the License, or (at your option) any later version. ;; LISP-Evolutionary-Programming-Wall-Follower is distributed in the hope ;; that it will be useful, but WITHOUT ANY WARRANTY; ;; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. ;; See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with LISP-Evolutionary-Programming-Wall-Follower. ;; If not, see https://www.gnu.org/licenses/. ;; To run this program invoke lisp and type: (load "main") ;;============================================================================= (load "utilities.lsp") ;; Edit, compile, time, screen, file output. (compile-and-load "parameters") ;; User modifiable parameters. (compile-and-load "world") ;; Prepare and display grid world. (compile-and-load "evaluate") ;; Evaluate agents. (compile-and-load "agents") ;; Boolean conditions, trees, agents. (compile-and-load "genetic") ;; Genetic/evolutionary process. (compile-and-load "output") ;; Output functions. (compile-and-load "interface") ;; Trace changes of parameters, start, restart. ;;============================================================================= ;; Print introductory messages when this file is loaded. ;(clear-screen) (print-introduction) (format t " To change evolutionary process parameters, edit parameters.lsp - type: (e p) To start the evolution, type: (start) " ) ;;=============================================================================
2,052
Common Lisp
.l
40
49.55
80
0.662663
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
d30bd3b681ee22b821a7f1440d29e56a3fe9d952ee63cd1b9676d2607730f63f
27,070
[ -1 ]
27,071
utilities.lsp
plazajan_Wall-Follower-Evolutionary-Programming/utilities.lsp
;; utilities.lsp ;; Evolutionary programming in LISP ;; educational software inspired by Nils. J. Nilsson ;; March 17, 2000 ;; https://github.com/plazajan ;; (c) 2000 Jan A. Plaza ;; This file is part of LISP-Evolutionary-Programming-Wall-Follower. ;; LISP-Evolutionary-Programming-Wall-Follower is free software: ;; you can redistribute it and/or modify it under the terms of ;; the GNU General Public License as published by the Free Software Foundation, ;; either version 3 of the License, or (at your option) any later version. ;; LISP-Evolutionary-Programming-Wall-Follower is distributed in the hope ;; that it will be useful, but WITHOUT ANY WARRANTY; ;; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. ;; See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with LISP-Evolutionary-Programming-Wall-Follower. ;; If not, see https://www.gnu.org/licenses/. ;(unless ; (find-package 'utilities) ; (make-package 'utilities) ;) ;(in-package 'utilities) ;(export ; '( ; e ; l ; compile-and-load ; clear-screen ; move-cursor ; tee-2 ; tee-n ; time-string ; delay ; ) ;) ;;============================================================================= ;; Utilities to aid the edit-load cycle of program writing. ;; Calls: (e) or (e a) ... ;; The argument is the first character of filename. ;; [Improve: take cursor to a given line.] (defmacro e (&optional (name 'user::p)) `(progn (case (quote ,name) ('user::a (run-shell-command "nano agents.lsp")) ('user::d (run-shell-command "nano log.dat")) ('user::e (run-shell-command "nano evaluate.lsp")) ('user::g (run-shell-command "nano genetic.lsp")) ('user::i (run-shell-command "nano interface.lsp")) ('user::m (run-shell-command "nano main.lsp")) ('user::o (run-shell-command "nano output.lsp")) ('user::p (run-shell-command "nano parameters.lsp")) ('user::r (run-shell-command "nano readme.txt")) ('user::t (run-shell-command "nano log.txt")) ('user::u (run-shell-command "nano utilities.lsp")) ('user::w (run-shell-command "nano world.lsp")) ) (l) ) ) ;;----------------------------------------------------------------------------- (defun l () (load "main.lsp") ) ;;----------------------------------------------------------------------------- ;; compile-and-load <filename> ;; Preconditions: ;; <filename> is a path to file with no extension (no .lsp, no .o). ;; File <filename>.lsp exists. ;; Postcondition: ;; If both .lsp and .o exist, the .lsp will be recompiled if it is newer. ;; If only .lsp exits, it will be compiled. ;; Then, if .o exists it will be loaded, otherwise .lsp will be loaded. (defun compile-and-load (filename) (unless (and (simple-string-p filename) (or (<= (length filename) 5) (string-not-equal filename ".lsp" :start1 (- (length filename) 4)) ) ) (error "Wrong parameter in (compile-and-load filename=~a)." filename) ) (let* ((source-file (format nil "~a.lsp" filename)) (object-file (format nil "~a.o" filename)) (source-exists (probe-file source-file)) (object-exists (probe-file object-file)) ) (when (and source-exists object-exists (< (file-write-date object-file) (file-write-date source-file)) ) (compile-file source-file) ) (when (and source-exists (not object-exists) ) (compile-file source-file) ) (load filename) ) ) ;;============================================================================= ;; clear-screen ;; Will work only on vt100 compatible terminals. (defun clear-screen () (write-char (int-char 27)) ;; ESC (write-char #\[ ) (write-char #\2) (write-char #\J) nil ) ;;----------------------------------------------------------------------------- ;; move-cursor <row> <column> ;; <row> is an integer 1..width; typical width is 80. ;; <column> is an integer 1..length; typical length is 24. ;; move-cursor assumes standard numbering in which left top position is 1,1. ;; Will work only on vt100 compatible terminals. (defun move-cursor (row column) (unless (and (integerp row) (integerp column) (> row 0) (> column 0)) (error "Wrong parameters in (move-cursor row=~a, column=~a.)" row column ) ) (write-char (int-char 27)) ;; ESC (write-char #\[ ) (write row) (write-char #\;) (write column) (write-char #\f) ) ;;----------------------------------------------------------------------------- ;; (tee-n <printing-form>) ;; Precondition: <out-stream> is the last item in <printing-form> ;; Postcondition: Will print both on the screen and to the out-stream. ;; Example: (tee-n (write-char c <out-stream>)); (defmacro tee-n (printing-form) (list 'progn (append (butlast printing-form) '(t)) printing-form ) ) ;;----------------------------------------------------------------------------- ;; (tee-2 <printing-form>) ;; Precondition: <out-stream> is the second item in <printing-form> ;; Postcondition: Will print both on the screen and to the out-stream. ;; Example: (tee-2 (format <out-stream> <string> <args>)) (defmacro tee-2 (printing-form) (list 'progn (cons (car printing-form) (cons 't (cddr printing-form))) printing-form ) ) ;;----------------------------------------------------------------------------- ;; time-string ;; Returns a string containing current day and time: "yyyy-mm-dd hh:mm:ss". (defun time-string () (multiple-value-bind (second minute hour day month year) (decode-universal-time (get-universal-time)) (format nil "~4d-~2,'0d-~2,'0d ~2,'0d:~2,'0d:~2,'0d" year month day hour minute second ) ) ) ;;----------------------------------------------------------------------------- ;; delay <seconds> ;; <seconds> can be any non-negative number (float or integer or rational) ;; Returns after <seconds>. ;; Note: Lisp built-in (sleep <seconds>) is accurate only up to 1 second. (defun delay (seconds) (unless (and (numberp seconds) (>= seconds 0)) (error "Wrong parameter in (delay seconds=~a)." seconds) ) (let ((start (get-internal-real-time))) (loop (when (< (* seconds internal-time-units-per-second) (- (get-internal-real-time) start) ) (return) ) ) ) ) ;;=============================================================================
6,618
Common Lisp
.l
198
29.848485
80
0.57599
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
28e336a6c74889d0f3bac35599628853665cdddc4a510f30efa157d139d83341
27,071
[ -1 ]
27,072
interface.lsp
plazajan_Wall-Follower-Evolutionary-Programming/interface.lsp
;; interface.lsp ;; Evolutionary programming in LISP ;; educational software inspired by Nils. J. Nilsson ;; March 27, 2000 ;; https://github.com/plazajan ;; (c) 2000 Jan A. Plaza ;; This file is part of LISP-Evolutionary-Programming-Wall-Follower. ;; LISP-Evolutionary-Programming-Wall-Follower is free software: ;; you can redistribute it and/or modify it under the terms of ;; the GNU General Public License as published by the Free Software Foundation, ;; either version 3 of the License, or (at your option) any later version. ;; LISP-Evolutionary-Programming-Wall-Follower is distributed in the hope ;; that it will be useful, but WITHOUT ANY WARRANTY; ;; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. ;; See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with LISP-Evolutionary-Programming-Wall-Follower. ;; If not, see https://www.gnu.org/licenses/. ;;----------------------------------------------------------------------------- (defun initialize-global-variables () (setq *previous-generation* (make-array *population-size*)) (setq *current-generation* (make-array *population-size*)) (setq *fitness-data* (make-array *population-size*)) (setq *generation-number* -1) (setq *time-spent* 0) (setq *start-time* (time-string)) (setf (get '*evaluation-method* 'old-value) 'no-value) (setf (get '*grid-world-file* 'old-value) 'no-value) (setf (get '*tours* 'old-value) 'no-value) (setf (get '*tour-length* 'old-value) 'no-value) (setf (get '*score-calculation* 'old-value) 'no-value) (setf (get '*random-agent-generator* 'old-value) 'no-value) (setf (get '*agent-size* 'old-value) 'no-value) (setf (get '*population-size* 'old-value) 'no-value) (setf (get '*tournament-size* 'old-value) 'no-value) (setf (get '*survive-percent* 'old-value) 'no-value) (setf (get '*crossover-percent* 'old-value) 'no-value) (setf (get '*mutation-percent* 'old-value) 'no-value) (setf (get '*only-best-survive* 'old-value) 'no-value) (setf (get '*crossover-operation* 'old-value) 'no-value) (setf (get '*mutation-operation* 'old-value) 'no-value) ) ;;----------------------------------------------------------------------------- (defun print-parameter (name stream) (let ((value (symbol-value name))) (unless (eq value (get name 'old-value)) (setf (get name 'old-value) value) (tee-2 (format stream "~%~a = ~a" (string-downcase name) value)) (cond ((and (functionp value) (documentation value 'function)) (tee-2 (format stream "~& -- ~a" (documentation value 'function))) ) ((and (symbolp value) (documentation value 'variable)) (tee-2 (format stream "~& -- ~a" (documentation value 'variable))) ) ) ) ) ) ;;----------------------------------------------------------------------------- (defun check-parameters (stream) (when (or (eq *evaluation-method* 'evaluate-c) (eq *evaluation-method* 'evaluate-s) ) (set-world-related-parameters) (tee-n (terpri stream)) (tee-n (display-world *world* stream)) (print-parameter '*evaluation-method* stream) (print-parameter '*grid-world-file* stream) (tee-2 (format stream "~% -- shown above, ~ax~a, with ~a places at the wall." *max-rows* *max-columns* *at-the-wall* ) ) (print-parameter '*tours* stream) (print-parameter '*tour-length* stream) (tee-2 (format stream "~% -- total number of steps agent takes during evaluation = ~a." (* *tours* *tour-length*) ) ) ) (when (eq *evaluation-method* 'evaluate-d) (print-parameter '*evaluation-method* stream) (print-parameter '*score-calculation* stream) ) (print-parameter '*random-agent-generator* stream) (print-parameter '*agent-size* stream) (print-parameter '*population-size* stream) (print-parameter '*tournament-size* stream) (print-parameter '*survive-percent* stream) (print-parameter '*crossover-percent* stream) (print-parameter '*mutation-percent* stream) (unless (zerop *survive-percent*) (print-parameter '*only-best-survive* stream) ) (unless (zerop *crossover-percent*) (print-parameter '*crossover-operation* stream) ) (unless (zerop *mutation-percent*) (print-parameter '*mutation-operation* stream) ) ) ;;============================================================================= (defun start (&optional (anew t)) (let ((log-existed (probe-file "log.txt"))) (with-open-file (results-stream "log.txt" :direction :output :if-exists :append :if-does-not-exist :create ) (unless log-existed (print-introduction results-stream) (print-gp-explanations results-stream) ) (if anew (tee-n (print-gp-experiment results-stream)) (dotimes (i 80 nil) (write-char #\-)) ) (when anew (initialize-global-variables) ) (check-parameters results-stream) (print-gp-explanations) (print-gp-instructions) ) ) (reset-sensors) ;; Important for evaluate-d. (evolution) (format t "~%To see hints how to continue, type: (h)") (values) ) ;;----------------------------------------------------------------------------- (defun re-start () (start nil) ) ;;============================================================================= (defun agent (&optional (n 0)) (cond ((zerop n) (format t "Perfect agent provided for testing purposes.") '(cond ((and *e* (or (not *n*) (not *ne*))) #\e) ((and *s* (or (not *e*) (not *se*))) #\s) ((and *w* (or (not *s*) (not *sw*))) #\w) (t #\n) ) ) ((minusp n) (aref *previous-generation* (- -1 n))) ((plusp n) (aref *current-generation* (1- n))) ) )
5,923
Common Lisp
.l
155
33.729032
80
0.600556
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
05a082449c754dc6e576b297be738998fdfbdb4075dd0b7dbe21f704d654dd2d
27,072
[ -1 ]
27,073
genetic.lsp
plazajan_Wall-Follower-Evolutionary-Programming/genetic.lsp
;; genetic.lsp ;; Generic genetic/evolutionary programming environment ;; Evolutionary programming in LISP ;; educational software inspired by Nils. J. Nilsson ;; March 23, 2000 ;; https://github.com/plazajan ;; (c) 2000 Jan A. Plaza ;; This file is part of LISP-Evolutionary-Programming-Wall-Follower. ;; LISP-Evolutionary-Programming-Wall-Follower is free software: ;; you can redistribute it and/or modify it under the terms of ;; the GNU General Public License as published by the Free Software Foundation, ;; either version 3 of the License, or (at your option) any later version. ;; LISP-Evolutionary-Programming-Wall-Follower is distributed in the hope ;; that it will be useful, but WITHOUT ANY WARRANTY; ;; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. ;; See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with LISP-Evolutionary-Programming-Wall-Follower. ;; If not, see https://www.gnu.org/licenses/. ;;============================================================================= ;; Global variables which allow the user to pause, experiment with this data, ;; and then restart main. ;; (To keep program clear, only function evolution modifies these variables.) (defvar *previous-generation*) ;; Array of agents. (defvar *current-generation*) ;; Array of agents. (defvar *fitness-data*) ;; Array of integers. (defvar *generation-number*) ;; Number of the current generation. (defvar *start-time*) ;; Time when we start creating generation 0. (defvar *time-spent*) ;; Internal time spent on evolution before a pause. ;;============================================================================= (defun print-gp-header (&optional (stream t)) (format stream " Gen Time Prf Avg 100 90 80 70 60 50 40 30 20 10 0" ) (when (eq stream T) (force-output)) ) ;;----------------------------------------------------------------------------- (defun print-gp-statistics ;; Parameters. (generation-number time-spent perfect sum fitness-data &optional (stream t)) ;; Body. (format stream "~&~4d ~7,2f ~4d ~3d ~3d ~3d ~3d ~3d ~3d ~3d ~3d ~3d ~3d ~3d ~3d" generation-number (/ time-spent internal-time-units-per-second) perfect (round (/ sum *population-size*)) ;; Average fitness. (aref fitness-data (round (* 0 (/ *population-size* 10)))) (aref fitness-data (round (* 1 (/ *population-size* 10)))) (aref fitness-data (round (* 2 (/ *population-size* 10)))) (aref fitness-data (round (* 3 (/ *population-size* 10)))) (aref fitness-data (round (* 4 (/ *population-size* 10)))) (aref fitness-data (round (* 5 (/ *population-size* 10)))) (aref fitness-data (round (* 6 (/ *population-size* 10)))) (aref fitness-data (round (* 7 (/ *population-size* 10)))) (aref fitness-data (round (* 8 (/ *population-size* 10)))) (aref fitness-data (round (* 9 (/ *population-size* 10)))) (aref fitness-data (1- *population-size*)) ;; last element ) (when (eq stream T) (force-output)) ) ;;----------------------------------------------------------------------------- ;; print-gp-agent <index> [<stream>] ;; Prints to the output stream (file) a list with ;; the string containing date and time when the experiment begun, ;; the generation number of the agent, the score of the agent and the agent. (defun print-gp-agent (index &optional (stream t)) (pprint (list *start-time* *generation-number* (aref *fitness-data* index) (aref *current-generation* index) ) stream ) (terpri stream) ) (defun save-agent (agent) (with-open-file (agents-stream "log.dat" :direction :output :if-exists :append :if-does-not-exist :create ) (pprint (list *start-time* "Saved by the user after generation:" *generation-number* (apply (symbol-function *evaluation-method*) agent nil) agent ) agents-stream ) (terpri agents-stream) ) ) ;;============================================================================= ;; tournament ;; This function returns the index of the most fit among ;; *tournament-size* randomly chosen agents. (defun tournament (fitness-data) (let ((best (random *population-size*)) ;; index of best so far. current ;; index of current agent ) ;; Body (dotimes (i (1- *tournament-size*) best) (setq current (random *population-size*)) (when (> (aref fitness-data current) (aref fitness-data best)) (setq best current) ) ) ) ) ;;----------------------------------------------------------------------------- ;; mysort ;; Sorting function. ;; key-array and info-array are of the same length. ;; key-array contains integers (from the range 0..100 and ;; its initial fragment is sorted in a decreasing order, although it is ;; not guaranteed that this initial segment contains the biggest numbers ;; of this array). ;; The task is to sort key-array in a decreasing order, ;; simultaneously performing the same swaps in info-array (defun mysort (key-array info-array) (let* ((length (array-dimension key-array 0)) (aux-array (make-array length)) ) (dotimes (i length nil) (setf (aref aux-array i) (cons (aref key-array i) (aref info-array i)) ) ) (sort aux-array #'> :key #'car) ;; sort is built in (dotimes (i length nil) (setf (aref key-array i) (car (aref aux-array i))) (setf (aref info-array i) (cdr (aref aux-array i))) ) nil ) ) ;;----------------------------------------------------------------------------- (defun next-generation (previous-generation fitness-data new-generation) (let* ;; Local variables ( (new-index 0) (crossovers (round (/ (* *crossover-percent* *population-size*) 200))) ;; that many crossovers, each producing two agents. (survivors (round (/ (* *survive-percent* *population-size*) 100))) (mutations (- *population-size* (* 2 crossovers) survivors)) agent1 agent2 two-agents ) ;; Body. ;; Perform crossovers. (dotimes (i crossovers nil) (setq agent1 (aref previous-generation (tournament fitness-data))) (setq agent2 (aref previous-generation (tournament fitness-data))) (setq two-agents (apply (symbol-function *crossover-operation*) agent1 agent2 nil) ) (setf (aref new-generation new-index) (first two-agents)) (incf new-index) ;; increment (setf (aref new-generation new-index) (second two-agents)) (incf new-index) ) ;; Perform random mutations. (dotimes (i mutations nil) (setf (aref new-generation new-index) (apply (symbol-function *mutation-operation*) (aref previous-generation (tournament fitness-data)) nil ) ) (incf new-index) ) ;; Allow some agents from previous-generation to survive in new-generation. (dotimes (i survivors nil) (setf (aref new-generation new-index) (aref previous-generation (if *only-best-survive* i (tournament fitness-data)) ;; i or random ) ) (incf new-index) ) ) ) ;;----------------------------------------------------------------------------- (defun evolution () ;; See the note about global variables, at the beginning of this file. (let* ;; Local variables. (start-time temp sum ;; Sum of fitness values. perfect ;; Count of perfect (100) scores. count ) ;; Body. (clear-input) (with-open-file (results-stream "log.txt" :direction :output :if-exists :append :if-does-not-exist :create ) (with-open-file (agents-stream "log.dat" :direction :output :if-exists :append :if-does-not-exist :create ) (if (eq *generation-number* -1) (tee-n (print-gp-header results-stream)) (print-gp-header) ) (loop ;; Get CPU time. (setq start-time (get-internal-run-time)) ;; Create a generation of agents. (incf *generation-number*) (cond ((eq *generation-number* 0) ;; Create generation 0. (dotimes (i *population-size* nil) (setf (aref *current-generation* i) (apply (symbol-function *random-agent-generator*) nil) ) ) ) (T ;; Otherwise create next generation. (setq temp *previous-generation*) (next-generation *current-generation* *fitness-data* temp) (setq *previous-generation* *current-generation*) (setq *current-generation* temp) ) ) ;; Evaluate all agents. (dotimes (i *population-size* nil) (setf (aref *fitness-data* i) (apply (symbol-function *evaluation-method*) (aref *current-generation* i) nil ) ) ) ;; Sort agents by fitness values. (mysort *fitness-data* *current-generation*) ;; Find the sum of fitness values. (setq sum 0) (dotimes (i *population-size* nil) (incf sum (aref *fitness-data* i)) ) ;; Save best agents. (dotimes (i *min-best-agents-saved* nil) (print-gp-agent i agents-stream) ) ;; Find the number of perfect (100) scores and save perfect agents. (setq perfect 0) (loop (when (< (aref *fitness-data* perfect) 100) (return)) (when (and (< perfect *max-perfect-agents-saved*) (>= perfect *min-best-agents-saved*) ) (print-gp-agent perfect agents-stream) ) (incf perfect) ) ;; Update the total time spent on evolution. (incf *time-spent* (- (get-internal-run-time) start-time)) ;; Print statistics. (tee-n (print-gp-statistics *generation-number* *time-spent* perfect sum *fitness-data* results-stream ) ) ;; Return from loop if user pressed enter. (setq count 0) (when (loop (when (listen) (clear-input) (return T)) (when (>= count *generation-delay*) (return nil)) (incf count) ;; increment (sleep 1) ) (return) ) ) ;; End loop. (tee-n (terpri results-stream)) ) ;; End with-open-file. ) ;; End with-open-file. (values) ;; Return 0 values. ) ) ;;=============================================================================
11,015
Common Lisp
.l
298
30.016779
80
0.569796
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
71116e3f922604b3fcee7f06eb88311093809441f65a3ca9f220c0a4f19b18f0
27,073
[ -1 ]
27,074
world1.dat
plazajan_Wall-Follower-Evolutionary-Programming/world1.dat
############# ### # ### ## # ## # # # # # # ### ### # # # # # # ## # ## ### # ### #############
181
Common Lisp
.l
13
13
13
0
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
7afa2158ce233a18b3c8f47a9b9d862b50d9955e843b8e58c5b8734e12d06d10
27,074
[ -1 ]
27,075
evaluate.lsp
plazajan_Wall-Follower-Evolutionary-Programming/evaluate.lsp
;; evaluate.lsp ;; Evolutionary programming in LISP ;; educational software inspired by Nils. J. Nilsson ;; March 20, 2000 ;; https://github.com/plazajan ;; (c) 2000 Jan A. Plaza ;; This file is part of LISP-Evolutionary-Programming-Wall-Follower. ;; LISP-Evolutionary-Programming-Wall-Follower is free software: ;; you can redistribute it and/or modify it under the terms of ;; the GNU General Public License as published by the Free Software Foundation, ;; either version 3 of the License, or (at your option) any later version. ;; LISP-Evolutionary-Programming-Wall-Follower is distributed in the hope ;; that it will be useful, but WITHOUT ANY WARRANTY; ;; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. ;; See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with LISP-Evolutionary-Programming-Wall-Follower. ;; If not, see https://www.gnu.org/licenses/. ;;============================================================================= ;; Evaluating fitness of an agent and displaying its movements. ;; Special variables ;; used for efficiency -- do not copy parameters of frequently used functions. (defvar *row*) ;; Current position of the current agent in *world*: (defvar *column*) ;; 0..*max-rows*-1, 0..*max-columns*-1. (defvar *e* ) ;; True if the place to the east of current position is free (defvar *se*) ;; otherwise false, (defvar *s* ) ;; etc. (defvar *sw*) (defvar *w* ) (defvar *nw*) (defvar *n* ) (defvar *ne*) (defvar *came-from* nil) ;; One of #\e, #\s, #\w, #\n where agent came from. (defvar *score-s*) ;; Count of steps which ended at the wall. (s is for steps). (defvar *normalization-factor-s*) ;; For evaluate-s (defvar *normalization-factor-c*) ;; For evaluate-c ;;----------------------------------------------------------------------------- (defun set-world-related-parameters () (setq *world* (prepare-world *grid-world-file*)) (setq *max-rows* (array-dimension *world* 0)) (setq *max-columns* (array-dimension *world* 1)) (setq *at-the-wall* (count-at-the-wall-places *world* *max-rows* *max-columns*) ) (setq *normalization-factor-s* (/ 100 *tours* *tour-length*)) (setq *normalization-factor-c* (/ 100 *tours* (min *tour-length* *at-the-wall*)) ) ) ;;----------------------------------------------------------------------------- (defmacro reset-sensors () '(setq *e* T *se* T *s* T *sw* T *w* T *nw* T *n* T *ne* T) ) ;;----------------------------------------------------------------------------- ;; Update sensory data: *e*, *se*, ... . (defmacro read-sensors () '(progn (setq *e* (aref *world* *row* (1+ *column*))) (setq *se* (aref *world* (1+ *row*) (1+ *column*))) (setq *s* (aref *world* (1+ *row*) *column*) ) (setq *sw* (aref *world* (1+ *row*) (1- *column*))) (setq *w* (aref *world* *row* (1- *column*))) (setq *nw* (aref *world* (1- *row*) (1- *column*))) (setq *n* (aref *world* (1- *row*) *column*) ) (setq *ne* (aref *world* (1- *row*) (1+ *column*))) ) ) ;;----------------------------------------------------------------------------- ;; The following code defines how fitness is evaluated. ;; Tries to move, updates sensory data, *came-from*, *score-s*, ;; if the new position is at the wall, marks it by a + ;; (these +'s will be counted by evaluate-c). ;; If the agent pushes against a wall, ;; no movement takes place and score-s stays the same. ;; If the agent's new position is far from the wall, score-s stays the same. ;; If the agent goes where it came from, score-s stays the same. ;; Otherwise score-s is incremented by 1. ;; If the move was not successful, nil is returned, otherwise a true value. (defmacro east () '(when *e* ;; if the way to the east is free ... (incf *column*) ;; Set new position. (cond ((characterp (aref *world* *row* *column*)) ;; If at the wall ... (setq *sw* *s*) ;; *sw* is now what *s* used to be ... (setq *w* T) (setq *nw* *n*) (setq *s* *se*) (setq *n* *ne*) (setq *ne* (aref *world* (1- *row*) (1+ *column*))) (setq *e* (aref *world* *row* (1+ *column*))) (setq *se* (aref *world* (1+ *row*) (1+ *column*))) (setf (aref *world* *row* *column*) #\+) ;; Mark cell being visited. (unless (eq *came-from* #\e) (incf *score-s*)) ;; Increment *score-s* ) (T ;; If far from the wall ... (setq *e* T *se* T *s* T *sw* T *w* T *nw* T *n* T *ne* T) ) ) (setq *came-from* #\w) ) ) (defmacro south () '(when *s* ;; if the way to the south is free ... (incf *row*) (cond ((characterp (aref *world* *row* *column*)) (setq *nw* *w*) (setq *n* T) (setq *ne* *e*) (setq *w* *sw*) (setq *e* *se*) (setq *se* (aref *world* (1+ *row*) (1+ *column*))) (setq *s* (aref *world* (1+ *row*) *column*) ) (setq *sw* (aref *world* (1+ *row*) (1- *column*))) (setf (aref *world* *row* *column*) #\+) (unless (eq *came-from* #\s) (incf *score-s*)) ) (T (setq *e* T *se* T *s* T *sw* T *w* T *nw* T *n* T *ne* T) ) ) (setq *came-from* #\n) ) ) (defmacro west () '(when *w* ;; if the way to the west is free ... (decf *column*) ;; decrement by 1 (cond ((characterp (aref *world* *row* *column*)) (setq *ne* *n*) (setq *e* T) (setq *se* *s*) (setq *s* *sw*) (setq *n* *nw*) (setq *sw* (aref *world* (1+ *row*) (1- *column*))) (setq *w* (aref *world* *row* (1- *column*))) (setq *nw* (aref *world* (1- *row*) (1- *column*))) (setf (aref *world* *row* *column*) #\+) (unless (eq *came-from* #\w) (incf *score-s*)) ) (T (setq *e* T *se* T *s* T *sw* T *w* T *nw* T *n* T *ne* T) ) ) (setq *came-from* #\e) ) ) (defmacro north () '(when *n* ;; if the way to the north is free ... (decf *row*) (cond ((characterp (aref *world* *row* *column*)) (setq *se* *e*) (setq *s* T) (setq *sw* *w*) (setq *e* *ne*) (setq *w* *nw*) (setq *nw* (aref *world* (1- *row*) (1- *column*))) (setq *n* (aref *world* (1- *row*) *column*) ) (setq *ne* (aref *world* (1- *row*) (1+ *column*))) (setf (aref *world* *row* *column*) #\+) (unless (eq *came-from* #\n) (incf *score-s*)) ) (T (setq *e* T *se* T *s* T *sw* T *w* T *nw* T *n* T *ne* T) ) ) (setq *came-from* #\s) ) ) ;;----------------------------------------------------------------------------- (defun evaluate-c (agent) "count different visited Cells at the wall." ;; Documentation. (setq *score-s* 0) ;; the value does not matter in evaluate-c (let ((score-c 0)) ;; Count of different visited cells at the wall. ;; Body (dotimes (i *tours* nil) ;; Set random position (loop (setq *row* (random *max-rows*)) (setq *column* (random *max-columns*)) (when (characterp (aref *world* *row* *column*)) (return)) ) (read-sensors) ;; Make one tour (dotimes (i *tour-length* nil) (case (eval agent) (#\e (east)) (#\s (south)) (#\w (west)) (#\n (north)) ) ) (incf score-c (count-erase-visited-places *world* *max-rows* *max-columns*) ) ) (round (* score-c *normalization-factor-c*)) ) ) ;;----------------------------------------------------------------------------- (defun evaluate-s (agent) "count steps which ended at the wall." ;; Documentation. (setq *score-s* 0) (dotimes (i *tours* nil) ;; Set random position (loop (setq *row* (random *max-rows*)) (setq *column* (random *max-columns*)) (when (characterp (aref *world* *row* *column*)) (return)) ) (read-sensors) (setq *came-from* nil) (dotimes (i *tour-length* nil) (case (eval agent) (#\e (east)) (#\s (south)) (#\w (west)) (#\n (north)) ) ) ) (round (* *score-s* *normalization-factor-s*)) ) ;;----------------------------------------------------------------------------- ;; A function to display given character at agent's position. (defun display-position (char) (move-cursor (1+ *row*) (1+ *column*)) ;; *row* = 0 means screen row = 1 (write-char char) (delay *step-delay*) ) ;;============================================================================= ;; #.. .#. ..# ... ... ... ... ... ;; .x. ... - .x. .x# - .x. .x. - .x. #x. - ;; ... ... ... ... ..# .#. #.. ... ;; | | | | | | | | ;; ##. .## ..# ... ... ... ... #.. ;; .x. .x. .x# .x# .x. .x. #x. #x. ;; ... ... ... ..# .## ##. #.. ... ;; | | | | | | | | ;; ### .## ..# ... ... ... #.. ##. ;; .x. .x# .x# .x# .x. #x. #x. #x. ;; ... ... ..# .## ### ##. #.. ... ;; | | | | | | | | ;; ### .## ..# ... ... #.. ##. ### ;; .x# .x# .x# .x# #x. #x. #x. #x. ;; ... ..# .## ### ### ##. #.. ... ;; \ / \ / \ / \ / ;; ### ..# #.. ### ;; .x# .x# #x. #x. ;; ..# ### ### #.. ;; evaluate-d ;; Precondition: sensors *e*, ..., *ne* must be all set to t; ;; non-local variables ... must be set. ;; Postcondition: sensors *e*, ..., *ne* are all set to t; ;; the score 0..100 is returned ;; The following macro is used only in test-agent. ;; It uses variables agent, clockwise-along-the-wall, counter-clockwise ... (defmacro test-agent0 (primary secondary &rest away) `(case (eval agent) (,primary (incf clockwise-along-the-wall)) (,secondary (incf counter-clockwise-along-the-wall)) (,away (incf away-from-the-wall)) (otherwise (incf against-the-wall)) ) ) (defmacro test-agent () '(let ((clockwise-along-the-wall 0) (counter-clockwise-along-the-wall 0) (away-from-the-wall 0) (against-the-wall 0) ) ;; Body. (setq *nw* nil) (test-agent0 #\n #\w #\s #\e) (setq *n* nil) (test-agent0 #\e #\w #\s) (setq *ne* nil) (test-agent0 #\e #\w #\s) (setq *e* nil) (test-agent0 #\s #\w) (setq *se* nil) (test-agent0 #\s #\w) (setq *nw* T) (test-agent0 #\s #\w) (setq *se* T) (test-agent0 #\s #\w) (setq *e* T) (test-agent0 #\e #\w #\s) (setq *ne* T) (test-agent0 #\e #\w #\s) (setq *n* T) (setq *ne* nil) (test-agent0 #\e #\n #\w #\s) (setq *e* nil) (test-agent0 #\s #\n #\w) (setq *se* nil) (test-agent0 #\s #\n #\w) (setq *s* nil) (test-agent0 #\w #\n) (setq *sw* nil) (test-agent0 #\w #\n) (setq *ne* T) (test-agent0 #\w #\n) (setq *sw* T) (test-agent0 #\w #\n) (setq *s* T) (test-agent0 #\s #\n #\w) (setq *se* T) (test-agent0 #\s #\n #\w) (setq *e* T) (setq *se* nil) (test-agent0 #\s #\e #\n #\w) (setq *s* nil) (test-agent0 #\w #\e #\n) (setq *sw* nil) (test-agent0 #\w #\e #\n) (setq *w* nil) (test-agent0 #\n #\e) (setq *nw* nil) (test-agent0 #\n #\e) (setq *se* T) (test-agent0 #\n #\e) (setq *nw* T) (test-agent0 #\n #\e) (setq *w* T) (test-agent0 #\w #\e #\n) (setq *sw* T) (test-agent0 #\w #\e #\n) (setq *s* T) (setq *sw* nil) (test-agent0 #\w #\s #\e #\n) (setq *w* nil) (test-agent0 #\n #\s #\e) (setq *nw* nil) (test-agent0 #\n #\s #\e) (setq *n* nil) (test-agent0 #\e #\s) (setq *ne* nil) (test-agent0 #\e #\s) (setq *sw* T) (test-agent0 #\e #\s) (setq *ne* T) (test-agent0 #\e #\s) (setq *n* T) (test-agent0 #\n #\s #\e) (setq *nw* T) (test-agent0 #\n #\s #\e) (setq *w* T) (values clockwise-along-the-wall counter-clockwise-along-the-wall away-from-the-wall against-the-wall ) ) ) ;------------------------------------------------------------------------------ (defun evaluate-d (agent) "evaluate decisions made by the agent in 36 possible situations." (multiple-value-bind ;; Local variables. (clockwise ;; Number of clockwise moves along the wall. counter-clockwise ;; Number of counter clockwise moves along the wall. away ;; Number of moves stepping away from the wall. against ;; Number of moves when agent pushes against the wall. ) ;; Form which initializes the first four local variables. (test-agent) ;; This macro uses the variable agent. ;; Body (values (round (funcall (symbol-function *score-calculation*) clockwise counter-clockwise away against ) ) ) ) ) ;;----------------------------------------------------------------------------- ;; Updates *row* *column* to a random position at the wall. ;; (Any agent which is far from walls will move in a straight line ;; so a starting position far from walls would not help in evaluation.) ;; Then allows the agent to walk in the grid world and evaluates fitness. ;; (This function uses global variables *row* *column*, *e*, ..., *score*) (defun run-agent (agent) (let ((score-c 0) ;; Count of visited places at the wall. (v is for visited.) clockwise counter-clockwise away against ) ;; Body (set-world-related-parameters) (clear-screen) (setq *score-s* 0) (dotimes (i *tours* nil) ;; Set random position (loop (setq *row* (random *max-rows*)) (setq *column* (random *max-columns*)) (when (characterp (aref *world* *row* *column*)) (return)) ) (read-sensors) (setq *came-from* nil) (move-cursor 1 1) (display-world *world*) (display-position #\x) (dotimes (i *tour-length* nil) ;; make one step (case (eval agent) (#\e (east)) (#\s (south)) (#\w (west)) (#\n (north)) ) (display-position #\.) ) (incf score-c (count-erase-visited-places *world* *max-rows* *max-columns*) ) (finish-output) (delay 1) ;; Delay between tours. ) (move-cursor (1+ *max-rows*) 1) (reset-sensors) (multiple-value-setq (clockwise counter-clockwise away against) (test-agent) ) (format t " This agent, in 36 possible situations makes: ~2d moves clockwise along the wall, ~2d moves counter-clockwise along the wall, ~2d moves getting away from the wall, and ~2d moves trying to push against the wall. Fitness on scale 0..100: ~3d -- counting different cells at the wall the agent visited (evaluate-c), ~3d -- counting steps which ended at the wall (evaluate-s). ~3d -- ~a ~3d -- ~a ~3d -- ~a ~3d -- ~a" clockwise counter-clockwise away against (round (* score-c *normalization-factor-c*)) (round (* *score-s* *normalization-factor-s*)) (values (round (score1 clockwise counter-clockwise away against))) (documentation 'score1 'function) (values (round (score2 clockwise counter-clockwise away against))) (documentation 'score2 'function) (values (round (score3 clockwise counter-clockwise away against))) (documentation 'score3 'function) (values (round (score4 clockwise counter-clockwise away against))) (documentation 'score4 'function) ) ;; Add score computed by *score-calculation* if not listed above. (values) ) ) ;;----------------------------------------------------------------------------- ;; Perfect agent. (for testing purposes) (defparameter *perfect-agent* '(cond ((and *e* (or (not *n*) (not *ne*))) #\e) ((and *s* (or (not *e*) (not *se*))) #\s) ((and *w* (or (not *s*) (not *sw*))) #\w) (t #\n) ) ) ;;-----------------------------------------------------------------------------
16,298
Common Lisp
.l
441
32.108844
80
0.502941
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
ffd2be6d7212ece53b539a8ec89245c7eee1a7f83b4e79b885b6f6b93a6f5a13
27,075
[ -1 ]
27,076
world.lsp
plazajan_Wall-Follower-Evolutionary-Programming/world.lsp
;; world.lsp -- Prepare and display grid world. ;; Evolutionary programming in LISP ;; educational software inspired by Nils. J. Nilsson ;; March 17, 2000 ;; https://github.com/plazajan ;; (c) 2000 Jan A. Plaza ;; This file is part of LISP-Evolutionary-Programming-Wall-Follower. ;; LISP-Evolutionary-Programming-Wall-Follower is free software: ;; you can redistribute it and/or modify it under the terms of ;; the GNU General Public License as published by the Free Software Foundation, ;; either version 3 of the License, or (at your option) any later version. ;; LISP-Evolutionary-Programming-Wall-Follower is distributed in the hope ;; that it will be useful, but WITHOUT ANY WARRANTY; ;; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. ;; See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with LISP-Evolutionary-Programming-Wall-Follower. ;; If not, see https://www.gnu.org/licenses/. ;;============================================================================= ;; Grid world will be read from a file. ;; The file is assumed to contain an outline of a grid world ;; made of space, # and newline characters (other characters are illegal). ;; (For efficiency reasons do not put extra spaces at the end of a line.) ;; The information will be stored in a two-dimensional array. ;; The values in the array can be thought of as answers to the question ;; "Is the cell free?" ;; If cell is NOT free, the value nil will be stored; ;; if cell is free and next to a wall, the character + will be stored; ;; if cell is free but far from walls, value T will be stored. ;;============================================================================= ;; Global variables ;; *world* is a two-dimensional array representing the grid world. ;; It is initialized in main.lsp using the file specified in *grid-world-file*. ;; Once these variables are initialized, their values do not change. ;; (We do not make them constants to allow the user working in the ;; interactive lisp environment to change *grid-world-file* ;; If a cell is NOT free, the value nil will be stored; ;; if a cell is free and next to a wall, the character - will be stored; ;; if a cell is free but far from walls, value T will be stored. (defvar *world*) (defvar *max-rows*) (defvar *max-columns*) (defvar *at-the-wall*) ;;============================================================================= ;; This function displays the array representing grid world. ;; It does NOT clear the screen before. ;; Prerequisite: the cursor must be at the beginning of a line (defun display-world (world &optional (stream t)) (dotimes (row (array-dimension world 0) nil) (dotimes (column (array-dimension world 1) nil) (if (aref world row column) ;; If place is free ... (write-char #\ stream) ;; then write space (write-char #\# stream) ;; else write # ) ) (terpri stream) ;; newline ) ) ;;----------------------------------------------------------------------------- ;; Prepare and display world. (defun prepare-world (filename) (let* ;; local variables ((dimensions (find-dimensions filename)) (rows (first dimensions)) (columns (second dimensions)) (world (make-array `(,rows ,columns) :initial-element nil)) ) ;; body (initialize-from-file filename world rows columns) (add-outside-walls world rows columns) (mark-at-the-wall-positions world rows columns) world ) ) ;;----------------------------------------------------------------------------- (defun find-dimensions (filename) (let (c ;; Character (new-row T) (row 0) (column 0) (max-column 0) ) (with-open-file (world-stream filename :direction :input) (loop (setq c (read-char world-stream nil)) (unless c (return `(,row ,max-column))) (case (char-code c) (13 nil) ;; skip CR character (CRLF used in DOS) (10 ;; handling the newline character LF (setq new-row T) (setq column 0) ) (otherwise (when new-row (setq new-row nil) (incf row)) (incf column) (when (> column max-column) (setq max-column column)) ) ) ) ) ) ) ;; ---------------------------------------------------------------------------- ;; This function will change the contents of array world ;; (the function will return nil. (defun initialize-from-file (filename world rows columns) (with-open-file (world-stream filename :direction :input) (do* ;;loop parameters ( (c (read-char world-stream nil) ;; initial value (read-char world-stream nil) ;; update form ) (row 0) ;; row 0 in array corresponds to row 1 on screen. (column 0) ;; column 0 in array corresponds to column 1 on screen. ) ;; loop termination test and result form ((not c) nil) ;; loop body (cond ((>= row rows) nil) ;; skip a character in such a position ((= (char-code c) 13) nil) ;; skip CR character (CRLF is used in DOS) ((= (char-code c) 10) ;; handling the newline character LF (incf row) (setq column 0) ) ((>= column columns) nil) ;;skip a character in such a position ((eq c #\#) ;; # character. (setf (aref world row column) nil) ;; nil means not free. (incf column) ) ((eq c #\ ) ;; Space character. (setf (aref world row column) T) ;; T means free. (incf column) ) (T (format t "Invalid character in ~a at row ~a and column ~a." filename (1+ row) (1+ column) ) (incf column) ) ) ) ) ) ;; ---------------------------------------------------------------------------- ;; Frame world with nil's. ;; This function will change the contents of array world ;; (the function will return nil. (defun add-outside-walls (world rows columns) (dotimes (row rows nil) (setf (aref world row 0) nil) (setf (aref world row (1- columns)) nil) ) (dotimes (column columns nil) (setf (aref world 0 column) nil) (setf (aref world (1- rows) column) nil) ) ) ;; ---------------------------------------------------------------------------- ;; Mark places next to walls and obstacles with -'s. ;; Calculate how many such places. ;; Must be called after add-outside-walls. ;; This function will change the contents of array world ;; The function will return nil. (defun mark-at-the-wall-positions (world rows columns) (dotimes (row rows nil) (dotimes (column columns nil) (when (and (aref world row column) ;; when at a free position (not ;; not (and ;; all surrounding positions are free ... (aref world row (1+ column)) (aref world (1+ row) (1+ column)) (aref world (1+ row) column) (aref world (1+ row) (1- column)) (aref world row (1- column)) (aref world (1- row) (1- column)) (aref world (1- row) column) (aref world (1- row) (1+ column)) ) ) ) (setf (aref world row column) #\-) ) ) ) ) ;;============================================================================= (defun count-at-the-wall-places (world rows columns) (let ((count 0)) ;; let's body (dotimes (row rows count) ;; return count (dotimes (column columns count) ;; return count (when (eq (aref world row column) #\-) (incf count)) ) ) ) ) ;;----------------------------------------------------------------------------- ;; This function returns two lists with row and column coordinates of places ;; which are at the wall. (defun list-at-the-wall-places (world rows columns) (let ((row-coordinates nil) (column-coordinates nil) ) (dotimes (row rows nil) (dotimes (column columns nil) ;; return count (when (eq (aref world row column) #\-) (push row row-coordinates) (push column column-coordinates) ) ) ) (list row-coordinates column-coordinates) ) ) ;;----------------------------------------------------------------------------- ;; In one evaluation method, an agent marks visited places at the wall ;; by a #\+. This function counts these +'s and changes them back to -'s. ;; (It is assumed that a + may occur only at the wall.) ;; This function is called after every tour by evaluate-c -- improve ;; efficiency by looking only at the places at the wall (from a list). (defun count-erase-visited-places (world rows columns) (let* ((count 0) ) ;; let's body (dotimes (row rows count) ;; return count (dotimes (column columns count) ;; return count (when (eq (aref world row column) #\+) (setf (aref world row column) #\-) (incf count) ) ) ) ) ) ;;=============================================================================
9,335
Common Lisp
.l
247
32.214575
80
0.563307
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
46e67d845314c129c491af327e5ffd1781bb5affbbde9c969bd39a96ea49d730
27,076
[ -1 ]
27,077
output.lsp
plazajan_Wall-Follower-Evolutionary-Programming/output.lsp
;; print.lsp ;; Printing messages related to gp.lsp. ;; Evolutionary programming in LISP ;; educational software inspired by Nils. J. Nilsson ;; March 16, 2000 ;; https://github.com/plazajan ;; (c) 2000 Jan A. Plaza ;; This file is part of LISP-Evolutionary-Programming-Wall-Follower. ;; LISP-Evolutionary-Programming-Wall-Follower is free software: ;; you can redistribute it and/or modify it under the terms of ;; the GNU General Public License as published by the Free Software Foundation, ;; either version 3 of the License, or (at your option) any later version. ;; LISP-Evolutionary-Programming-Wall-Follower is distributed in the hope ;; that it will be useful, but WITHOUT ANY WARRANTY; ;; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. ;; See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with LISP-Evolutionary-Programming-Wall-Follower. ;; If not, see https://www.gnu.org/licenses/. ;;============================================================================= (defun print-introduction (&optional (stream t)) (format stream " EVOLUTIONARY PROGRAMMING EXPERIMENT An agent in a grid world repeatedly senses its immediate surroundings, has no memory of earlier positions, and makes a step. This program tries to evolve an agent which finds a wall and continues moving along the wall. " ) ) ;;----------------------------------------------------------------------------- (defun print-gp-experiment (&optional (stream t)) (terpri stream) (terpri stream) (dotimes (i 80 nil) (write-char #\= stream)) (format stream " NEW EXPERIMENT ~a PARAMETERS" (time-string) ) ) ;;----------------------------------------------------------------------------- (defun print-gp-explanations (&optional (stream t)) (format stream " ABOUT OUTPUT DATA Agents are evaluated on scale 0..100. The following listing gives generation number, CPU time, number of agents with the perfect score of 100, average score, and percentiles from 100 (best score) to 0 (worst score): for instance, 53 under the header of 70 means that an agent with a score 53 is better than 70% of agents. " ) ) ;;----------------------------------------------------------------------------- (defun print-gp-instructions (&optional (stream t)) (format stream " INSTRUCTIONS To pause, press enter and wait until program completes current cycle. You will be able to look at the current generation and then restart." ) ) ;;----------------------------------------------------------------------------- (defun h (&optional (stream t)) (format stream " The values of parameters of this experiment and its statistics are saved in file log.txt. If parameters *min-best-agents-saved* and *max-perfect-agents-saved* are non-zero, another file, log.dat contains best agents, together with the starting time of the experiment, generation numbers and fitness scores. The starting time can be used for cross referencing. While still in the Lisp listener you can test the data produced by this evolution process. Arrays *previous-generation* and *current-generation* contain agents sorted with respect to fitness results, from highest to lowest. Array *fitness-data* corresponds to *current-generation*; sorry, no fitness results for previous generation. To see agents from *current-generation*, type (agent N) where N is 1, 2,... To see agents from *previous-generation*, type replace N by -1, -2, ... To run the best agent, type: (run-agent (agent 1)) To save the best agent in file log.dat, type: (save-agent (agent 1)) You can change the parameters of this process either by using setq in the Lisp listener or by calling function (e), editing the file and reloading. If *population-size* has been increased, restart option is not available. To restart the evolution process, type: (re-start) To start a new experiment, type: (start) " ) (values) ) ;;=============================================================================
4,121
Common Lisp
.l
93
42.021505
80
0.673072
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
80cbe3b41bb8d6b11bb8f67ae2a1f5caa3134c06bd533c3970566158120bd938
27,077
[ -1 ]
27,078
world2.dat
plazajan_Wall-Follower-Evolutionary-Programming/world2.dat
########## # # # # # # # # # # # # # ## # # ## # ##########
109
Common Lisp
.l
10
10
10
0
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
e879a6efc4dfb4ea2214e5adffb7df82109fc2d58aeaca77cd4b69cb3770314d
27,078
[ -1 ]
27,079
parameters.lsp
plazajan_Wall-Follower-Evolutionary-Programming/parameters.lsp
;; parameters.lsp ;; Evolutionary programming in LISP ;; educational software inspired by Nils. J. Nilsson ;; March 17, 2000 ;; https://github.com/plazajan ;; (c) 2000 Jan A. Plaza ;; This file is part of LISP-Evolutionary-Programming-Wall-Follower. ;; LISP-Evolutionary-Programming-Wall-Follower is free software: ;; you can redistribute it and/or modify it under the terms of ;; the GNU General Public License as published by the Free Software Foundation, ;; either version 3 of the License, or (at your option) any later version. ;; LISP-Evolutionary-Programming-Wall-Follower is distributed in the hope ;; that it will be useful, but WITHOUT ANY WARRANTY; ;; without even the implied warranty of MERCHANTABILITY ;; or FITNESS FOR A PARTICULAR PURPOSE. ;; See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with LISP-Evolutionary-Programming-Wall-Follower. ;; If not, see https://www.gnu.org/licenses/. ;; You can modify parameters in this file. ;; For advanced experiments, modify agents.lsp. ;; To run this program invoke lisp and type: (load "main") ;;============================================================================= (defparameter *evaluation-method* 'evaluate-d) ;; Use 'evaluate-c or 'evaluate-s or 'evaluate-d. ;; 'evaluate-c counts different visited *c*ells at the wall. ;; 'evaluate-s counts *s*teps which ended at the wall. See evaluate.lsp. ;; 'evaluate-d evaluates *d*ecisions made by agent in 36 possible situations. (defparameter *grid-world-file* "world1.dat") ;; Use "world1.dat" or "world2.dat" or create your own grid world file. ;; This is used by evaluate-c, evaluate-s and run-agent. (defparameter *tours* 1) ;; Use a positive integer. ;; That many tours of an agent will count while calculating agent's fitness. ;; This is used by evaluate-c, evaluate-s and run-agent. (defparameter *tour-length* 56) ;; Use positive integer. ;; This is used by evaluate-c, evaluate-s and run-agent. (defparameter *score-calculation* 'score2) ;; Use 'score1, 'score2, 'score3, 'score4 or define your own method. ;; This is used with evaluate-d. ;; To calculate the score we use the following parameters. ;; clockwise - number of clockwise moves along the wall. ;; counter-clockwise - number of counter clockwise moves along the wall. ;; away - number of times agent moved away from the wall. ;; against - number of moves when agent pushes against the wall. ;; Their values are obtained by testing the agent in 36 possible situations. ;; The functions below turn these 4 values into a single score 0..100. ;; (The second line in every function definition is a documentation string.) (defun score1 (clockwise counterclockwise away against) "normalized( clockwise - counterclockwise )" (declare (ignore away against)) (/ (+ 36 (- clockwise counterclockwise)) 0.72) ) (defun score2 (clockwise counterclockwise away against) "normalized( | clockwise - counterclockwise | )" (declare (ignore away against)) (/ (abs (- clockwise counterclockwise)) 0.36) ) (defun score3 (clockwise counterclockwise away against) "normalized( clockwise - counterclockwise - away - against )" (/ (+ 36 (- clockwise counterclockwise away against)) 0.72) ) (defun score4 (clockwise counterclockwise away against) "normalized( | clockwise - counterclockwise | - away - against )" (/ (+ 36 (- (abs (- clockwise counterclockwise)) away against)) 0.72) ) ;;----------------------------------------------------------------------------- (defparameter *random-agent-generator* 'random-agent2) ;; Use 'random-agent1 or 'random-agent2 defined in agents.lsp ;; or define your own function. (defparameter *agent-size* 3) ;; Use positive integer. ;; This is max height of randomly generated trees representing ;; Boolean expressions which are used in the definition of an agent. ;;----------------------------------------------------------------------------- (defparameter *population-size* 5000) ;; Use positive integer. ;;----------------------------------------------------------------------------- (defparameter *tournament-size* 7) ;; Use positive integer. ;; Agent is always selected in a tournament with that many random participants. ;;----------------------------------------------------------------------------- (defparameter *survive-percent* 10) (defparameter *crossover-percent* 89) (defparameter *mutation-percent* 1) ;; Use non-negative numbers which add up to 100. (defparameter *only-best-survive* nil) ;; Use nil or t. ;; If nil, winers of tournaments with randomly selected agents will survive. (defparameter *crossover-operation* 'crossover2) ;; Use 'crossover1 or 'crossover2 defined in agents.lsp ;; or define your own function. (defparameter *mutation-operation* 'mutation2) ;; Use 'mutation1 or 'mutation2 defined in agents.lsp ;; or define your own function. ;; Make sure that you are using operations compatible with the ;; structure of the agents produced by *random-agent-generator*. ;;----------------------------------------------------------------------------- (defparameter *step-delay* 0.05) ;; Use non-negative float. ;; Delay in seconds between steps displayed by run-agent. (defparameter *generation-delay* 1) ;; Use non-negative float. ;; Represents length of period, in seconds, after statistics are printed ;; when you can press enter to pause evolution. ;;----------------------------------------------------------------------------- (defparameter *min-best-agents-saved* 0) ;; Use a natural number not bigger than *population-size*. (defparameter *max-perfect-agents-saved* 1) ;; Use a natural number not bigger than *population-size*. ;; This program saves top agents in file log.dat. ;; For every generation, the program saves *min-best-agents-saved* best agents; ;; if all these agents have a perfect score of 100 and there are more such ;; agents, the program will continue saving them up to a total of ;; *max-perfect-agents-saved* ;; Notice that different evaluation functions may disagree on what agent ;; deserves the score of 100, so the meaning of "perfect" is relative. ;;=============================================================================
6,287
Common Lisp
.l
119
51.07563
80
0.680268
plazajan/Wall-Follower-Evolutionary-Programming
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
b3a4f416cec2b69b2e82e60376ff76788a72386aff5b0d60af0fe262b369541f
27,079
[ -1 ]
27,103
test1.lisp
paule32_Kurt_Goedel_Experiment/src/test1.lisp
;; ---------------------------------------------------- ;; my-project.lisp - a simple test. ;; ;; (c) 2022 by Jens Kallup - paule32 ;; all rights reserved. ;; ;; Notes (2022-12-18): ;; - you have to install "quicklisp.lisp" on seperate ;; file. Then you have to create the file "quick.ok" ;; in the working directory where this source file(s) ;; exists. ;; ---------------------------------------------------- (format T "Please wait, loading packages ...~%") #-quicklisp (let ((quicklisp-init "quicklisp/setup.lisp")) (when (probe-file quicklisp-init) (load quicklisp-init))) (with-open-stream (*standard-output* (make-broadcast-stream)) (ql:quickload :mito) (ql:quickload '(:qtools :qtcore :qtgui)) ) ;; ---------------------------------------------------- ;; global scope ;; ---------------------------------------------------- (defvar *grammar*) (defvar *alist*) (defvar *i0*) (defvar *i1*) (defvar *i2*) ;; ---------------------------------------------------- ;; functions: ;; ---------------------------------------------------- (defun test1 () (progn (setq *alist* '( (1 . ich) (2 . du) (10 . habe) (20 . dich) (30 . gefragt) )) (setq *grammar* '((1) (1 10) (1 10 20) (1 10 20 30))) (setq *i0* (assoc '1 *grammar*)) (setq *i1* (progn (cdr (assoc '1 *alist* )) (cdr (assoc '10 *alist* )) )) (setq *i0* '(1 10 20)) (setq *i1* (loop for x in *i0* collect (car (assoc x *alist* )))) (setq *i2* (loop for y in *i0* collect (cdr (assoc y *alist* )))) (print *i1* ) (print *i2* ) (if (eq T (equal '(ich habe dich) *i2*)) (progn (format T "~%Der Satz ist richtig.") (exit) ) (progn (format T "~%Der Satz ist falsch .") (exit) ) ) )) ;; ---------------------------------------------------- ;; entry, exception handler ... ;; ---------------------------------------------------- (handler-case (progn (with-open-file (stream "quick.ok" :direction :input :if-does-not-exist :error)) (format T "start test 1 ...~%") (test1)) (error (c) (progn (format T "QuickLisp missing.~%") (load "quicklisp") (exit) )))
2,285
Common Lisp
.lisp
81
23.82716
69
0.444749
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
6c05fdbc2e86e373044592b5c74983c68d2b0733159d5c6365de5d6af9e8716e
27,103
[ -1 ]
27,105
my-project.asd
paule32_Kurt_Goedel_Experiment/src/my-project.asd
;---------------------------------------------------- ; my-project.lisp - a simple test. ; ; (c) 2022 by Jens Kallup - paule32 ; all rights reserved. ;---------------------------------------------------- (defsystem "my-project" :version "0.0.1" :author "Jens Kallup - paule32" :license "MIT" :depends-on ("quicklisp" "mito" "qt") :components ((:module "src" :components ((:file "main")))) :description "My Test Project")
503
Common Lisp
.asd
15
28.466667
53
0.433265
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
6435df7fd57787dd3a2b534232cabfdee65b376931c61271c9d485c464e28a63
27,105
[ -1 ]
27,109
in_proc.sql
paule32_Kurt_Goedel_Experiment/src/Duden/in_proc.sql
-- -------------------------------------------------------------------------------------- -- in_proc.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- drop procedure if exists in_pronomen; drop procedure if exists in_wortart; drop procedure if exists in_duden ; delimiter // -- -------------------------------------------------------------------------------------- -- placeholder for insert into de_pronomen ... -- -------------------------------------------------------------------------------------- create procedure in_pronomen( p1 tinyint, p2 tinyint, p3 char(5), p4 char(5), p5 char(5)) begin insert into de_pronomen( de_art,de_anzahl,de_nominativ,de_akkusativ,de_dativ) values( p1,p2, p3,p4,p5); end; -- -------------------------------------------------------------------------------------- -- placeholder for insert into de_wortart ... -- -------------------------------------------------------------------------------------- create procedure in_wortart(p1 boolean, p2 varchar(15)) begin insert into de_wortart( de_dek,de_bez) values(p1,p2); end; -- -------------------------------------------------------------------------------------- -- placeholder for insert into de_duden ... -- -------------------------------------------------------------------------------------- create procedure in_duden( p1 varchar(84), p2 tinyint, p3 tinyint) begin insert into de_duden (de_wort,de_art,de_mfn) values( p1,p2,p3); end; // delimiter ;
2,170
Common Lisp
.l
60
34.45
89
0.500713
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
adafec9711b2b19d990db94383ab594242d57b7e4a7700f88217ff7536f362e5
27,109
[ -1 ]
27,110
de_duden_wrarten.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de_duden_wrarten.sql
-- -------------------------------------------------------------------------------------- -- de_wortarten.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -- -------------------------------------------------------------------------------------- -- die 10 Wortarten im Deutschen: -- -- Es gibt "veränderliche" und *nicht* "veänderliche" Wortarten -- Merke: *veränderliche Wortarten lassen sich deklinieren, unveränderliche aber nicht.* -- -- Deklinieren bedeutet: das Wort nach dem Genus (Geschlecht), Numerus (Singualr/Plural) -- und Kasus (Fall: Nominativ/Genitiv/Akkusativ/Dativ) gebeugt (also angepasst) wird. -- -- Nomen sind Hauptwörter, Substantive oder Namenwörter. -- Sie bezeichnen Dinge, Lebewesen und auch Abstraktes. -- -- Es lassen sich konkrete Nomen und abstrakte Nomen voneinander unterscheiden. -- Die Konkreten sind "materiell" und lassen sich "sehen" oder "anfassen". -- Das ist bei den Abstrakten nicht möglich. -- Zu Ihnen gehören Gefühle und Empfindungen. -- -- Artikel begleiten Nomen und werden auch als Nomen-begleiter oder Geschlechts-wörter -- bezeichnet. Sie geben dem Nomen ein grammatisches Geschlecht und zeigen den Kasus des -- Hauptwortes an. Darüber hinaus zeigen Artikel in einigen Fällen auch an, ob das -- Substantiv im Singular oder im Plural steht. -- -- Artikel kann man aufteilen auf: "bestimmte" und "unbestimmt". -- bestimmte Artikel sind: -- - der, die, das -- unbestimmte Artikel sind: -- - ein, eine, ein -- -- Adjektive sind auch bekannt als Eigenschafts-wörter oder Wie-wörter: Das liegt daran, -- das sie zur näheren Beschreibung von Personen, Lebewesen, Sachverhalten und Dingen -- dienen. -- -- Meistens lassen sich Adjektive steigern. So zum Beispiel das Eigenschafts-wort "schön" -- Positiv: schön / Komparativ: schöner / Superlativ: am schönsten -- -- Pronomen werden auch als Für-wörter genannt. Sie sind Begleiter oder Stellvertreter -- des Nomen. -- Sie bestimmen, präzisieren und / oder ersetzen das jeweilige Nomen. -- Pronomen kennzeichnen den Numerus, den Genus und den Kasus des Substantivs. -- -- Numerale geben an, in welcher Anzahl etwas vorkommt. Daher werden sie auch Zahl-wörter -- genannt. -- -- Verben geben Auskunft über eine Tätigkeit, einen Vorgang oder einen Zustand. -- Sie sind deshalb auch als Tätigkeits-wörter oder Tu(n)-wörter bekannt. -- Dem Verb kommen viele Funktionen und Aufgaben zu und daher ist es das wichtivste Wort -- in einen Satz. -- Es kann in unterschiedlichen Zeitformen und Modi stehen. -- Sie lassen sich konjugieren (beugen). -- -- Adverbien sind Umstands-wörter - sie bestimmen den Umstand eines Wortes oder eines -- Satzes genauer. -- Die näheren Umstände lassen sich ganz einfach durch W-Fragen: Wann, Wo, Wohin, Warum? -- herausfunden. -- Diese Wortart wird in vier Hauptgruppen eingeteilt: -- 1. Lokal (Ort) -- 2. Temporal (Zeit) -- 3. Modal (Art und Weise) -- 4. Kausal (Grund) -- -- Präpositionen dienen dazu, räumliche, zeitliche, kausale oder modale Verhältnisse -- zwischen zwei Sachverhalten zu beschreiben. -- Sie stehen meistens direkt vor ihren Bezugs-wörtern und werden auch Vor-wörter oder -- Verhältnis-wörter genanntn. -- Sie bestimmen den Kasus ihres nachfolgenden Bezugs-wortes. -- -- Konjunktion-nale Wörter sind Binde-wörter. Sie verknüpfen Wörter, Satzglieder oder -- Haupt- und Nebensatze miteinander. -- -- Interjektionale Wörter geben Empfindungen, Gefühle, Ausrufe und Geräusche wieder. -- Sie werden deshalb auch als Wmpfindungs- oder Ausrufe-wörter bezeichnet. -- -------------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------------- -- Nomen - Namen-wort -- Artikel - Begleit-wort -- Adjektiv - Eigenschafts-wort -- Pronomen - Für-wort -- Numeral - Zahl-wort -- Verb - Tätigkeits-wort -- Adverb - Umstands-wort -- Präposition - Verhältnis-wort -- Konjunktion - Binde-wort -- Interjektion - Empfindungs-wort -- -------------------------------------------------------------------------------------- drop table if exists de_wortart ; create table if not exists de_wortart ( de_id tinyint not null auto_increment unique primary key, de_dek boolean not null default 0, -- deklariert: ja/nein => 1/0 de_bez varchar(15), -- Bezeichner last_update datetime not null on update current_timestamp default now() ); call in_wortart(1,"Nomen" ); call in_wortart(1,"Artikel" ); call in_wortart(1,"Adjektiv" ); call in_wortart(1,"Pronomen" ); call in_wortart(1,"Numeral" ); call in_wortart(1,"Verb" ); call in_wortart(0,"Adverb" ); call in_wortart(0,"Präposition" ); call in_wortart(0,"Konjunktion" ); call in_wortart(0,"Interjektion");
5,388
Common Lisp
.l
118
44.584746
89
0.689505
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
1652da59b31bfbf8e8a95e14f3c091510e1ebfaf06628c26daf1084de5333860
27,110
[ -1 ]
27,111
de_duden_verb_ab.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de_duden_verb_ab.sql
-- -------------------------------------------------------------------------------------- -- de_duden_verb_ab.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------------- -- Verben: ab -- -------------------------------------------------------------------------------------- drop table if exists de_duden_verb_ab ; create table if not exists de_duden_verb_ab ( de_id bigint not null auto_increment unique primary key, de_wort varchar(64), de_wort_art tinyint, last_update datetime not null on update current_timestamp default now() );
1,330
Common Lisp
.l
27
47.925926
89
0.552995
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
ed8aab1e243a95152a3eb2b911e1d5b34b0ee17501843351531ca00a8ea3d984
27,111
[ -1 ]
27,112
de_duden_gruppen.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de_duden_gruppen.sql
-- -------------------------------------------------------------------------------------- -- de_duden.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------------- -- indizierte Wörter (Gruppe => Buchabteilung) -- -------------------------------------------------------------------------------------- drop table if exists de_duden_gruppen ; create table if not exists de_duden_gruppen ( de_id bigint not null auto_increment unique primary key, de_gruppe varchar(10), last_update datetime not null on update current_timestamp default now() ); insert into de_duden_gruppen (de_gruppe) values ("verb_aa"); insert into de_duden_gruppen (de_gruppe) values ("verb_ab");
1,454
Common Lisp
.l
28
50.678571
89
0.573333
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
b82b63875b2038959566b38abcf82b8b3f37bd2bfcbb1f070442385858c0ebee
27,112
[ -1 ]
27,113
de_config.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de_config.sql
-- -------------------------------------------------------------------------------------- -- de_config.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- -- Pronomen: -- -------------------------------------------------------------------------------------- set @Personal := 1; -- persönliches Fürwort set @Possesiv := 2; -- besitzanzeigendes Fürwort set @Reflexiv := 3; -- rückbezügliches Fürwort set @Demonstrativ := 4; -- hinweisendes Fürwort set @Indefinit := 5; -- unbestimmtes Fürwort set @Relativ := 6; -- bezügliches Fürwort set @Interrogativ := 7; -- Frage Fürwort -- -------------------------------------------------------------------------------------- -- Personal -pronomen: -- -------------------------------------------------------------------------------------- set @singular := 1; -- Einzahl set @plural := 2; -- Mehrzahl set @formal := 3; -- Formal set @nominativ := 1; set @akkusativ := 2; set @genitiv := 3; set @dativ := 4; set @maskulin := 1; -- männlich set @feminin := 2; -- weiblich set @neutral := 3; -- sächlich -- -------------------------------------------------------------------------------------- -- Wortarten: -- -------------------------------------------------------------------------------------- set @Nomen := 1; set @Artikel := 2; set @Adjektiv := 3; set @Pronomen := 4; set @Numeral := 5; set @Verb := 6; set @Adverb := 7; set @Praeposition := 8; set @Konjunktion := 9; set @Interjektion := 10;
2,324
Common Lisp
.l
52
43.307692
89
0.4627
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
2a9bec85fb11e32823b911849a7ee51d0002f94ed31d8f2367d80c72728c147b
27,113
[ -1 ]
27,114
de_duden_pronome.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de_duden_pronome.sql
-- -------------------------------------------------------------------------------------- -- de_pronomen.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- drop table if exists de_pronomen ; create table if not exists de_pronomen ( de_id tinyint not null auto_increment unique primary key, de_art tinyint not null default 1, de_anzahl tinyint not null default 1, de_nominativ char(5), de_akkusativ char(5), de_dativ char(5), last_update datetime not null on update current_timestamp default now() ); -- -------------------------------------------------------------------------------------- -- Personal-pronomen: Singular/Einzahl: -- -------------------------------------------------------------------------------------- call in_pronomen(@Personal,@Singular,"ich","mich","mir" ); call in_pronomen(@Personal,@Singular,"du" ,"dich","dir" ); call in_pronomen(@Personal,@Singular,"er" ,"ihn" ,"ihm" ); call in_pronomen(@Personal,@Singular,"sie","sie" ,"ihr" ); call in_pronomen(@Personal,@Singular,"es" ,"es" ,"ihm" ); -- -------------------------------------------------------------------------------------- -- Personal-pronomen: Plural/Mehrzahl: -- -------------------------------------------------------------------------------------- call in_pronomen(@Personal,@Singular,"wir","uns" ,"uns" ); call in_pronomen(@Personal,@Singular,"ihr","euch","euch" ); call in_pronomen(@Personal,@Singular,"sie","sie" ,"ihnen"); -- -------------------------------------------------------------------------------------- -- Personal-pronomen: Formal -- -------------------------------------------------------------------------------------- call in_pronomen(@Personal,@formal ,"sie","sie" ,"ihnen");
2,418
Common Lisp
.l
45
52.422222
89
0.509903
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
a5c71082447bc14760ecbec5cdf9816b6cf14d9f22e409027d0c72795fc67a71
27,114
[ -1 ]
27,115
de_duden_verblst.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de_duden_verblst.sql
-- -------------------------------------------------------------------------------------- -- de_duden_verblst.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------------- -- konjungierte Verben: -- -------------------------------------------------------------------------------------- drop table if exists de_verben; create table if not exists de_verben ( de_id bigint not null auto_increment unique primary key, de_wort varchar(255) not null, de_konjugation boolean default 0, de_deklination boolean default 0, last_update datetime not null on update current_timestamp default now() ); -- -------------------------------------------------------------------------------------- -- B -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("besuchen",1); insert into de_verben (de_wort,de_konjugation) values ("bleiben",1); -- -------------------------------------------------------------------------------------- -- E -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("essen",1); -- -------------------------------------------------------------------------------------- -- F -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("fahren",1); -- -------------------------------------------------------------------------------------- -- G -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("geben",1); insert into de_verben (de_wort,de_konjugation) values ("gehen",1); -- -------------------------------------------------------------------------------------- -- H -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("haben",1); insert into de_verben (de_wort,de_konjugation) values ("halten",1); insert into de_verben (de_wort,de_konjugation) values ("helfen",1); -- -------------------------------------------------------------------------------------- -- L -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("lassen",1); insert into de_verben (de_wort,de_konjugation) values ("laufen",1); insert into de_verben (de_wort,de_konjugation) values ("lesen",1); -- -------------------------------------------------------------------------------------- -- M -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("machen",1); -- -------------------------------------------------------------------------------------- -- N -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("nehmen",1); -- -------------------------------------------------------------------------------------- -- S -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("sagen",1); insert into de_verben (de_wort,de_konjugation) values ("schlafen",1); insert into de_verben (de_wort,de_konjugation) values ("sehen",1); insert into de_verben (de_wort,de_konjugation) values ("sein",1); insert into de_verben (de_wort,de_konjugation) values ("sollen",1); insert into de_verben (de_wort,de_konjugation) values ("spielen",1); insert into de_verben (de_wort,de_konjugation) values ("sprechen",1); insert into de_verben (de_wort,de_konjugation) values ("stehen",1); -- -------------------------------------------------------------------------------------- -- T -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("treffen",1); -- -------------------------------------------------------------------------------------- -- W -- -------------------------------------------------------------------------------------- insert into de_verben (de_wort,de_konjugation) values ("werden",1); insert into de_verben (de_wort,de_konjugation) values ("wissen",1); insert into de_verben (de_wort,de_konjugation) values ("wollen",1);
5,201
Common Lisp
.l
87
58.528736
89
0.407683
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
28057ee700fc20d63a3020149fc5d3ce5c16d03b3c1d2cc29507f873c1fd898f
27,115
[ -1 ]
27,116
de.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de.sql
-- -------------------------------------------------------------------------------------- -- de_duden.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- -- WARNUNG: Die Datenbank "p_duden" wird gelöscht. -- Sichern Sie daher ggf. existierende Datenbank-Informationen vorher !!! -- -------------------------------------------------------------------------------------- set @Author = "Jebs Kallup"; set @AvatarNick = "paule32" ; set @LastUpdate = "2022-12-20" ; -- -------------------------------------------------------------------------------------- -- prepare some init stuff ... -- -------------------------------------------------------------------------------------- source de_config.sql; drop schema p_duden; create schema p_duden DEFAULT CHARACTER SET utf8mb4; use p_duden; source in_proc.sql; -- custom sql procedure source in_func.sql; -- custom sql function -- -------------------------------------------------------------------------------------- -- data Information files, splitted because the space ... -- -------------------------------------------------------------------------------------- source de_duden_wrarten.sql; source de_duden_pronome.sql; source de_duden.sql; source de_duden_verblst.sql; source de_duden_verb_aa.sql; source de_duden_verb_ab.sql; source de_duden_wfragen.sql; show tables;
2,053
Common Lisp
.l
43
46.465116
89
0.518519
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
225ad198ca95146ab0eee989b1335b9e71d1267111d937fbf1493f1a547d7252
27,116
[ -1 ]
27,117
in_func.sql
paule32_Kurt_Goedel_Experiment/src/Duden/in_func.sql
-- -------------------------------------------------------------------------------------- -- in_func.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- drop function if exists foo; delimiter // -- -------------------------------------------------------------------------------------- create function foo(p1 INT) returns char(20) deterministic begin return 'foofuu'; end // delimiter ;
1,084
Common Lisp
.l
27
38.814815
89
0.5827
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
9623bca2a3c89b0f39d7d8eb5bc20c5570f6f28fc9c8d87786c2183f81e01cb8
27,117
[ -1 ]
27,118
de_duden.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de_duden.sql
-- -------------------------------------------------------------------------------------- -- de_duden.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------------- -- Super-Class: Duden -- -------------------------------------------------------------------------------------- drop table if exists de_duden ; create table if not exists de_duden ( de_id bigint not null auto_increment unique primary key, de_wort varchar(84), -- Wort de_art tinyint, -- Wortart de_mfn tinyint not null default 0, -- 1:maskulin, 2:feminin, 3:neutral/sachlich de_dekli boolean not null default 1, last_update datetime not null on update current_timestamp default now() ); call in_duden("Aal" ,@nomen,1); call in_duden("aal|en" ,@verb ,0); call in_duden("aal|te" ,@verb ,0); call in_duden("aas|en" ,@verb ,0); call in_duden("aal|t" ,@verb ,0); call in_duden("ab-arbeit|en" ,@verb ,0); call in_duden("ab-ast|en" ,@verb ,0); call in_duden("ab-atm|en" ,@verb ,0); call in_duden("ab-änder|n" ,@verb ,0); call in_duden("ab-ängstig|en" ,@verb ,0); call in_duden("ab-äs|en" ,@verb ,0); call in_duden("ab-äst|en" ,@verb ,0); call in_duden("ab-ätz|en" ,@verb ,0); call in_duden("ab|ge|änder|t" ,@verb ,0); call in_duden("ab|ge|äst|et" ,@verb ,0); call in_duden("ab|ge|ätz|t" ,@verb ,0); call in_duden("änder|t" ,@verb ,0); call in_duden("änder|te" ,@verb ,0); call in_duden("äst|et" ,@verb ,0); call in_duden("äst|ete" ,@verb ,0); call in_duden("ätz|t" ,@verb ,0); call in_duden("ätz|te" ,@verb ,0); call in_duden("ge|aal|t" ,@verb ,0); call in_duden("ge|aas|t" ,@verb ,0);
2,536
Common Lisp
.l
53
46.169811
89
0.547784
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
11dda70b4ce2854710338ca8447dfa1f5b3a3b358ba889890413fa1a80350deb
27,118
[ -1 ]
27,119
de_duden_wfragen.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de_duden_wfragen.sql
-- -------------------------------------------------------------------------------------- -- de_duden.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------------- -- 12 Fragewörter: -- -------------------------------------------------------------------------------------- drop table if exists de_duden_fragewort; create table if not exists de_duden_fragewort ( de_id tinyint not null auto_increment unique primary key, de_wort char(10), last_update datetime not null on update current_timestamp default now() ); insert into de_duden_fragewort (de_wort) values ("wann"); insert into de_duden_fragewort (de_wort) values ("warum"); insert into de_duden_fragewort (de_wort) values ("was"); insert into de_duden_fragewort (de_wort) values ("wer"); insert into de_duden_fragewort (de_wort) values ("wessen"); insert into de_duden_fragewort (de_wort) values ("wem"); insert into de_duden_fragewort (de_wort) values ("wie"); insert into de_duden_fragewort (de_wort) values ("wo"); insert into de_duden_fragewort (de_wort) values ("wofür"); insert into de_duden_fragewort (de_wort) values ("woher"); insert into de_duden_fragewort (de_wort) values ("wohin"); insert into de_duden_fragewort (de_wort) values ("worüber");
2,004
Common Lisp
.l
38
51.552632
89
0.617812
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
466adfb1420ae0c654e2b39202bad007544ff030890fc40249af6c639ae60e2e
27,119
[ -1 ]
27,120
de_duden_verb_aa.sql
paule32_Kurt_Goedel_Experiment/src/Duden/de_duden_verb_aa.sql
-- -------------------------------------------------------------------------------------- -- de_duden_verb_aa.sql: Stand: Dezember 2022 -- -- (c) 2022 by Jens Kallup - paule32 <[email protected]> -- all rights reserved. -- -- Dies ist eine Zusammenstellung der im Deutschen genutzten Wört und Wortarten. -- Diese Datei darf nur für schulische Zwecke genutzt werden. -- -- Eine Verwendung in kommerziellen Projekten ist nicht erlaubt ! -- Die vorliegenden Informationen geben nur einen Teil des gesamten Umfanges ab; sie -- sind also nicht vollständig, oder fehlerfrei. -- -- Ich distanziere mich vor jedlichen Schaden, der durch die Benutzung dieser Datenbank- -- informationen entsteht bzw. enstanden ist. -- Die Nutzung erfolgt stets auf Eigene Gefahr !!! -- -------------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------------- -- Verben: aa -- -------------------------------------------------------------------------------------- drop table if exists de_duden_verb_aa ; create table if not exists de_duden_verb_aa ( de_id bigint not null auto_increment unique primary key, de_wort int, last_update datetime not null on update current_timestamp default now() ); INSERT INTO de_duden_verb_aa (de_wort) SELECT de_id FROM de_duden WHERE de_duden.de_wort = 'aal|te'; INSERT INTO de_duden_verb_aa (de_wort) SELECT de_id FROM de_duden WHERE de_duden.de_wort = 'aal|t';
1,500
Common Lisp
.l
28
52.321429
100
0.57308
paule32/Kurt_Goedel_Experiment
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
23b87fbadcd26fb4f41fb246f60f7a0ced0858a83b8f1510d09cfdb7e583b6b2
27,120
[ -1 ]
27,135
main.lisp
Lautaro-Garcia_corona/main.lisp
(in-package :corona) (defparameter *url-csv-casos* "https://cdn.buenosaires.gob.ar/datosabiertos/datasets/salud/reporte-covid/dataset_reporte_covid_sitio_gobierno.csv") (defparameter *meses* '("JAN" "FEB" "MAR" "APR" "MAY" "JUN" "JUL" "AUG" "SEP" "OCT" "NOV" "DEC")) (define-condition fecha-mal-formateada (error) ()) (defun fecha-sin-hora (fecha-con-hora) "Le quita la hora al formato de fecha que están usando en el csv Fecha (con hora) de ejemplo: 06SEP2020:00:00:00" (first (uiop:split-string fecha-con-hora :separator "::"))) (defun indicador (casos-diarios) (format nil "[~a] ~4d" (first casos-diarios) (round (second casos-diarios)))) (defun a-timestamp (fecha) "Parsea el formato que están usando en el csv a un Universal-time Fecha (sin hora) de ejemplo: 06SEP2020" (let* ((dia (subseq fecha 0 2)) (mes (subseq fecha 2 5)) (anio (subseq fecha 5))) (let ((indice-mes (position mes *meses* :test #'string=))) (unless indice-mes (error 'fecha-mal-formateada)) (date-time-parser:parse-date-time (format nil "~a-~2,'0d-~a" anio (1+ indice-mes) dia))))) (defun caso-para-fecha (casos fecha) (handler-case (list (a-timestamp fecha) fecha (gethash fecha casos)) (fecha-mal-formateada () (progn (format t "Fecha mal formateada: ~a~%" fecha) nil)))) (defun a-lista-de-casos (casos) (loop :for (timestamp fecha cantidad-casos) :in (sort (loop :for fecha :being :the :hash-key :of casos :for caso := (caso-para-fecha casos fecha) :when caso :collect :it) #'< :key #'first) :collecting (list fecha cantidad-casos))) (defun parsear-casos (archivo-casos) (let ((casos (make-hash-table :test 'equal))) (cl-csv:do-csv (fila archivo-casos :skip-first-p t) (let ((fecha (fecha-sin-hora (nth 0 fila))) (tipo-dato (nth 2 fila)) (subtipo-dato (nth 3 fila)) (cantidad-casos (parse-float:parse-float (nth 4 fila)))) (when (and (string= "casos_residentes" tipo-dato) (string= "casos_confirmados_reportados_del_dia" subtipo-dato)) (setf (gethash fecha casos) (+ cantidad-casos (gethash fecha casos 0)))))) casos)) (defun descargar-y-mostrar-grafico () (uiop:with-temporary-file (:pathname csv-casos :suffix ".covid19.csv") (trivial-download:download *url-csv-casos* csv-casos :quiet t) (let ((lista-casos (a-lista-de-casos (parsear-casos csv-casos)))) (format t (cl-spark:vspark lista-casos :key #'second :min 0 :title "Casos de COVID para residentes de CABA" :labels (mapcar #'indicador lista-casos)))))) (defun main () (handler-case (descargar-y-mostrar-grafico) (trivial-download:http-error () (print "No se pudo descargar desde el servidor del GCBA")) (usocket:ns-try-again-condition () (print "No hay conexión a internet")) (sb-sys:interactive-interrupt () (sb-posix:exit 0))))
2,989
Common Lisp
.lisp
49
53.408163
152
0.649009
Lautaro-Garcia/corona
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
498580a20a1a36dc40cf1ce1ef7e9d7f18718e3d2de0c7aad57a17bfd9b20c3e
27,135
[ -1 ]
27,136
corona.asd
Lautaro-Garcia_corona/corona.asd
(asdf:defsystem :corona :description "TUI para mostrar un gráfico de los casos diarios de COVID-19 en CABA" :author "Lautaro García" :version "1.0.0" :serial t :depends-on (:cl-csv :cl-spark :trivial-download :cl-date-time-parser) :components ((:file "package") (:file "main")))
308
Common Lisp
.asd
8
33.875
85
0.677852
Lautaro-Garcia/corona
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
0e846ee549dcf88d9d7020a12b4fda5a4651bf63da076b096e8508b0e1257b99
27,136
[ -1 ]
27,153
user-commands.lisp
sauerkrause_minecraft_bridge/user-commands.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (require :cl-irc) ;; need a package for these helpers separate from the user-commands (defpackage :user-command-helpers (:use :common-lisp) (:export :first-word :rest-words :register-auth :forget-auth :authed-funcall)) ;; define a package we can shovel allo the things into. (defpackage :user-commands (:use :common-lisp :user-command-helpers)) (in-package :user-command-helpers) (load "configs/identification.lisp") (define-condition flooped-command (error) nil) (define-condition invalid-auth (error) nil) (defparameter *protected-functions* (make-hash-table)) (defvar *ignore-map* (make-hash-table :test #'equal)) (defun needs-auth (fnsym) (gethash fnsym user-command-helpers::*protected-functions*)) (defun register-auth (fnsym) (setf (gethash fnsym user-command-helpers::*protected-functions*) fnsym)) (defun forget-auth (fnsym) (setf (gethash fnsym user-command-helpers::*protected-functions*) nil)) (defun priviligedp (nick) (member nick *allowed-users* :test #'equal)) (defun split-by-one-space (str) (loop for i = 0 then (1+ j) as j = (position #\Space str :start i) collect (subseq str i j) while j)) (export (defun first-word (str) (car (split-by-one-space str)))) (defun rest-words (str) (cdr (split-by-one-space str))) (defun authed-funcall (nick fn &rest args) (when (and (needs-auth fn) (not (priviligedp nick))) (error 'invalid-auth)) (apply fn args)) (defun prefixedp (command) (let ((ret-val ())) (let ((prefix-results (dolist (prefix robort::*prefixen*) (unless (> (length prefix) (length command)) (let ((command-prefix (subseq command 0 (length prefix)))) (if (equalp command-prefix prefix) (setf ret-val prefix)) robort::*prefixen*)))))) ret-val)) (defun handle-command(msg connection) (when (and (not (gethash (irc:source msg) *ignore-map*)) (> (length (cadr (irc::arguments msg))) 1)) (progn (flet ((notice (message) (irc:notice connection (irc:source msg) message))) (let ((cmd (cadr (irc::arguments msg)))) (when (and (> (length cmd) 1) (prefixedp cmd)) (let* ((cmd-name (remove #\* (first-word (subseq cmd (length (prefixedp cmd)))))) (cmd-file-name (format nil "user-commands/~(~a~).lisp" cmd-name))) (if (and (probe-file cmd-file-name) (find-symbol (common-lisp:string-upcase cmd-name) 'user-commands)) (let ((fnsym (fdefinition (find-symbol (common-lisp:string-upcase cmd-name) 'user-commands))) (nick (irc:source msg))) (handler-case (authed-funcall nick fnsym msg connection) (flooped-command ()(notice (format nil "Invalid usage of command: ~a" cmd-name))) (invalid-auth ()(notice (format nil "You are not God. You cannot call ~a" cmd-name))))) (progn (princ (cadr (irc::arguments msg))) (irc:notice connection (irc:source msg) (format nil "~a is not a valid command" cmd-name))))))))))) ;; this will walk the .lisp files in user-commands/ ;; and attempt to load them. (defun register-commands () (progn (loop for f in (directory "user-commands/*.lisp") do (load f :verbose T)) ())) (register-commands)
4,008
Common Lisp
.lisp
103
34.961165
88
0.678424
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
f47297697f68c8ed69a66a222f945b031a7b84f8dd9c3d824da561c244e210de
27,153
[ -1 ]
27,154
mc-irc-bridge.lisp
sauerkrause_minecraft_bridge/mc-irc-bridge.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (require :cl-irc) (require :bordeaux-threads) (require :cl-ppcre) (in-package :mcirc) (load "configs/mc.lisp") (defun follow-log (filename fn server-name) (let ((hit-end ())) (with-open-file (s filename :direction :input) (loop for line = (read-line s nil) while T do (progn (if line (if hit-end (funcall fn line server-name)) (progn (setf hit-end T) (sleep 0.5)))))))) (defun death-messagep (line) (let ((death-messages (list " was" " got" " walked" " drowned" " hit" " fell" " went" " tried" " burned" " starved" " suffocated" " withered"))) (and (not (search "[Rcon]" line)) (some (lambda (str) (search str line)) death-messages)))) (defun handle-translatable-component (line) (let* ((no-ts (cl-ppcre:regex-replace "^[0-9 \:-]*" line "")) (no-info (subseq no-ts (+ (length "[INFO] TranslatableComponent") (search "[INFO] TranslatableComponent" no-ts)))) (message-type ()) (message (let ((begin (cl-ppcre:scan "args=\\[" no-info))) (flet ((get-args (str) (format nil "~a" (subseq str (+ begin (length "args=\\[") -1) (cl-ppcre:scan "\\], " str :start begin))))) (cond ((search "'chat.type.text'" no-info) (progn (setf message-type 'text) (get-args no-info))) ((search "'chat.type.emote'" no-info) (progn (setf message-type 'emote) (get-args no-info))))))) (args (cl-ppcre:split ", " message :limit 2))) (if (and args message-type) (let ((format-str (case message-type ('text "<~a> ~a") ('emote "* ~a ~a")))) (format nil format-str (car args) (cadr args)))))) (defun handle-line (line server) (let ((message ()) (notice ())) (cond ((search "TranslatableComponent" line) (princ line) (let ((msg (handle-translatable-component line))) (if msg (setf message (format nil "~a~%" msg))))) ((search "[INFO] <" line) (setf message (format nil "~a~%" (subseq line (+ (length "[INFO] ") (search "[INFO] " line)))))) ((search "[INFO] *" line) (setf message (format nil "~a~%" (subseq line (+ (length "[INFO] ") (search "[INFO] " line)))))) ((and (search "[INFO] " line) (search "] logged in with entity" line)) (setf notice (format nil "~a has joined~%" (let* ((name-begin (+ (length "[INFO] ") (search "[INFO] " line))) (name-end (search "[" line :start2 name-begin))) (subseq line name-begin name-end))))) ((and (search "[INFO] " line) (search " lost connection: " line)) (setf notice (format nil "~a has quit~%" (let* ((name-begin (+ (length "[INFO] ") (search "[INFO] " line))) (name-end (search " lost connection: " line :start2 name-begin))) (subseq line name-begin name-end))))) ((and (search "[INFO] " line) (death-messagep line)) (setf notice (format nil "~a~%" (let* ((name-begin (+ (length "[INFO] ") (search "[INFO] " line)))) (subseq line name-begin)))))) (dolist (chan robort::*channels*) (flet ((bridge (fn arg) (funcall fn robort::*connection* chan (format nil "~a: ~a" server arg)))) (when message (bridge #'irc:privmsg message)) (when notice (bridge #'irc:notice notice)))))) (defun start-bridge (connection servers) (mapcar (lambda (server) (bordeaux-threads:make-thread (lambda () (follow-log (robort::mc-server-log-location server) #'handle-line (robort::mc-server-server-name server))))) servers)) (defparameter *thread* ())
4,559
Common Lisp
.lisp
134
28.141791
93
0.58237
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
07715667a8f2e2bb865744b1b406b785df08e748247d757d1e51e70083a957bd
27,154
[ -1 ]
27,155
main.lisp
sauerkrause_minecraft_bridge/main.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (defpackage :robort (:use :common-lisp :common-lisp-user)) (in-package :robort) (require :cl-irc) (load "settings.lisp") (load "common-defs.lisp") ;; need this as *logins* should be closed over for this. (defun get-connection (login) (progn (print (login-info-nick login)) (print (login-info-server login)) (irc:connect :server (login-info-server login) :nickname (login-info-nick login)))) (defun fast-reload () (load "settings.lisp") (load "common-defs.lisp") (load "init.lisp") (reinit *connection*)) (defun fix-screwup () (reinitialize *connection*) (main)) (defun reinitialize (connection) (progn ;; Use quit, not die or disconnect. (irc:quit connection) (print "Died connection hopefully"))) (export 'reinitialize) (defparameter *connection* nil) ;; Entry point (defun main () (progn (load "settings.lisp") (load "common-defs.lisp") (load "init.lisp") (defparameter *connection* (get-connection *login*)) (handler-case (progn (init *connection*) (irc:read-message-loop *connection*)) (reinitialize-required () (reinitialize *connection*))))) (load "init.lisp") (loop (main))
1,971
Common Lisp
.lisp
56
32.017857
75
0.696842
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
69a356d8ea7c28eece482a55b6a53a0eae3e7f150c6dc298114f12fb7391d56c
27,155
[ -1 ]
27,156
ql-deps.lisp
sauerkrause_minecraft_bridge/ql-deps.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. ;; for all the libs we require, quickload em. (let ((ql-libs (list "bordeaux-threads" "trivial-shell" "cl-irc" "usocket" "flexi-streams"))) (dolist (pkg ql-libs) (ql:quickload pkg)))
988
Common Lisp
.lisp
20
46.55
75
0.698446
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
5c5e4475e80a93187402243be40227d43e879b7246aa4092304b2994039e1d16
27,156
[ -1 ]
27,157
settings.lisp
sauerkrause_minecraft_bridge/settings.lisp
;; Copyright 2013 Robert Allen Krause <[email protected] ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (load "common-defs.lisp") (defparameter *botnick* "mcbort") ;; Need to know at least nick and serv (defparameter *login* (make-login-info :nick *botnick* :server "irc.drwilco.net")) ;; set of channels (defparameter *channels* ()) (pushnew "#minecraft" *channels* :test #'equal) ;; command prefixen (defparameter *prefixen* `("?" ,(format nil "~a: " *botnick*)))
1,151
Common Lisp
.lisp
25
44.16
75
0.712243
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
36407ebd648d8408bfeb9c6d31f380bd398a51ac2e7df8adcdd4b62699b10fc1
27,157
[ -1 ]
27,158
common-defs.lisp
sauerkrause_minecraft_bridge/common-defs.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (defstruct login-info nick server) ;; condition saying that this should reload. (define-condition reinitialize-required (error) ()) ;; structure for mc-server to be used by mc-irc-bridge and irc-mc-bridge (defstruct mc-server rcon-host rcon-port rcon-passwd log-location server-name server-port)
1,082
Common Lisp
.lisp
23
45.26087
75
0.740741
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
29339cdaf9412189ff2ab6094001628b820609432c677e6145ac39a101eae54c
27,158
[ -1 ]
27,159
irc-mc-bridge.lisp
sauerkrause_minecraft_bridge/irc-mc-bridge.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (require :cl-irc) (require :trivial-shell) ;; need a package for these helpers separate from the user-commands (defpackage :mcirc (:use :common-lisp)) (in-package :mcirc) (load "configs/rcon.lisp") (defun handle-message (msg connection) (say-to-rcons msg "{~a} ~a")) (defun handle-notice (msg connection) (say-to-rcons msg "(~a) ~a")) (defun handle-action (msg connection) (let ((action (subseq (cadr (irc:arguments msg)) (length "ACTION ")))) (princ action) (setf (cadr (irc:arguments msg)) action) (say-to-rcons msg "* ~a ~a"))) (defun replace-all (string part replacement &key (test #'char=)) "Returns a new string in which all the occurences of the part is replaced with replacement." (with-output-to-string (out) (loop with part-length = (length part) for old-pos = 0 then (+ pos part-length) for pos = (search part string :start2 old-pos :test test) do (write-string string out :start old-pos :end (or pos (length string))) when pos do (write-string replacement out) while pos))) (defun say-to-rcons (msg rcons-msg) (let ((message (cadr (irc:arguments msg)))) (mapcar (lambda (server) (trivial-shell:shell-command (format nil "mcrcon -s -H ~a -P ~a -p ~a \"say ~a\"" (robort::mc-server-rcon-host server) (robort::mc-server-rcon-port server) (robort::mc-server-rcon-passwd server) (replace-all (format nil rcons-msg (irc:source msg) message) "\"" "\\\"")))) robort::*servers*)))
2,361
Common Lisp
.lisp
56
37.446429
75
0.662015
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
5fadcca1286d4b56b506886ad10b8279dc259f84536fb0ba7fcb820766902894
27,159
[ -1 ]
27,160
init.lisp
sauerkrause_minecraft_bridge/init.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (require :cl-irc) (require :bordeaux-threads) (load "common-defs.lisp") (load "irc-mc-bridge.lisp") (load "mc-irc-bridge.lisp") (load "user-commands.lisp") (in-package :robort) (load "configs/servers.lisp") (defun init-hooks (connection) (irc:remove-hooks connection 'irc::irc-privmsg-message) (irc:remove-hooks connection 'irc::irc-notice-message) (irc:remove-hooks connection 'irc::ctcp-action-message) (irc:add-hook connection 'irc::irc-privmsg-message (lambda (msg) (user-command-helpers::handle-command msg connection))) (irc:add-hook connection 'irc::irc-privmsg-message (lambda (msg) (mcirc::handle-message msg connection))) (irc:add-hook connection 'irc::irc-notice-message (lambda (msg) (mcirc::handle-notice msg connection))) (irc:add-hook connection 'irc::ctcp-action-message (lambda (msg) (mcirc::handle-action msg connection)))) ;; Do anything that needs to be done prior to reading the loops here. (defun init (connection) ;; Maybe connect to the channels we want here. (dolist (s *channels*) (irc:join connection s)) ;; Maybe initialize some hooks. (init-hooks connection) (when mcirc::*thread* (mapcar (lambda (thread) (bordeaux-threads:destroy-thread mcirc::*thread*)) mcirc::*thread*)) (setf mcirc::*thread* (mcirc::start-bridge connection *servers*))) ;; handy reinit command. (defun reinit (connection) (init-hooks connection))
2,197
Common Lisp
.lisp
51
40.490196
75
0.725912
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
27e0f54161a557e4e6e23b9120a8594f43cc82c3d0cd1ad3f6690d2253ad9d20
27,160
[ -1 ]
27,161
ping.lisp
sauerkrause_minecraft_bridge/user-commands/ping.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (in-package :user-commands) (load "user-commands/common.lisp") (defun ping (msg connection) (irc:privmsg connection (get-destination msg) "PONG!")) (export 'ping)
941
Common Lisp
.lisp
17
53.764706
75
0.727669
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
5e2705e5c72ad38c3333b30451e559dcb406afdf0e4655ff032ecab0e865a936
27,161
[ -1 ]
27,162
update.lisp
sauerkrause_minecraft_bridge/user-commands/update.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (require :trivial-shell) (in-package :user-commands) (defun message-string (msg) (cadr (irc::arguments msg))) (defun update (msg connection) (when (< (length (rest-words (message-string msg))) 1) (error 'user-command-helpers::flooped-command)) (let* ((msg-list (rest-words (message-string msg))) (remote (car msg-list)) (branch (if (< (length msg-list) 2) "master" (cadr msg-list)))) ;; error out before attempting anything when we don't have the args (progn (multiple-value-bind (response output error-output status) (trivial-shell:shell-command (format nil "git pull ~a ~a" remote branch)) (print output) (irc:notice connection (irc:source msg) output) (let ((output-list (loop for i = 0 then (1+ j) as j = (position #\linefeed response :start i) collect (subseq response i j) while j))) (dolist (line output-list) (progn (irc:notice connection (irc:source msg) line) (sleep 0.1)))))))) (register-auth #'update) (export 'update)
1,837
Common Lisp
.lisp
48
34.395833
75
0.68054
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
e16727148c909564aebd954fe992038d0d26c0cf65abfed3c50fdee564c63536
27,162
[ -1 ]
27,163
source.lisp
sauerkrause_minecraft_bridge/user-commands/source.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (in-package :user-commands) (defun source (msg connection) (let ((reply (format nil "Freedom @ https://github.com/sauerkrause/mcbort"))) (irc:privmsg connection (get-destination msg) reply))) (export 'source)
997
Common Lisp
.lisp
18
53.277778
75
0.720739
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
0af27138d8b95928193af2e88171570766c7bfd7fe035e5ecdf3ed504f788e03
27,163
[ -1 ]
27,164
quit.lisp
sauerkrause_minecraft_bridge/user-commands/quit.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (in-package :user-commands) (defun quit (msg connection) (cl-user::quit)) (register-auth #'quit) (export 'quit)
889
Common Lisp
.lisp
17
50.764706
75
0.725694
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
a99a4c29b0e61bce7351104d5ae911d14467e181b398ea994b8f41a745db5087
27,164
[ -1 ]
27,165
help.lisp
sauerkrause_minecraft_bridge/user-commands/help.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (require :cl-irc) (in-package :user-commands) (load "user-commands/common.lisp") (let ((help-message (format nil "Use ~a to prepend commands. ~ainfo will list currently bridged server info. ~alist-commands will show you what commands you have at your disposal." (car robort::*prefixen*) (car robort::*prefixen*) (car robort::*prefixen*)))) (defun help (msg connection) (irc:privmsg connection (get-destination msg) help-message))) (export 'help)
1,249
Common Lisp
.lisp
22
54.181818
181
0.719672
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
b9c1379ab045cfccc021cbef5a37d3536351c906c2539807999fba8d33c56715
27,165
[ -1 ]
27,166
join.lisp
sauerkrause_minecraft_bridge/user-commands/join.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (in-package :user-commands) (defun join (msg connection) (let ((channel (first (user-command-helpers::rest-words (cadr (irc::arguments msg)))))) (if channel (irc:join connection (first (user-command-helpers::rest-words (cadr (irc::arguments msg))))) (error 'user-command-helpers::flooped-command)))) (register-auth #'join) (export 'join)
1,140
Common Lisp
.lisp
24
45.083333
75
0.712871
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
c2fd26113613143a5efb12e8f701545f4467f15ca600070fb32e241bc0582589
27,166
[ -1 ]
27,167
part.lisp
sauerkrause_minecraft_bridge/user-commands/part.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (in-package :user-commands) (defun part (msg connection) (let ((channel (first (user-command-helpers::rest-words (cadr (irc::arguments msg)))))) (if channel (irc:part connection (first (user-command-helpers::rest-words (cadr (irc::arguments msg))))) (error 'user-command-helpers::flooped-command)))) (register-auth #'part) (export 'part)
1,144
Common Lisp
.lisp
25
43.24
75
0.71159
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
398e8bcd2bd10a465d93c0f5b654f9a6d1549788d9142829cdd35dce39095bd8
27,167
[ -1 ]
27,168
common.lisp
sauerkrause_minecraft_bridge/user-commands/common.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (require :cl-irc) (in-package :user-commands) (defun get-message (list) (if (listp list) (with-output-to-string (s) (dolist (item list) (if (stringp item) (format s "~a " item)))))) (defun privmsgp (msg) (not (char= (char (first (irc:arguments msg)) 0) #\#))) (defun get-destination (msg) (if (privmsgp msg) (irc:source msg) (first (irc:arguments msg)))) (defun get-nick (msg) (irc:source msg)) (defmacro with-gensyms ((&rest names) &body body) `(let ,(loop for n in names collect `(,n (gensym))) ,@body)) (defun rand-value (list-values) (elt list-values (if (< 1 (length list-values)) (random (length list-values)) 0))) (defmacro name-literal (name list-values) `(defun ,name (msg connection) (irc:privmsg connection (get-destination msg) (rand-value ,list-values)))) (defmacro value-literal (name list-values) `(defun ,(intern (string-upcase (concatenate 'string "value-" (string name)))) () (rand-value ,list-values))) (defmacro literal-literal (name list-values) `(defun ,(intern (string-upcase (concatenate 'string "literal-" (string name)))) () ,list-values)) (defmacro define-literal (name values &key needs-auth) (with-gensyms (index-value list-values) `(progn (let ((,list-values ,values)) (name-literal ,name ,list-values) (value-literal ,name ,list-values) (literal-literal ,name ,list-values)) (user-command-helpers:forget-auth (function ,name)) (when ,needs-auth (user-command-helpers:register-auth (function ,name))) (export ',name))))
2,523
Common Lisp
.lisp
67
32.104478
75
0.641278
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
e5b23323488ea0253fdf22b37cdd332e5e4f5e5bcd6142441bcbbfd8fdb831f1
27,168
[ -1 ]
27,169
info.lisp
sauerkrause_minecraft_bridge/user-commands/info.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (require :usocket) (require :flexi-streams) (in-package :user-commands) (load "user-commands/common.lisp") ;; Contains *mc-server* and *mc-port* (load "configs/mc.lisp") ;; terrible recursion I know..., ;; but split-sequence in cl-utilities apparently can't do this ಠ_ಠ (defun split-by-string (str delimiter) (let ((idx (search delimiter str))) (if idx (cons (subseq str 0 idx) (split-by-string (subseq str (+ 2 idx)) delimiter)) (cons str ())))) (defun handle-mc-server-output (server output) (if (eql (elt output 3) #\§) (handle-new-mc-server-output server output) (handle-old-mc-server-output server output))) (defun handle-new-mc-server-output (server output) (princ "Handling new output") (let ((output-list (split-by-string output (make-string 2 :initial-element #\Nul)))) (format nil "~a: Players (~a/~a) Version: ~a MOTD: ~a" server (remove #\Nul (elt output-list 4)) (remove #\Nul (elt output-list 5)) (remove #\Nul (elt output-list 2)) (remove #\Nul (elt output-list 3))))) (defun handle-old-mc-server-output (server output) (princ "Handling old output") (let ((output-list (split-by-string output "§"))) (print output-list) (format nil "~a: Players (~a/~a) MOTD: ~a" server (remove #\Nul (elt output-list 1)) (remove #\Nul (elt output-list 2)) (remove #\Nul (elt output-list 0))))) (defun get-mc-info (server) (with-open-stream (s (flexi-streams:make-flexi-stream (usocket:socket-stream (usocket:socket-connect (robort::mc-server-server-name server) (robort::mc-server-server-port server) :protocol :stream :element-type '(unsigned-byte 8))))) (setf (flexi-streams:flexi-stream-element-type s) '(unsigned-byte 8)) (write-byte #xfe s) (write-byte #x1 s) (force-output s) (when (eq (read-byte s) 255) (setf (flexi-streams:flexi-stream-element-type s) 'character) (let ((output (make-string-output-stream))) (loop for char = (read-char s nil nil) while char do (format output "~c" char)) (handle-mc-server-output (robort::mc-server-server-name server) (get-output-stream-string output)))))) (defun info (msg connection) (mapcar (lambda (server) (let ((message (get-mc-info server))) (irc:privmsg connection (get-destination msg) message))) robort::*servers*)) (export 'info)
3,181
Common Lisp
.lisp
73
39.424658
110
0.678676
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
fdfec6090c3a3cc7d353e3868d5dd6deaf036a8491dd7de41cdd867ec192d7bd
27,169
[ -1 ]
27,170
about.lisp
sauerkrause_minecraft_bridge/user-commands/about.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (require :cl-irc) (in-package :user-commands) (load "user-commands/common.lisp") (let ((about-message "I am a Minecraft <-> Irc Bridge Bot Derived from Robort")) (defun about (msg connection) (irc:privmsg connection (get-destination msg) about-message))) (export 'about)
1,052
Common Lisp
.lisp
19
53.684211
80
0.72807
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
6c8f731b36f6447307e981f19aa4414d8081acbc1cba6ada78f11c11bf6793f2
27,170
[ -1 ]
27,171
list-commands.lisp
sauerkrause_minecraft_bridge/user-commands/list-commands.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (in-package :user-commands) (load "user-commands/common.lisp") (defun list-commands (msg connection) (let ((word-list nil)) (labels ((symbol-internalp (sym pkg) (multiple-value-bind (symbol status) (find-symbol (string sym) pkg) (eq status :internal))) (map-symbols (pkg fn) (do-external-symbols (key pkg) (funcall fn key nil)))) (progn (map-symbols :user-commands (lambda (key value) (if (or (not (user-command-helpers::needs-auth (fdefinition (find-symbol (string-upcase key) 'user-commands)))) (user-command-helpers::priviligedp (get-nick msg))) (setf word-list (cons (string key) word-list))))) (irc:privmsg connection (get-destination msg) (if (listp word-list) (with-output-to-string (s) (dolist (word (sort word-list #'string-lessp)) (if (stringp word) (format s "~a " word)))))))))) (export 'list-commands)
1,809
Common Lisp
.lisp
47
32.680851
75
0.642369
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
d317a6b699bec3c30d67c1312fc12b72e8799e34fde092d39b8acf98c24f28f9
27,171
[ -1 ]
27,172
reload.lisp
sauerkrause_minecraft_bridge/user-commands/reload.lisp
;; Copyright 2013 Robert Allen Krause <[email protected]> ;; This file is part of Robort. ;; Robort is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; Robort is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with Robort. If not, see <http://www.gnu.org/licenses/>. (in-package :user-commands) (load "user-commands/common.lisp") (defun reload (msg connection) (progn (format T "msg: ~a" msg) (print "Reloading") (robort::fast-reload) (irc:privmsg connection (get-destination msg) "Done.") (irc:read-message-loop connection))) (register-auth #'reload) (export 'reload)
1,109
Common Lisp
.lisp
25
41.8
75
0.713488
sauerkrause/minecraft_bridge
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
13df71b52c1aaae5c959245ec023a50710d929ab7e663569235b97c86064a0fb
27,172
[ -1 ]
27,208
cl-fpgasm-device.lisp
stacksmith_cl-fpgasm-device/cl-fpgasm-device.lisp
;;;; cl-fpgasm-device.lisp #|****************************************************************************** Copyright 2012 Victor Yurkovsky This file is part of cl-fpgasm FPGAsm is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. FPGAsm is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with cl-fpgasm. If not, see <http://www.gnu.org/licenses/>. ******************************************************************************|# (in-package #:cl-fpgasm-device) (setf *print-circle* t) ;we have circular structures! (defparameter *raw* nil) ;raw sexps after reading xdlrc (defparameter *dev* nil) (defun read-file (name) (with-open-file (in name) (let ((*package* (find-package "CL-FPGASM-DEVICE"))) (setf *raw* (read in)))) ) ;;============================================================================== ;(defun load-device (&key) (name (asdf:system-relative-pathname 'cl-fpgasm-device #p"data/xc3s200.tweaked"))) (defun load-device (&key (name (asdf:system-relative-pathname 'cl-fpgasm-device #p"data/xc7a100t.tweaked"))) (parse-xdlrc (read-file name)) (export 'devi::*dev* :devi) t) (defstruct dev name ;name of device tech ;technology tiles ;ARRAY of tiles prim-defs ;HASHTABLE of primitive-defs ) (defstruct tile name type x y prim-sites) (defstruct prim-site name prim-def bond #||# tile) (defstruct prim-def name pins elements) (defstruct element name pins cfg conns ) (defun keys (hashtable) (loop for key being the hash-keys of hashtable collect key) ;;(maphash #'(lambda (key val) (print key) ) hashtable) ) ;;============================================================================== ;; PARSING ;; ;; Parsing rules: every object parses children and stores them as it needs to. ;;============================================================================== (defun dev-init () (setf *dev* (make-dev :name nil :tech nil :tiles nil :prim-defs nil))) ;;============================================================================== ;; Generic function. ;; ;; Expressions like (type rest...) get called here, and specialized by type. ;; everyone gets dev; some parsing functions deeper in also get container, ;; specifying the particular collection we are parsing into. ;; (defgeneric parse-xdlrc-expr (type rest dev container)) ;;============================================================================== ;; And if type is not supported, ;; (defmethod parse-xdlrc-expr (type rest dev container) (error "Unhandled type in parse-xdlrc-expr - TYPE ~S package ~S" type *package* ) ) ;;============================================================================== ;; XDL_RESOURCE_REPORT version device tech ;; (defmethod parse-xdlrc-expr ((type (eql 'xdl_resource_report)) rest dev unused) (print "XDL RESOURCE parser") (destructuring-bind (version device tech &rest expr) rest (declare (ignore version)) (setf dev (dev-init) (dev-name dev) device (dev-tech dev) tech) ;;parsing the second part allows us to use prim-defs. (parse-xdlrc (cadr expr) dev) (parse-xdlrc (car expr) dev))) ;;============================================================================== ;; TILES w h ( ;; (defmethod parse-xdlrc-expr ((type (eql 'tiles)) rest dev unused) (destructuring-bind (x y &rest exprs) rest (let ((array (make-array (list x y)))) (loop for expr in exprs for i from 0 do (let ((tile (parse-xdlrc expr))) ;parse a tile (setf (aref array (tile-x tile) (tile-y tile) ) tile))) (setf (dev-tiles dev) array) ;??? ))) ;;============================================================================== ;; TILE x y n1 n2 cnt ( of TILES ;; --primitive_sites (defmethod parse-xdlrc-expr ((type (eql 'tile)) rest dev unused) (destructuring-bind (x y n1 n2 cnt &rest exprs) rest ;;(format t "tile: ~S ~S ~S ~S ~d~%" x y n1 n2 cnt) (let ((tile (make-tile :name n1 :type n2 :x x :y y :prim-sites nil))) (setf (tile-prim-sites tile) (cons (loop for expr in exprs for i from 0 to (1- cnt) for j = (parse-xdlrc expr dev tile) collect j) (tile-prim-sites tile))) (set n1 tile) ;BIND symbol n1 to name (export n1 :devi) tile ))) ;;============================================================================== ;; PRIMITIVE_SITE LEAF of TILE ;; (defmethod parse-xdlrc-expr ((type (eql 'PRIMITIVE_SITE)) rest dev tile) (destructuring-bind (n1 n2 n3 cnt) rest ;;(format t " primitive-site: ~S ~S ~S ~d~%" n1 n2 n3 cnt) (declare (ignore cnt)) (let ((data (make-prim-site :name n1 :prim-def n2 :bond n3 :tile tile))) (set n1 data);BIND to name (export n1 :devi) data ) ;;TODO: for now just returning data; tile makes a list... )) ;;============================================================================== ;; PRIMITIVE_DEFS cnt ( ;; ;; hashtable containing prim-def entries (defmethod parse-xdlrc-expr ((type (eql 'PRIMITIVE_DEFS)) rest dev unused) (destructuring-bind (cnt &rest exprs) rest (declare (ignore cnt)) (setf (dev-prim-defs dev) (loop for expr in exprs for i from 0 for j = (parse-xdlrc expr dev) collect j)) )) ;;============================================================================== ;; PRIMITIVE_DEF name pins elements (... ;; --primitive_def... ;; (defmethod parse-xdlrc-expr ((type (eql 'PRIMITIVE_DEF)) rest dev unused) (destructuring-bind (name pin-cnt element-cnt &rest exprs) rest (declare (ignore pin-cnt) (ignore element-cnt)) ;;(format t "PRIMITIVE_DEF ~S...~%" name) (let ((data (make-prim-def :name name :pins nil :elements nil))) (loop for expr in exprs do (parse-xdlrc expr dev data)) (set name data) ;BIND to name (export name :devi ) data))) ;;============================================================================== ;; PIN name n1 input/output for PRIMITIVE_DEF ;; PIN name input/output for ELEMENT ;; (defmethod parse-xdlrc-expr ((type (eql 'PIN)) rest dev container) (cond ((eql (type-of container) 'prim-def) (destructuring-bind (name n1 dir) rest ;;(format t "PIN ~S...~%" name) ;;Why are there two names here? Is it simply to differentiate PIN ;;parsers for ELEMENT and PRIMITIVE_DEF??? (if (not (eql n1 name)) (error "ELEMENT-PIN parser found a name mismatch")) (setf (prim-def-pins container) (cons (cons name dir) (prim-def-pins container) )))) ((eql (type-of container) 'element ) (destructuring-bind (name dir) rest (setf (element-pins container) (cons (cons name dir) (element-pins container))))))) ;;============================================================================== ;; ELEMENT name pins (... for PRIMITIVE_DEF ;; --pin ;; --conn ;; --cfg ;; ;; (defmethod parse-xdlrc-expr ((type (eql 'ELEMENT)) rest dev primdef) (destructuring-bind (name pin-cnt &rest exprs) rest (declare (ignore pin-cnt)) ;;(format t "ELEMENT ~S...~%" name) (let ((data (make-element :name name :pins nil :cfg nil :conns nil))) (loop for expr in exprs do (parse-xdlrc expr dev data )) (setf (prim-def-elements primdef) (cons data (prim-def-elements primdef))) nil))) ;;============================================================================== ;; CONN element pin dir element pin for ELEMENT ;; (defmethod parse-xdlrc-expr ((type (eql 'CONN)) rest dev element) ;; TODO: unsure of how to store this for fast access... ;;for now, just store the list (setf (element-conns element) (cons rest (element-conns element)))) ;;============================================================================== ;; cfg configuration for ELEMENT ;; ;; TODO: for now, just store the entire list (defmethod parse-xdlrc-expr ((type (eql 'CFG)) rest dev element ) (setf (element-cfg element) rest) ) (defun parse-xdlrc (list &optional dev container) ; (format t "parsing ~S ~S~%" (car list) (type-of (car list))) (if list (parse-xdlrc-expr (car list) (cdr list) dev container))) ;;============================================================================== ;; PUBLIC INTERFACE ;;==============================================================================
8,901
Common Lisp
.lisp
216
37.513889
109
0.548025
stacksmith/cl-fpgasm-device
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
273d5a16584226b90fdc56e7a8075a110ba9c31fc170b54ce1ab70ec70ce8459
27,208
[ -1 ]
27,209
cl-fpgasm-device.asd
stacksmith_cl-fpgasm-device/cl-fpgasm-device.asd
;;;; cl-fpgasm-device.asd (asdf:defsystem #:cl-fpgasm-device :serial t :description "A device database for cl-fpgasm" :author "stacksmith <[email protected]>" :license "Specify license here" :components ((:file "package") (:file "cl-fpgasm-device")))
281
Common Lisp
.asd
8
30.75
48
0.682657
stacksmith/cl-fpgasm-device
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
b88c824fce1adbaa3837dbac7f52c175cc173e3a92c3f24a33c2843321e279c1
27,209
[ -1 ]
27,213
xc3s200.xdlrc
stacksmith_cl-fpgasm-device/data/xc3s200.xdlrc
# ======================================================= # XDL REPORT MODE $Revision: 1.8 $ # time: Thu Oct 9 10:21:26 2014 # cmd: /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/unwrapped/xdl -report xc3s200 # ======================================================= (xdl_resource_report v0.2 xc3s200ft256-5 spartan3 # ************************************************************************** # * * # * Tile Resources * # * * # ************************************************************************** (tiles 31 31 (tile 0 0 TTERMLTERM EMPTY16X2 0 ) (tile 0 1 TLTERM CNR_TTERM 0 ) (tile 0 2 TTERMC1 TTERM3 0 ) (tile 0 3 TTERMC2 TTERM2 0 ) (tile 0 4 TTERMBRAMC1 BTTERM 0 ) (tile 0 5 BMTTERMBSC1 TBSTERM 0 ) (tile 0 6 TTERMC3 TTERM3 0 ) (tile 0 7 TTERMC4 TTERM2 0 ) (tile 0 8 LGCLKVTTERM TGCLKVTERM 0 ) (tile 0 9 TTERMC5 TTERM3 0 ) (tile 0 10 TTERMC6 TTERM2 0 ) (tile 0 11 TTERMC7 TTERM3 0 ) (tile 0 12 TTERMC8 TTERM2 0 ) (tile 0 13 TTERMC9 TTERM3 0 ) (tile 0 14 TTERMC10 TCLKTERM2 0 ) (tile 0 15 TTERMVM EMPTY0X3 0 ) (tile 0 16 TTERMC11 TCLKTERM3 0 ) (tile 0 17 TTERMC12 TTERM2 0 ) (tile 0 18 TTERMC13 TTERM3 0 ) (tile 0 19 TTERMC14 TTERM2 0 ) (tile 0 20 TTERMC15 TTERM3 0 ) (tile 0 21 TTERMC16 TTERM2 0 ) (tile 0 22 RGCLKVTTERM TGCLKVTERM 0 ) (tile 0 23 TTERMC17 TTERM3 0 ) (tile 0 24 TTERMC18 TTERM2 0 ) (tile 0 25 TTERMBRAMC2 BTTERM 0 ) (tile 0 26 BMTTERMBSC2 TBSTERM 0 ) (tile 0 27 TTERMC19 TTERM3 0 ) (tile 0 28 TTERMC20 TTERM2 0 ) (tile 0 29 TRTERM CNR_TTERM 0 ) (tile 0 30 TTERMRTERM EMPTY16X2 0 ) (tile 1 0 LTTERM CNR_LTTERM 0 ) (tile 1 1 TL UL 7 (primitive_site RLL_X0Y25 RESERVED_LL internal 8) (primitive_site DCI7 DCI internal 13) (primitive_site DCI0 DCI internal 13) (primitive_site PMV PMV internal 8) (primitive_site DCIRESET7 DCIRESET internal 1) (primitive_site DCIRESET0 DCIRESET internal 1) (primitive_site VCC_X0Y25 VCC internal 1) ) (tile 1 2 TIOIC1 TIOIS 6 (primitive_site VCC_X1Y25 VCC internal 1) (primitive_site RLL_X1Y25 RESERVED_LL internal 8) (primitive_site A4 DIFFM bonded 21) (primitive_site B4 DIFFS bonded 21) (primitive_site A3 IOB bonded 21) (primitive_site RANDOR_X0Y1 RESERVED_ANDOR internal 4) ) (tile 1 3 TIOIC2 TIOIS 6 (primitive_site VCC_X2Y25 VCC internal 1) (primitive_site RLL_X2Y25 RESERVED_LL internal 8) (primitive_site PAD5 DIFFM unbonded 21) (primitive_site PAD4 DIFFS unbonded 21) (primitive_site NOPAD1 IOB unbonded 21) (primitive_site RANDOR_X2Y1 RESERVED_ANDOR internal 4) ) (tile 1 4 TIOIBRAMC1 BRAM_IOIS 3 (primitive_site RLL_X3Y25 RESERVED_LL internal 8) (primitive_site VCC_X3Y25 VCC internal 1) (primitive_site DCM_X0Y1 DCM internal 41) ) (tile 1 5 BMTIOIBSC1 BRAMSITE_IOIS 0 ) (tile 1 6 TIOIC3 TIOIS 6 (primitive_site VCC_X4Y25 VCC internal 1) (primitive_site RLL_X4Y25 RESERVED_LL internal 8) (primitive_site PAD8 DIFFM unbonded 21) (primitive_site PAD7 DIFFS unbonded 21) (primitive_site D5 IOB bonded 21) (primitive_site RANDOR_X4Y1 RESERVED_ANDOR internal 4) ) (tile 1 7 TIOIC4 TIOIS 6 (primitive_site VCC_X5Y25 VCC internal 1) (primitive_site RLL_X5Y25 RESERVED_LL internal 8) (primitive_site B5 DIFFM bonded 21) (primitive_site C5 DIFFS bonded 21) (primitive_site NOPAD2 IOB unbonded 21) (primitive_site RANDOR_X6Y1 RESERVED_ANDOR internal 4) ) (tile 1 8 LGCLKVTIOI GCLKV_IOIS 0 ) (tile 1 9 TIOIC5 TIOIS 6 (primitive_site VCC_X6Y25 VCC internal 1) (primitive_site RLL_X6Y25 RESERVED_LL internal 8) (primitive_site D6 DIFFM bonded 21) (primitive_site E6 DIFFS bonded 21) (primitive_site A5 IOB bonded 21) (primitive_site RANDOR_X8Y1 RESERVED_ANDOR internal 4) ) (tile 1 10 TIOIC6 TIOIS 6 (primitive_site VCC_X7Y25 VCC internal 1) (primitive_site RLL_X7Y25 RESERVED_LL internal 8) (primitive_site B6 DIFFM bonded 21) (primitive_site C6 DIFFS bonded 21) (primitive_site NOPAD3 IOB unbonded 21) (primitive_site RANDOR_X10Y1 RESERVED_ANDOR internal 4) ) (tile 1 11 TIOIC7 TIOIS 6 (primitive_site VCC_X8Y25 VCC internal 1) (primitive_site RLL_X8Y25 RESERVED_LL internal 8) (primitive_site D7 DIFFM bonded 21) (primitive_site E7 DIFFS bonded 21) (primitive_site PAD16 IOB unbonded 21) (primitive_site RANDOR_X12Y1 RESERVED_ANDOR internal 4) ) (tile 1 12 TIOIC8 TIOIS 6 (primitive_site VCC_X9Y25 VCC internal 1) (primitive_site RLL_X9Y25 RESERVED_LL internal 8) (primitive_site B7 DIFFM bonded 21) (primitive_site C7 DIFFS bonded 21) (primitive_site NOPAD4 IOB unbonded 21) (primitive_site RANDOR_X14Y1 RESERVED_ANDOR internal 4) ) (tile 1 13 TIOIC9 TIOIS 6 (primitive_site VCC_X10Y25 VCC internal 1) (primitive_site RLL_X10Y25 RESERVED_LL internal 8) (primitive_site C8 DIFFM bonded 21) (primitive_site D8 DIFFS bonded 21) (primitive_site A7 IOB bonded 21) (primitive_site RANDOR_X16Y1 RESERVED_ANDOR internal 4) ) (tile 1 14 TIOIC10 TIOIS 6 (primitive_site VCC_X11Y25 VCC internal 1) (primitive_site RLL_X11Y25 RESERVED_LL internal 8) (primitive_site A8 DIFFM bonded 21) (primitive_site B8 DIFFS bonded 21) (primitive_site NOPAD5 IOB unbonded 21) (primitive_site RANDOR_X18Y1 RESERVED_ANDOR internal 4) ) (tile 1 15 CLKT CLKT 6 (primitive_site GSIG_X12Y1 GLOBALSIG internal 0) (primitive_site BUFGMUX7 BUFGMUX internal 4) (primitive_site BUFGMUX6 BUFGMUX internal 4) (primitive_site BUFGMUX5 BUFGMUX internal 4) (primitive_site BUFGMUX4 BUFGMUX internal 4) (primitive_site VCC_X12Y25 VCC internal 1) ) (tile 1 16 TIOIC11 TIOIS 6 (primitive_site VCC_X13Y25 VCC internal 1) (primitive_site RLL_X12Y25 RESERVED_LL internal 8) (primitive_site D9 DIFFM bonded 21) (primitive_site C9 DIFFS bonded 21) (primitive_site A9 IOB bonded 21) (primitive_site RANDOR_X20Y1 RESERVED_ANDOR internal 4) ) (tile 1 17 TIOIC12 TIOIS 6 (primitive_site VCC_X14Y25 VCC internal 1) (primitive_site RLL_X13Y25 RESERVED_LL internal 8) (primitive_site B10 DIFFM bonded 21) (primitive_site A10 DIFFS bonded 21) (primitive_site NOPAD6 IOB unbonded 21) (primitive_site RANDOR_X22Y1 RESERVED_ANDOR internal 4) ) (tile 1 18 TIOIC13 TIOIS 6 (primitive_site VCC_X15Y25 VCC internal 1) (primitive_site RLL_X14Y25 RESERVED_LL internal 8) (primitive_site E10 DIFFM bonded 21) (primitive_site D10 DIFFS bonded 21) (primitive_site C10 IOB bonded 21) (primitive_site RANDOR_X24Y1 RESERVED_ANDOR internal 4) ) (tile 1 19 TIOIC14 TIOIS 6 (primitive_site VCC_X16Y25 VCC internal 1) (primitive_site RLL_X15Y25 RESERVED_LL internal 8) (primitive_site C11 DIFFM bonded 21) (primitive_site B11 DIFFS bonded 21) (primitive_site NOPAD7 IOB unbonded 21) (primitive_site RANDOR_X26Y1 RESERVED_ANDOR internal 4) ) (tile 1 20 TIOIC15 TIOIS 6 (primitive_site VCC_X17Y25 VCC internal 1) (primitive_site RLL_X16Y25 RESERVED_LL internal 8) (primitive_site E11 DIFFM bonded 21) (primitive_site D11 DIFFS bonded 21) (primitive_site D12 IOB bonded 21) (primitive_site RANDOR_X28Y1 RESERVED_ANDOR internal 4) ) (tile 1 21 TIOIC16 TIOIS 6 (primitive_site VCC_X18Y25 VCC internal 1) (primitive_site RLL_X17Y25 RESERVED_LL internal 8) (primitive_site C12 DIFFM bonded 21) (primitive_site B12 DIFFS bonded 21) (primitive_site NOPAD8 IOB unbonded 21) (primitive_site RANDOR_X30Y1 RESERVED_ANDOR internal 4) ) (tile 1 22 RGCLKVTIOI GCLKV_IOIS 0 ) (tile 1 23 TIOIC17 TIOIS 6 (primitive_site VCC_X19Y25 VCC internal 1) (primitive_site RLL_X18Y25 RESERVED_LL internal 8) (primitive_site PAD43 DIFFM unbonded 21) (primitive_site PAD42 DIFFS unbonded 21) (primitive_site A12 IOB bonded 21) (primitive_site RANDOR_X32Y1 RESERVED_ANDOR internal 4) ) (tile 1 24 TIOIC18 TIOIS 6 (primitive_site VCC_X20Y25 VCC internal 1) (primitive_site RLL_X19Y25 RESERVED_LL internal 8) (primitive_site PAD45 DIFFM unbonded 21) (primitive_site PAD44 DIFFS unbonded 21) (primitive_site NOPAD9 IOB unbonded 21) (primitive_site RANDOR_X34Y1 RESERVED_ANDOR internal 4) ) (tile 1 25 TIOIBRAMC2 BRAM_IOIS 3 (primitive_site RLL_X20Y25 RESERVED_LL internal 8) (primitive_site VCC_X21Y25 VCC internal 1) (primitive_site DCM_X1Y1 DCM internal 41) ) (tile 1 26 BMTIOIBSC2 BRAMSITE_IOIS 0 ) (tile 1 27 TIOIC19 TIOIS 6 (primitive_site VCC_X22Y25 VCC internal 1) (primitive_site RLL_X21Y25 RESERVED_LL internal 8) (primitive_site B13 DIFFM bonded 21) (primitive_site A13 DIFFS bonded 21) (primitive_site PAD46 IOB unbonded 21) (primitive_site RANDOR_X36Y1 RESERVED_ANDOR internal 4) ) (tile 1 28 TIOIC20 TIOIS 6 (primitive_site VCC_X23Y25 VCC internal 1) (primitive_site RLL_X22Y25 RESERVED_LL internal 8) (primitive_site B14 DIFFM bonded 21) (primitive_site A14 DIFFS bonded 21) (primitive_site NOPAD10 IOB unbonded 21) (primitive_site RANDOR_X38Y1 RESERVED_ANDOR internal 4) ) (tile 1 29 TR UR 7 (primitive_site RLL_X23Y25 RESERVED_LL internal 8) (primitive_site DCI2 DCI internal 13) (primitive_site DCI1 DCI internal 13) (primitive_site BSCAN BSCAN internal 11) (primitive_site DCIRESET2 DCIRESET internal 1) (primitive_site DCIRESET1 DCIRESET internal 1) (primitive_site VCC_X24Y25 VCC internal 1) ) (tile 1 30 RTTERM CNR_RTTERM 0 ) (tile 2 0 LTERMR1 LTERM 0 ) (tile 2 1 LIOIR1 LIOIS 5 (primitive_site VCC_X0Y24 VCC internal 1) (primitive_site RLL_X0Y24 RESERVED_LL internal 8) (primitive_site C1 DIFFS bonded 21) (primitive_site B1 DIFFM bonded 21) (primitive_site NOPAD68 IOB unbonded 21) ) (tile 2 2 R1C1 CENTER_SMALL 6 (primitive_site RLL_X1Y24 RESERVED_LL internal 8) (primitive_site VCC_X1Y24 VCC internal 1) (primitive_site SLICE_X0Y46 SLICEM internal 32) (primitive_site SLICE_X0Y47 SLICEM internal 32) (primitive_site SLICE_X1Y46 SLICEL internal 25) (primitive_site SLICE_X1Y47 SLICEL internal 25) ) (tile 2 3 R1C2 CENTER_SMALL 6 (primitive_site RLL_X2Y24 RESERVED_LL internal 8) (primitive_site VCC_X2Y24 VCC internal 1) (primitive_site SLICE_X2Y46 SLICEM internal 32) (primitive_site SLICE_X2Y47 SLICEM internal 32) (primitive_site SLICE_X3Y46 SLICEL internal 25) (primitive_site SLICE_X3Y47 SLICEL internal 25) ) (tile 2 4 BRAMR1C1 BRAM3_SMALL 2 (primitive_site RLL_X3Y24 RESERVED_LL internal 8) (primitive_site VCC_X3Y24 VCC internal 1) ) (tile 2 5 BMR1C1 EMPTY64X76 0 ) (tile 2 6 R1C3 CENTER_SMALL 6 (primitive_site RLL_X4Y24 RESERVED_LL internal 8) (primitive_site VCC_X4Y24 VCC internal 1) (primitive_site SLICE_X4Y46 SLICEM internal 32) (primitive_site SLICE_X4Y47 SLICEM internal 32) (primitive_site SLICE_X5Y46 SLICEL internal 25) (primitive_site SLICE_X5Y47 SLICEL internal 25) ) (tile 2 7 R1C4 CENTER_SMALL 6 (primitive_site RLL_X5Y24 RESERVED_LL internal 8) (primitive_site VCC_X5Y24 VCC internal 1) (primitive_site SLICE_X6Y46 SLICEM internal 32) (primitive_site SLICE_X6Y47 SLICEM internal 32) (primitive_site SLICE_X7Y46 SLICEL internal 25) (primitive_site SLICE_X7Y47 SLICEL internal 25) ) (tile 2 8 LGCLKVR1 GCLKV 0 ) (tile 2 9 R1C5 CENTER_SMALL 6 (primitive_site RLL_X6Y24 RESERVED_LL internal 8) (primitive_site VCC_X6Y24 VCC internal 1) (primitive_site SLICE_X8Y46 SLICEM internal 32) (primitive_site SLICE_X8Y47 SLICEM internal 32) (primitive_site SLICE_X9Y46 SLICEL internal 25) (primitive_site SLICE_X9Y47 SLICEL internal 25) ) (tile 2 10 R1C6 CENTER_SMALL 6 (primitive_site RLL_X7Y24 RESERVED_LL internal 8) (primitive_site VCC_X7Y24 VCC internal 1) (primitive_site SLICE_X10Y46 SLICEM internal 32) (primitive_site SLICE_X10Y47 SLICEM internal 32) (primitive_site SLICE_X11Y46 SLICEL internal 25) (primitive_site SLICE_X11Y47 SLICEL internal 25) ) (tile 2 11 R1C7 CENTER_SMALL 6 (primitive_site RLL_X8Y24 RESERVED_LL internal 8) (primitive_site VCC_X8Y24 VCC internal 1) (primitive_site SLICE_X12Y46 SLICEM internal 32) (primitive_site SLICE_X12Y47 SLICEM internal 32) (primitive_site SLICE_X13Y46 SLICEL internal 25) (primitive_site SLICE_X13Y47 SLICEL internal 25) ) (tile 2 12 R1C8 CENTER_SMALL 6 (primitive_site RLL_X9Y24 RESERVED_LL internal 8) (primitive_site VCC_X9Y24 VCC internal 1) (primitive_site SLICE_X14Y46 SLICEM internal 32) (primitive_site SLICE_X14Y47 SLICEM internal 32) (primitive_site SLICE_X15Y46 SLICEL internal 25) (primitive_site SLICE_X15Y47 SLICEL internal 25) ) (tile 2 13 R1C9 CENTER_SMALL 6 (primitive_site RLL_X10Y24 RESERVED_LL internal 8) (primitive_site VCC_X10Y24 VCC internal 1) (primitive_site SLICE_X16Y46 SLICEM internal 32) (primitive_site SLICE_X16Y47 SLICEM internal 32) (primitive_site SLICE_X17Y46 SLICEL internal 25) (primitive_site SLICE_X17Y47 SLICEL internal 25) ) (tile 2 14 R1C10 CENTER_SMALL 6 (primitive_site RLL_X11Y24 RESERVED_LL internal 8) (primitive_site VCC_X11Y24 VCC internal 1) (primitive_site SLICE_X18Y46 SLICEM internal 32) (primitive_site SLICE_X18Y47 SLICEM internal 32) (primitive_site SLICE_X19Y46 SLICEL internal 25) (primitive_site SLICE_X19Y47 SLICEL internal 25) ) (tile 2 15 VMR1 CLKV 0 ) (tile 2 16 R1C11 CENTER_SMALL 6 (primitive_site RLL_X12Y24 RESERVED_LL internal 8) (primitive_site VCC_X13Y24 VCC internal 1) (primitive_site SLICE_X20Y46 SLICEM internal 32) (primitive_site SLICE_X20Y47 SLICEM internal 32) (primitive_site SLICE_X21Y46 SLICEL internal 25) (primitive_site SLICE_X21Y47 SLICEL internal 25) ) (tile 2 17 R1C12 CENTER_SMALL 6 (primitive_site RLL_X13Y24 RESERVED_LL internal 8) (primitive_site VCC_X14Y24 VCC internal 1) (primitive_site SLICE_X22Y46 SLICEM internal 32) (primitive_site SLICE_X22Y47 SLICEM internal 32) (primitive_site SLICE_X23Y46 SLICEL internal 25) (primitive_site SLICE_X23Y47 SLICEL internal 25) ) (tile 2 18 R1C13 CENTER_SMALL 6 (primitive_site RLL_X14Y24 RESERVED_LL internal 8) (primitive_site VCC_X15Y24 VCC internal 1) (primitive_site SLICE_X24Y46 SLICEM internal 32) (primitive_site SLICE_X24Y47 SLICEM internal 32) (primitive_site SLICE_X25Y46 SLICEL internal 25) (primitive_site SLICE_X25Y47 SLICEL internal 25) ) (tile 2 19 R1C14 CENTER_SMALL 6 (primitive_site RLL_X15Y24 RESERVED_LL internal 8) (primitive_site VCC_X16Y24 VCC internal 1) (primitive_site SLICE_X26Y46 SLICEM internal 32) (primitive_site SLICE_X26Y47 SLICEM internal 32) (primitive_site SLICE_X27Y46 SLICEL internal 25) (primitive_site SLICE_X27Y47 SLICEL internal 25) ) (tile 2 20 R1C15 CENTER_SMALL 6 (primitive_site RLL_X16Y24 RESERVED_LL internal 8) (primitive_site VCC_X17Y24 VCC internal 1) (primitive_site SLICE_X28Y46 SLICEM internal 32) (primitive_site SLICE_X28Y47 SLICEM internal 32) (primitive_site SLICE_X29Y46 SLICEL internal 25) (primitive_site SLICE_X29Y47 SLICEL internal 25) ) (tile 2 21 R1C16 CENTER_SMALL 6 (primitive_site RLL_X17Y24 RESERVED_LL internal 8) (primitive_site VCC_X18Y24 VCC internal 1) (primitive_site SLICE_X30Y46 SLICEM internal 32) (primitive_site SLICE_X30Y47 SLICEM internal 32) (primitive_site SLICE_X31Y46 SLICEL internal 25) (primitive_site SLICE_X31Y47 SLICEL internal 25) ) (tile 2 22 RGCLKVR1 GCLKV 0 ) (tile 2 23 R1C17 CENTER_SMALL 6 (primitive_site RLL_X18Y24 RESERVED_LL internal 8) (primitive_site VCC_X19Y24 VCC internal 1) (primitive_site SLICE_X32Y46 SLICEM internal 32) (primitive_site SLICE_X32Y47 SLICEM internal 32) (primitive_site SLICE_X33Y46 SLICEL internal 25) (primitive_site SLICE_X33Y47 SLICEL internal 25) ) (tile 2 24 R1C18 CENTER_SMALL 6 (primitive_site RLL_X19Y24 RESERVED_LL internal 8) (primitive_site VCC_X20Y24 VCC internal 1) (primitive_site SLICE_X34Y46 SLICEM internal 32) (primitive_site SLICE_X34Y47 SLICEM internal 32) (primitive_site SLICE_X35Y46 SLICEL internal 25) (primitive_site SLICE_X35Y47 SLICEL internal 25) ) (tile 2 25 BRAMR1C2 BRAM3_SMALL 2 (primitive_site RLL_X20Y24 RESERVED_LL internal 8) (primitive_site VCC_X21Y24 VCC internal 1) ) (tile 2 26 BMR1C2 EMPTY64X76 0 ) (tile 2 27 R1C19 CENTER_SMALL 6 (primitive_site RLL_X21Y24 RESERVED_LL internal 8) (primitive_site VCC_X22Y24 VCC internal 1) (primitive_site SLICE_X36Y46 SLICEM internal 32) (primitive_site SLICE_X36Y47 SLICEM internal 32) (primitive_site SLICE_X37Y46 SLICEL internal 25) (primitive_site SLICE_X37Y47 SLICEL internal 25) ) (tile 2 28 R1C20 CENTER_SMALL 6 (primitive_site RLL_X22Y24 RESERVED_LL internal 8) (primitive_site VCC_X23Y24 VCC internal 1) (primitive_site SLICE_X38Y46 SLICEM internal 32) (primitive_site SLICE_X38Y47 SLICEM internal 32) (primitive_site SLICE_X39Y46 SLICEL internal 25) (primitive_site SLICE_X39Y47 SLICEL internal 25) ) (tile 2 29 RIOIR1 RIOIS 5 (primitive_site VCC_X24Y24 VCC internal 1) (primitive_site RLL_X23Y24 RESERVED_LL internal 8) (primitive_site C16 DIFFM bonded 21) (primitive_site B16 DIFFS bonded 21) (primitive_site NOPAD11 IOB unbonded 21) ) (tile 2 30 RTERMR1 RTERM 0 ) (tile 3 0 LTERMR2 LTERM 0 ) (tile 3 1 LIOIR2 LIOIS 5 (primitive_site VCC_X0Y23 VCC internal 1) (primitive_site RLL_X0Y23 RESERVED_LL internal 8) (primitive_site C2 DIFFS bonded 21) (primitive_site C3 DIFFM bonded 21) (primitive_site NOPAD67 IOB unbonded 21) ) (tile 3 2 R2C1 CENTER_SMALL 6 (primitive_site RLL_X1Y23 RESERVED_LL internal 8) (primitive_site VCC_X1Y23 VCC internal 1) (primitive_site SLICE_X0Y44 SLICEM internal 32) (primitive_site SLICE_X0Y45 SLICEM internal 32) (primitive_site SLICE_X1Y44 SLICEL internal 25) (primitive_site SLICE_X1Y45 SLICEL internal 25) ) (tile 3 3 R2C2 CENTER_SMALL 6 (primitive_site RLL_X2Y23 RESERVED_LL internal 8) (primitive_site VCC_X2Y23 VCC internal 1) (primitive_site SLICE_X2Y44 SLICEM internal 32) (primitive_site SLICE_X2Y45 SLICEM internal 32) (primitive_site SLICE_X3Y44 SLICEL internal 25) (primitive_site SLICE_X3Y45 SLICEL internal 25) ) (tile 3 4 BRAMR2C1 BRAM2_SMALL 2 (primitive_site RLL_X3Y23 RESERVED_LL internal 8) (primitive_site VCC_X3Y23 VCC internal 1) ) (tile 3 5 BMR2C1 EMPTY64X76 0 ) (tile 3 6 R2C3 CENTER_SMALL 6 (primitive_site RLL_X4Y23 RESERVED_LL internal 8) (primitive_site VCC_X4Y23 VCC internal 1) (primitive_site SLICE_X4Y44 SLICEM internal 32) (primitive_site SLICE_X4Y45 SLICEM internal 32) (primitive_site SLICE_X5Y44 SLICEL internal 25) (primitive_site SLICE_X5Y45 SLICEL internal 25) ) (tile 3 7 R2C4 CENTER_SMALL 6 (primitive_site RLL_X5Y23 RESERVED_LL internal 8) (primitive_site VCC_X5Y23 VCC internal 1) (primitive_site SLICE_X6Y44 SLICEM internal 32) (primitive_site SLICE_X6Y45 SLICEM internal 32) (primitive_site SLICE_X7Y44 SLICEL internal 25) (primitive_site SLICE_X7Y45 SLICEL internal 25) ) (tile 3 8 LGCLKVR2 GCLKV 0 ) (tile 3 9 R2C5 CENTER_SMALL 6 (primitive_site RLL_X6Y23 RESERVED_LL internal 8) (primitive_site VCC_X6Y23 VCC internal 1) (primitive_site SLICE_X8Y44 SLICEM internal 32) (primitive_site SLICE_X8Y45 SLICEM internal 32) (primitive_site SLICE_X9Y44 SLICEL internal 25) (primitive_site SLICE_X9Y45 SLICEL internal 25) ) (tile 3 10 R2C6 CENTER_SMALL 6 (primitive_site RLL_X7Y23 RESERVED_LL internal 8) (primitive_site VCC_X7Y23 VCC internal 1) (primitive_site SLICE_X10Y44 SLICEM internal 32) (primitive_site SLICE_X10Y45 SLICEM internal 32) (primitive_site SLICE_X11Y44 SLICEL internal 25) (primitive_site SLICE_X11Y45 SLICEL internal 25) ) (tile 3 11 R2C7 CENTER_SMALL 6 (primitive_site RLL_X8Y23 RESERVED_LL internal 8) (primitive_site VCC_X8Y23 VCC internal 1) (primitive_site SLICE_X12Y44 SLICEM internal 32) (primitive_site SLICE_X12Y45 SLICEM internal 32) (primitive_site SLICE_X13Y44 SLICEL internal 25) (primitive_site SLICE_X13Y45 SLICEL internal 25) ) (tile 3 12 R2C8 CENTER_SMALL 6 (primitive_site RLL_X9Y23 RESERVED_LL internal 8) (primitive_site VCC_X9Y23 VCC internal 1) (primitive_site SLICE_X14Y44 SLICEM internal 32) (primitive_site SLICE_X14Y45 SLICEM internal 32) (primitive_site SLICE_X15Y44 SLICEL internal 25) (primitive_site SLICE_X15Y45 SLICEL internal 25) ) (tile 3 13 R2C9 CENTER_SMALL 6 (primitive_site RLL_X10Y23 RESERVED_LL internal 8) (primitive_site VCC_X10Y23 VCC internal 1) (primitive_site SLICE_X16Y44 SLICEM internal 32) (primitive_site SLICE_X16Y45 SLICEM internal 32) (primitive_site SLICE_X17Y44 SLICEL internal 25) (primitive_site SLICE_X17Y45 SLICEL internal 25) ) (tile 3 14 R2C10 CENTER_SMALL 6 (primitive_site RLL_X11Y23 RESERVED_LL internal 8) (primitive_site VCC_X11Y23 VCC internal 1) (primitive_site SLICE_X18Y44 SLICEM internal 32) (primitive_site SLICE_X18Y45 SLICEM internal 32) (primitive_site SLICE_X19Y44 SLICEL internal 25) (primitive_site SLICE_X19Y45 SLICEL internal 25) ) (tile 3 15 VMR2 CLKV 0 ) (tile 3 16 R2C11 CENTER_SMALL 6 (primitive_site RLL_X12Y23 RESERVED_LL internal 8) (primitive_site VCC_X13Y23 VCC internal 1) (primitive_site SLICE_X20Y44 SLICEM internal 32) (primitive_site SLICE_X20Y45 SLICEM internal 32) (primitive_site SLICE_X21Y44 SLICEL internal 25) (primitive_site SLICE_X21Y45 SLICEL internal 25) ) (tile 3 17 R2C12 CENTER_SMALL 6 (primitive_site RLL_X13Y23 RESERVED_LL internal 8) (primitive_site VCC_X14Y23 VCC internal 1) (primitive_site SLICE_X22Y44 SLICEM internal 32) (primitive_site SLICE_X22Y45 SLICEM internal 32) (primitive_site SLICE_X23Y44 SLICEL internal 25) (primitive_site SLICE_X23Y45 SLICEL internal 25) ) (tile 3 18 R2C13 CENTER_SMALL 6 (primitive_site RLL_X14Y23 RESERVED_LL internal 8) (primitive_site VCC_X15Y23 VCC internal 1) (primitive_site SLICE_X24Y44 SLICEM internal 32) (primitive_site SLICE_X24Y45 SLICEM internal 32) (primitive_site SLICE_X25Y44 SLICEL internal 25) (primitive_site SLICE_X25Y45 SLICEL internal 25) ) (tile 3 19 R2C14 CENTER_SMALL 6 (primitive_site RLL_X15Y23 RESERVED_LL internal 8) (primitive_site VCC_X16Y23 VCC internal 1) (primitive_site SLICE_X26Y44 SLICEM internal 32) (primitive_site SLICE_X26Y45 SLICEM internal 32) (primitive_site SLICE_X27Y44 SLICEL internal 25) (primitive_site SLICE_X27Y45 SLICEL internal 25) ) (tile 3 20 R2C15 CENTER_SMALL 6 (primitive_site RLL_X16Y23 RESERVED_LL internal 8) (primitive_site VCC_X17Y23 VCC internal 1) (primitive_site SLICE_X28Y44 SLICEM internal 32) (primitive_site SLICE_X28Y45 SLICEM internal 32) (primitive_site SLICE_X29Y44 SLICEL internal 25) (primitive_site SLICE_X29Y45 SLICEL internal 25) ) (tile 3 21 R2C16 CENTER_SMALL 6 (primitive_site RLL_X17Y23 RESERVED_LL internal 8) (primitive_site VCC_X18Y23 VCC internal 1) (primitive_site SLICE_X30Y44 SLICEM internal 32) (primitive_site SLICE_X30Y45 SLICEM internal 32) (primitive_site SLICE_X31Y44 SLICEL internal 25) (primitive_site SLICE_X31Y45 SLICEL internal 25) ) (tile 3 22 RGCLKVR2 GCLKV 0 ) (tile 3 23 R2C17 CENTER_SMALL 6 (primitive_site RLL_X18Y23 RESERVED_LL internal 8) (primitive_site VCC_X19Y23 VCC internal 1) (primitive_site SLICE_X32Y44 SLICEM internal 32) (primitive_site SLICE_X32Y45 SLICEM internal 32) (primitive_site SLICE_X33Y44 SLICEL internal 25) (primitive_site SLICE_X33Y45 SLICEL internal 25) ) (tile 3 24 R2C18 CENTER_SMALL 6 (primitive_site RLL_X19Y23 RESERVED_LL internal 8) (primitive_site VCC_X20Y23 VCC internal 1) (primitive_site SLICE_X34Y44 SLICEM internal 32) (primitive_site SLICE_X34Y45 SLICEM internal 32) (primitive_site SLICE_X35Y44 SLICEL internal 25) (primitive_site SLICE_X35Y45 SLICEL internal 25) ) (tile 3 25 BRAMR2C2 BRAM2_SMALL 2 (primitive_site RLL_X20Y23 RESERVED_LL internal 8) (primitive_site VCC_X21Y23 VCC internal 1) ) (tile 3 26 BMR2C2 EMPTY64X76 0 ) (tile 3 27 R2C19 CENTER_SMALL 6 (primitive_site RLL_X21Y23 RESERVED_LL internal 8) (primitive_site VCC_X22Y23 VCC internal 1) (primitive_site SLICE_X36Y44 SLICEM internal 32) (primitive_site SLICE_X36Y45 SLICEM internal 32) (primitive_site SLICE_X37Y44 SLICEL internal 25) (primitive_site SLICE_X37Y45 SLICEL internal 25) ) (tile 3 28 R2C20 CENTER_SMALL 6 (primitive_site RLL_X22Y23 RESERVED_LL internal 8) (primitive_site VCC_X23Y23 VCC internal 1) (primitive_site SLICE_X38Y44 SLICEM internal 32) (primitive_site SLICE_X38Y45 SLICEM internal 32) (primitive_site SLICE_X39Y44 SLICEL internal 25) (primitive_site SLICE_X39Y45 SLICEL internal 25) ) (tile 3 29 RIOIR2 RIOIS 5 (primitive_site VCC_X24Y23 VCC internal 1) (primitive_site RLL_X23Y23 RESERVED_LL internal 8) (primitive_site D14 DIFFM bonded 21) (primitive_site C15 DIFFS bonded 21) (primitive_site NOPAD12 IOB unbonded 21) ) (tile 3 30 RTERMR2 RTERM 0 ) (tile 4 0 LTERMR3 LTERM 0 ) (tile 4 1 LIOIR3 LIOIS 5 (primitive_site VCC_X0Y22 VCC internal 1) (primitive_site RLL_X0Y22 RESERVED_LL internal 8) (primitive_site D1 DIFFS bonded 21) (primitive_site D2 DIFFM bonded 21) (primitive_site NOPAD66 IOB unbonded 21) ) (tile 4 2 R3C1 CENTER_SMALL 6 (primitive_site RLL_X1Y22 RESERVED_LL internal 8) (primitive_site VCC_X1Y22 VCC internal 1) (primitive_site SLICE_X0Y42 SLICEM internal 32) (primitive_site SLICE_X0Y43 SLICEM internal 32) (primitive_site SLICE_X1Y42 SLICEL internal 25) (primitive_site SLICE_X1Y43 SLICEL internal 25) ) (tile 4 3 R3C2 CENTER_SMALL 6 (primitive_site RLL_X2Y22 RESERVED_LL internal 8) (primitive_site VCC_X2Y22 VCC internal 1) (primitive_site SLICE_X2Y42 SLICEM internal 32) (primitive_site SLICE_X2Y43 SLICEM internal 32) (primitive_site SLICE_X3Y42 SLICEL internal 25) (primitive_site SLICE_X3Y43 SLICEL internal 25) ) (tile 4 4 BRAMR3C1 BRAM1_SMALL 2 (primitive_site RLL_X3Y22 RESERVED_LL internal 8) (primitive_site VCC_X3Y22 VCC internal 1) ) (tile 4 5 BMR3C1 EMPTY64X76 0 ) (tile 4 6 R3C3 CENTER_SMALL 6 (primitive_site RLL_X4Y22 RESERVED_LL internal 8) (primitive_site VCC_X4Y22 VCC internal 1) (primitive_site SLICE_X4Y42 SLICEM internal 32) (primitive_site SLICE_X4Y43 SLICEM internal 32) (primitive_site SLICE_X5Y42 SLICEL internal 25) (primitive_site SLICE_X5Y43 SLICEL internal 25) ) (tile 4 7 R3C4 CENTER_SMALL 6 (primitive_site RLL_X5Y22 RESERVED_LL internal 8) (primitive_site VCC_X5Y22 VCC internal 1) (primitive_site SLICE_X6Y42 SLICEM internal 32) (primitive_site SLICE_X6Y43 SLICEM internal 32) (primitive_site SLICE_X7Y42 SLICEL internal 25) (primitive_site SLICE_X7Y43 SLICEL internal 25) ) (tile 4 8 LGCLKVR3 GCLKV 0 ) (tile 4 9 R3C5 CENTER_SMALL 6 (primitive_site RLL_X6Y22 RESERVED_LL internal 8) (primitive_site VCC_X6Y22 VCC internal 1) (primitive_site SLICE_X8Y42 SLICEM internal 32) (primitive_site SLICE_X8Y43 SLICEM internal 32) (primitive_site SLICE_X9Y42 SLICEL internal 25) (primitive_site SLICE_X9Y43 SLICEL internal 25) ) (tile 4 10 R3C6 CENTER_SMALL 6 (primitive_site RLL_X7Y22 RESERVED_LL internal 8) (primitive_site VCC_X7Y22 VCC internal 1) (primitive_site SLICE_X10Y42 SLICEM internal 32) (primitive_site SLICE_X10Y43 SLICEM internal 32) (primitive_site SLICE_X11Y42 SLICEL internal 25) (primitive_site SLICE_X11Y43 SLICEL internal 25) ) (tile 4 11 R3C7 CENTER_SMALL 6 (primitive_site RLL_X8Y22 RESERVED_LL internal 8) (primitive_site VCC_X8Y22 VCC internal 1) (primitive_site SLICE_X12Y42 SLICEM internal 32) (primitive_site SLICE_X12Y43 SLICEM internal 32) (primitive_site SLICE_X13Y42 SLICEL internal 25) (primitive_site SLICE_X13Y43 SLICEL internal 25) ) (tile 4 12 R3C8 CENTER_SMALL 6 (primitive_site RLL_X9Y22 RESERVED_LL internal 8) (primitive_site VCC_X9Y22 VCC internal 1) (primitive_site SLICE_X14Y42 SLICEM internal 32) (primitive_site SLICE_X14Y43 SLICEM internal 32) (primitive_site SLICE_X15Y42 SLICEL internal 25) (primitive_site SLICE_X15Y43 SLICEL internal 25) ) (tile 4 13 R3C9 CENTER_SMALL 6 (primitive_site RLL_X10Y22 RESERVED_LL internal 8) (primitive_site VCC_X10Y22 VCC internal 1) (primitive_site SLICE_X16Y42 SLICEM internal 32) (primitive_site SLICE_X16Y43 SLICEM internal 32) (primitive_site SLICE_X17Y42 SLICEL internal 25) (primitive_site SLICE_X17Y43 SLICEL internal 25) ) (tile 4 14 R3C10 CENTER_SMALL 6 (primitive_site RLL_X11Y22 RESERVED_LL internal 8) (primitive_site VCC_X11Y22 VCC internal 1) (primitive_site SLICE_X18Y42 SLICEM internal 32) (primitive_site SLICE_X18Y43 SLICEM internal 32) (primitive_site SLICE_X19Y42 SLICEL internal 25) (primitive_site SLICE_X19Y43 SLICEL internal 25) ) (tile 4 15 VMR3 CLKV 0 ) (tile 4 16 R3C11 CENTER_SMALL 6 (primitive_site RLL_X12Y22 RESERVED_LL internal 8) (primitive_site VCC_X13Y22 VCC internal 1) (primitive_site SLICE_X20Y42 SLICEM internal 32) (primitive_site SLICE_X20Y43 SLICEM internal 32) (primitive_site SLICE_X21Y42 SLICEL internal 25) (primitive_site SLICE_X21Y43 SLICEL internal 25) ) (tile 4 17 R3C12 CENTER_SMALL 6 (primitive_site RLL_X13Y22 RESERVED_LL internal 8) (primitive_site VCC_X14Y22 VCC internal 1) (primitive_site SLICE_X22Y42 SLICEM internal 32) (primitive_site SLICE_X22Y43 SLICEM internal 32) (primitive_site SLICE_X23Y42 SLICEL internal 25) (primitive_site SLICE_X23Y43 SLICEL internal 25) ) (tile 4 18 R3C13 CENTER_SMALL 6 (primitive_site RLL_X14Y22 RESERVED_LL internal 8) (primitive_site VCC_X15Y22 VCC internal 1) (primitive_site SLICE_X24Y42 SLICEM internal 32) (primitive_site SLICE_X24Y43 SLICEM internal 32) (primitive_site SLICE_X25Y42 SLICEL internal 25) (primitive_site SLICE_X25Y43 SLICEL internal 25) ) (tile 4 19 R3C14 CENTER_SMALL 6 (primitive_site RLL_X15Y22 RESERVED_LL internal 8) (primitive_site VCC_X16Y22 VCC internal 1) (primitive_site SLICE_X26Y42 SLICEM internal 32) (primitive_site SLICE_X26Y43 SLICEM internal 32) (primitive_site SLICE_X27Y42 SLICEL internal 25) (primitive_site SLICE_X27Y43 SLICEL internal 25) ) (tile 4 20 R3C15 CENTER_SMALL 6 (primitive_site RLL_X16Y22 RESERVED_LL internal 8) (primitive_site VCC_X17Y22 VCC internal 1) (primitive_site SLICE_X28Y42 SLICEM internal 32) (primitive_site SLICE_X28Y43 SLICEM internal 32) (primitive_site SLICE_X29Y42 SLICEL internal 25) (primitive_site SLICE_X29Y43 SLICEL internal 25) ) (tile 4 21 R3C16 CENTER_SMALL 6 (primitive_site RLL_X17Y22 RESERVED_LL internal 8) (primitive_site VCC_X18Y22 VCC internal 1) (primitive_site SLICE_X30Y42 SLICEM internal 32) (primitive_site SLICE_X30Y43 SLICEM internal 32) (primitive_site SLICE_X31Y42 SLICEL internal 25) (primitive_site SLICE_X31Y43 SLICEL internal 25) ) (tile 4 22 RGCLKVR3 GCLKV 0 ) (tile 4 23 R3C17 CENTER_SMALL 6 (primitive_site RLL_X18Y22 RESERVED_LL internal 8) (primitive_site VCC_X19Y22 VCC internal 1) (primitive_site SLICE_X32Y42 SLICEM internal 32) (primitive_site SLICE_X32Y43 SLICEM internal 32) (primitive_site SLICE_X33Y42 SLICEL internal 25) (primitive_site SLICE_X33Y43 SLICEL internal 25) ) (tile 4 24 R3C18 CENTER_SMALL 6 (primitive_site RLL_X19Y22 RESERVED_LL internal 8) (primitive_site VCC_X20Y22 VCC internal 1) (primitive_site SLICE_X34Y42 SLICEM internal 32) (primitive_site SLICE_X34Y43 SLICEM internal 32) (primitive_site SLICE_X35Y42 SLICEL internal 25) (primitive_site SLICE_X35Y43 SLICEL internal 25) ) (tile 4 25 BRAMR3C2 BRAM1_SMALL 2 (primitive_site RLL_X20Y22 RESERVED_LL internal 8) (primitive_site VCC_X21Y22 VCC internal 1) ) (tile 4 26 BMR3C2 EMPTY64X76 0 ) (tile 4 27 R3C19 CENTER_SMALL 6 (primitive_site RLL_X21Y22 RESERVED_LL internal 8) (primitive_site VCC_X22Y22 VCC internal 1) (primitive_site SLICE_X36Y42 SLICEM internal 32) (primitive_site SLICE_X36Y43 SLICEM internal 32) (primitive_site SLICE_X37Y42 SLICEL internal 25) (primitive_site SLICE_X37Y43 SLICEL internal 25) ) (tile 4 28 R3C20 CENTER_SMALL 6 (primitive_site RLL_X22Y22 RESERVED_LL internal 8) (primitive_site VCC_X23Y22 VCC internal 1) (primitive_site SLICE_X38Y42 SLICEM internal 32) (primitive_site SLICE_X38Y43 SLICEM internal 32) (primitive_site SLICE_X39Y42 SLICEL internal 25) (primitive_site SLICE_X39Y43 SLICEL internal 25) ) (tile 4 29 RIOIR3 RIOIS 5 (primitive_site VCC_X24Y22 VCC internal 1) (primitive_site RLL_X23Y22 RESERVED_LL internal 8) (primitive_site D16 DIFFM bonded 21) (primitive_site D15 DIFFS bonded 21) (primitive_site NOPAD13 IOB unbonded 21) ) (tile 4 30 RTERMR3 RTERM 0 ) (tile 5 0 LTERMR4 LTERM 0 ) (tile 5 1 LIOIR4 LIOIS 5 (primitive_site VCC_X0Y21 VCC internal 1) (primitive_site RLL_X0Y21 RESERVED_LL internal 8) (primitive_site E3 DIFFS bonded 21) (primitive_site D3 DIFFM bonded 21) (primitive_site NOPAD65 IOB unbonded 21) ) (tile 5 2 R4C1 CENTER_SMALL 6 (primitive_site RLL_X1Y21 RESERVED_LL internal 8) (primitive_site VCC_X1Y21 VCC internal 1) (primitive_site SLICE_X0Y40 SLICEM internal 32) (primitive_site SLICE_X0Y41 SLICEM internal 32) (primitive_site SLICE_X1Y40 SLICEL internal 25) (primitive_site SLICE_X1Y41 SLICEL internal 25) ) (tile 5 3 R4C2 CENTER_SMALL 6 (primitive_site RLL_X2Y21 RESERVED_LL internal 8) (primitive_site VCC_X2Y21 VCC internal 1) (primitive_site SLICE_X2Y40 SLICEM internal 32) (primitive_site SLICE_X2Y41 SLICEM internal 32) (primitive_site SLICE_X3Y40 SLICEL internal 25) (primitive_site SLICE_X3Y41 SLICEL internal 25) ) (tile 5 4 BRAMR4C1 BRAM0_SMALL 2 (primitive_site RLL_X3Y21 RESERVED_LL internal 8) (primitive_site VCC_X3Y21 VCC internal 1) ) (tile 5 5 BMR4C1 BRAMSITE 2 (primitive_site RAMB16_X0Y5 RAMB16 internal 180) (primitive_site MULT18X18_X0Y5 MULT18X18 internal 75) ) (tile 5 6 R4C3 CENTER_SMALL 6 (primitive_site RLL_X4Y21 RESERVED_LL internal 8) (primitive_site VCC_X4Y21 VCC internal 1) (primitive_site SLICE_X4Y40 SLICEM internal 32) (primitive_site SLICE_X4Y41 SLICEM internal 32) (primitive_site SLICE_X5Y40 SLICEL internal 25) (primitive_site SLICE_X5Y41 SLICEL internal 25) ) (tile 5 7 R4C4 CENTER_SMALL 6 (primitive_site RLL_X5Y21 RESERVED_LL internal 8) (primitive_site VCC_X5Y21 VCC internal 1) (primitive_site SLICE_X6Y40 SLICEM internal 32) (primitive_site SLICE_X6Y41 SLICEM internal 32) (primitive_site SLICE_X7Y40 SLICEL internal 25) (primitive_site SLICE_X7Y41 SLICEL internal 25) ) (tile 5 8 LGCLKVR4 GCLKV 0 ) (tile 5 9 R4C5 CENTER_SMALL 6 (primitive_site RLL_X6Y21 RESERVED_LL internal 8) (primitive_site VCC_X6Y21 VCC internal 1) (primitive_site SLICE_X8Y40 SLICEM internal 32) (primitive_site SLICE_X8Y41 SLICEM internal 32) (primitive_site SLICE_X9Y40 SLICEL internal 25) (primitive_site SLICE_X9Y41 SLICEL internal 25) ) (tile 5 10 R4C6 CENTER_SMALL 6 (primitive_site RLL_X7Y21 RESERVED_LL internal 8) (primitive_site VCC_X7Y21 VCC internal 1) (primitive_site SLICE_X10Y40 SLICEM internal 32) (primitive_site SLICE_X10Y41 SLICEM internal 32) (primitive_site SLICE_X11Y40 SLICEL internal 25) (primitive_site SLICE_X11Y41 SLICEL internal 25) ) (tile 5 11 R4C7 CENTER_SMALL 6 (primitive_site RLL_X8Y21 RESERVED_LL internal 8) (primitive_site VCC_X8Y21 VCC internal 1) (primitive_site SLICE_X12Y40 SLICEM internal 32) (primitive_site SLICE_X12Y41 SLICEM internal 32) (primitive_site SLICE_X13Y40 SLICEL internal 25) (primitive_site SLICE_X13Y41 SLICEL internal 25) ) (tile 5 12 R4C8 CENTER_SMALL 6 (primitive_site RLL_X9Y21 RESERVED_LL internal 8) (primitive_site VCC_X9Y21 VCC internal 1) (primitive_site SLICE_X14Y40 SLICEM internal 32) (primitive_site SLICE_X14Y41 SLICEM internal 32) (primitive_site SLICE_X15Y40 SLICEL internal 25) (primitive_site SLICE_X15Y41 SLICEL internal 25) ) (tile 5 13 R4C9 CENTER_SMALL 6 (primitive_site RLL_X10Y21 RESERVED_LL internal 8) (primitive_site VCC_X10Y21 VCC internal 1) (primitive_site SLICE_X16Y40 SLICEM internal 32) (primitive_site SLICE_X16Y41 SLICEM internal 32) (primitive_site SLICE_X17Y40 SLICEL internal 25) (primitive_site SLICE_X17Y41 SLICEL internal 25) ) (tile 5 14 R4C10 CENTER_SMALL 6 (primitive_site RLL_X11Y21 RESERVED_LL internal 8) (primitive_site VCC_X11Y21 VCC internal 1) (primitive_site SLICE_X18Y40 SLICEM internal 32) (primitive_site SLICE_X18Y41 SLICEM internal 32) (primitive_site SLICE_X19Y40 SLICEL internal 25) (primitive_site SLICE_X19Y41 SLICEL internal 25) ) (tile 5 15 VMR4 CLKV 0 ) (tile 5 16 R4C11 CENTER_SMALL 6 (primitive_site RLL_X12Y21 RESERVED_LL internal 8) (primitive_site VCC_X13Y21 VCC internal 1) (primitive_site SLICE_X20Y40 SLICEM internal 32) (primitive_site SLICE_X20Y41 SLICEM internal 32) (primitive_site SLICE_X21Y40 SLICEL internal 25) (primitive_site SLICE_X21Y41 SLICEL internal 25) ) (tile 5 17 R4C12 CENTER_SMALL 6 (primitive_site RLL_X13Y21 RESERVED_LL internal 8) (primitive_site VCC_X14Y21 VCC internal 1) (primitive_site SLICE_X22Y40 SLICEM internal 32) (primitive_site SLICE_X22Y41 SLICEM internal 32) (primitive_site SLICE_X23Y40 SLICEL internal 25) (primitive_site SLICE_X23Y41 SLICEL internal 25) ) (tile 5 18 R4C13 CENTER_SMALL 6 (primitive_site RLL_X14Y21 RESERVED_LL internal 8) (primitive_site VCC_X15Y21 VCC internal 1) (primitive_site SLICE_X24Y40 SLICEM internal 32) (primitive_site SLICE_X24Y41 SLICEM internal 32) (primitive_site SLICE_X25Y40 SLICEL internal 25) (primitive_site SLICE_X25Y41 SLICEL internal 25) ) (tile 5 19 R4C14 CENTER_SMALL 6 (primitive_site RLL_X15Y21 RESERVED_LL internal 8) (primitive_site VCC_X16Y21 VCC internal 1) (primitive_site SLICE_X26Y40 SLICEM internal 32) (primitive_site SLICE_X26Y41 SLICEM internal 32) (primitive_site SLICE_X27Y40 SLICEL internal 25) (primitive_site SLICE_X27Y41 SLICEL internal 25) ) (tile 5 20 R4C15 CENTER_SMALL 6 (primitive_site RLL_X16Y21 RESERVED_LL internal 8) (primitive_site VCC_X17Y21 VCC internal 1) (primitive_site SLICE_X28Y40 SLICEM internal 32) (primitive_site SLICE_X28Y41 SLICEM internal 32) (primitive_site SLICE_X29Y40 SLICEL internal 25) (primitive_site SLICE_X29Y41 SLICEL internal 25) ) (tile 5 21 R4C16 CENTER_SMALL 6 (primitive_site RLL_X17Y21 RESERVED_LL internal 8) (primitive_site VCC_X18Y21 VCC internal 1) (primitive_site SLICE_X30Y40 SLICEM internal 32) (primitive_site SLICE_X30Y41 SLICEM internal 32) (primitive_site SLICE_X31Y40 SLICEL internal 25) (primitive_site SLICE_X31Y41 SLICEL internal 25) ) (tile 5 22 RGCLKVR4 GCLKV 0 ) (tile 5 23 R4C17 CENTER_SMALL 6 (primitive_site RLL_X18Y21 RESERVED_LL internal 8) (primitive_site VCC_X19Y21 VCC internal 1) (primitive_site SLICE_X32Y40 SLICEM internal 32) (primitive_site SLICE_X32Y41 SLICEM internal 32) (primitive_site SLICE_X33Y40 SLICEL internal 25) (primitive_site SLICE_X33Y41 SLICEL internal 25) ) (tile 5 24 R4C18 CENTER_SMALL 6 (primitive_site RLL_X19Y21 RESERVED_LL internal 8) (primitive_site VCC_X20Y21 VCC internal 1) (primitive_site SLICE_X34Y40 SLICEM internal 32) (primitive_site SLICE_X34Y41 SLICEM internal 32) (primitive_site SLICE_X35Y40 SLICEL internal 25) (primitive_site SLICE_X35Y41 SLICEL internal 25) ) (tile 5 25 BRAMR4C2 BRAM0_SMALL 2 (primitive_site RLL_X20Y21 RESERVED_LL internal 8) (primitive_site VCC_X21Y21 VCC internal 1) ) (tile 5 26 BMR4C2 BRAMSITE 2 (primitive_site RAMB16_X1Y5 RAMB16 internal 180) (primitive_site MULT18X18_X1Y5 MULT18X18 internal 75) ) (tile 5 27 R4C19 CENTER_SMALL 6 (primitive_site RLL_X21Y21 RESERVED_LL internal 8) (primitive_site VCC_X22Y21 VCC internal 1) (primitive_site SLICE_X36Y40 SLICEM internal 32) (primitive_site SLICE_X36Y41 SLICEM internal 32) (primitive_site SLICE_X37Y40 SLICEL internal 25) (primitive_site SLICE_X37Y41 SLICEL internal 25) ) (tile 5 28 R4C20 CENTER_SMALL 6 (primitive_site RLL_X22Y21 RESERVED_LL internal 8) (primitive_site VCC_X23Y21 VCC internal 1) (primitive_site SLICE_X38Y40 SLICEM internal 32) (primitive_site SLICE_X38Y41 SLICEM internal 32) (primitive_site SLICE_X39Y40 SLICEL internal 25) (primitive_site SLICE_X39Y41 SLICEL internal 25) ) (tile 5 29 RIOIR4 RIOIS 5 (primitive_site VCC_X24Y21 VCC internal 1) (primitive_site RLL_X23Y21 RESERVED_LL internal 8) (primitive_site E14 DIFFM bonded 21) (primitive_site E13 DIFFS bonded 21) (primitive_site NOPAD14 IOB unbonded 21) ) (tile 5 30 RTERMR4 RTERM 0 ) (tile 6 0 GCLKHLR0TERMCLKH EMPTY0X2 0 ) (tile 6 1 GCLKHR1C0 GCLKH 1 (primitive_site GSIG_X0Y1 GLOBALSIG internal 0) ) (tile 6 2 GCLKHR1C1 GCLKH 1 (primitive_site GSIG_X1Y1 GLOBALSIG internal 0) ) (tile 6 3 GCLKHR1C2 GCLKH 1 (primitive_site GSIG_X2Y1 GLOBALSIG internal 0) ) (tile 6 4 GCLKHR1BRAMC1 GCLKH 1 (primitive_site GSIG_X3Y1 GLOBALSIG internal 0) ) (tile 6 5 BMGCLKHR1BSC1 BRAMSITE_GCLKH 0 ) (tile 6 6 GCLKHR1C3 GCLKH 1 (primitive_site GSIG_X4Y1 GLOBALSIG internal 0) ) (tile 6 7 GCLKHR1C4 GCLKH 1 (primitive_site GSIG_X5Y1 GLOBALSIG internal 0) ) (tile 6 8 LCLKVCR1 GCLKVC 0 ) (tile 6 9 GCLKHR1C5 GCLKH 1 (primitive_site GSIG_X6Y1 GLOBALSIG internal 0) ) (tile 6 10 GCLKHR1C6 GCLKH 1 (primitive_site GSIG_X7Y1 GLOBALSIG internal 0) ) (tile 6 11 GCLKHR1C7 GCLKH 1 (primitive_site GSIG_X8Y1 GLOBALSIG internal 0) ) (tile 6 12 GCLKHR1C8 GCLKH 1 (primitive_site GSIG_X9Y1 GLOBALSIG internal 0) ) (tile 6 13 GCLKHR1C9 GCLKH 1 (primitive_site GSIG_X10Y1 GLOBALSIG internal 0) ) (tile 6 14 GCLKHR1C10 GCLKH 1 (primitive_site GSIG_X11Y1 GLOBALSIG internal 0) ) (tile 6 15 CLKVCR1 CLKVC 0 ) (tile 6 16 GCLKHR1C11 GCLKH 1 (primitive_site GSIG_X13Y1 GLOBALSIG internal 0) ) (tile 6 17 GCLKHR1C12 GCLKH 1 (primitive_site GSIG_X14Y1 GLOBALSIG internal 0) ) (tile 6 18 GCLKHR1C13 GCLKH 1 (primitive_site GSIG_X15Y1 GLOBALSIG internal 0) ) (tile 6 19 GCLKHR1C14 GCLKH 1 (primitive_site GSIG_X16Y1 GLOBALSIG internal 0) ) (tile 6 20 GCLKHR1C15 GCLKH 1 (primitive_site GSIG_X17Y1 GLOBALSIG internal 0) ) (tile 6 21 GCLKHR1C16 GCLKH 1 (primitive_site GSIG_X18Y1 GLOBALSIG internal 0) ) (tile 6 22 RCLKVCR1 GCLKVC 0 ) (tile 6 23 GCLKHR1C17 GCLKH 1 (primitive_site GSIG_X19Y1 GLOBALSIG internal 0) ) (tile 6 24 GCLKHR1C18 GCLKH 1 (primitive_site GSIG_X20Y1 GLOBALSIG internal 0) ) (tile 6 25 GCLKHR1BRAMC2 GCLKH 1 (primitive_site GSIG_X21Y1 GLOBALSIG internal 0) ) (tile 6 26 BMGCLKHR1BSC2 BRAMSITE_GCLKH 0 ) (tile 6 27 GCLKHR1C19 GCLKH 1 (primitive_site GSIG_X22Y1 GLOBALSIG internal 0) ) (tile 6 28 GCLKHR1C20 GCLKH 1 (primitive_site GSIG_X23Y1 GLOBALSIG internal 0) ) (tile 6 29 GCLKHR1C21 GCLKH 1 (primitive_site GSIG_X24Y1 GLOBALSIG internal 0) ) (tile 6 30 GCLKHRR0TERM EMPTY0X2 0 ) (tile 7 0 LTERMR5 LTERM 0 ) (tile 7 1 LIOIR5 LIOIS 5 (primitive_site VCC_X0Y20 VCC internal 1) (primitive_site RLL_X0Y20 RESERVED_LL internal 8) (primitive_site E1 DIFFS bonded 21) (primitive_site E2 DIFFM bonded 21) (primitive_site NOPAD64 IOB unbonded 21) ) (tile 7 2 R5C1 CENTER_SMALL 6 (primitive_site RLL_X1Y20 RESERVED_LL internal 8) (primitive_site VCC_X1Y20 VCC internal 1) (primitive_site SLICE_X0Y38 SLICEM internal 32) (primitive_site SLICE_X0Y39 SLICEM internal 32) (primitive_site SLICE_X1Y38 SLICEL internal 25) (primitive_site SLICE_X1Y39 SLICEL internal 25) ) (tile 7 3 R5C2 CENTER_SMALL 6 (primitive_site RLL_X2Y20 RESERVED_LL internal 8) (primitive_site VCC_X2Y20 VCC internal 1) (primitive_site SLICE_X2Y38 SLICEM internal 32) (primitive_site SLICE_X2Y39 SLICEM internal 32) (primitive_site SLICE_X3Y38 SLICEL internal 25) (primitive_site SLICE_X3Y39 SLICEL internal 25) ) (tile 7 4 BRAMR5C1 BRAM3_SMALL 2 (primitive_site RLL_X3Y20 RESERVED_LL internal 8) (primitive_site VCC_X3Y20 VCC internal 1) ) (tile 7 5 BMR5C1 EMPTY64X76 0 ) (tile 7 6 R5C3 CENTER_SMALL 6 (primitive_site RLL_X4Y20 RESERVED_LL internal 8) (primitive_site VCC_X4Y20 VCC internal 1) (primitive_site SLICE_X4Y38 SLICEM internal 32) (primitive_site SLICE_X4Y39 SLICEM internal 32) (primitive_site SLICE_X5Y38 SLICEL internal 25) (primitive_site SLICE_X5Y39 SLICEL internal 25) ) (tile 7 7 R5C4 CENTER_SMALL 6 (primitive_site RLL_X5Y20 RESERVED_LL internal 8) (primitive_site VCC_X5Y20 VCC internal 1) (primitive_site SLICE_X6Y38 SLICEM internal 32) (primitive_site SLICE_X6Y39 SLICEM internal 32) (primitive_site SLICE_X7Y38 SLICEL internal 25) (primitive_site SLICE_X7Y39 SLICEL internal 25) ) (tile 7 8 LGCLKVR5 GCLKV 0 ) (tile 7 9 R5C5 CENTER_SMALL 6 (primitive_site RLL_X6Y20 RESERVED_LL internal 8) (primitive_site VCC_X6Y20 VCC internal 1) (primitive_site SLICE_X8Y38 SLICEM internal 32) (primitive_site SLICE_X8Y39 SLICEM internal 32) (primitive_site SLICE_X9Y38 SLICEL internal 25) (primitive_site SLICE_X9Y39 SLICEL internal 25) ) (tile 7 10 R5C6 CENTER_SMALL 6 (primitive_site RLL_X7Y20 RESERVED_LL internal 8) (primitive_site VCC_X7Y20 VCC internal 1) (primitive_site SLICE_X10Y38 SLICEM internal 32) (primitive_site SLICE_X10Y39 SLICEM internal 32) (primitive_site SLICE_X11Y38 SLICEL internal 25) (primitive_site SLICE_X11Y39 SLICEL internal 25) ) (tile 7 11 R5C7 CENTER_SMALL 6 (primitive_site RLL_X8Y20 RESERVED_LL internal 8) (primitive_site VCC_X8Y20 VCC internal 1) (primitive_site SLICE_X12Y38 SLICEM internal 32) (primitive_site SLICE_X12Y39 SLICEM internal 32) (primitive_site SLICE_X13Y38 SLICEL internal 25) (primitive_site SLICE_X13Y39 SLICEL internal 25) ) (tile 7 12 R5C8 CENTER_SMALL 6 (primitive_site RLL_X9Y20 RESERVED_LL internal 8) (primitive_site VCC_X9Y20 VCC internal 1) (primitive_site SLICE_X14Y38 SLICEM internal 32) (primitive_site SLICE_X14Y39 SLICEM internal 32) (primitive_site SLICE_X15Y38 SLICEL internal 25) (primitive_site SLICE_X15Y39 SLICEL internal 25) ) (tile 7 13 R5C9 CENTER_SMALL 6 (primitive_site RLL_X10Y20 RESERVED_LL internal 8) (primitive_site VCC_X10Y20 VCC internal 1) (primitive_site SLICE_X16Y38 SLICEM internal 32) (primitive_site SLICE_X16Y39 SLICEM internal 32) (primitive_site SLICE_X17Y38 SLICEL internal 25) (primitive_site SLICE_X17Y39 SLICEL internal 25) ) (tile 7 14 R5C10 CENTER_SMALL 6 (primitive_site RLL_X11Y20 RESERVED_LL internal 8) (primitive_site VCC_X11Y20 VCC internal 1) (primitive_site SLICE_X18Y38 SLICEM internal 32) (primitive_site SLICE_X18Y39 SLICEM internal 32) (primitive_site SLICE_X19Y38 SLICEL internal 25) (primitive_site SLICE_X19Y39 SLICEL internal 25) ) (tile 7 15 VMR5 CLKV 0 ) (tile 7 16 R5C11 CENTER_SMALL 6 (primitive_site RLL_X12Y20 RESERVED_LL internal 8) (primitive_site VCC_X13Y20 VCC internal 1) (primitive_site SLICE_X20Y38 SLICEM internal 32) (primitive_site SLICE_X20Y39 SLICEM internal 32) (primitive_site SLICE_X21Y38 SLICEL internal 25) (primitive_site SLICE_X21Y39 SLICEL internal 25) ) (tile 7 17 R5C12 CENTER_SMALL 6 (primitive_site RLL_X13Y20 RESERVED_LL internal 8) (primitive_site VCC_X14Y20 VCC internal 1) (primitive_site SLICE_X22Y38 SLICEM internal 32) (primitive_site SLICE_X22Y39 SLICEM internal 32) (primitive_site SLICE_X23Y38 SLICEL internal 25) (primitive_site SLICE_X23Y39 SLICEL internal 25) ) (tile 7 18 R5C13 CENTER_SMALL 6 (primitive_site RLL_X14Y20 RESERVED_LL internal 8) (primitive_site VCC_X15Y20 VCC internal 1) (primitive_site SLICE_X24Y38 SLICEM internal 32) (primitive_site SLICE_X24Y39 SLICEM internal 32) (primitive_site SLICE_X25Y38 SLICEL internal 25) (primitive_site SLICE_X25Y39 SLICEL internal 25) ) (tile 7 19 R5C14 CENTER_SMALL 6 (primitive_site RLL_X15Y20 RESERVED_LL internal 8) (primitive_site VCC_X16Y20 VCC internal 1) (primitive_site SLICE_X26Y38 SLICEM internal 32) (primitive_site SLICE_X26Y39 SLICEM internal 32) (primitive_site SLICE_X27Y38 SLICEL internal 25) (primitive_site SLICE_X27Y39 SLICEL internal 25) ) (tile 7 20 R5C15 CENTER_SMALL 6 (primitive_site RLL_X16Y20 RESERVED_LL internal 8) (primitive_site VCC_X17Y20 VCC internal 1) (primitive_site SLICE_X28Y38 SLICEM internal 32) (primitive_site SLICE_X28Y39 SLICEM internal 32) (primitive_site SLICE_X29Y38 SLICEL internal 25) (primitive_site SLICE_X29Y39 SLICEL internal 25) ) (tile 7 21 R5C16 CENTER_SMALL 6 (primitive_site RLL_X17Y20 RESERVED_LL internal 8) (primitive_site VCC_X18Y20 VCC internal 1) (primitive_site SLICE_X30Y38 SLICEM internal 32) (primitive_site SLICE_X30Y39 SLICEM internal 32) (primitive_site SLICE_X31Y38 SLICEL internal 25) (primitive_site SLICE_X31Y39 SLICEL internal 25) ) (tile 7 22 RGCLKVR5 GCLKV 0 ) (tile 7 23 R5C17 CENTER_SMALL 6 (primitive_site RLL_X18Y20 RESERVED_LL internal 8) (primitive_site VCC_X19Y20 VCC internal 1) (primitive_site SLICE_X32Y38 SLICEM internal 32) (primitive_site SLICE_X32Y39 SLICEM internal 32) (primitive_site SLICE_X33Y38 SLICEL internal 25) (primitive_site SLICE_X33Y39 SLICEL internal 25) ) (tile 7 24 R5C18 CENTER_SMALL 6 (primitive_site RLL_X19Y20 RESERVED_LL internal 8) (primitive_site VCC_X20Y20 VCC internal 1) (primitive_site SLICE_X34Y38 SLICEM internal 32) (primitive_site SLICE_X34Y39 SLICEM internal 32) (primitive_site SLICE_X35Y38 SLICEL internal 25) (primitive_site SLICE_X35Y39 SLICEL internal 25) ) (tile 7 25 BRAMR5C2 BRAM3_SMALL 2 (primitive_site RLL_X20Y20 RESERVED_LL internal 8) (primitive_site VCC_X21Y20 VCC internal 1) ) (tile 7 26 BMR5C2 EMPTY64X76 0 ) (tile 7 27 R5C19 CENTER_SMALL 6 (primitive_site RLL_X21Y20 RESERVED_LL internal 8) (primitive_site VCC_X22Y20 VCC internal 1) (primitive_site SLICE_X36Y38 SLICEM internal 32) (primitive_site SLICE_X36Y39 SLICEM internal 32) (primitive_site SLICE_X37Y38 SLICEL internal 25) (primitive_site SLICE_X37Y39 SLICEL internal 25) ) (tile 7 28 R5C20 CENTER_SMALL 6 (primitive_site RLL_X22Y20 RESERVED_LL internal 8) (primitive_site VCC_X23Y20 VCC internal 1) (primitive_site SLICE_X38Y38 SLICEM internal 32) (primitive_site SLICE_X38Y39 SLICEM internal 32) (primitive_site SLICE_X39Y38 SLICEL internal 25) (primitive_site SLICE_X39Y39 SLICEL internal 25) ) (tile 7 29 RIOIR5 RIOIS 5 (primitive_site VCC_X24Y20 VCC internal 1) (primitive_site RLL_X23Y20 RESERVED_LL internal 8) (primitive_site E16 DIFFM bonded 21) (primitive_site E15 DIFFS bonded 21) (primitive_site NOPAD15 IOB unbonded 21) ) (tile 7 30 RTERMR5 RTERM 0 ) (tile 8 0 LTERMR6 LTERM 0 ) (tile 8 1 LIOIR6 LIOIS 5 (primitive_site VCC_X0Y19 VCC internal 1) (primitive_site RLL_X0Y19 RESERVED_LL internal 8) (primitive_site F4 DIFFS bonded 21) (primitive_site E4 DIFFM bonded 21) (primitive_site NOPAD63 IOB unbonded 21) ) (tile 8 2 R6C1 CENTER_SMALL 6 (primitive_site RLL_X1Y19 RESERVED_LL internal 8) (primitive_site VCC_X1Y19 VCC internal 1) (primitive_site SLICE_X0Y36 SLICEM internal 32) (primitive_site SLICE_X0Y37 SLICEM internal 32) (primitive_site SLICE_X1Y36 SLICEL internal 25) (primitive_site SLICE_X1Y37 SLICEL internal 25) ) (tile 8 3 R6C2 CENTER_SMALL 6 (primitive_site RLL_X2Y19 RESERVED_LL internal 8) (primitive_site VCC_X2Y19 VCC internal 1) (primitive_site SLICE_X2Y36 SLICEM internal 32) (primitive_site SLICE_X2Y37 SLICEM internal 32) (primitive_site SLICE_X3Y36 SLICEL internal 25) (primitive_site SLICE_X3Y37 SLICEL internal 25) ) (tile 8 4 BRAMR6C1 BRAM2_SMALL 2 (primitive_site RLL_X3Y19 RESERVED_LL internal 8) (primitive_site VCC_X3Y19 VCC internal 1) ) (tile 8 5 BMR6C1 EMPTY64X76 0 ) (tile 8 6 R6C3 CENTER_SMALL 6 (primitive_site RLL_X4Y19 RESERVED_LL internal 8) (primitive_site VCC_X4Y19 VCC internal 1) (primitive_site SLICE_X4Y36 SLICEM internal 32) (primitive_site SLICE_X4Y37 SLICEM internal 32) (primitive_site SLICE_X5Y36 SLICEL internal 25) (primitive_site SLICE_X5Y37 SLICEL internal 25) ) (tile 8 7 R6C4 CENTER_SMALL 6 (primitive_site RLL_X5Y19 RESERVED_LL internal 8) (primitive_site VCC_X5Y19 VCC internal 1) (primitive_site SLICE_X6Y36 SLICEM internal 32) (primitive_site SLICE_X6Y37 SLICEM internal 32) (primitive_site SLICE_X7Y36 SLICEL internal 25) (primitive_site SLICE_X7Y37 SLICEL internal 25) ) (tile 8 8 LGCLKVR6 GCLKV 0 ) (tile 8 9 R6C5 CENTER_SMALL 6 (primitive_site RLL_X6Y19 RESERVED_LL internal 8) (primitive_site VCC_X6Y19 VCC internal 1) (primitive_site SLICE_X8Y36 SLICEM internal 32) (primitive_site SLICE_X8Y37 SLICEM internal 32) (primitive_site SLICE_X9Y36 SLICEL internal 25) (primitive_site SLICE_X9Y37 SLICEL internal 25) ) (tile 8 10 R6C6 CENTER_SMALL 6 (primitive_site RLL_X7Y19 RESERVED_LL internal 8) (primitive_site VCC_X7Y19 VCC internal 1) (primitive_site SLICE_X10Y36 SLICEM internal 32) (primitive_site SLICE_X10Y37 SLICEM internal 32) (primitive_site SLICE_X11Y36 SLICEL internal 25) (primitive_site SLICE_X11Y37 SLICEL internal 25) ) (tile 8 11 R6C7 CENTER_SMALL 6 (primitive_site RLL_X8Y19 RESERVED_LL internal 8) (primitive_site VCC_X8Y19 VCC internal 1) (primitive_site SLICE_X12Y36 SLICEM internal 32) (primitive_site SLICE_X12Y37 SLICEM internal 32) (primitive_site SLICE_X13Y36 SLICEL internal 25) (primitive_site SLICE_X13Y37 SLICEL internal 25) ) (tile 8 12 R6C8 CENTER_SMALL 6 (primitive_site RLL_X9Y19 RESERVED_LL internal 8) (primitive_site VCC_X9Y19 VCC internal 1) (primitive_site SLICE_X14Y36 SLICEM internal 32) (primitive_site SLICE_X14Y37 SLICEM internal 32) (primitive_site SLICE_X15Y36 SLICEL internal 25) (primitive_site SLICE_X15Y37 SLICEL internal 25) ) (tile 8 13 R6C9 CENTER_SMALL 6 (primitive_site RLL_X10Y19 RESERVED_LL internal 8) (primitive_site VCC_X10Y19 VCC internal 1) (primitive_site SLICE_X16Y36 SLICEM internal 32) (primitive_site SLICE_X16Y37 SLICEM internal 32) (primitive_site SLICE_X17Y36 SLICEL internal 25) (primitive_site SLICE_X17Y37 SLICEL internal 25) ) (tile 8 14 R6C10 CENTER_SMALL 6 (primitive_site RLL_X11Y19 RESERVED_LL internal 8) (primitive_site VCC_X11Y19 VCC internal 1) (primitive_site SLICE_X18Y36 SLICEM internal 32) (primitive_site SLICE_X18Y37 SLICEM internal 32) (primitive_site SLICE_X19Y36 SLICEL internal 25) (primitive_site SLICE_X19Y37 SLICEL internal 25) ) (tile 8 15 VMR6 CLKV 0 ) (tile 8 16 R6C11 CENTER_SMALL 6 (primitive_site RLL_X12Y19 RESERVED_LL internal 8) (primitive_site VCC_X13Y19 VCC internal 1) (primitive_site SLICE_X20Y36 SLICEM internal 32) (primitive_site SLICE_X20Y37 SLICEM internal 32) (primitive_site SLICE_X21Y36 SLICEL internal 25) (primitive_site SLICE_X21Y37 SLICEL internal 25) ) (tile 8 17 R6C12 CENTER_SMALL 6 (primitive_site RLL_X13Y19 RESERVED_LL internal 8) (primitive_site VCC_X14Y19 VCC internal 1) (primitive_site SLICE_X22Y36 SLICEM internal 32) (primitive_site SLICE_X22Y37 SLICEM internal 32) (primitive_site SLICE_X23Y36 SLICEL internal 25) (primitive_site SLICE_X23Y37 SLICEL internal 25) ) (tile 8 18 R6C13 CENTER_SMALL 6 (primitive_site RLL_X14Y19 RESERVED_LL internal 8) (primitive_site VCC_X15Y19 VCC internal 1) (primitive_site SLICE_X24Y36 SLICEM internal 32) (primitive_site SLICE_X24Y37 SLICEM internal 32) (primitive_site SLICE_X25Y36 SLICEL internal 25) (primitive_site SLICE_X25Y37 SLICEL internal 25) ) (tile 8 19 R6C14 CENTER_SMALL 6 (primitive_site RLL_X15Y19 RESERVED_LL internal 8) (primitive_site VCC_X16Y19 VCC internal 1) (primitive_site SLICE_X26Y36 SLICEM internal 32) (primitive_site SLICE_X26Y37 SLICEM internal 32) (primitive_site SLICE_X27Y36 SLICEL internal 25) (primitive_site SLICE_X27Y37 SLICEL internal 25) ) (tile 8 20 R6C15 CENTER_SMALL 6 (primitive_site RLL_X16Y19 RESERVED_LL internal 8) (primitive_site VCC_X17Y19 VCC internal 1) (primitive_site SLICE_X28Y36 SLICEM internal 32) (primitive_site SLICE_X28Y37 SLICEM internal 32) (primitive_site SLICE_X29Y36 SLICEL internal 25) (primitive_site SLICE_X29Y37 SLICEL internal 25) ) (tile 8 21 R6C16 CENTER_SMALL 6 (primitive_site RLL_X17Y19 RESERVED_LL internal 8) (primitive_site VCC_X18Y19 VCC internal 1) (primitive_site SLICE_X30Y36 SLICEM internal 32) (primitive_site SLICE_X30Y37 SLICEM internal 32) (primitive_site SLICE_X31Y36 SLICEL internal 25) (primitive_site SLICE_X31Y37 SLICEL internal 25) ) (tile 8 22 RGCLKVR6 GCLKV 0 ) (tile 8 23 R6C17 CENTER_SMALL 6 (primitive_site RLL_X18Y19 RESERVED_LL internal 8) (primitive_site VCC_X19Y19 VCC internal 1) (primitive_site SLICE_X32Y36 SLICEM internal 32) (primitive_site SLICE_X32Y37 SLICEM internal 32) (primitive_site SLICE_X33Y36 SLICEL internal 25) (primitive_site SLICE_X33Y37 SLICEL internal 25) ) (tile 8 24 R6C18 CENTER_SMALL 6 (primitive_site RLL_X19Y19 RESERVED_LL internal 8) (primitive_site VCC_X20Y19 VCC internal 1) (primitive_site SLICE_X34Y36 SLICEM internal 32) (primitive_site SLICE_X34Y37 SLICEM internal 32) (primitive_site SLICE_X35Y36 SLICEL internal 25) (primitive_site SLICE_X35Y37 SLICEL internal 25) ) (tile 8 25 BRAMR6C2 BRAM2_SMALL 2 (primitive_site RLL_X20Y19 RESERVED_LL internal 8) (primitive_site VCC_X21Y19 VCC internal 1) ) (tile 8 26 BMR6C2 EMPTY64X76 0 ) (tile 8 27 R6C19 CENTER_SMALL 6 (primitive_site RLL_X21Y19 RESERVED_LL internal 8) (primitive_site VCC_X22Y19 VCC internal 1) (primitive_site SLICE_X36Y36 SLICEM internal 32) (primitive_site SLICE_X36Y37 SLICEM internal 32) (primitive_site SLICE_X37Y36 SLICEL internal 25) (primitive_site SLICE_X37Y37 SLICEL internal 25) ) (tile 8 28 R6C20 CENTER_SMALL 6 (primitive_site RLL_X22Y19 RESERVED_LL internal 8) (primitive_site VCC_X23Y19 VCC internal 1) (primitive_site SLICE_X38Y36 SLICEM internal 32) (primitive_site SLICE_X38Y37 SLICEM internal 32) (primitive_site SLICE_X39Y36 SLICEL internal 25) (primitive_site SLICE_X39Y37 SLICEL internal 25) ) (tile 8 29 RIOIR6 RIOIS 5 (primitive_site VCC_X24Y19 VCC internal 1) (primitive_site RLL_X23Y19 RESERVED_LL internal 8) (primitive_site F13 DIFFM bonded 21) (primitive_site F12 DIFFS bonded 21) (primitive_site NOPAD16 IOB unbonded 21) ) (tile 8 30 RTERMR6 RTERM 0 ) (tile 9 0 LTERMR7 LTERM 0 ) (tile 9 1 LIOIR7 LIOIS 5 (primitive_site VCC_X0Y18 VCC internal 1) (primitive_site RLL_X0Y18 RESERVED_LL internal 8) (primitive_site F2 DIFFS bonded 21) (primitive_site F3 DIFFM bonded 21) (primitive_site NOPAD62 IOB unbonded 21) ) (tile 9 2 R7C1 CENTER_SMALL 6 (primitive_site RLL_X1Y18 RESERVED_LL internal 8) (primitive_site VCC_X1Y18 VCC internal 1) (primitive_site SLICE_X0Y34 SLICEM internal 32) (primitive_site SLICE_X0Y35 SLICEM internal 32) (primitive_site SLICE_X1Y34 SLICEL internal 25) (primitive_site SLICE_X1Y35 SLICEL internal 25) ) (tile 9 3 R7C2 CENTER_SMALL 6 (primitive_site RLL_X2Y18 RESERVED_LL internal 8) (primitive_site VCC_X2Y18 VCC internal 1) (primitive_site SLICE_X2Y34 SLICEM internal 32) (primitive_site SLICE_X2Y35 SLICEM internal 32) (primitive_site SLICE_X3Y34 SLICEL internal 25) (primitive_site SLICE_X3Y35 SLICEL internal 25) ) (tile 9 4 BRAMR7C1 BRAM1_SMALL 2 (primitive_site RLL_X3Y18 RESERVED_LL internal 8) (primitive_site VCC_X3Y18 VCC internal 1) ) (tile 9 5 BMR7C1 EMPTY64X76 0 ) (tile 9 6 R7C3 CENTER_SMALL 6 (primitive_site RLL_X4Y18 RESERVED_LL internal 8) (primitive_site VCC_X4Y18 VCC internal 1) (primitive_site SLICE_X4Y34 SLICEM internal 32) (primitive_site SLICE_X4Y35 SLICEM internal 32) (primitive_site SLICE_X5Y34 SLICEL internal 25) (primitive_site SLICE_X5Y35 SLICEL internal 25) ) (tile 9 7 R7C4 CENTER_SMALL 6 (primitive_site RLL_X5Y18 RESERVED_LL internal 8) (primitive_site VCC_X5Y18 VCC internal 1) (primitive_site SLICE_X6Y34 SLICEM internal 32) (primitive_site SLICE_X6Y35 SLICEM internal 32) (primitive_site SLICE_X7Y34 SLICEL internal 25) (primitive_site SLICE_X7Y35 SLICEL internal 25) ) (tile 9 8 LGCLKVR7 GCLKV 0 ) (tile 9 9 R7C5 CENTER_SMALL 6 (primitive_site RLL_X6Y18 RESERVED_LL internal 8) (primitive_site VCC_X6Y18 VCC internal 1) (primitive_site SLICE_X8Y34 SLICEM internal 32) (primitive_site SLICE_X8Y35 SLICEM internal 32) (primitive_site SLICE_X9Y34 SLICEL internal 25) (primitive_site SLICE_X9Y35 SLICEL internal 25) ) (tile 9 10 R7C6 CENTER_SMALL 6 (primitive_site RLL_X7Y18 RESERVED_LL internal 8) (primitive_site VCC_X7Y18 VCC internal 1) (primitive_site SLICE_X10Y34 SLICEM internal 32) (primitive_site SLICE_X10Y35 SLICEM internal 32) (primitive_site SLICE_X11Y34 SLICEL internal 25) (primitive_site SLICE_X11Y35 SLICEL internal 25) ) (tile 9 11 R7C7 CENTER_SMALL 6 (primitive_site RLL_X8Y18 RESERVED_LL internal 8) (primitive_site VCC_X8Y18 VCC internal 1) (primitive_site SLICE_X12Y34 SLICEM internal 32) (primitive_site SLICE_X12Y35 SLICEM internal 32) (primitive_site SLICE_X13Y34 SLICEL internal 25) (primitive_site SLICE_X13Y35 SLICEL internal 25) ) (tile 9 12 R7C8 CENTER_SMALL 6 (primitive_site RLL_X9Y18 RESERVED_LL internal 8) (primitive_site VCC_X9Y18 VCC internal 1) (primitive_site SLICE_X14Y34 SLICEM internal 32) (primitive_site SLICE_X14Y35 SLICEM internal 32) (primitive_site SLICE_X15Y34 SLICEL internal 25) (primitive_site SLICE_X15Y35 SLICEL internal 25) ) (tile 9 13 R7C9 CENTER_SMALL 6 (primitive_site RLL_X10Y18 RESERVED_LL internal 8) (primitive_site VCC_X10Y18 VCC internal 1) (primitive_site SLICE_X16Y34 SLICEM internal 32) (primitive_site SLICE_X16Y35 SLICEM internal 32) (primitive_site SLICE_X17Y34 SLICEL internal 25) (primitive_site SLICE_X17Y35 SLICEL internal 25) ) (tile 9 14 R7C10 CENTER_SMALL 6 (primitive_site RLL_X11Y18 RESERVED_LL internal 8) (primitive_site VCC_X11Y18 VCC internal 1) (primitive_site SLICE_X18Y34 SLICEM internal 32) (primitive_site SLICE_X18Y35 SLICEM internal 32) (primitive_site SLICE_X19Y34 SLICEL internal 25) (primitive_site SLICE_X19Y35 SLICEL internal 25) ) (tile 9 15 VMR7 CLKV 0 ) (tile 9 16 R7C11 CENTER_SMALL 6 (primitive_site RLL_X12Y18 RESERVED_LL internal 8) (primitive_site VCC_X13Y18 VCC internal 1) (primitive_site SLICE_X20Y34 SLICEM internal 32) (primitive_site SLICE_X20Y35 SLICEM internal 32) (primitive_site SLICE_X21Y34 SLICEL internal 25) (primitive_site SLICE_X21Y35 SLICEL internal 25) ) (tile 9 17 R7C12 CENTER_SMALL 6 (primitive_site RLL_X13Y18 RESERVED_LL internal 8) (primitive_site VCC_X14Y18 VCC internal 1) (primitive_site SLICE_X22Y34 SLICEM internal 32) (primitive_site SLICE_X22Y35 SLICEM internal 32) (primitive_site SLICE_X23Y34 SLICEL internal 25) (primitive_site SLICE_X23Y35 SLICEL internal 25) ) (tile 9 18 R7C13 CENTER_SMALL 6 (primitive_site RLL_X14Y18 RESERVED_LL internal 8) (primitive_site VCC_X15Y18 VCC internal 1) (primitive_site SLICE_X24Y34 SLICEM internal 32) (primitive_site SLICE_X24Y35 SLICEM internal 32) (primitive_site SLICE_X25Y34 SLICEL internal 25) (primitive_site SLICE_X25Y35 SLICEL internal 25) ) (tile 9 19 R7C14 CENTER_SMALL 6 (primitive_site RLL_X15Y18 RESERVED_LL internal 8) (primitive_site VCC_X16Y18 VCC internal 1) (primitive_site SLICE_X26Y34 SLICEM internal 32) (primitive_site SLICE_X26Y35 SLICEM internal 32) (primitive_site SLICE_X27Y34 SLICEL internal 25) (primitive_site SLICE_X27Y35 SLICEL internal 25) ) (tile 9 20 R7C15 CENTER_SMALL 6 (primitive_site RLL_X16Y18 RESERVED_LL internal 8) (primitive_site VCC_X17Y18 VCC internal 1) (primitive_site SLICE_X28Y34 SLICEM internal 32) (primitive_site SLICE_X28Y35 SLICEM internal 32) (primitive_site SLICE_X29Y34 SLICEL internal 25) (primitive_site SLICE_X29Y35 SLICEL internal 25) ) (tile 9 21 R7C16 CENTER_SMALL 6 (primitive_site RLL_X17Y18 RESERVED_LL internal 8) (primitive_site VCC_X18Y18 VCC internal 1) (primitive_site SLICE_X30Y34 SLICEM internal 32) (primitive_site SLICE_X30Y35 SLICEM internal 32) (primitive_site SLICE_X31Y34 SLICEL internal 25) (primitive_site SLICE_X31Y35 SLICEL internal 25) ) (tile 9 22 RGCLKVR7 GCLKV 0 ) (tile 9 23 R7C17 CENTER_SMALL 6 (primitive_site RLL_X18Y18 RESERVED_LL internal 8) (primitive_site VCC_X19Y18 VCC internal 1) (primitive_site SLICE_X32Y34 SLICEM internal 32) (primitive_site SLICE_X32Y35 SLICEM internal 32) (primitive_site SLICE_X33Y34 SLICEL internal 25) (primitive_site SLICE_X33Y35 SLICEL internal 25) ) (tile 9 24 R7C18 CENTER_SMALL 6 (primitive_site RLL_X19Y18 RESERVED_LL internal 8) (primitive_site VCC_X20Y18 VCC internal 1) (primitive_site SLICE_X34Y34 SLICEM internal 32) (primitive_site SLICE_X34Y35 SLICEM internal 32) (primitive_site SLICE_X35Y34 SLICEL internal 25) (primitive_site SLICE_X35Y35 SLICEL internal 25) ) (tile 9 25 BRAMR7C2 BRAM1_SMALL 2 (primitive_site RLL_X20Y18 RESERVED_LL internal 8) (primitive_site VCC_X21Y18 VCC internal 1) ) (tile 9 26 BMR7C2 EMPTY64X76 0 ) (tile 9 27 R7C19 CENTER_SMALL 6 (primitive_site RLL_X21Y18 RESERVED_LL internal 8) (primitive_site VCC_X22Y18 VCC internal 1) (primitive_site SLICE_X36Y34 SLICEM internal 32) (primitive_site SLICE_X36Y35 SLICEM internal 32) (primitive_site SLICE_X37Y34 SLICEL internal 25) (primitive_site SLICE_X37Y35 SLICEL internal 25) ) (tile 9 28 R7C20 CENTER_SMALL 6 (primitive_site RLL_X22Y18 RESERVED_LL internal 8) (primitive_site VCC_X23Y18 VCC internal 1) (primitive_site SLICE_X38Y34 SLICEM internal 32) (primitive_site SLICE_X38Y35 SLICEM internal 32) (primitive_site SLICE_X39Y34 SLICEL internal 25) (primitive_site SLICE_X39Y35 SLICEL internal 25) ) (tile 9 29 RIOIR7 RIOIS 5 (primitive_site VCC_X24Y18 VCC internal 1) (primitive_site RLL_X23Y18 RESERVED_LL internal 8) (primitive_site F15 DIFFM bonded 21) (primitive_site F14 DIFFS bonded 21) (primitive_site NOPAD17 IOB unbonded 21) ) (tile 9 30 RTERMR7 RTERM 0 ) (tile 10 0 LTERMR8 LTERM 0 ) (tile 10 1 LIOIR8 LIOIS 5 (primitive_site VCC_X0Y17 VCC internal 1) (primitive_site RLL_X0Y17 RESERVED_LL internal 8) (primitive_site G5 DIFFS bonded 21) (primitive_site F5 DIFFM bonded 21) (primitive_site NOPAD61 IOB unbonded 21) ) (tile 10 2 R8C1 CENTER_SMALL 6 (primitive_site RLL_X1Y17 RESERVED_LL internal 8) (primitive_site VCC_X1Y17 VCC internal 1) (primitive_site SLICE_X0Y32 SLICEM internal 32) (primitive_site SLICE_X0Y33 SLICEM internal 32) (primitive_site SLICE_X1Y32 SLICEL internal 25) (primitive_site SLICE_X1Y33 SLICEL internal 25) ) (tile 10 3 R8C2 CENTER_SMALL 6 (primitive_site RLL_X2Y17 RESERVED_LL internal 8) (primitive_site VCC_X2Y17 VCC internal 1) (primitive_site SLICE_X2Y32 SLICEM internal 32) (primitive_site SLICE_X2Y33 SLICEM internal 32) (primitive_site SLICE_X3Y32 SLICEL internal 25) (primitive_site SLICE_X3Y33 SLICEL internal 25) ) (tile 10 4 BRAMR8C1 BRAM0_SMALL 2 (primitive_site RLL_X3Y17 RESERVED_LL internal 8) (primitive_site VCC_X3Y17 VCC internal 1) ) (tile 10 5 BMR8C1 BRAMSITE 2 (primitive_site RAMB16_X0Y4 RAMB16 internal 180) (primitive_site MULT18X18_X0Y4 MULT18X18 internal 75) ) (tile 10 6 R8C3 CENTER_SMALL 6 (primitive_site RLL_X4Y17 RESERVED_LL internal 8) (primitive_site VCC_X4Y17 VCC internal 1) (primitive_site SLICE_X4Y32 SLICEM internal 32) (primitive_site SLICE_X4Y33 SLICEM internal 32) (primitive_site SLICE_X5Y32 SLICEL internal 25) (primitive_site SLICE_X5Y33 SLICEL internal 25) ) (tile 10 7 R8C4 CENTER_SMALL 6 (primitive_site RLL_X5Y17 RESERVED_LL internal 8) (primitive_site VCC_X5Y17 VCC internal 1) (primitive_site SLICE_X6Y32 SLICEM internal 32) (primitive_site SLICE_X6Y33 SLICEM internal 32) (primitive_site SLICE_X7Y32 SLICEL internal 25) (primitive_site SLICE_X7Y33 SLICEL internal 25) ) (tile 10 8 LGCLKVR8 GCLKV 0 ) (tile 10 9 R8C5 CENTER_SMALL 6 (primitive_site RLL_X6Y17 RESERVED_LL internal 8) (primitive_site VCC_X6Y17 VCC internal 1) (primitive_site SLICE_X8Y32 SLICEM internal 32) (primitive_site SLICE_X8Y33 SLICEM internal 32) (primitive_site SLICE_X9Y32 SLICEL internal 25) (primitive_site SLICE_X9Y33 SLICEL internal 25) ) (tile 10 10 R8C6 CENTER_SMALL 6 (primitive_site RLL_X7Y17 RESERVED_LL internal 8) (primitive_site VCC_X7Y17 VCC internal 1) (primitive_site SLICE_X10Y32 SLICEM internal 32) (primitive_site SLICE_X10Y33 SLICEM internal 32) (primitive_site SLICE_X11Y32 SLICEL internal 25) (primitive_site SLICE_X11Y33 SLICEL internal 25) ) (tile 10 11 R8C7 CENTER_SMALL 6 (primitive_site RLL_X8Y17 RESERVED_LL internal 8) (primitive_site VCC_X8Y17 VCC internal 1) (primitive_site SLICE_X12Y32 SLICEM internal 32) (primitive_site SLICE_X12Y33 SLICEM internal 32) (primitive_site SLICE_X13Y32 SLICEL internal 25) (primitive_site SLICE_X13Y33 SLICEL internal 25) ) (tile 10 12 R8C8 CENTER_SMALL 6 (primitive_site RLL_X9Y17 RESERVED_LL internal 8) (primitive_site VCC_X9Y17 VCC internal 1) (primitive_site SLICE_X14Y32 SLICEM internal 32) (primitive_site SLICE_X14Y33 SLICEM internal 32) (primitive_site SLICE_X15Y32 SLICEL internal 25) (primitive_site SLICE_X15Y33 SLICEL internal 25) ) (tile 10 13 R8C9 CENTER_SMALL 6 (primitive_site RLL_X10Y17 RESERVED_LL internal 8) (primitive_site VCC_X10Y17 VCC internal 1) (primitive_site SLICE_X16Y32 SLICEM internal 32) (primitive_site SLICE_X16Y33 SLICEM internal 32) (primitive_site SLICE_X17Y32 SLICEL internal 25) (primitive_site SLICE_X17Y33 SLICEL internal 25) ) (tile 10 14 R8C10 CENTER_SMALL 6 (primitive_site RLL_X11Y17 RESERVED_LL internal 8) (primitive_site VCC_X11Y17 VCC internal 1) (primitive_site SLICE_X18Y32 SLICEM internal 32) (primitive_site SLICE_X18Y33 SLICEM internal 32) (primitive_site SLICE_X19Y32 SLICEL internal 25) (primitive_site SLICE_X19Y33 SLICEL internal 25) ) (tile 10 15 VMR8 CLKV 0 ) (tile 10 16 R8C11 CENTER_SMALL 6 (primitive_site RLL_X12Y17 RESERVED_LL internal 8) (primitive_site VCC_X13Y17 VCC internal 1) (primitive_site SLICE_X20Y32 SLICEM internal 32) (primitive_site SLICE_X20Y33 SLICEM internal 32) (primitive_site SLICE_X21Y32 SLICEL internal 25) (primitive_site SLICE_X21Y33 SLICEL internal 25) ) (tile 10 17 R8C12 CENTER_SMALL 6 (primitive_site RLL_X13Y17 RESERVED_LL internal 8) (primitive_site VCC_X14Y17 VCC internal 1) (primitive_site SLICE_X22Y32 SLICEM internal 32) (primitive_site SLICE_X22Y33 SLICEM internal 32) (primitive_site SLICE_X23Y32 SLICEL internal 25) (primitive_site SLICE_X23Y33 SLICEL internal 25) ) (tile 10 18 R8C13 CENTER_SMALL 6 (primitive_site RLL_X14Y17 RESERVED_LL internal 8) (primitive_site VCC_X15Y17 VCC internal 1) (primitive_site SLICE_X24Y32 SLICEM internal 32) (primitive_site SLICE_X24Y33 SLICEM internal 32) (primitive_site SLICE_X25Y32 SLICEL internal 25) (primitive_site SLICE_X25Y33 SLICEL internal 25) ) (tile 10 19 R8C14 CENTER_SMALL 6 (primitive_site RLL_X15Y17 RESERVED_LL internal 8) (primitive_site VCC_X16Y17 VCC internal 1) (primitive_site SLICE_X26Y32 SLICEM internal 32) (primitive_site SLICE_X26Y33 SLICEM internal 32) (primitive_site SLICE_X27Y32 SLICEL internal 25) (primitive_site SLICE_X27Y33 SLICEL internal 25) ) (tile 10 20 R8C15 CENTER_SMALL 6 (primitive_site RLL_X16Y17 RESERVED_LL internal 8) (primitive_site VCC_X17Y17 VCC internal 1) (primitive_site SLICE_X28Y32 SLICEM internal 32) (primitive_site SLICE_X28Y33 SLICEM internal 32) (primitive_site SLICE_X29Y32 SLICEL internal 25) (primitive_site SLICE_X29Y33 SLICEL internal 25) ) (tile 10 21 R8C16 CENTER_SMALL 6 (primitive_site RLL_X17Y17 RESERVED_LL internal 8) (primitive_site VCC_X18Y17 VCC internal 1) (primitive_site SLICE_X30Y32 SLICEM internal 32) (primitive_site SLICE_X30Y33 SLICEM internal 32) (primitive_site SLICE_X31Y32 SLICEL internal 25) (primitive_site SLICE_X31Y33 SLICEL internal 25) ) (tile 10 22 RGCLKVR8 GCLKV 0 ) (tile 10 23 R8C17 CENTER_SMALL 6 (primitive_site RLL_X18Y17 RESERVED_LL internal 8) (primitive_site VCC_X19Y17 VCC internal 1) (primitive_site SLICE_X32Y32 SLICEM internal 32) (primitive_site SLICE_X32Y33 SLICEM internal 32) (primitive_site SLICE_X33Y32 SLICEL internal 25) (primitive_site SLICE_X33Y33 SLICEL internal 25) ) (tile 10 24 R8C18 CENTER_SMALL 6 (primitive_site RLL_X19Y17 RESERVED_LL internal 8) (primitive_site VCC_X20Y17 VCC internal 1) (primitive_site SLICE_X34Y32 SLICEM internal 32) (primitive_site SLICE_X34Y33 SLICEM internal 32) (primitive_site SLICE_X35Y32 SLICEL internal 25) (primitive_site SLICE_X35Y33 SLICEL internal 25) ) (tile 10 25 BRAMR8C2 BRAM0_SMALL 2 (primitive_site RLL_X20Y17 RESERVED_LL internal 8) (primitive_site VCC_X21Y17 VCC internal 1) ) (tile 10 26 BMR8C2 BRAMSITE 2 (primitive_site RAMB16_X1Y4 RAMB16 internal 180) (primitive_site MULT18X18_X1Y4 MULT18X18 internal 75) ) (tile 10 27 R8C19 CENTER_SMALL 6 (primitive_site RLL_X21Y17 RESERVED_LL internal 8) (primitive_site VCC_X22Y17 VCC internal 1) (primitive_site SLICE_X36Y32 SLICEM internal 32) (primitive_site SLICE_X36Y33 SLICEM internal 32) (primitive_site SLICE_X37Y32 SLICEL internal 25) (primitive_site SLICE_X37Y33 SLICEL internal 25) ) (tile 10 28 R8C20 CENTER_SMALL 6 (primitive_site RLL_X22Y17 RESERVED_LL internal 8) (primitive_site VCC_X23Y17 VCC internal 1) (primitive_site SLICE_X38Y32 SLICEM internal 32) (primitive_site SLICE_X38Y33 SLICEM internal 32) (primitive_site SLICE_X39Y32 SLICEL internal 25) (primitive_site SLICE_X39Y33 SLICEL internal 25) ) (tile 10 29 RIOIR8 RIOIS 5 (primitive_site VCC_X24Y17 VCC internal 1) (primitive_site RLL_X23Y17 RESERVED_LL internal 8) (primitive_site G13 DIFFM bonded 21) (primitive_site G12 DIFFS bonded 21) (primitive_site NOPAD18 IOB unbonded 21) ) (tile 10 30 RTERMR8 RTERM 0 ) (tile 11 0 LTERMR9 LTERM 0 ) (tile 11 1 LIOIR9 LIOIS 5 (primitive_site VCC_X0Y16 VCC internal 1) (primitive_site RLL_X0Y16 RESERVED_LL internal 8) (primitive_site G3 DIFFS bonded 21) (primitive_site G4 DIFFM bonded 21) (primitive_site NOPAD60 IOB unbonded 21) ) (tile 11 2 R9C1 CENTER_SMALL 6 (primitive_site RLL_X1Y16 RESERVED_LL internal 8) (primitive_site VCC_X1Y16 VCC internal 1) (primitive_site SLICE_X0Y30 SLICEM internal 32) (primitive_site SLICE_X0Y31 SLICEM internal 32) (primitive_site SLICE_X1Y30 SLICEL internal 25) (primitive_site SLICE_X1Y31 SLICEL internal 25) ) (tile 11 3 R9C2 CENTER_SMALL 6 (primitive_site RLL_X2Y16 RESERVED_LL internal 8) (primitive_site VCC_X2Y16 VCC internal 1) (primitive_site SLICE_X2Y30 SLICEM internal 32) (primitive_site SLICE_X2Y31 SLICEM internal 32) (primitive_site SLICE_X3Y30 SLICEL internal 25) (primitive_site SLICE_X3Y31 SLICEL internal 25) ) (tile 11 4 BRAMR9C1 BRAM3_SMALL 2 (primitive_site RLL_X3Y16 RESERVED_LL internal 8) (primitive_site VCC_X3Y16 VCC internal 1) ) (tile 11 5 BMR9C1 EMPTY64X76 0 ) (tile 11 6 R9C3 CENTER_SMALL 6 (primitive_site RLL_X4Y16 RESERVED_LL internal 8) (primitive_site VCC_X4Y16 VCC internal 1) (primitive_site SLICE_X4Y30 SLICEM internal 32) (primitive_site SLICE_X4Y31 SLICEM internal 32) (primitive_site SLICE_X5Y30 SLICEL internal 25) (primitive_site SLICE_X5Y31 SLICEL internal 25) ) (tile 11 7 R9C4 CENTER_SMALL 6 (primitive_site RLL_X5Y16 RESERVED_LL internal 8) (primitive_site VCC_X5Y16 VCC internal 1) (primitive_site SLICE_X6Y30 SLICEM internal 32) (primitive_site SLICE_X6Y31 SLICEM internal 32) (primitive_site SLICE_X7Y30 SLICEL internal 25) (primitive_site SLICE_X7Y31 SLICEL internal 25) ) (tile 11 8 LGCLKVR9 GCLKV 0 ) (tile 11 9 R9C5 CENTER_SMALL 6 (primitive_site RLL_X6Y16 RESERVED_LL internal 8) (primitive_site VCC_X6Y16 VCC internal 1) (primitive_site SLICE_X8Y30 SLICEM internal 32) (primitive_site SLICE_X8Y31 SLICEM internal 32) (primitive_site SLICE_X9Y30 SLICEL internal 25) (primitive_site SLICE_X9Y31 SLICEL internal 25) ) (tile 11 10 R9C6 CENTER_SMALL 6 (primitive_site RLL_X7Y16 RESERVED_LL internal 8) (primitive_site VCC_X7Y16 VCC internal 1) (primitive_site SLICE_X10Y30 SLICEM internal 32) (primitive_site SLICE_X10Y31 SLICEM internal 32) (primitive_site SLICE_X11Y30 SLICEL internal 25) (primitive_site SLICE_X11Y31 SLICEL internal 25) ) (tile 11 11 R9C7 CENTER_SMALL 6 (primitive_site RLL_X8Y16 RESERVED_LL internal 8) (primitive_site VCC_X8Y16 VCC internal 1) (primitive_site SLICE_X12Y30 SLICEM internal 32) (primitive_site SLICE_X12Y31 SLICEM internal 32) (primitive_site SLICE_X13Y30 SLICEL internal 25) (primitive_site SLICE_X13Y31 SLICEL internal 25) ) (tile 11 12 R9C8 CENTER_SMALL 6 (primitive_site RLL_X9Y16 RESERVED_LL internal 8) (primitive_site VCC_X9Y16 VCC internal 1) (primitive_site SLICE_X14Y30 SLICEM internal 32) (primitive_site SLICE_X14Y31 SLICEM internal 32) (primitive_site SLICE_X15Y30 SLICEL internal 25) (primitive_site SLICE_X15Y31 SLICEL internal 25) ) (tile 11 13 R9C9 CENTER_SMALL 6 (primitive_site RLL_X10Y16 RESERVED_LL internal 8) (primitive_site VCC_X10Y16 VCC internal 1) (primitive_site SLICE_X16Y30 SLICEM internal 32) (primitive_site SLICE_X16Y31 SLICEM internal 32) (primitive_site SLICE_X17Y30 SLICEL internal 25) (primitive_site SLICE_X17Y31 SLICEL internal 25) ) (tile 11 14 R9C10 CENTER_SMALL 6 (primitive_site RLL_X11Y16 RESERVED_LL internal 8) (primitive_site VCC_X11Y16 VCC internal 1) (primitive_site SLICE_X18Y30 SLICEM internal 32) (primitive_site SLICE_X18Y31 SLICEM internal 32) (primitive_site SLICE_X19Y30 SLICEL internal 25) (primitive_site SLICE_X19Y31 SLICEL internal 25) ) (tile 11 15 VMR9 CLKV 0 ) (tile 11 16 R9C11 CENTER_SMALL 6 (primitive_site RLL_X12Y16 RESERVED_LL internal 8) (primitive_site VCC_X13Y16 VCC internal 1) (primitive_site SLICE_X20Y30 SLICEM internal 32) (primitive_site SLICE_X20Y31 SLICEM internal 32) (primitive_site SLICE_X21Y30 SLICEL internal 25) (primitive_site SLICE_X21Y31 SLICEL internal 25) ) (tile 11 17 R9C12 CENTER_SMALL 6 (primitive_site RLL_X13Y16 RESERVED_LL internal 8) (primitive_site VCC_X14Y16 VCC internal 1) (primitive_site SLICE_X22Y30 SLICEM internal 32) (primitive_site SLICE_X22Y31 SLICEM internal 32) (primitive_site SLICE_X23Y30 SLICEL internal 25) (primitive_site SLICE_X23Y31 SLICEL internal 25) ) (tile 11 18 R9C13 CENTER_SMALL 6 (primitive_site RLL_X14Y16 RESERVED_LL internal 8) (primitive_site VCC_X15Y16 VCC internal 1) (primitive_site SLICE_X24Y30 SLICEM internal 32) (primitive_site SLICE_X24Y31 SLICEM internal 32) (primitive_site SLICE_X25Y30 SLICEL internal 25) (primitive_site SLICE_X25Y31 SLICEL internal 25) ) (tile 11 19 R9C14 CENTER_SMALL 6 (primitive_site RLL_X15Y16 RESERVED_LL internal 8) (primitive_site VCC_X16Y16 VCC internal 1) (primitive_site SLICE_X26Y30 SLICEM internal 32) (primitive_site SLICE_X26Y31 SLICEM internal 32) (primitive_site SLICE_X27Y30 SLICEL internal 25) (primitive_site SLICE_X27Y31 SLICEL internal 25) ) (tile 11 20 R9C15 CENTER_SMALL 6 (primitive_site RLL_X16Y16 RESERVED_LL internal 8) (primitive_site VCC_X17Y16 VCC internal 1) (primitive_site SLICE_X28Y30 SLICEM internal 32) (primitive_site SLICE_X28Y31 SLICEM internal 32) (primitive_site SLICE_X29Y30 SLICEL internal 25) (primitive_site SLICE_X29Y31 SLICEL internal 25) ) (tile 11 21 R9C16 CENTER_SMALL 6 (primitive_site RLL_X17Y16 RESERVED_LL internal 8) (primitive_site VCC_X18Y16 VCC internal 1) (primitive_site SLICE_X30Y30 SLICEM internal 32) (primitive_site SLICE_X30Y31 SLICEM internal 32) (primitive_site SLICE_X31Y30 SLICEL internal 25) (primitive_site SLICE_X31Y31 SLICEL internal 25) ) (tile 11 22 RGCLKVR9 GCLKV 0 ) (tile 11 23 R9C17 CENTER_SMALL 6 (primitive_site RLL_X18Y16 RESERVED_LL internal 8) (primitive_site VCC_X19Y16 VCC internal 1) (primitive_site SLICE_X32Y30 SLICEM internal 32) (primitive_site SLICE_X32Y31 SLICEM internal 32) (primitive_site SLICE_X33Y30 SLICEL internal 25) (primitive_site SLICE_X33Y31 SLICEL internal 25) ) (tile 11 24 R9C18 CENTER_SMALL 6 (primitive_site RLL_X19Y16 RESERVED_LL internal 8) (primitive_site VCC_X20Y16 VCC internal 1) (primitive_site SLICE_X34Y30 SLICEM internal 32) (primitive_site SLICE_X34Y31 SLICEM internal 32) (primitive_site SLICE_X35Y30 SLICEL internal 25) (primitive_site SLICE_X35Y31 SLICEL internal 25) ) (tile 11 25 BRAMR9C2 BRAM3_SMALL 2 (primitive_site RLL_X20Y16 RESERVED_LL internal 8) (primitive_site VCC_X21Y16 VCC internal 1) ) (tile 11 26 BMR9C2 EMPTY64X76 0 ) (tile 11 27 R9C19 CENTER_SMALL 6 (primitive_site RLL_X21Y16 RESERVED_LL internal 8) (primitive_site VCC_X22Y16 VCC internal 1) (primitive_site SLICE_X36Y30 SLICEM internal 32) (primitive_site SLICE_X36Y31 SLICEM internal 32) (primitive_site SLICE_X37Y30 SLICEL internal 25) (primitive_site SLICE_X37Y31 SLICEL internal 25) ) (tile 11 28 R9C20 CENTER_SMALL 6 (primitive_site RLL_X22Y16 RESERVED_LL internal 8) (primitive_site VCC_X23Y16 VCC internal 1) (primitive_site SLICE_X38Y30 SLICEM internal 32) (primitive_site SLICE_X38Y31 SLICEM internal 32) (primitive_site SLICE_X39Y30 SLICEL internal 25) (primitive_site SLICE_X39Y31 SLICEL internal 25) ) (tile 11 29 RIOIR9 RIOIS 5 (primitive_site VCC_X24Y16 VCC internal 1) (primitive_site RLL_X23Y16 RESERVED_LL internal 8) (primitive_site G15 DIFFM bonded 21) (primitive_site G14 DIFFS bonded 21) (primitive_site NOPAD19 IOB unbonded 21) ) (tile 11 30 RTERMR9 RTERM 0 ) (tile 12 0 LTERMR10 LTERM 0 ) (tile 12 1 LIOIR10 LIOIS 5 (primitive_site VCC_X0Y15 VCC internal 1) (primitive_site RLL_X0Y15 RESERVED_LL internal 8) (primitive_site G2 DIFFS bonded 21) (primitive_site PAD178 DIFFM unbonded 21) (primitive_site NOPAD59 IOB unbonded 21) ) (tile 12 2 R10C1 CENTER_SMALL 6 (primitive_site RLL_X1Y15 RESERVED_LL internal 8) (primitive_site VCC_X1Y15 VCC internal 1) (primitive_site SLICE_X0Y28 SLICEM internal 32) (primitive_site SLICE_X0Y29 SLICEM internal 32) (primitive_site SLICE_X1Y28 SLICEL internal 25) (primitive_site SLICE_X1Y29 SLICEL internal 25) ) (tile 12 3 R10C2 CENTER_SMALL 6 (primitive_site RLL_X2Y15 RESERVED_LL internal 8) (primitive_site VCC_X2Y15 VCC internal 1) (primitive_site SLICE_X2Y28 SLICEM internal 32) (primitive_site SLICE_X2Y29 SLICEM internal 32) (primitive_site SLICE_X3Y28 SLICEL internal 25) (primitive_site SLICE_X3Y29 SLICEL internal 25) ) (tile 12 4 BRAMR10C1 BRAM2_SMALL 2 (primitive_site RLL_X3Y15 RESERVED_LL internal 8) (primitive_site VCC_X3Y15 VCC internal 1) ) (tile 12 5 BMR10C1 EMPTY64X76 0 ) (tile 12 6 R10C3 CENTER_SMALL 6 (primitive_site RLL_X4Y15 RESERVED_LL internal 8) (primitive_site VCC_X4Y15 VCC internal 1) (primitive_site SLICE_X4Y28 SLICEM internal 32) (primitive_site SLICE_X4Y29 SLICEM internal 32) (primitive_site SLICE_X5Y28 SLICEL internal 25) (primitive_site SLICE_X5Y29 SLICEL internal 25) ) (tile 12 7 R10C4 CENTER_SMALL 6 (primitive_site RLL_X5Y15 RESERVED_LL internal 8) (primitive_site VCC_X5Y15 VCC internal 1) (primitive_site SLICE_X6Y28 SLICEM internal 32) (primitive_site SLICE_X6Y29 SLICEM internal 32) (primitive_site SLICE_X7Y28 SLICEL internal 25) (primitive_site SLICE_X7Y29 SLICEL internal 25) ) (tile 12 8 LGCLKVR10 GCLKV 0 ) (tile 12 9 R10C5 CENTER_SMALL 6 (primitive_site RLL_X6Y15 RESERVED_LL internal 8) (primitive_site VCC_X6Y15 VCC internal 1) (primitive_site SLICE_X8Y28 SLICEM internal 32) (primitive_site SLICE_X8Y29 SLICEM internal 32) (primitive_site SLICE_X9Y28 SLICEL internal 25) (primitive_site SLICE_X9Y29 SLICEL internal 25) ) (tile 12 10 R10C6 CENTER_SMALL 6 (primitive_site RLL_X7Y15 RESERVED_LL internal 8) (primitive_site VCC_X7Y15 VCC internal 1) (primitive_site SLICE_X10Y28 SLICEM internal 32) (primitive_site SLICE_X10Y29 SLICEM internal 32) (primitive_site SLICE_X11Y28 SLICEL internal 25) (primitive_site SLICE_X11Y29 SLICEL internal 25) ) (tile 12 11 R10C7 CENTER_SMALL 6 (primitive_site RLL_X8Y15 RESERVED_LL internal 8) (primitive_site VCC_X8Y15 VCC internal 1) (primitive_site SLICE_X12Y28 SLICEM internal 32) (primitive_site SLICE_X12Y29 SLICEM internal 32) (primitive_site SLICE_X13Y28 SLICEL internal 25) (primitive_site SLICE_X13Y29 SLICEL internal 25) ) (tile 12 12 R10C8 CENTER_SMALL 6 (primitive_site RLL_X9Y15 RESERVED_LL internal 8) (primitive_site VCC_X9Y15 VCC internal 1) (primitive_site SLICE_X14Y28 SLICEM internal 32) (primitive_site SLICE_X14Y29 SLICEM internal 32) (primitive_site SLICE_X15Y28 SLICEL internal 25) (primitive_site SLICE_X15Y29 SLICEL internal 25) ) (tile 12 13 R10C9 CENTER_SMALL 6 (primitive_site RLL_X10Y15 RESERVED_LL internal 8) (primitive_site VCC_X10Y15 VCC internal 1) (primitive_site SLICE_X16Y28 SLICEM internal 32) (primitive_site SLICE_X16Y29 SLICEM internal 32) (primitive_site SLICE_X17Y28 SLICEL internal 25) (primitive_site SLICE_X17Y29 SLICEL internal 25) ) (tile 12 14 R10C10 CENTER_SMALL 6 (primitive_site RLL_X11Y15 RESERVED_LL internal 8) (primitive_site VCC_X11Y15 VCC internal 1) (primitive_site SLICE_X18Y28 SLICEM internal 32) (primitive_site SLICE_X18Y29 SLICEM internal 32) (primitive_site SLICE_X19Y28 SLICEL internal 25) (primitive_site SLICE_X19Y29 SLICEL internal 25) ) (tile 12 15 VMR10 CLKV 0 ) (tile 12 16 R10C11 CENTER_SMALL 6 (primitive_site RLL_X12Y15 RESERVED_LL internal 8) (primitive_site VCC_X13Y15 VCC internal 1) (primitive_site SLICE_X20Y28 SLICEM internal 32) (primitive_site SLICE_X20Y29 SLICEM internal 32) (primitive_site SLICE_X21Y28 SLICEL internal 25) (primitive_site SLICE_X21Y29 SLICEL internal 25) ) (tile 12 17 R10C12 CENTER_SMALL 6 (primitive_site RLL_X13Y15 RESERVED_LL internal 8) (primitive_site VCC_X14Y15 VCC internal 1) (primitive_site SLICE_X22Y28 SLICEM internal 32) (primitive_site SLICE_X22Y29 SLICEM internal 32) (primitive_site SLICE_X23Y28 SLICEL internal 25) (primitive_site SLICE_X23Y29 SLICEL internal 25) ) (tile 12 18 R10C13 CENTER_SMALL 6 (primitive_site RLL_X14Y15 RESERVED_LL internal 8) (primitive_site VCC_X15Y15 VCC internal 1) (primitive_site SLICE_X24Y28 SLICEM internal 32) (primitive_site SLICE_X24Y29 SLICEM internal 32) (primitive_site SLICE_X25Y28 SLICEL internal 25) (primitive_site SLICE_X25Y29 SLICEL internal 25) ) (tile 12 19 R10C14 CENTER_SMALL 6 (primitive_site RLL_X15Y15 RESERVED_LL internal 8) (primitive_site VCC_X16Y15 VCC internal 1) (primitive_site SLICE_X26Y28 SLICEM internal 32) (primitive_site SLICE_X26Y29 SLICEM internal 32) (primitive_site SLICE_X27Y28 SLICEL internal 25) (primitive_site SLICE_X27Y29 SLICEL internal 25) ) (tile 12 20 R10C15 CENTER_SMALL 6 (primitive_site RLL_X16Y15 RESERVED_LL internal 8) (primitive_site VCC_X17Y15 VCC internal 1) (primitive_site SLICE_X28Y28 SLICEM internal 32) (primitive_site SLICE_X28Y29 SLICEM internal 32) (primitive_site SLICE_X29Y28 SLICEL internal 25) (primitive_site SLICE_X29Y29 SLICEL internal 25) ) (tile 12 21 R10C16 CENTER_SMALL 6 (primitive_site RLL_X17Y15 RESERVED_LL internal 8) (primitive_site VCC_X18Y15 VCC internal 1) (primitive_site SLICE_X30Y28 SLICEM internal 32) (primitive_site SLICE_X30Y29 SLICEM internal 32) (primitive_site SLICE_X31Y28 SLICEL internal 25) (primitive_site SLICE_X31Y29 SLICEL internal 25) ) (tile 12 22 RGCLKVR10 GCLKV 0 ) (tile 12 23 R10C17 CENTER_SMALL 6 (primitive_site RLL_X18Y15 RESERVED_LL internal 8) (primitive_site VCC_X19Y15 VCC internal 1) (primitive_site SLICE_X32Y28 SLICEM internal 32) (primitive_site SLICE_X32Y29 SLICEM internal 32) (primitive_site SLICE_X33Y28 SLICEL internal 25) (primitive_site SLICE_X33Y29 SLICEL internal 25) ) (tile 12 24 R10C18 CENTER_SMALL 6 (primitive_site RLL_X19Y15 RESERVED_LL internal 8) (primitive_site VCC_X20Y15 VCC internal 1) (primitive_site SLICE_X34Y28 SLICEM internal 32) (primitive_site SLICE_X34Y29 SLICEM internal 32) (primitive_site SLICE_X35Y28 SLICEL internal 25) (primitive_site SLICE_X35Y29 SLICEL internal 25) ) (tile 12 25 BRAMR10C2 BRAM2_SMALL 2 (primitive_site RLL_X20Y15 RESERVED_LL internal 8) (primitive_site VCC_X21Y15 VCC internal 1) ) (tile 12 26 BMR10C2 EMPTY64X76 0 ) (tile 12 27 R10C19 CENTER_SMALL 6 (primitive_site RLL_X21Y15 RESERVED_LL internal 8) (primitive_site VCC_X22Y15 VCC internal 1) (primitive_site SLICE_X36Y28 SLICEM internal 32) (primitive_site SLICE_X36Y29 SLICEM internal 32) (primitive_site SLICE_X37Y28 SLICEL internal 25) (primitive_site SLICE_X37Y29 SLICEL internal 25) ) (tile 12 28 R10C20 CENTER_SMALL 6 (primitive_site RLL_X22Y15 RESERVED_LL internal 8) (primitive_site VCC_X23Y15 VCC internal 1) (primitive_site SLICE_X38Y28 SLICEM internal 32) (primitive_site SLICE_X38Y29 SLICEM internal 32) (primitive_site SLICE_X39Y28 SLICEL internal 25) (primitive_site SLICE_X39Y29 SLICEL internal 25) ) (tile 12 29 RIOIR10 RIOIS 5 (primitive_site VCC_X24Y15 VCC internal 1) (primitive_site RLL_X23Y15 RESERVED_LL internal 8) (primitive_site G16 DIFFM bonded 21) (primitive_site PAD69 DIFFS unbonded 21) (primitive_site NOPAD20 IOB unbonded 21) ) (tile 12 30 RTERMR10 RTERM 0 ) (tile 13 0 LTERMR11 LTERM 0 ) (tile 13 1 LIOIR11 LIOIS 5 (primitive_site VCC_X0Y14 VCC internal 1) (primitive_site RLL_X0Y14 RESERVED_LL internal 8) (primitive_site H3 DIFFS bonded 21) (primitive_site H4 DIFFM bonded 21) (primitive_site NOPAD58 IOB unbonded 21) ) (tile 13 2 R11C1 CENTER_SMALL 6 (primitive_site RLL_X1Y14 RESERVED_LL internal 8) (primitive_site VCC_X1Y14 VCC internal 1) (primitive_site SLICE_X0Y26 SLICEM internal 32) (primitive_site SLICE_X0Y27 SLICEM internal 32) (primitive_site SLICE_X1Y26 SLICEL internal 25) (primitive_site SLICE_X1Y27 SLICEL internal 25) ) (tile 13 3 R11C2 CENTER_SMALL 6 (primitive_site RLL_X2Y14 RESERVED_LL internal 8) (primitive_site VCC_X2Y14 VCC internal 1) (primitive_site SLICE_X2Y26 SLICEM internal 32) (primitive_site SLICE_X2Y27 SLICEM internal 32) (primitive_site SLICE_X3Y26 SLICEL internal 25) (primitive_site SLICE_X3Y27 SLICEL internal 25) ) (tile 13 4 BRAMR11C1 BRAM1_SMALL 2 (primitive_site RLL_X3Y14 RESERVED_LL internal 8) (primitive_site VCC_X3Y14 VCC internal 1) ) (tile 13 5 BMR11C1 EMPTY64X76 0 ) (tile 13 6 R11C3 CENTER_SMALL 6 (primitive_site RLL_X4Y14 RESERVED_LL internal 8) (primitive_site VCC_X4Y14 VCC internal 1) (primitive_site SLICE_X4Y26 SLICEM internal 32) (primitive_site SLICE_X4Y27 SLICEM internal 32) (primitive_site SLICE_X5Y26 SLICEL internal 25) (primitive_site SLICE_X5Y27 SLICEL internal 25) ) (tile 13 7 R11C4 CENTER_SMALL 6 (primitive_site RLL_X5Y14 RESERVED_LL internal 8) (primitive_site VCC_X5Y14 VCC internal 1) (primitive_site SLICE_X6Y26 SLICEM internal 32) (primitive_site SLICE_X6Y27 SLICEM internal 32) (primitive_site SLICE_X7Y26 SLICEL internal 25) (primitive_site SLICE_X7Y27 SLICEL internal 25) ) (tile 13 8 LGCLKVR11 GCLKV 0 ) (tile 13 9 R11C5 CENTER_SMALL 6 (primitive_site RLL_X6Y14 RESERVED_LL internal 8) (primitive_site VCC_X6Y14 VCC internal 1) (primitive_site SLICE_X8Y26 SLICEM internal 32) (primitive_site SLICE_X8Y27 SLICEM internal 32) (primitive_site SLICE_X9Y26 SLICEL internal 25) (primitive_site SLICE_X9Y27 SLICEL internal 25) ) (tile 13 10 R11C6 CENTER_SMALL 6 (primitive_site RLL_X7Y14 RESERVED_LL internal 8) (primitive_site VCC_X7Y14 VCC internal 1) (primitive_site SLICE_X10Y26 SLICEM internal 32) (primitive_site SLICE_X10Y27 SLICEM internal 32) (primitive_site SLICE_X11Y26 SLICEL internal 25) (primitive_site SLICE_X11Y27 SLICEL internal 25) ) (tile 13 11 R11C7 CENTER_SMALL 6 (primitive_site RLL_X8Y14 RESERVED_LL internal 8) (primitive_site VCC_X8Y14 VCC internal 1) (primitive_site SLICE_X12Y26 SLICEM internal 32) (primitive_site SLICE_X12Y27 SLICEM internal 32) (primitive_site SLICE_X13Y26 SLICEL internal 25) (primitive_site SLICE_X13Y27 SLICEL internal 25) ) (tile 13 12 R11C8 CENTER_SMALL 6 (primitive_site RLL_X9Y14 RESERVED_LL internal 8) (primitive_site VCC_X9Y14 VCC internal 1) (primitive_site SLICE_X14Y26 SLICEM internal 32) (primitive_site SLICE_X14Y27 SLICEM internal 32) (primitive_site SLICE_X15Y26 SLICEL internal 25) (primitive_site SLICE_X15Y27 SLICEL internal 25) ) (tile 13 13 R11C9 CENTER_SMALL 6 (primitive_site RLL_X10Y14 RESERVED_LL internal 8) (primitive_site VCC_X10Y14 VCC internal 1) (primitive_site SLICE_X16Y26 SLICEM internal 32) (primitive_site SLICE_X16Y27 SLICEM internal 32) (primitive_site SLICE_X17Y26 SLICEL internal 25) (primitive_site SLICE_X17Y27 SLICEL internal 25) ) (tile 13 14 R11C10 CENTER_SMALL 6 (primitive_site RLL_X11Y14 RESERVED_LL internal 8) (primitive_site VCC_X11Y14 VCC internal 1) (primitive_site SLICE_X18Y26 SLICEM internal 32) (primitive_site SLICE_X18Y27 SLICEM internal 32) (primitive_site SLICE_X19Y26 SLICEL internal 25) (primitive_site SLICE_X19Y27 SLICEL internal 25) ) (tile 13 15 VMR11 CLKV 0 ) (tile 13 16 R11C11 CENTER_SMALL 6 (primitive_site RLL_X12Y14 RESERVED_LL internal 8) (primitive_site VCC_X13Y14 VCC internal 1) (primitive_site SLICE_X20Y26 SLICEM internal 32) (primitive_site SLICE_X20Y27 SLICEM internal 32) (primitive_site SLICE_X21Y26 SLICEL internal 25) (primitive_site SLICE_X21Y27 SLICEL internal 25) ) (tile 13 17 R11C12 CENTER_SMALL 6 (primitive_site RLL_X13Y14 RESERVED_LL internal 8) (primitive_site VCC_X14Y14 VCC internal 1) (primitive_site SLICE_X22Y26 SLICEM internal 32) (primitive_site SLICE_X22Y27 SLICEM internal 32) (primitive_site SLICE_X23Y26 SLICEL internal 25) (primitive_site SLICE_X23Y27 SLICEL internal 25) ) (tile 13 18 R11C13 CENTER_SMALL 6 (primitive_site RLL_X14Y14 RESERVED_LL internal 8) (primitive_site VCC_X15Y14 VCC internal 1) (primitive_site SLICE_X24Y26 SLICEM internal 32) (primitive_site SLICE_X24Y27 SLICEM internal 32) (primitive_site SLICE_X25Y26 SLICEL internal 25) (primitive_site SLICE_X25Y27 SLICEL internal 25) ) (tile 13 19 R11C14 CENTER_SMALL 6 (primitive_site RLL_X15Y14 RESERVED_LL internal 8) (primitive_site VCC_X16Y14 VCC internal 1) (primitive_site SLICE_X26Y26 SLICEM internal 32) (primitive_site SLICE_X26Y27 SLICEM internal 32) (primitive_site SLICE_X27Y26 SLICEL internal 25) (primitive_site SLICE_X27Y27 SLICEL internal 25) ) (tile 13 20 R11C15 CENTER_SMALL 6 (primitive_site RLL_X16Y14 RESERVED_LL internal 8) (primitive_site VCC_X17Y14 VCC internal 1) (primitive_site SLICE_X28Y26 SLICEM internal 32) (primitive_site SLICE_X28Y27 SLICEM internal 32) (primitive_site SLICE_X29Y26 SLICEL internal 25) (primitive_site SLICE_X29Y27 SLICEL internal 25) ) (tile 13 21 R11C16 CENTER_SMALL 6 (primitive_site RLL_X17Y14 RESERVED_LL internal 8) (primitive_site VCC_X18Y14 VCC internal 1) (primitive_site SLICE_X30Y26 SLICEM internal 32) (primitive_site SLICE_X30Y27 SLICEM internal 32) (primitive_site SLICE_X31Y26 SLICEL internal 25) (primitive_site SLICE_X31Y27 SLICEL internal 25) ) (tile 13 22 RGCLKVR11 GCLKV 0 ) (tile 13 23 R11C17 CENTER_SMALL 6 (primitive_site RLL_X18Y14 RESERVED_LL internal 8) (primitive_site VCC_X19Y14 VCC internal 1) (primitive_site SLICE_X32Y26 SLICEM internal 32) (primitive_site SLICE_X32Y27 SLICEM internal 32) (primitive_site SLICE_X33Y26 SLICEL internal 25) (primitive_site SLICE_X33Y27 SLICEL internal 25) ) (tile 13 24 R11C18 CENTER_SMALL 6 (primitive_site RLL_X19Y14 RESERVED_LL internal 8) (primitive_site VCC_X20Y14 VCC internal 1) (primitive_site SLICE_X34Y26 SLICEM internal 32) (primitive_site SLICE_X34Y27 SLICEM internal 32) (primitive_site SLICE_X35Y26 SLICEL internal 25) (primitive_site SLICE_X35Y27 SLICEL internal 25) ) (tile 13 25 BRAMR11C2 BRAM1_SMALL 2 (primitive_site RLL_X20Y14 RESERVED_LL internal 8) (primitive_site VCC_X21Y14 VCC internal 1) ) (tile 13 26 BMR11C2 EMPTY64X76 0 ) (tile 13 27 R11C19 CENTER_SMALL 6 (primitive_site RLL_X21Y14 RESERVED_LL internal 8) (primitive_site VCC_X22Y14 VCC internal 1) (primitive_site SLICE_X36Y26 SLICEM internal 32) (primitive_site SLICE_X36Y27 SLICEM internal 32) (primitive_site SLICE_X37Y26 SLICEL internal 25) (primitive_site SLICE_X37Y27 SLICEL internal 25) ) (tile 13 28 R11C20 CENTER_SMALL 6 (primitive_site RLL_X22Y14 RESERVED_LL internal 8) (primitive_site VCC_X23Y14 VCC internal 1) (primitive_site SLICE_X38Y26 SLICEM internal 32) (primitive_site SLICE_X38Y27 SLICEM internal 32) (primitive_site SLICE_X39Y26 SLICEL internal 25) (primitive_site SLICE_X39Y27 SLICEL internal 25) ) (tile 13 29 RIOIR11 RIOIS 5 (primitive_site VCC_X24Y14 VCC internal 1) (primitive_site RLL_X23Y14 RESERVED_LL internal 8) (primitive_site H14 DIFFM bonded 21) (primitive_site H13 DIFFS bonded 21) (primitive_site NOPAD21 IOB unbonded 21) ) (tile 13 30 RTERMR11 RTERM 0 ) (tile 14 0 LTERMR12 LTERM 0 ) (tile 14 1 LIOIR12 LIOIS 5 (primitive_site VCC_X0Y13 VCC internal 1) (primitive_site RLL_X0Y13 RESERVED_LL internal 8) (primitive_site H1 DIFFS bonded 21) (primitive_site G1 DIFFM bonded 21) (primitive_site NOPAD57 IOB unbonded 21) ) (tile 14 2 R12C1 CENTER_SMALL 6 (primitive_site RLL_X1Y13 RESERVED_LL internal 8) (primitive_site VCC_X1Y13 VCC internal 1) (primitive_site SLICE_X0Y24 SLICEM internal 32) (primitive_site SLICE_X0Y25 SLICEM internal 32) (primitive_site SLICE_X1Y24 SLICEL internal 25) (primitive_site SLICE_X1Y25 SLICEL internal 25) ) (tile 14 3 R12C2 CENTER_SMALL 6 (primitive_site RLL_X2Y13 RESERVED_LL internal 8) (primitive_site VCC_X2Y13 VCC internal 1) (primitive_site SLICE_X2Y24 SLICEM internal 32) (primitive_site SLICE_X2Y25 SLICEM internal 32) (primitive_site SLICE_X3Y24 SLICEL internal 25) (primitive_site SLICE_X3Y25 SLICEL internal 25) ) (tile 14 4 BRAMR12C1 BRAM0_SMALL 2 (primitive_site RLL_X3Y13 RESERVED_LL internal 8) (primitive_site VCC_X3Y13 VCC internal 1) ) (tile 14 5 BMR12C1 BRAMSITE 2 (primitive_site RAMB16_X0Y3 RAMB16 internal 180) (primitive_site MULT18X18_X0Y3 MULT18X18 internal 75) ) (tile 14 6 R12C3 CENTER_SMALL 6 (primitive_site RLL_X4Y13 RESERVED_LL internal 8) (primitive_site VCC_X4Y13 VCC internal 1) (primitive_site SLICE_X4Y24 SLICEM internal 32) (primitive_site SLICE_X4Y25 SLICEM internal 32) (primitive_site SLICE_X5Y24 SLICEL internal 25) (primitive_site SLICE_X5Y25 SLICEL internal 25) ) (tile 14 7 R12C4 CENTER_SMALL 6 (primitive_site RLL_X5Y13 RESERVED_LL internal 8) (primitive_site VCC_X5Y13 VCC internal 1) (primitive_site SLICE_X6Y24 SLICEM internal 32) (primitive_site SLICE_X6Y25 SLICEM internal 32) (primitive_site SLICE_X7Y24 SLICEL internal 25) (primitive_site SLICE_X7Y25 SLICEL internal 25) ) (tile 14 8 LGCLKVR12 GCLKV 0 ) (tile 14 9 R12C5 CENTER_SMALL 6 (primitive_site RLL_X6Y13 RESERVED_LL internal 8) (primitive_site VCC_X6Y13 VCC internal 1) (primitive_site SLICE_X8Y24 SLICEM internal 32) (primitive_site SLICE_X8Y25 SLICEM internal 32) (primitive_site SLICE_X9Y24 SLICEL internal 25) (primitive_site SLICE_X9Y25 SLICEL internal 25) ) (tile 14 10 R12C6 CENTER_SMALL 6 (primitive_site RLL_X7Y13 RESERVED_LL internal 8) (primitive_site VCC_X7Y13 VCC internal 1) (primitive_site SLICE_X10Y24 SLICEM internal 32) (primitive_site SLICE_X10Y25 SLICEM internal 32) (primitive_site SLICE_X11Y24 SLICEL internal 25) (primitive_site SLICE_X11Y25 SLICEL internal 25) ) (tile 14 11 R12C7 CENTER_SMALL 6 (primitive_site RLL_X8Y13 RESERVED_LL internal 8) (primitive_site VCC_X8Y13 VCC internal 1) (primitive_site SLICE_X12Y24 SLICEM internal 32) (primitive_site SLICE_X12Y25 SLICEM internal 32) (primitive_site SLICE_X13Y24 SLICEL internal 25) (primitive_site SLICE_X13Y25 SLICEL internal 25) ) (tile 14 12 R12C8 CENTER_SMALL 6 (primitive_site RLL_X9Y13 RESERVED_LL internal 8) (primitive_site VCC_X9Y13 VCC internal 1) (primitive_site SLICE_X14Y24 SLICEM internal 32) (primitive_site SLICE_X14Y25 SLICEM internal 32) (primitive_site SLICE_X15Y24 SLICEL internal 25) (primitive_site SLICE_X15Y25 SLICEL internal 25) ) (tile 14 13 R12C9 CENTER_SMALL 6 (primitive_site RLL_X10Y13 RESERVED_LL internal 8) (primitive_site VCC_X10Y13 VCC internal 1) (primitive_site SLICE_X16Y24 SLICEM internal 32) (primitive_site SLICE_X16Y25 SLICEM internal 32) (primitive_site SLICE_X17Y24 SLICEL internal 25) (primitive_site SLICE_X17Y25 SLICEL internal 25) ) (tile 14 14 R12C10 CENTER_SMALL 6 (primitive_site RLL_X11Y13 RESERVED_LL internal 8) (primitive_site VCC_X11Y13 VCC internal 1) (primitive_site SLICE_X18Y24 SLICEM internal 32) (primitive_site SLICE_X18Y25 SLICEM internal 32) (primitive_site SLICE_X19Y24 SLICEL internal 25) (primitive_site SLICE_X19Y25 SLICEL internal 25) ) (tile 14 15 VMR12 CLKV 0 ) (tile 14 16 R12C11 CENTER_SMALL 6 (primitive_site RLL_X12Y13 RESERVED_LL internal 8) (primitive_site VCC_X13Y13 VCC internal 1) (primitive_site SLICE_X20Y24 SLICEM internal 32) (primitive_site SLICE_X20Y25 SLICEM internal 32) (primitive_site SLICE_X21Y24 SLICEL internal 25) (primitive_site SLICE_X21Y25 SLICEL internal 25) ) (tile 14 17 R12C12 CENTER_SMALL 6 (primitive_site RLL_X13Y13 RESERVED_LL internal 8) (primitive_site VCC_X14Y13 VCC internal 1) (primitive_site SLICE_X22Y24 SLICEM internal 32) (primitive_site SLICE_X22Y25 SLICEM internal 32) (primitive_site SLICE_X23Y24 SLICEL internal 25) (primitive_site SLICE_X23Y25 SLICEL internal 25) ) (tile 14 18 R12C13 CENTER_SMALL 6 (primitive_site RLL_X14Y13 RESERVED_LL internal 8) (primitive_site VCC_X15Y13 VCC internal 1) (primitive_site SLICE_X24Y24 SLICEM internal 32) (primitive_site SLICE_X24Y25 SLICEM internal 32) (primitive_site SLICE_X25Y24 SLICEL internal 25) (primitive_site SLICE_X25Y25 SLICEL internal 25) ) (tile 14 19 R12C14 CENTER_SMALL 6 (primitive_site RLL_X15Y13 RESERVED_LL internal 8) (primitive_site VCC_X16Y13 VCC internal 1) (primitive_site SLICE_X26Y24 SLICEM internal 32) (primitive_site SLICE_X26Y25 SLICEM internal 32) (primitive_site SLICE_X27Y24 SLICEL internal 25) (primitive_site SLICE_X27Y25 SLICEL internal 25) ) (tile 14 20 R12C15 CENTER_SMALL 6 (primitive_site RLL_X16Y13 RESERVED_LL internal 8) (primitive_site VCC_X17Y13 VCC internal 1) (primitive_site SLICE_X28Y24 SLICEM internal 32) (primitive_site SLICE_X28Y25 SLICEM internal 32) (primitive_site SLICE_X29Y24 SLICEL internal 25) (primitive_site SLICE_X29Y25 SLICEL internal 25) ) (tile 14 21 R12C16 CENTER_SMALL 6 (primitive_site RLL_X17Y13 RESERVED_LL internal 8) (primitive_site VCC_X18Y13 VCC internal 1) (primitive_site SLICE_X30Y24 SLICEM internal 32) (primitive_site SLICE_X30Y25 SLICEM internal 32) (primitive_site SLICE_X31Y24 SLICEL internal 25) (primitive_site SLICE_X31Y25 SLICEL internal 25) ) (tile 14 22 RGCLKVR12 GCLKV 0 ) (tile 14 23 R12C17 CENTER_SMALL 6 (primitive_site RLL_X18Y13 RESERVED_LL internal 8) (primitive_site VCC_X19Y13 VCC internal 1) (primitive_site SLICE_X32Y24 SLICEM internal 32) (primitive_site SLICE_X32Y25 SLICEM internal 32) (primitive_site SLICE_X33Y24 SLICEL internal 25) (primitive_site SLICE_X33Y25 SLICEL internal 25) ) (tile 14 24 R12C18 CENTER_SMALL 6 (primitive_site RLL_X19Y13 RESERVED_LL internal 8) (primitive_site VCC_X20Y13 VCC internal 1) (primitive_site SLICE_X34Y24 SLICEM internal 32) (primitive_site SLICE_X34Y25 SLICEM internal 32) (primitive_site SLICE_X35Y24 SLICEL internal 25) (primitive_site SLICE_X35Y25 SLICEL internal 25) ) (tile 14 25 BRAMR12C2 BRAM0_SMALL 2 (primitive_site RLL_X20Y13 RESERVED_LL internal 8) (primitive_site VCC_X21Y13 VCC internal 1) ) (tile 14 26 BMR12C2 BRAMSITE 2 (primitive_site RAMB16_X1Y3 RAMB16 internal 180) (primitive_site MULT18X18_X1Y3 MULT18X18 internal 75) ) (tile 14 27 R12C19 CENTER_SMALL 6 (primitive_site RLL_X21Y13 RESERVED_LL internal 8) (primitive_site VCC_X22Y13 VCC internal 1) (primitive_site SLICE_X36Y24 SLICEM internal 32) (primitive_site SLICE_X36Y25 SLICEM internal 32) (primitive_site SLICE_X37Y24 SLICEL internal 25) (primitive_site SLICE_X37Y25 SLICEL internal 25) ) (tile 14 28 R12C20 CENTER_SMALL 6 (primitive_site RLL_X22Y13 RESERVED_LL internal 8) (primitive_site VCC_X23Y13 VCC internal 1) (primitive_site SLICE_X38Y24 SLICEM internal 32) (primitive_site SLICE_X38Y25 SLICEM internal 32) (primitive_site SLICE_X39Y24 SLICEL internal 25) (primitive_site SLICE_X39Y25 SLICEL internal 25) ) (tile 14 29 RIOIR12 RIOIS 5 (primitive_site VCC_X24Y13 VCC internal 1) (primitive_site RLL_X23Y13 RESERVED_LL internal 8) (primitive_site H16 DIFFM bonded 21) (primitive_site H15 DIFFS bonded 21) (primitive_site NOPAD22 IOB unbonded 21) ) (tile 14 30 RTERMR12 RTERM 0 ) (tile 15 0 HMLTERM EMPTY0X2 0 ) (tile 15 1 HMC0 CLKH 0 ) (tile 15 2 HMR1C1 CLKH 0 ) (tile 15 3 HMR1C2 CLKH 0 ) (tile 15 4 HMBRAMC1 CLKH 0 ) (tile 15 5 BMHMBSC1 BRAMSITEH 0 ) (tile 15 6 HMR1C3 CLKH 0 ) (tile 15 7 HMR1C4 CLKH 0 ) (tile 15 8 LGCLKVM GCLKVM 0 ) (tile 15 9 HMR1C5 CLKH 0 ) (tile 15 10 HMR1C6 CLKH 0 ) (tile 15 11 HMR1C7 CLKH 0 ) (tile 15 12 HMR1C8 CLKH 0 ) (tile 15 13 HMR1C9 CLKH 0 ) (tile 15 14 HMR1C10 CLKH 0 ) (tile 15 15 M CLKC 0 ) (tile 15 16 HMR1C11 CLKH 0 ) (tile 15 17 HMR1C12 CLKH 0 ) (tile 15 18 HMR1C13 CLKH 0 ) (tile 15 19 HMR1C14 CLKH 0 ) (tile 15 20 HMR1C15 CLKH 0 ) (tile 15 21 HMR1C16 CLKH 0 ) (tile 15 22 RGCLKVM GCLKVM 0 ) (tile 15 23 HMR1C17 CLKH 0 ) (tile 15 24 HMR1C18 CLKH 0 ) (tile 15 25 HMBRAMC2 CLKH 0 ) (tile 15 26 BMHMBSC2 BRAMSITEH 0 ) (tile 15 27 HMR1C19 CLKH 0 ) (tile 15 28 HMR1C20 CLKH 0 ) (tile 15 29 HMC21 CLKH 0 ) (tile 15 30 HMRTERM EMPTY0X2 0 ) (tile 16 0 LTERMR13 LTERM 0 ) (tile 16 1 LIOIR13 LIOIS 5 (primitive_site VCC_X0Y12 VCC internal 1) (primitive_site RLL_X0Y12 RESERVED_LL internal 8) (primitive_site J2 DIFFS bonded 21) (primitive_site J1 DIFFM bonded 21) (primitive_site NOPAD56 IOB unbonded 21) ) (tile 16 2 R13C1 CENTER_SMALL 6 (primitive_site RLL_X1Y12 RESERVED_LL internal 8) (primitive_site VCC_X1Y12 VCC internal 1) (primitive_site SLICE_X0Y22 SLICEM internal 32) (primitive_site SLICE_X0Y23 SLICEM internal 32) (primitive_site SLICE_X1Y22 SLICEL internal 25) (primitive_site SLICE_X1Y23 SLICEL internal 25) ) (tile 16 3 R13C2 CENTER_SMALL 6 (primitive_site RLL_X2Y12 RESERVED_LL internal 8) (primitive_site VCC_X2Y12 VCC internal 1) (primitive_site SLICE_X2Y22 SLICEM internal 32) (primitive_site SLICE_X2Y23 SLICEM internal 32) (primitive_site SLICE_X3Y22 SLICEL internal 25) (primitive_site SLICE_X3Y23 SLICEL internal 25) ) (tile 16 4 BRAMR13C1 BRAM3_SMALL 2 (primitive_site RLL_X3Y12 RESERVED_LL internal 8) (primitive_site VCC_X3Y12 VCC internal 1) ) (tile 16 5 BMR13C1 EMPTY64X76 0 ) (tile 16 6 R13C3 CENTER_SMALL 6 (primitive_site RLL_X4Y12 RESERVED_LL internal 8) (primitive_site VCC_X4Y12 VCC internal 1) (primitive_site SLICE_X4Y22 SLICEM internal 32) (primitive_site SLICE_X4Y23 SLICEM internal 32) (primitive_site SLICE_X5Y22 SLICEL internal 25) (primitive_site SLICE_X5Y23 SLICEL internal 25) ) (tile 16 7 R13C4 CENTER_SMALL 6 (primitive_site RLL_X5Y12 RESERVED_LL internal 8) (primitive_site VCC_X5Y12 VCC internal 1) (primitive_site SLICE_X6Y22 SLICEM internal 32) (primitive_site SLICE_X6Y23 SLICEM internal 32) (primitive_site SLICE_X7Y22 SLICEL internal 25) (primitive_site SLICE_X7Y23 SLICEL internal 25) ) (tile 16 8 LGCLKVR13 GCLKV 0 ) (tile 16 9 R13C5 CENTER_SMALL 6 (primitive_site RLL_X6Y12 RESERVED_LL internal 8) (primitive_site VCC_X6Y12 VCC internal 1) (primitive_site SLICE_X8Y22 SLICEM internal 32) (primitive_site SLICE_X8Y23 SLICEM internal 32) (primitive_site SLICE_X9Y22 SLICEL internal 25) (primitive_site SLICE_X9Y23 SLICEL internal 25) ) (tile 16 10 R13C6 CENTER_SMALL 6 (primitive_site RLL_X7Y12 RESERVED_LL internal 8) (primitive_site VCC_X7Y12 VCC internal 1) (primitive_site SLICE_X10Y22 SLICEM internal 32) (primitive_site SLICE_X10Y23 SLICEM internal 32) (primitive_site SLICE_X11Y22 SLICEL internal 25) (primitive_site SLICE_X11Y23 SLICEL internal 25) ) (tile 16 11 R13C7 CENTER_SMALL 6 (primitive_site RLL_X8Y12 RESERVED_LL internal 8) (primitive_site VCC_X8Y12 VCC internal 1) (primitive_site SLICE_X12Y22 SLICEM internal 32) (primitive_site SLICE_X12Y23 SLICEM internal 32) (primitive_site SLICE_X13Y22 SLICEL internal 25) (primitive_site SLICE_X13Y23 SLICEL internal 25) ) (tile 16 12 R13C8 CENTER_SMALL 6 (primitive_site RLL_X9Y12 RESERVED_LL internal 8) (primitive_site VCC_X9Y12 VCC internal 1) (primitive_site SLICE_X14Y22 SLICEM internal 32) (primitive_site SLICE_X14Y23 SLICEM internal 32) (primitive_site SLICE_X15Y22 SLICEL internal 25) (primitive_site SLICE_X15Y23 SLICEL internal 25) ) (tile 16 13 R13C9 CENTER_SMALL 6 (primitive_site RLL_X10Y12 RESERVED_LL internal 8) (primitive_site VCC_X10Y12 VCC internal 1) (primitive_site SLICE_X16Y22 SLICEM internal 32) (primitive_site SLICE_X16Y23 SLICEM internal 32) (primitive_site SLICE_X17Y22 SLICEL internal 25) (primitive_site SLICE_X17Y23 SLICEL internal 25) ) (tile 16 14 R13C10 CENTER_SMALL 6 (primitive_site RLL_X11Y12 RESERVED_LL internal 8) (primitive_site VCC_X11Y12 VCC internal 1) (primitive_site SLICE_X18Y22 SLICEM internal 32) (primitive_site SLICE_X18Y23 SLICEM internal 32) (primitive_site SLICE_X19Y22 SLICEL internal 25) (primitive_site SLICE_X19Y23 SLICEL internal 25) ) (tile 16 15 VMR13 CLKV 0 ) (tile 16 16 R13C11 CENTER_SMALL 6 (primitive_site RLL_X12Y12 RESERVED_LL internal 8) (primitive_site VCC_X13Y12 VCC internal 1) (primitive_site SLICE_X20Y22 SLICEM internal 32) (primitive_site SLICE_X20Y23 SLICEM internal 32) (primitive_site SLICE_X21Y22 SLICEL internal 25) (primitive_site SLICE_X21Y23 SLICEL internal 25) ) (tile 16 17 R13C12 CENTER_SMALL 6 (primitive_site RLL_X13Y12 RESERVED_LL internal 8) (primitive_site VCC_X14Y12 VCC internal 1) (primitive_site SLICE_X22Y22 SLICEM internal 32) (primitive_site SLICE_X22Y23 SLICEM internal 32) (primitive_site SLICE_X23Y22 SLICEL internal 25) (primitive_site SLICE_X23Y23 SLICEL internal 25) ) (tile 16 18 R13C13 CENTER_SMALL 6 (primitive_site RLL_X14Y12 RESERVED_LL internal 8) (primitive_site VCC_X15Y12 VCC internal 1) (primitive_site SLICE_X24Y22 SLICEM internal 32) (primitive_site SLICE_X24Y23 SLICEM internal 32) (primitive_site SLICE_X25Y22 SLICEL internal 25) (primitive_site SLICE_X25Y23 SLICEL internal 25) ) (tile 16 19 R13C14 CENTER_SMALL 6 (primitive_site RLL_X15Y12 RESERVED_LL internal 8) (primitive_site VCC_X16Y12 VCC internal 1) (primitive_site SLICE_X26Y22 SLICEM internal 32) (primitive_site SLICE_X26Y23 SLICEM internal 32) (primitive_site SLICE_X27Y22 SLICEL internal 25) (primitive_site SLICE_X27Y23 SLICEL internal 25) ) (tile 16 20 R13C15 CENTER_SMALL 6 (primitive_site RLL_X16Y12 RESERVED_LL internal 8) (primitive_site VCC_X17Y12 VCC internal 1) (primitive_site SLICE_X28Y22 SLICEM internal 32) (primitive_site SLICE_X28Y23 SLICEM internal 32) (primitive_site SLICE_X29Y22 SLICEL internal 25) (primitive_site SLICE_X29Y23 SLICEL internal 25) ) (tile 16 21 R13C16 CENTER_SMALL 6 (primitive_site RLL_X17Y12 RESERVED_LL internal 8) (primitive_site VCC_X18Y12 VCC internal 1) (primitive_site SLICE_X30Y22 SLICEM internal 32) (primitive_site SLICE_X30Y23 SLICEM internal 32) (primitive_site SLICE_X31Y22 SLICEL internal 25) (primitive_site SLICE_X31Y23 SLICEL internal 25) ) (tile 16 22 RGCLKVR13 GCLKV 0 ) (tile 16 23 R13C17 CENTER_SMALL 6 (primitive_site RLL_X18Y12 RESERVED_LL internal 8) (primitive_site VCC_X19Y12 VCC internal 1) (primitive_site SLICE_X32Y22 SLICEM internal 32) (primitive_site SLICE_X32Y23 SLICEM internal 32) (primitive_site SLICE_X33Y22 SLICEL internal 25) (primitive_site SLICE_X33Y23 SLICEL internal 25) ) (tile 16 24 R13C18 CENTER_SMALL 6 (primitive_site RLL_X19Y12 RESERVED_LL internal 8) (primitive_site VCC_X20Y12 VCC internal 1) (primitive_site SLICE_X34Y22 SLICEM internal 32) (primitive_site SLICE_X34Y23 SLICEM internal 32) (primitive_site SLICE_X35Y22 SLICEL internal 25) (primitive_site SLICE_X35Y23 SLICEL internal 25) ) (tile 16 25 BRAMR13C2 BRAM3_SMALL 2 (primitive_site RLL_X20Y12 RESERVED_LL internal 8) (primitive_site VCC_X21Y12 VCC internal 1) ) (tile 16 26 BMR13C2 EMPTY64X76 0 ) (tile 16 27 R13C19 CENTER_SMALL 6 (primitive_site RLL_X21Y12 RESERVED_LL internal 8) (primitive_site VCC_X22Y12 VCC internal 1) (primitive_site SLICE_X36Y22 SLICEM internal 32) (primitive_site SLICE_X36Y23 SLICEM internal 32) (primitive_site SLICE_X37Y22 SLICEL internal 25) (primitive_site SLICE_X37Y23 SLICEL internal 25) ) (tile 16 28 R13C20 CENTER_SMALL 6 (primitive_site RLL_X22Y12 RESERVED_LL internal 8) (primitive_site VCC_X23Y12 VCC internal 1) (primitive_site SLICE_X38Y22 SLICEM internal 32) (primitive_site SLICE_X38Y23 SLICEM internal 32) (primitive_site SLICE_X39Y22 SLICEL internal 25) (primitive_site SLICE_X39Y23 SLICEL internal 25) ) (tile 16 29 RIOIR13 RIOIS 5 (primitive_site VCC_X24Y12 VCC internal 1) (primitive_site RLL_X23Y12 RESERVED_LL internal 8) (primitive_site K16 DIFFM bonded 21) (primitive_site J16 DIFFS bonded 21) (primitive_site NOPAD23 IOB unbonded 21) ) (tile 16 30 RTERMR13 RTERM 0 ) (tile 17 0 LTERMR14 LTERM 0 ) (tile 17 1 LIOIR14 LIOIS 5 (primitive_site VCC_X0Y11 VCC internal 1) (primitive_site RLL_X0Y11 RESERVED_LL internal 8) (primitive_site J4 DIFFS bonded 21) (primitive_site J3 DIFFM bonded 21) (primitive_site NOPAD55 IOB unbonded 21) ) (tile 17 2 R14C1 CENTER_SMALL 6 (primitive_site RLL_X1Y11 RESERVED_LL internal 8) (primitive_site VCC_X1Y11 VCC internal 1) (primitive_site SLICE_X0Y20 SLICEM internal 32) (primitive_site SLICE_X0Y21 SLICEM internal 32) (primitive_site SLICE_X1Y20 SLICEL internal 25) (primitive_site SLICE_X1Y21 SLICEL internal 25) ) (tile 17 3 R14C2 CENTER_SMALL 6 (primitive_site RLL_X2Y11 RESERVED_LL internal 8) (primitive_site VCC_X2Y11 VCC internal 1) (primitive_site SLICE_X2Y20 SLICEM internal 32) (primitive_site SLICE_X2Y21 SLICEM internal 32) (primitive_site SLICE_X3Y20 SLICEL internal 25) (primitive_site SLICE_X3Y21 SLICEL internal 25) ) (tile 17 4 BRAMR14C1 BRAM2_SMALL 2 (primitive_site RLL_X3Y11 RESERVED_LL internal 8) (primitive_site VCC_X3Y11 VCC internal 1) ) (tile 17 5 BMR14C1 EMPTY64X76 0 ) (tile 17 6 R14C3 CENTER_SMALL 6 (primitive_site RLL_X4Y11 RESERVED_LL internal 8) (primitive_site VCC_X4Y11 VCC internal 1) (primitive_site SLICE_X4Y20 SLICEM internal 32) (primitive_site SLICE_X4Y21 SLICEM internal 32) (primitive_site SLICE_X5Y20 SLICEL internal 25) (primitive_site SLICE_X5Y21 SLICEL internal 25) ) (tile 17 7 R14C4 CENTER_SMALL 6 (primitive_site RLL_X5Y11 RESERVED_LL internal 8) (primitive_site VCC_X5Y11 VCC internal 1) (primitive_site SLICE_X6Y20 SLICEM internal 32) (primitive_site SLICE_X6Y21 SLICEM internal 32) (primitive_site SLICE_X7Y20 SLICEL internal 25) (primitive_site SLICE_X7Y21 SLICEL internal 25) ) (tile 17 8 LGCLKVR14 GCLKV 0 ) (tile 17 9 R14C5 CENTER_SMALL 6 (primitive_site RLL_X6Y11 RESERVED_LL internal 8) (primitive_site VCC_X6Y11 VCC internal 1) (primitive_site SLICE_X8Y20 SLICEM internal 32) (primitive_site SLICE_X8Y21 SLICEM internal 32) (primitive_site SLICE_X9Y20 SLICEL internal 25) (primitive_site SLICE_X9Y21 SLICEL internal 25) ) (tile 17 10 R14C6 CENTER_SMALL 6 (primitive_site RLL_X7Y11 RESERVED_LL internal 8) (primitive_site VCC_X7Y11 VCC internal 1) (primitive_site SLICE_X10Y20 SLICEM internal 32) (primitive_site SLICE_X10Y21 SLICEM internal 32) (primitive_site SLICE_X11Y20 SLICEL internal 25) (primitive_site SLICE_X11Y21 SLICEL internal 25) ) (tile 17 11 R14C7 CENTER_SMALL 6 (primitive_site RLL_X8Y11 RESERVED_LL internal 8) (primitive_site VCC_X8Y11 VCC internal 1) (primitive_site SLICE_X12Y20 SLICEM internal 32) (primitive_site SLICE_X12Y21 SLICEM internal 32) (primitive_site SLICE_X13Y20 SLICEL internal 25) (primitive_site SLICE_X13Y21 SLICEL internal 25) ) (tile 17 12 R14C8 CENTER_SMALL 6 (primitive_site RLL_X9Y11 RESERVED_LL internal 8) (primitive_site VCC_X9Y11 VCC internal 1) (primitive_site SLICE_X14Y20 SLICEM internal 32) (primitive_site SLICE_X14Y21 SLICEM internal 32) (primitive_site SLICE_X15Y20 SLICEL internal 25) (primitive_site SLICE_X15Y21 SLICEL internal 25) ) (tile 17 13 R14C9 CENTER_SMALL 6 (primitive_site RLL_X10Y11 RESERVED_LL internal 8) (primitive_site VCC_X10Y11 VCC internal 1) (primitive_site SLICE_X16Y20 SLICEM internal 32) (primitive_site SLICE_X16Y21 SLICEM internal 32) (primitive_site SLICE_X17Y20 SLICEL internal 25) (primitive_site SLICE_X17Y21 SLICEL internal 25) ) (tile 17 14 R14C10 CENTER_SMALL 6 (primitive_site RLL_X11Y11 RESERVED_LL internal 8) (primitive_site VCC_X11Y11 VCC internal 1) (primitive_site SLICE_X18Y20 SLICEM internal 32) (primitive_site SLICE_X18Y21 SLICEM internal 32) (primitive_site SLICE_X19Y20 SLICEL internal 25) (primitive_site SLICE_X19Y21 SLICEL internal 25) ) (tile 17 15 VMR14 CLKV 0 ) (tile 17 16 R14C11 CENTER_SMALL 6 (primitive_site RLL_X12Y11 RESERVED_LL internal 8) (primitive_site VCC_X13Y11 VCC internal 1) (primitive_site SLICE_X20Y20 SLICEM internal 32) (primitive_site SLICE_X20Y21 SLICEM internal 32) (primitive_site SLICE_X21Y20 SLICEL internal 25) (primitive_site SLICE_X21Y21 SLICEL internal 25) ) (tile 17 17 R14C12 CENTER_SMALL 6 (primitive_site RLL_X13Y11 RESERVED_LL internal 8) (primitive_site VCC_X14Y11 VCC internal 1) (primitive_site SLICE_X22Y20 SLICEM internal 32) (primitive_site SLICE_X22Y21 SLICEM internal 32) (primitive_site SLICE_X23Y20 SLICEL internal 25) (primitive_site SLICE_X23Y21 SLICEL internal 25) ) (tile 17 18 R14C13 CENTER_SMALL 6 (primitive_site RLL_X14Y11 RESERVED_LL internal 8) (primitive_site VCC_X15Y11 VCC internal 1) (primitive_site SLICE_X24Y20 SLICEM internal 32) (primitive_site SLICE_X24Y21 SLICEM internal 32) (primitive_site SLICE_X25Y20 SLICEL internal 25) (primitive_site SLICE_X25Y21 SLICEL internal 25) ) (tile 17 19 R14C14 CENTER_SMALL 6 (primitive_site RLL_X15Y11 RESERVED_LL internal 8) (primitive_site VCC_X16Y11 VCC internal 1) (primitive_site SLICE_X26Y20 SLICEM internal 32) (primitive_site SLICE_X26Y21 SLICEM internal 32) (primitive_site SLICE_X27Y20 SLICEL internal 25) (primitive_site SLICE_X27Y21 SLICEL internal 25) ) (tile 17 20 R14C15 CENTER_SMALL 6 (primitive_site RLL_X16Y11 RESERVED_LL internal 8) (primitive_site VCC_X17Y11 VCC internal 1) (primitive_site SLICE_X28Y20 SLICEM internal 32) (primitive_site SLICE_X28Y21 SLICEM internal 32) (primitive_site SLICE_X29Y20 SLICEL internal 25) (primitive_site SLICE_X29Y21 SLICEL internal 25) ) (tile 17 21 R14C16 CENTER_SMALL 6 (primitive_site RLL_X17Y11 RESERVED_LL internal 8) (primitive_site VCC_X18Y11 VCC internal 1) (primitive_site SLICE_X30Y20 SLICEM internal 32) (primitive_site SLICE_X30Y21 SLICEM internal 32) (primitive_site SLICE_X31Y20 SLICEL internal 25) (primitive_site SLICE_X31Y21 SLICEL internal 25) ) (tile 17 22 RGCLKVR14 GCLKV 0 ) (tile 17 23 R14C17 CENTER_SMALL 6 (primitive_site RLL_X18Y11 RESERVED_LL internal 8) (primitive_site VCC_X19Y11 VCC internal 1) (primitive_site SLICE_X32Y20 SLICEM internal 32) (primitive_site SLICE_X32Y21 SLICEM internal 32) (primitive_site SLICE_X33Y20 SLICEL internal 25) (primitive_site SLICE_X33Y21 SLICEL internal 25) ) (tile 17 24 R14C18 CENTER_SMALL 6 (primitive_site RLL_X19Y11 RESERVED_LL internal 8) (primitive_site VCC_X20Y11 VCC internal 1) (primitive_site SLICE_X34Y20 SLICEM internal 32) (primitive_site SLICE_X34Y21 SLICEM internal 32) (primitive_site SLICE_X35Y20 SLICEL internal 25) (primitive_site SLICE_X35Y21 SLICEL internal 25) ) (tile 17 25 BRAMR14C2 BRAM2_SMALL 2 (primitive_site RLL_X20Y11 RESERVED_LL internal 8) (primitive_site VCC_X21Y11 VCC internal 1) ) (tile 17 26 BMR14C2 EMPTY64X76 0 ) (tile 17 27 R14C19 CENTER_SMALL 6 (primitive_site RLL_X21Y11 RESERVED_LL internal 8) (primitive_site VCC_X22Y11 VCC internal 1) (primitive_site SLICE_X36Y20 SLICEM internal 32) (primitive_site SLICE_X36Y21 SLICEM internal 32) (primitive_site SLICE_X37Y20 SLICEL internal 25) (primitive_site SLICE_X37Y21 SLICEL internal 25) ) (tile 17 28 R14C20 CENTER_SMALL 6 (primitive_site RLL_X22Y11 RESERVED_LL internal 8) (primitive_site VCC_X23Y11 VCC internal 1) (primitive_site SLICE_X38Y20 SLICEM internal 32) (primitive_site SLICE_X38Y21 SLICEM internal 32) (primitive_site SLICE_X39Y20 SLICEL internal 25) (primitive_site SLICE_X39Y21 SLICEL internal 25) ) (tile 17 29 RIOIR14 RIOIS 5 (primitive_site VCC_X24Y11 VCC internal 1) (primitive_site RLL_X23Y11 RESERVED_LL internal 8) (primitive_site J13 DIFFM bonded 21) (primitive_site J14 DIFFS bonded 21) (primitive_site NOPAD24 IOB unbonded 21) ) (tile 17 30 RTERMR14 RTERM 0 ) (tile 18 0 LTERMR15 LTERM 0 ) (tile 18 1 LIOIR15 LIOIS 5 (primitive_site VCC_X0Y10 VCC internal 1) (primitive_site RLL_X0Y10 RESERVED_LL internal 8) (primitive_site PAD167 DIFFS unbonded 21) (primitive_site K1 DIFFM bonded 21) (primitive_site NOPAD54 IOB unbonded 21) ) (tile 18 2 R15C1 CENTER_SMALL 6 (primitive_site RLL_X1Y10 RESERVED_LL internal 8) (primitive_site VCC_X1Y10 VCC internal 1) (primitive_site SLICE_X0Y18 SLICEM internal 32) (primitive_site SLICE_X0Y19 SLICEM internal 32) (primitive_site SLICE_X1Y18 SLICEL internal 25) (primitive_site SLICE_X1Y19 SLICEL internal 25) ) (tile 18 3 R15C2 CENTER_SMALL 6 (primitive_site RLL_X2Y10 RESERVED_LL internal 8) (primitive_site VCC_X2Y10 VCC internal 1) (primitive_site SLICE_X2Y18 SLICEM internal 32) (primitive_site SLICE_X2Y19 SLICEM internal 32) (primitive_site SLICE_X3Y18 SLICEL internal 25) (primitive_site SLICE_X3Y19 SLICEL internal 25) ) (tile 18 4 BRAMR15C1 BRAM1_SMALL 2 (primitive_site RLL_X3Y10 RESERVED_LL internal 8) (primitive_site VCC_X3Y10 VCC internal 1) ) (tile 18 5 BMR15C1 EMPTY64X76 0 ) (tile 18 6 R15C3 CENTER_SMALL 6 (primitive_site RLL_X4Y10 RESERVED_LL internal 8) (primitive_site VCC_X4Y10 VCC internal 1) (primitive_site SLICE_X4Y18 SLICEM internal 32) (primitive_site SLICE_X4Y19 SLICEM internal 32) (primitive_site SLICE_X5Y18 SLICEL internal 25) (primitive_site SLICE_X5Y19 SLICEL internal 25) ) (tile 18 7 R15C4 CENTER_SMALL 6 (primitive_site RLL_X5Y10 RESERVED_LL internal 8) (primitive_site VCC_X5Y10 VCC internal 1) (primitive_site SLICE_X6Y18 SLICEM internal 32) (primitive_site SLICE_X6Y19 SLICEM internal 32) (primitive_site SLICE_X7Y18 SLICEL internal 25) (primitive_site SLICE_X7Y19 SLICEL internal 25) ) (tile 18 8 LGCLKVR15 GCLKV 0 ) (tile 18 9 R15C5 CENTER_SMALL 6 (primitive_site RLL_X6Y10 RESERVED_LL internal 8) (primitive_site VCC_X6Y10 VCC internal 1) (primitive_site SLICE_X8Y18 SLICEM internal 32) (primitive_site SLICE_X8Y19 SLICEM internal 32) (primitive_site SLICE_X9Y18 SLICEL internal 25) (primitive_site SLICE_X9Y19 SLICEL internal 25) ) (tile 18 10 R15C6 CENTER_SMALL 6 (primitive_site RLL_X7Y10 RESERVED_LL internal 8) (primitive_site VCC_X7Y10 VCC internal 1) (primitive_site SLICE_X10Y18 SLICEM internal 32) (primitive_site SLICE_X10Y19 SLICEM internal 32) (primitive_site SLICE_X11Y18 SLICEL internal 25) (primitive_site SLICE_X11Y19 SLICEL internal 25) ) (tile 18 11 R15C7 CENTER_SMALL 6 (primitive_site RLL_X8Y10 RESERVED_LL internal 8) (primitive_site VCC_X8Y10 VCC internal 1) (primitive_site SLICE_X12Y18 SLICEM internal 32) (primitive_site SLICE_X12Y19 SLICEM internal 32) (primitive_site SLICE_X13Y18 SLICEL internal 25) (primitive_site SLICE_X13Y19 SLICEL internal 25) ) (tile 18 12 R15C8 CENTER_SMALL 6 (primitive_site RLL_X9Y10 RESERVED_LL internal 8) (primitive_site VCC_X9Y10 VCC internal 1) (primitive_site SLICE_X14Y18 SLICEM internal 32) (primitive_site SLICE_X14Y19 SLICEM internal 32) (primitive_site SLICE_X15Y18 SLICEL internal 25) (primitive_site SLICE_X15Y19 SLICEL internal 25) ) (tile 18 13 R15C9 CENTER_SMALL 6 (primitive_site RLL_X10Y10 RESERVED_LL internal 8) (primitive_site VCC_X10Y10 VCC internal 1) (primitive_site SLICE_X16Y18 SLICEM internal 32) (primitive_site SLICE_X16Y19 SLICEM internal 32) (primitive_site SLICE_X17Y18 SLICEL internal 25) (primitive_site SLICE_X17Y19 SLICEL internal 25) ) (tile 18 14 R15C10 CENTER_SMALL 6 (primitive_site RLL_X11Y10 RESERVED_LL internal 8) (primitive_site VCC_X11Y10 VCC internal 1) (primitive_site SLICE_X18Y18 SLICEM internal 32) (primitive_site SLICE_X18Y19 SLICEM internal 32) (primitive_site SLICE_X19Y18 SLICEL internal 25) (primitive_site SLICE_X19Y19 SLICEL internal 25) ) (tile 18 15 VMR15 CLKV 0 ) (tile 18 16 R15C11 CENTER_SMALL 6 (primitive_site RLL_X12Y10 RESERVED_LL internal 8) (primitive_site VCC_X13Y10 VCC internal 1) (primitive_site SLICE_X20Y18 SLICEM internal 32) (primitive_site SLICE_X20Y19 SLICEM internal 32) (primitive_site SLICE_X21Y18 SLICEL internal 25) (primitive_site SLICE_X21Y19 SLICEL internal 25) ) (tile 18 17 R15C12 CENTER_SMALL 6 (primitive_site RLL_X13Y10 RESERVED_LL internal 8) (primitive_site VCC_X14Y10 VCC internal 1) (primitive_site SLICE_X22Y18 SLICEM internal 32) (primitive_site SLICE_X22Y19 SLICEM internal 32) (primitive_site SLICE_X23Y18 SLICEL internal 25) (primitive_site SLICE_X23Y19 SLICEL internal 25) ) (tile 18 18 R15C13 CENTER_SMALL 6 (primitive_site RLL_X14Y10 RESERVED_LL internal 8) (primitive_site VCC_X15Y10 VCC internal 1) (primitive_site SLICE_X24Y18 SLICEM internal 32) (primitive_site SLICE_X24Y19 SLICEM internal 32) (primitive_site SLICE_X25Y18 SLICEL internal 25) (primitive_site SLICE_X25Y19 SLICEL internal 25) ) (tile 18 19 R15C14 CENTER_SMALL 6 (primitive_site RLL_X15Y10 RESERVED_LL internal 8) (primitive_site VCC_X16Y10 VCC internal 1) (primitive_site SLICE_X26Y18 SLICEM internal 32) (primitive_site SLICE_X26Y19 SLICEM internal 32) (primitive_site SLICE_X27Y18 SLICEL internal 25) (primitive_site SLICE_X27Y19 SLICEL internal 25) ) (tile 18 20 R15C15 CENTER_SMALL 6 (primitive_site RLL_X16Y10 RESERVED_LL internal 8) (primitive_site VCC_X17Y10 VCC internal 1) (primitive_site SLICE_X28Y18 SLICEM internal 32) (primitive_site SLICE_X28Y19 SLICEM internal 32) (primitive_site SLICE_X29Y18 SLICEL internal 25) (primitive_site SLICE_X29Y19 SLICEL internal 25) ) (tile 18 21 R15C16 CENTER_SMALL 6 (primitive_site RLL_X17Y10 RESERVED_LL internal 8) (primitive_site VCC_X18Y10 VCC internal 1) (primitive_site SLICE_X30Y18 SLICEM internal 32) (primitive_site SLICE_X30Y19 SLICEM internal 32) (primitive_site SLICE_X31Y18 SLICEL internal 25) (primitive_site SLICE_X31Y19 SLICEL internal 25) ) (tile 18 22 RGCLKVR15 GCLKV 0 ) (tile 18 23 R15C17 CENTER_SMALL 6 (primitive_site RLL_X18Y10 RESERVED_LL internal 8) (primitive_site VCC_X19Y10 VCC internal 1) (primitive_site SLICE_X32Y18 SLICEM internal 32) (primitive_site SLICE_X32Y19 SLICEM internal 32) (primitive_site SLICE_X33Y18 SLICEL internal 25) (primitive_site SLICE_X33Y19 SLICEL internal 25) ) (tile 18 24 R15C18 CENTER_SMALL 6 (primitive_site RLL_X19Y10 RESERVED_LL internal 8) (primitive_site VCC_X20Y10 VCC internal 1) (primitive_site SLICE_X34Y18 SLICEM internal 32) (primitive_site SLICE_X34Y19 SLICEM internal 32) (primitive_site SLICE_X35Y18 SLICEL internal 25) (primitive_site SLICE_X35Y19 SLICEL internal 25) ) (tile 18 25 BRAMR15C2 BRAM1_SMALL 2 (primitive_site RLL_X20Y10 RESERVED_LL internal 8) (primitive_site VCC_X21Y10 VCC internal 1) ) (tile 18 26 BMR15C2 EMPTY64X76 0 ) (tile 18 27 R15C19 CENTER_SMALL 6 (primitive_site RLL_X21Y10 RESERVED_LL internal 8) (primitive_site VCC_X22Y10 VCC internal 1) (primitive_site SLICE_X36Y18 SLICEM internal 32) (primitive_site SLICE_X36Y19 SLICEM internal 32) (primitive_site SLICE_X37Y18 SLICEL internal 25) (primitive_site SLICE_X37Y19 SLICEL internal 25) ) (tile 18 28 R15C20 CENTER_SMALL 6 (primitive_site RLL_X22Y10 RESERVED_LL internal 8) (primitive_site VCC_X23Y10 VCC internal 1) (primitive_site SLICE_X38Y18 SLICEM internal 32) (primitive_site SLICE_X38Y19 SLICEM internal 32) (primitive_site SLICE_X39Y18 SLICEL internal 25) (primitive_site SLICE_X39Y19 SLICEL internal 25) ) (tile 18 29 RIOIR15 RIOIS 5 (primitive_site VCC_X24Y10 VCC internal 1) (primitive_site RLL_X23Y10 RESERVED_LL internal 8) (primitive_site PAD80 DIFFM unbonded 21) (primitive_site K15 DIFFS bonded 21) (primitive_site NOPAD25 IOB unbonded 21) ) (tile 18 30 RTERMR15 RTERM 0 ) (tile 19 0 LTERMR16 LTERM 0 ) (tile 19 1 LIOIR16 LIOIS 5 (primitive_site VCC_X0Y9 VCC internal 1) (primitive_site RLL_X0Y9 RESERVED_LL internal 8) (primitive_site K3 DIFFS bonded 21) (primitive_site K2 DIFFM bonded 21) (primitive_site NOPAD53 IOB unbonded 21) ) (tile 19 2 R16C1 CENTER_SMALL 6 (primitive_site RLL_X1Y9 RESERVED_LL internal 8) (primitive_site VCC_X1Y9 VCC internal 1) (primitive_site SLICE_X0Y16 SLICEM internal 32) (primitive_site SLICE_X0Y17 SLICEM internal 32) (primitive_site SLICE_X1Y16 SLICEL internal 25) (primitive_site SLICE_X1Y17 SLICEL internal 25) ) (tile 19 3 R16C2 CENTER_SMALL 6 (primitive_site RLL_X2Y9 RESERVED_LL internal 8) (primitive_site VCC_X2Y9 VCC internal 1) (primitive_site SLICE_X2Y16 SLICEM internal 32) (primitive_site SLICE_X2Y17 SLICEM internal 32) (primitive_site SLICE_X3Y16 SLICEL internal 25) (primitive_site SLICE_X3Y17 SLICEL internal 25) ) (tile 19 4 BRAMR16C1 BRAM0_SMALL 2 (primitive_site RLL_X3Y9 RESERVED_LL internal 8) (primitive_site VCC_X3Y9 VCC internal 1) ) (tile 19 5 BMR16C1 BRAMSITE 2 (primitive_site RAMB16_X0Y2 RAMB16 internal 180) (primitive_site MULT18X18_X0Y2 MULT18X18 internal 75) ) (tile 19 6 R16C3 CENTER_SMALL 6 (primitive_site RLL_X4Y9 RESERVED_LL internal 8) (primitive_site VCC_X4Y9 VCC internal 1) (primitive_site SLICE_X4Y16 SLICEM internal 32) (primitive_site SLICE_X4Y17 SLICEM internal 32) (primitive_site SLICE_X5Y16 SLICEL internal 25) (primitive_site SLICE_X5Y17 SLICEL internal 25) ) (tile 19 7 R16C4 CENTER_SMALL 6 (primitive_site RLL_X5Y9 RESERVED_LL internal 8) (primitive_site VCC_X5Y9 VCC internal 1) (primitive_site SLICE_X6Y16 SLICEM internal 32) (primitive_site SLICE_X6Y17 SLICEM internal 32) (primitive_site SLICE_X7Y16 SLICEL internal 25) (primitive_site SLICE_X7Y17 SLICEL internal 25) ) (tile 19 8 LGCLKVR16 GCLKV 0 ) (tile 19 9 R16C5 CENTER_SMALL 6 (primitive_site RLL_X6Y9 RESERVED_LL internal 8) (primitive_site VCC_X6Y9 VCC internal 1) (primitive_site SLICE_X8Y16 SLICEM internal 32) (primitive_site SLICE_X8Y17 SLICEM internal 32) (primitive_site SLICE_X9Y16 SLICEL internal 25) (primitive_site SLICE_X9Y17 SLICEL internal 25) ) (tile 19 10 R16C6 CENTER_SMALL 6 (primitive_site RLL_X7Y9 RESERVED_LL internal 8) (primitive_site VCC_X7Y9 VCC internal 1) (primitive_site SLICE_X10Y16 SLICEM internal 32) (primitive_site SLICE_X10Y17 SLICEM internal 32) (primitive_site SLICE_X11Y16 SLICEL internal 25) (primitive_site SLICE_X11Y17 SLICEL internal 25) ) (tile 19 11 R16C7 CENTER_SMALL 6 (primitive_site RLL_X8Y9 RESERVED_LL internal 8) (primitive_site VCC_X8Y9 VCC internal 1) (primitive_site SLICE_X12Y16 SLICEM internal 32) (primitive_site SLICE_X12Y17 SLICEM internal 32) (primitive_site SLICE_X13Y16 SLICEL internal 25) (primitive_site SLICE_X13Y17 SLICEL internal 25) ) (tile 19 12 R16C8 CENTER_SMALL 6 (primitive_site RLL_X9Y9 RESERVED_LL internal 8) (primitive_site VCC_X9Y9 VCC internal 1) (primitive_site SLICE_X14Y16 SLICEM internal 32) (primitive_site SLICE_X14Y17 SLICEM internal 32) (primitive_site SLICE_X15Y16 SLICEL internal 25) (primitive_site SLICE_X15Y17 SLICEL internal 25) ) (tile 19 13 R16C9 CENTER_SMALL 6 (primitive_site RLL_X10Y9 RESERVED_LL internal 8) (primitive_site VCC_X10Y9 VCC internal 1) (primitive_site SLICE_X16Y16 SLICEM internal 32) (primitive_site SLICE_X16Y17 SLICEM internal 32) (primitive_site SLICE_X17Y16 SLICEL internal 25) (primitive_site SLICE_X17Y17 SLICEL internal 25) ) (tile 19 14 R16C10 CENTER_SMALL 6 (primitive_site RLL_X11Y9 RESERVED_LL internal 8) (primitive_site VCC_X11Y9 VCC internal 1) (primitive_site SLICE_X18Y16 SLICEM internal 32) (primitive_site SLICE_X18Y17 SLICEM internal 32) (primitive_site SLICE_X19Y16 SLICEL internal 25) (primitive_site SLICE_X19Y17 SLICEL internal 25) ) (tile 19 15 VMR16 CLKV 0 ) (tile 19 16 R16C11 CENTER_SMALL 6 (primitive_site RLL_X12Y9 RESERVED_LL internal 8) (primitive_site VCC_X13Y9 VCC internal 1) (primitive_site SLICE_X20Y16 SLICEM internal 32) (primitive_site SLICE_X20Y17 SLICEM internal 32) (primitive_site SLICE_X21Y16 SLICEL internal 25) (primitive_site SLICE_X21Y17 SLICEL internal 25) ) (tile 19 17 R16C12 CENTER_SMALL 6 (primitive_site RLL_X13Y9 RESERVED_LL internal 8) (primitive_site VCC_X14Y9 VCC internal 1) (primitive_site SLICE_X22Y16 SLICEM internal 32) (primitive_site SLICE_X22Y17 SLICEM internal 32) (primitive_site SLICE_X23Y16 SLICEL internal 25) (primitive_site SLICE_X23Y17 SLICEL internal 25) ) (tile 19 18 R16C13 CENTER_SMALL 6 (primitive_site RLL_X14Y9 RESERVED_LL internal 8) (primitive_site VCC_X15Y9 VCC internal 1) (primitive_site SLICE_X24Y16 SLICEM internal 32) (primitive_site SLICE_X24Y17 SLICEM internal 32) (primitive_site SLICE_X25Y16 SLICEL internal 25) (primitive_site SLICE_X25Y17 SLICEL internal 25) ) (tile 19 19 R16C14 CENTER_SMALL 6 (primitive_site RLL_X15Y9 RESERVED_LL internal 8) (primitive_site VCC_X16Y9 VCC internal 1) (primitive_site SLICE_X26Y16 SLICEM internal 32) (primitive_site SLICE_X26Y17 SLICEM internal 32) (primitive_site SLICE_X27Y16 SLICEL internal 25) (primitive_site SLICE_X27Y17 SLICEL internal 25) ) (tile 19 20 R16C15 CENTER_SMALL 6 (primitive_site RLL_X16Y9 RESERVED_LL internal 8) (primitive_site VCC_X17Y9 VCC internal 1) (primitive_site SLICE_X28Y16 SLICEM internal 32) (primitive_site SLICE_X28Y17 SLICEM internal 32) (primitive_site SLICE_X29Y16 SLICEL internal 25) (primitive_site SLICE_X29Y17 SLICEL internal 25) ) (tile 19 21 R16C16 CENTER_SMALL 6 (primitive_site RLL_X17Y9 RESERVED_LL internal 8) (primitive_site VCC_X18Y9 VCC internal 1) (primitive_site SLICE_X30Y16 SLICEM internal 32) (primitive_site SLICE_X30Y17 SLICEM internal 32) (primitive_site SLICE_X31Y16 SLICEL internal 25) (primitive_site SLICE_X31Y17 SLICEL internal 25) ) (tile 19 22 RGCLKVR16 GCLKV 0 ) (tile 19 23 R16C17 CENTER_SMALL 6 (primitive_site RLL_X18Y9 RESERVED_LL internal 8) (primitive_site VCC_X19Y9 VCC internal 1) (primitive_site SLICE_X32Y16 SLICEM internal 32) (primitive_site SLICE_X32Y17 SLICEM internal 32) (primitive_site SLICE_X33Y16 SLICEL internal 25) (primitive_site SLICE_X33Y17 SLICEL internal 25) ) (tile 19 24 R16C18 CENTER_SMALL 6 (primitive_site RLL_X19Y9 RESERVED_LL internal 8) (primitive_site VCC_X20Y9 VCC internal 1) (primitive_site SLICE_X34Y16 SLICEM internal 32) (primitive_site SLICE_X34Y17 SLICEM internal 32) (primitive_site SLICE_X35Y16 SLICEL internal 25) (primitive_site SLICE_X35Y17 SLICEL internal 25) ) (tile 19 25 BRAMR16C2 BRAM0_SMALL 2 (primitive_site RLL_X20Y9 RESERVED_LL internal 8) (primitive_site VCC_X21Y9 VCC internal 1) ) (tile 19 26 BMR16C2 BRAMSITE 2 (primitive_site RAMB16_X1Y2 RAMB16 internal 180) (primitive_site MULT18X18_X1Y2 MULT18X18 internal 75) ) (tile 19 27 R16C19 CENTER_SMALL 6 (primitive_site RLL_X21Y9 RESERVED_LL internal 8) (primitive_site VCC_X22Y9 VCC internal 1) (primitive_site SLICE_X36Y16 SLICEM internal 32) (primitive_site SLICE_X36Y17 SLICEM internal 32) (primitive_site SLICE_X37Y16 SLICEL internal 25) (primitive_site SLICE_X37Y17 SLICEL internal 25) ) (tile 19 28 R16C20 CENTER_SMALL 6 (primitive_site RLL_X22Y9 RESERVED_LL internal 8) (primitive_site VCC_X23Y9 VCC internal 1) (primitive_site SLICE_X38Y16 SLICEM internal 32) (primitive_site SLICE_X38Y17 SLICEM internal 32) (primitive_site SLICE_X39Y16 SLICEL internal 25) (primitive_site SLICE_X39Y17 SLICEL internal 25) ) (tile 19 29 RIOIR16 RIOIS 5 (primitive_site VCC_X24Y9 VCC internal 1) (primitive_site RLL_X23Y9 RESERVED_LL internal 8) (primitive_site K13 DIFFM bonded 21) (primitive_site K14 DIFFS bonded 21) (primitive_site NOPAD26 IOB unbonded 21) ) (tile 19 30 RTERMR16 RTERM 0 ) (tile 20 0 LTERMR17 LTERM 0 ) (tile 20 1 LIOIR17 LIOIS 5 (primitive_site VCC_X0Y8 VCC internal 1) (primitive_site RLL_X0Y8 RESERVED_LL internal 8) (primitive_site K5 DIFFS bonded 21) (primitive_site K4 DIFFM bonded 21) (primitive_site NOPAD52 IOB unbonded 21) ) (tile 20 2 R17C1 CENTER_SMALL 6 (primitive_site RLL_X1Y8 RESERVED_LL internal 8) (primitive_site VCC_X1Y8 VCC internal 1) (primitive_site SLICE_X0Y14 SLICEM internal 32) (primitive_site SLICE_X0Y15 SLICEM internal 32) (primitive_site SLICE_X1Y14 SLICEL internal 25) (primitive_site SLICE_X1Y15 SLICEL internal 25) ) (tile 20 3 R17C2 CENTER_SMALL 6 (primitive_site RLL_X2Y8 RESERVED_LL internal 8) (primitive_site VCC_X2Y8 VCC internal 1) (primitive_site SLICE_X2Y14 SLICEM internal 32) (primitive_site SLICE_X2Y15 SLICEM internal 32) (primitive_site SLICE_X3Y14 SLICEL internal 25) (primitive_site SLICE_X3Y15 SLICEL internal 25) ) (tile 20 4 BRAMR17C1 BRAM3_SMALL 2 (primitive_site RLL_X3Y8 RESERVED_LL internal 8) (primitive_site VCC_X3Y8 VCC internal 1) ) (tile 20 5 BMR17C1 EMPTY64X76 0 ) (tile 20 6 R17C3 CENTER_SMALL 6 (primitive_site RLL_X4Y8 RESERVED_LL internal 8) (primitive_site VCC_X4Y8 VCC internal 1) (primitive_site SLICE_X4Y14 SLICEM internal 32) (primitive_site SLICE_X4Y15 SLICEM internal 32) (primitive_site SLICE_X5Y14 SLICEL internal 25) (primitive_site SLICE_X5Y15 SLICEL internal 25) ) (tile 20 7 R17C4 CENTER_SMALL 6 (primitive_site RLL_X5Y8 RESERVED_LL internal 8) (primitive_site VCC_X5Y8 VCC internal 1) (primitive_site SLICE_X6Y14 SLICEM internal 32) (primitive_site SLICE_X6Y15 SLICEM internal 32) (primitive_site SLICE_X7Y14 SLICEL internal 25) (primitive_site SLICE_X7Y15 SLICEL internal 25) ) (tile 20 8 LGCLKVR17 GCLKV 0 ) (tile 20 9 R17C5 CENTER_SMALL 6 (primitive_site RLL_X6Y8 RESERVED_LL internal 8) (primitive_site VCC_X6Y8 VCC internal 1) (primitive_site SLICE_X8Y14 SLICEM internal 32) (primitive_site SLICE_X8Y15 SLICEM internal 32) (primitive_site SLICE_X9Y14 SLICEL internal 25) (primitive_site SLICE_X9Y15 SLICEL internal 25) ) (tile 20 10 R17C6 CENTER_SMALL 6 (primitive_site RLL_X7Y8 RESERVED_LL internal 8) (primitive_site VCC_X7Y8 VCC internal 1) (primitive_site SLICE_X10Y14 SLICEM internal 32) (primitive_site SLICE_X10Y15 SLICEM internal 32) (primitive_site SLICE_X11Y14 SLICEL internal 25) (primitive_site SLICE_X11Y15 SLICEL internal 25) ) (tile 20 11 R17C7 CENTER_SMALL 6 (primitive_site RLL_X8Y8 RESERVED_LL internal 8) (primitive_site VCC_X8Y8 VCC internal 1) (primitive_site SLICE_X12Y14 SLICEM internal 32) (primitive_site SLICE_X12Y15 SLICEM internal 32) (primitive_site SLICE_X13Y14 SLICEL internal 25) (primitive_site SLICE_X13Y15 SLICEL internal 25) ) (tile 20 12 R17C8 CENTER_SMALL 6 (primitive_site RLL_X9Y8 RESERVED_LL internal 8) (primitive_site VCC_X9Y8 VCC internal 1) (primitive_site SLICE_X14Y14 SLICEM internal 32) (primitive_site SLICE_X14Y15 SLICEM internal 32) (primitive_site SLICE_X15Y14 SLICEL internal 25) (primitive_site SLICE_X15Y15 SLICEL internal 25) ) (tile 20 13 R17C9 CENTER_SMALL 6 (primitive_site RLL_X10Y8 RESERVED_LL internal 8) (primitive_site VCC_X10Y8 VCC internal 1) (primitive_site SLICE_X16Y14 SLICEM internal 32) (primitive_site SLICE_X16Y15 SLICEM internal 32) (primitive_site SLICE_X17Y14 SLICEL internal 25) (primitive_site SLICE_X17Y15 SLICEL internal 25) ) (tile 20 14 R17C10 CENTER_SMALL 6 (primitive_site RLL_X11Y8 RESERVED_LL internal 8) (primitive_site VCC_X11Y8 VCC internal 1) (primitive_site SLICE_X18Y14 SLICEM internal 32) (primitive_site SLICE_X18Y15 SLICEM internal 32) (primitive_site SLICE_X19Y14 SLICEL internal 25) (primitive_site SLICE_X19Y15 SLICEL internal 25) ) (tile 20 15 VMR17 CLKV 0 ) (tile 20 16 R17C11 CENTER_SMALL 6 (primitive_site RLL_X12Y8 RESERVED_LL internal 8) (primitive_site VCC_X13Y8 VCC internal 1) (primitive_site SLICE_X20Y14 SLICEM internal 32) (primitive_site SLICE_X20Y15 SLICEM internal 32) (primitive_site SLICE_X21Y14 SLICEL internal 25) (primitive_site SLICE_X21Y15 SLICEL internal 25) ) (tile 20 17 R17C12 CENTER_SMALL 6 (primitive_site RLL_X13Y8 RESERVED_LL internal 8) (primitive_site VCC_X14Y8 VCC internal 1) (primitive_site SLICE_X22Y14 SLICEM internal 32) (primitive_site SLICE_X22Y15 SLICEM internal 32) (primitive_site SLICE_X23Y14 SLICEL internal 25) (primitive_site SLICE_X23Y15 SLICEL internal 25) ) (tile 20 18 R17C13 CENTER_SMALL 6 (primitive_site RLL_X14Y8 RESERVED_LL internal 8) (primitive_site VCC_X15Y8 VCC internal 1) (primitive_site SLICE_X24Y14 SLICEM internal 32) (primitive_site SLICE_X24Y15 SLICEM internal 32) (primitive_site SLICE_X25Y14 SLICEL internal 25) (primitive_site SLICE_X25Y15 SLICEL internal 25) ) (tile 20 19 R17C14 CENTER_SMALL 6 (primitive_site RLL_X15Y8 RESERVED_LL internal 8) (primitive_site VCC_X16Y8 VCC internal 1) (primitive_site SLICE_X26Y14 SLICEM internal 32) (primitive_site SLICE_X26Y15 SLICEM internal 32) (primitive_site SLICE_X27Y14 SLICEL internal 25) (primitive_site SLICE_X27Y15 SLICEL internal 25) ) (tile 20 20 R17C15 CENTER_SMALL 6 (primitive_site RLL_X16Y8 RESERVED_LL internal 8) (primitive_site VCC_X17Y8 VCC internal 1) (primitive_site SLICE_X28Y14 SLICEM internal 32) (primitive_site SLICE_X28Y15 SLICEM internal 32) (primitive_site SLICE_X29Y14 SLICEL internal 25) (primitive_site SLICE_X29Y15 SLICEL internal 25) ) (tile 20 21 R17C16 CENTER_SMALL 6 (primitive_site RLL_X17Y8 RESERVED_LL internal 8) (primitive_site VCC_X18Y8 VCC internal 1) (primitive_site SLICE_X30Y14 SLICEM internal 32) (primitive_site SLICE_X30Y15 SLICEM internal 32) (primitive_site SLICE_X31Y14 SLICEL internal 25) (primitive_site SLICE_X31Y15 SLICEL internal 25) ) (tile 20 22 RGCLKVR17 GCLKV 0 ) (tile 20 23 R17C17 CENTER_SMALL 6 (primitive_site RLL_X18Y8 RESERVED_LL internal 8) (primitive_site VCC_X19Y8 VCC internal 1) (primitive_site SLICE_X32Y14 SLICEM internal 32) (primitive_site SLICE_X32Y15 SLICEM internal 32) (primitive_site SLICE_X33Y14 SLICEL internal 25) (primitive_site SLICE_X33Y15 SLICEL internal 25) ) (tile 20 24 R17C18 CENTER_SMALL 6 (primitive_site RLL_X19Y8 RESERVED_LL internal 8) (primitive_site VCC_X20Y8 VCC internal 1) (primitive_site SLICE_X34Y14 SLICEM internal 32) (primitive_site SLICE_X34Y15 SLICEM internal 32) (primitive_site SLICE_X35Y14 SLICEL internal 25) (primitive_site SLICE_X35Y15 SLICEL internal 25) ) (tile 20 25 BRAMR17C2 BRAM3_SMALL 2 (primitive_site RLL_X20Y8 RESERVED_LL internal 8) (primitive_site VCC_X21Y8 VCC internal 1) ) (tile 20 26 BMR17C2 EMPTY64X76 0 ) (tile 20 27 R17C19 CENTER_SMALL 6 (primitive_site RLL_X21Y8 RESERVED_LL internal 8) (primitive_site VCC_X22Y8 VCC internal 1) (primitive_site SLICE_X36Y14 SLICEM internal 32) (primitive_site SLICE_X36Y15 SLICEM internal 32) (primitive_site SLICE_X37Y14 SLICEL internal 25) (primitive_site SLICE_X37Y15 SLICEL internal 25) ) (tile 20 28 R17C20 CENTER_SMALL 6 (primitive_site RLL_X22Y8 RESERVED_LL internal 8) (primitive_site VCC_X23Y8 VCC internal 1) (primitive_site SLICE_X38Y14 SLICEM internal 32) (primitive_site SLICE_X38Y15 SLICEM internal 32) (primitive_site SLICE_X39Y14 SLICEL internal 25) (primitive_site SLICE_X39Y15 SLICEL internal 25) ) (tile 20 29 RIOIR17 RIOIS 5 (primitive_site VCC_X24Y8 VCC internal 1) (primitive_site RLL_X23Y8 RESERVED_LL internal 8) (primitive_site L12 DIFFM bonded 21) (primitive_site K12 DIFFS bonded 21) (primitive_site NOPAD27 IOB unbonded 21) ) (tile 20 30 RTERMR17 RTERM 0 ) (tile 21 0 LTERMR18 LTERM 0 ) (tile 21 1 LIOIR18 LIOIS 5 (primitive_site VCC_X0Y7 VCC internal 1) (primitive_site RLL_X0Y7 RESERVED_LL internal 8) (primitive_site L3 DIFFS bonded 21) (primitive_site L2 DIFFM bonded 21) (primitive_site NOPAD51 IOB unbonded 21) ) (tile 21 2 R18C1 CENTER_SMALL 6 (primitive_site RLL_X1Y7 RESERVED_LL internal 8) (primitive_site VCC_X1Y7 VCC internal 1) (primitive_site SLICE_X0Y12 SLICEM internal 32) (primitive_site SLICE_X0Y13 SLICEM internal 32) (primitive_site SLICE_X1Y12 SLICEL internal 25) (primitive_site SLICE_X1Y13 SLICEL internal 25) ) (tile 21 3 R18C2 CENTER_SMALL 6 (primitive_site RLL_X2Y7 RESERVED_LL internal 8) (primitive_site VCC_X2Y7 VCC internal 1) (primitive_site SLICE_X2Y12 SLICEM internal 32) (primitive_site SLICE_X2Y13 SLICEM internal 32) (primitive_site SLICE_X3Y12 SLICEL internal 25) (primitive_site SLICE_X3Y13 SLICEL internal 25) ) (tile 21 4 BRAMR18C1 BRAM2_SMALL 2 (primitive_site RLL_X3Y7 RESERVED_LL internal 8) (primitive_site VCC_X3Y7 VCC internal 1) ) (tile 21 5 BMR18C1 EMPTY64X76 0 ) (tile 21 6 R18C3 CENTER_SMALL 6 (primitive_site RLL_X4Y7 RESERVED_LL internal 8) (primitive_site VCC_X4Y7 VCC internal 1) (primitive_site SLICE_X4Y12 SLICEM internal 32) (primitive_site SLICE_X4Y13 SLICEM internal 32) (primitive_site SLICE_X5Y12 SLICEL internal 25) (primitive_site SLICE_X5Y13 SLICEL internal 25) ) (tile 21 7 R18C4 CENTER_SMALL 6 (primitive_site RLL_X5Y7 RESERVED_LL internal 8) (primitive_site VCC_X5Y7 VCC internal 1) (primitive_site SLICE_X6Y12 SLICEM internal 32) (primitive_site SLICE_X6Y13 SLICEM internal 32) (primitive_site SLICE_X7Y12 SLICEL internal 25) (primitive_site SLICE_X7Y13 SLICEL internal 25) ) (tile 21 8 LGCLKVR18 GCLKV 0 ) (tile 21 9 R18C5 CENTER_SMALL 6 (primitive_site RLL_X6Y7 RESERVED_LL internal 8) (primitive_site VCC_X6Y7 VCC internal 1) (primitive_site SLICE_X8Y12 SLICEM internal 32) (primitive_site SLICE_X8Y13 SLICEM internal 32) (primitive_site SLICE_X9Y12 SLICEL internal 25) (primitive_site SLICE_X9Y13 SLICEL internal 25) ) (tile 21 10 R18C6 CENTER_SMALL 6 (primitive_site RLL_X7Y7 RESERVED_LL internal 8) (primitive_site VCC_X7Y7 VCC internal 1) (primitive_site SLICE_X10Y12 SLICEM internal 32) (primitive_site SLICE_X10Y13 SLICEM internal 32) (primitive_site SLICE_X11Y12 SLICEL internal 25) (primitive_site SLICE_X11Y13 SLICEL internal 25) ) (tile 21 11 R18C7 CENTER_SMALL 6 (primitive_site RLL_X8Y7 RESERVED_LL internal 8) (primitive_site VCC_X8Y7 VCC internal 1) (primitive_site SLICE_X12Y12 SLICEM internal 32) (primitive_site SLICE_X12Y13 SLICEM internal 32) (primitive_site SLICE_X13Y12 SLICEL internal 25) (primitive_site SLICE_X13Y13 SLICEL internal 25) ) (tile 21 12 R18C8 CENTER_SMALL 6 (primitive_site RLL_X9Y7 RESERVED_LL internal 8) (primitive_site VCC_X9Y7 VCC internal 1) (primitive_site SLICE_X14Y12 SLICEM internal 32) (primitive_site SLICE_X14Y13 SLICEM internal 32) (primitive_site SLICE_X15Y12 SLICEL internal 25) (primitive_site SLICE_X15Y13 SLICEL internal 25) ) (tile 21 13 R18C9 CENTER_SMALL 6 (primitive_site RLL_X10Y7 RESERVED_LL internal 8) (primitive_site VCC_X10Y7 VCC internal 1) (primitive_site SLICE_X16Y12 SLICEM internal 32) (primitive_site SLICE_X16Y13 SLICEM internal 32) (primitive_site SLICE_X17Y12 SLICEL internal 25) (primitive_site SLICE_X17Y13 SLICEL internal 25) ) (tile 21 14 R18C10 CENTER_SMALL 6 (primitive_site RLL_X11Y7 RESERVED_LL internal 8) (primitive_site VCC_X11Y7 VCC internal 1) (primitive_site SLICE_X18Y12 SLICEM internal 32) (primitive_site SLICE_X18Y13 SLICEM internal 32) (primitive_site SLICE_X19Y12 SLICEL internal 25) (primitive_site SLICE_X19Y13 SLICEL internal 25) ) (tile 21 15 VMR18 CLKV 0 ) (tile 21 16 R18C11 CENTER_SMALL 6 (primitive_site RLL_X12Y7 RESERVED_LL internal 8) (primitive_site VCC_X13Y7 VCC internal 1) (primitive_site SLICE_X20Y12 SLICEM internal 32) (primitive_site SLICE_X20Y13 SLICEM internal 32) (primitive_site SLICE_X21Y12 SLICEL internal 25) (primitive_site SLICE_X21Y13 SLICEL internal 25) ) (tile 21 17 R18C12 CENTER_SMALL 6 (primitive_site RLL_X13Y7 RESERVED_LL internal 8) (primitive_site VCC_X14Y7 VCC internal 1) (primitive_site SLICE_X22Y12 SLICEM internal 32) (primitive_site SLICE_X22Y13 SLICEM internal 32) (primitive_site SLICE_X23Y12 SLICEL internal 25) (primitive_site SLICE_X23Y13 SLICEL internal 25) ) (tile 21 18 R18C13 CENTER_SMALL 6 (primitive_site RLL_X14Y7 RESERVED_LL internal 8) (primitive_site VCC_X15Y7 VCC internal 1) (primitive_site SLICE_X24Y12 SLICEM internal 32) (primitive_site SLICE_X24Y13 SLICEM internal 32) (primitive_site SLICE_X25Y12 SLICEL internal 25) (primitive_site SLICE_X25Y13 SLICEL internal 25) ) (tile 21 19 R18C14 CENTER_SMALL 6 (primitive_site RLL_X15Y7 RESERVED_LL internal 8) (primitive_site VCC_X16Y7 VCC internal 1) (primitive_site SLICE_X26Y12 SLICEM internal 32) (primitive_site SLICE_X26Y13 SLICEM internal 32) (primitive_site SLICE_X27Y12 SLICEL internal 25) (primitive_site SLICE_X27Y13 SLICEL internal 25) ) (tile 21 20 R18C15 CENTER_SMALL 6 (primitive_site RLL_X16Y7 RESERVED_LL internal 8) (primitive_site VCC_X17Y7 VCC internal 1) (primitive_site SLICE_X28Y12 SLICEM internal 32) (primitive_site SLICE_X28Y13 SLICEM internal 32) (primitive_site SLICE_X29Y12 SLICEL internal 25) (primitive_site SLICE_X29Y13 SLICEL internal 25) ) (tile 21 21 R18C16 CENTER_SMALL 6 (primitive_site RLL_X17Y7 RESERVED_LL internal 8) (primitive_site VCC_X18Y7 VCC internal 1) (primitive_site SLICE_X30Y12 SLICEM internal 32) (primitive_site SLICE_X30Y13 SLICEM internal 32) (primitive_site SLICE_X31Y12 SLICEL internal 25) (primitive_site SLICE_X31Y13 SLICEL internal 25) ) (tile 21 22 RGCLKVR18 GCLKV 0 ) (tile 21 23 R18C17 CENTER_SMALL 6 (primitive_site RLL_X18Y7 RESERVED_LL internal 8) (primitive_site VCC_X19Y7 VCC internal 1) (primitive_site SLICE_X32Y12 SLICEM internal 32) (primitive_site SLICE_X32Y13 SLICEM internal 32) (primitive_site SLICE_X33Y12 SLICEL internal 25) (primitive_site SLICE_X33Y13 SLICEL internal 25) ) (tile 21 24 R18C18 CENTER_SMALL 6 (primitive_site RLL_X19Y7 RESERVED_LL internal 8) (primitive_site VCC_X20Y7 VCC internal 1) (primitive_site SLICE_X34Y12 SLICEM internal 32) (primitive_site SLICE_X34Y13 SLICEM internal 32) (primitive_site SLICE_X35Y12 SLICEL internal 25) (primitive_site SLICE_X35Y13 SLICEL internal 25) ) (tile 21 25 BRAMR18C2 BRAM2_SMALL 2 (primitive_site RLL_X20Y7 RESERVED_LL internal 8) (primitive_site VCC_X21Y7 VCC internal 1) ) (tile 21 26 BMR18C2 EMPTY64X76 0 ) (tile 21 27 R18C19 CENTER_SMALL 6 (primitive_site RLL_X21Y7 RESERVED_LL internal 8) (primitive_site VCC_X22Y7 VCC internal 1) (primitive_site SLICE_X36Y12 SLICEM internal 32) (primitive_site SLICE_X36Y13 SLICEM internal 32) (primitive_site SLICE_X37Y12 SLICEL internal 25) (primitive_site SLICE_X37Y13 SLICEL internal 25) ) (tile 21 28 R18C20 CENTER_SMALL 6 (primitive_site RLL_X22Y7 RESERVED_LL internal 8) (primitive_site VCC_X23Y7 VCC internal 1) (primitive_site SLICE_X38Y12 SLICEM internal 32) (primitive_site SLICE_X38Y13 SLICEM internal 32) (primitive_site SLICE_X39Y12 SLICEL internal 25) (primitive_site SLICE_X39Y13 SLICEL internal 25) ) (tile 21 29 RIOIR18 RIOIS 5 (primitive_site VCC_X24Y7 VCC internal 1) (primitive_site RLL_X23Y7 RESERVED_LL internal 8) (primitive_site L14 DIFFM bonded 21) (primitive_site L15 DIFFS bonded 21) (primitive_site NOPAD28 IOB unbonded 21) ) (tile 21 30 RTERMR18 RTERM 0 ) (tile 22 0 LTERMR19 LTERM 0 ) (tile 22 1 LIOIR19 LIOIS 5 (primitive_site VCC_X0Y6 VCC internal 1) (primitive_site RLL_X0Y6 RESERVED_LL internal 8) (primitive_site L5 DIFFS bonded 21) (primitive_site L4 DIFFM bonded 21) (primitive_site NOPAD50 IOB unbonded 21) ) (tile 22 2 R19C1 CENTER_SMALL 6 (primitive_site RLL_X1Y6 RESERVED_LL internal 8) (primitive_site VCC_X1Y6 VCC internal 1) (primitive_site SLICE_X0Y10 SLICEM internal 32) (primitive_site SLICE_X0Y11 SLICEM internal 32) (primitive_site SLICE_X1Y10 SLICEL internal 25) (primitive_site SLICE_X1Y11 SLICEL internal 25) ) (tile 22 3 R19C2 CENTER_SMALL 6 (primitive_site RLL_X2Y6 RESERVED_LL internal 8) (primitive_site VCC_X2Y6 VCC internal 1) (primitive_site SLICE_X2Y10 SLICEM internal 32) (primitive_site SLICE_X2Y11 SLICEM internal 32) (primitive_site SLICE_X3Y10 SLICEL internal 25) (primitive_site SLICE_X3Y11 SLICEL internal 25) ) (tile 22 4 BRAMR19C1 BRAM1_SMALL 2 (primitive_site RLL_X3Y6 RESERVED_LL internal 8) (primitive_site VCC_X3Y6 VCC internal 1) ) (tile 22 5 BMR19C1 EMPTY64X76 0 ) (tile 22 6 R19C3 CENTER_SMALL 6 (primitive_site RLL_X4Y6 RESERVED_LL internal 8) (primitive_site VCC_X4Y6 VCC internal 1) (primitive_site SLICE_X4Y10 SLICEM internal 32) (primitive_site SLICE_X4Y11 SLICEM internal 32) (primitive_site SLICE_X5Y10 SLICEL internal 25) (primitive_site SLICE_X5Y11 SLICEL internal 25) ) (tile 22 7 R19C4 CENTER_SMALL 6 (primitive_site RLL_X5Y6 RESERVED_LL internal 8) (primitive_site VCC_X5Y6 VCC internal 1) (primitive_site SLICE_X6Y10 SLICEM internal 32) (primitive_site SLICE_X6Y11 SLICEM internal 32) (primitive_site SLICE_X7Y10 SLICEL internal 25) (primitive_site SLICE_X7Y11 SLICEL internal 25) ) (tile 22 8 LGCLKVR19 GCLKV 0 ) (tile 22 9 R19C5 CENTER_SMALL 6 (primitive_site RLL_X6Y6 RESERVED_LL internal 8) (primitive_site VCC_X6Y6 VCC internal 1) (primitive_site SLICE_X8Y10 SLICEM internal 32) (primitive_site SLICE_X8Y11 SLICEM internal 32) (primitive_site SLICE_X9Y10 SLICEL internal 25) (primitive_site SLICE_X9Y11 SLICEL internal 25) ) (tile 22 10 R19C6 CENTER_SMALL 6 (primitive_site RLL_X7Y6 RESERVED_LL internal 8) (primitive_site VCC_X7Y6 VCC internal 1) (primitive_site SLICE_X10Y10 SLICEM internal 32) (primitive_site SLICE_X10Y11 SLICEM internal 32) (primitive_site SLICE_X11Y10 SLICEL internal 25) (primitive_site SLICE_X11Y11 SLICEL internal 25) ) (tile 22 11 R19C7 CENTER_SMALL 6 (primitive_site RLL_X8Y6 RESERVED_LL internal 8) (primitive_site VCC_X8Y6 VCC internal 1) (primitive_site SLICE_X12Y10 SLICEM internal 32) (primitive_site SLICE_X12Y11 SLICEM internal 32) (primitive_site SLICE_X13Y10 SLICEL internal 25) (primitive_site SLICE_X13Y11 SLICEL internal 25) ) (tile 22 12 R19C8 CENTER_SMALL 6 (primitive_site RLL_X9Y6 RESERVED_LL internal 8) (primitive_site VCC_X9Y6 VCC internal 1) (primitive_site SLICE_X14Y10 SLICEM internal 32) (primitive_site SLICE_X14Y11 SLICEM internal 32) (primitive_site SLICE_X15Y10 SLICEL internal 25) (primitive_site SLICE_X15Y11 SLICEL internal 25) ) (tile 22 13 R19C9 CENTER_SMALL 6 (primitive_site RLL_X10Y6 RESERVED_LL internal 8) (primitive_site VCC_X10Y6 VCC internal 1) (primitive_site SLICE_X16Y10 SLICEM internal 32) (primitive_site SLICE_X16Y11 SLICEM internal 32) (primitive_site SLICE_X17Y10 SLICEL internal 25) (primitive_site SLICE_X17Y11 SLICEL internal 25) ) (tile 22 14 R19C10 CENTER_SMALL 6 (primitive_site RLL_X11Y6 RESERVED_LL internal 8) (primitive_site VCC_X11Y6 VCC internal 1) (primitive_site SLICE_X18Y10 SLICEM internal 32) (primitive_site SLICE_X18Y11 SLICEM internal 32) (primitive_site SLICE_X19Y10 SLICEL internal 25) (primitive_site SLICE_X19Y11 SLICEL internal 25) ) (tile 22 15 VMR19 CLKV 0 ) (tile 22 16 R19C11 CENTER_SMALL 6 (primitive_site RLL_X12Y6 RESERVED_LL internal 8) (primitive_site VCC_X13Y6 VCC internal 1) (primitive_site SLICE_X20Y10 SLICEM internal 32) (primitive_site SLICE_X20Y11 SLICEM internal 32) (primitive_site SLICE_X21Y10 SLICEL internal 25) (primitive_site SLICE_X21Y11 SLICEL internal 25) ) (tile 22 17 R19C12 CENTER_SMALL 6 (primitive_site RLL_X13Y6 RESERVED_LL internal 8) (primitive_site VCC_X14Y6 VCC internal 1) (primitive_site SLICE_X22Y10 SLICEM internal 32) (primitive_site SLICE_X22Y11 SLICEM internal 32) (primitive_site SLICE_X23Y10 SLICEL internal 25) (primitive_site SLICE_X23Y11 SLICEL internal 25) ) (tile 22 18 R19C13 CENTER_SMALL 6 (primitive_site RLL_X14Y6 RESERVED_LL internal 8) (primitive_site VCC_X15Y6 VCC internal 1) (primitive_site SLICE_X24Y10 SLICEM internal 32) (primitive_site SLICE_X24Y11 SLICEM internal 32) (primitive_site SLICE_X25Y10 SLICEL internal 25) (primitive_site SLICE_X25Y11 SLICEL internal 25) ) (tile 22 19 R19C14 CENTER_SMALL 6 (primitive_site RLL_X15Y6 RESERVED_LL internal 8) (primitive_site VCC_X16Y6 VCC internal 1) (primitive_site SLICE_X26Y10 SLICEM internal 32) (primitive_site SLICE_X26Y11 SLICEM internal 32) (primitive_site SLICE_X27Y10 SLICEL internal 25) (primitive_site SLICE_X27Y11 SLICEL internal 25) ) (tile 22 20 R19C15 CENTER_SMALL 6 (primitive_site RLL_X16Y6 RESERVED_LL internal 8) (primitive_site VCC_X17Y6 VCC internal 1) (primitive_site SLICE_X28Y10 SLICEM internal 32) (primitive_site SLICE_X28Y11 SLICEM internal 32) (primitive_site SLICE_X29Y10 SLICEL internal 25) (primitive_site SLICE_X29Y11 SLICEL internal 25) ) (tile 22 21 R19C16 CENTER_SMALL 6 (primitive_site RLL_X17Y6 RESERVED_LL internal 8) (primitive_site VCC_X18Y6 VCC internal 1) (primitive_site SLICE_X30Y10 SLICEM internal 32) (primitive_site SLICE_X30Y11 SLICEM internal 32) (primitive_site SLICE_X31Y10 SLICEL internal 25) (primitive_site SLICE_X31Y11 SLICEL internal 25) ) (tile 22 22 RGCLKVR19 GCLKV 0 ) (tile 22 23 R19C17 CENTER_SMALL 6 (primitive_site RLL_X18Y6 RESERVED_LL internal 8) (primitive_site VCC_X19Y6 VCC internal 1) (primitive_site SLICE_X32Y10 SLICEM internal 32) (primitive_site SLICE_X32Y11 SLICEM internal 32) (primitive_site SLICE_X33Y10 SLICEL internal 25) (primitive_site SLICE_X33Y11 SLICEL internal 25) ) (tile 22 24 R19C18 CENTER_SMALL 6 (primitive_site RLL_X19Y6 RESERVED_LL internal 8) (primitive_site VCC_X20Y6 VCC internal 1) (primitive_site SLICE_X34Y10 SLICEM internal 32) (primitive_site SLICE_X34Y11 SLICEM internal 32) (primitive_site SLICE_X35Y10 SLICEL internal 25) (primitive_site SLICE_X35Y11 SLICEL internal 25) ) (tile 22 25 BRAMR19C2 BRAM1_SMALL 2 (primitive_site RLL_X20Y6 RESERVED_LL internal 8) (primitive_site VCC_X21Y6 VCC internal 1) ) (tile 22 26 BMR19C2 EMPTY64X76 0 ) (tile 22 27 R19C19 CENTER_SMALL 6 (primitive_site RLL_X21Y6 RESERVED_LL internal 8) (primitive_site VCC_X22Y6 VCC internal 1) (primitive_site SLICE_X36Y10 SLICEM internal 32) (primitive_site SLICE_X36Y11 SLICEM internal 32) (primitive_site SLICE_X37Y10 SLICEL internal 25) (primitive_site SLICE_X37Y11 SLICEL internal 25) ) (tile 22 28 R19C20 CENTER_SMALL 6 (primitive_site RLL_X22Y6 RESERVED_LL internal 8) (primitive_site VCC_X23Y6 VCC internal 1) (primitive_site SLICE_X38Y10 SLICEM internal 32) (primitive_site SLICE_X38Y11 SLICEM internal 32) (primitive_site SLICE_X39Y10 SLICEL internal 25) (primitive_site SLICE_X39Y11 SLICEL internal 25) ) (tile 22 29 RIOIR19 RIOIS 5 (primitive_site VCC_X24Y6 VCC internal 1) (primitive_site RLL_X23Y6 RESERVED_LL internal 8) (primitive_site M13 DIFFM bonded 21) (primitive_site L13 DIFFS bonded 21) (primitive_site NOPAD29 IOB unbonded 21) ) (tile 22 30 RTERMR19 RTERM 0 ) (tile 23 0 LTERMR20 LTERM 0 ) (tile 23 1 LIOIR20 LIOIS 5 (primitive_site VCC_X0Y5 VCC internal 1) (primitive_site RLL_X0Y5 RESERVED_LL internal 8) (primitive_site M2 DIFFS bonded 21) (primitive_site M1 DIFFM bonded 21) (primitive_site NOPAD49 IOB unbonded 21) ) (tile 23 2 R20C1 CENTER_SMALL 6 (primitive_site RLL_X1Y5 RESERVED_LL internal 8) (primitive_site VCC_X1Y5 VCC internal 1) (primitive_site SLICE_X0Y8 SLICEM internal 32) (primitive_site SLICE_X0Y9 SLICEM internal 32) (primitive_site SLICE_X1Y8 SLICEL internal 25) (primitive_site SLICE_X1Y9 SLICEL internal 25) ) (tile 23 3 R20C2 CENTER_SMALL 6 (primitive_site RLL_X2Y5 RESERVED_LL internal 8) (primitive_site VCC_X2Y5 VCC internal 1) (primitive_site SLICE_X2Y8 SLICEM internal 32) (primitive_site SLICE_X2Y9 SLICEM internal 32) (primitive_site SLICE_X3Y8 SLICEL internal 25) (primitive_site SLICE_X3Y9 SLICEL internal 25) ) (tile 23 4 BRAMR20C1 BRAM0_SMALL 2 (primitive_site RLL_X3Y5 RESERVED_LL internal 8) (primitive_site VCC_X3Y5 VCC internal 1) ) (tile 23 5 BMR20C1 BRAMSITE 2 (primitive_site RAMB16_X0Y1 RAMB16 internal 180) (primitive_site MULT18X18_X0Y1 MULT18X18 internal 75) ) (tile 23 6 R20C3 CENTER_SMALL 6 (primitive_site RLL_X4Y5 RESERVED_LL internal 8) (primitive_site VCC_X4Y5 VCC internal 1) (primitive_site SLICE_X4Y8 SLICEM internal 32) (primitive_site SLICE_X4Y9 SLICEM internal 32) (primitive_site SLICE_X5Y8 SLICEL internal 25) (primitive_site SLICE_X5Y9 SLICEL internal 25) ) (tile 23 7 R20C4 CENTER_SMALL 6 (primitive_site RLL_X5Y5 RESERVED_LL internal 8) (primitive_site VCC_X5Y5 VCC internal 1) (primitive_site SLICE_X6Y8 SLICEM internal 32) (primitive_site SLICE_X6Y9 SLICEM internal 32) (primitive_site SLICE_X7Y8 SLICEL internal 25) (primitive_site SLICE_X7Y9 SLICEL internal 25) ) (tile 23 8 LGCLKVR20 GCLKV 0 ) (tile 23 9 R20C5 CENTER_SMALL 6 (primitive_site RLL_X6Y5 RESERVED_LL internal 8) (primitive_site VCC_X6Y5 VCC internal 1) (primitive_site SLICE_X8Y8 SLICEM internal 32) (primitive_site SLICE_X8Y9 SLICEM internal 32) (primitive_site SLICE_X9Y8 SLICEL internal 25) (primitive_site SLICE_X9Y9 SLICEL internal 25) ) (tile 23 10 R20C6 CENTER_SMALL 6 (primitive_site RLL_X7Y5 RESERVED_LL internal 8) (primitive_site VCC_X7Y5 VCC internal 1) (primitive_site SLICE_X10Y8 SLICEM internal 32) (primitive_site SLICE_X10Y9 SLICEM internal 32) (primitive_site SLICE_X11Y8 SLICEL internal 25) (primitive_site SLICE_X11Y9 SLICEL internal 25) ) (tile 23 11 R20C7 CENTER_SMALL 6 (primitive_site RLL_X8Y5 RESERVED_LL internal 8) (primitive_site VCC_X8Y5 VCC internal 1) (primitive_site SLICE_X12Y8 SLICEM internal 32) (primitive_site SLICE_X12Y9 SLICEM internal 32) (primitive_site SLICE_X13Y8 SLICEL internal 25) (primitive_site SLICE_X13Y9 SLICEL internal 25) ) (tile 23 12 R20C8 CENTER_SMALL 6 (primitive_site RLL_X9Y5 RESERVED_LL internal 8) (primitive_site VCC_X9Y5 VCC internal 1) (primitive_site SLICE_X14Y8 SLICEM internal 32) (primitive_site SLICE_X14Y9 SLICEM internal 32) (primitive_site SLICE_X15Y8 SLICEL internal 25) (primitive_site SLICE_X15Y9 SLICEL internal 25) ) (tile 23 13 R20C9 CENTER_SMALL 6 (primitive_site RLL_X10Y5 RESERVED_LL internal 8) (primitive_site VCC_X10Y5 VCC internal 1) (primitive_site SLICE_X16Y8 SLICEM internal 32) (primitive_site SLICE_X16Y9 SLICEM internal 32) (primitive_site SLICE_X17Y8 SLICEL internal 25) (primitive_site SLICE_X17Y9 SLICEL internal 25) ) (tile 23 14 R20C10 CENTER_SMALL 6 (primitive_site RLL_X11Y5 RESERVED_LL internal 8) (primitive_site VCC_X11Y5 VCC internal 1) (primitive_site SLICE_X18Y8 SLICEM internal 32) (primitive_site SLICE_X18Y9 SLICEM internal 32) (primitive_site SLICE_X19Y8 SLICEL internal 25) (primitive_site SLICE_X19Y9 SLICEL internal 25) ) (tile 23 15 VMR20 CLKV 0 ) (tile 23 16 R20C11 CENTER_SMALL 6 (primitive_site RLL_X12Y5 RESERVED_LL internal 8) (primitive_site VCC_X13Y5 VCC internal 1) (primitive_site SLICE_X20Y8 SLICEM internal 32) (primitive_site SLICE_X20Y9 SLICEM internal 32) (primitive_site SLICE_X21Y8 SLICEL internal 25) (primitive_site SLICE_X21Y9 SLICEL internal 25) ) (tile 23 17 R20C12 CENTER_SMALL 6 (primitive_site RLL_X13Y5 RESERVED_LL internal 8) (primitive_site VCC_X14Y5 VCC internal 1) (primitive_site SLICE_X22Y8 SLICEM internal 32) (primitive_site SLICE_X22Y9 SLICEM internal 32) (primitive_site SLICE_X23Y8 SLICEL internal 25) (primitive_site SLICE_X23Y9 SLICEL internal 25) ) (tile 23 18 R20C13 CENTER_SMALL 6 (primitive_site RLL_X14Y5 RESERVED_LL internal 8) (primitive_site VCC_X15Y5 VCC internal 1) (primitive_site SLICE_X24Y8 SLICEM internal 32) (primitive_site SLICE_X24Y9 SLICEM internal 32) (primitive_site SLICE_X25Y8 SLICEL internal 25) (primitive_site SLICE_X25Y9 SLICEL internal 25) ) (tile 23 19 R20C14 CENTER_SMALL 6 (primitive_site RLL_X15Y5 RESERVED_LL internal 8) (primitive_site VCC_X16Y5 VCC internal 1) (primitive_site SLICE_X26Y8 SLICEM internal 32) (primitive_site SLICE_X26Y9 SLICEM internal 32) (primitive_site SLICE_X27Y8 SLICEL internal 25) (primitive_site SLICE_X27Y9 SLICEL internal 25) ) (tile 23 20 R20C15 CENTER_SMALL 6 (primitive_site RLL_X16Y5 RESERVED_LL internal 8) (primitive_site VCC_X17Y5 VCC internal 1) (primitive_site SLICE_X28Y8 SLICEM internal 32) (primitive_site SLICE_X28Y9 SLICEM internal 32) (primitive_site SLICE_X29Y8 SLICEL internal 25) (primitive_site SLICE_X29Y9 SLICEL internal 25) ) (tile 23 21 R20C16 CENTER_SMALL 6 (primitive_site RLL_X17Y5 RESERVED_LL internal 8) (primitive_site VCC_X18Y5 VCC internal 1) (primitive_site SLICE_X30Y8 SLICEM internal 32) (primitive_site SLICE_X30Y9 SLICEM internal 32) (primitive_site SLICE_X31Y8 SLICEL internal 25) (primitive_site SLICE_X31Y9 SLICEL internal 25) ) (tile 23 22 RGCLKVR20 GCLKV 0 ) (tile 23 23 R20C17 CENTER_SMALL 6 (primitive_site RLL_X18Y5 RESERVED_LL internal 8) (primitive_site VCC_X19Y5 VCC internal 1) (primitive_site SLICE_X32Y8 SLICEM internal 32) (primitive_site SLICE_X32Y9 SLICEM internal 32) (primitive_site SLICE_X33Y8 SLICEL internal 25) (primitive_site SLICE_X33Y9 SLICEL internal 25) ) (tile 23 24 R20C18 CENTER_SMALL 6 (primitive_site RLL_X19Y5 RESERVED_LL internal 8) (primitive_site VCC_X20Y5 VCC internal 1) (primitive_site SLICE_X34Y8 SLICEM internal 32) (primitive_site SLICE_X34Y9 SLICEM internal 32) (primitive_site SLICE_X35Y8 SLICEL internal 25) (primitive_site SLICE_X35Y9 SLICEL internal 25) ) (tile 23 25 BRAMR20C2 BRAM0_SMALL 2 (primitive_site RLL_X20Y5 RESERVED_LL internal 8) (primitive_site VCC_X21Y5 VCC internal 1) ) (tile 23 26 BMR20C2 BRAMSITE 2 (primitive_site RAMB16_X1Y1 RAMB16 internal 180) (primitive_site MULT18X18_X1Y1 MULT18X18 internal 75) ) (tile 23 27 R20C19 CENTER_SMALL 6 (primitive_site RLL_X21Y5 RESERVED_LL internal 8) (primitive_site VCC_X22Y5 VCC internal 1) (primitive_site SLICE_X36Y8 SLICEM internal 32) (primitive_site SLICE_X36Y9 SLICEM internal 32) (primitive_site SLICE_X37Y8 SLICEL internal 25) (primitive_site SLICE_X37Y9 SLICEL internal 25) ) (tile 23 28 R20C20 CENTER_SMALL 6 (primitive_site RLL_X22Y5 RESERVED_LL internal 8) (primitive_site VCC_X23Y5 VCC internal 1) (primitive_site SLICE_X38Y8 SLICEM internal 32) (primitive_site SLICE_X38Y9 SLICEM internal 32) (primitive_site SLICE_X39Y8 SLICEL internal 25) (primitive_site SLICE_X39Y9 SLICEL internal 25) ) (tile 23 29 RIOIR20 RIOIS 5 (primitive_site VCC_X24Y5 VCC internal 1) (primitive_site RLL_X23Y5 RESERVED_LL internal 8) (primitive_site M15 DIFFM bonded 21) (primitive_site M16 DIFFS bonded 21) (primitive_site NOPAD30 IOB unbonded 21) ) (tile 23 30 RTERMR20 RTERM 0 ) (tile 24 0 GCLKHLR1TERMCLKH EMPTY0X2 0 ) (tile 24 1 GCLKHR2C0 GCLKH 1 (primitive_site GSIG_X0Y0 GLOBALSIG internal 0) ) (tile 24 2 GCLKHR2C1 GCLKH 1 (primitive_site GSIG_X1Y0 GLOBALSIG internal 0) ) (tile 24 3 GCLKHR2C2 GCLKH 1 (primitive_site GSIG_X2Y0 GLOBALSIG internal 0) ) (tile 24 4 GCLKHR2BRAMC1 GCLKH 1 (primitive_site GSIG_X3Y0 GLOBALSIG internal 0) ) (tile 24 5 BMGCLKHR2BSC1 BRAMSITE_GCLKH 0 ) (tile 24 6 GCLKHR2C3 GCLKH 1 (primitive_site GSIG_X4Y0 GLOBALSIG internal 0) ) (tile 24 7 GCLKHR2C4 GCLKH 1 (primitive_site GSIG_X5Y0 GLOBALSIG internal 0) ) (tile 24 8 LCLKVCR2 GCLKVC 0 ) (tile 24 9 GCLKHR2C5 GCLKH 1 (primitive_site GSIG_X6Y0 GLOBALSIG internal 0) ) (tile 24 10 GCLKHR2C6 GCLKH 1 (primitive_site GSIG_X7Y0 GLOBALSIG internal 0) ) (tile 24 11 GCLKHR2C7 GCLKH 1 (primitive_site GSIG_X8Y0 GLOBALSIG internal 0) ) (tile 24 12 GCLKHR2C8 GCLKH 1 (primitive_site GSIG_X9Y0 GLOBALSIG internal 0) ) (tile 24 13 GCLKHR2C9 GCLKH 1 (primitive_site GSIG_X10Y0 GLOBALSIG internal 0) ) (tile 24 14 GCLKHR2C10 GCLKH 1 (primitive_site GSIG_X11Y0 GLOBALSIG internal 0) ) (tile 24 15 CLKVCR2 CLKVC 0 ) (tile 24 16 GCLKHR2C11 GCLKH 1 (primitive_site GSIG_X13Y0 GLOBALSIG internal 0) ) (tile 24 17 GCLKHR2C12 GCLKH 1 (primitive_site GSIG_X14Y0 GLOBALSIG internal 0) ) (tile 24 18 GCLKHR2C13 GCLKH 1 (primitive_site GSIG_X15Y0 GLOBALSIG internal 0) ) (tile 24 19 GCLKHR2C14 GCLKH 1 (primitive_site GSIG_X16Y0 GLOBALSIG internal 0) ) (tile 24 20 GCLKHR2C15 GCLKH 1 (primitive_site GSIG_X17Y0 GLOBALSIG internal 0) ) (tile 24 21 GCLKHR2C16 GCLKH 1 (primitive_site GSIG_X18Y0 GLOBALSIG internal 0) ) (tile 24 22 RCLKVCR2 GCLKVC 0 ) (tile 24 23 GCLKHR2C17 GCLKH 1 (primitive_site GSIG_X19Y0 GLOBALSIG internal 0) ) (tile 24 24 GCLKHR2C18 GCLKH 1 (primitive_site GSIG_X20Y0 GLOBALSIG internal 0) ) (tile 24 25 GCLKHR2BRAMC2 GCLKH 1 (primitive_site GSIG_X21Y0 GLOBALSIG internal 0) ) (tile 24 26 BMGCLKHR2BSC2 BRAMSITE_GCLKH 0 ) (tile 24 27 GCLKHR2C19 GCLKH 1 (primitive_site GSIG_X22Y0 GLOBALSIG internal 0) ) (tile 24 28 GCLKHR2C20 GCLKH 1 (primitive_site GSIG_X23Y0 GLOBALSIG internal 0) ) (tile 24 29 GCLKHR2C21 GCLKH 1 (primitive_site GSIG_X24Y0 GLOBALSIG internal 0) ) (tile 24 30 GCLKHRR1TERM EMPTY0X2 0 ) (tile 25 0 LTERMR21 LTERM 0 ) (tile 25 1 LIOIR21 LIOIS 5 (primitive_site VCC_X0Y4 VCC internal 1) (primitive_site RLL_X0Y4 RESERVED_LL internal 8) (primitive_site M4 DIFFS bonded 21) (primitive_site M3 DIFFM bonded 21) (primitive_site NOPAD48 IOB unbonded 21) ) (tile 25 2 R21C1 CENTER_SMALL 6 (primitive_site RLL_X1Y4 RESERVED_LL internal 8) (primitive_site VCC_X1Y4 VCC internal 1) (primitive_site SLICE_X0Y6 SLICEM internal 32) (primitive_site SLICE_X0Y7 SLICEM internal 32) (primitive_site SLICE_X1Y6 SLICEL internal 25) (primitive_site SLICE_X1Y7 SLICEL internal 25) ) (tile 25 3 R21C2 CENTER_SMALL 6 (primitive_site RLL_X2Y4 RESERVED_LL internal 8) (primitive_site VCC_X2Y4 VCC internal 1) (primitive_site SLICE_X2Y6 SLICEM internal 32) (primitive_site SLICE_X2Y7 SLICEM internal 32) (primitive_site SLICE_X3Y6 SLICEL internal 25) (primitive_site SLICE_X3Y7 SLICEL internal 25) ) (tile 25 4 BRAMR21C1 BRAM3_SMALL 2 (primitive_site RLL_X3Y4 RESERVED_LL internal 8) (primitive_site VCC_X3Y4 VCC internal 1) ) (tile 25 5 BMR21C1 EMPTY64X76 0 ) (tile 25 6 R21C3 CENTER_SMALL 6 (primitive_site RLL_X4Y4 RESERVED_LL internal 8) (primitive_site VCC_X4Y4 VCC internal 1) (primitive_site SLICE_X4Y6 SLICEM internal 32) (primitive_site SLICE_X4Y7 SLICEM internal 32) (primitive_site SLICE_X5Y6 SLICEL internal 25) (primitive_site SLICE_X5Y7 SLICEL internal 25) ) (tile 25 7 R21C4 CENTER_SMALL 6 (primitive_site RLL_X5Y4 RESERVED_LL internal 8) (primitive_site VCC_X5Y4 VCC internal 1) (primitive_site SLICE_X6Y6 SLICEM internal 32) (primitive_site SLICE_X6Y7 SLICEM internal 32) (primitive_site SLICE_X7Y6 SLICEL internal 25) (primitive_site SLICE_X7Y7 SLICEL internal 25) ) (tile 25 8 LGCLKVR21 GCLKV 0 ) (tile 25 9 R21C5 CENTER_SMALL 6 (primitive_site RLL_X6Y4 RESERVED_LL internal 8) (primitive_site VCC_X6Y4 VCC internal 1) (primitive_site SLICE_X8Y6 SLICEM internal 32) (primitive_site SLICE_X8Y7 SLICEM internal 32) (primitive_site SLICE_X9Y6 SLICEL internal 25) (primitive_site SLICE_X9Y7 SLICEL internal 25) ) (tile 25 10 R21C6 CENTER_SMALL 6 (primitive_site RLL_X7Y4 RESERVED_LL internal 8) (primitive_site VCC_X7Y4 VCC internal 1) (primitive_site SLICE_X10Y6 SLICEM internal 32) (primitive_site SLICE_X10Y7 SLICEM internal 32) (primitive_site SLICE_X11Y6 SLICEL internal 25) (primitive_site SLICE_X11Y7 SLICEL internal 25) ) (tile 25 11 R21C7 CENTER_SMALL 6 (primitive_site RLL_X8Y4 RESERVED_LL internal 8) (primitive_site VCC_X8Y4 VCC internal 1) (primitive_site SLICE_X12Y6 SLICEM internal 32) (primitive_site SLICE_X12Y7 SLICEM internal 32) (primitive_site SLICE_X13Y6 SLICEL internal 25) (primitive_site SLICE_X13Y7 SLICEL internal 25) ) (tile 25 12 R21C8 CENTER_SMALL 6 (primitive_site RLL_X9Y4 RESERVED_LL internal 8) (primitive_site VCC_X9Y4 VCC internal 1) (primitive_site SLICE_X14Y6 SLICEM internal 32) (primitive_site SLICE_X14Y7 SLICEM internal 32) (primitive_site SLICE_X15Y6 SLICEL internal 25) (primitive_site SLICE_X15Y7 SLICEL internal 25) ) (tile 25 13 R21C9 CENTER_SMALL 6 (primitive_site RLL_X10Y4 RESERVED_LL internal 8) (primitive_site VCC_X10Y4 VCC internal 1) (primitive_site SLICE_X16Y6 SLICEM internal 32) (primitive_site SLICE_X16Y7 SLICEM internal 32) (primitive_site SLICE_X17Y6 SLICEL internal 25) (primitive_site SLICE_X17Y7 SLICEL internal 25) ) (tile 25 14 R21C10 CENTER_SMALL 6 (primitive_site RLL_X11Y4 RESERVED_LL internal 8) (primitive_site VCC_X11Y4 VCC internal 1) (primitive_site SLICE_X18Y6 SLICEM internal 32) (primitive_site SLICE_X18Y7 SLICEM internal 32) (primitive_site SLICE_X19Y6 SLICEL internal 25) (primitive_site SLICE_X19Y7 SLICEL internal 25) ) (tile 25 15 VMR21 CLKV 0 ) (tile 25 16 R21C11 CENTER_SMALL 6 (primitive_site RLL_X12Y4 RESERVED_LL internal 8) (primitive_site VCC_X13Y4 VCC internal 1) (primitive_site SLICE_X20Y6 SLICEM internal 32) (primitive_site SLICE_X20Y7 SLICEM internal 32) (primitive_site SLICE_X21Y6 SLICEL internal 25) (primitive_site SLICE_X21Y7 SLICEL internal 25) ) (tile 25 17 R21C12 CENTER_SMALL 6 (primitive_site RLL_X13Y4 RESERVED_LL internal 8) (primitive_site VCC_X14Y4 VCC internal 1) (primitive_site SLICE_X22Y6 SLICEM internal 32) (primitive_site SLICE_X22Y7 SLICEM internal 32) (primitive_site SLICE_X23Y6 SLICEL internal 25) (primitive_site SLICE_X23Y7 SLICEL internal 25) ) (tile 25 18 R21C13 CENTER_SMALL 6 (primitive_site RLL_X14Y4 RESERVED_LL internal 8) (primitive_site VCC_X15Y4 VCC internal 1) (primitive_site SLICE_X24Y6 SLICEM internal 32) (primitive_site SLICE_X24Y7 SLICEM internal 32) (primitive_site SLICE_X25Y6 SLICEL internal 25) (primitive_site SLICE_X25Y7 SLICEL internal 25) ) (tile 25 19 R21C14 CENTER_SMALL 6 (primitive_site RLL_X15Y4 RESERVED_LL internal 8) (primitive_site VCC_X16Y4 VCC internal 1) (primitive_site SLICE_X26Y6 SLICEM internal 32) (primitive_site SLICE_X26Y7 SLICEM internal 32) (primitive_site SLICE_X27Y6 SLICEL internal 25) (primitive_site SLICE_X27Y7 SLICEL internal 25) ) (tile 25 20 R21C15 CENTER_SMALL 6 (primitive_site RLL_X16Y4 RESERVED_LL internal 8) (primitive_site VCC_X17Y4 VCC internal 1) (primitive_site SLICE_X28Y6 SLICEM internal 32) (primitive_site SLICE_X28Y7 SLICEM internal 32) (primitive_site SLICE_X29Y6 SLICEL internal 25) (primitive_site SLICE_X29Y7 SLICEL internal 25) ) (tile 25 21 R21C16 CENTER_SMALL 6 (primitive_site RLL_X17Y4 RESERVED_LL internal 8) (primitive_site VCC_X18Y4 VCC internal 1) (primitive_site SLICE_X30Y6 SLICEM internal 32) (primitive_site SLICE_X30Y7 SLICEM internal 32) (primitive_site SLICE_X31Y6 SLICEL internal 25) (primitive_site SLICE_X31Y7 SLICEL internal 25) ) (tile 25 22 RGCLKVR21 GCLKV 0 ) (tile 25 23 R21C17 CENTER_SMALL 6 (primitive_site RLL_X18Y4 RESERVED_LL internal 8) (primitive_site VCC_X19Y4 VCC internal 1) (primitive_site SLICE_X32Y6 SLICEM internal 32) (primitive_site SLICE_X32Y7 SLICEM internal 32) (primitive_site SLICE_X33Y6 SLICEL internal 25) (primitive_site SLICE_X33Y7 SLICEL internal 25) ) (tile 25 24 R21C18 CENTER_SMALL 6 (primitive_site RLL_X19Y4 RESERVED_LL internal 8) (primitive_site VCC_X20Y4 VCC internal 1) (primitive_site SLICE_X34Y6 SLICEM internal 32) (primitive_site SLICE_X34Y7 SLICEM internal 32) (primitive_site SLICE_X35Y6 SLICEL internal 25) (primitive_site SLICE_X35Y7 SLICEL internal 25) ) (tile 25 25 BRAMR21C2 BRAM3_SMALL 2 (primitive_site RLL_X20Y4 RESERVED_LL internal 8) (primitive_site VCC_X21Y4 VCC internal 1) ) (tile 25 26 BMR21C2 EMPTY64X76 0 ) (tile 25 27 R21C19 CENTER_SMALL 6 (primitive_site RLL_X21Y4 RESERVED_LL internal 8) (primitive_site VCC_X22Y4 VCC internal 1) (primitive_site SLICE_X36Y6 SLICEM internal 32) (primitive_site SLICE_X36Y7 SLICEM internal 32) (primitive_site SLICE_X37Y6 SLICEL internal 25) (primitive_site SLICE_X37Y7 SLICEL internal 25) ) (tile 25 28 R21C20 CENTER_SMALL 6 (primitive_site RLL_X22Y4 RESERVED_LL internal 8) (primitive_site VCC_X23Y4 VCC internal 1) (primitive_site SLICE_X38Y6 SLICEM internal 32) (primitive_site SLICE_X38Y7 SLICEM internal 32) (primitive_site SLICE_X39Y6 SLICEL internal 25) (primitive_site SLICE_X39Y7 SLICEL internal 25) ) (tile 25 29 RIOIR21 RIOIS 5 (primitive_site VCC_X24Y4 VCC internal 1) (primitive_site RLL_X23Y4 RESERVED_LL internal 8) (primitive_site N14 DIFFM bonded 21) (primitive_site M14 DIFFS bonded 21) (primitive_site NOPAD31 IOB unbonded 21) ) (tile 25 30 RTERMR21 RTERM 0 ) (tile 26 0 LTERMR22 LTERM 0 ) (tile 26 1 LIOIR22 LIOIS 5 (primitive_site VCC_X0Y3 VCC internal 1) (primitive_site RLL_X0Y3 RESERVED_LL internal 8) (primitive_site N2 DIFFS bonded 21) (primitive_site N1 DIFFM bonded 21) (primitive_site NOPAD47 IOB unbonded 21) ) (tile 26 2 R22C1 CENTER_SMALL 6 (primitive_site RLL_X1Y3 RESERVED_LL internal 8) (primitive_site VCC_X1Y3 VCC internal 1) (primitive_site SLICE_X0Y4 SLICEM internal 32) (primitive_site SLICE_X0Y5 SLICEM internal 32) (primitive_site SLICE_X1Y4 SLICEL internal 25) (primitive_site SLICE_X1Y5 SLICEL internal 25) ) (tile 26 3 R22C2 CENTER_SMALL 6 (primitive_site RLL_X2Y3 RESERVED_LL internal 8) (primitive_site VCC_X2Y3 VCC internal 1) (primitive_site SLICE_X2Y4 SLICEM internal 32) (primitive_site SLICE_X2Y5 SLICEM internal 32) (primitive_site SLICE_X3Y4 SLICEL internal 25) (primitive_site SLICE_X3Y5 SLICEL internal 25) ) (tile 26 4 BRAMR22C1 BRAM2_SMALL 2 (primitive_site RLL_X3Y3 RESERVED_LL internal 8) (primitive_site VCC_X3Y3 VCC internal 1) ) (tile 26 5 BMR22C1 EMPTY64X76 0 ) (tile 26 6 R22C3 CENTER_SMALL 6 (primitive_site RLL_X4Y3 RESERVED_LL internal 8) (primitive_site VCC_X4Y3 VCC internal 1) (primitive_site SLICE_X4Y4 SLICEM internal 32) (primitive_site SLICE_X4Y5 SLICEM internal 32) (primitive_site SLICE_X5Y4 SLICEL internal 25) (primitive_site SLICE_X5Y5 SLICEL internal 25) ) (tile 26 7 R22C4 CENTER_SMALL 6 (primitive_site RLL_X5Y3 RESERVED_LL internal 8) (primitive_site VCC_X5Y3 VCC internal 1) (primitive_site SLICE_X6Y4 SLICEM internal 32) (primitive_site SLICE_X6Y5 SLICEM internal 32) (primitive_site SLICE_X7Y4 SLICEL internal 25) (primitive_site SLICE_X7Y5 SLICEL internal 25) ) (tile 26 8 LGCLKVR22 GCLKV 0 ) (tile 26 9 R22C5 CENTER_SMALL 6 (primitive_site RLL_X6Y3 RESERVED_LL internal 8) (primitive_site VCC_X6Y3 VCC internal 1) (primitive_site SLICE_X8Y4 SLICEM internal 32) (primitive_site SLICE_X8Y5 SLICEM internal 32) (primitive_site SLICE_X9Y4 SLICEL internal 25) (primitive_site SLICE_X9Y5 SLICEL internal 25) ) (tile 26 10 R22C6 CENTER_SMALL 6 (primitive_site RLL_X7Y3 RESERVED_LL internal 8) (primitive_site VCC_X7Y3 VCC internal 1) (primitive_site SLICE_X10Y4 SLICEM internal 32) (primitive_site SLICE_X10Y5 SLICEM internal 32) (primitive_site SLICE_X11Y4 SLICEL internal 25) (primitive_site SLICE_X11Y5 SLICEL internal 25) ) (tile 26 11 R22C7 CENTER_SMALL 6 (primitive_site RLL_X8Y3 RESERVED_LL internal 8) (primitive_site VCC_X8Y3 VCC internal 1) (primitive_site SLICE_X12Y4 SLICEM internal 32) (primitive_site SLICE_X12Y5 SLICEM internal 32) (primitive_site SLICE_X13Y4 SLICEL internal 25) (primitive_site SLICE_X13Y5 SLICEL internal 25) ) (tile 26 12 R22C8 CENTER_SMALL 6 (primitive_site RLL_X9Y3 RESERVED_LL internal 8) (primitive_site VCC_X9Y3 VCC internal 1) (primitive_site SLICE_X14Y4 SLICEM internal 32) (primitive_site SLICE_X14Y5 SLICEM internal 32) (primitive_site SLICE_X15Y4 SLICEL internal 25) (primitive_site SLICE_X15Y5 SLICEL internal 25) ) (tile 26 13 R22C9 CENTER_SMALL 6 (primitive_site RLL_X10Y3 RESERVED_LL internal 8) (primitive_site VCC_X10Y3 VCC internal 1) (primitive_site SLICE_X16Y4 SLICEM internal 32) (primitive_site SLICE_X16Y5 SLICEM internal 32) (primitive_site SLICE_X17Y4 SLICEL internal 25) (primitive_site SLICE_X17Y5 SLICEL internal 25) ) (tile 26 14 R22C10 CENTER_SMALL 6 (primitive_site RLL_X11Y3 RESERVED_LL internal 8) (primitive_site VCC_X11Y3 VCC internal 1) (primitive_site SLICE_X18Y4 SLICEM internal 32) (primitive_site SLICE_X18Y5 SLICEM internal 32) (primitive_site SLICE_X19Y4 SLICEL internal 25) (primitive_site SLICE_X19Y5 SLICEL internal 25) ) (tile 26 15 VMR22 CLKV 0 ) (tile 26 16 R22C11 CENTER_SMALL 6 (primitive_site RLL_X12Y3 RESERVED_LL internal 8) (primitive_site VCC_X13Y3 VCC internal 1) (primitive_site SLICE_X20Y4 SLICEM internal 32) (primitive_site SLICE_X20Y5 SLICEM internal 32) (primitive_site SLICE_X21Y4 SLICEL internal 25) (primitive_site SLICE_X21Y5 SLICEL internal 25) ) (tile 26 17 R22C12 CENTER_SMALL 6 (primitive_site RLL_X13Y3 RESERVED_LL internal 8) (primitive_site VCC_X14Y3 VCC internal 1) (primitive_site SLICE_X22Y4 SLICEM internal 32) (primitive_site SLICE_X22Y5 SLICEM internal 32) (primitive_site SLICE_X23Y4 SLICEL internal 25) (primitive_site SLICE_X23Y5 SLICEL internal 25) ) (tile 26 18 R22C13 CENTER_SMALL 6 (primitive_site RLL_X14Y3 RESERVED_LL internal 8) (primitive_site VCC_X15Y3 VCC internal 1) (primitive_site SLICE_X24Y4 SLICEM internal 32) (primitive_site SLICE_X24Y5 SLICEM internal 32) (primitive_site SLICE_X25Y4 SLICEL internal 25) (primitive_site SLICE_X25Y5 SLICEL internal 25) ) (tile 26 19 R22C14 CENTER_SMALL 6 (primitive_site RLL_X15Y3 RESERVED_LL internal 8) (primitive_site VCC_X16Y3 VCC internal 1) (primitive_site SLICE_X26Y4 SLICEM internal 32) (primitive_site SLICE_X26Y5 SLICEM internal 32) (primitive_site SLICE_X27Y4 SLICEL internal 25) (primitive_site SLICE_X27Y5 SLICEL internal 25) ) (tile 26 20 R22C15 CENTER_SMALL 6 (primitive_site RLL_X16Y3 RESERVED_LL internal 8) (primitive_site VCC_X17Y3 VCC internal 1) (primitive_site SLICE_X28Y4 SLICEM internal 32) (primitive_site SLICE_X28Y5 SLICEM internal 32) (primitive_site SLICE_X29Y4 SLICEL internal 25) (primitive_site SLICE_X29Y5 SLICEL internal 25) ) (tile 26 21 R22C16 CENTER_SMALL 6 (primitive_site RLL_X17Y3 RESERVED_LL internal 8) (primitive_site VCC_X18Y3 VCC internal 1) (primitive_site SLICE_X30Y4 SLICEM internal 32) (primitive_site SLICE_X30Y5 SLICEM internal 32) (primitive_site SLICE_X31Y4 SLICEL internal 25) (primitive_site SLICE_X31Y5 SLICEL internal 25) ) (tile 26 22 RGCLKVR22 GCLKV 0 ) (tile 26 23 R22C17 CENTER_SMALL 6 (primitive_site RLL_X18Y3 RESERVED_LL internal 8) (primitive_site VCC_X19Y3 VCC internal 1) (primitive_site SLICE_X32Y4 SLICEM internal 32) (primitive_site SLICE_X32Y5 SLICEM internal 32) (primitive_site SLICE_X33Y4 SLICEL internal 25) (primitive_site SLICE_X33Y5 SLICEL internal 25) ) (tile 26 24 R22C18 CENTER_SMALL 6 (primitive_site RLL_X19Y3 RESERVED_LL internal 8) (primitive_site VCC_X20Y3 VCC internal 1) (primitive_site SLICE_X34Y4 SLICEM internal 32) (primitive_site SLICE_X34Y5 SLICEM internal 32) (primitive_site SLICE_X35Y4 SLICEL internal 25) (primitive_site SLICE_X35Y5 SLICEL internal 25) ) (tile 26 25 BRAMR22C2 BRAM2_SMALL 2 (primitive_site RLL_X20Y3 RESERVED_LL internal 8) (primitive_site VCC_X21Y3 VCC internal 1) ) (tile 26 26 BMR22C2 EMPTY64X76 0 ) (tile 26 27 R22C19 CENTER_SMALL 6 (primitive_site RLL_X21Y3 RESERVED_LL internal 8) (primitive_site VCC_X22Y3 VCC internal 1) (primitive_site SLICE_X36Y4 SLICEM internal 32) (primitive_site SLICE_X36Y5 SLICEM internal 32) (primitive_site SLICE_X37Y4 SLICEL internal 25) (primitive_site SLICE_X37Y5 SLICEL internal 25) ) (tile 26 28 R22C20 CENTER_SMALL 6 (primitive_site RLL_X22Y3 RESERVED_LL internal 8) (primitive_site VCC_X23Y3 VCC internal 1) (primitive_site SLICE_X38Y4 SLICEM internal 32) (primitive_site SLICE_X38Y5 SLICEM internal 32) (primitive_site SLICE_X39Y4 SLICEL internal 25) (primitive_site SLICE_X39Y5 SLICEL internal 25) ) (tile 26 29 RIOIR22 RIOIS 5 (primitive_site VCC_X24Y3 VCC internal 1) (primitive_site RLL_X23Y3 RESERVED_LL internal 8) (primitive_site N15 DIFFM bonded 21) (primitive_site N16 DIFFS bonded 21) (primitive_site NOPAD32 IOB unbonded 21) ) (tile 26 30 RTERMR22 RTERM 0 ) (tile 27 0 LTERMR23 LTERM 0 ) (tile 27 1 LIOIR23 LIOIS 5 (primitive_site VCC_X0Y2 VCC internal 1) (primitive_site RLL_X0Y2 RESERVED_LL internal 8) (primitive_site P2 DIFFS bonded 21) (primitive_site N3 DIFFM bonded 21) (primitive_site NOPAD46 IOB unbonded 21) ) (tile 27 2 R23C1 CENTER_SMALL 6 (primitive_site RLL_X1Y2 RESERVED_LL internal 8) (primitive_site VCC_X1Y2 VCC internal 1) (primitive_site SLICE_X0Y2 SLICEM internal 32) (primitive_site SLICE_X0Y3 SLICEM internal 32) (primitive_site SLICE_X1Y2 SLICEL internal 25) (primitive_site SLICE_X1Y3 SLICEL internal 25) ) (tile 27 3 R23C2 CENTER_SMALL 6 (primitive_site RLL_X2Y2 RESERVED_LL internal 8) (primitive_site VCC_X2Y2 VCC internal 1) (primitive_site SLICE_X2Y2 SLICEM internal 32) (primitive_site SLICE_X2Y3 SLICEM internal 32) (primitive_site SLICE_X3Y2 SLICEL internal 25) (primitive_site SLICE_X3Y3 SLICEL internal 25) ) (tile 27 4 BRAMR23C1 BRAM1_SMALL 2 (primitive_site RLL_X3Y2 RESERVED_LL internal 8) (primitive_site VCC_X3Y2 VCC internal 1) ) (tile 27 5 BMR23C1 EMPTY64X76 0 ) (tile 27 6 R23C3 CENTER_SMALL 6 (primitive_site RLL_X4Y2 RESERVED_LL internal 8) (primitive_site VCC_X4Y2 VCC internal 1) (primitive_site SLICE_X4Y2 SLICEM internal 32) (primitive_site SLICE_X4Y3 SLICEM internal 32) (primitive_site SLICE_X5Y2 SLICEL internal 25) (primitive_site SLICE_X5Y3 SLICEL internal 25) ) (tile 27 7 R23C4 CENTER_SMALL 6 (primitive_site RLL_X5Y2 RESERVED_LL internal 8) (primitive_site VCC_X5Y2 VCC internal 1) (primitive_site SLICE_X6Y2 SLICEM internal 32) (primitive_site SLICE_X6Y3 SLICEM internal 32) (primitive_site SLICE_X7Y2 SLICEL internal 25) (primitive_site SLICE_X7Y3 SLICEL internal 25) ) (tile 27 8 LGCLKVR23 GCLKV 0 ) (tile 27 9 R23C5 CENTER_SMALL 6 (primitive_site RLL_X6Y2 RESERVED_LL internal 8) (primitive_site VCC_X6Y2 VCC internal 1) (primitive_site SLICE_X8Y2 SLICEM internal 32) (primitive_site SLICE_X8Y3 SLICEM internal 32) (primitive_site SLICE_X9Y2 SLICEL internal 25) (primitive_site SLICE_X9Y3 SLICEL internal 25) ) (tile 27 10 R23C6 CENTER_SMALL 6 (primitive_site RLL_X7Y2 RESERVED_LL internal 8) (primitive_site VCC_X7Y2 VCC internal 1) (primitive_site SLICE_X10Y2 SLICEM internal 32) (primitive_site SLICE_X10Y3 SLICEM internal 32) (primitive_site SLICE_X11Y2 SLICEL internal 25) (primitive_site SLICE_X11Y3 SLICEL internal 25) ) (tile 27 11 R23C7 CENTER_SMALL 6 (primitive_site RLL_X8Y2 RESERVED_LL internal 8) (primitive_site VCC_X8Y2 VCC internal 1) (primitive_site SLICE_X12Y2 SLICEM internal 32) (primitive_site SLICE_X12Y3 SLICEM internal 32) (primitive_site SLICE_X13Y2 SLICEL internal 25) (primitive_site SLICE_X13Y3 SLICEL internal 25) ) (tile 27 12 R23C8 CENTER_SMALL 6 (primitive_site RLL_X9Y2 RESERVED_LL internal 8) (primitive_site VCC_X9Y2 VCC internal 1) (primitive_site SLICE_X14Y2 SLICEM internal 32) (primitive_site SLICE_X14Y3 SLICEM internal 32) (primitive_site SLICE_X15Y2 SLICEL internal 25) (primitive_site SLICE_X15Y3 SLICEL internal 25) ) (tile 27 13 R23C9 CENTER_SMALL 6 (primitive_site RLL_X10Y2 RESERVED_LL internal 8) (primitive_site VCC_X10Y2 VCC internal 1) (primitive_site SLICE_X16Y2 SLICEM internal 32) (primitive_site SLICE_X16Y3 SLICEM internal 32) (primitive_site SLICE_X17Y2 SLICEL internal 25) (primitive_site SLICE_X17Y3 SLICEL internal 25) ) (tile 27 14 R23C10 CENTER_SMALL 6 (primitive_site RLL_X11Y2 RESERVED_LL internal 8) (primitive_site VCC_X11Y2 VCC internal 1) (primitive_site SLICE_X18Y2 SLICEM internal 32) (primitive_site SLICE_X18Y3 SLICEM internal 32) (primitive_site SLICE_X19Y2 SLICEL internal 25) (primitive_site SLICE_X19Y3 SLICEL internal 25) ) (tile 27 15 VMR23 CLKV 0 ) (tile 27 16 R23C11 CENTER_SMALL 6 (primitive_site RLL_X12Y2 RESERVED_LL internal 8) (primitive_site VCC_X13Y2 VCC internal 1) (primitive_site SLICE_X20Y2 SLICEM internal 32) (primitive_site SLICE_X20Y3 SLICEM internal 32) (primitive_site SLICE_X21Y2 SLICEL internal 25) (primitive_site SLICE_X21Y3 SLICEL internal 25) ) (tile 27 17 R23C12 CENTER_SMALL 6 (primitive_site RLL_X13Y2 RESERVED_LL internal 8) (primitive_site VCC_X14Y2 VCC internal 1) (primitive_site SLICE_X22Y2 SLICEM internal 32) (primitive_site SLICE_X22Y3 SLICEM internal 32) (primitive_site SLICE_X23Y2 SLICEL internal 25) (primitive_site SLICE_X23Y3 SLICEL internal 25) ) (tile 27 18 R23C13 CENTER_SMALL 6 (primitive_site RLL_X14Y2 RESERVED_LL internal 8) (primitive_site VCC_X15Y2 VCC internal 1) (primitive_site SLICE_X24Y2 SLICEM internal 32) (primitive_site SLICE_X24Y3 SLICEM internal 32) (primitive_site SLICE_X25Y2 SLICEL internal 25) (primitive_site SLICE_X25Y3 SLICEL internal 25) ) (tile 27 19 R23C14 CENTER_SMALL 6 (primitive_site RLL_X15Y2 RESERVED_LL internal 8) (primitive_site VCC_X16Y2 VCC internal 1) (primitive_site SLICE_X26Y2 SLICEM internal 32) (primitive_site SLICE_X26Y3 SLICEM internal 32) (primitive_site SLICE_X27Y2 SLICEL internal 25) (primitive_site SLICE_X27Y3 SLICEL internal 25) ) (tile 27 20 R23C15 CENTER_SMALL 6 (primitive_site RLL_X16Y2 RESERVED_LL internal 8) (primitive_site VCC_X17Y2 VCC internal 1) (primitive_site SLICE_X28Y2 SLICEM internal 32) (primitive_site SLICE_X28Y3 SLICEM internal 32) (primitive_site SLICE_X29Y2 SLICEL internal 25) (primitive_site SLICE_X29Y3 SLICEL internal 25) ) (tile 27 21 R23C16 CENTER_SMALL 6 (primitive_site RLL_X17Y2 RESERVED_LL internal 8) (primitive_site VCC_X18Y2 VCC internal 1) (primitive_site SLICE_X30Y2 SLICEM internal 32) (primitive_site SLICE_X30Y3 SLICEM internal 32) (primitive_site SLICE_X31Y2 SLICEL internal 25) (primitive_site SLICE_X31Y3 SLICEL internal 25) ) (tile 27 22 RGCLKVR23 GCLKV 0 ) (tile 27 23 R23C17 CENTER_SMALL 6 (primitive_site RLL_X18Y2 RESERVED_LL internal 8) (primitive_site VCC_X19Y2 VCC internal 1) (primitive_site SLICE_X32Y2 SLICEM internal 32) (primitive_site SLICE_X32Y3 SLICEM internal 32) (primitive_site SLICE_X33Y2 SLICEL internal 25) (primitive_site SLICE_X33Y3 SLICEL internal 25) ) (tile 27 24 R23C18 CENTER_SMALL 6 (primitive_site RLL_X19Y2 RESERVED_LL internal 8) (primitive_site VCC_X20Y2 VCC internal 1) (primitive_site SLICE_X34Y2 SLICEM internal 32) (primitive_site SLICE_X34Y3 SLICEM internal 32) (primitive_site SLICE_X35Y2 SLICEL internal 25) (primitive_site SLICE_X35Y3 SLICEL internal 25) ) (tile 27 25 BRAMR23C2 BRAM1_SMALL 2 (primitive_site RLL_X20Y2 RESERVED_LL internal 8) (primitive_site VCC_X21Y2 VCC internal 1) ) (tile 27 26 BMR23C2 EMPTY64X76 0 ) (tile 27 27 R23C19 CENTER_SMALL 6 (primitive_site RLL_X21Y2 RESERVED_LL internal 8) (primitive_site VCC_X22Y2 VCC internal 1) (primitive_site SLICE_X36Y2 SLICEM internal 32) (primitive_site SLICE_X36Y3 SLICEM internal 32) (primitive_site SLICE_X37Y2 SLICEL internal 25) (primitive_site SLICE_X37Y3 SLICEL internal 25) ) (tile 27 28 R23C20 CENTER_SMALL 6 (primitive_site RLL_X22Y2 RESERVED_LL internal 8) (primitive_site VCC_X23Y2 VCC internal 1) (primitive_site SLICE_X38Y2 SLICEM internal 32) (primitive_site SLICE_X38Y3 SLICEM internal 32) (primitive_site SLICE_X39Y2 SLICEL internal 25) (primitive_site SLICE_X39Y3 SLICEL internal 25) ) (tile 27 29 RIOIR23 RIOIS 5 (primitive_site VCC_X24Y2 VCC internal 1) (primitive_site RLL_X23Y2 RESERVED_LL internal 8) (primitive_site P14 DIFFM bonded 21) (primitive_site P15 DIFFS bonded 21) (primitive_site NOPAD33 IOB unbonded 21) ) (tile 27 30 RTERMR23 RTERM 0 ) (tile 28 0 LTERMR24 LTERM 0 ) (tile 28 1 LIOIR24 LIOIS 5 (primitive_site VCC_X0Y1 VCC internal 1) (primitive_site RLL_X0Y1 RESERVED_LL internal 8) (primitive_site R1 DIFFS bonded 21) (primitive_site P1 DIFFM bonded 21) (primitive_site NOPAD45 IOB unbonded 21) ) (tile 28 2 R24C1 CENTER_SMALL 6 (primitive_site RLL_X1Y1 RESERVED_LL internal 8) (primitive_site VCC_X1Y1 VCC internal 1) (primitive_site SLICE_X0Y0 SLICEM internal 32) (primitive_site SLICE_X0Y1 SLICEM internal 32) (primitive_site SLICE_X1Y0 SLICEL internal 25) (primitive_site SLICE_X1Y1 SLICEL internal 25) ) (tile 28 3 R24C2 CENTER_SMALL 6 (primitive_site RLL_X2Y1 RESERVED_LL internal 8) (primitive_site VCC_X2Y1 VCC internal 1) (primitive_site SLICE_X2Y0 SLICEM internal 32) (primitive_site SLICE_X2Y1 SLICEM internal 32) (primitive_site SLICE_X3Y0 SLICEL internal 25) (primitive_site SLICE_X3Y1 SLICEL internal 25) ) (tile 28 4 BRAMR24C1 BRAM0_SMALL 2 (primitive_site RLL_X3Y1 RESERVED_LL internal 8) (primitive_site VCC_X3Y1 VCC internal 1) ) (tile 28 5 BMR24C1 BRAMSITE 2 (primitive_site RAMB16_X0Y0 RAMB16 internal 180) (primitive_site MULT18X18_X0Y0 MULT18X18 internal 75) ) (tile 28 6 R24C3 CENTER_SMALL 6 (primitive_site RLL_X4Y1 RESERVED_LL internal 8) (primitive_site VCC_X4Y1 VCC internal 1) (primitive_site SLICE_X4Y0 SLICEM internal 32) (primitive_site SLICE_X4Y1 SLICEM internal 32) (primitive_site SLICE_X5Y0 SLICEL internal 25) (primitive_site SLICE_X5Y1 SLICEL internal 25) ) (tile 28 7 R24C4 CENTER_SMALL 6 (primitive_site RLL_X5Y1 RESERVED_LL internal 8) (primitive_site VCC_X5Y1 VCC internal 1) (primitive_site SLICE_X6Y0 SLICEM internal 32) (primitive_site SLICE_X6Y1 SLICEM internal 32) (primitive_site SLICE_X7Y0 SLICEL internal 25) (primitive_site SLICE_X7Y1 SLICEL internal 25) ) (tile 28 8 LGCLKVR24 GCLKV 0 ) (tile 28 9 R24C5 CENTER_SMALL 6 (primitive_site RLL_X6Y1 RESERVED_LL internal 8) (primitive_site VCC_X6Y1 VCC internal 1) (primitive_site SLICE_X8Y0 SLICEM internal 32) (primitive_site SLICE_X8Y1 SLICEM internal 32) (primitive_site SLICE_X9Y0 SLICEL internal 25) (primitive_site SLICE_X9Y1 SLICEL internal 25) ) (tile 28 10 R24C6 CENTER_SMALL 6 (primitive_site RLL_X7Y1 RESERVED_LL internal 8) (primitive_site VCC_X7Y1 VCC internal 1) (primitive_site SLICE_X10Y0 SLICEM internal 32) (primitive_site SLICE_X10Y1 SLICEM internal 32) (primitive_site SLICE_X11Y0 SLICEL internal 25) (primitive_site SLICE_X11Y1 SLICEL internal 25) ) (tile 28 11 R24C7 CENTER_SMALL 6 (primitive_site RLL_X8Y1 RESERVED_LL internal 8) (primitive_site VCC_X8Y1 VCC internal 1) (primitive_site SLICE_X12Y0 SLICEM internal 32) (primitive_site SLICE_X12Y1 SLICEM internal 32) (primitive_site SLICE_X13Y0 SLICEL internal 25) (primitive_site SLICE_X13Y1 SLICEL internal 25) ) (tile 28 12 R24C8 CENTER_SMALL 6 (primitive_site RLL_X9Y1 RESERVED_LL internal 8) (primitive_site VCC_X9Y1 VCC internal 1) (primitive_site SLICE_X14Y0 SLICEM internal 32) (primitive_site SLICE_X14Y1 SLICEM internal 32) (primitive_site SLICE_X15Y0 SLICEL internal 25) (primitive_site SLICE_X15Y1 SLICEL internal 25) ) (tile 28 13 R24C9 CENTER_SMALL 6 (primitive_site RLL_X10Y1 RESERVED_LL internal 8) (primitive_site VCC_X10Y1 VCC internal 1) (primitive_site SLICE_X16Y0 SLICEM internal 32) (primitive_site SLICE_X16Y1 SLICEM internal 32) (primitive_site SLICE_X17Y0 SLICEL internal 25) (primitive_site SLICE_X17Y1 SLICEL internal 25) ) (tile 28 14 R24C10 CENTER_SMALL 6 (primitive_site RLL_X11Y1 RESERVED_LL internal 8) (primitive_site VCC_X11Y1 VCC internal 1) (primitive_site SLICE_X18Y0 SLICEM internal 32) (primitive_site SLICE_X18Y1 SLICEM internal 32) (primitive_site SLICE_X19Y0 SLICEL internal 25) (primitive_site SLICE_X19Y1 SLICEL internal 25) ) (tile 28 15 VMR24 CLKV 0 ) (tile 28 16 R24C11 CENTER_SMALL 6 (primitive_site RLL_X12Y1 RESERVED_LL internal 8) (primitive_site VCC_X13Y1 VCC internal 1) (primitive_site SLICE_X20Y0 SLICEM internal 32) (primitive_site SLICE_X20Y1 SLICEM internal 32) (primitive_site SLICE_X21Y0 SLICEL internal 25) (primitive_site SLICE_X21Y1 SLICEL internal 25) ) (tile 28 17 R24C12 CENTER_SMALL 6 (primitive_site RLL_X13Y1 RESERVED_LL internal 8) (primitive_site VCC_X14Y1 VCC internal 1) (primitive_site SLICE_X22Y0 SLICEM internal 32) (primitive_site SLICE_X22Y1 SLICEM internal 32) (primitive_site SLICE_X23Y0 SLICEL internal 25) (primitive_site SLICE_X23Y1 SLICEL internal 25) ) (tile 28 18 R24C13 CENTER_SMALL 6 (primitive_site RLL_X14Y1 RESERVED_LL internal 8) (primitive_site VCC_X15Y1 VCC internal 1) (primitive_site SLICE_X24Y0 SLICEM internal 32) (primitive_site SLICE_X24Y1 SLICEM internal 32) (primitive_site SLICE_X25Y0 SLICEL internal 25) (primitive_site SLICE_X25Y1 SLICEL internal 25) ) (tile 28 19 R24C14 CENTER_SMALL 6 (primitive_site RLL_X15Y1 RESERVED_LL internal 8) (primitive_site VCC_X16Y1 VCC internal 1) (primitive_site SLICE_X26Y0 SLICEM internal 32) (primitive_site SLICE_X26Y1 SLICEM internal 32) (primitive_site SLICE_X27Y0 SLICEL internal 25) (primitive_site SLICE_X27Y1 SLICEL internal 25) ) (tile 28 20 R24C15 CENTER_SMALL 6 (primitive_site RLL_X16Y1 RESERVED_LL internal 8) (primitive_site VCC_X17Y1 VCC internal 1) (primitive_site SLICE_X28Y0 SLICEM internal 32) (primitive_site SLICE_X28Y1 SLICEM internal 32) (primitive_site SLICE_X29Y0 SLICEL internal 25) (primitive_site SLICE_X29Y1 SLICEL internal 25) ) (tile 28 21 R24C16 CENTER_SMALL 6 (primitive_site RLL_X17Y1 RESERVED_LL internal 8) (primitive_site VCC_X18Y1 VCC internal 1) (primitive_site SLICE_X30Y0 SLICEM internal 32) (primitive_site SLICE_X30Y1 SLICEM internal 32) (primitive_site SLICE_X31Y0 SLICEL internal 25) (primitive_site SLICE_X31Y1 SLICEL internal 25) ) (tile 28 22 RGCLKVR24 GCLKV 0 ) (tile 28 23 R24C17 CENTER_SMALL 6 (primitive_site RLL_X18Y1 RESERVED_LL internal 8) (primitive_site VCC_X19Y1 VCC internal 1) (primitive_site SLICE_X32Y0 SLICEM internal 32) (primitive_site SLICE_X32Y1 SLICEM internal 32) (primitive_site SLICE_X33Y0 SLICEL internal 25) (primitive_site SLICE_X33Y1 SLICEL internal 25) ) (tile 28 24 R24C18 CENTER_SMALL 6 (primitive_site RLL_X19Y1 RESERVED_LL internal 8) (primitive_site VCC_X20Y1 VCC internal 1) (primitive_site SLICE_X34Y0 SLICEM internal 32) (primitive_site SLICE_X34Y1 SLICEM internal 32) (primitive_site SLICE_X35Y0 SLICEL internal 25) (primitive_site SLICE_X35Y1 SLICEL internal 25) ) (tile 28 25 BRAMR24C2 BRAM0_SMALL 2 (primitive_site RLL_X20Y1 RESERVED_LL internal 8) (primitive_site VCC_X21Y1 VCC internal 1) ) (tile 28 26 BMR24C2 BRAMSITE 2 (primitive_site RAMB16_X1Y0 RAMB16 internal 180) (primitive_site MULT18X18_X1Y0 MULT18X18 internal 75) ) (tile 28 27 R24C19 CENTER_SMALL 6 (primitive_site RLL_X21Y1 RESERVED_LL internal 8) (primitive_site VCC_X22Y1 VCC internal 1) (primitive_site SLICE_X36Y0 SLICEM internal 32) (primitive_site SLICE_X36Y1 SLICEM internal 32) (primitive_site SLICE_X37Y0 SLICEL internal 25) (primitive_site SLICE_X37Y1 SLICEL internal 25) ) (tile 28 28 R24C20 CENTER_SMALL 6 (primitive_site RLL_X22Y1 RESERVED_LL internal 8) (primitive_site VCC_X23Y1 VCC internal 1) (primitive_site SLICE_X38Y0 SLICEM internal 32) (primitive_site SLICE_X38Y1 SLICEM internal 32) (primitive_site SLICE_X39Y0 SLICEL internal 25) (primitive_site SLICE_X39Y1 SLICEL internal 25) ) (tile 28 29 RIOIR24 RIOIS 5 (primitive_site VCC_X24Y1 VCC internal 1) (primitive_site RLL_X23Y1 RESERVED_LL internal 8) (primitive_site R16 DIFFM bonded 21) (primitive_site P16 DIFFS bonded 21) (primitive_site NOPAD34 IOB unbonded 21) ) (tile 28 30 RTERMR24 RTERM 0 ) (tile 29 0 LBTERM CNR_LBTERM 0 ) (tile 29 1 BL LL 6 (primitive_site RLL_X0Y0 RESERVED_LL internal 8) (primitive_site DCI6 DCI internal 13) (primitive_site DCI5 DCI internal 13) (primitive_site DCIRESET6 DCIRESET internal 1) (primitive_site DCIRESET5 DCIRESET internal 1) (primitive_site VCC_X0Y0 VCC internal 1) ) (tile 29 2 BIOIC1 BIOIS 6 (primitive_site VCC_X1Y0 VCC internal 1) (primitive_site RLL_X1Y0 RESERVED_LL internal 8) (primitive_site R3 DIFFM bonded 21) (primitive_site T3 DIFFS bonded 21) (primitive_site NOPAD44 IOB unbonded 21) (primitive_site RANDOR_X0Y0 RESERVED_ANDOR internal 4) ) (tile 29 3 BIOIC2 BIOIS 6 (primitive_site VCC_X2Y0 VCC internal 1) (primitive_site RLL_X2Y0 RESERVED_LL internal 8) (primitive_site R4 DIFFM bonded 21) (primitive_site T4 DIFFS bonded 21) (primitive_site PAD144 IOB unbonded 21) (primitive_site RANDOR_X2Y0 RESERVED_ANDOR internal 4) ) (tile 29 4 BIOIBRAMC1 BRAM_IOIS 3 (primitive_site RLL_X3Y0 RESERVED_LL internal 8) (primitive_site VCC_X3Y0 VCC internal 1) (primitive_site DCM_X0Y0 DCM internal 41) ) (tile 29 5 BMBIOIBSC1 BRAMSITE_IOIS 0 ) (tile 29 6 BIOIC3 BIOIS 6 (primitive_site VCC_X4Y0 VCC internal 1) (primitive_site RLL_X4Y0 RESERVED_LL internal 8) (primitive_site PAD143 DIFFM unbonded 21) (primitive_site PAD142 DIFFS unbonded 21) (primitive_site NOPAD43 IOB unbonded 21) (primitive_site RANDOR_X4Y0 RESERVED_ANDOR internal 4) ) (tile 29 7 BIOIC4 BIOIS 6 (primitive_site VCC_X5Y0 VCC internal 1) (primitive_site RLL_X5Y0 RESERVED_LL internal 8) (primitive_site PAD141 DIFFM unbonded 21) (primitive_site PAD140 DIFFS unbonded 21) (primitive_site T5 IOB bonded 21) (primitive_site RANDOR_X6Y0 RESERVED_ANDOR internal 4) ) (tile 29 8 LGCLKVBIOI GCLKV_IOIS 0 ) (tile 29 9 BIOIC5 BIOIS 6 (primitive_site VCC_X6Y0 VCC internal 1) (primitive_site RLL_X6Y0 RESERVED_LL internal 8) (primitive_site P5 DIFFM bonded 21) (primitive_site R5 DIFFS bonded 21) (primitive_site NOPAD42 IOB unbonded 21) (primitive_site RANDOR_X8Y0 RESERVED_ANDOR internal 4) ) (tile 29 10 BIOIC6 BIOIS 6 (primitive_site VCC_X7Y0 VCC internal 1) (primitive_site RLL_X7Y0 RESERVED_LL internal 8) (primitive_site M6 DIFFM bonded 21) (primitive_site N6 DIFFS bonded 21) (primitive_site N5 IOB bonded 21) (primitive_site RANDOR_X10Y0 RESERVED_ANDOR internal 4) ) (tile 29 11 BIOIC7 BIOIS 6 (primitive_site VCC_X8Y0 VCC internal 1) (primitive_site RLL_X8Y0 RESERVED_LL internal 8) (primitive_site P6 DIFFM bonded 21) (primitive_site R6 DIFFS bonded 21) (primitive_site NOPAD41 IOB unbonded 21) (primitive_site RANDOR_X12Y0 RESERVED_ANDOR internal 4) ) (tile 29 12 BIOIC8 BIOIS 6 (primitive_site VCC_X9Y0 VCC internal 1) (primitive_site RLL_X9Y0 RESERVED_LL internal 8) (primitive_site M7 DIFFM bonded 21) (primitive_site N7 DIFFS bonded 21) (primitive_site P7 IOB bonded 21) (primitive_site RANDOR_X14Y0 RESERVED_ANDOR internal 4) ) (tile 29 13 BIOIC9 BIOIS 6 (primitive_site VCC_X10Y0 VCC internal 1) (primitive_site RLL_X10Y0 RESERVED_LL internal 8) (primitive_site R7 DIFFM bonded 21) (primitive_site T7 DIFFS bonded 21) (primitive_site NOPAD40 IOB unbonded 21) (primitive_site RANDOR_X16Y0 RESERVED_ANDOR internal 4) ) (tile 29 14 BIOIC10 BIOIS 6 (primitive_site VCC_X11Y0 VCC internal 1) (primitive_site RLL_X11Y0 RESERVED_LL internal 8) (primitive_site N8 DIFFM bonded 21) (primitive_site P8 DIFFS bonded 21) (primitive_site T8 IOB bonded 21) (primitive_site RANDOR_X18Y0 RESERVED_ANDOR internal 4) ) (tile 29 15 CLKB CLKB 6 (primitive_site GSIG_X12Y0 GLOBALSIG internal 0) (primitive_site BUFGMUX3 BUFGMUX internal 4) (primitive_site BUFGMUX2 BUFGMUX internal 4) (primitive_site BUFGMUX1 BUFGMUX internal 4) (primitive_site BUFGMUX0 BUFGMUX internal 4) (primitive_site VCC_X12Y0 VCC internal 1) ) (tile 29 16 BIOIC11 BIOIS 6 (primitive_site VCC_X13Y0 VCC internal 1) (primitive_site RLL_X12Y0 RESERVED_LL internal 8) (primitive_site T9 DIFFM bonded 21) (primitive_site R9 DIFFS bonded 21) (primitive_site NOPAD39 IOB unbonded 21) (primitive_site RANDOR_X20Y0 RESERVED_ANDOR internal 4) ) (tile 29 17 BIOIC12 BIOIS 6 (primitive_site VCC_X14Y0 VCC internal 1) (primitive_site RLL_X13Y0 RESERVED_LL internal 8) (primitive_site P9 DIFFM bonded 21) (primitive_site N9 DIFFS bonded 21) (primitive_site T10 IOB bonded 21) (primitive_site RANDOR_X22Y0 RESERVED_ANDOR internal 4) ) (tile 29 18 BIOIC13 BIOIS 6 (primitive_site VCC_X15Y0 VCC internal 1) (primitive_site RLL_X14Y0 RESERVED_LL internal 8) (primitive_site R10 DIFFM bonded 21) (primitive_site P10 DIFFS bonded 21) (primitive_site NOPAD38 IOB unbonded 21) (primitive_site RANDOR_X24Y0 RESERVED_ANDOR internal 4) ) (tile 29 19 BIOIC14 BIOIS 6 (primitive_site VCC_X16Y0 VCC internal 1) (primitive_site RLL_X15Y0 RESERVED_LL internal 8) (primitive_site N10 DIFFM bonded 21) (primitive_site M10 DIFFS bonded 21) (primitive_site PAD114 IOB unbonded 21) (primitive_site RANDOR_X26Y0 RESERVED_ANDOR internal 4) ) (tile 29 20 BIOIC15 BIOIS 6 (primitive_site VCC_X17Y0 VCC internal 1) (primitive_site RLL_X16Y0 RESERVED_LL internal 8) (primitive_site R11 DIFFM bonded 21) (primitive_site P11 DIFFS bonded 21) (primitive_site NOPAD37 IOB unbonded 21) (primitive_site RANDOR_X28Y0 RESERVED_ANDOR internal 4) ) (tile 29 21 BIOIC16 BIOIS 6 (primitive_site VCC_X18Y0 VCC internal 1) (primitive_site RLL_X17Y0 RESERVED_LL internal 8) (primitive_site N11 DIFFM bonded 21) (primitive_site M11 DIFFS bonded 21) (primitive_site T12 IOB bonded 21) (primitive_site RANDOR_X30Y0 RESERVED_ANDOR internal 4) ) (tile 29 22 RGCLKVBIOI GCLKV_IOIS 0 ) (tile 29 23 BIOIC17 BIOIS 6 (primitive_site VCC_X19Y0 VCC internal 1) (primitive_site RLL_X18Y0 RESERVED_LL internal 8) (primitive_site R12 DIFFM bonded 21) (primitive_site P12 DIFFS bonded 21) (primitive_site NOPAD36 IOB unbonded 21) (primitive_site RANDOR_X32Y0 RESERVED_ANDOR internal 4) ) (tile 29 24 BIOIC18 BIOIS 6 (primitive_site VCC_X20Y0 VCC internal 1) (primitive_site RLL_X19Y0 RESERVED_LL internal 8) (primitive_site PAD106 DIFFM unbonded 21) (primitive_site PAD105 DIFFS unbonded 21) (primitive_site N12 IOB bonded 21) (primitive_site RANDOR_X34Y0 RESERVED_ANDOR internal 4) ) (tile 29 25 BIOIBRAMC2 BRAM_IOIS 3 (primitive_site RLL_X20Y0 RESERVED_LL internal 8) (primitive_site VCC_X21Y0 VCC internal 1) (primitive_site DCM_X1Y0 DCM internal 41) ) (tile 29 26 BMBIOIBSC2 BRAMSITE_IOIS 0 ) (tile 29 27 BIOIC19 BIOIS 6 (primitive_site VCC_X22Y0 VCC internal 1) (primitive_site RLL_X21Y0 RESERVED_LL internal 8) (primitive_site PAD103 DIFFM unbonded 21) (primitive_site T14 DIFFS bonded 21) (primitive_site NOPAD35 IOB unbonded 21) (primitive_site RANDOR_X36Y0 RESERVED_ANDOR internal 4) ) (tile 29 28 BIOIC20 BIOIS 6 (primitive_site VCC_X23Y0 VCC internal 1) (primitive_site RLL_X22Y0 RESERVED_LL internal 8) (primitive_site T13 DIFFM bonded 21) (primitive_site R13 DIFFS bonded 21) (primitive_site P13 IOB bonded 21) (primitive_site RANDOR_X38Y0 RESERVED_ANDOR internal 4) ) (tile 29 29 BR LR 9 (primitive_site RLL_X23Y0 RESERVED_LL internal 8) (primitive_site DCI3 DCI internal 13) (primitive_site DCI4 DCI internal 13) (primitive_site DCIRESET3 DCIRESET internal 1) (primitive_site DCIRESET4 DCIRESET internal 1) (primitive_site STARTUP STARTUP internal 3) (primitive_site ICAP ICAP internal 20) (primitive_site CAPTURE CAPTURE internal 2) (primitive_site VCC_X24Y0 VCC internal 1) ) (tile 29 30 RBTERM CNR_RBTERM 0 ) (tile 30 0 BTERMLTERM EMPTY16X2 0 ) (tile 30 1 BLTERM CNR_BTERM 0 ) (tile 30 2 BTERMC1 BTERM2 0 ) (tile 30 3 BTERMC2 BTERM3 0 ) (tile 30 4 BTERMBRAMC1 BBTERM 0 ) (tile 30 5 BMBTERMBSC1 BBSTERM 0 ) (tile 30 6 BTERMC3 BTERM2 0 ) (tile 30 7 BTERMC4 BTERM3 0 ) (tile 30 8 LGCLKVBTERM BGCLKVTERM 0 ) (tile 30 9 BTERMC5 BTERM2 0 ) (tile 30 10 BTERMC6 BTERM3 0 ) (tile 30 11 BTERMC7 BTERM2 0 ) (tile 30 12 BTERMC8 BTERM3 0 ) (tile 30 13 BTERMC9 BTERM2 0 ) (tile 30 14 BTERMC10 BCLKTERM3 0 ) (tile 30 15 BTERMVM EMPTY0X3 0 ) (tile 30 16 BTERMC11 BCLKTERM2 0 ) (tile 30 17 BTERMC12 BTERM3 0 ) (tile 30 18 BTERMC13 BTERM2 0 ) (tile 30 19 BTERMC14 BTERM3 0 ) (tile 30 20 BTERMC15 BTERM2 0 ) (tile 30 21 BTERMC16 BTERM3 0 ) (tile 30 22 RGCLKVBTERM BGCLKVTERM 0 ) (tile 30 23 BTERMC17 BTERM2 0 ) (tile 30 24 BTERMC18 BTERM3 0 ) (tile 30 25 BTERMBRAMC2 BBTERM 0 ) (tile 30 26 BMBTERMBSC2 BBSTERM 0 ) (tile 30 27 BTERMC19 BTERM2 0 ) (tile 30 28 BTERMC20 BTERM3 0 ) (tile 30 29 BRTERM CNR_BTERM 0 ) (tile 30 30 BTERMRTERM EMPTY16X2 0 ) ) (primitive_defs 20 (primitive_def BSCAN 11 12 (pin RESET RESET output) (pin DRCK1 DRCK1 output) (pin DRCK2 DRCK2 output) (pin SHIFT SHIFT output) (pin TDI TDI output) (pin TDO1 TDO1 input) (pin TDO2 TDO2 input) (pin UPDATE UPDATE output) (pin SEL1 SEL1 output) (pin SEL2 SEL2 output) (pin CAPTURE CAPTURE output) (element TDO1 1 (pin TDO1 output) (conn TDO1 TDO1 ==> BSCAN_BLACKBOX TDO1) ) (element TDO2 1 (pin TDO2 output) (conn TDO2 TDO2 ==> BSCAN_BLACKBOX TDO2) ) (element SEL2 1 (pin SEL2 input) (conn SEL2 SEL2 <== BSCAN_BLACKBOX SEL2) ) (element SEL1 1 (pin SEL1 input) (conn SEL1 SEL1 <== BSCAN_BLACKBOX SEL1) ) (element RESET 1 (pin RESET input) (conn RESET RESET <== BSCAN_BLACKBOX RESET) ) (element CAPTURE 1 (pin CAPTURE input) (conn CAPTURE CAPTURE <== BSCAN_BLACKBOX CAPTURE) ) (element DRCK1 1 (pin DRCK1 input) (conn DRCK1 DRCK1 <== BSCAN_BLACKBOX DRCK1) ) (element DRCK2 1 (pin DRCK2 input) (conn DRCK2 DRCK2 <== BSCAN_BLACKBOX DRCK2) ) (element UPDATE 1 (pin UPDATE input) (conn UPDATE UPDATE <== BSCAN_BLACKBOX UPDATE) ) (element SHIFT 1 (pin SHIFT input) (conn SHIFT SHIFT <== BSCAN_BLACKBOX SHIFT) ) (element TDI 1 (pin TDI input) (conn TDI TDI <== BSCAN_BLACKBOX TDI) ) (element BSCAN_BLACKBOX 11 # BEL (pin TDO2 input) (pin TDO1 input) (pin SEL2 output) (pin SEL1 output) (pin TDI output) (pin SHIFT output) (pin UPDATE output) (pin DRCK2 output) (pin DRCK1 output) (pin RESET output) (pin CAPTURE output) (conn BSCAN_BLACKBOX SEL2 ==> SEL2 SEL2) (conn BSCAN_BLACKBOX SEL1 ==> SEL1 SEL1) (conn BSCAN_BLACKBOX TDI ==> TDI TDI) (conn BSCAN_BLACKBOX SHIFT ==> SHIFT SHIFT) (conn BSCAN_BLACKBOX UPDATE ==> UPDATE UPDATE) (conn BSCAN_BLACKBOX DRCK2 ==> DRCK2 DRCK2) (conn BSCAN_BLACKBOX DRCK1 ==> DRCK1 DRCK1) (conn BSCAN_BLACKBOX RESET ==> RESET RESET) (conn BSCAN_BLACKBOX CAPTURE ==> CAPTURE CAPTURE) (conn BSCAN_BLACKBOX TDO2 <== TDO2 TDO2) (conn BSCAN_BLACKBOX TDO1 <== TDO1 TDO1) ) ) (primitive_def BUFGMUX 4 10 (pin I0 I0 input) (pin I1 I1 input) (pin S S input) (pin O O output) (element O 1 (pin O input) (conn O O <== GCLK_BUFFER OUT) ) (element I1 1 (pin I1 output) (conn I1 I1 ==> I1_USED 0) ) (element S 1 (pin S output) (conn S S ==> SINV S_B) (conn S S ==> SINV S) ) (element SINV 3 (pin S_B input) (pin S input) (pin OUT output) (cfg S_B S) (conn SINV OUT ==> GCLKMUX S) (conn SINV S_B <== S S) (conn SINV S <== S S) ) (element I0 1 (pin I0 output) (conn I0 I0 ==> I0_USED 0) ) (element GCLK_BUFFER 2 # BEL (pin IN input) (pin OUT output) (conn GCLK_BUFFER OUT ==> O O) (conn GCLK_BUFFER IN <== GCLKMUX OUT) ) (element DISABLE_ATTR 0 (cfg HIGH LOW) ) (element I1_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn I1_USED OUT ==> GCLKMUX I1) (conn I1_USED 0 <== I1 I1) ) (element I0_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn I0_USED OUT ==> GCLKMUX I0) (conn I0_USED 0 <== I0 I0) ) (element GCLKMUX 4 # BEL (pin S input) (pin I0 input) (pin I1 input) (pin OUT output) (conn GCLKMUX OUT ==> GCLK_BUFFER IN) (conn GCLKMUX S <== SINV OUT) (conn GCLKMUX I0 <== I0_USED OUT) (conn GCLKMUX I1 <== I1_USED OUT) ) ) (primitive_def CAPTURE 2 6 (pin CAP CAP input) (pin CLK CLK input) (element CLK 1 (pin CLK output) (conn CLK CLK ==> CLKINV CLK_B) (conn CLK CLK ==> CLKINV CLK) ) (element CAP 1 (pin CAP output) (conn CAP CAP ==> CAPINV CAP_B) (conn CAP CAP ==> CAPINV CAP) ) (element CAPTURE_BLACKBOX 2 # BEL (pin CLK input) (pin CAP input) (conn CAPTURE_BLACKBOX CLK <== CLKINV OUT) (conn CAPTURE_BLACKBOX CAP <== CAPINV OUT) ) (element ONESHOT_ATTR 0 (cfg ONE_SHOT) ) (element CAPINV 3 (pin CAP_B input) (pin CAP input) (pin OUT output) (cfg CAP_B CAP) (conn CAPINV OUT ==> CAPTURE_BLACKBOX CAP) (conn CAPINV CAP_B <== CAP CAP) (conn CAPINV CAP <== CAP CAP) ) (element CLKINV 3 (pin CLK_B input) (pin CLK input) (pin OUT output) (cfg CLK_B CLK) (conn CLKINV OUT ==> CAPTURE_BLACKBOX CLK) (conn CLKINV CLK_B <== CLK CLK) (conn CLKINV CLK <== CLK CLK) ) ) (primitive_def DCI 13 15 (pin HI_LO_N HI_LO_N input) (pin HI_LO_P HI_LO_P input) (pin DCI_RESET DCI_RESET input) (pin DCI_CLK DCI_CLK input) (pin DCI_DONE DCI_DONE output) (pin N_OR_P N_OR_P output) (pin ADDRESS0 ADDRESS0 output) (pin ADDRESS1 ADDRESS1 output) (pin ADDRESS2 ADDRESS2 output) (pin UPDATE UPDATE output) (pin SCLK SCLK output) (pin DATA DATA output) (pin IOUPDATE IOUPDATE output) (element DCI 13 # BEL (pin DCI_CLK input) (pin DCI_RESET input) (pin HI_LO_P input) (pin HI_LO_N input) (pin DCI_DONE output) (pin N_OR_P output) (pin ADDRESS0 output) (pin ADDRESS1 output) (pin ADDRESS2 output) (pin UPDATE output) (pin IOUPDATE output) (pin SCLK output) (pin DATA output) (conn DCI DCI_DONE ==> DCI_DONE DCI_DONE) (conn DCI N_OR_P ==> N_OR_P N_OR_P) (conn DCI ADDRESS0 ==> ADDRESS0 ADDRESS0) (conn DCI ADDRESS1 ==> ADDRESS1 ADDRESS1) (conn DCI ADDRESS2 ==> ADDRESS2 ADDRESS2) (conn DCI UPDATE ==> UPDATE UPDATE) (conn DCI IOUPDATE ==> IOUPDATE IOUPDATE) (conn DCI SCLK ==> SCLK SCLK) (conn DCI DATA ==> DATA DATA) (conn DCI DCI_CLK <== DCI_CLK DCI_CLK) (conn DCI DCI_RESET <== DCI_RESET DCI_RESET) (conn DCI HI_LO_P <== HI_LO_P HI_LO_P) (conn DCI HI_LO_N <== HI_LO_N HI_LO_N) ) (element HI_LO_N 1 (pin HI_LO_N output) (conn HI_LO_N HI_LO_N ==> DCI HI_LO_N) ) (element HI_LO_P 1 (pin HI_LO_P output) (conn HI_LO_P HI_LO_P ==> DCI HI_LO_P) ) (element DCI_RESET 1 (pin DCI_RESET output) (conn DCI_RESET DCI_RESET ==> DCI DCI_RESET) ) (element DCI_CLK 1 (pin DCI_CLK output) (conn DCI_CLK DCI_CLK ==> DCI DCI_CLK) ) (element DATA 1 (pin DATA input) (conn DATA DATA <== DCI DATA) ) (element SCLK 1 (pin SCLK input) (conn SCLK SCLK <== DCI SCLK) ) (element UPDATE 1 (pin UPDATE input) (conn UPDATE UPDATE <== DCI UPDATE) ) (element IOUPDATE 1 (pin IOUPDATE input) (conn IOUPDATE IOUPDATE <== DCI IOUPDATE) ) (element ADDRESS2 1 (pin ADDRESS2 input) (conn ADDRESS2 ADDRESS2 <== DCI ADDRESS2) ) (element ADDRESS1 1 (pin ADDRESS1 input) (conn ADDRESS1 ADDRESS1 <== DCI ADDRESS1) ) (element ADDRESS0 1 (pin ADDRESS0 input) (conn ADDRESS0 ADDRESS0 <== DCI ADDRESS0) ) (element N_OR_P 1 (pin N_OR_P input) (conn N_OR_P N_OR_P <== DCI N_OR_P) ) (element DCI_DONE 1 (pin DCI_DONE input) (conn DCI_DONE DCI_DONE <== DCI DCI_DONE) ) (element FORCE_DONE_HIGH 0 (cfg FORCE_DONE_HIGH) ) ) (primitive_def DCIRESET 1 2 (pin RST RST input) (element RST 1 (pin RST output) (conn RST RST ==> DCIRESET RST) ) (element DCIRESET 1 # BEL (pin RST input) (conn DCIRESET RST <== RST RST) ) ) (primitive_def DCM 41 74 (pin CLKIN CLKIN input) (pin CLKFB CLKFB input) (pin CTLMODE CTLMODE input) (pin CTLSEL2 CTLSEL2 input) (pin CTLSEL1 CTLSEL1 input) (pin CTLSEL0 CTLSEL0 input) (pin CTLGO CTLGO input) (pin CTLOSC1 CTLOSC1 input) (pin CTLOSC2 CTLOSC2 input) (pin RST RST input) (pin PSINCDEC PSINCDEC input) (pin PSEN PSEN input) (pin PSCLK PSCLK input) (pin STSADRS3 STSADRS3 input) (pin STSADRS2 STSADRS2 input) (pin STSADRS1 STSADRS1 input) (pin STSADRS0 STSADRS0 input) (pin FREEZEDFS FREEZEDFS input) (pin FREEZEDLL FREEZEDLL input) (pin CONCUR CONCUR output) (pin PSDONE PSDONE output) (pin STATUS0 STATUS0 output) (pin STATUS1 STATUS1 output) (pin STATUS2 STATUS2 output) (pin STATUS3 STATUS3 output) (pin STATUS4 STATUS4 output) (pin STATUS5 STATUS5 output) (pin STATUS6 STATUS6 output) (pin STATUS7 STATUS7 output) (pin LOCKED LOCKED output) (pin CLKFX180 CLKFX180 output) (pin CLKFX CLKFX output) (pin CLKDV CLKDV output) (pin CLK2X180 CLK2X180 output) (pin CLK2X CLK2X output) (pin CLK270 CLK270 output) (pin CLK180 CLK180 output) (pin CLK90 CLK90 output) (pin CLK0 CLK0 output) (pin DSSEN DSSEN input) (pin STSADRS4 STSADRS4 input) (element CLKFB 1 (pin CLKFB output) (conn CLKFB CLKFB ==> DCM CLKFB) ) (element CLKIN 1 (pin CLKIN output) (conn CLKIN CLKIN ==> DCM CLKIN) ) (element RST 1 (pin RST output) (conn RST RST ==> RSTINV RST_B) (conn RST RST ==> RSTINV RST) ) (element DSSEN 1 (pin DSSEN output) (conn DSSEN DSSEN ==> DSSENINV DSSEN_B) (conn DSSEN DSSEN ==> DSSENINV DSSEN) ) (element LOCKED 1 (pin LOCKED input) (conn LOCKED LOCKED <== DCM LOCKED) ) (element CLK0 1 (pin CLK0 input) (conn CLK0 CLK0 <== DCM CLK0) ) (element CLK180 1 (pin CLK180 input) (conn CLK180 CLK180 <== DCM CLK180) ) (element CLK90 1 (pin CLK90 input) (conn CLK90 CLK90 <== DCM CLK90) ) (element CLK270 1 (pin CLK270 input) (conn CLK270 CLK270 <== DCM CLK270) ) (element CLK2X 1 (pin CLK2X input) (conn CLK2X CLK2X <== DCM CLK2X) ) (element CLKDV 1 (pin CLKDV input) (conn CLKDV CLKDV <== DCM CLKDV) ) (element DLL_FREQUENCY_MODE 0 (cfg LOW HIGH) ) (element DFS_FREQUENCY_MODE 0 (cfg LOW HIGH) ) (element CLK2X180 1 (pin CLK2X180 input) (conn CLK2X180 CLK2X180 <== DCM CLK2X180) ) (element STARTUP_WAIT 0 (cfg STARTUP_WAIT) ) (element DUTY_CYCLE_CORRECTION 0 (cfg TRUE FALSE) ) (element FACTORY_JF2 0 (cfg 0X80 0XC0 0XE0 0XF0 0XF8 0XFC 0XFE 0XFF) ) (element FACTORY_JF1 0 (cfg 0X80 0XC0 0XE0 0XF0 0XF8 0XFC 0XFE 0XFF) ) (element CLKDV_DIVIDE 0 (cfg 1_5 2 2_5 3 3_5 4 4_5 5 5_5 6 6_5 7 7_5 8 9 10 11 12 13 14 15 16) ) (element FREEZEDLLINV 3 (pin FREEZEDLL_B input) (pin FREEZEDLL input) (pin OUT output) (cfg FREEZEDLL_B FREEZEDLL) (conn FREEZEDLLINV OUT ==> DCM FREEZEDLL) (conn FREEZEDLLINV FREEZEDLL_B <== FREEZEDLL FREEZEDLL) (conn FREEZEDLLINV FREEZEDLL <== FREEZEDLL FREEZEDLL) ) (element FREEZEDFSINV 3 (pin FREEZEDFS_B input) (pin FREEZEDFS input) (pin OUT output) (cfg FREEZEDFS_B FREEZEDFS) (conn FREEZEDFSINV OUT ==> DCM FREEZEDFS) (conn FREEZEDFSINV FREEZEDFS_B <== FREEZEDFS FREEZEDFS) (conn FREEZEDFSINV FREEZEDFS <== FREEZEDFS FREEZEDFS) ) (element STSADRS0INV 3 (pin STSADRS0_B input) (pin STSADRS0 input) (pin OUT output) (cfg STSADRS0_B STSADRS0) (conn STSADRS0INV OUT ==> DCM STSADRS0) (conn STSADRS0INV STSADRS0_B <== STSADRS0 STSADRS0) (conn STSADRS0INV STSADRS0 <== STSADRS0 STSADRS0) ) (element STSADRS1INV 3 (pin STSADRS1_B input) (pin STSADRS1 input) (pin OUT output) (cfg STSADRS1_B STSADRS1) (conn STSADRS1INV OUT ==> DCM STSADRS1) (conn STSADRS1INV STSADRS1_B <== STSADRS1 STSADRS1) (conn STSADRS1INV STSADRS1 <== STSADRS1 STSADRS1) ) (element STSADRS2INV 3 (pin STSADRS2_B input) (pin STSADRS2 input) (pin OUT output) (cfg STSADRS2_B STSADRS2) (conn STSADRS2INV OUT ==> DCM STSADRS2) (conn STSADRS2INV STSADRS2_B <== STSADRS2 STSADRS2) (conn STSADRS2INV STSADRS2 <== STSADRS2 STSADRS2) ) (element STSADRS3INV 3 (pin STSADRS3_B input) (pin STSADRS3 input) (pin OUT output) (cfg STSADRS3_B STSADRS3) (conn STSADRS3INV OUT ==> DCM STSADRS3) (conn STSADRS3INV STSADRS3_B <== STSADRS3 STSADRS3) (conn STSADRS3INV STSADRS3 <== STSADRS3 STSADRS3) ) (element STSADRS4INV 3 (pin STSADRS4_B input) (pin STSADRS4 input) (pin OUT output) (cfg STSADRS4_B STSADRS4) (conn STSADRS4INV OUT ==> DCM STSADRS4) (conn STSADRS4INV STSADRS4_B <== STSADRS4 STSADRS4) (conn STSADRS4INV STSADRS4 <== STSADRS4 STSADRS4) ) (element PSCLKINV 3 (pin PSCLK_B input) (pin PSCLK input) (pin OUT output) (cfg PSCLK_B PSCLK) (conn PSCLKINV OUT ==> DCM PSCLK) (conn PSCLKINV PSCLK_B <== PSCLK PSCLK) (conn PSCLKINV PSCLK <== PSCLK PSCLK) ) (element PSENINV 3 (pin PSEN_B input) (pin PSEN input) (pin OUT output) (cfg PSEN_B PSEN) (conn PSENINV OUT ==> DCM PSEN) (conn PSENINV PSEN_B <== PSEN PSEN) (conn PSENINV PSEN <== PSEN PSEN) ) (element PSINCDECINV 3 (pin PSINCDEC_B input) (pin PSINCDEC input) (pin OUT output) (cfg PSINCDEC_B PSINCDEC) (conn PSINCDECINV OUT ==> DCM PSINCDEC) (conn PSINCDECINV PSINCDEC_B <== PSINCDEC PSINCDEC) (conn PSINCDECINV PSINCDEC <== PSINCDEC PSINCDEC) ) (element RSTINV 3 (pin RST_B input) (pin RST input) (pin OUT output) (cfg RST_B RST) (conn RSTINV OUT ==> DCM RST) (conn RSTINV RST_B <== RST RST) (conn RSTINV RST <== RST RST) ) (element DSSENINV 3 (pin DSSEN_B input) (pin DSSEN input) (pin OUT output) (cfg DSSEN_B DSSEN) (conn DSSENINV OUT ==> DCM DSSEN) (conn DSSENINV DSSEN_B <== DSSEN DSSEN) (conn DSSENINV DSSEN <== DSSEN DSSEN) ) (element CTLOSC2INV 3 (pin CTLOSC2_B input) (pin CTLOSC2 input) (pin OUT output) (cfg CTLOSC2_B CTLOSC2) (conn CTLOSC2INV OUT ==> DCM CTLOSC2) (conn CTLOSC2INV CTLOSC2_B <== CTLOSC2 CTLOSC2) (conn CTLOSC2INV CTLOSC2 <== CTLOSC2 CTLOSC2) ) (element CTLOSC1INV 3 (pin CTLOSC1_B input) (pin CTLOSC1 input) (pin OUT output) (cfg CTLOSC1_B CTLOSC1) (conn CTLOSC1INV OUT ==> DCM CTLOSC1) (conn CTLOSC1INV CTLOSC1_B <== CTLOSC1 CTLOSC1) (conn CTLOSC1INV CTLOSC1 <== CTLOSC1 CTLOSC1) ) (element CTLGOINV 3 (pin CTLGO_B input) (pin CTLGO input) (pin OUT output) (cfg CTLGO_B CTLGO) (conn CTLGOINV OUT ==> DCM CTLGO) (conn CTLGOINV CTLGO_B <== CTLGO CTLGO) (conn CTLGOINV CTLGO <== CTLGO CTLGO) ) (element CTLSEL0INV 3 (pin CTLSEL0_B input) (pin CTLSEL0 input) (pin OUT output) (cfg CTLSEL0_B CTLSEL0) (conn CTLSEL0INV OUT ==> DCM CTLSEL0) (conn CTLSEL0INV CTLSEL0_B <== CTLSEL0 CTLSEL0) (conn CTLSEL0INV CTLSEL0 <== CTLSEL0 CTLSEL0) ) (element CTLSEL1INV 3 (pin CTLSEL1_B input) (pin CTLSEL1 input) (pin OUT output) (cfg CTLSEL1_B CTLSEL1) (conn CTLSEL1INV OUT ==> DCM CTLSEL1) (conn CTLSEL1INV CTLSEL1_B <== CTLSEL1 CTLSEL1) (conn CTLSEL1INV CTLSEL1 <== CTLSEL1 CTLSEL1) ) (element CTLSEL2INV 3 (pin CTLSEL2_B input) (pin CTLSEL2 input) (pin OUT output) (cfg CTLSEL2_B CTLSEL2) (conn CTLSEL2INV OUT ==> DCM CTLSEL2) (conn CTLSEL2INV CTLSEL2_B <== CTLSEL2 CTLSEL2) (conn CTLSEL2INV CTLSEL2 <== CTLSEL2 CTLSEL2) ) (element CTLMODEINV 3 (pin CTLMODE_B input) (pin CTLMODE input) (pin OUT output) (cfg CTLMODE_B CTLMODE) (conn CTLMODEINV OUT ==> DCM CTLMODE) (conn CTLMODEINV CTLMODE_B <== CTLMODE CTLMODE) (conn CTLMODEINV CTLMODE <== CTLMODE CTLMODE) ) (element CLK_FEEDBACK 0 (cfg 1X 2X) ) (element CLKFX 1 (pin CLKFX input) (conn CLKFX CLKFX <== DCM CLKFX) ) (element CLKFX180 1 (pin CLKFX180 input) (conn CLKFX180 CLKFX180 <== DCM CLKFX180) ) (element STATUS7 1 (pin STATUS7 input) (conn STATUS7 STATUS7 <== DCM STATUS7) ) (element STATUS6 1 (pin STATUS6 input) (conn STATUS6 STATUS6 <== DCM STATUS6) ) (element STATUS5 1 (pin STATUS5 input) (conn STATUS5 STATUS5 <== DCM STATUS5) ) (element STATUS4 1 (pin STATUS4 input) (conn STATUS4 STATUS4 <== DCM STATUS4) ) (element STATUS3 1 (pin STATUS3 input) (conn STATUS3 STATUS3 <== DCM STATUS3) ) (element STATUS2 1 (pin STATUS2 input) (conn STATUS2 STATUS2 <== DCM STATUS2) ) (element STATUS1 1 (pin STATUS1 input) (conn STATUS1 STATUS1 <== DCM STATUS1) ) (element STATUS0 1 (pin STATUS0 input) (conn STATUS0 STATUS0 <== DCM STATUS0) ) (element PSDONE 1 (pin PSDONE input) (conn PSDONE PSDONE <== DCM PSDONE) ) (element CONCUR 1 (pin CONCUR input) (conn CONCUR CONCUR <== DCM CONCUR) ) (element CTLMODE 1 (pin CTLMODE output) (conn CTLMODE CTLMODE ==> CTLMODEINV CTLMODE_B) (conn CTLMODE CTLMODE ==> CTLMODEINV CTLMODE) ) (element CTLSEL2 1 (pin CTLSEL2 output) (conn CTLSEL2 CTLSEL2 ==> CTLSEL2INV CTLSEL2_B) (conn CTLSEL2 CTLSEL2 ==> CTLSEL2INV CTLSEL2) ) (element CTLSEL1 1 (pin CTLSEL1 output) (conn CTLSEL1 CTLSEL1 ==> CTLSEL1INV CTLSEL1_B) (conn CTLSEL1 CTLSEL1 ==> CTLSEL1INV CTLSEL1) ) (element CTLSEL0 1 (pin CTLSEL0 output) (conn CTLSEL0 CTLSEL0 ==> CTLSEL0INV CTLSEL0_B) (conn CTLSEL0 CTLSEL0 ==> CTLSEL0INV CTLSEL0) ) (element CTLGO 1 (pin CTLGO output) (conn CTLGO CTLGO ==> CTLGOINV CTLGO_B) (conn CTLGO CTLGO ==> CTLGOINV CTLGO) ) (element CTLOSC1 1 (pin CTLOSC1 output) (conn CTLOSC1 CTLOSC1 ==> CTLOSC1INV CTLOSC1_B) (conn CTLOSC1 CTLOSC1 ==> CTLOSC1INV CTLOSC1) ) (element CTLOSC2 1 (pin CTLOSC2 output) (conn CTLOSC2 CTLOSC2 ==> CTLOSC2INV CTLOSC2_B) (conn CTLOSC2 CTLOSC2 ==> CTLOSC2INV CTLOSC2) ) (element PSINCDEC 1 (pin PSINCDEC output) (conn PSINCDEC PSINCDEC ==> PSINCDECINV PSINCDEC_B) (conn PSINCDEC PSINCDEC ==> PSINCDECINV PSINCDEC) ) (element PSEN 1 (pin PSEN output) (conn PSEN PSEN ==> PSENINV PSEN_B) (conn PSEN PSEN ==> PSENINV PSEN) ) (element PSCLK 1 (pin PSCLK output) (conn PSCLK PSCLK ==> PSCLKINV PSCLK_B) (conn PSCLK PSCLK ==> PSCLKINV PSCLK) ) (element FREEZEDLL 1 (pin FREEZEDLL output) (conn FREEZEDLL FREEZEDLL ==> FREEZEDLLINV FREEZEDLL_B) (conn FREEZEDLL FREEZEDLL ==> FREEZEDLLINV FREEZEDLL) ) (element FREEZEDFS 1 (pin FREEZEDFS output) (conn FREEZEDFS FREEZEDFS ==> FREEZEDFSINV FREEZEDFS_B) (conn FREEZEDFS FREEZEDFS ==> FREEZEDFSINV FREEZEDFS) ) (element STSADRS0 1 (pin STSADRS0 output) (conn STSADRS0 STSADRS0 ==> STSADRS0INV STSADRS0_B) (conn STSADRS0 STSADRS0 ==> STSADRS0INV STSADRS0) ) (element STSADRS1 1 (pin STSADRS1 output) (conn STSADRS1 STSADRS1 ==> STSADRS1INV STSADRS1_B) (conn STSADRS1 STSADRS1 ==> STSADRS1INV STSADRS1) ) (element STSADRS2 1 (pin STSADRS2 output) (conn STSADRS2 STSADRS2 ==> STSADRS2INV STSADRS2_B) (conn STSADRS2 STSADRS2 ==> STSADRS2INV STSADRS2) ) (element STSADRS3 1 (pin STSADRS3 output) (conn STSADRS3 STSADRS3 ==> STSADRS3INV STSADRS3_B) (conn STSADRS3 STSADRS3 ==> STSADRS3INV STSADRS3) ) (element STSADRS4 1 (pin STSADRS4 output) (conn STSADRS4 STSADRS4 ==> STSADRS4INV STSADRS4_B) (conn STSADRS4 STSADRS4 ==> STSADRS4INV STSADRS4) ) (element CLKOUT_PHASE_SHIFT 0 (cfg NONE FIXED VARIABLE) ) (element CLKIN_DIVIDE_BY_2 0 (cfg CLKIN_DIVIDE_BY_2) ) (element VERY_HIGH_FREQUENCY 0 (cfg VERY_HIGH_FREQUENCY) ) (element DSS_MODE 0 (cfg NONE SPREAD_2 SPREAD_4 SPREAD_6 SPREAD_8) ) (element DCM 41 # BEL (pin FREEZEDLL input) (pin FREEZEDFS input) (pin STSADRS0 input) (pin STSADRS1 input) (pin STSADRS2 input) (pin STSADRS3 input) (pin STSADRS4 input) (pin PSCLK input) (pin PSEN input) (pin PSINCDEC input) (pin DSSEN input) (pin RST input) (pin CTLOSC2 input) (pin CTLOSC1 input) (pin CTLGO input) (pin CTLSEL0 input) (pin CTLSEL1 input) (pin CTLSEL2 input) (pin CTLMODE input) (pin CLKFB input) (pin CLKIN input) (pin CONCUR output) (pin PSDONE output) (pin STATUS0 output) (pin STATUS1 output) (pin STATUS2 output) (pin STATUS3 output) (pin STATUS4 output) (pin STATUS5 output) (pin STATUS6 output) (pin STATUS7 output) (pin LOCKED output) (pin CLKFX180 output) (pin CLKFX output) (pin CLKDV output) (pin CLK2X180 output) (pin CLK2X output) (pin CLK270 output) (pin CLK180 output) (pin CLK90 output) (pin CLK0 output) (conn DCM CONCUR ==> CONCUR CONCUR) (conn DCM PSDONE ==> PSDONE PSDONE) (conn DCM STATUS0 ==> STATUS0 STATUS0) (conn DCM STATUS1 ==> STATUS1 STATUS1) (conn DCM STATUS2 ==> STATUS2 STATUS2) (conn DCM STATUS3 ==> STATUS3 STATUS3) (conn DCM STATUS4 ==> STATUS4 STATUS4) (conn DCM STATUS5 ==> STATUS5 STATUS5) (conn DCM STATUS6 ==> STATUS6 STATUS6) (conn DCM STATUS7 ==> STATUS7 STATUS7) (conn DCM LOCKED ==> LOCKED LOCKED) (conn DCM CLKFX180 ==> CLKFX180 CLKFX180) (conn DCM CLKFX ==> CLKFX CLKFX) (conn DCM CLKDV ==> CLKDV CLKDV) (conn DCM CLK2X180 ==> CLK2X180 CLK2X180) (conn DCM CLK2X ==> CLK2X CLK2X) (conn DCM CLK270 ==> CLK270 CLK270) (conn DCM CLK180 ==> CLK180 CLK180) (conn DCM CLK90 ==> CLK90 CLK90) (conn DCM CLK0 ==> CLK0 CLK0) (conn DCM FREEZEDLL <== FREEZEDLLINV OUT) (conn DCM FREEZEDFS <== FREEZEDFSINV OUT) (conn DCM STSADRS0 <== STSADRS0INV OUT) (conn DCM STSADRS1 <== STSADRS1INV OUT) (conn DCM STSADRS2 <== STSADRS2INV OUT) (conn DCM STSADRS3 <== STSADRS3INV OUT) (conn DCM STSADRS4 <== STSADRS4INV OUT) (conn DCM PSCLK <== PSCLKINV OUT) (conn DCM PSEN <== PSENINV OUT) (conn DCM PSINCDEC <== PSINCDECINV OUT) (conn DCM DSSEN <== DSSENINV OUT) (conn DCM RST <== RSTINV OUT) (conn DCM CTLOSC2 <== CTLOSC2INV OUT) (conn DCM CTLOSC1 <== CTLOSC1INV OUT) (conn DCM CTLGO <== CTLGOINV OUT) (conn DCM CTLSEL0 <== CTLSEL0INV OUT) (conn DCM CTLSEL1 <== CTLSEL1INV OUT) (conn DCM CTLSEL2 <== CTLSEL2INV OUT) (conn DCM CTLMODE <== CTLMODEINV OUT) (conn DCM CLKFB <== CLKFB CLKFB) (conn DCM CLKIN <== CLKIN CLKIN) ) (element DESKEW_ADJUST 0 (cfg 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) ) ) (primitive_def DIFFM 21 83 (pin REV REV input) (pin SR SR input) (pin OTCLK2 OTCLK2 input) (pin OTCLK1 OTCLK1 input) (pin OCE OCE input) (pin O2 O2 input) (pin O1 O1 input) (pin TCE TCE input) (pin T2 T2 input) (pin T1 T1 input) (pin T T output) (pin ICLK2 ICLK2 input) (pin ICLK1 ICLK1 input) (pin ICE ICE input) (pin IQ2 IQ2 output) (pin IQ1 IQ1 output) (pin I I output) (pin DIFFI_IN DIFFI_IN input) (pin DIFFO_OUT DIFFO_OUT output) (pin PADOUT PADOUT output) (pin DIFFO_IN DIFFO_IN input) (element SRINV 3 (pin SR_B input) (pin SR input) (pin OUT output) (cfg SR_B SR) (conn SRINV OUT ==> OSR_USED 0) (conn SRINV OUT ==> TSR_USED 0) (conn SRINV OUT ==> ISR_USED 0) (conn SRINV SR_B <== SR SR) (conn SRINV SR <== SR SR) ) (element REV 1 (pin REV output) (conn REV REV ==> REVINV REV_B) (conn REV REV ==> REVINV REV) ) (element REVINV 3 (pin REV_B input) (pin REV input) (pin OUT output) (cfg REV_B REV) (conn REVINV OUT ==> IREV_USED 0) (conn REVINV OUT ==> OREV_USED 0) (conn REVINV OUT ==> TREV_USED 0) (conn REVINV REV_B <== REV REV) (conn REVINV REV <== REV REV) ) (element OTCLK2 1 (pin OTCLK2 output) (conn OTCLK2 OTCLK2 ==> OTCLK2INV OTCLK2_B) (conn OTCLK2 OTCLK2 ==> OTCLK2INV OTCLK2) ) (element SR 1 (pin SR output) (conn SR SR ==> SRINV SR_B) (conn SR SR ==> SRINV SR) ) (element O2 1 (pin O2 output) (conn O2 O2 ==> O2INV O2_B) (conn O2 O2 ==> O2INV O2) ) (element OCE 1 (pin OCE output) (conn OCE OCE ==> OCEINV OCE_B) (conn OCE OCE ==> OCEINV OCE) ) (element O2INV 3 (pin O2_B input) (pin O2 input) (pin OUT output) (cfg O2_B O2) (conn O2INV OUT ==> OFF2 D) (conn O2INV OUT ==> OMUX O2) (conn O2INV O2_B <== O2 O2) (conn O2INV O2 <== O2 O2) ) (element OCEINV 3 (pin OCE_B input) (pin OCE input) (pin OUT output) (cfg OCE_B OCE) (conn OCEINV OUT ==> OFF2 CE) (conn OCEINV OUT ==> OFF1 CE) (conn OCEINV OCE_B <== OCE OCE) (conn OCEINV OCE <== OCE OCE) ) (element OFFDDRBLACKBOX 3 # BEL (pin OFF2 input) (pin OFF1 input) (pin OFFDDR output) (conn OFFDDRBLACKBOX OFFDDR ==> OMUX OFFDDR) (conn OFFDDRBLACKBOX OFF2 <== OFF2 Q) (conn OFFDDRBLACKBOX OFF1 <== OFF1 Q) ) (element OFF2 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn OFF2 Q ==> OFFDDRBLACKBOX OFF2) (conn OFF2 Q ==> OMUX OFF2) (conn OFF2 CK <== OTCLK2INV OUT) (conn OFF2 CE <== OCEINV OUT) (conn OFF2 D <== O2INV OUT) (conn OFF2 SR <== OSR_USED OUT) (conn OFF2 REV <== OREV_USED OUT) ) (element OMUX 6 (pin OFF2 input) (pin O2 input) (pin OFFDDR input) (pin OFF1 input) (pin O1 input) (pin OUT output) (cfg OFF2 O2 OFFDDR OFF1 O1) (conn OMUX OUT ==> OUTBUF IN) (conn OMUX OUT ==> IFFSELMUX 0) (conn OMUX OUT ==> ISELMUX 0) (conn OMUX OFF2 <== OFF2 Q) (conn OMUX O2 <== O2INV OUT) (conn OMUX OFFDDR <== OFFDDRBLACKBOX OFFDDR) (conn OMUX OFF1 <== OFF1 Q) (conn OMUX O1 <== O1INV OUT) ) (element OTCLK1 1 (pin OTCLK1 output) (conn OTCLK1 OTCLK1 ==> OTCLK1INV OTCLK1_B) (conn OTCLK1 OTCLK1 ==> OTCLK1INV OTCLK1) ) (element O1 1 (pin O1 output) (conn O1 O1 ==> O1INV O1_B) (conn O1 O1 ==> O1INV O1) ) (element T2 1 (pin T2 output) (conn T2 T2 ==> T2INV T2_B) (conn T2 T2 ==> T2INV T2) ) (element O1INV 3 (pin O1_B input) (pin O1 input) (pin OUT output) (cfg O1_B O1) (conn O1INV OUT ==> OMUX O1) (conn O1INV OUT ==> OFF1 D) (conn O1INV O1_B <== O1 O1) (conn O1INV O1 <== O1 O1) ) (element T2INV 3 (pin T2_B input) (pin T2 input) (pin OUT output) (cfg T2_B T2) (conn T2INV OUT ==> TMUX T2) (conn T2INV OUT ==> TFF2 D) (conn T2INV T2_B <== T2 T2) (conn T2INV T2 <== T2 T2) ) (element TCE 1 (pin TCE output) (conn TCE TCE ==> TCEINV TCE_B) (conn TCE TCE ==> TCEINV TCE) ) (element T1 1 (pin T1 output) (conn T1 T1 ==> T1INV T1_B) (conn T1 T1 ==> T1INV T1) ) (element T1INV 3 (pin T1_B input) (pin T1 input) (pin OUT output) (cfg T1_B T1) (conn T1INV OUT ==> TMUX T1) (conn T1INV OUT ==> TFF1 D) (conn T1INV T1_B <== T1 T1) (conn T1INV T1 <== T1 T1) ) (element TCEINV 3 (pin TCE_B input) (pin TCE input) (pin OUT output) (cfg TCE_B TCE) (conn TCEINV OUT ==> TFF2 CE) (conn TCEINV OUT ==> TFF1 CE) (conn TCEINV TCE_B <== TCE TCE) (conn TCEINV TCE <== TCE TCE) ) (element TMUX 6 (pin TFF2 input) (pin T2 input) (pin TFFDDR input) (pin TFF1 input) (pin T1 input) (pin T output) (cfg TFF2 T2 TFFDDR TFF1 T1) (conn TMUX T ==> OUTBUF TRI) (conn TMUX T ==> T_USED 0) (conn TMUX T ==> TSMUX 1) (conn TMUX TFF2 <== TFF2 Q) (conn TMUX T2 <== T2INV OUT) (conn TMUX TFFDDR <== TFFDDRBLACKBOX TFFDDR) (conn TMUX TFF1 <== TFF1 Q) (conn TMUX T1 <== T1INV OUT) ) (element OFF1 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn OFF1 Q ==> OFFDDRBLACKBOX OFF1) (conn OFF1 Q ==> OMUX OFF1) (conn OFF1 CK <== OTCLK1INV OUT) (conn OFF1 CE <== OCEINV OUT) (conn OFF1 D <== O1INV OUT) (conn OFF1 SR <== OSR_USED OUT) (conn OFF1 REV <== OREV_USED OUT) ) (element TFF2 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn TFF2 Q ==> TMUX TFF2) (conn TFF2 Q ==> TFFDDRBLACKBOX TFF2) (conn TFF2 CK <== OTCLK2INV OUT) (conn TFF2 CE <== TCEINV OUT) (conn TFF2 D <== T2INV OUT) (conn TFF2 SR <== TSR_USED OUT) (conn TFF2 REV <== TREV_USED OUT) ) (element TFF1 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn TFF1 Q ==> TMUX TFF1) (conn TFF1 Q ==> TFFDDRBLACKBOX TFF1) (conn TFF1 CK <== OTCLK1INV OUT) (conn TFF1 CE <== TCEINV OUT) (conn TFF1 D <== T1INV OUT) (conn TFF1 SR <== TSR_USED OUT) (conn TFF1 REV <== TREV_USED OUT) ) (element IFF2 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn IFF2 Q ==> IQ2 IQ2) (conn IFF2 CK <== ICLK2INV OUT) (conn IFF2 CE <== ICEINV OUT) (conn IFF2 D <== IFFDMUX OUT) (conn IFF2 SR <== ISR_USED OUT) (conn IFF2 REV <== IREV_USED OUT) ) (element IFFATTRBOX 0 (cfg SYNC ASYNC) ) (element OFFATTRBOX 0 (cfg SYNC ASYNC) ) (element TFFATTRBOX 0 (cfg SYNC ASYNC) ) (element ICLK2 1 (pin ICLK2 output) (conn ICLK2 ICLK2 ==> ICLK2INV ICLK2_B) (conn ICLK2 ICLK2 ==> ICLK2INV ICLK2) ) (element ICE 1 (pin ICE output) (conn ICE ICE ==> ICEINV ICE_B) (conn ICE ICE ==> ICEINV ICE) ) (element ICLK2INV 3 (pin ICLK2_B input) (pin ICLK2 input) (pin OUT output) (cfg ICLK2_B ICLK2) (conn ICLK2INV OUT ==> IFF2 CK) (conn ICLK2INV ICLK2_B <== ICLK2 ICLK2) (conn ICLK2INV ICLK2 <== ICLK2 ICLK2) ) (element IQ2 1 (pin IQ2 input) (conn IQ2 IQ2 <== IFF2 Q) ) (element IFF1 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn IFF1 Q ==> IQ1 IQ1) (conn IFF1 CK <== ICLK1INV OUT) (conn IFF1 CE <== ICEINV OUT) (conn IFF1 D <== IFFDMUX OUT) (conn IFF1 SR <== ISR_USED OUT) (conn IFF1 REV <== IREV_USED OUT) ) (element ICLK1 1 (pin ICLK1 output) (conn ICLK1 ICLK1 ==> ICLK1INV ICLK1_B) (conn ICLK1 ICLK1 ==> ICLK1INV ICLK1) ) (element ICLK1INV 3 (pin ICLK1_B input) (pin ICLK1 input) (pin OUT output) (cfg ICLK1_B ICLK1) (conn ICLK1INV OUT ==> IFF1 CK) (conn ICLK1INV ICLK1_B <== ICLK1 ICLK1) (conn ICLK1INV ICLK1 <== ICLK1 ICLK1) ) (element IQ1 1 (pin IQ1 input) (conn IQ1 IQ1 <== IFF1 Q) ) (element I 1 (pin I input) (conn I I <== IMUX OUT) ) (element TFF1_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element TFF1_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element TFF2_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element TFF2_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element OFF1_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element OFF1_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element OFF2_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element OFF2_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element IFF1_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element IFF1_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element IFF2_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element IFF2_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element PULL 0 (cfg KEEPER PULLDOWN PULLUP) ) (element PAD 1 # BEL (pin PAD input) (conn PAD PAD ==> INBUF PAD) (conn PAD PAD ==> PADOUT_USED 0) (conn PAD PAD <== OUTBUF OUTP) ) (element INBUF 3 # BEL (pin DIFFI_IN input) (pin PAD input) (pin OUT output) (conn INBUF OUT ==> IDELMUX 1) (conn INBUF OUT ==> IFFDELMUX 1) (conn INBUF OUT ==> DELAY IN) (conn INBUF DIFFI_IN <== DIFFI_IN DIFFI_IN) (conn INBUF PAD <== PAD PAD) (conn INBUF PAD <== OUTBUF OUTP) ) (element OUTBUF 5 # BEL (pin IN input) (pin DIFFO_IN input) (pin TRI input) (pin OUTP output) (pin OUTN output) (conn OUTBUF OUTP ==> PAD PAD) (conn OUTBUF OUTP ==> INBUF PAD) (conn OUTBUF OUTP ==> PADOUT_USED 0) (conn OUTBUF OUTN ==> DIFFO_OUT DIFFO_OUT) (conn OUTBUF IN <== OMUX OUT) (conn OUTBUF DIFFO_IN <== DIFFO_IN_USED OUT) (conn OUTBUF TRI <== TMUX T) ) (element DIFFI_IN 1 (pin DIFFI_IN output) (conn DIFFI_IN DIFFI_IN ==> INBUF DIFFI_IN) ) (element DIFFO_OUT 1 (pin DIFFO_OUT input) (conn DIFFO_OUT DIFFO_OUT <== OUTBUF OUTN) ) (element T 1 (pin T input) (conn T T <== T_USED OUT) ) (element T_USED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn T_USED OUT ==> T T) (conn T_USED 0 <== TMUX T) ) (element IOATTRBOX 0 (cfg LVDS_25_DCI LVDSEXT_25_DCI LVDS_25 LVDSEXT_25 LVPECL_25 BLVDS_25 ULVDS_25 LDT_25 RSDS_25 DIFF_HSTL_II_18 DIFF_SSTL2_II DIFF_HSTL_II_DCI_18 DIFF_SSTL2_II_DCI) ) (element TFFDDRBLACKBOX 3 # BEL (pin TFF2 input) (pin TFF1 input) (pin TFFDDR output) (conn TFFDDRBLACKBOX TFFDDR ==> TMUX TFFDDR) (conn TFFDDRBLACKBOX TFF2 <== TFF2 Q) (conn TFFDDRBLACKBOX TFF1 <== TFF1 Q) ) (element OSR_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn OSR_USED OUT ==> OFF2 SR) (conn OSR_USED OUT ==> OFF1 SR) (conn OSR_USED 0 <== SRINV OUT) ) (element TSR_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn TSR_USED OUT ==> TFF2 SR) (conn TSR_USED OUT ==> TFF1 SR) (conn TSR_USED 0 <== SRINV OUT) ) (element ISR_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn ISR_USED OUT ==> IFF2 SR) (conn ISR_USED OUT ==> IFF1 SR) (conn ISR_USED 0 <== SRINV OUT) ) (element IREV_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn IREV_USED OUT ==> IFF2 REV) (conn IREV_USED OUT ==> IFF1 REV) (conn IREV_USED 0 <== REVINV OUT) ) (element OREV_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn OREV_USED OUT ==> OFF2 REV) (conn OREV_USED OUT ==> OFF1 REV) (conn OREV_USED 0 <== REVINV OUT) ) (element TREV_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn TREV_USED OUT ==> TFF2 REV) (conn TREV_USED OUT ==> TFF1 REV) (conn TREV_USED 0 <== REVINV OUT) ) (element IDELMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IDELMUX OUT ==> IMUX 1) (conn IDELMUX OUT ==> ISELMUX 1) (conn IDELMUX 0 <== DELAY OUT) (conn IDELMUX 1 <== INBUF OUT) ) (element IMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IMUX OUT ==> I I) (conn IMUX 0 <== ISELMUX OUT) (conn IMUX 1 <== IDELMUX OUT) ) (element IFFDELMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IFFDELMUX OUT ==> IFFDMUX 1) (conn IFFDELMUX OUT ==> IFFSELMUX 1) (conn IFFDELMUX 0 <== DELAY OUT) (conn IFFDELMUX 1 <== INBUF OUT) ) (element IFFDMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IFFDMUX OUT ==> IFF2 D) (conn IFFDMUX OUT ==> IFF1 D) (conn IFFDMUX 0 <== IFFSELMUX OUT) (conn IFFDMUX 1 <== IFFDELMUX OUT) ) (element TSMUX_GND 1 # BEL (pin 0 output) (conn TSMUX_GND 0 ==> TSMUX 0) ) (element DELAY 2 # BEL (pin IN input) (pin OUT output) (conn DELAY OUT ==> IDELMUX 0) (conn DELAY OUT ==> IFFDELMUX 0) (conn DELAY IN <== INBUF OUT) ) (element IFFSELMUX 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn IFFSELMUX OUT ==> IFFDMUX 0) (conn IFFSELMUX 0 <== OMUX OUT) (conn IFFSELMUX 1 <== IFFDELMUX OUT) (conn IFFSELMUX S0 <== TSMUX OUT) ) (element ISELMUX 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn ISELMUX OUT ==> IMUX 0) (conn ISELMUX 0 <== OMUX OUT) (conn ISELMUX 1 <== IDELMUX OUT) (conn ISELMUX S0 <== TSMUX OUT) ) (element TSMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn TSMUX OUT ==> IFFSELMUX S0) (conn TSMUX OUT ==> ISELMUX S0) (conn TSMUX 0 <== TSMUX_GND 0) (conn TSMUX 1 <== TMUX T) ) (element OTCLK1INV 3 (pin OTCLK1_B input) (pin OTCLK1 input) (pin OUT output) (cfg OTCLK1_B OTCLK1) (conn OTCLK1INV OUT ==> OFF1 CK) (conn OTCLK1INV OUT ==> TFF1 CK) (conn OTCLK1INV OTCLK1_B <== OTCLK1 OTCLK1) (conn OTCLK1INV OTCLK1 <== OTCLK1 OTCLK1) ) (element OTCLK2INV 3 (pin OTCLK2_B input) (pin OTCLK2 input) (pin OUT output) (cfg OTCLK2_B OTCLK2) (conn OTCLK2INV OUT ==> OFF2 CK) (conn OTCLK2INV OUT ==> TFF2 CK) (conn OTCLK2INV OTCLK2_B <== OTCLK2 OTCLK2) (conn OTCLK2INV OTCLK2 <== OTCLK2 OTCLK2) ) (element ICEINV 3 (pin ICE_B input) (pin ICE input) (pin OUT output) (cfg ICE_B ICE) (conn ICEINV OUT ==> IFF2 CE) (conn ICEINV OUT ==> IFF1 CE) (conn ICEINV ICE_B <== ICE ICE) (conn ICEINV ICE <== ICE ICE) ) (element GTSATTRBOX 0 (cfg DISABLE_GTS) ) (element PADOUT 1 (pin PADOUT input) (conn PADOUT PADOUT <== PADOUT_USED OUT) ) (element PADOUT_USED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn PADOUT_USED OUT ==> PADOUT PADOUT) (conn PADOUT_USED 0 <== PAD PAD) (conn PADOUT_USED 0 <== OUTBUF OUTP) ) (element DIFFO_IN_USED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn DIFFO_IN_USED OUT ==> OUTBUF DIFFO_IN) (conn DIFFO_IN_USED 0 <== DIFFO_IN DIFFO_IN) ) (element DIFFO_IN 1 (pin DIFFO_IN output) (conn DIFFO_IN DIFFO_IN ==> DIFFO_IN_USED 0) ) ) (primitive_def DIFFS 21 83 (pin REV REV input) (pin SR SR input) (pin OTCLK2 OTCLK2 input) (pin OTCLK1 OTCLK1 input) (pin OCE OCE input) (pin O2 O2 input) (pin O1 O1 input) (pin TCE TCE input) (pin T2 T2 input) (pin T1 T1 input) (pin T T output) (pin ICLK2 ICLK2 input) (pin ICLK1 ICLK1 input) (pin ICE ICE input) (pin IQ2 IQ2 output) (pin IQ1 IQ1 output) (pin I I output) (pin DIFFI_IN DIFFI_IN input) (pin DIFFO_OUT DIFFO_OUT output) (pin PADOUT PADOUT output) (pin DIFFO_IN DIFFO_IN input) (element SRINV 3 (pin SR_B input) (pin SR input) (pin OUT output) (cfg SR_B SR) (conn SRINV OUT ==> OSR_USED 0) (conn SRINV OUT ==> TSR_USED 0) (conn SRINV OUT ==> ISR_USED 0) (conn SRINV SR_B <== SR SR) (conn SRINV SR <== SR SR) ) (element REV 1 (pin REV output) (conn REV REV ==> REVINV REV_B) (conn REV REV ==> REVINV REV) ) (element REVINV 3 (pin REV_B input) (pin REV input) (pin OUT output) (cfg REV_B REV) (conn REVINV OUT ==> IREV_USED 0) (conn REVINV OUT ==> OREV_USED 0) (conn REVINV OUT ==> TREV_USED 0) (conn REVINV REV_B <== REV REV) (conn REVINV REV <== REV REV) ) (element OTCLK2 1 (pin OTCLK2 output) (conn OTCLK2 OTCLK2 ==> OTCLK2INV OTCLK2_B) (conn OTCLK2 OTCLK2 ==> OTCLK2INV OTCLK2) ) (element SR 1 (pin SR output) (conn SR SR ==> SRINV SR_B) (conn SR SR ==> SRINV SR) ) (element O2 1 (pin O2 output) (conn O2 O2 ==> O2INV O2_B) (conn O2 O2 ==> O2INV O2) ) (element OCE 1 (pin OCE output) (conn OCE OCE ==> OCEINV OCE_B) (conn OCE OCE ==> OCEINV OCE) ) (element O2INV 3 (pin O2_B input) (pin O2 input) (pin OUT output) (cfg O2_B O2) (conn O2INV OUT ==> OFF2 D) (conn O2INV OUT ==> OMUX O2) (conn O2INV O2_B <== O2 O2) (conn O2INV O2 <== O2 O2) ) (element OCEINV 3 (pin OCE_B input) (pin OCE input) (pin OUT output) (cfg OCE_B OCE) (conn OCEINV OUT ==> OFF2 CE) (conn OCEINV OUT ==> OFF1 CE) (conn OCEINV OCE_B <== OCE OCE) (conn OCEINV OCE <== OCE OCE) ) (element OFFDDRBLACKBOX 3 # BEL (pin OFF2 input) (pin OFF1 input) (pin OFFDDR output) (conn OFFDDRBLACKBOX OFFDDR ==> OMUX OFFDDR) (conn OFFDDRBLACKBOX OFF2 <== OFF2 Q) (conn OFFDDRBLACKBOX OFF1 <== OFF1 Q) ) (element OFF2 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn OFF2 Q ==> OFFDDRBLACKBOX OFF2) (conn OFF2 Q ==> OMUX OFF2) (conn OFF2 CK <== OTCLK2INV OUT) (conn OFF2 CE <== OCEINV OUT) (conn OFF2 D <== O2INV OUT) (conn OFF2 SR <== OSR_USED OUT) (conn OFF2 REV <== OREV_USED OUT) ) (element OMUX 6 (pin OFF2 input) (pin O2 input) (pin OFFDDR input) (pin OFF1 input) (pin O1 input) (pin OUT output) (cfg OFF2 O2 OFFDDR OFF1 O1) (conn OMUX OUT ==> OUTBUF IN) (conn OMUX OUT ==> IFFSELMUX 0) (conn OMUX OUT ==> ISELMUX 0) (conn OMUX OFF2 <== OFF2 Q) (conn OMUX O2 <== O2INV OUT) (conn OMUX OFFDDR <== OFFDDRBLACKBOX OFFDDR) (conn OMUX OFF1 <== OFF1 Q) (conn OMUX O1 <== O1INV OUT) ) (element OTCLK1 1 (pin OTCLK1 output) (conn OTCLK1 OTCLK1 ==> OTCLK1INV OTCLK1_B) (conn OTCLK1 OTCLK1 ==> OTCLK1INV OTCLK1) ) (element O1 1 (pin O1 output) (conn O1 O1 ==> O1INV O1_B) (conn O1 O1 ==> O1INV O1) ) (element T2 1 (pin T2 output) (conn T2 T2 ==> T2INV T2_B) (conn T2 T2 ==> T2INV T2) ) (element O1INV 3 (pin O1_B input) (pin O1 input) (pin OUT output) (cfg O1_B O1) (conn O1INV OUT ==> OMUX O1) (conn O1INV OUT ==> OFF1 D) (conn O1INV O1_B <== O1 O1) (conn O1INV O1 <== O1 O1) ) (element T2INV 3 (pin T2_B input) (pin T2 input) (pin OUT output) (cfg T2_B T2) (conn T2INV OUT ==> TMUX T2) (conn T2INV OUT ==> TFF2 D) (conn T2INV T2_B <== T2 T2) (conn T2INV T2 <== T2 T2) ) (element TCE 1 (pin TCE output) (conn TCE TCE ==> TCEINV TCE_B) (conn TCE TCE ==> TCEINV TCE) ) (element T1 1 (pin T1 output) (conn T1 T1 ==> T1INV T1_B) (conn T1 T1 ==> T1INV T1) ) (element T1INV 3 (pin T1_B input) (pin T1 input) (pin OUT output) (cfg T1_B T1) (conn T1INV OUT ==> TMUX T1) (conn T1INV OUT ==> TFF1 D) (conn T1INV T1_B <== T1 T1) (conn T1INV T1 <== T1 T1) ) (element TCEINV 3 (pin TCE_B input) (pin TCE input) (pin OUT output) (cfg TCE_B TCE) (conn TCEINV OUT ==> TFF2 CE) (conn TCEINV OUT ==> TFF1 CE) (conn TCEINV TCE_B <== TCE TCE) (conn TCEINV TCE <== TCE TCE) ) (element TMUX 6 (pin TFF2 input) (pin T2 input) (pin TFFDDR input) (pin TFF1 input) (pin T1 input) (pin T output) (cfg TFF2 T2 TFFDDR TFF1 T1) (conn TMUX T ==> OUTBUF TRI) (conn TMUX T ==> T_USED 0) (conn TMUX T ==> TSMUX 1) (conn TMUX TFF2 <== TFF2 Q) (conn TMUX T2 <== T2INV OUT) (conn TMUX TFFDDR <== TFFDDRBLACKBOX TFFDDR) (conn TMUX TFF1 <== TFF1 Q) (conn TMUX T1 <== T1INV OUT) ) (element OFF1 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn OFF1 Q ==> OFFDDRBLACKBOX OFF1) (conn OFF1 Q ==> OMUX OFF1) (conn OFF1 CK <== OTCLK1INV OUT) (conn OFF1 CE <== OCEINV OUT) (conn OFF1 D <== O1INV OUT) (conn OFF1 SR <== OSR_USED OUT) (conn OFF1 REV <== OREV_USED OUT) ) (element TFF2 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn TFF2 Q ==> TMUX TFF2) (conn TFF2 Q ==> TFFDDRBLACKBOX TFF2) (conn TFF2 CK <== OTCLK2INV OUT) (conn TFF2 CE <== TCEINV OUT) (conn TFF2 D <== T2INV OUT) (conn TFF2 SR <== TSR_USED OUT) (conn TFF2 REV <== TREV_USED OUT) ) (element TFF1 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn TFF1 Q ==> TMUX TFF1) (conn TFF1 Q ==> TFFDDRBLACKBOX TFF1) (conn TFF1 CK <== OTCLK1INV OUT) (conn TFF1 CE <== TCEINV OUT) (conn TFF1 D <== T1INV OUT) (conn TFF1 SR <== TSR_USED OUT) (conn TFF1 REV <== TREV_USED OUT) ) (element IFF2 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn IFF2 Q ==> IQ2 IQ2) (conn IFF2 CK <== ICLK2INV OUT) (conn IFF2 CE <== ICEINV OUT) (conn IFF2 D <== IFFDMUX OUT) (conn IFF2 SR <== ISR_USED OUT) (conn IFF2 REV <== IREV_USED OUT) ) (element IFFATTRBOX 0 (cfg SYNC ASYNC) ) (element OFFATTRBOX 0 (cfg SYNC ASYNC) ) (element TFFATTRBOX 0 (cfg SYNC ASYNC) ) (element ICLK2 1 (pin ICLK2 output) (conn ICLK2 ICLK2 ==> ICLK2INV ICLK2_B) (conn ICLK2 ICLK2 ==> ICLK2INV ICLK2) ) (element ICE 1 (pin ICE output) (conn ICE ICE ==> ICEINV ICE_B) (conn ICE ICE ==> ICEINV ICE) ) (element ICLK2INV 3 (pin ICLK2_B input) (pin ICLK2 input) (pin OUT output) (cfg ICLK2_B ICLK2) (conn ICLK2INV OUT ==> IFF2 CK) (conn ICLK2INV ICLK2_B <== ICLK2 ICLK2) (conn ICLK2INV ICLK2 <== ICLK2 ICLK2) ) (element IQ2 1 (pin IQ2 input) (conn IQ2 IQ2 <== IFF2 Q) ) (element IFF1 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn IFF1 Q ==> IQ1 IQ1) (conn IFF1 CK <== ICLK1INV OUT) (conn IFF1 CE <== ICEINV OUT) (conn IFF1 D <== IFFDMUX OUT) (conn IFF1 SR <== ISR_USED OUT) (conn IFF1 REV <== IREV_USED OUT) ) (element ICLK1 1 (pin ICLK1 output) (conn ICLK1 ICLK1 ==> ICLK1INV ICLK1_B) (conn ICLK1 ICLK1 ==> ICLK1INV ICLK1) ) (element ICLK1INV 3 (pin ICLK1_B input) (pin ICLK1 input) (pin OUT output) (cfg ICLK1_B ICLK1) (conn ICLK1INV OUT ==> IFF1 CK) (conn ICLK1INV ICLK1_B <== ICLK1 ICLK1) (conn ICLK1INV ICLK1 <== ICLK1 ICLK1) ) (element IQ1 1 (pin IQ1 input) (conn IQ1 IQ1 <== IFF1 Q) ) (element I 1 (pin I input) (conn I I <== IMUX OUT) ) (element TFF1_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element TFF1_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element TFF2_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element TFF2_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element OFF1_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element OFF1_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element OFF2_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element OFF2_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element IFF1_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element IFF1_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element IFF2_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element IFF2_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element PULL 0 (cfg KEEPER PULLDOWN PULLUP) ) (element PAD 1 # BEL (pin PAD input) (conn PAD PAD ==> INBUF PAD) (conn PAD PAD ==> PADOUT_USED 0) (conn PAD PAD <== OUTBUF OUTP) ) (element INBUF 3 # BEL (pin DIFFI_IN input) (pin PAD input) (pin OUT output) (conn INBUF OUT ==> IDELMUX 1) (conn INBUF OUT ==> IFFDELMUX 1) (conn INBUF OUT ==> DELAY IN) (conn INBUF DIFFI_IN <== DIFFI_IN DIFFI_IN) (conn INBUF PAD <== PAD PAD) (conn INBUF PAD <== OUTBUF OUTP) ) (element OUTBUF 5 # BEL (pin IN input) (pin DIFFO_IN input) (pin TRI input) (pin OUTP output) (pin OUTN output) (conn OUTBUF OUTP ==> PAD PAD) (conn OUTBUF OUTP ==> INBUF PAD) (conn OUTBUF OUTP ==> PADOUT_USED 0) (conn OUTBUF OUTN ==> DIFFO_OUT DIFFO_OUT) (conn OUTBUF IN <== OMUX OUT) (conn OUTBUF DIFFO_IN <== DIFFO_IN_USED OUT) (conn OUTBUF TRI <== TMUX T) ) (element DIFFI_IN 1 (pin DIFFI_IN output) (conn DIFFI_IN DIFFI_IN ==> INBUF DIFFI_IN) ) (element DIFFO_OUT 1 (pin DIFFO_OUT input) (conn DIFFO_OUT DIFFO_OUT <== OUTBUF OUTN) ) (element T 1 (pin T input) (conn T T <== T_USED OUT) ) (element T_USED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn T_USED OUT ==> T T) (conn T_USED 0 <== TMUX T) ) (element IOATTRBOX 0 (cfg LVDS_25_DCI LVDSEXT_25_DCI LVDS_25 LVDSEXT_25 LVPECL_25 BLVDS_25 ULVDS_25 LDT_25 RSDS_25 DIFF_HSTL_II_18 DIFF_SSTL2_II DIFF_HSTL_II_DCI_18 DIFF_SSTL2_II_DCI) ) (element TFFDDRBLACKBOX 3 # BEL (pin TFF2 input) (pin TFF1 input) (pin TFFDDR output) (conn TFFDDRBLACKBOX TFFDDR ==> TMUX TFFDDR) (conn TFFDDRBLACKBOX TFF2 <== TFF2 Q) (conn TFFDDRBLACKBOX TFF1 <== TFF1 Q) ) (element OSR_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn OSR_USED OUT ==> OFF2 SR) (conn OSR_USED OUT ==> OFF1 SR) (conn OSR_USED 0 <== SRINV OUT) ) (element TSR_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn TSR_USED OUT ==> TFF2 SR) (conn TSR_USED OUT ==> TFF1 SR) (conn TSR_USED 0 <== SRINV OUT) ) (element ISR_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn ISR_USED OUT ==> IFF2 SR) (conn ISR_USED OUT ==> IFF1 SR) (conn ISR_USED 0 <== SRINV OUT) ) (element IREV_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn IREV_USED OUT ==> IFF2 REV) (conn IREV_USED OUT ==> IFF1 REV) (conn IREV_USED 0 <== REVINV OUT) ) (element OREV_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn OREV_USED OUT ==> OFF2 REV) (conn OREV_USED OUT ==> OFF1 REV) (conn OREV_USED 0 <== REVINV OUT) ) (element TREV_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn TREV_USED OUT ==> TFF2 REV) (conn TREV_USED OUT ==> TFF1 REV) (conn TREV_USED 0 <== REVINV OUT) ) (element IDELMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IDELMUX OUT ==> IMUX 1) (conn IDELMUX OUT ==> ISELMUX 1) (conn IDELMUX 0 <== DELAY OUT) (conn IDELMUX 1 <== INBUF OUT) ) (element IMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IMUX OUT ==> I I) (conn IMUX 0 <== ISELMUX OUT) (conn IMUX 1 <== IDELMUX OUT) ) (element IFFDELMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IFFDELMUX OUT ==> IFFDMUX 1) (conn IFFDELMUX OUT ==> IFFSELMUX 1) (conn IFFDELMUX 0 <== DELAY OUT) (conn IFFDELMUX 1 <== INBUF OUT) ) (element IFFDMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IFFDMUX OUT ==> IFF2 D) (conn IFFDMUX OUT ==> IFF1 D) (conn IFFDMUX 0 <== IFFSELMUX OUT) (conn IFFDMUX 1 <== IFFDELMUX OUT) ) (element TSMUX_GND 1 # BEL (pin 0 output) (conn TSMUX_GND 0 ==> TSMUX 0) ) (element DELAY 2 # BEL (pin IN input) (pin OUT output) (conn DELAY OUT ==> IDELMUX 0) (conn DELAY OUT ==> IFFDELMUX 0) (conn DELAY IN <== INBUF OUT) ) (element IFFSELMUX 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn IFFSELMUX OUT ==> IFFDMUX 0) (conn IFFSELMUX 0 <== OMUX OUT) (conn IFFSELMUX 1 <== IFFDELMUX OUT) (conn IFFSELMUX S0 <== TSMUX OUT) ) (element ISELMUX 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn ISELMUX OUT ==> IMUX 0) (conn ISELMUX 0 <== OMUX OUT) (conn ISELMUX 1 <== IDELMUX OUT) (conn ISELMUX S0 <== TSMUX OUT) ) (element TSMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn TSMUX OUT ==> IFFSELMUX S0) (conn TSMUX OUT ==> ISELMUX S0) (conn TSMUX 0 <== TSMUX_GND 0) (conn TSMUX 1 <== TMUX T) ) (element OTCLK1INV 3 (pin OTCLK1_B input) (pin OTCLK1 input) (pin OUT output) (cfg OTCLK1_B OTCLK1) (conn OTCLK1INV OUT ==> OFF1 CK) (conn OTCLK1INV OUT ==> TFF1 CK) (conn OTCLK1INV OTCLK1_B <== OTCLK1 OTCLK1) (conn OTCLK1INV OTCLK1 <== OTCLK1 OTCLK1) ) (element OTCLK2INV 3 (pin OTCLK2_B input) (pin OTCLK2 input) (pin OUT output) (cfg OTCLK2_B OTCLK2) (conn OTCLK2INV OUT ==> OFF2 CK) (conn OTCLK2INV OUT ==> TFF2 CK) (conn OTCLK2INV OTCLK2_B <== OTCLK2 OTCLK2) (conn OTCLK2INV OTCLK2 <== OTCLK2 OTCLK2) ) (element ICEINV 3 (pin ICE_B input) (pin ICE input) (pin OUT output) (cfg ICE_B ICE) (conn ICEINV OUT ==> IFF2 CE) (conn ICEINV OUT ==> IFF1 CE) (conn ICEINV ICE_B <== ICE ICE) (conn ICEINV ICE <== ICE ICE) ) (element GTSATTRBOX 0 (cfg DISABLE_GTS) ) (element PADOUT 1 (pin PADOUT input) (conn PADOUT PADOUT <== PADOUT_USED OUT) ) (element PADOUT_USED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn PADOUT_USED OUT ==> PADOUT PADOUT) (conn PADOUT_USED 0 <== PAD PAD) (conn PADOUT_USED 0 <== OUTBUF OUTP) ) (element DIFFO_IN_USED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn DIFFO_IN_USED OUT ==> OUTBUF DIFFO_IN) (conn DIFFO_IN_USED 0 <== DIFFO_IN DIFFO_IN) ) (element DIFFO_IN 1 (pin DIFFO_IN output) (conn DIFFO_IN DIFFO_IN ==> DIFFO_IN_USED 0) ) ) (primitive_def GLOBALSIG 0 12 (element GLOBALSIG 4 # BEL (pin GHIGH output) (pin GWE output) (pin GSR output) (pin GSAVE output) (conn GLOBALSIG GHIGH ==> GHIGHANDUP 0) (conn GLOBALSIG GHIGH ==> GHIGHANDDOWN 1) (conn GLOBALSIG GWE ==> GWEANDUP 1) (conn GLOBALSIG GWE ==> GWEANDDOWN 0) (conn GLOBALSIG GSR ==> GSRANDUP 0) (conn GLOBALSIG GSR ==> GSRANDDOWN 1) (conn GLOBALSIG GSAVE ==> GSAVEANDUP 1) (conn GLOBALSIG GSAVE ==> GSAVEANDDOWN 0) ) (element GWEANDUP 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GWEANDUP 0 <== ENABLE_GLOBALS OUT) (conn GWEANDUP 1 <== GLOBALSIG GWE) ) (element GSRANDUP 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GSRANDUP 0 <== GLOBALSIG GSR) (conn GSRANDUP 1 <== ENABLE_GLOBALS OUT) ) (element GSAVEANDUP 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GSAVEANDUP 0 <== ENABLE_GLOBALS OUT) (conn GSAVEANDUP 1 <== GLOBALSIG GSAVE) ) (element GHIGHANDUP 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GHIGHANDUP 0 <== GLOBALSIG GHIGH) (conn GHIGHANDUP 1 <== ENABLE_GLOBALS OUT) ) (element GSAVEANDDOWN 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GSAVEANDDOWN 0 <== GLOBALSIG GSAVE) (conn GSAVEANDDOWN 1 <== ENABLE_GLOBALS OUT) ) (element GSRANDDOWN 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GSRANDDOWN 0 <== ENABLE_GLOBALS OUT) (conn GSRANDDOWN 1 <== GLOBALSIG GSR) ) (element GWEANDDOWN 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GWEANDDOWN 0 <== GLOBALSIG GWE) (conn GWEANDDOWN 1 <== ENABLE_GLOBALS OUT) ) (element GHIGHANDDOWN 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GHIGHANDDOWN 0 <== ENABLE_GLOBALS OUT) (conn GHIGHANDDOWN 1 <== GLOBALSIG GHIGH) ) (element ENABLE_GLOBALS 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn ENABLE_GLOBALS OUT ==> GWEANDUP 0) (conn ENABLE_GLOBALS OUT ==> GSRANDUP 1) (conn ENABLE_GLOBALS OUT ==> GSAVEANDUP 0) (conn ENABLE_GLOBALS OUT ==> GHIGHANDUP 1) (conn ENABLE_GLOBALS OUT ==> GSAVEANDDOWN 1) (conn ENABLE_GLOBALS OUT ==> GSRANDDOWN 0) (conn ENABLE_GLOBALS OUT ==> GWEANDDOWN 1) (conn ENABLE_GLOBALS OUT ==> GHIGHANDDOWN 0) (conn ENABLE_GLOBALS 0 <== ENABLE_GLOBALS_GND 0) (conn ENABLE_GLOBALS 1 <== ENABLE_GLOBALS_VCC 1) ) (element ENABLE_GLOBALS_VCC 1 # BEL (pin 1 output) (conn ENABLE_GLOBALS_VCC 1 ==> ENABLE_GLOBALS 1) ) (element ENABLE_GLOBALS_GND 1 # BEL (pin 0 output) (conn ENABLE_GLOBALS_GND 0 ==> ENABLE_GLOBALS 0) ) ) (primitive_def ICAP 20 24 (pin I0 I0 input) (pin I1 I1 input) (pin I2 I2 input) (pin I3 I3 input) (pin I4 I4 input) (pin I5 I5 input) (pin I6 I6 input) (pin I7 I7 input) (pin WRITE WRITE input) (pin CE CE input) (pin CLK CLK input) (pin O0 O0 output) (pin O1 O1 output) (pin O2 O2 output) (pin O3 O3 output) (pin O4 O4 output) (pin O5 O5 output) (pin O6 O6 output) (pin O7 O7 output) (pin BUSY BUSY output) (element CLKINV 3 (pin CLK_B input) (pin CLK input) (pin OUT output) (cfg CLK_B CLK) (conn CLKINV OUT ==> ICAP CLK) (conn CLKINV CLK_B <== CLK CLK) (conn CLKINV CLK <== CLK CLK) ) (element CLK 1 (pin CLK output) (conn CLK CLK ==> CLKINV CLK_B) (conn CLK CLK ==> CLKINV CLK) ) (element CE 1 (pin CE output) (conn CE CE ==> CEINV CE_B) (conn CE CE ==> CEINV CE) ) (element WRITE 1 (pin WRITE output) (conn WRITE WRITE ==> WRITEINV WRITE_B) (conn WRITE WRITE ==> WRITEINV WRITE) ) (element I0 1 (pin I0 output) (conn I0 I0 ==> ICAP I0) ) (element I1 1 (pin I1 output) (conn I1 I1 ==> ICAP I1) ) (element I2 1 (pin I2 output) (conn I2 I2 ==> ICAP I2) ) (element I3 1 (pin I3 output) (conn I3 I3 ==> ICAP I3) ) (element I4 1 (pin I4 output) (conn I4 I4 ==> ICAP I4) ) (element I5 1 (pin I5 output) (conn I5 I5 ==> ICAP I5) ) (element I6 1 (pin I6 output) (conn I6 I6 ==> ICAP I6) ) (element I7 1 (pin I7 output) (conn I7 I7 ==> ICAP I7) ) (element O0 1 (pin O0 input) (conn O0 O0 <== ICAP O0) ) (element O1 1 (pin O1 input) (conn O1 O1 <== ICAP O1) ) (element O2 1 (pin O2 input) (conn O2 O2 <== ICAP O2) ) (element O3 1 (pin O3 input) (conn O3 O3 <== ICAP O3) ) (element O4 1 (pin O4 input) (conn O4 O4 <== ICAP O4) ) (element O5 1 (pin O5 input) (conn O5 O5 <== ICAP O5) ) (element O6 1 (pin O6 input) (conn O6 O6 <== ICAP O6) ) (element O7 1 (pin O7 input) (conn O7 O7 <== ICAP O7) ) (element BUSY 1 (pin BUSY input) (conn BUSY BUSY <== ICAP BUSY) ) (element CEINV 3 (pin CE_B input) (pin CE input) (pin OUT output) (cfg CE_B CE) (conn CEINV OUT ==> ICAP CE) (conn CEINV CE_B <== CE CE) (conn CEINV CE <== CE CE) ) (element WRITEINV 3 (pin WRITE_B input) (pin WRITE input) (pin OUT output) (cfg WRITE_B WRITE) (conn WRITEINV OUT ==> ICAP WRITE) (conn WRITEINV WRITE_B <== WRITE WRITE) (conn WRITEINV WRITE <== WRITE WRITE) ) (element ICAP 20 # BEL (pin I0 input) (pin I1 input) (pin I2 input) (pin I3 input) (pin I4 input) (pin I5 input) (pin I6 input) (pin I7 input) (pin WRITE input) (pin CE input) (pin CLK input) (pin O0 output) (pin O1 output) (pin O2 output) (pin O3 output) (pin O4 output) (pin O5 output) (pin O6 output) (pin O7 output) (pin BUSY output) (conn ICAP O0 ==> O0 O0) (conn ICAP O1 ==> O1 O1) (conn ICAP O2 ==> O2 O2) (conn ICAP O3 ==> O3 O3) (conn ICAP O4 ==> O4 O4) (conn ICAP O5 ==> O5 O5) (conn ICAP O6 ==> O6 O6) (conn ICAP O7 ==> O7 O7) (conn ICAP BUSY ==> BUSY BUSY) (conn ICAP I0 <== I0 I0) (conn ICAP I1 <== I1 I1) (conn ICAP I2 <== I2 I2) (conn ICAP I3 <== I3 I3) (conn ICAP I4 <== I4 I4) (conn ICAP I5 <== I5 I5) (conn ICAP I6 <== I6 I6) (conn ICAP I7 <== I7 I7) (conn ICAP WRITE <== WRITEINV OUT) (conn ICAP CE <== CEINV OUT) (conn ICAP CLK <== CLKINV OUT) ) ) (primitive_def IOB 21 84 (pin REV REV input) (pin SR SR input) (pin OTCLK2 OTCLK2 input) (pin OTCLK1 OTCLK1 input) (pin OCE OCE input) (pin O2 O2 input) (pin O1 O1 input) (pin TCE TCE input) (pin T2 T2 input) (pin T1 T1 input) (pin T T output) (pin ICLK2 ICLK2 input) (pin ICLK1 ICLK1 input) (pin ICE ICE input) (pin IQ2 IQ2 output) (pin IQ1 IQ1 output) (pin I I output) (pin DIFFI_IN DIFFI_IN input) (pin DIFFO_OUT DIFFO_OUT output) (pin PADOUT PADOUT output) (pin DIFFO_IN DIFFO_IN input) (element SRINV 3 (pin SR_B input) (pin SR input) (pin OUT output) (cfg SR_B SR) (conn SRINV OUT ==> OSR_USED 0) (conn SRINV OUT ==> TSR_USED 0) (conn SRINV OUT ==> ISR_USED 0) (conn SRINV SR_B <== SR SR) (conn SRINV SR <== SR SR) ) (element REV 1 (pin REV output) (conn REV REV ==> REVINV REV_B) (conn REV REV ==> REVINV REV) ) (element REVINV 3 (pin REV_B input) (pin REV input) (pin OUT output) (cfg REV_B REV) (conn REVINV OUT ==> IREV_USED 0) (conn REVINV OUT ==> OREV_USED 0) (conn REVINV OUT ==> TREV_USED 0) (conn REVINV REV_B <== REV REV) (conn REVINV REV <== REV REV) ) (element OTCLK2 1 (pin OTCLK2 output) (conn OTCLK2 OTCLK2 ==> OTCLK2INV OTCLK2_B) (conn OTCLK2 OTCLK2 ==> OTCLK2INV OTCLK2) ) (element SR 1 (pin SR output) (conn SR SR ==> SRINV SR_B) (conn SR SR ==> SRINV SR) ) (element O2 1 (pin O2 output) (conn O2 O2 ==> O2INV O2_B) (conn O2 O2 ==> O2INV O2) ) (element OCE 1 (pin OCE output) (conn OCE OCE ==> OCEINV OCE_B) (conn OCE OCE ==> OCEINV OCE) ) (element O2INV 3 (pin O2_B input) (pin O2 input) (pin OUT output) (cfg O2_B O2) (conn O2INV OUT ==> OFF2 D) (conn O2INV OUT ==> OMUX O2) (conn O2INV O2_B <== O2 O2) (conn O2INV O2 <== O2 O2) ) (element OCEINV 3 (pin OCE_B input) (pin OCE input) (pin OUT output) (cfg OCE_B OCE) (conn OCEINV OUT ==> OFF2 CE) (conn OCEINV OUT ==> OFF1 CE) (conn OCEINV OCE_B <== OCE OCE) (conn OCEINV OCE <== OCE OCE) ) (element OFFDDRBLACKBOX 3 # BEL (pin OFF2 input) (pin OFF1 input) (pin OFFDDR output) (conn OFFDDRBLACKBOX OFFDDR ==> OMUX OFFDDR) (conn OFFDDRBLACKBOX OFF2 <== OFF2 Q) (conn OFFDDRBLACKBOX OFF1 <== OFF1 Q) ) (element OFF2 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn OFF2 Q ==> OFFDDRBLACKBOX OFF2) (conn OFF2 Q ==> OMUX OFF2) (conn OFF2 CK <== OTCLK2INV OUT) (conn OFF2 CE <== OCEINV OUT) (conn OFF2 D <== O2INV OUT) (conn OFF2 SR <== OSR_USED OUT) (conn OFF2 REV <== OREV_USED OUT) ) (element OMUX 6 (pin OFF2 input) (pin O2 input) (pin OFFDDR input) (pin OFF1 input) (pin O1 input) (pin OUT output) (cfg OFF2 O2 OFFDDR OFF1 O1) (conn OMUX OUT ==> OUTBUF IN) (conn OMUX OUT ==> IFFSELMUX 0) (conn OMUX OUT ==> ISELMUX 0) (conn OMUX OFF2 <== OFF2 Q) (conn OMUX O2 <== O2INV OUT) (conn OMUX OFFDDR <== OFFDDRBLACKBOX OFFDDR) (conn OMUX OFF1 <== OFF1 Q) (conn OMUX O1 <== O1INV OUT) ) (element OTCLK1 1 (pin OTCLK1 output) (conn OTCLK1 OTCLK1 ==> OTCLK1INV OTCLK1_B) (conn OTCLK1 OTCLK1 ==> OTCLK1INV OTCLK1) ) (element O1 1 (pin O1 output) (conn O1 O1 ==> O1INV O1_B) (conn O1 O1 ==> O1INV O1) ) (element T2 1 (pin T2 output) (conn T2 T2 ==> T2INV T2_B) (conn T2 T2 ==> T2INV T2) ) (element O1INV 3 (pin O1_B input) (pin O1 input) (pin OUT output) (cfg O1_B O1) (conn O1INV OUT ==> OMUX O1) (conn O1INV OUT ==> OFF1 D) (conn O1INV O1_B <== O1 O1) (conn O1INV O1 <== O1 O1) ) (element T2INV 3 (pin T2_B input) (pin T2 input) (pin OUT output) (cfg T2_B T2) (conn T2INV OUT ==> TMUX T2) (conn T2INV OUT ==> TFF2 D) (conn T2INV T2_B <== T2 T2) (conn T2INV T2 <== T2 T2) ) (element TCE 1 (pin TCE output) (conn TCE TCE ==> TCEINV TCE_B) (conn TCE TCE ==> TCEINV TCE) ) (element T1 1 (pin T1 output) (conn T1 T1 ==> T1INV T1_B) (conn T1 T1 ==> T1INV T1) ) (element T1INV 3 (pin T1_B input) (pin T1 input) (pin OUT output) (cfg T1_B T1) (conn T1INV OUT ==> TMUX T1) (conn T1INV OUT ==> TFF1 D) (conn T1INV T1_B <== T1 T1) (conn T1INV T1 <== T1 T1) ) (element TCEINV 3 (pin TCE_B input) (pin TCE input) (pin OUT output) (cfg TCE_B TCE) (conn TCEINV OUT ==> TFF2 CE) (conn TCEINV OUT ==> TFF1 CE) (conn TCEINV TCE_B <== TCE TCE) (conn TCEINV TCE <== TCE TCE) ) (element TMUX 6 (pin TFF2 input) (pin T2 input) (pin TFFDDR input) (pin TFF1 input) (pin T1 input) (pin T output) (cfg TFF2 T2 TFFDDR TFF1 T1) (conn TMUX T ==> OUTBUF TRI) (conn TMUX T ==> T_USED 0) (conn TMUX T ==> TSMUX 1) (conn TMUX TFF2 <== TFF2 Q) (conn TMUX T2 <== T2INV OUT) (conn TMUX TFFDDR <== TFFDDRBLACKBOX TFFDDR) (conn TMUX TFF1 <== TFF1 Q) (conn TMUX T1 <== T1INV OUT) ) (element OFF1 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn OFF1 Q ==> OFFDDRBLACKBOX OFF1) (conn OFF1 Q ==> OMUX OFF1) (conn OFF1 CK <== OTCLK1INV OUT) (conn OFF1 CE <== OCEINV OUT) (conn OFF1 D <== O1INV OUT) (conn OFF1 SR <== OSR_USED OUT) (conn OFF1 REV <== OREV_USED OUT) ) (element TFF2 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn TFF2 Q ==> TMUX TFF2) (conn TFF2 Q ==> TFFDDRBLACKBOX TFF2) (conn TFF2 CK <== OTCLK2INV OUT) (conn TFF2 CE <== TCEINV OUT) (conn TFF2 D <== T2INV OUT) (conn TFF2 SR <== TSR_USED OUT) (conn TFF2 REV <== TREV_USED OUT) ) (element TFF1 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn TFF1 Q ==> TMUX TFF1) (conn TFF1 Q ==> TFFDDRBLACKBOX TFF1) (conn TFF1 CK <== OTCLK1INV OUT) (conn TFF1 CE <== TCEINV OUT) (conn TFF1 D <== T1INV OUT) (conn TFF1 SR <== TSR_USED OUT) (conn TFF1 REV <== TREV_USED OUT) ) (element IFF2 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn IFF2 Q ==> IQ2 IQ2) (conn IFF2 CK <== ICLK2INV OUT) (conn IFF2 CE <== ICEINV OUT) (conn IFF2 D <== IFFDMUX OUT) (conn IFF2 SR <== ISR_USED OUT) (conn IFF2 REV <== IREV_USED OUT) ) (element IFFATTRBOX 0 (cfg SYNC ASYNC) ) (element OFFATTRBOX 0 (cfg SYNC ASYNC) ) (element TFFATTRBOX 0 (cfg SYNC ASYNC) ) (element ICLK2 1 (pin ICLK2 output) (conn ICLK2 ICLK2 ==> ICLK2INV ICLK2_B) (conn ICLK2 ICLK2 ==> ICLK2INV ICLK2) ) (element ICE 1 (pin ICE output) (conn ICE ICE ==> ICEINV ICE_B) (conn ICE ICE ==> ICEINV ICE) ) (element ICLK2INV 3 (pin ICLK2_B input) (pin ICLK2 input) (pin OUT output) (cfg ICLK2_B ICLK2) (conn ICLK2INV OUT ==> IFF2 CK) (conn ICLK2INV ICLK2_B <== ICLK2 ICLK2) (conn ICLK2INV ICLK2 <== ICLK2 ICLK2) ) (element IQ2 1 (pin IQ2 input) (conn IQ2 IQ2 <== IFF2 Q) ) (element IFF1 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn IFF1 Q ==> IQ1 IQ1) (conn IFF1 CK <== ICLK1INV OUT) (conn IFF1 CE <== ICEINV OUT) (conn IFF1 D <== IFFDMUX OUT) (conn IFF1 SR <== ISR_USED OUT) (conn IFF1 REV <== IREV_USED OUT) ) (element ICLK1 1 (pin ICLK1 output) (conn ICLK1 ICLK1 ==> ICLK1INV ICLK1_B) (conn ICLK1 ICLK1 ==> ICLK1INV ICLK1) ) (element ICLK1INV 3 (pin ICLK1_B input) (pin ICLK1 input) (pin OUT output) (cfg ICLK1_B ICLK1) (conn ICLK1INV OUT ==> IFF1 CK) (conn ICLK1INV ICLK1_B <== ICLK1 ICLK1) (conn ICLK1INV ICLK1 <== ICLK1 ICLK1) ) (element IQ1 1 (pin IQ1 input) (conn IQ1 IQ1 <== IFF1 Q) ) (element I 1 (pin I input) (conn I I <== IMUX OUT) ) (element TFF1_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element TFF1_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element TFF2_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element TFF2_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element OFF1_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element OFF1_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element OFF2_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element OFF2_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element IFF1_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element IFF1_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element IFF2_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element IFF2_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element PULL 0 (cfg KEEPER PULLDOWN PULLUP) ) (element PAD 1 # BEL (pin PAD input) (conn PAD PAD ==> INBUF IN) (conn PAD PAD <== OUTBUF OUT) ) (element INBUF 2 # BEL (pin IN input) (pin OUT output) (conn INBUF OUT ==> IDELMUX 1) (conn INBUF OUT ==> IFFDELMUX 1) (conn INBUF OUT ==> DELAY IN) (conn INBUF IN <== PAD PAD) (conn INBUF IN <== OUTBUF OUT) ) (element OUTBUF 3 # BEL (pin IN input) (pin OUT output) (pin TRI input) (conn OUTBUF OUT ==> PAD PAD) (conn OUTBUF OUT ==> INBUF IN) (conn OUTBUF IN <== OMUX OUT) (conn OUTBUF TRI <== TMUX T) ) (element DIFFI_IN 1 (pin DIFFI_IN output) ) (element DIFFO_OUT 1 (pin DIFFO_OUT input) ) (element T 1 (pin T input) (conn T T <== T_USED OUT) ) (element T_USED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn T_USED OUT ==> T T) (conn T_USED 0 <== TMUX T) ) (element IOATTRBOX 0 (cfg LVTTL LVCMOS33 LVCMOS25 LVCMOS18 LVCMOS15 LVCMOS12 GTL GTLP HSTL_I HSTL_III HSTL_I_18 HSTL_II_18 HSTL_III_18 SSTL2_I SSTL2_II SSTL18_I PCI33_3 PCI66_3 LVDCI_33 LVDCI_25 LVDCI_18 LVDCI_15 LVDCI_DV2_33 LVDCI_DV2_25 LVDCI_DV2_18 LVDCI_DV2_15 GTL_DCI GTLP_DCI HSTL_I_DCI HSTL_III_DCI HSTL_I_DCI_18 HSTL_II_DCI_18 HSTL_III_DCI_18 SSTL2_I_DCI SSTL2_II_DCI SSTL18_I_DCI HSLVDCI_33 HSLVDCI_25 HSLVDCI_18 HSLVDCI_15 SSTL18_II) ) (element TFFDDRBLACKBOX 3 # BEL (pin TFF2 input) (pin TFF1 input) (pin TFFDDR output) (conn TFFDDRBLACKBOX TFFDDR ==> TMUX TFFDDR) (conn TFFDDRBLACKBOX TFF2 <== TFF2 Q) (conn TFFDDRBLACKBOX TFF1 <== TFF1 Q) ) (element OSR_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn OSR_USED OUT ==> OFF2 SR) (conn OSR_USED OUT ==> OFF1 SR) (conn OSR_USED 0 <== SRINV OUT) ) (element TSR_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn TSR_USED OUT ==> TFF2 SR) (conn TSR_USED OUT ==> TFF1 SR) (conn TSR_USED 0 <== SRINV OUT) ) (element ISR_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn ISR_USED OUT ==> IFF2 SR) (conn ISR_USED OUT ==> IFF1 SR) (conn ISR_USED 0 <== SRINV OUT) ) (element IREV_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn IREV_USED OUT ==> IFF2 REV) (conn IREV_USED OUT ==> IFF1 REV) (conn IREV_USED 0 <== REVINV OUT) ) (element OREV_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn OREV_USED OUT ==> OFF2 REV) (conn OREV_USED OUT ==> OFF1 REV) (conn OREV_USED 0 <== REVINV OUT) ) (element TREV_USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn TREV_USED OUT ==> TFF2 REV) (conn TREV_USED OUT ==> TFF1 REV) (conn TREV_USED 0 <== REVINV OUT) ) (element IDELMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IDELMUX OUT ==> IMUX 1) (conn IDELMUX OUT ==> ISELMUX 1) (conn IDELMUX 0 <== DELAY OUT) (conn IDELMUX 1 <== INBUF OUT) ) (element IMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IMUX OUT ==> I I) (conn IMUX 0 <== ISELMUX OUT) (conn IMUX 1 <== IDELMUX OUT) ) (element IFFDELMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IFFDELMUX OUT ==> IFFDMUX 1) (conn IFFDELMUX OUT ==> IFFSELMUX 1) (conn IFFDELMUX 0 <== DELAY OUT) (conn IFFDELMUX 1 <== INBUF OUT) ) (element IFFDMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn IFFDMUX OUT ==> IFF2 D) (conn IFFDMUX OUT ==> IFF1 D) (conn IFFDMUX 0 <== IFFSELMUX OUT) (conn IFFDMUX 1 <== IFFDELMUX OUT) ) (element TSMUX_GND 1 # BEL (pin 0 output) (conn TSMUX_GND 0 ==> TSMUX 0) ) (element DELAY 2 # BEL (pin IN input) (pin OUT output) (conn DELAY OUT ==> IDELMUX 0) (conn DELAY OUT ==> IFFDELMUX 0) (conn DELAY IN <== INBUF OUT) ) (element IFFSELMUX 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn IFFSELMUX OUT ==> IFFDMUX 0) (conn IFFSELMUX 0 <== OMUX OUT) (conn IFFSELMUX 1 <== IFFDELMUX OUT) (conn IFFSELMUX S0 <== TSMUX OUT) ) (element ISELMUX 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn ISELMUX OUT ==> IMUX 0) (conn ISELMUX 0 <== OMUX OUT) (conn ISELMUX 1 <== IDELMUX OUT) (conn ISELMUX S0 <== TSMUX OUT) ) (element TSMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn TSMUX OUT ==> IFFSELMUX S0) (conn TSMUX OUT ==> ISELMUX S0) (conn TSMUX 0 <== TSMUX_GND 0) (conn TSMUX 1 <== TMUX T) ) (element OTCLK1INV 3 (pin OTCLK1_B input) (pin OTCLK1 input) (pin OUT output) (cfg OTCLK1_B OTCLK1) (conn OTCLK1INV OUT ==> OFF1 CK) (conn OTCLK1INV OUT ==> TFF1 CK) (conn OTCLK1INV OTCLK1_B <== OTCLK1 OTCLK1) (conn OTCLK1INV OTCLK1 <== OTCLK1 OTCLK1) ) (element OTCLK2INV 3 (pin OTCLK2_B input) (pin OTCLK2 input) (pin OUT output) (cfg OTCLK2_B OTCLK2) (conn OTCLK2INV OUT ==> OFF2 CK) (conn OTCLK2INV OUT ==> TFF2 CK) (conn OTCLK2INV OTCLK2_B <== OTCLK2 OTCLK2) (conn OTCLK2INV OTCLK2 <== OTCLK2 OTCLK2) ) (element ICEINV 3 (pin ICE_B input) (pin ICE input) (pin OUT output) (cfg ICE_B ICE) (conn ICEINV OUT ==> IFF2 CE) (conn ICEINV OUT ==> IFF1 CE) (conn ICEINV ICE_B <== ICE ICE) (conn ICEINV ICE <== ICE ICE) ) (element GTSATTRBOX 0 (cfg DISABLE_GTS) ) (element PADOUT 1 (pin PADOUT input) ) (element SLEW 0 (cfg SLOW FAST) ) (element DRIVEATTRBOX 0 (cfg 2 4 6 8 12 16 24) ) (element DIFFO_IN 1 (pin DIFFO_IN output) ) (element DRIVE_0MA 0 (cfg DRIVE_0MA) ) ) (primitive_def MULT18X18 75 79 (pin B0 B0 input) (pin B1 B1 input) (pin B2 B2 input) (pin B3 B3 input) (pin B4 B4 input) (pin B5 B5 input) (pin B6 B6 input) (pin B7 B7 input) (pin B8 B8 input) (pin B9 B9 input) (pin B10 B10 input) (pin B11 B11 input) (pin B12 B12 input) (pin B13 B13 input) (pin B14 B14 input) (pin B15 B15 input) (pin B16 B16 input) (pin B17 B17 input) (pin A0 A0 input) (pin A1 A1 input) (pin A2 A2 input) (pin A3 A3 input) (pin A4 A4 input) (pin A5 A5 input) (pin A6 A6 input) (pin A7 A7 input) (pin A8 A8 input) (pin A9 A9 input) (pin A10 A10 input) (pin A11 A11 input) (pin A12 A12 input) (pin A13 A13 input) (pin A14 A14 input) (pin A15 A15 input) (pin A16 A16 input) (pin A17 A17 input) (pin P0 P0 output) (pin P1 P1 output) (pin P2 P2 output) (pin P3 P3 output) (pin P4 P4 output) (pin P5 P5 output) (pin P6 P6 output) (pin P7 P7 output) (pin P8 P8 output) (pin P9 P9 output) (pin P10 P10 output) (pin P11 P11 output) (pin P12 P12 output) (pin P13 P13 output) (pin P14 P14 output) (pin P15 P15 output) (pin P16 P16 output) (pin P17 P17 output) (pin P18 P18 output) (pin P19 P19 output) (pin P20 P20 output) (pin P21 P21 output) (pin P22 P22 output) (pin P23 P23 output) (pin P24 P24 output) (pin P25 P25 output) (pin P26 P26 output) (pin P27 P27 output) (pin P28 P28 output) (pin P29 P29 output) (pin P30 P30 output) (pin P31 P31 output) (pin P32 P32 output) (pin P33 P33 output) (pin P34 P34 output) (pin P35 P35 output) (pin RST RST input) (pin CE CE input) (pin CLK CLK input) (element B0 1 (pin B0 output) (conn B0 B0 ==> BLACKBOX B0) ) (element B1 1 (pin B1 output) (conn B1 B1 ==> BLACKBOX B1) ) (element B2 1 (pin B2 output) (conn B2 B2 ==> BLACKBOX B2) ) (element B3 1 (pin B3 output) (conn B3 B3 ==> BLACKBOX B3) ) (element B4 1 (pin B4 output) (conn B4 B4 ==> BLACKBOX B4) ) (element B5 1 (pin B5 output) (conn B5 B5 ==> BLACKBOX B5) ) (element B6 1 (pin B6 output) (conn B6 B6 ==> BLACKBOX B6) ) (element B7 1 (pin B7 output) (conn B7 B7 ==> BLACKBOX B7) ) (element B8 1 (pin B8 output) (conn B8 B8 ==> BLACKBOX B8) ) (element B9 1 (pin B9 output) (conn B9 B9 ==> BLACKBOX B9) ) (element B10 1 (pin B10 output) (conn B10 B10 ==> BLACKBOX B10) ) (element B11 1 (pin B11 output) (conn B11 B11 ==> BLACKBOX B11) ) (element B12 1 (pin B12 output) (conn B12 B12 ==> BLACKBOX B12) ) (element B13 1 (pin B13 output) (conn B13 B13 ==> BLACKBOX B13) ) (element B14 1 (pin B14 output) (conn B14 B14 ==> BLACKBOX B14) ) (element B15 1 (pin B15 output) (conn B15 B15 ==> BLACKBOX B15) ) (element B16 1 (pin B16 output) (conn B16 B16 ==> BLACKBOX B16) ) (element B17 1 (pin B17 output) (conn B17 B17 ==> BLACKBOX B17) ) (element A0 1 (pin A0 output) (conn A0 A0 ==> BLACKBOX A0) ) (element A1 1 (pin A1 output) (conn A1 A1 ==> BLACKBOX A1) ) (element A2 1 (pin A2 output) (conn A2 A2 ==> BLACKBOX A2) ) (element A3 1 (pin A3 output) (conn A3 A3 ==> BLACKBOX A3) ) (element A4 1 (pin A4 output) (conn A4 A4 ==> BLACKBOX A4) ) (element A5 1 (pin A5 output) (conn A5 A5 ==> BLACKBOX A5) ) (element A6 1 (pin A6 output) (conn A6 A6 ==> BLACKBOX A6) ) (element A7 1 (pin A7 output) (conn A7 A7 ==> BLACKBOX A7) ) (element A8 1 (pin A8 output) (conn A8 A8 ==> BLACKBOX A8) ) (element A9 1 (pin A9 output) (conn A9 A9 ==> BLACKBOX A9) ) (element A10 1 (pin A10 output) (conn A10 A10 ==> BLACKBOX A10) ) (element A11 1 (pin A11 output) (conn A11 A11 ==> BLACKBOX A11) ) (element A12 1 (pin A12 output) (conn A12 A12 ==> BLACKBOX A12) ) (element A13 1 (pin A13 output) (conn A13 A13 ==> BLACKBOX A13) ) (element A14 1 (pin A14 output) (conn A14 A14 ==> BLACKBOX A14) ) (element A15 1 (pin A15 output) (conn A15 A15 ==> BLACKBOX A15) ) (element A16 1 (pin A16 output) (conn A16 A16 ==> BLACKBOX A16) ) (element A17 1 (pin A17 output) (conn A17 A17 ==> BLACKBOX A17) ) (element P0 1 (pin P0 input) (conn P0 P0 <== BLACKBOX P0) ) (element P1 1 (pin P1 input) (conn P1 P1 <== BLACKBOX P1) ) (element P2 1 (pin P2 input) (conn P2 P2 <== BLACKBOX P2) ) (element P3 1 (pin P3 input) (conn P3 P3 <== BLACKBOX P3) ) (element P4 1 (pin P4 input) (conn P4 P4 <== BLACKBOX P4) ) (element P5 1 (pin P5 input) (conn P5 P5 <== BLACKBOX P5) ) (element P6 1 (pin P6 input) (conn P6 P6 <== BLACKBOX P6) ) (element P7 1 (pin P7 input) (conn P7 P7 <== BLACKBOX P7) ) (element P8 1 (pin P8 input) (conn P8 P8 <== BLACKBOX P8) ) (element P9 1 (pin P9 input) (conn P9 P9 <== BLACKBOX P9) ) (element P10 1 (pin P10 input) (conn P10 P10 <== BLACKBOX P10) ) (element P11 1 (pin P11 input) (conn P11 P11 <== BLACKBOX P11) ) (element P12 1 (pin P12 input) (conn P12 P12 <== BLACKBOX P12) ) (element P13 1 (pin P13 input) (conn P13 P13 <== BLACKBOX P13) ) (element P14 1 (pin P14 input) (conn P14 P14 <== BLACKBOX P14) ) (element P15 1 (pin P15 input) (conn P15 P15 <== BLACKBOX P15) ) (element P16 1 (pin P16 input) (conn P16 P16 <== BLACKBOX P16) ) (element P17 1 (pin P17 input) (conn P17 P17 <== BLACKBOX P17) ) (element P18 1 (pin P18 input) (conn P18 P18 <== BLACKBOX P18) ) (element P19 1 (pin P19 input) (conn P19 P19 <== BLACKBOX P19) ) (element P20 1 (pin P20 input) (conn P20 P20 <== BLACKBOX P20) ) (element P21 1 (pin P21 input) (conn P21 P21 <== BLACKBOX P21) ) (element P22 1 (pin P22 input) (conn P22 P22 <== BLACKBOX P22) ) (element P23 1 (pin P23 input) (conn P23 P23 <== BLACKBOX P23) ) (element P24 1 (pin P24 input) (conn P24 P24 <== BLACKBOX P24) ) (element P25 1 (pin P25 input) (conn P25 P25 <== BLACKBOX P25) ) (element P26 1 (pin P26 input) (conn P26 P26 <== BLACKBOX P26) ) (element P27 1 (pin P27 input) (conn P27 P27 <== BLACKBOX P27) ) (element P28 1 (pin P28 input) (conn P28 P28 <== BLACKBOX P28) ) (element P29 1 (pin P29 input) (conn P29 P29 <== BLACKBOX P29) ) (element P30 1 (pin P30 input) (conn P30 P30 <== BLACKBOX P30) ) (element P31 1 (pin P31 input) (conn P31 P31 <== BLACKBOX P31) ) (element P32 1 (pin P32 input) (conn P32 P32 <== BLACKBOX P32) ) (element P33 1 (pin P33 input) (conn P33 P33 <== BLACKBOX P33) ) (element P34 1 (pin P34 input) (conn P34 P34 <== BLACKBOX P34) ) (element P35 1 (pin P35 input) (conn P35 P35 <== BLACKBOX P35) ) (element BLACKBOX 75 # BEL (pin B0 input) (pin B1 input) (pin B2 input) (pin B3 input) (pin B4 input) (pin B5 input) (pin B6 input) (pin B7 input) (pin B8 input) (pin B9 input) (pin B10 input) (pin B11 input) (pin B12 input) (pin B13 input) (pin B14 input) (pin B15 input) (pin B16 input) (pin B17 input) (pin A0 input) (pin A1 input) (pin A2 input) (pin A3 input) (pin A4 input) (pin A5 input) (pin A6 input) (pin A7 input) (pin A8 input) (pin A9 input) (pin A10 input) (pin A11 input) (pin A12 input) (pin A13 input) (pin A14 input) (pin A15 input) (pin A16 input) (pin A17 input) (pin P0 output) (pin P1 output) (pin P2 output) (pin P3 output) (pin P4 output) (pin P5 output) (pin P6 output) (pin P7 output) (pin P8 output) (pin P9 output) (pin P10 output) (pin P11 output) (pin P12 output) (pin P13 output) (pin P14 output) (pin P15 output) (pin P16 output) (pin P17 output) (pin P18 output) (pin P19 output) (pin P20 output) (pin P21 output) (pin P22 output) (pin P23 output) (pin P24 output) (pin P25 output) (pin P26 output) (pin P27 output) (pin P28 output) (pin P29 output) (pin P30 output) (pin P31 output) (pin P32 output) (pin P33 output) (pin P34 output) (pin P35 output) (pin RST input) (pin CE input) (pin CLK input) (conn BLACKBOX P0 ==> P0 P0) (conn BLACKBOX P1 ==> P1 P1) (conn BLACKBOX P2 ==> P2 P2) (conn BLACKBOX P3 ==> P3 P3) (conn BLACKBOX P4 ==> P4 P4) (conn BLACKBOX P5 ==> P5 P5) (conn BLACKBOX P6 ==> P6 P6) (conn BLACKBOX P7 ==> P7 P7) (conn BLACKBOX P8 ==> P8 P8) (conn BLACKBOX P9 ==> P9 P9) (conn BLACKBOX P10 ==> P10 P10) (conn BLACKBOX P11 ==> P11 P11) (conn BLACKBOX P12 ==> P12 P12) (conn BLACKBOX P13 ==> P13 P13) (conn BLACKBOX P14 ==> P14 P14) (conn BLACKBOX P15 ==> P15 P15) (conn BLACKBOX P16 ==> P16 P16) (conn BLACKBOX P17 ==> P17 P17) (conn BLACKBOX P18 ==> P18 P18) (conn BLACKBOX P19 ==> P19 P19) (conn BLACKBOX P20 ==> P20 P20) (conn BLACKBOX P21 ==> P21 P21) (conn BLACKBOX P22 ==> P22 P22) (conn BLACKBOX P23 ==> P23 P23) (conn BLACKBOX P24 ==> P24 P24) (conn BLACKBOX P25 ==> P25 P25) (conn BLACKBOX P26 ==> P26 P26) (conn BLACKBOX P27 ==> P27 P27) (conn BLACKBOX P28 ==> P28 P28) (conn BLACKBOX P29 ==> P29 P29) (conn BLACKBOX P30 ==> P30 P30) (conn BLACKBOX P31 ==> P31 P31) (conn BLACKBOX P32 ==> P32 P32) (conn BLACKBOX P33 ==> P33 P33) (conn BLACKBOX P34 ==> P34 P34) (conn BLACKBOX P35 ==> P35 P35) (conn BLACKBOX B0 <== B0 B0) (conn BLACKBOX B1 <== B1 B1) (conn BLACKBOX B2 <== B2 B2) (conn BLACKBOX B3 <== B3 B3) (conn BLACKBOX B4 <== B4 B4) (conn BLACKBOX B5 <== B5 B5) (conn BLACKBOX B6 <== B6 B6) (conn BLACKBOX B7 <== B7 B7) (conn BLACKBOX B8 <== B8 B8) (conn BLACKBOX B9 <== B9 B9) (conn BLACKBOX B10 <== B10 B10) (conn BLACKBOX B11 <== B11 B11) (conn BLACKBOX B12 <== B12 B12) (conn BLACKBOX B13 <== B13 B13) (conn BLACKBOX B14 <== B14 B14) (conn BLACKBOX B15 <== B15 B15) (conn BLACKBOX B16 <== B16 B16) (conn BLACKBOX B17 <== B17 B17) (conn BLACKBOX A0 <== A0 A0) (conn BLACKBOX A1 <== A1 A1) (conn BLACKBOX A2 <== A2 A2) (conn BLACKBOX A3 <== A3 A3) (conn BLACKBOX A4 <== A4 A4) (conn BLACKBOX A5 <== A5 A5) (conn BLACKBOX A6 <== A6 A6) (conn BLACKBOX A7 <== A7 A7) (conn BLACKBOX A8 <== A8 A8) (conn BLACKBOX A9 <== A9 A9) (conn BLACKBOX A10 <== A10 A10) (conn BLACKBOX A11 <== A11 A11) (conn BLACKBOX A12 <== A12 A12) (conn BLACKBOX A13 <== A13 A13) (conn BLACKBOX A14 <== A14 A14) (conn BLACKBOX A15 <== A15 A15) (conn BLACKBOX A16 <== A16 A16) (conn BLACKBOX A17 <== A17 A17) (conn BLACKBOX RST <== RSTINV OUT) (conn BLACKBOX CE <== CEINV OUT) (conn BLACKBOX CLK <== CLKINV OUT) ) (element RSTINV 3 (pin RST_B input) (pin RST input) (pin OUT output) (cfg RST_B RST) (conn RSTINV OUT ==> BLACKBOX RST) (conn RSTINV RST_B <== RST RST) (conn RSTINV RST <== RST RST) ) (element CEINV 3 (pin CE_B input) (pin CE input) (pin OUT output) (cfg CE_B CE) (conn CEINV OUT ==> BLACKBOX CE) (conn CEINV CE_B <== CE CE) (conn CEINV CE <== CE CE) ) (element CLKINV 3 (pin CLK_B input) (pin CLK input) (pin OUT output) (cfg CLK_B CLK) (conn CLKINV OUT ==> BLACKBOX CLK) (conn CLKINV CLK_B <== CLK CLK) (conn CLKINV CLK <== CLK CLK) ) (element RST 1 (pin RST output) (conn RST RST ==> RSTINV RST_B) (conn RST RST ==> RSTINV RST) ) (element CE 1 (pin CE output) (conn CE CE ==> CEINV CE_B) (conn CE CE ==> CEINV CE) ) (element CLK 1 (pin CLK output) (conn CLK CLK ==> CLKINV CLK_B) (conn CLK CLK ==> CLKINV CLK) ) ) (primitive_def PMV 8 9 (pin O O output) (pin EN EN input) (pin A0 A0 input) (pin A1 A1 input) (pin A2 A2 input) (pin A3 A3 input) (pin A4 A4 input) (pin A5 A5 input) (element PMV 8 # BEL (pin EN input) (pin A0 input) (pin A1 input) (pin A2 input) (pin A3 input) (pin A4 input) (pin A5 input) (pin O output) (conn PMV O ==> O O) (conn PMV EN <== EN EN) (conn PMV A0 <== A0 A0) (conn PMV A1 <== A1 A1) (conn PMV A2 <== A2 A2) (conn PMV A3 <== A3 A3) (conn PMV A4 <== A4 A4) (conn PMV A5 <== A5 A5) ) (element A5 1 (pin A5 output) (conn A5 A5 ==> PMV A5) ) (element A4 1 (pin A4 output) (conn A4 A4 ==> PMV A4) ) (element A3 1 (pin A3 output) (conn A3 A3 ==> PMV A3) ) (element A2 1 (pin A2 output) (conn A2 A2 ==> PMV A2) ) (element A1 1 (pin A1 output) (conn A1 A1 ==> PMV A1) ) (element A0 1 (pin A0 output) (conn A0 A0 ==> PMV A0) ) (element EN 1 (pin EN output) (conn EN EN ==> PMV EN) ) (element O 1 (pin O input) (conn O O <== PMV O) ) ) (primitive_def RAMB16 180 195 (pin CLKA CLKA input) (pin CLKB CLKB input) (pin ENA ENA input) (pin ENB ENB input) (pin SSRA SSRA input) (pin SSRB SSRB input) (pin WEA WEA input) (pin WEB WEB input) (pin ADDRA13 ADDRA13 input) (pin ADDRA12 ADDRA12 input) (pin ADDRA11 ADDRA11 input) (pin ADDRA10 ADDRA10 input) (pin ADDRA9 ADDRA9 input) (pin ADDRA8 ADDRA8 input) (pin ADDRA7 ADDRA7 input) (pin ADDRA6 ADDRA6 input) (pin ADDRA5 ADDRA5 input) (pin ADDRA4 ADDRA4 input) (pin ADDRA3 ADDRA3 input) (pin ADDRA2 ADDRA2 input) (pin ADDRA1 ADDRA1 input) (pin ADDRA0 ADDRA0 input) (pin ADDRB13 ADDRB13 input) (pin ADDRB12 ADDRB12 input) (pin ADDRB11 ADDRB11 input) (pin ADDRB10 ADDRB10 input) (pin ADDRB9 ADDRB9 input) (pin ADDRB8 ADDRB8 input) (pin ADDRB7 ADDRB7 input) (pin ADDRB6 ADDRB6 input) (pin ADDRB5 ADDRB5 input) (pin ADDRB4 ADDRB4 input) (pin ADDRB3 ADDRB3 input) (pin ADDRB2 ADDRB2 input) (pin ADDRB1 ADDRB1 input) (pin ADDRB0 ADDRB0 input) (pin DIA0 DIA0 input) (pin DIA1 DIA1 input) (pin DIA2 DIA2 input) (pin DIA3 DIA3 input) (pin DIA4 DIA4 input) (pin DIA5 DIA5 input) (pin DIA6 DIA6 input) (pin DIA7 DIA7 input) (pin DIA8 DIA8 input) (pin DIA9 DIA9 input) (pin DIA10 DIA10 input) (pin DIA11 DIA11 input) (pin DIA12 DIA12 input) (pin DIA13 DIA13 input) (pin DIA14 DIA14 input) (pin DIA15 DIA15 input) (pin DIA16 DIA16 input) (pin DIA17 DIA17 input) (pin DIA18 DIA18 input) (pin DIA19 DIA19 input) (pin DIA20 DIA20 input) (pin DIA21 DIA21 input) (pin DIA22 DIA22 input) (pin DIA23 DIA23 input) (pin DIA24 DIA24 input) (pin DIA25 DIA25 input) (pin DIA26 DIA26 input) (pin DIA27 DIA27 input) (pin DIA28 DIA28 input) (pin DIA29 DIA29 input) (pin DIA30 DIA30 input) (pin DIA31 DIA31 input) (pin DIPA0 DIPA0 input) (pin DIPA1 DIPA1 input) (pin DIPA2 DIPA2 input) (pin DIPA3 DIPA3 input) (pin DIB0 DIB0 input) (pin DIB1 DIB1 input) (pin DIB2 DIB2 input) (pin DIB3 DIB3 input) (pin DIB4 DIB4 input) (pin DIB5 DIB5 input) (pin DIB6 DIB6 input) (pin DIB7 DIB7 input) (pin DIB8 DIB8 input) (pin DIB9 DIB9 input) (pin DIB10 DIB10 input) (pin DIB11 DIB11 input) (pin DIB12 DIB12 input) (pin DIB13 DIB13 input) (pin DIB14 DIB14 input) (pin DIB15 DIB15 input) (pin DIB16 DIB16 input) (pin DIB17 DIB17 input) (pin DIB18 DIB18 input) (pin DIB19 DIB19 input) (pin DIB20 DIB20 input) (pin DIB21 DIB21 input) (pin DIB22 DIB22 input) (pin DIB23 DIB23 input) (pin DIB24 DIB24 input) (pin DIB25 DIB25 input) (pin DIB26 DIB26 input) (pin DIB27 DIB27 input) (pin DIB28 DIB28 input) (pin DIB29 DIB29 input) (pin DIB30 DIB30 input) (pin DIB31 DIB31 input) (pin DIPB0 DIPB0 input) (pin DIPB1 DIPB1 input) (pin DIPB2 DIPB2 input) (pin DIPB3 DIPB3 input) (pin DOA0 DOA0 output) (pin DOA1 DOA1 output) (pin DOA2 DOA2 output) (pin DOA3 DOA3 output) (pin DOA4 DOA4 output) (pin DOA5 DOA5 output) (pin DOA6 DOA6 output) (pin DOA7 DOA7 output) (pin DOA8 DOA8 output) (pin DOA9 DOA9 output) (pin DOA10 DOA10 output) (pin DOA11 DOA11 output) (pin DOA12 DOA12 output) (pin DOA13 DOA13 output) (pin DOA14 DOA14 output) (pin DOA15 DOA15 output) (pin DOA16 DOA16 output) (pin DOA17 DOA17 output) (pin DOA18 DOA18 output) (pin DOA19 DOA19 output) (pin DOA20 DOA20 output) (pin DOA21 DOA21 output) (pin DOA22 DOA22 output) (pin DOA23 DOA23 output) (pin DOA24 DOA24 output) (pin DOA25 DOA25 output) (pin DOA26 DOA26 output) (pin DOA27 DOA27 output) (pin DOA28 DOA28 output) (pin DOA29 DOA29 output) (pin DOA30 DOA30 output) (pin DOA31 DOA31 output) (pin DOPA0 DOPA0 output) (pin DOPA1 DOPA1 output) (pin DOPA2 DOPA2 output) (pin DOPA3 DOPA3 output) (pin DOB0 DOB0 output) (pin DOB1 DOB1 output) (pin DOB2 DOB2 output) (pin DOB3 DOB3 output) (pin DOB4 DOB4 output) (pin DOB5 DOB5 output) (pin DOB6 DOB6 output) (pin DOB7 DOB7 output) (pin DOB8 DOB8 output) (pin DOB9 DOB9 output) (pin DOB10 DOB10 output) (pin DOB11 DOB11 output) (pin DOB12 DOB12 output) (pin DOB13 DOB13 output) (pin DOB14 DOB14 output) (pin DOB15 DOB15 output) (pin DOB16 DOB16 output) (pin DOB17 DOB17 output) (pin DOB18 DOB18 output) (pin DOB19 DOB19 output) (pin DOB20 DOB20 output) (pin DOB21 DOB21 output) (pin DOB22 DOB22 output) (pin DOB23 DOB23 output) (pin DOB24 DOB24 output) (pin DOB25 DOB25 output) (pin DOB26 DOB26 output) (pin DOB27 DOB27 output) (pin DOB28 DOB28 output) (pin DOB29 DOB29 output) (pin DOB30 DOB30 output) (pin DOB31 DOB31 output) (pin DOPB0 DOPB0 output) (pin DOPB1 DOPB1 output) (pin DOPB2 DOPB2 output) (pin DOPB3 DOPB3 output) (element DIB0 1 (pin DIB0 output) (conn DIB0 DIB0 ==> RAMB16B DIB0) ) (element DIB1 1 (pin DIB1 output) (conn DIB1 DIB1 ==> RAMB16B DIB1) ) (element DIB2 1 (pin DIB2 output) (conn DIB2 DIB2 ==> RAMB16B DIB2) ) (element DIB3 1 (pin DIB3 output) (conn DIB3 DIB3 ==> RAMB16B DIB3) ) (element DIB4 1 (pin DIB4 output) (conn DIB4 DIB4 ==> RAMB16B DIB4) ) (element DIB5 1 (pin DIB5 output) (conn DIB5 DIB5 ==> RAMB16B DIB5) ) (element DIB6 1 (pin DIB6 output) (conn DIB6 DIB6 ==> RAMB16B DIB6) ) (element DIB7 1 (pin DIB7 output) (conn DIB7 DIB7 ==> RAMB16B DIB7) ) (element DIB8 1 (pin DIB8 output) (conn DIB8 DIB8 ==> RAMB16B DIB8) ) (element DIB9 1 (pin DIB9 output) (conn DIB9 DIB9 ==> RAMB16B DIB9) ) (element DIB10 1 (pin DIB10 output) (conn DIB10 DIB10 ==> RAMB16B DIB10) ) (element DIB11 1 (pin DIB11 output) (conn DIB11 DIB11 ==> RAMB16B DIB11) ) (element DIB12 1 (pin DIB12 output) (conn DIB12 DIB12 ==> RAMB16B DIB12) ) (element DIB13 1 (pin DIB13 output) (conn DIB13 DIB13 ==> RAMB16B DIB13) ) (element DIB14 1 (pin DIB14 output) (conn DIB14 DIB14 ==> RAMB16B DIB14) ) (element DIB15 1 (pin DIB15 output) (conn DIB15 DIB15 ==> RAMB16B DIB15) ) (element DIB16 1 (pin DIB16 output) (conn DIB16 DIB16 ==> RAMB16B DIB16) ) (element DIB17 1 (pin DIB17 output) (conn DIB17 DIB17 ==> RAMB16B DIB17) ) (element DIB18 1 (pin DIB18 output) (conn DIB18 DIB18 ==> RAMB16B DIB18) ) (element DIB19 1 (pin DIB19 output) (conn DIB19 DIB19 ==> RAMB16B DIB19) ) (element DIB20 1 (pin DIB20 output) (conn DIB20 DIB20 ==> RAMB16B DIB20) ) (element DIB21 1 (pin DIB21 output) (conn DIB21 DIB21 ==> RAMB16B DIB21) ) (element DIB22 1 (pin DIB22 output) (conn DIB22 DIB22 ==> RAMB16B DIB22) ) (element DIB23 1 (pin DIB23 output) (conn DIB23 DIB23 ==> RAMB16B DIB23) ) (element DIB24 1 (pin DIB24 output) (conn DIB24 DIB24 ==> RAMB16B DIB24) ) (element DIB25 1 (pin DIB25 output) (conn DIB25 DIB25 ==> RAMB16B DIB25) ) (element DIB26 1 (pin DIB26 output) (conn DIB26 DIB26 ==> RAMB16B DIB26) ) (element DIB27 1 (pin DIB27 output) (conn DIB27 DIB27 ==> RAMB16B DIB27) ) (element DIB28 1 (pin DIB28 output) (conn DIB28 DIB28 ==> RAMB16B DIB28) ) (element DIB29 1 (pin DIB29 output) (conn DIB29 DIB29 ==> RAMB16B DIB29) ) (element DIB30 1 (pin DIB30 output) (conn DIB30 DIB30 ==> RAMB16B DIB30) ) (element DIB31 1 (pin DIB31 output) (conn DIB31 DIB31 ==> RAMB16B DIB31) ) (element DIA0 1 (pin DIA0 output) (conn DIA0 DIA0 ==> RAMB16A DIA0) ) (element DIA1 1 (pin DIA1 output) (conn DIA1 DIA1 ==> RAMB16A DIA1) ) (element DIA2 1 (pin DIA2 output) (conn DIA2 DIA2 ==> RAMB16A DIA2) ) (element DIA3 1 (pin DIA3 output) (conn DIA3 DIA3 ==> RAMB16A DIA3) ) (element DIA4 1 (pin DIA4 output) (conn DIA4 DIA4 ==> RAMB16A DIA4) ) (element DIA5 1 (pin DIA5 output) (conn DIA5 DIA5 ==> RAMB16A DIA5) ) (element DIA6 1 (pin DIA6 output) (conn DIA6 DIA6 ==> RAMB16A DIA6) ) (element DIA7 1 (pin DIA7 output) (conn DIA7 DIA7 ==> RAMB16A DIA7) ) (element DIA8 1 (pin DIA8 output) (conn DIA8 DIA8 ==> RAMB16A DIA8) ) (element DIA9 1 (pin DIA9 output) (conn DIA9 DIA9 ==> RAMB16A DIA9) ) (element DIA10 1 (pin DIA10 output) (conn DIA10 DIA10 ==> RAMB16A DIA10) ) (element DIA11 1 (pin DIA11 output) (conn DIA11 DIA11 ==> RAMB16A DIA11) ) (element DIA12 1 (pin DIA12 output) (conn DIA12 DIA12 ==> RAMB16A DIA12) ) (element DIA13 1 (pin DIA13 output) (conn DIA13 DIA13 ==> RAMB16A DIA13) ) (element DIA14 1 (pin DIA14 output) (conn DIA14 DIA14 ==> RAMB16A DIA14) ) (element DIA15 1 (pin DIA15 output) (conn DIA15 DIA15 ==> RAMB16A DIA15) ) (element DIA16 1 (pin DIA16 output) (conn DIA16 DIA16 ==> RAMB16A DIA16) ) (element DIA17 1 (pin DIA17 output) (conn DIA17 DIA17 ==> RAMB16A DIA17) ) (element DIA18 1 (pin DIA18 output) (conn DIA18 DIA18 ==> RAMB16A DIA18) ) (element DIA19 1 (pin DIA19 output) (conn DIA19 DIA19 ==> RAMB16A DIA19) ) (element DIA20 1 (pin DIA20 output) (conn DIA20 DIA20 ==> RAMB16A DIA20) ) (element DIA21 1 (pin DIA21 output) (conn DIA21 DIA21 ==> RAMB16A DIA21) ) (element DIA22 1 (pin DIA22 output) (conn DIA22 DIA22 ==> RAMB16A DIA22) ) (element DIA23 1 (pin DIA23 output) (conn DIA23 DIA23 ==> RAMB16A DIA23) ) (element DIA24 1 (pin DIA24 output) (conn DIA24 DIA24 ==> RAMB16A DIA24) ) (element DIA25 1 (pin DIA25 output) (conn DIA25 DIA25 ==> RAMB16A DIA25) ) (element DIA26 1 (pin DIA26 output) (conn DIA26 DIA26 ==> RAMB16A DIA26) ) (element DIA27 1 (pin DIA27 output) (conn DIA27 DIA27 ==> RAMB16A DIA27) ) (element DIA28 1 (pin DIA28 output) (conn DIA28 DIA28 ==> RAMB16A DIA28) ) (element DIA29 1 (pin DIA29 output) (conn DIA29 DIA29 ==> RAMB16A DIA29) ) (element DIA30 1 (pin DIA30 output) (conn DIA30 DIA30 ==> RAMB16A DIA30) ) (element DIA31 1 (pin DIA31 output) (conn DIA31 DIA31 ==> RAMB16A DIA31) ) (element ADDRA0 1 (pin ADDRA0 output) (conn ADDRA0 ADDRA0 ==> RAMB16A ADDRA0) ) (element ADDRA1 1 (pin ADDRA1 output) (conn ADDRA1 ADDRA1 ==> RAMB16A ADDRA1) ) (element ADDRA2 1 (pin ADDRA2 output) (conn ADDRA2 ADDRA2 ==> RAMB16A ADDRA2) ) (element ADDRA3 1 (pin ADDRA3 output) (conn ADDRA3 ADDRA3 ==> RAMB16A ADDRA3) ) (element ADDRA4 1 (pin ADDRA4 output) (conn ADDRA4 ADDRA4 ==> RAMB16A ADDRA4) ) (element ADDRA5 1 (pin ADDRA5 output) (conn ADDRA5 ADDRA5 ==> RAMB16A ADDRA5) ) (element ADDRA6 1 (pin ADDRA6 output) (conn ADDRA6 ADDRA6 ==> RAMB16A ADDRA6) ) (element ADDRA7 1 (pin ADDRA7 output) (conn ADDRA7 ADDRA7 ==> RAMB16A ADDRA7) ) (element ADDRA8 1 (pin ADDRA8 output) (conn ADDRA8 ADDRA8 ==> RAMB16A ADDRA8) ) (element ADDRA9 1 (pin ADDRA9 output) (conn ADDRA9 ADDRA9 ==> RAMB16A ADDRA9) ) (element ADDRA10 1 (pin ADDRA10 output) (conn ADDRA10 ADDRA10 ==> RAMB16A ADDRA10) ) (element ADDRA11 1 (pin ADDRA11 output) (conn ADDRA11 ADDRA11 ==> RAMB16A ADDRA11) ) (element WEA 1 (pin WEA output) (conn WEA WEA ==> WEAINV WEA_B) (conn WEA WEA ==> WEAINV WEA) ) (element CLKA 1 (pin CLKA output) (conn CLKA CLKA ==> CLKAINV CLKA_B) (conn CLKA CLKA ==> CLKAINV CLKA) ) (element ADDRB0 1 (pin ADDRB0 output) (conn ADDRB0 ADDRB0 ==> RAMB16B ADDRB0) ) (element ADDRB1 1 (pin ADDRB1 output) (conn ADDRB1 ADDRB1 ==> RAMB16B ADDRB1) ) (element ADDRB2 1 (pin ADDRB2 output) (conn ADDRB2 ADDRB2 ==> RAMB16B ADDRB2) ) (element ADDRB3 1 (pin ADDRB3 output) (conn ADDRB3 ADDRB3 ==> RAMB16B ADDRB3) ) (element ADDRB4 1 (pin ADDRB4 output) (conn ADDRB4 ADDRB4 ==> RAMB16B ADDRB4) ) (element ADDRB5 1 (pin ADDRB5 output) (conn ADDRB5 ADDRB5 ==> RAMB16B ADDRB5) ) (element ADDRB6 1 (pin ADDRB6 output) (conn ADDRB6 ADDRB6 ==> RAMB16B ADDRB6) ) (element ADDRB7 1 (pin ADDRB7 output) (conn ADDRB7 ADDRB7 ==> RAMB16B ADDRB7) ) (element ADDRB8 1 (pin ADDRB8 output) (conn ADDRB8 ADDRB8 ==> RAMB16B ADDRB8) ) (element ADDRB9 1 (pin ADDRB9 output) (conn ADDRB9 ADDRB9 ==> RAMB16B ADDRB9) ) (element ADDRB10 1 (pin ADDRB10 output) (conn ADDRB10 ADDRB10 ==> RAMB16B ADDRB10) ) (element ADDRB11 1 (pin ADDRB11 output) (conn ADDRB11 ADDRB11 ==> RAMB16B ADDRB11) ) (element WEB 1 (pin WEB output) (conn WEB WEB ==> WEBINV WEB_B) (conn WEB WEB ==> WEBINV WEB) ) (element CLKB 1 (pin CLKB output) (conn CLKB CLKB ==> CLKBINV CLKB_B) (conn CLKB CLKB ==> CLKBINV CLKB) ) (element DOA0 1 (pin DOA0 input) (conn DOA0 DOA0 <== RAMB16A DOA0) ) (element DOA1 1 (pin DOA1 input) (conn DOA1 DOA1 <== RAMB16A DOA1) ) (element DOA2 1 (pin DOA2 input) (conn DOA2 DOA2 <== RAMB16A DOA2) ) (element DOA3 1 (pin DOA3 input) (conn DOA3 DOA3 <== RAMB16A DOA3) ) (element DOA4 1 (pin DOA4 input) (conn DOA4 DOA4 <== RAMB16A DOA4) ) (element DOA5 1 (pin DOA5 input) (conn DOA5 DOA5 <== RAMB16A DOA5) ) (element DOA6 1 (pin DOA6 input) (conn DOA6 DOA6 <== RAMB16A DOA6) ) (element DOA7 1 (pin DOA7 input) (conn DOA7 DOA7 <== RAMB16A DOA7) ) (element DOA31 1 (pin DOA31 input) (conn DOA31 DOA31 <== RAMB16A DOA31) ) (element DOA30 1 (pin DOA30 input) (conn DOA30 DOA30 <== RAMB16A DOA30) ) (element DOA29 1 (pin DOA29 input) (conn DOA29 DOA29 <== RAMB16A DOA29) ) (element DOA28 1 (pin DOA28 input) (conn DOA28 DOA28 <== RAMB16A DOA28) ) (element DOA27 1 (pin DOA27 input) (conn DOA27 DOA27 <== RAMB16A DOA27) ) (element DOA26 1 (pin DOA26 input) (conn DOA26 DOA26 <== RAMB16A DOA26) ) (element DOA25 1 (pin DOA25 input) (conn DOA25 DOA25 <== RAMB16A DOA25) ) (element DOA24 1 (pin DOA24 input) (conn DOA24 DOA24 <== RAMB16A DOA24) ) (element DOA23 1 (pin DOA23 input) (conn DOA23 DOA23 <== RAMB16A DOA23) ) (element DOA22 1 (pin DOA22 input) (conn DOA22 DOA22 <== RAMB16A DOA22) ) (element DOA21 1 (pin DOA21 input) (conn DOA21 DOA21 <== RAMB16A DOA21) ) (element DOA20 1 (pin DOA20 input) (conn DOA20 DOA20 <== RAMB16A DOA20) ) (element DOA19 1 (pin DOA19 input) (conn DOA19 DOA19 <== RAMB16A DOA19) ) (element DOA18 1 (pin DOA18 input) (conn DOA18 DOA18 <== RAMB16A DOA18) ) (element DOA17 1 (pin DOA17 input) (conn DOA17 DOA17 <== RAMB16A DOA17) ) (element DOA16 1 (pin DOA16 input) (conn DOA16 DOA16 <== RAMB16A DOA16) ) (element DOA15 1 (pin DOA15 input) (conn DOA15 DOA15 <== RAMB16A DOA15) ) (element DOA14 1 (pin DOA14 input) (conn DOA14 DOA14 <== RAMB16A DOA14) ) (element DOA13 1 (pin DOA13 input) (conn DOA13 DOA13 <== RAMB16A DOA13) ) (element DOA12 1 (pin DOA12 input) (conn DOA12 DOA12 <== RAMB16A DOA12) ) (element DOA11 1 (pin DOA11 input) (conn DOA11 DOA11 <== RAMB16A DOA11) ) (element DOA10 1 (pin DOA10 input) (conn DOA10 DOA10 <== RAMB16A DOA10) ) (element DOA9 1 (pin DOA9 input) (conn DOA9 DOA9 <== RAMB16A DOA9) ) (element DOA8 1 (pin DOA8 input) (conn DOA8 DOA8 <== RAMB16A DOA8) ) (element ENA 1 (pin ENA output) (conn ENA ENA ==> ENAINV ENA_B) (conn ENA ENA ==> ENAINV ENA) ) (element ENB 1 (pin ENB output) (conn ENB ENB ==> ENBINV ENB_B) (conn ENB ENB ==> ENBINV ENB) ) (element DIPA0 1 (pin DIPA0 output) (conn DIPA0 DIPA0 ==> RAMB16A DIPA0) ) (element DIPA1 1 (pin DIPA1 output) (conn DIPA1 DIPA1 ==> RAMB16A DIPA1) ) (element DIPA2 1 (pin DIPA2 output) (conn DIPA2 DIPA2 ==> RAMB16A DIPA2) ) (element DIPA3 1 (pin DIPA3 output) (conn DIPA3 DIPA3 ==> RAMB16A DIPA3) ) (element ADDRA12 1 (pin ADDRA12 output) (conn ADDRA12 ADDRA12 ==> RAMB16A ADDRA12) ) (element ADDRA13 1 (pin ADDRA13 output) (conn ADDRA13 ADDRA13 ==> RAMB16A ADDRA13) ) (element DIPB0 1 (pin DIPB0 output) (conn DIPB0 DIPB0 ==> RAMB16B DIPB0) ) (element DIPB1 1 (pin DIPB1 output) (conn DIPB1 DIPB1 ==> RAMB16B DIPB1) ) (element DIPB2 1 (pin DIPB2 output) (conn DIPB2 DIPB2 ==> RAMB16B DIPB2) ) (element DIPB3 1 (pin DIPB3 output) (conn DIPB3 DIPB3 ==> RAMB16B DIPB3) ) (element ADDRB12 1 (pin ADDRB12 output) (conn ADDRB12 ADDRB12 ==> RAMB16B ADDRB12) ) (element ADDRB13 1 (pin ADDRB13 output) (conn ADDRB13 ADDRB13 ==> RAMB16B ADDRB13) ) (element DOPA0 1 (pin DOPA0 input) (conn DOPA0 DOPA0 <== RAMB16A DOPA0) ) (element DOPA2 1 (pin DOPA2 input) (conn DOPA2 DOPA2 <== RAMB16A DOPA2) ) (element DOPA1 1 (pin DOPA1 input) (conn DOPA1 DOPA1 <== RAMB16A DOPA1) ) (element DOPA3 1 (pin DOPA3 input) (conn DOPA3 DOPA3 <== RAMB16A DOPA3) ) (element ENAINV 3 (pin ENA_B input) (pin ENA input) (pin OUT output) (cfg ENA_B ENA) (conn ENAINV OUT ==> RAMB16A ENA) (conn ENAINV ENA_B <== ENA ENA) (conn ENAINV ENA <== ENA ENA) ) (element CLKAINV 3 (pin CLKA_B input) (pin CLKA input) (pin OUT output) (cfg CLKA_B CLKA) (conn CLKAINV OUT ==> RAMB16A CLKA) (conn CLKAINV CLKA_B <== CLKA CLKA) (conn CLKAINV CLKA <== CLKA CLKA) ) (element WEAINV 3 (pin WEA_B input) (pin WEA input) (pin OUT output) (cfg WEA_B WEA) (conn WEAINV OUT ==> RAMB16A WEA) (conn WEAINV WEA_B <== WEA WEA) (conn WEAINV WEA <== WEA WEA) ) (element SSRAINV 3 (pin SSRA_B input) (pin SSRA input) (pin OUT output) (cfg SSRA_B SSRA) (conn SSRAINV OUT ==> RAMB16A SSRA) (conn SSRAINV SSRA_B <== SSRA SSRA) (conn SSRAINV SSRA <== SSRA SSRA) ) (element SSRA 1 (pin SSRA output) (conn SSRA SSRA ==> SSRAINV SSRA_B) (conn SSRA SSRA ==> SSRAINV SSRA) ) (element CLKBINV 3 (pin CLKB_B input) (pin CLKB input) (pin OUT output) (cfg CLKB_B CLKB) (conn CLKBINV OUT ==> RAMB16B CLKB) (conn CLKBINV CLKB_B <== CLKB CLKB) (conn CLKBINV CLKB <== CLKB CLKB) ) (element WEBINV 3 (pin WEB_B input) (pin WEB input) (pin OUT output) (cfg WEB_B WEB) (conn WEBINV OUT ==> RAMB16B WEB) (conn WEBINV WEB_B <== WEB WEB) (conn WEBINV WEB <== WEB WEB) ) (element ENBINV 3 (pin ENB_B input) (pin ENB input) (pin OUT output) (cfg ENB_B ENB) (conn ENBINV OUT ==> RAMB16B ENB) (conn ENBINV ENB_B <== ENB ENB) (conn ENBINV ENB <== ENB ENB) ) (element SSRBINV 3 (pin SSRB_B input) (pin SSRB input) (pin OUT output) (cfg SSRB_B SSRB) (conn SSRBINV OUT ==> RAMB16B SSRB) (conn SSRBINV SSRB_B <== SSRB SSRB) (conn SSRBINV SSRB <== SSRB SSRB) ) (element SSRB 1 (pin SSRB output) (conn SSRB SSRB ==> SSRBINV SSRB_B) (conn SSRB SSRB ==> SSRBINV SSRB) ) (element WRITEMODEA 0 (cfg NO_CHANGE READ_FIRST WRITE_FIRST) ) (element PORTA_ATTR 0 (cfg 512X36 1024X18 2048X9 4096X4 8192X2 16384X1) ) (element RAMB16A 93 # BEL (pin DIA0 input) (pin DIA1 input) (pin DIA2 input) (pin DIA3 input) (pin DIA4 input) (pin DIA5 input) (pin DIA6 input) (pin DIA7 input) (pin DIA8 input) (pin DIA9 input) (pin DIA10 input) (pin DIA11 input) (pin DIA12 input) (pin DIA13 input) (pin DIA14 input) (pin DIA15 input) (pin DIA16 input) (pin DIA17 input) (pin DIA18 input) (pin DIA19 input) (pin DIA20 input) (pin DIA21 input) (pin DIA22 input) (pin DIA23 input) (pin DIA24 input) (pin DIA25 input) (pin DIA26 input) (pin DIA27 input) (pin DIA28 input) (pin DIA29 input) (pin DIA30 input) (pin DIA31 input) (pin DIPA0 input) (pin DIPA1 input) (pin DIPA2 input) (pin DIPA3 input) (pin ADDRA0 input) (pin ADDRA1 input) (pin ADDRA2 input) (pin ADDRA3 input) (pin ADDRA4 input) (pin ADDRA5 input) (pin ADDRA6 input) (pin ADDRA7 input) (pin ADDRA8 input) (pin ADDRA9 input) (pin ADDRA10 input) (pin ADDRA11 input) (pin ADDRA12 input) (pin ADDRA13 input) (pin SSRA input) (pin ENA input) (pin WEA input) (pin CLKA input) (pin DOA0 output) (pin DOA1 output) (pin DOA2 output) (pin DOA3 output) (pin DOA4 output) (pin DOA5 output) (pin DOA6 output) (pin DOA7 output) (pin DOA8 output) (pin DOA9 output) (pin DOA10 output) (pin DOA11 output) (pin DOA12 output) (pin DOA13 output) (pin DOA14 output) (pin DOA15 output) (pin DOA16 output) (pin DOA17 output) (pin DOA18 output) (pin DOA19 output) (pin DOA20 output) (pin DOA21 output) (pin DOA22 output) (pin DOA23 output) (pin DOA24 output) (pin DOA25 output) (pin DOA26 output) (pin DOA27 output) (pin DOA28 output) (pin DOA29 output) (pin DOA30 output) (pin DOA31 output) (pin DOPA0 output) (pin DOPA1 output) (pin DOPA2 output) (pin DOPA3 output) (pin ADDRA output) (pin DIA output) (pin DOA input) (conn RAMB16A DOA0 ==> DOA0 DOA0) (conn RAMB16A DOA1 ==> DOA1 DOA1) (conn RAMB16A DOA2 ==> DOA2 DOA2) (conn RAMB16A DOA3 ==> DOA3 DOA3) (conn RAMB16A DOA4 ==> DOA4 DOA4) (conn RAMB16A DOA5 ==> DOA5 DOA5) (conn RAMB16A DOA6 ==> DOA6 DOA6) (conn RAMB16A DOA7 ==> DOA7 DOA7) (conn RAMB16A DOA8 ==> DOA8 DOA8) (conn RAMB16A DOA9 ==> DOA9 DOA9) (conn RAMB16A DOA10 ==> DOA10 DOA10) (conn RAMB16A DOA11 ==> DOA11 DOA11) (conn RAMB16A DOA12 ==> DOA12 DOA12) (conn RAMB16A DOA13 ==> DOA13 DOA13) (conn RAMB16A DOA14 ==> DOA14 DOA14) (conn RAMB16A DOA15 ==> DOA15 DOA15) (conn RAMB16A DOA16 ==> DOA16 DOA16) (conn RAMB16A DOA17 ==> DOA17 DOA17) (conn RAMB16A DOA18 ==> DOA18 DOA18) (conn RAMB16A DOA19 ==> DOA19 DOA19) (conn RAMB16A DOA20 ==> DOA20 DOA20) (conn RAMB16A DOA21 ==> DOA21 DOA21) (conn RAMB16A DOA22 ==> DOA22 DOA22) (conn RAMB16A DOA23 ==> DOA23 DOA23) (conn RAMB16A DOA24 ==> DOA24 DOA24) (conn RAMB16A DOA25 ==> DOA25 DOA25) (conn RAMB16A DOA26 ==> DOA26 DOA26) (conn RAMB16A DOA27 ==> DOA27 DOA27) (conn RAMB16A DOA28 ==> DOA28 DOA28) (conn RAMB16A DOA29 ==> DOA29 DOA29) (conn RAMB16A DOA30 ==> DOA30 DOA30) (conn RAMB16A DOA31 ==> DOA31 DOA31) (conn RAMB16A DOPA0 ==> DOPA0 DOPA0) (conn RAMB16A DOPA1 ==> DOPA1 DOPA1) (conn RAMB16A DOPA2 ==> DOPA2 DOPA2) (conn RAMB16A DOPA3 ==> DOPA3 DOPA3) (conn RAMB16A ADDRA ==> RAMB16 ADDRA) (conn RAMB16A DIA ==> RAMB16 DIA) (conn RAMB16A DIA0 <== DIA0 DIA0) (conn RAMB16A DIA1 <== DIA1 DIA1) (conn RAMB16A DIA2 <== DIA2 DIA2) (conn RAMB16A DIA3 <== DIA3 DIA3) (conn RAMB16A DIA4 <== DIA4 DIA4) (conn RAMB16A DIA5 <== DIA5 DIA5) (conn RAMB16A DIA6 <== DIA6 DIA6) (conn RAMB16A DIA7 <== DIA7 DIA7) (conn RAMB16A DIA8 <== DIA8 DIA8) (conn RAMB16A DIA9 <== DIA9 DIA9) (conn RAMB16A DIA10 <== DIA10 DIA10) (conn RAMB16A DIA11 <== DIA11 DIA11) (conn RAMB16A DIA12 <== DIA12 DIA12) (conn RAMB16A DIA13 <== DIA13 DIA13) (conn RAMB16A DIA14 <== DIA14 DIA14) (conn RAMB16A DIA15 <== DIA15 DIA15) (conn RAMB16A DIA16 <== DIA16 DIA16) (conn RAMB16A DIA17 <== DIA17 DIA17) (conn RAMB16A DIA18 <== DIA18 DIA18) (conn RAMB16A DIA19 <== DIA19 DIA19) (conn RAMB16A DIA20 <== DIA20 DIA20) (conn RAMB16A DIA21 <== DIA21 DIA21) (conn RAMB16A DIA22 <== DIA22 DIA22) (conn RAMB16A DIA23 <== DIA23 DIA23) (conn RAMB16A DIA24 <== DIA24 DIA24) (conn RAMB16A DIA25 <== DIA25 DIA25) (conn RAMB16A DIA26 <== DIA26 DIA26) (conn RAMB16A DIA27 <== DIA27 DIA27) (conn RAMB16A DIA28 <== DIA28 DIA28) (conn RAMB16A DIA29 <== DIA29 DIA29) (conn RAMB16A DIA30 <== DIA30 DIA30) (conn RAMB16A DIA31 <== DIA31 DIA31) (conn RAMB16A DIPA0 <== DIPA0 DIPA0) (conn RAMB16A DIPA1 <== DIPA1 DIPA1) (conn RAMB16A DIPA2 <== DIPA2 DIPA2) (conn RAMB16A DIPA3 <== DIPA3 DIPA3) (conn RAMB16A ADDRA0 <== ADDRA0 ADDRA0) (conn RAMB16A ADDRA1 <== ADDRA1 ADDRA1) (conn RAMB16A ADDRA2 <== ADDRA2 ADDRA2) (conn RAMB16A ADDRA3 <== ADDRA3 ADDRA3) (conn RAMB16A ADDRA4 <== ADDRA4 ADDRA4) (conn RAMB16A ADDRA5 <== ADDRA5 ADDRA5) (conn RAMB16A ADDRA6 <== ADDRA6 ADDRA6) (conn RAMB16A ADDRA7 <== ADDRA7 ADDRA7) (conn RAMB16A ADDRA8 <== ADDRA8 ADDRA8) (conn RAMB16A ADDRA9 <== ADDRA9 ADDRA9) (conn RAMB16A ADDRA10 <== ADDRA10 ADDRA10) (conn RAMB16A ADDRA11 <== ADDRA11 ADDRA11) (conn RAMB16A ADDRA12 <== ADDRA12 ADDRA12) (conn RAMB16A ADDRA13 <== ADDRA13 ADDRA13) (conn RAMB16A SSRA <== SSRAINV OUT) (conn RAMB16A ENA <== ENAINV OUT) (conn RAMB16A WEA <== WEAINV OUT) (conn RAMB16A CLKA <== CLKAINV OUT) (conn RAMB16A DOA <== RAMB16 DOA) ) (element DOB27 1 (pin DOB27 input) (conn DOB27 DOB27 <== RAMB16B DOB27) ) (element DOB20 1 (pin DOB20 input) (conn DOB20 DOB20 <== RAMB16B DOB20) ) (element DOB22 1 (pin DOB22 input) (conn DOB22 DOB22 <== RAMB16B DOB22) ) (element DOB23 1 (pin DOB23 input) (conn DOB23 DOB23 <== RAMB16B DOB23) ) (element DOB24 1 (pin DOB24 input) (conn DOB24 DOB24 <== RAMB16B DOB24) ) (element DOB25 1 (pin DOB25 input) (conn DOB25 DOB25 <== RAMB16B DOB25) ) (element DOB26 1 (pin DOB26 input) (conn DOB26 DOB26 <== RAMB16B DOB26) ) (element DOB13 1 (pin DOB13 input) (conn DOB13 DOB13 <== RAMB16B DOB13) ) (element DOB6 1 (pin DOB6 input) (conn DOB6 DOB6 <== RAMB16B DOB6) ) (element DOB0 1 (pin DOB0 input) (conn DOB0 DOB0 <== RAMB16B DOB0) ) (element DOB1 1 (pin DOB1 input) (conn DOB1 DOB1 <== RAMB16B DOB1) ) (element DOB2 1 (pin DOB2 input) (conn DOB2 DOB2 <== RAMB16B DOB2) ) (element DOB3 1 (pin DOB3 input) (conn DOB3 DOB3 <== RAMB16B DOB3) ) (element DOB4 1 (pin DOB4 input) (conn DOB4 DOB4 <== RAMB16B DOB4) ) (element DOB5 1 (pin DOB5 input) (conn DOB5 DOB5 <== RAMB16B DOB5) ) (element DOB7 1 (pin DOB7 input) (conn DOB7 DOB7 <== RAMB16B DOB7) ) (element DOB8 1 (pin DOB8 input) (conn DOB8 DOB8 <== RAMB16B DOB8) ) (element DOB9 1 (pin DOB9 input) (conn DOB9 DOB9 <== RAMB16B DOB9) ) (element DOB10 1 (pin DOB10 input) (conn DOB10 DOB10 <== RAMB16B DOB10) ) (element DOB11 1 (pin DOB11 input) (conn DOB11 DOB11 <== RAMB16B DOB11) ) (element DOB12 1 (pin DOB12 input) (conn DOB12 DOB12 <== RAMB16B DOB12) ) (element DOB14 1 (pin DOB14 input) (conn DOB14 DOB14 <== RAMB16B DOB14) ) (element DOB15 1 (pin DOB15 input) (conn DOB15 DOB15 <== RAMB16B DOB15) ) (element DOB16 1 (pin DOB16 input) (conn DOB16 DOB16 <== RAMB16B DOB16) ) (element DOB17 1 (pin DOB17 input) (conn DOB17 DOB17 <== RAMB16B DOB17) ) (element DOB18 1 (pin DOB18 input) (conn DOB18 DOB18 <== RAMB16B DOB18) ) (element DOB19 1 (pin DOB19 input) (conn DOB19 DOB19 <== RAMB16B DOB19) ) (element DOB21 1 (pin DOB21 input) (conn DOB21 DOB21 <== RAMB16B DOB21) ) (element DOB28 1 (pin DOB28 input) (conn DOB28 DOB28 <== RAMB16B DOB28) ) (element DOB29 1 (pin DOB29 input) (conn DOB29 DOB29 <== RAMB16B DOB29) ) (element DOB30 1 (pin DOB30 input) (conn DOB30 DOB30 <== RAMB16B DOB30) ) (element DOPB1 1 (pin DOPB1 input) (conn DOPB1 DOPB1 <== RAMB16B DOPB1) ) (element DOB31 1 (pin DOB31 input) (conn DOB31 DOB31 <== RAMB16B DOB31) ) (element DOPB0 1 (pin DOPB0 input) (conn DOPB0 DOPB0 <== RAMB16B DOPB0) ) (element DOPB2 1 (pin DOPB2 input) (conn DOPB2 DOPB2 <== RAMB16B DOPB2) ) (element DOPB3 1 (pin DOPB3 input) (conn DOPB3 DOPB3 <== RAMB16B DOPB3) ) (element WRITEMODEB 0 (cfg NO_CHANGE READ_FIRST WRITE_FIRST) ) (element PORTB_ATTR 0 (cfg 512X36 1024X18 2048X9 4096X4 8192X2 16384X1) ) (element RAMB16B 93 # BEL (pin DIB0 input) (pin DIB1 input) (pin DIB2 input) (pin DIB3 input) (pin DIB4 input) (pin DIB5 input) (pin DIB6 input) (pin DIB7 input) (pin DIB8 input) (pin DIB9 input) (pin DIB10 input) (pin DIB11 input) (pin DIB12 input) (pin DIB13 input) (pin DIB14 input) (pin DIB15 input) (pin DIB16 input) (pin DIB17 input) (pin DIB18 input) (pin DIB19 input) (pin DIB20 input) (pin DIB21 input) (pin DIB22 input) (pin DIB23 input) (pin DIB24 input) (pin DIB25 input) (pin DIB26 input) (pin DIB27 input) (pin DIB28 input) (pin DIB29 input) (pin DIB30 input) (pin DIB31 input) (pin DIPB0 input) (pin DIPB1 input) (pin DIPB2 input) (pin DIPB3 input) (pin ADDRB0 input) (pin ADDRB1 input) (pin ADDRB2 input) (pin ADDRB3 input) (pin ADDRB4 input) (pin ADDRB5 input) (pin ADDRB6 input) (pin ADDRB7 input) (pin ADDRB8 input) (pin ADDRB9 input) (pin ADDRB10 input) (pin ADDRB11 input) (pin ADDRB12 input) (pin ADDRB13 input) (pin SSRB input) (pin ENB input) (pin WEB input) (pin CLKB input) (pin DOB0 output) (pin DOB1 output) (pin DOB2 output) (pin DOB3 output) (pin DOB4 output) (pin DOB5 output) (pin DOB6 output) (pin DOB7 output) (pin DOB8 output) (pin DOB9 output) (pin DOB10 output) (pin DOB11 output) (pin DOB12 output) (pin DOB13 output) (pin DOB14 output) (pin DOB15 output) (pin DOB16 output) (pin DOB17 output) (pin DOB18 output) (pin DOB19 output) (pin DOB20 output) (pin DOB21 output) (pin DOB22 output) (pin DOB23 output) (pin DOB24 output) (pin DOB25 output) (pin DOB26 output) (pin DOB27 output) (pin DOB28 output) (pin DOB29 output) (pin DOB30 output) (pin DOB31 output) (pin DOPB0 output) (pin DOPB1 output) (pin DOPB2 output) (pin DOPB3 output) (pin ADDRB output) (pin DIB output) (pin DOB input) (conn RAMB16B DOB0 ==> DOB0 DOB0) (conn RAMB16B DOB1 ==> DOB1 DOB1) (conn RAMB16B DOB2 ==> DOB2 DOB2) (conn RAMB16B DOB3 ==> DOB3 DOB3) (conn RAMB16B DOB4 ==> DOB4 DOB4) (conn RAMB16B DOB5 ==> DOB5 DOB5) (conn RAMB16B DOB6 ==> DOB6 DOB6) (conn RAMB16B DOB7 ==> DOB7 DOB7) (conn RAMB16B DOB8 ==> DOB8 DOB8) (conn RAMB16B DOB9 ==> DOB9 DOB9) (conn RAMB16B DOB10 ==> DOB10 DOB10) (conn RAMB16B DOB11 ==> DOB11 DOB11) (conn RAMB16B DOB12 ==> DOB12 DOB12) (conn RAMB16B DOB13 ==> DOB13 DOB13) (conn RAMB16B DOB14 ==> DOB14 DOB14) (conn RAMB16B DOB15 ==> DOB15 DOB15) (conn RAMB16B DOB16 ==> DOB16 DOB16) (conn RAMB16B DOB17 ==> DOB17 DOB17) (conn RAMB16B DOB18 ==> DOB18 DOB18) (conn RAMB16B DOB19 ==> DOB19 DOB19) (conn RAMB16B DOB20 ==> DOB20 DOB20) (conn RAMB16B DOB21 ==> DOB21 DOB21) (conn RAMB16B DOB22 ==> DOB22 DOB22) (conn RAMB16B DOB23 ==> DOB23 DOB23) (conn RAMB16B DOB24 ==> DOB24 DOB24) (conn RAMB16B DOB25 ==> DOB25 DOB25) (conn RAMB16B DOB26 ==> DOB26 DOB26) (conn RAMB16B DOB27 ==> DOB27 DOB27) (conn RAMB16B DOB28 ==> DOB28 DOB28) (conn RAMB16B DOB29 ==> DOB29 DOB29) (conn RAMB16B DOB30 ==> DOB30 DOB30) (conn RAMB16B DOB31 ==> DOB31 DOB31) (conn RAMB16B DOPB0 ==> DOPB0 DOPB0) (conn RAMB16B DOPB1 ==> DOPB1 DOPB1) (conn RAMB16B DOPB2 ==> DOPB2 DOPB2) (conn RAMB16B DOPB3 ==> DOPB3 DOPB3) (conn RAMB16B ADDRB ==> RAMB16 ADDRB) (conn RAMB16B DIB ==> RAMB16 DIB) (conn RAMB16B DIB0 <== DIB0 DIB0) (conn RAMB16B DIB1 <== DIB1 DIB1) (conn RAMB16B DIB2 <== DIB2 DIB2) (conn RAMB16B DIB3 <== DIB3 DIB3) (conn RAMB16B DIB4 <== DIB4 DIB4) (conn RAMB16B DIB5 <== DIB5 DIB5) (conn RAMB16B DIB6 <== DIB6 DIB6) (conn RAMB16B DIB7 <== DIB7 DIB7) (conn RAMB16B DIB8 <== DIB8 DIB8) (conn RAMB16B DIB9 <== DIB9 DIB9) (conn RAMB16B DIB10 <== DIB10 DIB10) (conn RAMB16B DIB11 <== DIB11 DIB11) (conn RAMB16B DIB12 <== DIB12 DIB12) (conn RAMB16B DIB13 <== DIB13 DIB13) (conn RAMB16B DIB14 <== DIB14 DIB14) (conn RAMB16B DIB15 <== DIB15 DIB15) (conn RAMB16B DIB16 <== DIB16 DIB16) (conn RAMB16B DIB17 <== DIB17 DIB17) (conn RAMB16B DIB18 <== DIB18 DIB18) (conn RAMB16B DIB19 <== DIB19 DIB19) (conn RAMB16B DIB20 <== DIB20 DIB20) (conn RAMB16B DIB21 <== DIB21 DIB21) (conn RAMB16B DIB22 <== DIB22 DIB22) (conn RAMB16B DIB23 <== DIB23 DIB23) (conn RAMB16B DIB24 <== DIB24 DIB24) (conn RAMB16B DIB25 <== DIB25 DIB25) (conn RAMB16B DIB26 <== DIB26 DIB26) (conn RAMB16B DIB27 <== DIB27 DIB27) (conn RAMB16B DIB28 <== DIB28 DIB28) (conn RAMB16B DIB29 <== DIB29 DIB29) (conn RAMB16B DIB30 <== DIB30 DIB30) (conn RAMB16B DIB31 <== DIB31 DIB31) (conn RAMB16B DIPB0 <== DIPB0 DIPB0) (conn RAMB16B DIPB1 <== DIPB1 DIPB1) (conn RAMB16B DIPB2 <== DIPB2 DIPB2) (conn RAMB16B DIPB3 <== DIPB3 DIPB3) (conn RAMB16B ADDRB0 <== ADDRB0 ADDRB0) (conn RAMB16B ADDRB1 <== ADDRB1 ADDRB1) (conn RAMB16B ADDRB2 <== ADDRB2 ADDRB2) (conn RAMB16B ADDRB3 <== ADDRB3 ADDRB3) (conn RAMB16B ADDRB4 <== ADDRB4 ADDRB4) (conn RAMB16B ADDRB5 <== ADDRB5 ADDRB5) (conn RAMB16B ADDRB6 <== ADDRB6 ADDRB6) (conn RAMB16B ADDRB7 <== ADDRB7 ADDRB7) (conn RAMB16B ADDRB8 <== ADDRB8 ADDRB8) (conn RAMB16B ADDRB9 <== ADDRB9 ADDRB9) (conn RAMB16B ADDRB10 <== ADDRB10 ADDRB10) (conn RAMB16B ADDRB11 <== ADDRB11 ADDRB11) (conn RAMB16B ADDRB12 <== ADDRB12 ADDRB12) (conn RAMB16B ADDRB13 <== ADDRB13 ADDRB13) (conn RAMB16B SSRB <== SSRBINV OUT) (conn RAMB16B ENB <== ENBINV OUT) (conn RAMB16B WEB <== WEBINV OUT) (conn RAMB16B CLKB <== CLKBINV OUT) (conn RAMB16B DOB <== RAMB16 DOB) ) (element RAMB16 6 # BEL (pin ADDRA input) (pin DIA input) (pin DOA output) (pin ADDRB input) (pin DIB input) (pin DOB output) (conn RAMB16 DOA ==> RAMB16A DOA) (conn RAMB16 DOB ==> RAMB16B DOB) (conn RAMB16 ADDRA <== RAMB16A ADDRA) (conn RAMB16 DIA <== RAMB16A DIA) (conn RAMB16 ADDRB <== RAMB16B ADDRB) (conn RAMB16 DIB <== RAMB16B DIB) ) ) (primitive_def RESERVED_ANDOR 4 10 (pin CIN0 CIN0 input) (pin CIN1 CIN1 input) (pin CPREV CPREV input) (pin O O output) (element AND 4 # BEL (pin 0 input) (pin 1 input) (pin 2 input) (pin O output) (conn AND O ==> ANDORMUX 1) (conn AND 0 <== CIN0_PHYS OUT) (conn AND 1 <== CIN1_PHYS OUT) (conn AND 2 <== CPREV_PHYS OUT) ) (element OR 4 # BEL (pin 0 input) (pin 1 input) (pin 2 input) (pin O output) (conn OR O ==> ANDORMUX 0) (conn OR 0 <== CIN0_PHYS OUT) (conn OR 1 <== CIN1_PHYS OUT) (conn OR 2 <== CPREV_PHYS OUT) ) (element ANDORMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn ANDORMUX OUT ==> O O) (conn ANDORMUX 0 <== OR O) (conn ANDORMUX 1 <== AND O) ) (element O 1 (pin O input) (conn O O <== ANDORMUX OUT) ) (element CPREV 1 (pin CPREV output) (conn CPREV CPREV ==> CPREV_PHYS IN) ) (element CIN1 1 (pin CIN1 output) (conn CIN1 CIN1 ==> CIN1_PHYS IN) ) (element CIN0 1 (pin CIN0 output) (conn CIN0 CIN0 ==> CIN0_PHYS IN) ) (element CIN0_PHYS 2 # BEL (pin IN input) (pin OUT output) (conn CIN0_PHYS OUT ==> AND 0) (conn CIN0_PHYS OUT ==> OR 0) (conn CIN0_PHYS IN <== CIN0 CIN0) ) (element CIN1_PHYS 2 # BEL (pin IN input) (pin OUT output) (conn CIN1_PHYS OUT ==> AND 1) (conn CIN1_PHYS OUT ==> OR 1) (conn CIN1_PHYS IN <== CIN1 CIN1) ) (element CPREV_PHYS 2 # BEL (pin IN input) (pin OUT output) (conn CPREV_PHYS OUT ==> AND 2) (conn CPREV_PHYS OUT ==> OR 2) (conn CPREV_PHYS IN <== CPREV CPREV) ) ) (primitive_def RESERVED_LL 8 9 (pin LH0 LH0 input) (pin LH6 LH6 input) (pin LH12 LH12 input) (pin LH18 LH18 input) (pin LV0 LV0 input) (pin LV6 LV6 input) (pin LV12 LV12 input) (pin LV18 LV18 input) (element TEST_LL 8 # BEL (pin LH0 input) (pin LH6 input) (pin LH12 input) (pin LH18 input) (pin LV0 input) (pin LV6 input) (pin LV12 input) (pin LV18 input) (conn TEST_LL LH0 <== LH0 LH0) (conn TEST_LL LH6 <== LH6 LH6) (conn TEST_LL LH12 <== LH12 LH12) (conn TEST_LL LH18 <== LH18 LH18) (conn TEST_LL LV0 <== LV0 LV0) (conn TEST_LL LV6 <== LV6 LV6) (conn TEST_LL LV12 <== LV12 LV12) (conn TEST_LL LV18 <== LV18 LV18) ) (element LH0 1 (pin LH0 output) (conn LH0 LH0 ==> TEST_LL LH0) ) (element LH6 1 (pin LH6 output) (conn LH6 LH6 ==> TEST_LL LH6) ) (element LH12 1 (pin LH12 output) (conn LH12 LH12 ==> TEST_LL LH12) ) (element LH18 1 (pin LH18 output) (conn LH18 LH18 ==> TEST_LL LH18) ) (element LV0 1 (pin LV0 output) (conn LV0 LV0 ==> TEST_LL LV0) ) (element LV6 1 (pin LV6 output) (conn LV6 LV6 ==> TEST_LL LV6) ) (element LV12 1 (pin LV12 output) (conn LV12 LV12 ==> TEST_LL LV12) ) (element LV18 1 (pin LV18 output) (conn LV18 LV18 ==> TEST_LL LV18) ) ) (primitive_def SLICEL 25 70 (pin BX BX input) (pin BY BY input) (pin CE CE input) (pin CIN CIN input) (pin CLK CLK input) (pin SR SR input) (pin F1 F1 input) (pin F2 F2 input) (pin F3 F3 input) (pin F4 F4 input) (pin G1 G1 input) (pin G2 G2 input) (pin G3 G3 input) (pin G4 G4 input) (pin FXINA FXINA input) (pin FXINB FXINB input) (pin F5 F5 output) (pin FX FX output) (pin X X output) (pin XB XB output) (pin XQ XQ output) (pin Y Y output) (pin YB YB output) (pin YQ YQ output) (pin COUT COUT output) (element F1 1 (pin F1 output) (conn F1 F1 ==> FAND 0) (conn F1 F1 ==> CY0F F1) (conn F1 F1 ==> F A1) ) (element F2 1 (pin F2 output) (conn F2 F2 ==> FAND 1) (conn F2 F2 ==> CY0F F2) (conn F2 F2 ==> F A2) ) (element F3 1 (pin F3 output) (conn F3 F3 ==> F A3) ) (element G1 1 (pin G1 output) (conn G1 G1 ==> CY0G G1) (conn G1 G1 ==> GAND 0) (conn G1 G1 ==> G A1) ) (element G2 1 (pin G2 output) (conn G2 G2 ==> CY0G G2) (conn G2 G2 ==> GAND 1) (conn G2 G2 ==> G A2) ) (element G3 1 (pin G3 output) (conn G3 G3 ==> G A3) ) (element X 1 (pin X input) (conn X X <== XUSED OUT) ) (element XQ 1 (pin XQ input) (conn XQ XQ <== FFX Q) ) (element Y 1 (pin Y input) (conn Y Y <== YUSED OUT) ) (element YB 1 (pin YB input) (conn YB YB <== YBUSED OUT) ) (element YQ 1 (pin YQ input) (conn YQ YQ <== FFY Q) ) (element BY 1 (pin BY output) (conn BY BY ==> BYINV BY_B) (conn BY BY ==> BYINV BY) ) (element COUT 1 (pin COUT input) (conn COUT COUT <== COUTUSED OUT) ) (element CIN 1 (pin CIN output) (conn CIN CIN ==> CYINIT CIN) ) (element CE 1 (pin CE output) (conn CE CE ==> CEINV CE_B) (conn CE CE ==> CEINV CE) ) (element BX 1 (pin BX output) (conn BX BX ==> BXINV BX_B) (conn BX BX ==> BXINV BX) ) (element XORF 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn XORF O ==> FXMUX FXOR) (conn XORF 0 <== F D) (conn XORF 1 <== CYINIT OUT) ) (element XORG 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn XORG O ==> GYMUX GXOR) (conn XORG 0 <== G D) (conn XORG 1 <== CYMUXF OUT) ) (element CYSELF 3 (pin F input) (pin 1 input) (pin OUT output) (cfg F 1) (conn CYSELF OUT ==> CYMUXF S0) (conn CYSELF F <== F D) (conn CYSELF 1 <== VDDF 1) ) (element CYSELG 3 (pin G input) (pin 1 input) (pin OUT output) (cfg G 1) (conn CYSELG OUT ==> CYMUXG S0) (conn CYSELG G <== G D) (conn CYSELG 1 <== VDDG 1) ) (element XB 1 (pin XB input) (conn XB XB <== XBUSED OUT) ) (element F4 1 (pin F4 output) (conn F4 F4 ==> F A4) ) (element G4 1 (pin G4 output) (conn G4 G4 ==> G A4) ) (element CLK 1 (pin CLK output) (conn CLK CLK ==> CLKINV CLK_B) (conn CLK CLK ==> CLKINV CLK) ) (element SR 1 (pin SR output) (conn SR SR ==> SRINV SR_B) (conn SR SR ==> SRINV SR) ) (element F6MUX 4 # BEL (pin 1 input) (pin 0 input) (pin OUT output) (pin S0 input) (conn F6MUX OUT ==> FXUSED 0) (conn F6MUX OUT ==> GYMUX FX) (conn F6MUX 1 <== FXINA FXINA) (conn F6MUX 0 <== FXINB FXINB) (conn F6MUX S0 <== BYINV OUT) ) (element F5 1 (pin F5 input) (conn F5 F5 <== F5USED OUT) ) (element VDDG 1 # BEL (pin 1 output) (conn VDDG 1 ==> CYSELG 1) ) (element VDDF 1 # BEL (pin 1 output) (conn VDDF 1 ==> CYSELF 1) ) (element GNDF 1 # BEL (pin 0 output) (conn GNDF 0 ==> CY0F 0) ) (element GNDG 1 # BEL (pin 0 output) (conn GNDG 0 ==> CY0G 0) ) (element COUTUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn COUTUSED OUT ==> COUT COUT) (conn COUTUSED 0 <== CYMUXG OUT) ) (element YUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn YUSED OUT ==> Y Y) (conn YUSED 0 <== GYMUX OUT) ) (element XUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn XUSED OUT ==> X X) (conn XUSED 0 <== FXMUX OUT) ) (element F5USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn F5USED OUT ==> F5 F5) (conn F5USED 0 <== F5MUX OUT) ) (element CYINIT 3 (pin CIN input) (pin BX input) (pin OUT output) (cfg CIN BX) (conn CYINIT OUT ==> XORF 1) (conn CYINIT OUT ==> CYMUXF 1) (conn CYINIT CIN <== CIN CIN) (conn CYINIT BX <== BXINV OUT) ) (element DYMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn DYMUX OUT ==> FFY D) (conn DYMUX 0 <== BYINV OUT) (conn DYMUX 1 <== GYMUX OUT) ) (element DXMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn DXMUX OUT ==> FFX D) (conn DXMUX 0 <== BXINV OUT) (conn DXMUX 1 <== FXMUX OUT) ) (element FAND 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn FAND O ==> CY0F PROD) (conn FAND 0 <== F1 F1) (conn FAND 1 <== F2 F2) ) (element C1VDD 1 # BEL (pin 1 output) (conn C1VDD 1 ==> CY0F 1) ) (element C2VDD 1 # BEL (pin 1 output) (conn C2VDD 1 ==> CY0G 1) ) (element REVUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn REVUSED OUT ==> FFX REV) (conn REVUSED OUT ==> FFY REV) (conn REVUSED 0 <== BYINV OUT) ) (element FXMUX 4 (pin F5 input) (pin F input) (pin FXOR input) (pin OUT output) (cfg F5 F FXOR) (conn FXMUX OUT ==> XUSED 0) (conn FXMUX OUT ==> DXMUX 1) (conn FXMUX F5 <== F5MUX OUT) (conn FXMUX F <== F D) (conn FXMUX FXOR <== XORF O) ) (element SYNC_ATTR 0 (cfg SYNC ASYNC) ) (element FFY_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element FFX 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn FFX Q ==> XQ XQ) (conn FFX CK <== CLKINV OUT) (conn FFX CE <== CEINV OUT) (conn FFX D <== DXMUX OUT) (conn FFX SR <== SRINV OUT) (conn FFX REV <== REVUSED OUT) ) (element FFY 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn FFY Q ==> YQ YQ) (conn FFY CK <== CLKINV OUT) (conn FFY CE <== CEINV OUT) (conn FFY D <== DYMUX OUT) (conn FFY SR <== SRINV OUT) (conn FFY REV <== REVUSED OUT) ) (element FFX_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element CY0G 7 (pin 0 input) (pin 1 input) (pin G1 input) (pin PROD input) (pin G2 input) (pin BY input) (pin OUT output) (cfg 0 1 G1 PROD G2 BY) (conn CY0G OUT ==> CYMUXG 0) (conn CY0G 0 <== GNDG 0) (conn CY0G 1 <== C2VDD 1) (conn CY0G G1 <== G1 G1) (conn CY0G PROD <== GAND O) (conn CY0G G2 <== G2 G2) (conn CY0G BY <== BYINV OUT) ) (element FXINA 1 (pin FXINA output) (conn FXINA FXINA ==> F6MUX 1) ) (element FXINB 1 (pin FXINB output) (conn FXINB FXINB ==> F6MUX 0) ) (element FXUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn FXUSED OUT ==> FX FX) (conn FXUSED 0 <== F6MUX OUT) ) (element FX 1 (pin FX input) (conn FX FX <== FXUSED OUT) ) (element CY0F 7 (pin 0 input) (pin 1 input) (pin F1 input) (pin PROD input) (pin F2 input) (pin BX input) (pin OUT output) (cfg 0 1 F1 PROD F2 BX) (conn CY0F OUT ==> CYMUXF 0) (conn CY0F 0 <== GNDF 0) (conn CY0F 1 <== C1VDD 1) (conn CY0F F1 <== F1 F1) (conn CY0F PROD <== FAND O) (conn CY0F F2 <== F2 F2) (conn CY0F BX <== BXINV OUT) ) (element F5MUX 4 # BEL (pin F input) (pin G input) (pin OUT output) (pin S0 input) (conn F5MUX OUT ==> F5USED 0) (conn F5MUX OUT ==> FXMUX F5) (conn F5MUX F <== F D) (conn F5MUX G <== G D) (conn F5MUX S0 <== BXINV OUT) ) (element FFX_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element FFY_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element XBUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn XBUSED OUT ==> XB XB) (conn XBUSED 0 <== CYMUXF OUT) ) (element GAND 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GAND O ==> CY0G PROD) (conn GAND 0 <== G1 G1) (conn GAND 1 <== G2 G2) ) (element CYMUXF 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn CYMUXF OUT ==> XORG 1) (conn CYMUXF OUT ==> XBUSED 0) (conn CYMUXF OUT ==> CYMUXG 1) (conn CYMUXF 0 <== CY0F OUT) (conn CYMUXF 1 <== CYINIT OUT) (conn CYMUXF S0 <== CYSELF OUT) ) (element CYMUXG 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn CYMUXG OUT ==> COUTUSED 0) (conn CYMUXG OUT ==> YBUSED 0) (conn CYMUXG 0 <== CY0G OUT) (conn CYMUXG 1 <== CYMUXF OUT) (conn CYMUXG S0 <== CYSELG OUT) ) (element YBUSED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn YBUSED OUT ==> YB YB) (conn YBUSED 0 <== CYMUXG OUT) ) (element BYINV 3 (pin BY_B input) (pin BY input) (pin OUT output) (cfg BY_B BY) (conn BYINV OUT ==> F6MUX S0) (conn BYINV OUT ==> DYMUX 0) (conn BYINV OUT ==> REVUSED 0) (conn BYINV OUT ==> CY0G BY) (conn BYINV BY_B <== BY BY) (conn BYINV BY <== BY BY) ) (element BXINV 3 (pin BX_B input) (pin BX input) (pin OUT output) (cfg BX_B BX) (conn BXINV OUT ==> CYINIT BX) (conn BXINV OUT ==> DXMUX 0) (conn BXINV OUT ==> CY0F BX) (conn BXINV OUT ==> F5MUX S0) (conn BXINV BX_B <== BX BX) (conn BXINV BX <== BX BX) ) (element CEINV 3 (pin CE_B input) (pin CE input) (pin OUT output) (cfg CE_B CE) (conn CEINV OUT ==> FFX CE) (conn CEINV OUT ==> FFY CE) (conn CEINV CE_B <== CE CE) (conn CEINV CE <== CE CE) ) (element CLKINV 3 (pin CLK_B input) (pin CLK input) (pin OUT output) (cfg CLK_B CLK) (conn CLKINV OUT ==> FFX CK) (conn CLKINV OUT ==> FFY CK) (conn CLKINV CLK_B <== CLK CLK) (conn CLKINV CLK <== CLK CLK) ) (element SRINV 3 (pin SR_B input) (pin SR input) (pin OUT output) (cfg SR_B SR) (conn SRINV OUT ==> FFX SR) (conn SRINV OUT ==> FFY SR) (conn SRINV SR_B <== SR SR) (conn SRINV SR <== SR SR) ) (element GYMUX 4 (pin G input) (pin GXOR input) (pin FX input) (pin OUT output) (cfg G GXOR FX) (conn GYMUX OUT ==> YUSED 0) (conn GYMUX OUT ==> DYMUX 1) (conn GYMUX G <== G D) (conn GYMUX GXOR <== XORG O) (conn GYMUX FX <== F6MUX OUT) ) (element F 5 # BEL (pin A1 input) (pin A2 input) (pin A3 input) (pin A4 input) (pin D output) (cfg <eqn>) (conn F D ==> XORF 0) (conn F D ==> CYSELF F) (conn F D ==> FXMUX F) (conn F D ==> F5MUX F) (conn F A1 <== F1 F1) (conn F A2 <== F2 F2) (conn F A3 <== F3 F3) (conn F A4 <== F4 F4) ) (element G 5 # BEL (pin A1 input) (pin A2 input) (pin A3 input) (pin A4 input) (pin D output) (cfg <eqn>) (conn G D ==> XORG 0) (conn G D ==> CYSELG G) (conn G D ==> F5MUX G) (conn G D ==> GYMUX G) (conn G A1 <== G1 G1) (conn G A2 <== G2 G2) (conn G A3 <== G3 G3) (conn G A4 <== G4 G4) ) ) (primitive_def SLICEM 32 100 (pin BX BX input) (pin BY BY input) (pin CE CE input) (pin CIN CIN input) (pin CLK CLK input) (pin SR SR input) (pin F1 F1 input) (pin F2 F2 input) (pin F3 F3 input) (pin F4 F4 input) (pin G1 G1 input) (pin G2 G2 input) (pin G3 G3 input) (pin G4 G4 input) (pin FXINA FXINA input) (pin FXINB FXINB input) (pin F5 F5 output) (pin FX FX output) (pin X X output) (pin XB XB output) (pin XQ XQ output) (pin Y Y output) (pin YB YB output) (pin YQ YQ output) (pin COUT COUT output) (pin SHIFTIN SHIFTIN input) (pin SHIFTOUT SHIFTOUT output) (pin ALTDIG ALTDIG input) (pin SLICEWE1 SLICEWE1 input) (pin BYOUT BYOUT output) (pin BYINVOUT BYINVOUT output) (pin DIG DIG output) (element F1 1 (pin F1 output) (conn F1 F1 ==> F A1) (conn F1 F1 ==> FAND 0) (conn F1 F1 ==> CY0F F1) ) (element F2 1 (pin F2 output) (conn F2 F2 ==> F A2) (conn F2 F2 ==> FAND 1) (conn F2 F2 ==> CY0F F2) ) (element F3 1 (pin F3 output) (conn F3 F3 ==> F A3) ) (element G1 1 (pin G1 output) (conn G1 G1 ==> CY0G G1) (conn G1 G1 ==> G A1) (conn G1 G1 ==> GAND 0) (conn G1 G1 ==> WF1USED 0) (conn G1 G1 ==> WG1USED 0) ) (element G2 1 (pin G2 output) (conn G2 G2 ==> CY0G G2) (conn G2 G2 ==> G A2) (conn G2 G2 ==> GAND 1) (conn G2 G2 ==> WF2USED 0) (conn G2 G2 ==> WG2USED 0) ) (element G3 1 (pin G3 output) (conn G3 G3 ==> G A3) (conn G3 G3 ==> WF3USED 0) (conn G3 G3 ==> WG3USED 0) ) (element X 1 (pin X input) (conn X X <== XUSED OUT) ) (element XQ 1 (pin XQ input) (conn XQ XQ <== FFX Q) ) (element Y 1 (pin Y input) (conn Y Y <== YUSED OUT) ) (element YB 1 (pin YB input) (conn YB YB <== YBUSED OUT) ) (element YQ 1 (pin YQ input) (conn YQ YQ <== FFY Q) ) (element BY 1 (pin BY output) (conn BY BY ==> BYINV BY_B) (conn BY BY ==> BYINV BY) ) (element COUT 1 (pin COUT input) (conn COUT COUT <== COUTUSED OUT) ) (element CIN 1 (pin CIN output) (conn CIN CIN ==> CYINIT CIN) ) (element CE 1 (pin CE output) (conn CE CE ==> CEINV CE_B) (conn CE CE ==> CEINV CE) ) (element BX 1 (pin BX output) (conn BX BX ==> BXINV BX_B) (conn BX BX ==> BXINV BX) ) (element XORF 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn XORF O ==> FXMUX FXOR) (conn XORF 0 <== F D) (conn XORF 1 <== CYINIT OUT) ) (element XORG 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn XORG O ==> GYMUX GXOR) (conn XORG 0 <== G D) (conn XORG 1 <== CYMUXF OUT) ) (element CYSELF 3 (pin F input) (pin 1 input) (pin OUT output) (cfg F 1) (conn CYSELF OUT ==> CYMUXF S0) (conn CYSELF F <== F D) (conn CYSELF 1 <== VDDF 1) ) (element CYSELG 3 (pin G input) (pin 1 input) (pin OUT output) (cfg G 1) (conn CYSELG OUT ==> CYMUXG S0) (conn CYSELG G <== G D) (conn CYSELG 1 <== VDDG 1) ) (element XB 1 (pin XB input) (conn XB XB <== XBMUX OUT) ) (element F4 1 (pin F4 output) (conn F4 F4 ==> F A4) ) (element G4 1 (pin G4 output) (conn G4 G4 ==> G A4) (conn G4 G4 ==> WF4USED 0) (conn G4 G4 ==> WG4USED 0) ) (element CLK 1 (pin CLK output) (conn CLK CLK ==> CLKINV CLK_B) (conn CLK CLK ==> CLKINV CLK) ) (element SR 1 (pin SR output) (conn SR SR ==> SRINV SR_B) (conn SR SR ==> SRINV SR) ) (element F6MUX 4 # BEL (pin 1 input) (pin 0 input) (pin OUT output) (pin S0 input) (conn F6MUX OUT ==> FXUSED 0) (conn F6MUX OUT ==> GYMUX FX) (conn F6MUX 1 <== FXINA FXINA) (conn F6MUX 0 <== FXINB FXINB) (conn F6MUX S0 <== BYINV OUT) ) (element F5 1 (pin F5 input) (conn F5 F5 <== F5USED OUT) ) (element VDDG 1 # BEL (pin 1 output) (conn VDDG 1 ==> CYSELG 1) ) (element VDDF 1 # BEL (pin 1 output) (conn VDDF 1 ==> CYSELF 1) ) (element GNDF 1 # BEL (pin 0 output) (conn GNDF 0 ==> CY0F 0) ) (element GNDG 1 # BEL (pin 0 output) (conn GNDG 0 ==> CY0G 0) ) (element COUTUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn COUTUSED OUT ==> COUT COUT) (conn COUTUSED 0 <== CYMUXG OUT) ) (element YUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn YUSED OUT ==> Y Y) (conn YUSED 0 <== GYMUX OUT) ) (element XUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn XUSED OUT ==> X X) (conn XUSED 0 <== FXMUX OUT) ) (element F5USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn F5USED OUT ==> F5 F5) (conn F5USED 0 <== F5MUX OUT) ) (element YBMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn YBMUX OUT ==> YBUSED 0) (conn YBMUX 0 <== GMC15_BLACKBOX MC15) (conn YBMUX 1 <== CYMUXG OUT) ) (element CYINIT 3 (pin CIN input) (pin BX input) (pin OUT output) (cfg CIN BX) (conn CYINIT OUT ==> XORF 1) (conn CYINIT OUT ==> CYMUXF 1) (conn CYINIT CIN <== CIN CIN) (conn CYINIT BX <== BXINV OUT) ) (element DYMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn DYMUX OUT ==> FFY D) (conn DYMUX 0 <== BYINV OUT) (conn DYMUX 1 <== GYMUX OUT) ) (element DXMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn DXMUX OUT ==> FFX D) (conn DXMUX 0 <== BXINV OUT) (conn DXMUX 1 <== FXMUX OUT) ) (element F 11 # BEL (pin A1 input) (pin A2 input) (pin A3 input) (pin A4 input) (pin WS input) (pin DI input) (pin WF1 input) (pin WF2 input) (pin WF3 input) (pin WF4 input) (pin D output) (cfg #RAM:<eqn> #ROM:<eqn> #LUT:<eqn>) (conn F D ==> XORF 0) (conn F D ==> CYSELF F) (conn F D ==> FXMUX F) (conn F D ==> F5MUX F) (conn F A1 <== F1 F1) (conn F A2 <== F2 F2) (conn F A3 <== F3 F3) (conn F A4 <== F4 F4) (conn F WS <== WSGEN WSF) (conn F DI <== DIF_MUX OUT) (conn F WF1 <== WF1USED OUT) (conn F WF2 <== WF2USED OUT) (conn F WF3 <== WF3USED OUT) (conn F WF4 <== WF4USED OUT) ) (element FAND 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn FAND O ==> CY0F PROD) (conn FAND 0 <== F1 F1) (conn FAND 1 <== F2 F2) ) (element C1VDD 1 # BEL (pin 1 output) (conn C1VDD 1 ==> CY0F 1) ) (element C2VDD 1 # BEL (pin 1 output) (conn C2VDD 1 ==> CY0G 1) ) (element REVUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn REVUSED OUT ==> FFX REV) (conn REVUSED OUT ==> FFY REV) (conn REVUSED 0 <== BYINV OUT) ) (element FXMUX 4 (pin F5 input) (pin F input) (pin FXOR input) (pin OUT output) (cfg F5 F FXOR) (conn FXMUX OUT ==> XUSED 0) (conn FXMUX OUT ==> DXMUX 1) (conn FXMUX F5 <== F5MUX OUT) (conn FXMUX F <== F D) (conn FXMUX FXOR <== XORF O) ) (element SYNC_ATTR 0 (cfg SYNC ASYNC) ) (element SRFFMUX 2 (pin 0 input) (pin OUT output) (cfg 0) (conn SRFFMUX OUT ==> FFX SR) (conn SRFFMUX OUT ==> FFY SR) (conn SRFFMUX 0 <== SRINV OUT) ) (element FFY_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element FFX 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn FFX Q ==> XQ XQ) (conn FFX CK <== CLKINV OUT) (conn FFX CE <== CEINV OUT) (conn FFX D <== DXMUX OUT) (conn FFX SR <== SRFFMUX OUT) (conn FFX REV <== REVUSED OUT) ) (element FFY 6 # BEL (pin CK input) (pin CE input) (pin D input) (pin Q output) (pin SR input) (pin REV input) (cfg #FF #LATCH) (conn FFY Q ==> YQ YQ) (conn FFY CK <== CLKINV OUT) (conn FFY CE <== CEINV OUT) (conn FFY D <== DYMUX OUT) (conn FFY SR <== SRFFMUX OUT) (conn FFY REV <== REVUSED OUT) ) (element FFX_SR_ATTR 0 (cfg SRHIGH SRLOW) ) (element G_ATTR 0 (cfg DUAL_PORT SHIFT_REG) ) (element DIG_MUX 4 (pin BY input) (pin ALTDIG input) (pin SHIFTIN input) (pin OUT output) (cfg BY ALTDIG SHIFTIN) (conn DIG_MUX OUT ==> DIF_MUX ALTDIF) (conn DIG_MUX OUT ==> DIGUSED 0) (conn DIG_MUX OUT ==> G DI) (conn DIG_MUX BY <== BYINV OUT) (conn DIG_MUX ALTDIG <== ALTDIG ALTDIG) (conn DIG_MUX SHIFTIN <== SHIFTIN SHIFTIN) ) (element SHIFTIN 1 (pin SHIFTIN output) (conn SHIFTIN SHIFTIN ==> DIG_MUX SHIFTIN) ) (element ALTDIG 1 (pin ALTDIG output) (conn ALTDIG ALTDIG ==> DIG_MUX ALTDIG) ) (element CY0G 7 (pin 0 input) (pin 1 input) (pin G1 input) (pin PROD input) (pin G2 input) (pin BY input) (pin OUT output) (cfg 0 1 G1 PROD G2 BY) (conn CY0G OUT ==> CYMUXG 0) (conn CY0G 0 <== GNDG 0) (conn CY0G 1 <== C2VDD 1) (conn CY0G G1 <== G1 G1) (conn CY0G PROD <== GAND O) (conn CY0G G2 <== G2 G2) (conn CY0G BY <== BYINV OUT) ) (element FXINA 1 (pin FXINA output) (conn FXINA FXINA ==> F6MUX 1) ) (element FXINB 1 (pin FXINB output) (conn FXINB FXINB ==> F6MUX 0) ) (element FXUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn FXUSED OUT ==> FX FX) (conn FXUSED 0 <== F6MUX OUT) ) (element FX 1 (pin FX input) (conn FX FX <== FXUSED OUT) ) (element DIF_MUX 4 (pin BX input) (pin ALTDIF input) (pin SHIFTIN input) (pin OUT output) (cfg BX ALTDIF SHIFTIN) (conn DIF_MUX OUT ==> F DI) (conn DIF_MUX BX <== BXINV OUT) (conn DIF_MUX ALTDIF <== DIG_MUX OUT) (conn DIF_MUX SHIFTIN <== GMC15_BLACKBOX MC15) ) (element F_ATTR 0 (cfg DUAL_PORT SHIFT_REG) ) (element CY0F 7 (pin 0 input) (pin 1 input) (pin F1 input) (pin PROD input) (pin F2 input) (pin BX input) (pin OUT output) (cfg 0 1 F1 PROD F2 BX) (conn CY0F OUT ==> CYMUXF 0) (conn CY0F 0 <== GNDF 0) (conn CY0F 1 <== C1VDD 1) (conn CY0F F1 <== F1 F1) (conn CY0F PROD <== FAND O) (conn CY0F F2 <== F2 F2) (conn CY0F BX <== BXINV OUT) ) (element DIGUSED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn DIGUSED OUT ==> DIG DIG) (conn DIGUSED 0 <== DIG_MUX OUT) ) (element DIG 1 (pin DIG input) (conn DIG DIG <== DIGUSED OUT) ) (element SHIFTOUTUSED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn SHIFTOUTUSED OUT ==> SHIFTOUT SHIFTOUT) (conn SHIFTOUTUSED 0 <== FMC15_BLACKBOX MC15) ) (element SHIFTOUT 1 (pin SHIFTOUT input) (conn SHIFTOUT SHIFTOUT <== SHIFTOUTUSED OUT) ) (element BYOUTUSED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn BYOUTUSED OUT ==> BYOUT BYOUT) (conn BYOUTUSED 0 <== BYINV OUT) ) (element BYOUT 1 (pin BYOUT input) (conn BYOUT BYOUT <== BYOUTUSED OUT) ) (element BYINVOUT 1 (pin BYINVOUT input) (conn BYINVOUT BYINVOUT <== BYINVOUTUSED OUT) ) (element F5MUX 4 # BEL (pin F input) (pin G input) (pin OUT output) (pin S0 input) (conn F5MUX OUT ==> F5USED 0) (conn F5MUX OUT ==> FXMUX F5) (conn F5MUX F <== F D) (conn F5MUX G <== G D) (conn F5MUX S0 <== BXINV OUT) ) (element FFX_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element FFY_INIT_ATTR 0 (cfg INIT1 INIT0) ) (element G 11 # BEL (pin A1 input) (pin A2 input) (pin A3 input) (pin A4 input) (pin WS input) (pin DI input) (pin WG1 input) (pin WG2 input) (pin WG3 input) (pin WG4 input) (pin D output) (cfg #RAM:<eqn> #ROM:<eqn> #LUT:<eqn>) (conn G D ==> XORG 0) (conn G D ==> CYSELG G) (conn G D ==> F5MUX G) (conn G D ==> GYMUX G) (conn G A1 <== G1 G1) (conn G A2 <== G2 G2) (conn G A3 <== G3 G3) (conn G A4 <== G4 G4) (conn G WS <== WSGEN WSG) (conn G DI <== DIG_MUX OUT) (conn G WG1 <== WG1USED OUT) (conn G WG2 <== WG2USED OUT) (conn G WG3 <== WG3USED OUT) (conn G WG4 <== WG4USED OUT) ) (element XBMUX 3 (pin 0 input) (pin 1 input) (pin OUT output) (cfg 0 1) (conn XBMUX OUT ==> XB XB) (conn XBMUX 0 <== FMC15_BLACKBOX MC15) (conn XBMUX 1 <== CYMUXF OUT) ) (element GAND 3 # BEL (pin 0 input) (pin 1 input) (pin O output) (conn GAND O ==> CY0G PROD) (conn GAND 0 <== G1 G1) (conn GAND 1 <== G2 G2) ) (element SLICEWE1 1 (pin SLICEWE1 output) (conn SLICEWE1 SLICEWE1 ==> SLICEWE1USED 0) ) (element BYINVOUTUSED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn BYINVOUTUSED OUT ==> BYINVOUT BYINVOUT) (conn BYINVOUTUSED 0 <== BYINV OUT) ) (element SLICEWE1USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn SLICEWE1USED OUT ==> WSGEN WE1) (conn SLICEWE1USED 0 <== SLICEWE1 SLICEWE1) ) (element GMC15_BLACKBOX 2 # BEL (pin MC15 output) (pin WS2 input) (conn GMC15_BLACKBOX MC15 ==> YBMUX 0) (conn GMC15_BLACKBOX MC15 ==> DIF_MUX SHIFTIN) (conn GMC15_BLACKBOX WS2 <== WSGEN WSG) ) (element FMC15_BLACKBOX 2 # BEL (pin MC15 output) (pin WS2 input) (conn FMC15_BLACKBOX MC15 ==> SHIFTOUTUSED 0) (conn FMC15_BLACKBOX MC15 ==> XBMUX 0) (conn FMC15_BLACKBOX WS2 <== WSGEN WSF) ) (element CYMUXF 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn CYMUXF OUT ==> XORG 1) (conn CYMUXF OUT ==> XBMUX 1) (conn CYMUXF OUT ==> CYMUXG 1) (conn CYMUXF 0 <== CY0F OUT) (conn CYMUXF 1 <== CYINIT OUT) (conn CYMUXF S0 <== CYSELF OUT) ) (element CYMUXG 4 # BEL (pin 0 input) (pin 1 input) (pin OUT output) (pin S0 input) (conn CYMUXG OUT ==> COUTUSED 0) (conn CYMUXG OUT ==> YBMUX 1) (conn CYMUXG 0 <== CY0G OUT) (conn CYMUXG 1 <== CYMUXF OUT) (conn CYMUXG S0 <== CYSELG OUT) ) (element WF1USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn WF1USED OUT ==> F WF1) (conn WF1USED 0 <== G1 G1) ) (element WF2USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn WF2USED OUT ==> F WF2) (conn WF2USED 0 <== G2 G2) ) (element WF3USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn WF3USED OUT ==> F WF3) (conn WF3USED 0 <== G3 G3) ) (element WF4USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn WF4USED OUT ==> F WF4) (conn WF4USED 0 <== G4 G4) ) (element WG1USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn WG1USED OUT ==> G WG1) (conn WG1USED 0 <== G1 G1) ) (element WG2USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn WG2USED OUT ==> G WG2) (conn WG2USED 0 <== G2 G2) ) (element WG3USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn WG3USED OUT ==> G WG3) (conn WG3USED 0 <== G3 G3) ) (element WG4USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn WG4USED OUT ==> G WG4) (conn WG4USED 0 <== G4 G4) ) (element YBUSED 2 # BEL (pin 0 input) (pin OUT output) (cfg 0) (conn YBUSED OUT ==> YB YB) (conn YBUSED 0 <== YBMUX OUT) ) (element BYINV 3 (pin BY_B input) (pin BY input) (pin OUT output) (cfg BY_B BY) (conn BYINV OUT ==> F6MUX S0) (conn BYINV OUT ==> DYMUX 0) (conn BYINV OUT ==> REVUSED 0) (conn BYINV OUT ==> DIG_MUX BY) (conn BYINV OUT ==> CY0G BY) (conn BYINV OUT ==> BYOUTUSED 0) (conn BYINV OUT ==> BYINVOUTUSED 0) (conn BYINV BY_B <== BY BY) (conn BYINV BY <== BY BY) ) (element BXINV 3 (pin BX_B input) (pin BX input) (pin OUT output) (cfg BX_B BX) (conn BXINV OUT ==> CYINIT BX) (conn BXINV OUT ==> DXMUX 0) (conn BXINV OUT ==> DIF_MUX BX) (conn BXINV OUT ==> CY0F BX) (conn BXINV OUT ==> F5MUX S0) (conn BXINV OUT ==> SLICEWE0USED 0) (conn BXINV BX_B <== BX BX) (conn BXINV BX <== BX BX) ) (element CEINV 3 (pin CE_B input) (pin CE input) (pin OUT output) (cfg CE_B CE) (conn CEINV OUT ==> FFX CE) (conn CEINV OUT ==> FFY CE) (conn CEINV CE_B <== CE CE) (conn CEINV CE <== CE CE) ) (element CLKINV 3 (pin CLK_B input) (pin CLK input) (pin OUT output) (cfg CLK_B CLK) (conn CLKINV OUT ==> FFX CK) (conn CLKINV OUT ==> FFY CK) (conn CLKINV OUT ==> WSGEN CK) (conn CLKINV CLK_B <== CLK CLK) (conn CLKINV CLK <== CLK CLK) ) (element SRINV 3 (pin SR_B input) (pin SR input) (pin OUT output) (cfg SR_B SR) (conn SRINV OUT ==> SRFFMUX 0) (conn SRINV OUT ==> WSGEN WE) (conn SRINV SR_B <== SR SR) (conn SRINV SR <== SR SR) ) (element GYMUX 4 (pin G input) (pin GXOR input) (pin FX input) (pin OUT output) (cfg G GXOR FX) (conn GYMUX OUT ==> YUSED 0) (conn GYMUX OUT ==> DYMUX 1) (conn GYMUX G <== G D) (conn GYMUX GXOR <== XORG O) (conn GYMUX FX <== F6MUX OUT) ) (element WSGEN 6 # BEL (pin WE1 input) (pin WE0 input) (pin WE input) (pin CK input) (pin WSF output) (pin WSG output) (conn WSGEN WSF ==> F WS) (conn WSGEN WSF ==> FMC15_BLACKBOX WS2) (conn WSGEN WSG ==> G WS) (conn WSGEN WSG ==> GMC15_BLACKBOX WS2) (conn WSGEN WE1 <== SLICEWE1USED OUT) (conn WSGEN WE0 <== SLICEWE0USED OUT) (conn WSGEN WE <== SRINV OUT) (conn WSGEN CK <== CLKINV OUT) ) (element SLICEWE0USED 2 (pin 0 input) (pin OUT output) (cfg 0) (conn SLICEWE0USED OUT ==> WSGEN WE0) (conn SLICEWE0USED 0 <== BXINV OUT) ) ) (primitive_def STARTUP 3 7 (pin CLK CLK input) (pin GSR GSR input) (pin GTS GTS input) (element STARTUP 3 # BEL (pin GSR input) (pin GTS input) (pin CLK input) (conn STARTUP GSR <== GSRINV OUT) (conn STARTUP GTS <== GTSINV OUT) (conn STARTUP CLK <== CLKINV OUT) ) (element CLK 1 (pin CLK output) (conn CLK CLK ==> CLKINV CLK_B) (conn CLK CLK ==> CLKINV CLK) ) (element GTS 1 (pin GTS output) (conn GTS GTS ==> GTSINV GTS_B) (conn GTS GTS ==> GTSINV GTS) ) (element GSR 1 (pin GSR output) (conn GSR GSR ==> GSRINV GSR_B) (conn GSR GSR ==> GSRINV GSR) ) (element CLKINV 3 (pin CLK_B input) (pin CLK input) (pin OUT output) (cfg CLK_B CLK) (conn CLKINV OUT ==> STARTUP CLK) (conn CLKINV CLK_B <== CLK CLK) (conn CLKINV CLK <== CLK CLK) ) (element GTSINV 3 (pin GTS_B input) (pin GTS input) (pin OUT output) (cfg GTS_B GTS) (conn GTSINV OUT ==> STARTUP GTS) (conn GTSINV GTS_B <== GTS GTS) (conn GTSINV GTS <== GTS GTS) ) (element GSRINV 3 (pin GSR_B input) (pin GSR input) (pin OUT output) (cfg GSR_B GSR) (conn GSRINV OUT ==> STARTUP GSR) (conn GSRINV GSR_B <== GSR GSR) (conn GSRINV GSR <== GSR GSR) ) ) (primitive_def VCC 1 2 (pin VCCOUT VCCOUT output) (element POWER 1 # BEL (pin 1 output) (conn POWER 1 ==> VCCOUT VCCOUT) ) (element VCCOUT 1 (pin VCCOUT input) (conn VCCOUT VCCOUT <== POWER 1) ) ) ) # ************************************************************************** # * * # * Summary * # * * # ************************************************************************** (summary tiles=961 sites=3581 sitedefs=20) )
361,866
Common Lisp
.l
11,997
26.982746
425
0.713307
stacksmith/cl-fpgasm-device
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
ab43e80b9844b48341a4892ee1d74af341fe7e95995642c1328e5c2f822e3c1e
27,213
[ -1 ]
27,214
xdlrc-tweak.sed
stacksmith_cl-fpgasm-device/data/xdlrc-tweak.sed
# tweak an xdlrc file to allow Lisp reader to load it # s/# /; /g #fix comments s/#/_/g #replace # prefix with _ s|\(_[A-Za-z]\+\):<eqn>|(\1\ eqn>)|g #convert cfg assignments to pair lists
219
Common Lisp
.l
5
43
78
0.548837
stacksmith/cl-fpgasm-device
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
5475d5a7e037295fb73a0c8b6f89182ca464df62ab6bc4a59edf067a5cef2c7d
27,214
[ -1 ]
27,215
xdlrc format.txt
stacksmith_cl-fpgasm-device/doc/xdlrc format.txt
XDLRC tags: XDLRC is a Xilinx format for describing FPGA resources for a particular chip. An .xdlrc file is produced by running the xdl -report, and will generate descriptions of with various levels of detail depending on flags -pips and -all-conns. The most basic report profides the following hierarchy, in a s-expr format: (xdl_resource_report <version> <chip> <technology> (tiles <w> <h> (tile ;there are W x H of these <x> <y> ;x-y coordinate of tile <tile-name> ;unique tile name <tile-type> ;may be useful? <prim-site-cnt> ;count of primitive_site forms (primitive_site ;0+ of these <prim-site-name> ;Unique name of primitive site <prim-def-name> ;Name of primitive-def (below) <bond> ;internal, unbonded or bonded <pincnt> ;count of pins at site ))) (primitive_def <prim-def-name> ;matches name at sites <pin-cnt> ;number of pin forms <element-cnt> ;number of element forms (pin ;0+ see <pin-cnt> <n1> <2> ;two identical names *** <dir> ;input|output ) (element ;0+ see <el-cnt> <element-name> ;unique element name <el-pin-cnt> ;element's pin count (pin ;0+ see el-pin-cnt <el-pin-name> ;el-pin name <dir> ;input|output ) (conn ;0+ cnt not known, must parse <conn-el1> ;enclosing element name <conn-pin1> ;element's pin <arrows> ;==> or <== <conn-el2> ;other element name <conn-pin2> ;and its pin ) (cfg ;0 or 1 <list> ;config list )))) (summary tiles=<tile-cnt> sites=<site-cnt> ;as there are multiple sites per tile sitedefs=<sited-def-cnt> )) *** Primitive_def pin forms have two names fields which seem to be identical. Perhaps this is to differentiatie primitive_def pins (with 3 parameters) from element pins, which have a single name (and thus 2 parameters).
2,259
Common Lisp
.l
47
40.914894
238
0.550725
stacksmith/cl-fpgasm-device
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
8f938d7d7f73ee705e2276d6f4c90eee97cff292bf66d19f190ec2d5476e601a
27,215
[ -1 ]
27,230
main.lisp
Release-Candidate_Lisbonacci/src/main.lisp
;;; SPDX-License-Identifier: GPL-3.0-or-later ;;; Copyright (C) 2021 Roland Csaszar ;;; ;;; Project: Lisbonacci ;;; File: main.lisp ;;; Date: 13.11.2021 ;;; =========================================================================== (defpackage lisbonacci (:use :cl)) (in-package :lisbonacci) (declaim (optimize (speed 0) (space 0) (debug 3))) ;;============================================================================== ;; ** main-loop (defun main-loop () "The program's main loop. Ask for a number and calculate the golden ratio to that number." (loop (let ((number (user-input-int "Golden ratio calculator. Calculates the golden ratio to the given number. Input number"))) (format *query-io* "Golden ratio ~a : ~a ~%" number (golden-ratio number)) (if (yes-or-no-p "Exit program?") (return))))) ;; ** golden-ratio (defun golden-ratio (number) "Calculate the golden ratio to the given number `number`. Return the number which forms a golden ratio with the given number `number`." (* number (/ (fibonacci 32) (fibonacci 31)))) ;; ** fibonacci (defun fibonacci (n) "Calculate the `n`th fibonacci number. Return the `n`th fibonacci number" (if (eql n 0) 0 (if (eql n 1) 1 (+ (fibonacci (- n 1)) (fibonacci (- n 2)))))) ;; ** user-input-int (defun user-input-int (prompt) "Prompt the user for input using `prompt` as string to display. Return the user input converted to an integer or 0 if the conversion failed." (or (parse-integer (user-input prompt) :junk-allowed t) 0)) ;; ** user-input (defun user-input (prompt) "Prompt the user for input using `prompt` as string to display. Return the user input." (format *query-io* "~a: " prompt) (force-output *query-io*) (read-line *query-io*))
1,793
Common Lisp
.lisp
49
33.653061
107
0.613126
Release-Candidate/Lisbonacci
1
1
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
5d160faf6a8802a0b75f3ba1b7db7b167aae78fcbc450f14c9e83ba76425ef63
27,230
[ -1 ]
27,231
main.lisp
Release-Candidate_Lisbonacci/tests/main.lisp
(defpackage lisbonacci/tests/main (:use :cl :asdf :rove)) (in-package :lisbonacci/tests/main) ;; NOTE: To run this test file, execute `(asdf:test-system :asdf)' in your Lisp. (deftest test-target-1 (testing "should (= 1 1) to be true" (ok (= 1 1))))
271
Common Lisp
.lisp
9
26.777778
80
0.657692
Release-Candidate/Lisbonacci
1
1
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
ba54d3db772c35e2af1ad50ec52a7e9a270693e62a6f45d620e8e38195aab4fd
27,231
[ -1 ]
27,232
lisbonacci.asd
Release-Candidate_Lisbonacci/lisbonacci.asd
(defsystem "lisbonacci" :version "0.1.0" :author "Release-Candidate" :license "GPLv3" :depends-on () :components ((:module "src" :components ((:file "main")))) :description "" :in-order-to ((test-op (test-op "lisbonacci/tests")))) (defsystem "lisbonacci/tests" :author "Release-Candidate" :license "GPLv3" :depends-on ("" "rove") :components ((:module "tests" :components ((:file "main")))) :description "Test system for Lisbonacci" :perform (test-op (op c) (symbol-call :rove :run c)))
593
Common Lisp
.asd
20
23.35
56
0.583916
Release-Candidate/Lisbonacci
1
1
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
fc8e2661c993ac6e42426d76e879d75a56ab9ef21c7bb8da861504f905e131c7
27,232
[ -1 ]
27,234
.markdownlintrc
Release-Candidate_Lisbonacci/.markdownlintrc
{ // Example markdownlint JSON(C) configuration with all properties set to their default value // Default state for all rules "default": true, // Path to configuration file to extend "extends": null, // MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time "MD001": true, // MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading "MD002":{ // Heading level "level": 1 }, // MD003/heading-style/header-style - Heading style "MD003": { // Heading style "style": "atx" }, // MD004/ul-style - Unordered list style "MD004": { // List style "style": "consistent" }, // MD005/list-indent - Inconsistent indentation for list items at the same level "MD005": true, // MD006/ul-start-left - Consider starting bulleted lists at the beginning of the line "MD006": true, // MD007/ul-indent - Unordered list indentation "MD007": { // Spaces for indent "indent": 2, // Whether to indent the first level of the list "start_indented": false }, // MD009/no-trailing-spaces - Trailing spaces "MD009": { // Spaces for line break "br_spaces": 2, // Allow spaces for empty lines in list items "list_item_empty_lines": false, // Include unnecessary breaks "strict": false }, // MD010/no-hard-tabs - Hard tabs "MD010": { // Include code blocks "code_blocks": true, // Number of spaces for each hard tab "spaces_per_tab": 1 }, // MD011/no-reversed-links - Reversed link syntax "MD011": true, // MD012/no-multiple-blanks - Multiple consecutive blank lines "MD012": { // Consecutive blank lines "maximum": 1 }, // MD013/line-length - Line length "MD013": { // Number of characters "line_length": 120, // Number of characters for headings "heading_line_length": 80, // Number of characters for code blocks "code_block_line_length": 120, // Include code blocks "code_blocks": true, // Include tables "tables": true, // Include headings "headings": true, // Include headings "headers": true, // Strict length checking "strict": false, // Stern length checking "stern": false }, // MD014/commands-show-output - Dollar signs used before commands without showing output "MD014": true, // MD018/no-missing-space-atx - No space after hash on atx style heading "MD018": true, // MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading "MD019": true, // MD020/no-missing-space-closed-atx - No space inside hashes on closed atx style heading "MD020": true, // MD021/no-multiple-space-closed-atx - Multiple spaces inside hashes on closed atx style heading "MD021": true, // MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines "MD022": { // Blank lines above heading "lines_above": 1, // Blank lines below heading "lines_below": 1 }, // MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line "MD023": true, // MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content "MD024": { // Only check sibling headings "allow_different_nesting": true, // Only check sibling headings "siblings_only": true }, // MD025/single-title/single-h1 - Multiple top-level headings in the same document "MD025": { // Heading level "level": 1, // RegExp for matching title in front matter "front_matter_title": "^\\s*title\\s*[:=]" }, // MD026/no-trailing-punctuation - Trailing punctuation in heading "MD026": { // Punctuation characters "punctuation": ".,;:!。,;:!" }, // MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol "MD027": true, // MD028/no-blanks-blockquote - Blank line inside blockquote "MD028": true, // MD029/ol-prefix - Ordered list item prefix "MD029": { // List style "style": "one_or_ordered" }, // MD030/list-marker-space - Spaces after list markers "MD030": { // Spaces for single-line unordered list items "ul_single": 1, // Spaces for single-line ordered list items "ol_single": 1, // Spaces for multi-line unordered list items "ul_multi": 1, // Spaces for multi-line ordered list items "ol_multi": 1 }, // MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines "MD031": { // Include list items "list_items": true }, // MD032/blanks-around-lists - Lists should be surrounded by blank lines "MD032": true, // MD033/no-inline-html - Inline HTML "MD033": { // Allowed elements "allowed_elements": [] }, // MD034/no-bare-urls - Bare URL used "MD034": true, // MD035/hr-style - Horizontal rule style "MD035": { // Horizontal rule style "style": "consistent" }, // MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading "MD036": { // Punctuation characters "punctuation": ".,;:!?。,;:!?" }, // MD037/no-space-in-emphasis - Spaces inside emphasis markers "MD037": true, // MD038/no-space-in-code - Spaces inside code span elements "MD038": true, // MD039/no-space-in-links - Spaces inside link text "MD039": true, // MD040/fenced-code-language - Fenced code blocks should have a language specified "MD040": true, // MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading "MD041": { // Heading level "level": 1, // RegExp for matching title in front matter "front_matter_title": "^\\s*title\\s*[:=]" }, // MD042/no-empty-links - No empty links "MD042": true, // MD043/required-headings/required-headers - Required heading structure "MD043": false, // { // // List of headings // "headings": [], // // List of headings // "headers": [] // }, // MD044/proper-names - Proper names should have the correct capitalization "MD044": { // List of proper names "names": [], // Include code blocks "code_blocks": true }, // MD045/no-alt-text - Images should have alternate text (alt text) "MD045": true, // MD046/code-block-style - Code block style "MD046": { // Block style "style": "fenced" }, // MD047/single-trailing-newline - Files should end with a single newline character "MD047": true, // MD048/code-fence-style - Code fence style "MD048": { // Code fence style "style": "backtick" } }
6,637
Common Lisp
.l
207
27.927536
107
0.669286
Release-Candidate/Lisbonacci
1
1
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
9cde7a1133bee834dfd8764826b1bd25cf980a5fc743a0887edbf37368b63db2
27,234
[ -1 ]
27,251
xterm.lisp
vlad-km_xterm/xterm.lisp
;;; -*- mode:lisp; coding:utf-8 -*- ;;; ;;; tiny api for https://github.com/xtermjs/xterm.js ;;; ;;; @vlad-km, 2021 ;;; ;;; (defpackage #:xterm (:use #:cl)) (in-package :xterm) (defmacro defn- (name lambda &body body) `(progn (eval-when (:compile-toplevel) (jscl::fn-info ',name :defined t)) (jscl::fset ',name #'(jscl::named-lambda ,name ,lambda ,@body)) (export '(#::,name)) ',name)) (defun str.to-lowercase (s) (let ((js (jscl::lisp-to-js s))) (funcall ((jscl::oget js "toLowerCase" "bind") js)))) (defn- {new} (&rest kv) (let* ((obj (jscl::new)) (idx 0) (key-val)) (if (oddp (length kv)) (error "{new}: Too few arguments")) (dolist (it kv) (cond ((oddp idx) (setf (jscl::oget obj key-val) it)) (t (typecase it (keyword (setq key-val (str.to-lowercase (symbol-name it)))) (symbol (setq key-val (symbol-name it))) (t (setq key-val it))))) (incf idx)) obj)) (defmacro fork (time &rest forms) `(#j:setTimeout (lambda () ,@forms) ,time)) (defvar +ESC+ (code-char #x1b)) (defvar +CSI+ (code-char #x9b)) (export '(xterm::+esc+ xterm::+csi+)) (defmacro make-esc-seq (code) `(jscl::concat +ESC+ ,code)) (export '(xterm::make-esc-seq)) (defun ansi-rgb (r g b) (jscl::concat +ESC+ "[38;2;" r ";" g ";" b)) (defvar +bg-black+ (make-esc-seq "[40m")) (defvar +bg-red+ (make-esc-seq "[41m")) (defvar +bg-green+ (make-esc-seq "[42m")) (defvar +bg-yellow+ (make-esc-seq "[43m")) (defvar +bg-blue+ (make-esc-seq "[44m")) (defvar +bg-grey+ (make-esc-seq "[100m")) #+nil (jscl::load-js "node_modules/xterm/lib/xterm.js") #+nil (jscl::load-css "node_modules/xterm/css/xterm.css") #+nil (jscl::load-js "node_modules/xterm-addon-fit/out/FitAddon-fit.js") ;;; vieport vars ;;; This ranges between 0 (left side) and Terminal.cols (after last cell of the row) (defn- buffer.cursor.x nil #j:term:buffer:active:cursorX) ;;; This ranges between 0 (left side) and Terminal.cols (after last cell of the row) (defn- buffer.cursor-y nil #j:term:buffer:active:cursorY) ;;; The line within the buffer where the top of the bottom page is (when fully scrolled down (defn- term.buffer.base-y nil #j:term:buffer:active:baseY) ;;; The line within the buffer where the top of the viewport is. (defn- term.buffer.viewport-y nil #j:term:buffer:active:viewportY) ;;; The amount of lines in the buffer. ;;; Wrong values possible. In some cases lies (defn- term.buffer.length nil #j:term:buffer:active:length) ;;; The number of rows in the terminal’s viewport. ;;; Use ITerminalOptions.rows to set this in the constructor ;;; and Terminal.resize for when the terminal exists. (defn- term.rows () #j:term:rows) ;;; The number of columns in the terminal’s viewport. ;;; Use ITerminalOptions.cols to set this in the constructor ;;; and Terminal.resize for when the terminal exists. (defn- term.cols #j:term:cols) ;;; internal xterm:active:buffer vars (defn- buffer.scroll.top nil #j:term:buffer:active:_buffer:scrollTop) (defn- buffer.scroll.buttom nil #j:term:buffer:active:_buffer:scrollBottom) (defn- buffer.x nil #j:term:buffer:active:_buffer:x) (defn- buffer.y nil #j:term:buffer:active:_buffer:y) (defn- buffer.ybase nil #j:term:buffer:active:_buffer:ybase) (defn- buffer.ydisp nil #j:term:buffer:active:_buffer:ydisp) ;;; started terminal options (defvar *theme* ({new} "background" "black" "foreground" "green" "cursor" "yellow")) (defvar *options* ({new} :rows 20 :cols 132 :theme *theme* "fontSize" 13 "rightClickSelectsWord" t "rendererType" "canvas" "fontFamily" "consolas")) ;;; create terminal instance (defn- make-terminal (options) (setf #j:term (jscl::make-new #j:Terminal options))) ;;; open it (defn- term.open (element) (#j:term:open (#j:document:getElementById element))) (defn- term.dispose nil (#j:term:dispose)) ;;; xterm.js api (defn- on.dispose (d) (funcall (jscl::oget d "dispose"))) (defn- on.key (drv) (#j:term:onKey drv)) (defn- on.data (drv) (#j:term:onData drv)) (defn- term.write (seq) (#j:term:write seq)) (defn- term.writeln (seq) (#j:term:writeln seq)) (defn- term.dispose nil (#j:term:dispose)) (defn- term.blur nil (#j:term:blur)) ;;; note: `clear` dirty source code. use `reset` (defn- term.clear nil (#j:term:clear)) (defn- term.reset nil (#j:term:reset)) (defn- term.focus nil (#j:term:focus)) (defn- term.getOption (k) (#j:term:getOption k)) (defn- term.resize (c r) (#j:term:resize c r)) ;;; scrolling (defn- scroll.lines (n) (#j:term:scrollLines n )) (defn- scroll.up () (#j:term:scrollLines -1 )) (defn- scroll.down () (#j:term:scrollLines 1)) (defn- scroll.top () (#j:term:scrollToTop)) (defn- scroll.bottom () (#j:term:scrollToBottom)) (defn- scrollPages (c) (#j:term:scrollPages c)) (defn- scrollPage.up nil (#j:term:scrollPages -1)) (defn- scrollPage.down nil (#j:term:scrollPages 1)) (defn- scrollToLine (n) (#j:term:scrollToLine n)) (defn- setOption (k v) (#j:term:setOption k v)) ;;; selection (defn- select.lines (start end) (#j:term:selectLines start end)) (defn- select (col row length) (#j:term:select col row length)) (defn- clearSelection nil (#j:term:clearSelection)) (defn- hasSelection nil (#j:term:hasSelection)) (defn- getSelectionPosition nil (when (hasSelection) (let ((r (#j:term:getSelectionPosition))) (values (jscl::oget r "startRow") (jscl::oget r "startColumn") (jscl::oget r "endRow") (jscl::oget r "endColumn")) ))) ;;; trim boolean Whether to trim any whitespace at the right of the line. ;;; start number The column to start from (inclusive). ;;; end number The column to end at (exclusive). (defn- get-buffer-line (num &optional (trim t) start end) (#j:term:buffer:active:_buffer:translateBufferLineToString num trim start end)) ;;; (defn- get-wrapped-region (line) (let ((result (#j:term:buffer:active:_buffer:getWrappedRangeForLine line))) (values (jscl::oget result "first") (jscl::oget result "last")))) ;;; SM IRM (defn- insert.mode.on nil (term.write (jscl::concat +CSI+ 4 "h"))) ;;; RM IRM (defn- replace.mode.on nil (term.write (jscl::concat +CSI+ 4 "l"))) (defn- delete.columns (&optional (col 1)) (term.write (jscl::concat +CSI+ col "'~"))) ;;; bad effect ;;; term.buffer._core._coreService.decPrivateModes.origin ;;; #j:term:buffer:_core:_coreService:decPrivateModes:origin (defn- set-origin-mode () (term.write (jscl::concat +CSI+ "?" 6 "h"))) ;;; CSI Ps ; Ps r ;;; Set Scrolling Region [top;bottom] (default = full size of ;;; window) (DECSTBM), VT100. (defn- set-scroll-region (top bottom) (term.write (jscl::concat +CSI+ top ";" bottom "r"))) ;;; CUP (defn- cursor.position (&optional (row 0) (col 0)) (term.write (jscl::concat +CSI+ row ";" col "H"))) ;;; CUF (defn- cursor.forward (&optional (row 1)) (term.write (jscl::concat +CSI+ row "C"))) ;;; CUB (defn- cursor.backward (&optional (row 1)) (term.write (jscl::concat +CSI+ row "D"))) ;;; CUU (defn- cursor.up (&optional (col 1)) (term.write (jscl::concat +CSI+ col "A"))) ;;; CPL (defn- cursor.up.first (&optional (col 1)) (term.write (jscl::concat +CSI+ col "F"))) ;;; CHA (defn- cursor.horizontal.move (&optional (col 1)) (term.write (jscl::concat +CSI+ col "G"))) ;;; CUD (defn- cursor.down (&optional (col 1)) (term.write (jscl::concat +CSI+ col "B"))) ;;; VPA Vertical Position Absolute ;;; CSI Ps d Move cursor to Ps-th row (default=1). (defn- cursor.vertical.move (&optional(row 1)) (term.write (jscl::concat +CSI+ row "d"))) (defn- cursor.save () (term.write (jscl::concat +CSI+ "s"))) (defn- cursor.restore () (term.write (jscl::concat +CSI+ "u"))) ;;; ED ;;; 0 Erase from the cursor through the end of the viewport. ;;; 1 Erase from the beginning of the viewport through the cursor. ;;; 2 Erase complete viewport. ;;; 3 Erase scrollback. (defn- erase.display (&optional (part 0)) (term.write (jscl::concat +CSI+ part "J"))) ;;; EL (defn- erase.line (&optional (part 0)) (term.write (jscl::concat +CSI+ part "K"))) ;;; IL (defn- insert.line (&optional (rows 1)) (term.write (jscl::concat +CSI+ rows "L"))) ;;; DL (defn- delete.line (&optional (rows 1)) (term.write (jscl::concat +CSI+ rows "M"))) ;;; DCH (defn- delete.char (&optional (rows 1)) (term.write (jscl::concat +CSI+ rows "P"))) ;;; ECH (defn- erase.char (&optional (rows 1)) (term.write (jscl::concat +CSI+ rows "X"))) ;;; ICH (defn- insert.char (&optional col 1) (term.write (jscl::concat +CSI+ col "@"))) (in-package :cl-user) ;;;EOF
8,696
Common Lisp
.lisp
222
36.072072
92
0.657272
vlad-km/xterm
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
0c3b9ab296ee3e7d5d8f794369656db9c9c292381711ef856d9ba892510f6248
27,251
[ -1 ]
27,252
stream.lisp
vlad-km_xterm/stream.lisp
;;; -*- mode:lisp; coding:utf-8 -*- ;;; Stream prototype for dumb-terminal ;;; @vlad-km, 2021 (in-package :xterm) (defclass terminal-stream () ((buffer :initform nil :accessor terminal-stream-buffer) (buffer-length :initform 0 :accessor terminal-stream-buffer-length) (dirty :initform nil :accessor terminal-stream-buffer-dirty) (right-margin :initform nil :accessor terminal-stream-right-margin) (line :initform 0 :accessor terminal-stream-buffer-line) (column :initform 0 :accessor terminal-stream-buffer-column) (length :initform 0 :accessor terminal-stream-length))) (defun dirty-terminal-stream-buffer () (setf (terminal-stream-buffer-dirty *tsb*) t)) (defun terminal-stream-buffer-line-at-start () (= (terminal-stream-buffer-column *tsb*) 0)) (defun clear-terminal-stream-buffer () (when (terminal-stream-buffer-dirty *tsb*) (setf (terminal-stream-buffer *tsb*) (make-array 0 :fill-pointer 0 :element-type 'character) (terminal-stream-buffer-dirty *tsb*) nil) (incf (terminal-stream-length *tsb*) (terminal-stream-buffer-length *tsb*)) (setf (terminal-stream-buffer-length *tsb*) 0)) (values)) (defun make-string-image (str) str) (defvar *CR* (code-char 13)) (defun terminal-stream-out (str) (let ((ch) (si (make-string-image str)) (buffer (terminal-stream-buffer *tsb*)) (r-margin (terminal-stream-right-margin *tsb*))) (when (null buffer) (setq buffer (make-array 0 :fill-pointer 0 :element-type 'character)) (setf (terminal-stream-buffer *tsb*) buffer)) (dotimes (i (length si)) (setq ch (aref si i)) (cond ((eq ch #\newline) (incf (terminal-stream-buffer-line *tsb*)) (setf (terminal-stream-buffer-column *tsb*) 0) (vector-push-extend ch buffer) (vector-push-extend *CR* buffer)) ((eq ch *CR*) (incf (terminal-stream-buffer-line *tsb*)) (setf (terminal-stream-buffer-column *tsb*) 0) (vector-push-extend #\newline buffer)) (t (vector-push-extend ch buffer) (incf (terminal-stream-buffer-column *tsb*))))) (dirty-terminal-stream-buffer) (values))) (defun terminal-stream-finish () (when (dirty-terminal-stream-buffer) (term.write (terminal-stream-buffer *tsb*)) #+nil (if (terminal-stream-buffer-line-at-start) (term-writeln "")) (clear-terminal-stream-buffer))) (defvar *tsb* (make-instance 'terminal-stream)) (defn- make-terminal-stream () (make-instance 'terminal-stream)) (defvar stdout (jscl::make-stream :write-fn (lambda (string) (terminal-stream-out string) (terminal-stream-finish)))) (export '(xterm::stdout)) ;;; input system queue ;;; holds esc-seq & chars from keyboard ;;; via xterm:on.key ;;; (defclass kb-stream () ((head :initform 0 :accessor kb-stream-head) (tail :initform 0 :accessor kb-stream-tail) (size :initform nil :initarg :size :accessor kb-stream-size) (buffer :initarg :buffer :initform nil :accessor kb-stream-buffer) (index :initarg :index :initform nil :accessor kb-stream-index))) (defn- make-kb-stream (&key size) (make-instance 'kb-stream :buffer (make-array (list size) :initial-element nil) :size size)) ;;; push element ;;; return nil if buffer is full (defn- kb-stream-write (stream value) (let ((next (1+ (kb-stream-tail stream)))) (if (>= next (kb-stream-size stream)) (setq next 0)) (if (null (= next (kb-stream-head stream))) (setf (aref (kb-stream-buffer stream) (kb-stream-tail stream)) value (kb-stream-tail stream) next) nil))) ;;; pop element from buffer ;;; return (nil nil) if empty buffer (defn- kb-stream-read (stream) (if (not (= (kb-stream-head stream) (kb-stream-tail stream))) (let ((value (aref (kb-stream-buffer stream) (kb-stream-head stream))) (next (1+ (kb-stream-head stream)))) (if (>= next (kb-stream-size stream)) (setq next 0)) (setf (kb-stream-head stream) next) (values value t)) (values nil nil))) ;;; reset queue (defn- kb-stream-reset (stream) (setf (kb-stream-head stream) 0 (kb-stream-tail stream) 0) (values)) (in-package :cl-user) ;;;EOF
4,575
Common Lisp
.lisp
123
30.146341
80
0.618585
vlad-km/xterm
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
e1fe9f75c8472bf17d4b1cfa2ccd3ec9e6a5baf00767f7968e03824faf664893
27,252
[ -1 ]
27,270
markov-n.lisp
ntrocado_markov-n/markov-n.lisp
(in-package :markov-n) (defparameter *table* (make-hash-table)) (defparameter *rand* 0) (defun combine-bytes (bytes) (loop :for n :downfrom (1- (length bytes)) :for b :in bytes :summing (* b (expt 65536 n)))) (defun get-chunk (file) (loop :for n :in (wav:read-wav-file file)) :when (equalp (getf n :chunk-id) "data") :return (getf n :chunk-data)) (defun wave-frames (file) (let ((frames nil)) (cl-wave:with-open-wave (wav file) (format t "channels: ~a.~%" (cl-wave:get-num-channels wav)) (format t "sample rate: ~a.~%" (cl-wave:get-sample-rate wav)) (format t "bitrate: ~a.~%" (cl-wave:get-sample-width wav :bits t)) (setf frames (cl-wave:get-frames wav))) frames)) ; (mapcar (lambda (x) (+ x 32768)) frames))) (defun read-file (file n) (let* ((data (coerce (wave-frames file) 'vector)) (first-bytes (subseq data 0 n)) (data-seq (concatenate 'vector first-bytes data)) (data-length (length data-seq))) (format t "File read. Size is ~a samples.~%" data-length) (format t "~a~%" (make-string 100 :initial-element #\_)) (loop :with counter-step := (ceiling (/ data-length 100)) :for next :across (subseq data-seq n) :for i :from n :for subseq-start := (- i n) :do (let* ((data-subseq (subseq data-seq subseq-start i)) (key (combine-bytes (coerce data-subseq 'list)))) (if (not (hash-table-p (gethash key *table*))) (progn (setf (gethash key *table*) (make-hash-table)) (setf (gethash next (gethash key *table*)) 1)) (if (not (gethash next (gethash key *table*))) (setf (gethash next (gethash key *table*)) 1) (incf (gethash next (gethash key *table*))))) (when (zerop (mod i counter-step)) (progn (format t ".") (finish-output))))))) (defun get-next (current) (let* ((hash-size (hash-table-count (gethash current *table*))) (all-keys (alexandria:hash-table-keys (gethash current *table*))) (all-values (alexandria:hash-table-values (gethash current *table*))) (value-total (reduce #'+ all-values)) (prob-array (make-array hash-size :initial-contents (mapcar (lambda (x) (/ x value-total)) all-values))) (values-array (make-array hash-size :initial-contents all-keys)) (rp (make-discrete-random-var prob-array values-array))) (funcall rp))) (defun make-wave-file (file &key frames (channels 1) (sample-rate 44100) (bitrate 16)) (cl-wave:with-open-wave (wav file :direction :output) (cl-wave:set-num-channels wav channels) (cl-wave:set-sample-rate wav sample-rate) (cl-wave:set-sample-width wav (/ bitrate 8)) (cl-wave:set-frames wav frames))) (defun write-file (file n size &optional (initial-list (make-list (1+ n) :initial-element 0))) (let ((buffer (subseq initial-list 0 n)) (frames nil)) (format t "~a~%" (make-string 100 :initial-element #\_)) (dotimes (i size t) (let ((new-byte (if (> (the fixnum i) (the fixnum n)) (get-next (combine-bytes buffer)) (elt initial-list i)))) (push new-byte frames) (setf buffer (rest (nconc buffer (list new-byte)))) (when (zerop (ceiling (mod i (/ size 100)))) (progn (format t ".") (finish-output))))) (make-wave-file file :frames (reverse frames)))) (defun main (order input output size) "Analyses <input> file and creates a new <output> file with <size> bytes." (defparameter *table* (make-hash-table)) (read-file input order) (format t "~%Creating new file...~%") (let ((first-bytes (subseq (wave-frames input) 0 (1+ order)))) (write-file output order size first-bytes))) (defun write-wave (input output) "Just for testing the wave library." (cl-wave:with-open-wave (wav output :direction :output) (cl-wave:set-num-channels wav 1) (cl-wave:set-sample-rate wav 44100) (cl-wave:set-sample-width wav 2) (cl-wave:set-frames wav (wave-frames input))))
3,903
Common Lisp
.lisp
92
38.032609
94
0.647987
ntrocado/markov-n
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
c501b7112bac983eed448d0ceffec2b54298db85da8d07c11ebbded8546ebaa0
27,270
[ -1 ]
27,271
alias-method.lisp
ntrocado_markov-n/alias-method.lisp
(in-package :alias-method) ;;An implementation of the Alias Method. ;; ;; NOTE: Additional comments, and an updated, more accurate version ;; can be found here: ;; ;; ;; The function MAKE-DISCRETE-RANDOM-VAR takes an array of ;; probabilities and an (optional) array of values. Produces a ;; function which returns each of the values with the specified ;; probability (or the corresponding integer no values have been ;; given). ;; ;; It needs only one call to RANDOM for every value produced. ;; ;; For the licence, see at the end of the file. (defun create-alias-method-vectors (probabilities) (let* ((N (length probabilities)) (threshold (/ 1.0d0 N)) (alternatives (make-array N :element-type 'fixnum)) (p_keep (make-array N :initial-contents (coerce probabilities 'list))) bigs lows) (loop :for i :from 0 :below N :do (if (>= threshold (aref probabilities i)) (push i lows) (push i bigs))) (loop :while lows :do (let* ((0ne (pop lows)) (Tw0 (pop bigs)) (delta (- threshold (aref p_keep 0ne)))) (if tw0 (progn (setf (aref p_keep 0ne) (/ (aref p_keep 0ne) threshold)) (setf (aref alternatives 0ne) Tw0) (decf (aref p_keep Tw0) delta) (if (>= threshold (aref p_keep Tw0)) (push Tw0 lows) (push Tw0 bigs))) (setf (aref p_keep 0ne) 1.0d0)))) ;; Numerical noise might leave some bigs dangling, with ;; | p_keep - 1/N | very small. (dolist (k bigs) (setf (aref p_keep k) 1.0d0)) (values p_keep alternatives))) (defun make-discrete-random-var (probabilities &optional values) (when (and values (/= (length values) (length probabilities))) (error "different number of values and probabilities.")) (let* ((N (float (length probabilities) 0.0d0))) (multiple-value-bind (p_keep alternatives) (create-alias-method-vectors probabilities) #'(lambda () (labels ((result (k) (if values (aref values k) k))) (multiple-value-bind (k r) (floor (random N)) (if (> r (aref p_keep k)) (result (aref alternatives k)) (result k)))))))) ;; Tests the alias method. p holds the prescribed probabilities, and ;; cnt the measured ones. (defun test-alias-method (n runs) (let ((p (make-array n :element-type 'double-float)) (cnt (make-array n :initial-element 0.0d0))) (dotimes (i n) (setf (aref p i) (random 1.0d0))) (let ((nc (loop for i from 0 below n summing (aref p i)))) (dotimes (i n) (setf (aref p i) (/ (aref p i) nc))) (let ((rp (make-discrete-random-var p))) (dotimes (i runs) (incf (aref cnt (funcall rp)))) (dotimes (i n) (setf (aref cnt i) (/ (aref cnt i) runs))))) (values p cnt))) ;;; Copyright (c) 2006, Mario S. Mommer ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation ;;; files (the "Software"), to deal in the Software without ;;; restriction, including without limitation the rights to use, copy, ;;; modify, merge, publish, distribute, sublicense, and/or sell copies ;;; of the Software, and to permit persons to whom the Software is ;;; furnished to do so, subject to the following conditions: ;;; The above copyright notice and this permission notice shall be ;;; included in all copies or substantial portions of the Software. ;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ;;; DEALINGS IN THE SOFTWARE.
3,780
Common Lisp
.lisp
62
57.048387
1,129
0.688901
ntrocado/markov-n
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
59dea5ff18d1d7d87d0391c142e712ac3145103452edc65a85c127741d74d0a0
27,271
[ -1 ]
27,272
packages.lisp
ntrocado_markov-n/packages.lisp
(in-package "COMMON-LISP-USER") (defpackage :alias-method (:use :common-lisp) (:export :make-discrete-random-var)) (defpackage :markov-n (:use :common-lisp :alexandria :alias-method) (:export :main))
210
Common Lisp
.lisp
7
27.571429
47
0.721393
ntrocado/markov-n
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
8883bdc3894d28393b3215c6894cde803e0ac4ff72d6b86d15a7dc640f76e6b0
27,272
[ -1 ]
27,273
markov-n.asd
ntrocado_markov-n/markov-n.asd
(defsystem "markov-n" :description "Markov chains on sample level with pcm audio files." :version "1" :author "Nuno Trocado" :depends-on ("alexandria" "cl-wav") :components ((:file "packages") (:file "alias-method" :depends-on ("packages")) (:file "markov-n" :depends-on ("alias-method"))))
331
Common Lisp
.asd
8
35.375
68
0.628483
ntrocado/markov-n
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
0a2cdf675d10a5421849de03e64b71bc4e0610b9f4a3b2b14d3c3d323391313d
27,273
[ -1 ]
27,292
package.lisp
chunsj_mtx/package.lisp
(cl:defpackage :mtx (:use #:common-lisp #:fnv #:cl-blapack) (:export #:$size #:$dim #:$nrow #:$ncol #:$m #:$r #:$rn #:$ones #:$zeros #:$eye #:$ #:$rows #:$cols #:$dup #:$reshape #:$transpose #:$sm #:$rot180 #:$+ #:$- #:$* #:$x #:$/ #:$sum #:$max #:$min #:$argmax #:$argmin #:$mean #:$convolute #:$xwpb #:$gemm #:$mm #:$axpy #:$map #:$map! #:$round #:$exp #:$log #:$log10 #:$expt #:$sqrt #:$sigmoid #:$sin #:$cos #:$tan #:$sinh #:$cosh #:$tanh #:$asin #:$acos #:$atan #:$softmax #:$relu #:$lkyrelu #:$mse #:$cee #:$shuffle #:$iota #:$linspace #:$partition #:@> #:@>> #:LAYER #:OPTIMIZER #:NEURALNETWORK #:forward-propagate #:backward-propagate #:optimize-parameters #:regularization #:parameters #:initialize-parameters #:update #:predict #:loss #:gradient #:train #:SIGMOIDLAYER #:$sigmoid-layer #:RELULAYER #:$relu-layer #:LKYRELULAYER #:$lkyrelu-layer #:SOFTMAXCEELOSSLAYER #:$softmax-layer #:PLAINMSELOSSLAYER #:$mse-layer #:DROPOUTLAYER #:$dropout-layer #:AFFINELAYER #:$affine-layer #:BATCHNORMLAYER #:batchnorm-layer #:SNN #:SGD #:$sgd-optimizer #:MOMENTUM #:$momentum-optimizer #:NESTEROV #:$nesterov-optimizer #:ADAGRAD #:$adagrad-optimizer #:RMSPROP #:$rmsprop-optimizer #:ADAM #:$adam-optimizer))
2,382
Common Lisp
.lisp
110
9.972727
34
0.335387
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
71bcff2778a7f23636f24ce2ab784d727bc2ccccf3841e470bc3f16d9f64e9f9
27,292
[ -1 ]
27,293
layers.lisp
chunsj_mtx/layers.lisp
(in-package :mtx) (defclass SIGMOIDLAYER (LAYER) ((out :initform nil))) (defun $sigmoid-layer () (make-instance 'SIGMOIDLAYER)) (defmethod forward-propagate ((l SIGMOIDLAYER) &key xs train) (declare (ignore train)) (with-slots (out) l (setf out ($sigmoid xs)) out)) (defmethod backward-propagate ((l SIGMOIDLAYER) &key d) (with-slots (out) l ($x d ($- 1.0 out) out))) (defclass TANHLAYER (LAYER) ((out :initform nil))) (defun $tanh-layer () (make-instance 'TANHLAYER)) (defmethod forward-propagate ((l TANHLAYER) &key xs train) (declare (ignore train)) (with-slots (out) l (setf out ($tanh xs)) out)) (defmethod backward-propagate ((l TANHLAYER) &key d) (with-slots (out) l ($x d ($- 1.0 ($x out out))))) (defclass RELULAYER (LAYER) ((out :initform nil))) (defun $relu-layer () (make-instance 'RELULAYER)) (defmethod forward-propagate ((l RELULAYER) &key xs train) (declare (ignore train)) (with-slots (out) l (setf out ($relu xs)) out)) (defmethod backward-propagate ((l RELULAYER) &key d) (with-slots (out) l ($map (lambda (de oe) (if (> oe 0) de 0.0)) d out))) (defclass LKYRELULAYER (LAYER) ((lky :initform 0.01 :initarg :l) (out :initform nil))) (defun $lkyrelu-layer (&key (lky 0.01)) (make-instance 'LKYRELULAYER :l lky)) (defmethod forward-propagate ((l LKYRELULAYER) &key xs train) (declare (ignore train)) (with-slots (out lky) l (setf out ($lkyrelu xs :lky lky)) out)) (defmethod backward-propagate ((l LKYRELULAYER) &key d) (with-slots (out lky) l ($map (lambda (de oe) (if (> oe 0) de (* lky de))) d out))) (defclass ELULAYER (LAYER) ((out :initform nil))) (defun $elu-layer () (make-instance 'ELULAYER)) (defmethod forward-propagate ((l ELULAYER) &key xs train) (declare (ignore train xs))) (defmethod backward-propagate ((l ELULAYER) &key d) (declare (ignore d))) (defclass SELULAYER (LAYER) ((out :initform nil))) (defun $selu-layer () (make-instance 'SELULAYER)) (defmethod forward-propagate ((l SELULAYER) &key xs train) (declare (ignore train xs))) (defmethod backward-propagate ((l SELULAYER) &key d) (declare (ignore d))) (defclass SOFTMAXCEELOSSLAYER (LAYER) ((loss :initform nil) (ys :reader ys :initform nil) (ts :reader ts :initform nil))) (defun $softmax-layer () (make-instance 'SOFTMAXCEELOSSLAYER)) (defmethod forward-propagate ((l SOFTMAXCEELOSSLAYER) &key ys ts) (with-slots (loss (lts ts) (lys ys)) l (setf lts ts) (setf lys ($softmax ys :axis :row)) (setf loss ($cee ys lts)) loss)) (defmethod backward-propagate ((l SOFTMAXCEELOSSLAYER) &key) (with-slots (ts ys) l ($/ ($- ys ts) ($nrow ts)))) (defclass PLAINMSELOSSLAYER (LAYER) ((loss :initform nil) (ys :reader ys :initform nil) (ts :reader ts :initform nil))) (defun $mse-layer () (make-instance 'PLAINMSELOSSLAYER)) (defmethod forward-propagate ((l PLAINMSELOSSLAYER) &key ys ts) (with-slots (loss (lts ts) (lys ys)) l (setf lts ts) (setf lys ys) (setf loss ($mse lys lts)) loss)) (defmethod backward-propagate ((l PLAINMSELOSSLAYER) &key) (with-slots (ts ys) l ($/ ($- ys ts) ($nrow ts)))) (defclass DROPOUTLAYER (LAYER) ((dr :initarg :dr :initform nil) (mask :initform nil))) (defun $dropout-layer (&key (dr 0.5)) (make-instance 'DROPOUTLAYER :dr dr)) (defmethod forward-propagate ((l DROPOUTLAYER) &key xs (train T)) (with-slots (dr mask) l (when train (setf mask ($map (lambda (v) (if (> v dr) 1.0 0.0)) ($r ($nrow xs) ($ncol xs))))) (if train ($x xs mask) ($x xs (- 1.0 dr))))) (defmethod backward-propagate ((l DROPOUTLAYER) &key d) (with-slots (mask) l (if mask ($x d mask) d))) (defclass AFFINELAYER (LAYER) ((input-size :initarg :input-size :initform nil) (output-size :initarg :output-size :initform nil) (wdl :initarg :wdl :initform 0.0) (w :initarg nil) (b :initarg nil) (x :initform nil) (dw :reader dw :initform nil) (db :reader db :initform nil))) (defmethod print-object ((l AFFINELAYER) stream) (print-unreadable-object (l stream :type t :identity t) (with-slots (input-size output-size wdl) l (format stream "[~A x ~A] WITH ~10,2E" input-size output-size wdl)))) (defun $affine-layer (input-size output-size &key (winit :he) (wr 0.0)) (let ((l (make-instance 'AFFINELAYER :input-size input-size :output-size output-size :wdl wr))) (with-slots (w b dw db) l (let ((sc (cond ((eq winit :he) (sqrt (/ 6.0 input-size))) ((eq winit :xavier) (sqrt (/ 3.0 input-size))) (T 1.0)))) (setf w ($x sc ($- ($x 2.0 ($r input-size output-size)) 1.0)) dw ($m 0.0 input-size output-size)) (setf b ($m 1.0 1 output-size) db ($m 0.0 1 output-size))) l))) (defmethod forward-propagate ((l AFFINELAYER) &key xs train) (declare (ignore train)) (with-slots (x w b) l (setf x xs) ($xwpb x w b))) (defmethod backward-propagate ((l AFFINELAYER) &key d) (with-slots (wdl x w dw db) l ($gemm x d :c dw :transa T) (when (> (abs wdl) 0) ($axpy w dw :alpha wdl)) ($copy ($sum d :axis :column) db) ($gemm d w :transb T))) (defmethod optimize-parameters ((l AFFINELAYER) &key o) (with-slots (w b dw db) l (update o (list w b) (list dw db)))) (defmethod regularization ((l AFFINELAYER)) (with-slots (wdl w) l (* 0.5 wdl ($sum ($x w w))))) (defmethod parameters ((l AFFINELAYER)) (with-slots (w b) l (list w b))) ;; XXX need to be fixed to new architecture (defclass BATCHNORMLAYER (LAYER) ((gamma :initform nil) (beta :initform nil) (momentum :initarg :m :initform nil) (rmean :initarg :rm :initform nil) (rvar :initarg :rv :initform nil) (batch-size :initform nil) (xc :initform nil) (xn :initform nil) (std :initform nil) (dgamma :initform nil :reader dgamma) (dbeta :initform nil :reader dbeta))) (defun $batchnorm-layer (sz &key (m 0.9) rm rv) (let ((l (make-instance 'BATCHNORMLAYER :m m :rm rm :rv rv))) (with-slots (gamma beta) l (setf gamma ($ones 1 sz)) (setf beta ($zeros 1 sz))) l)) (defun bn-forward-h (l x tf) (with-slots (rmean rvar batch-size xc xn std momentum beta gamma) l (when (null rmean) (setf rmean ($zeros 1 ($ncol x))) (setf rvar ($zeros 1 ($ncol x)))) (if tf (let* ((tmu ($mean x :axis :column)) (txc ($- x tmu)) (tvar ($mean ($x txc txc) :axis :column)) (tstd ($sqrt ($+ tvar 10E-7))) (txn ($/ txc tstd))) (setf batch-size ($nrow x)) (setf xc txc) (setf xn txn) (setf std tstd) (setf rmean ($+ ($x momentum rmean) ($x (- 1.0 momentum) tmu))) (setf rvar ($+ ($x momentum rvar) ($x (- 1.0 momentum) tvar)))) (progn (setf xc ($- x rmean)) (setf xn ($/ xc ($sqrt ($+ rvar 10E-7)))))) ($+ ($x gamma xn) beta))) (defmethod forward-propagate ((l BATCHNORMLAYER) &key xs (train T)) (bn-forward-h l xs train)) (defun bn-backward-h (l dout) (with-slots (gamma dbeta dgamma std xn xc batch-size) l (let* ((tdbeta ($sum dout :axis :column)) (tdgamma ($sum ($x xn dout) :axis :column)) (dxn ($x gamma dout)) (dxc ($/ dxn std)) (dstd ($- ($sum ($/ ($x dxn xc) ($x std std)) :axis :column))) (dvar ($/ ($x 0.5 dstd) std)) (dxc ($axpy ($x (/ 2.0 batch-size) xc dvar) dxc)) (dmu ($sum dxc :axis :column)) (dx ($- dxc ($/ dmu batch-size)))) (setf dgamma tdgamma) (setf dbeta tdbeta) dx))) (defmethod backward-propagate ((l BATCHNORMLAYER) &key d) (bn-backward-h l d)) (defmethod optimize-parameters ((l BATCHNORMLAYER) &key o) (with-slots (gamma beta dgamma dbeta) l (update o (list gamma beta) (list dgamma dbeta)))) (defmethod parameters ((l BATCHNORMLAYER)) (with-slots (gamma beta) l (list gamma beta)))
8,054
Common Lisp
.lisp
212
32.915094
86
0.617202
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
1986dfbf555e6f6fb600b9f09af68a066eda254a95e12078dacb84e1dea9486e
27,293
[ -1 ]
27,294
basic.lisp
chunsj_mtx/basic.lisp
(in-package :mtx) (declaim (optimize (speed 3) (safety 0) (debug 1))) (declaim (inline $gemm)) (defun $gemm (a b &key (alpha 1.0) (beta 0.0) (c nil) (transa nil) (transb nil)) (let* ((nra (if transa ($ncol a) ($nrow a))) (nca (if transa ($nrow a) ($ncol a))) (ncb (if transb ($nrow b) ($ncol b))) (c (or c ($mx ($vx (* nra ncb)) :nrow nra :ncol ncb))) (m nra) (n ncb) (k nca) (lda (if transa k m)) (ldb (if transb n k)) (ldc m) (transa (if transa "T" "N")) (transb (if transb "T" "N")) (ax ($fnv a)) (bx ($fnv b)) (cx ($fnv c))) (%sgemm transa transb m n k alpha ax lda bx ldb beta cx ldc) c)) (defun $mm (a b &key (alpha 1.0) (beta 0.0) (c nil)) ($gemm a b :alpha alpha :beta beta :c c)) (defun broadcast-vector (m n) (let ((nr ($nrow m)) (nc ($ncol m)) (mvs ($fnv m))) (cond ((= 1 nr) (let* ((nnr n) (vs ($vx (* nnr nc))) (pv ($ptr vs)) (pmv ($ptr mvs))) (dotimes (j nc) (dotimes (i nnr) (setf ($prf pv (+ (* nnr j) i)) ($prf pmv j)))) ($mx vs :nrow nnr :ncol nc))) ((= 1 nc) (let* ((nnc n) (vs ($vx (* nr nnc))) (pv ($ptr vs)) (pmv ($ptr mvs))) (dotimes (j nnc) (dotimes (i nr) (setf ($prf pv (+ (* nr j) i)) ($prf pmv i)))) ($mx vs :nrow nr :ncol nnc)))))) (declaim (inline $copy)) (defun $copy (a b &key (incx 1) (incy 1)) (let ((n ($size a))) (%scopy n ($fnv a) incx ($fnv b) incy))) (defun $dup (a) (let* ((n ($size a)) (b ($mx ($vx n) :nrow ($nrow a) :ncol ($ncol a)))) ($copy a b) b)) (declaim (inline $axpy)) (defun $axpy (a b &key (alpha 1.0) (incx 1) (incy 1)) (let* ((n ($size a))) (%saxpy n alpha ($fnv a) incx ($fnv b) incy) b)) (defun $m+ (a b &key (c nil)) (let ((c (or c ($dup b)))) ($axpy a c) c)) (defun $m+! (a b) ($axpy a b) b) (defun $m- (a b &key (c nil)) (let ((c (or c ($dup a)))) ($axpy b c :alpha -1.0) c)) (declaim (inline $scal)) (defun $scal (alpha x &key (incx 1)) (let ((n ($size x))) (%sscal n alpha ($fnv x) incx) x)) (defun $m* (alpha x &key (y nil)) (let ((y (or y ($dup x)))) ($scal alpha y) y)) (defun $m.* (a b &key (c nil)) (let* ((c (or c ($dup a))) (n ($size c)) (pa ($ptr a)) (pb ($ptr b)) (pc ($ptr c))) (dotimes (i n) (setf ($prf pc i) (* ($prf pa i) ($prf pb i)))) c)) (defun $m.*! (a b) (let* ((n ($size a)) (pa ($ptr a)) (pb ($ptr b))) (dotimes (i n) (setf ($prf pb i) (* ($prf pa i) ($prf pb i)))) b)) (defgeneric multiply (a b)) (defmethod multiply ((a NUMBER) (b NUMBER)) (* a b)) (defmethod multiply ((a NUMBER) (b MX)) ($m* a b)) (defmethod multiply ((a MX) (b NUMBER)) ($m* b a)) (defmethod multiply ((a MX) (b MX)) ($mm a b)) (defun $* (&rest args) (cond ((= (length args) 0) 1) (T (reduce #'multiply args)))) (defgeneric hadamard-multiply (a b)) (defmethod hadamard-multiply ((a NUMBER) (b NUMBER)) (* a b)) (defmethod hadamard-multiply ((a NUMBER) (b MX)) ($m* a b)) (defmethod hadamard-multiply ((a MX) (b NUMBER)) ($m* b a)) (defmethod hadamard-multiply ((a MX) (b MX)) (cond ((and (= ($size a) ($size b)) ($matrix? a) ($matrix? b)) ($m.* a b)) ((and ($row-vector? a) (= ($ncol a) ($ncol b))) ($m.* (broadcast-vector a ($nrow b)) b)) ((and ($column-vector? a) (= ($nrow a) ($nrow b))) ($m.* (broadcast-vector a ($ncol b)) b)) ((and ($row-vector? b) (= ($ncol b) ($ncol a))) ($m.* (broadcast-vector b ($nrow a)) a)) ((and ($column-vector? b) (= ($nrow b) ($nrow a))) ($m.* (broadcast-vector b ($ncol a)) a)) ((and ($vector? a) ($vector? b)) (cond ((and ($column-vector? a) ($row-vector? b)) ($m.* (broadcast-vector a ($ncol b)) (broadcast-vector b ($nrow a)))) ((and ($row-vector? a) ($column-vector? b)) ($m.* (broadcast-vector a ($nrow b)) (broadcast-vector b ($ncol a)))))))) (defun $x (&rest args) (cond ((= (length args) 0) 1) (T (reduce #'hadamard-multiply args)))) (defgeneric add (a b)) (defmethod add ((a NUMBER) (b NUMBER)) (+ a b)) (defun broadcast-number (v nr nc) ($mx ($vx (* nr nc) :initial-value v) :nrow nr :ncol nc)) (defmethod add ((a NUMBER) (b MX)) (let ((vs ($fnv b)))) ($m+ (broadcast-number a ($nrow b) ($ncol b)) b)) (defmethod add ((a MX) (b NUMBER)) (add b a)) (defmethod add ((a MX) (b MX)) (cond ((and (= ($size a) ($size b)) ($matrix? a) ($matrix? b)) ($m+ a b)) ((and ($row-vector? a) (= ($ncol a) ($ncol b))) ($m+ (broadcast-vector a ($nrow b)) b)) ((and ($column-vector? a) (= ($nrow a) ($nrow b))) ($m+ (broadcast-vector a ($ncol b)) b)) ((and ($row-vector? b) (= ($ncol b) ($ncol a))) ($m+ (broadcast-vector b ($nrow a)) a)) ((and ($column-vector? b) (= ($nrow b) ($nrow a))) ($m+ (broadcast-vector b ($ncol a)) a)) ((and ($vector? a) ($vector? b)) (cond ((and ($column-vector? a) ($row-vector? b)) ($m+ (broadcast-vector a ($ncol b)) (broadcast-vector b ($nrow a)))) ((and ($row-vector? a) ($column-vector? b)) ($m+ (broadcast-vector a ($nrow b)) (broadcast-vector b ($ncol a)))))))) (defun $+ (&rest args) (cond ((= (length args) 0) 0) (T (reduce #'add args)))) (defgeneric subtract (a b)) (defmethod subtract ((a NUMBER) (b NUMBER)) (- a b)) (defmethod subtract ((a NUMBER) (b MX)) ($m- (broadcast-number a ($nrow b) ($ncol b)) b)) (defmethod subtract ((a MX) (b NUMBER)) ($m- a (broadcast-number b ($nrow a) ($ncol a)))) (defmethod subtract ((a MX) (b MX)) (cond ((and (= ($size a) ($size b)) ($matrix? a) ($matrix? b)) ($m- a b)) ((and ($row-vector? a) (= ($ncol a) ($ncol b))) ($m- (broadcast-vector a ($nrow b)) b)) ((and ($column-vector? a) (= ($nrow a) ($nrow b))) ($m- (broadcast-vector a ($ncol b)) b)) ((and ($row-vector? b) (= ($ncol b) ($ncol a))) ($m- a (broadcast-vector b ($nrow a)))) ((and ($column-vector? b) (= ($nrow b) ($nrow a))) ($m- a (broadcast-vector b ($ncol a)))) ((and ($vector? a) ($vector? b)) (cond ((and ($column-vector? a) ($row-vector? b)) ($m- (broadcast-vector a ($ncol b)) (broadcast-vector b ($nrow a)))) ((and ($row-vector? a) ($column-vector? b)) ($m- (broadcast-vector a ($nrow b)) (broadcast-vector b ($ncol a)))))))) (defun $- (&rest args) (cond ((= 1 (length args)) ($x -1 (car args))) (T (reduce #'subtract args)))) (defgeneric divide (a b)) (defmethod divide ((a NUMBER) (b NUMBER)) (/ a b)) (defun 1/n (m) (let ((n ($dup m))) (loop :for i :from 0 :below ($size m) :do (setf ($ref ($fnv n) i) (/ 1.0 ($ref ($fnv m) i)))) n)) (defmethod divide ((a NUMBER) (b MX)) (hadamard-multiply a (1/n b))) (defmethod divide ((a MX) (b NUMBER)) (hadamard-multiply a (/ 1.0 b))) (defmethod divide ((a MX) (b MX)) (hadamard-multiply a (1/n b))) (defun $/ (&rest args) (cond ((= 1 (length args)) (divide 1 (car args))) (T (reduce #'divide args)))) (defgeneric $sum (m &key axis)) (defmethod $sum ((m NUMBER) &key axis) (declare (ignore axis)) m) (defmethod $sum ((m LIST) &key axis) (declare (ignore axis)) (loop :for i :from 0 :below ($count m) :sum (elt m i))) (defmethod $sum ((m ARRAY) &key axis) (declare (ignore axis)) (loop :for i :from 0 :below ($count m) :sum (elt m i))) (defmethod $sum ((m MX) &key axis) (cond ((null axis) (let ((vs ($fnv m))) (loop :for i :from 0 :below ($count vs) :sum ($ref vs i)))) ((eq axis :row) (let* ((nr ($nrow m)) (nc ($ncol m)) (nm ($m 0 nr 1))) (loop :for i :from 0 :below nr :do (setf ($ nm i 0) (loop :for j :from 0 :below nc :sum ($ m i j)))) nm)) (T (let* ((nr ($nrow m)) (nc ($ncol m)) (nm ($m 0 1 nc))) (loop :for j :from 0 :below nc :do (setf ($ nm 0 j) (loop :for i :from 0 :below nr :sum ($ m i j)))) nm)))) (defgeneric $max (m &key)) (defmethod $max ((m NUMBER) &key) m) (defmethod $max ((m LIST) &key) (loop :for i :from 0 :below ($count m) :maximize (elt m i))) (defmethod $max ((m ARRAY) &key) (loop :for i :from 0 :below ($count m) :maximize (elt m i))) (defmethod $max ((m MX) &key (axis nil)) (cond ((null axis) (let ((vs ($fnv m))) (loop :for i :from 0 :below ($count vs) :maximize ($ref vs i)))) ((eq axis :row) (let ((r ($m 0 ($nrow m) 1))) (loop :for i :from 0 :below ($nrow m) :do (setf ($ r i 0) (loop :for j :from 0 :below ($ncol m) :maximize ($ m i j)))) r)) ((eq axis :column) (let ((r ($m 0 1 ($ncol m)))) (loop :for j :from 0 :below ($ncol m) :do (setf ($ r 0 j) (loop :for i :from 0 :below ($nrow m) :maximize ($ m i j)))) r)))) (defgeneric $min (m &key)) (defmethod $min ((m NUMBER) &key) m) (defmethod $min ((m LIST) &key) (loop :for i :from 0 :below ($count m) :minimize (elt m i))) (defmethod $min ((m ARRAY) &key) (loop :for i :from 0 :below ($count m) :minimize (elt m i))) (defmethod $min ((m MX) &key (axis nil)) (cond ((null axis) (let ((vs ($fnv m))) (loop :for i :from 0 :below ($count vs) :minimize ($ref vs i)))) ((eq axis :row) (let ((r ($m 0 ($nrow m) 1))) (loop :for i :from 0 :below ($nrow m) :do (setf ($ r i 0) (loop :for j :from 0 :below ($ncol m) :minimize ($ m i j)))) r)) ((eq axis :column) (let ((r ($m 0 1 ($ncol m)))) (loop :for j :from 0 :below ($ncol m) :do (setf ($ r 0 j) (loop :for i :from 0 :below ($nrow m) :minimize ($ m i j)))) r)))) (defun $xwpb (x w b) (let ((c (broadcast-vector b ($nrow x)))) ($mm x w :beta 1.0 :c c) c)) (defun $map (function matrix &rest matrices) (if matrices (let* ((nr ($nrow matrix)) (nc ($ncol matrix)) (n (* nr nc)) (mptr (fnv-float-foreign-pointer ($fnv matrix))) (mptrs (mapcar (lambda (m) (fnv-float-foreign-pointer ($fnv m))) matrices)) (x ($mx ($vx n) :nrow nr :ncol nc)) (xptr (fnv-float-foreign-pointer ($fnv x)))) (dotimes (i n) (setf (fnv-float-ptr-ref xptr i) (apply #'funcall function (fnv-float-ptr-ref mptr i) (mapcar (lambda (p) (fnv-float-ptr-ref p i)) mptrs)))) x) (let* ((nr ($nrow matrix)) (nc ($ncol matrix)) (n (* nr nc)) (mptr (fnv-float-foreign-pointer ($fnv matrix))) (x ($mx ($vx n) :nrow nr :ncol nc)) (xptr (fnv-float-foreign-pointer ($fnv x)))) (dotimes (i n) (setf (fnv-float-ptr-ref xptr i) (funcall function (fnv-float-ptr-ref mptr i)))) x))) (defun $map! (function matrix &rest matrices) (if matrices (let* ((nr ($nrow matrix)) (nc ($ncol matrix)) (n (* nr nc)) (mptr (fnv-float-foreign-pointer ($fnv matrix))) (mptrs (mapcar (lambda (m) (fnv-float-foreign-pointer ($fnv m))) matrices)) (x (car (last matrices))) (xptr (car (last mptrs)))) (dotimes (i n) (setf (fnv-float-ptr-ref xptr i) (apply #'funcall function (fnv-float-ptr-ref mptr i) (mapcar (lambda (p) (fnv-float-ptr-ref p i)) mptrs)))) x) (let* ((nr ($nrow matrix)) (nc ($ncol matrix)) (n (* nr nc)) (mptr (fnv-float-foreign-pointer ($fnv matrix))) (x matrix) (xptr mptr)) (dotimes (i n) (setf (fnv-float-ptr-ref xptr i) (funcall function (fnv-float-ptr-ref mptr i)))) x))) (defgeneric $iamax (m)) (defmethod $iamax ((n NUMBER)) nil) (defmethod $iamax ((m MX)) (let ((idx (1- (%isamax ($size m) ($fnv m) 1))) (nr ($nrow m))) (multiple-value-bind (div rem) (floor idx nr) (list idx (list rem div))))) (defgeneric $imax (m &key)) (defmethod $imax ((n NUMBER) &key) nil) (defmethod $imax ((m MX) &key axis) (cond ((null axis) (let* ((x ($ m 0 0)) (xi 0) (xj 0)) (loop :for j :from 0 :below ($ncol m) :do (loop :for i :from 0 :below ($nrow m) :do (when (> ($ m i j) x) (setf x ($ m i j)) (setf xi i xj j)))) (list xi xj))) ((eq axis :row) (let* ((nr ($nrow m)) (nc ($ncol m)) (nm ($m 0 nr 1))) (loop :for i :from 0 :below nr :do (setf ($ nm i 0) (let ((x ($ m i 0)) (xj 0)) (loop :for j :from 0 :below nc :do (when (> ($ m i j) x) (setf x ($ m i j)) (setf xj j))) (* 1.0 xj)))) nm)) ((eq axis :column) (let* ((nr ($nrow m)) (nc ($ncol m)) (nm ($m 0 1 nc))) (loop :for j :from 0 :below nc :do (setf ($ nm 0 j) (let ((x ($ m 0 j)) (xi 0)) (loop :for i :from 0 :below nr :do (when (> ($ m i j) x) (setf x ($ m i j)) (setf xi i))) (* 1.0 xi)))) nm)))) (defgeneric $imin (m &key)) (defmethod $imin ((n NUMBER) &key) nil) (defmethod $imin ((m MX) &key axis) (cond ((null axis) (let* ((x ($ m 0 0)) (xi 0) (xj 0)) (loop :for j :from 0 :below ($ncol m) :do (loop :for i :from 0 :below ($nrow m) :do (when (< ($ m i j) x) (setf x ($ m i j)) (setf xi i xj j)))) (list xi xj))) ((eq axis :row) (let* ((nr ($nrow m)) (nc ($ncol m)) (nm ($m 0 nr 1))) (loop :for i :from 0 :below nr :do (setf ($ nm i 0) (let ((x ($ m i 0)) (xj 0)) (loop :for j :from 0 :below nc :do (when (< ($ m i j) x) (setf x ($ m i j)) (setf xj j))) (* 1.0 xj)))) nm)) ((eq axis :column) (let* ((nr ($nrow m)) (nc ($ncol m)) (nm ($m 0 1 nc))) (loop :for j :from 0 :below nc :do (setf ($ nm 0 j) (let ((x ($ m 0 j)) (xi 0)) (loop :for i :from 0 :below nr :do (when (< ($ m i j) x) (setf x ($ m i j)) (setf xi i))) (* 1.0 xi)))) nm)))) (defun $argmax (m &key (axis :row)) (cond ((eq axis :row) ($imax m :axis :row)) (T ($imax m :axis :column)))) (defun $argmin (m &key (axis :row)) (cond ((eq axis :row) ($imin m :axis :row)) (T ($imin m :axis :column)))) (defgeneric $mean (m &key)) (defmethod $mean ((n NUMBER) &key) n) (defmethod $mean ((m MX) &key axis) (cond ((null axis) (/ ($sum m) ($size m))) ((eq axis :row) (let* ((nr ($nrow m)) (nc ($ncol m)) (nm ($m 0 nr 1))) (loop :for i :from 0 :below nr :do (setf ($ nm i 0) (/ (loop :for j :from 0 :below nc :sum ($ m i j)) nc))) nm)) ((eq axis :column) (let* ((nr ($nrow m)) (nc ($ncol m)) (nm ($m 0 1 nc))) (loop :for j :from 0 :below nc :do (setf ($ nm 0 j) (/ (loop :for i :from 0 :below nr :sum ($ m i j)) nr))) nm)))) (defun vofm (m nr nc p i j) (let ((im (- i p)) (jm (- j p))) (if (or (< im 0) (>= im nr) (< jm 0) (>= jm nc)) 0.0 ($ m 0 (+ (* im nr) jm))))) (defun $convolute-dim (nr nc fs &key (padding 0) (stride 1)) (let ((cr (1+ (/ (+ (- nr fs) (* 2 padding)) stride))) (cc (1+ (/ (+ (- nc fs) (* 2 padding)) stride)))) (list cr cc))) (defun $convolute (m nr nc f fs &key (b 0.0) (padding 0) (stride 1)) ;; m and f should be in the form of row vector (let ((cr (1+ (/ (+ (- nr fs) (* 2 padding)) stride))) (cc (1+ (/ (+ (- nc fs) (* 2 padding)) stride)))) (assert (and (integerp cr) (integerp cc)) nil "dimension mismatched") (when (and (integerp cr) (integerp cc)) (let* ((mr (+ nr (* 2 padding))) (mc (+ nc (* 2 padding))) (cm ($zeros 1 (* cr cc))) (fd (1- fs)) (bf (* 1.0 b))) (loop :for i :from 0 :below mr :by stride :while (< (+ i fd) mr) :do (loop :for j :from 0 :below mc :by stride :while (< (+ j fd) mc) :do (let ((e 0)) (loop :for ik :from 0 :below fs :do (loop :for jk :from 0 :below fs :do (let ((mv (vofm m nr nc padding (+ i ik) (+ j jk))) (fv (vofm f fs fs 0 ik jk))) (incf e (* mv fv))))) (setf ($ cm 0 (+ (* cc i) j)) (+ e bf))))) cm)))) (defun $conv2d (input w) (let* ((N1 ($nrow input)) (N2 ($ncol input)) (m ($nrow w)) (K1 (+ N1 (- m) 1)) (K2 (+ N2 (- m) 1)) (output ($zeros K1 K2))) (loop :for i :from 0 :below K1 :do (loop :for j :from 0 :below K2 :do (let ((m-1 (- m 1))) (setf ($ output i j) (loop :for a :from 0 :to m-1 :sum (loop :for b :from 0 :to m-1 :sum (* ($ w a b) ($ input (+ i a) (+ j b))))))))) output)) (defun $maxpool (input m) (let* ((N1 ($nrow input)) (N2 ($ncol input)) (K1 (+ N1 (- m) 1)) (K2 (+ N2 (- m) 1)) (output ($zeros K1 K2))) (loop :for i :from 0 :below K1 :do (loop :for j :from 0 :below K2 :do (let ((m-1 (- m 1))) (setf ($ output i j) (loop :for a :from 0 :to m-1 :maximize (loop :for b :from 0 :to m-1 :maximize ($ input (+ i a) (+ j b)))))))) output)) (defun $avgpool (input m) (let* ((N1 ($nrow input)) (N2 ($ncol input)) (K1 (+ N1 (- m) 1)) (K2 (+ N2 (- m) 1)) (1/m*m (/ 1.0 (* m m))) (output ($zeros K1 K2))) (loop :for i :from 0 :below K1 :do (loop :for j :from 0 :below K2 :do (let ((m-1 (- m 1))) (setf ($ output i j) (* 1/m*m (loop :for a :from 0 :to m-1 :sum (loop :for b :from 0 :to m-1 :sum ($ input (+ i a) (+ j b))))))))) output))
22,554
Common Lisp
.lisp
486
30.199588
99
0.382965
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
30ce52c1f0243cc13d05b544691620f659ba9012f765e80cdcae63cbabfa8674
27,294
[ -1 ]
27,295
optimizers.lisp
chunsj_mtx/optimizers.lisp
(in-package :mtx) (declaim (optimize (speed 3) (safety 0) (debug 1))) (defclass SGD (OPTIMIZER) ((lr :initarg :lr :initform 0.01))) (defun $sgd-optimizer (&key (lr 0.01)) (make-instance 'SGD :lr lr)) (defmethod update ((sgd SGD) params grads) (with-slots (lr) sgd (let ((alpha (* -1 lr))) (loop :for p :in params :for g :in grads :do ($axpy g p :alpha alpha))))) (defclass MOMENTUM (OPTIMIZER) ((lr :initarg :lr :initform 0.01) (m :initarg :m :initform 0.9) (vs :initform nil))) (defun $momentum-optimizer (&key (lr 0.01) (m 0.9)) (make-instance 'MOMENTUM :lr lr :m m)) (defmethod initialize-parameters ((mo MOMENTUM) params) (with-slots (vs) mo (dolist (p params) (setf (getf vs p) ($m 0 ($nrow p) ($ncol p)))))) (defmethod update ((mo MOMENTUM) params grads) (with-slots (lr vs m) mo (let ((alpha (* -1 lr))) (loop :for p :in params :for g :in grads :do (let ((v (getf vs p))) ($axpy g ($scal m v) :alpha alpha) ($axpy v p)))))) (defclass NESTEROV (OPTIMIZER) ((lr :initarg :lr :initform 0.01) (m :initarg :m :initform 0.9) (vs :initform nil))) (defun $nesterov-optimizer (&key (lr 0.01) (m 0.9)) (make-instance 'NESTEROV :lr lr :m m)) (defmethod initialize-parameters ((n NESTEROV) params) (with-slots (vs) n (dolist (p params) (setf (getf vs p) ($m 0 ($nrow p) ($ncol p)))))) (defmethod update ((n NESTEROV) params grads) (with-slots (lr m vs) n (let ((alpha (* -1.0 lr)) (m2 (* m m)) (m1 (* (- 1.0 m) (* -1.0 lr)))) (loop :for p :in params :for g :in grads :do (let ((v (getf vs p))) ($axpy g ($scal m v) :alpha alpha) ($axpy ($+ ($x m2 v) ($x m1 g)) p)))))) (defclass ADAGRAD (OPTIMIZER) ((lr :initarg :lr :initform 0.01) (hs :initform nil))) (defun $adagrad-optimizer (&key (lr 0.01)) (make-instance 'ADAGRAD :lr lr)) (defmethod initialize-parameters ((a ADAGRAD) params) (with-slots (hs) a (dolist (p params) (setf (getf hs p) ($m 0 ($nrow p) ($ncol p)))))) (defmethod update ((a ADAGRAD) params grads) (with-slots (lr hs) a (let ((alpha (* -1 lr))) (loop :for p :in params :for g :in grads :do (let ((h (getf hs p))) ($axpy ($x g g) h) ($axpy ($x ($map (lambda (v) (/ alpha (+ 1.0E-7 (sqrt v)))) h) g) p)))))) (defclass RMSPROP (OPTIMIZER) ((lr :initarg :lr :initform 0.01) (dr :initarg :dr :initform 0.99) (hs :initform nil))) (defun $rmsprop-optimizer (&key (lr 0.01) (dr 0.99)) (make-instance 'RMSPROP :lr lr :dr dr)) (defmethod initialize-parameters ((p RMSPROP) params) (with-slots (hs) p (dolist (p params) (setf (getf hs p) ($m 0 ($nrow p) ($ncol p)))))) (defmethod update ((p RMSPROP) params grads) (with-slots (lr dr hs) p (let ((alpha (* -1.0 lr)) (dr1 (- 1.0 dr))) (loop :for p :in params :for g :in grads :do (let ((h (getf hs p))) ($axpy ($x g g) ($scal dr h) :alpha dr1) ($axpy ($x ($map (lambda (v) (/ alpha (+ 1.0E-7 (sqrt v)))) h) g) p)))))) (defclass ADAM (OPTIMIZER) ((lr :initarg :lr :initform 0.001) (b1 :initarg :b1 :initform 0.9) (b2 :initarg :b2 :initform 0.999) (it :initform 0) (ms :initform nil) (vs :initform nil))) (defun $adam-optimizer (&key (lr 0.001) (b1 0.9) (b2 0.999)) (make-instance 'ADAM :lr lr :b1 b1 :b2 b2)) (defmethod initialize-parameters ((a ADAM) params) (with-slots (ms vs) a (dolist (p params) (setf (getf ms p) ($m 0 ($nrow p) ($ncol p))) (setf (getf vs p) ($m 0 ($nrow p) ($ncol p)))))) (defmethod update ((a ADAM) params grads) (with-slots (lr b1 b2 it ms vs) a (let ((alpha (* -1 lr)) (alphat nil)) (setf it (1+ it)) (setf alphat (/ (* alpha (sqrt (- 1.0 (expt b2 it)))) (- 1.0 (expt b1 it)))) (loop :for p :in params :for g :in grads :do (let ((m (getf ms p)) (v (getf vs p))) ($axpy ($x (- 1.0 b1) ($- g m)) m) ($axpy ($x (- 1.0 b2) ($- ($expt g 2) v)) v) ($axpy ($map (lambda (mv vv) (/ (* alphat mv) (+ 1.0E-7 vv))) m v) p))))))
4,203
Common Lisp
.lisp
106
33.839623
89
0.551682
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
19fe7dad2ef16ff19a121d4e6e258b6d2e9ab1a683094a87e81331acc0e2f01a
27,295
[ -1 ]
27,296
mnist.lisp
chunsj_mtx/mnist.lisp
(in-package :mtx) (declaim (optimize (speed 3) (safety 0) (debug 1))) (defparameter +idx-types+ '((#x08 (unsigned-byte 8) 1) (#x09 (signed-byte 8) 1) ;;(#x0B (unsigned-byte 4)) (#x0C (signed-byte 32) 4) (#x0D single-float 4) (#x0E double-float 8))) (defun read-nbyte (n str) (let ((ret 0)) (loop :repeat n :do (setf ret (logior (ash ret 8) (read-byte str)))) ret)) (defun read-single-image-into-m (m idx s nrow ncol &optional (normalize nil)) (let* ((sz (* nrow ncol))) (dotimes (i sz) (let* ((v (read-byte s)) (rv (if normalize (/ v 255.0) (* 1.0 v)))) (setf ($ m idx i) rv))))) (defun read-single-label-into-m (m idx byte onehot?) (if onehot? (setf ($ m idx byte) 1.0) (setf ($ m idx 0) (coerce byte 'single-float)))) (defun read-mnist-images (fname &key (normalize nil) (verbose nil)) (with-open-file (str fname :element-type '(unsigned-byte 8)) (assert (loop :repeat 2 :always (= #x00 (read-byte str))) nil "magic numbers not matched") (let* ((type-tag (read-byte str)) (tagdata (cdr (assoc type-tag +idx-types+))) (dtype (car tagdata)) (nbytes (cadr tagdata)) (metadata (loop :repeat (read-byte str) :collect (read-nbyte 4 str))) (ndata (car metadata)) (nrow (cadr metadata)) (ncol (caddr metadata)) (m ($m 0 ndata (* nrow ncol)))) (when verbose (format T "~%TYPE: ~A NBYTES: ~A~%" dtype nbytes) (format T "NDATA: ~A NROW: ~A NCOL: ~A~%" ndata nrow ncol)) (loop :for i :from 0 :below ndata :do (read-single-image-into-m m i str nrow ncol normalize)) m))) (defun read-mnist-labels (fname &key (verbose nil) (onehot nil)) (with-open-file (str fname :element-type '(unsigned-byte 8)) (assert (loop :repeat 2 :always (= #x00 (read-byte str))) nil "magic numbers not matched") (let* ((type-tag (read-byte str)) (tagdata (cdr (assoc type-tag +idx-types+))) (dtype (car tagdata)) (nbytes (cadr tagdata)) (metadata (loop :repeat (read-byte str) :collect (read-nbyte 4 str))) (ndata (car metadata)) (m (if onehot ($m 0 ndata 10) ($m 0 ndata 1)))) (when verbose (format T "~%TYPE: ~A NBYTES: ~A~%" dtype nbytes) (format T "NDATA: ~A~%" ndata)) (loop :for i :from 0 :below ndata :do (read-single-label-into-m m i (read-byte str) onehot)) m))) (defun read-mnist-train-images (&key (path "/Users/Sungjin/MNIST") (normalize nil) (verbose nil)) (read-mnist-images ($str path "/train-images-idx3-ubyte") :normalize normalize :verbose verbose)) (defun read-mnist-train-labels (&key (path "/Users/Sungjin/MNIST") (verbose nil) (onehot nil)) (read-mnist-labels ($str path "/train-labels-idx1-ubyte") :onehot onehot :verbose verbose)) (defun read-mnist-t10k-images (&key (path "/Users/Sungjin/MNIST") (normalize nil) (verbose nil)) (read-mnist-images ($str path "/t10k-images-idx3-ubyte") :normalize normalize :verbose verbose)) (defun read-mnist-t10k-labels (&key (path "/Users/Sungjin/MNIST") (onehot nil) (verbose nil)) (read-mnist-labels ($str path "/t10k-labels-idx1-ubyte") :onehot onehot :verbose verbose)) (defun read-mnist-data (&key (path "/Users/Sungjin/MNIST") (normalize T) (onehot T)) (list :train-images (read-mnist-train-images :path path :normalize normalize) :train-labels (read-mnist-train-labels :path path :onehot onehot) :test-images (read-mnist-t10k-images :path path :normalize normalize) :test-labels (read-mnist-t10k-labels :path path :onehot onehot)))
3,823
Common Lisp
.lisp
80
39.8
97
0.597963
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
d705d71309d1c42242b97d4042ba70e50b800a6a0d698bac8ec83942105baa4c
27,296
[ -1 ]
27,297
utils.lisp
chunsj_mtx/utils.lisp
(in-package :mtx) (declaim (optimize (speed 3) (safety 0) (debug 1))) (defmacro println (&body body) `(print ,@body)) (defun $iota (n &key (start 0) (step 1)) (alexandria:iota n :start start :step step)) (defun $shuffle (sequence) (map-into sequence #'car (sort (map 'vector (lambda (x) (cons x (random 1D0))) sequence) #'< :key #'cdr))) (defun $partition (list cell-size) (loop :for cell :on list :by (lambda (list) (nthcdr cell-size list)) :collecting (subseq cell 0 cell-size))) (defun $linspace (from to length &key (endpoint T)) (let ((step (/ (- to from) (if endpoint (1- length) length)))) ($m (loop :for i :from 0 :below length :collect (coerce (+ from (* i step)) 'double-float))))) (defmacro @> (initial-form &rest forms) (let ((output-form initial-form) (remaining-forms forms)) (loop while remaining-forms do (let ((current-form (car remaining-forms))) (if (listp current-form) (setf output-form (cons (car current-form) (cons output-form (cdr current-form)))) (setf output-form (list current-form output-form)))) (setf remaining-forms (cdr remaining-forms))) output-form)) (defmacro @>> (initial-form &rest forms) (let ((output-form initial-form) (remaining-forms forms)) (loop while remaining-forms do (let ((current-form (car remaining-forms))) (if (listp current-form) (setf output-form (cons (car current-form) (append (cdr current-form) (list output-form)))) (setf output-form (list current-form output-form)))) (setf remaining-forms (cdr remaining-forms))) output-form)) (defun $str (&rest args) (if args (reduce (lambda (s0 s) (concatenate 'string (cond ((stringp s0) s0) (T (write-to-string s0))) (cond ((stringp s) s) (T (write-to-string s))))) args :initial-value "") "")) (defun mkkw (s &optional (idx nil)) (if idx (intern ($str (string-upcase s) idx) "KEYWORD") (intern (string-upcase s) "KEYWORD")))
2,294
Common Lisp
.lisp
56
31.625
70
0.562837
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
324992011f7f49f2e08396447aef3daf781f20621704b88f7c6105db93848a98
27,297
[ -1 ]
27,298
nn.lisp
chunsj_mtx/nn.lisp
(in-package :mtx) (declaim (optimize (speed 3) (safety 0) (debug 1))) (defclass SNN (NEURALNETWORK) ((layers :initform nil) (rlayers :initform nil) (errlayer :initform nil) (optimizer :initform nil))) (defun $snn (lyrs &key (el ($mse-layer)) (o ($sgd-optimizer :lr 0.01))) (let ((nw (make-instance 'SNN))) (with-slots (layers rlayers errlayer optimizer) nw (setf layers lyrs) (setf rlayers (reverse layers)) (setf errlayer el) (setf optimizer o) (let ((params nil)) (dolist (l layers) (setf params (append params (parameters l)))) (initialize-parameters optimizer params))) nw)) (defmethod predict ((nw SNN) &key xs train) (with-slots (layers) nw (let ((ys xs)) (dolist (l layers) (setf ys (forward-propagate l :xs ys :train train))) ys))) (defmethod loss ((nw SNN) &key xs ts) (with-slots (errlayer layers wdl) nw (let ((ys (predict nw :xs xs :train T)) (wd 0.0)) (dolist (l layers) (incf wd (regularization l))) ($+ (forward-propagate errlayer :ys ys :ts ts) wd)))) (defmethod gradient ((nw SNN) &key xs ts) (with-slots (errlayer rlayers) nw (loss nw :xs xs :ts ts) (let ((dout (backward-propagate errlayer))) (dolist (l rlayers) (setf dout (backward-propagate l :d dout)))))) (defmethod train ((nw SNN) &key xs ts) (with-slots (layers optimizer) nw (gradient nw :xs xs :ts ts) (dolist (l layers) (optimize-parameters l :o optimizer))))
1,517
Common Lisp
.lisp
42
30.880952
72
0.628747
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
dc9fe3f902831a51a88ba3f87a9c71454baa934ec1517c0fcbbd357f57f8006b
27,298
[ -1 ]
27,299
matrix.lisp
chunsj_mtx/matrix.lisp
(in-package :mtx) (declaim (optimize (speed 3) (safety 0) (debug 1))) (defun $vx (n &key (initial-value 0.0)) (make-fnv-float n :initial-value initial-value)) (defmethod $count ((s FNV-FLOAT)) (fnv-length s)) (defmacro $ref (v i) `(fnv-float-ref ,v ,i)) (defmacro $prf (p i) `(fnv-float-ptr-ref ,p ,i)) (defclass MX () ((fnv :initarg :fnv :accessor $fnv :initform nil) (nrows :initarg :nrow :accessor $nrow :initform 0) (ncols :initarg :ncol :accessor $ncol :initform 0))) (defgeneric $ptr (m)) (defmethod $ptr ((v FNV-FLOAT)) (fnv-float-foreign-pointer v)) (defmethod $ptr ((m MX)) (fnv-float-foreign-pointer ($fnv m))) (defgeneric $size (m)) (defmethod $size ((n NUMBER)) 1) (defmethod $size ((v FNV-FLOAT)) ($count v)) (defmethod $size ((m MX)) ($count ($fnv m))) (defgeneric $dim (m)) (defmethod $dim ((n NUMBER)) nil) (defmethod $dim ((v FNV-FLOAT)) (list ($size v))) (defmethod $dim ((m MX)) (list ($nrow m) ($ncol m))) (defun $matrix? (m) (and (typep m 'MX) (and (/= 1 ($nrow m)) (/= 1 ($ncol m))))) (defun $vector? (m) (and (typep m 'MX) (or (= 1 ($nrow m)) (= 1 ($ncol m))))) (defun $row-vector? (m) (and (typep m 'MX) (= 1 ($nrow m)))) (defun $column-vector? (m) (and (typep m 'MX) (= 1 ($ncol m)))) (defun $scalar? (m) (and (= 1 ($nrow m)) (= 1 ($ncol m)))) (defun ->scalar (m) (if ($scalar? m) ($ref ($fnv m) 0) m)) (defun $reshape (m nrow ncol) (let ((nm ($zeros nrow ncol)) (tm ($fnv ($transpose m)))) (dotimes (i nrow) (dotimes (j ncol) (setf ($ nm i j) ($ref tm (+ (* i ncol) j))))) nm)) (defun $rowv (m) ($reshape m 1 ($size m))) (defun $colv (m) ($reshape m ($size m) 1)) (defmethod print-object ((m MX) stream) (let* ((nr0 ($nrow m)) (nc0 ($ncol m)) (nr nr0) (nc nc0) (col-truncated? nil) (row-truncated? nil) (maxn 8) (halfn (/ maxn 2))) (when (> nr maxn) (setf row-truncated? T) (setf nr maxn)) (when (> nc maxn) (setf col-truncated? T) (setf nc maxn)) (format stream "MX[~A x ~A] : ~%" nr0 nc0) (loop :for i :from 0 :below nr :do (let ((i (if (and row-truncated? (>= i halfn)) (- nr0 (- maxn i)) i))) (format stream "") (loop :for j :from 0 :below nc :do (let ((j (if (and col-truncated? (>= j halfn)) (- nc0 (- maxn j)) j))) (if (< j (1- nc0)) (if (and col-truncated? (= j (- nc0 halfn))) (format stream " ··· ~10,2E " ($ref ($fnv m) (+ i (* nr0 j)))) (format stream "~10,2E " ($ref ($fnv m) (+ i (* nr0 j))))) (format stream "~10,2E" ($ref ($fnv m) (+ i (* nr0 j))))))) (if (and row-truncated? (= i (1- halfn))) (format stream "~%~% ···~%~%") (format stream "~%")))))) (declaim (inline make-vx-from-seq)) (defun make-vx-from-seq (s r c) (let* ((v ($vx (length s))) (pv ($ptr v))) (dotimes (j c) (dotimes (i r) (setf ($prf pv (+ (* r j) i)) (* 1.0 (elt s (+ (* c i) j)))))) v)) (declaim (inline $mx)) (defun $mx (values &key (nrow nil) (ncol nil)) (cond ((typep values 'NUMBER) (make-instance 'MX :fnv ($vx (* nrow ncol) :initial-value values) :nrow 1 :ncol 1)) ((or (typep values 'ARRAY) (typep values 'LIST)) (make-instance 'MX :fnv (make-vx-from-seq values nrow ncol) :nrow nrow :ncol ncol)) ((typep values 'FNV-FLOAT) (make-instance 'MX :fnv values :nrow nrow :ncol ncol)))) (declaim (inline build-mx)) (defun build-mx (seq) (let ((e (elt seq 0))) (cond ((or (typep e 'LIST) (typep e 'ARRAY)) (let* ((nr (length seq)) (nc (length e)) (vs ($vx (* nr nc))) (vp ($ptr vs))) (dotimes (j nc) (dotimes (i nr) (setf ($prf vp (+ (* nr j) i)) (* 1.0 (elt (elt seq i) j))))) ($mx vs :nrow nr :ncol nc))) ((typep e 'FNV-FLOAT) (let* ((nr (length seq)) (nc ($count e)) (vs ($vx (* nr nc))) (vp ($ptr vs))) (dotimes (j nc) (dotimes (i nr) (setf ($prf vp (+ (* nr j) i)) ($ref (elt seq i) j)))) ($mx vs :nrow nr :ncol nc))) ((typep e 'NUMBER) ($mx seq :nrow 1 :ncol ($count seq)))))) (defun $m (data &optional (d0 nil) (d1 nil)) (cond ((typep data 'MX) data) ((and (typep data 'NUMBER) d0 d1) ($mx ($vx (* d0 d1) :initial-value (* 1.0 data)) :nrow d0 :ncol d1)) ((typep data 'NUMBER) ($mx ($vx 1 :initial-value data) :nrow 1 :ncol 1)) ((and (or (typep data 'LIST) (typep data 'ARRAY)) (eq d0 nil) (eq d1 nil)) (build-mx data)) ((and (or (typep data 'LIST) (typep data 'ARRAY)) d0 d1) ($mx data :nrow d0 :ncol d1)) ((and (typep data 'FNV-FLOAT) d0) ($mx data :nrow (/ ($count data) d0) :ncol d0)) ((and (or (typep data 'LIST) (typep data 'ARRAY)) d0) ($mx data :nrow (/ ($count data) d0) :ncol d0)))) (defun $rvx (n) (let ((vs ($vx n))) (loop :for i :from 0 :below n :do (setf ($ref vs i) (random 1.0))) vs)) (defun randn () (* (sqrt (* -2.0 (log (- 1.0 (random 1.0))))) (cos (* 2.0 PI (random 1.0))))) (defun $rnvx (n) (let ((vs ($vx n))) (loop :for i :from 0 :below n :do (setf ($ref vs i) (randn))) vs)) (defun $r (&optional d0 d1) (cond ((and (eq d0 nil) (eq d1 nil)) (random 1.0)) ((and d0 (eq d1 nil)) ($mx ($rvx d0) :nrow 1 :ncol d0)) ((and d0 d1) ($mx ($rvx (* d0 d1)) :nrow d0 :ncol d1)))) (defun $rn (&optional d0 d1) (cond ((and (eq d0 nil) (eq d1 nil)) (randn)) ((and d0 (eq d1 nil)) ($mx ($rnvx d0) :nrow 1 :ncol d0)) ((and d0 d1) ($mx ($rnvx (* d0 d1)) :nrow d0 :ncol d1)))) (defun $ones (&optional d0 d1) (cond ((and (eq d0 nil) (eq d1 nil)) 1.0) ((and d0 (eq d1 nil)) ($mx (loop :for i :from 0 :below d0 :collect 1.0) :nrow 1 :ncol d0)) ((and d0 d1) ($mx (loop :for i :from 0 :below (* d0 d1) :collect 1.0) :nrow d0 :ncol d1)))) (defun $zeros (&optional d0 d1) (cond ((and (eq d0 nil) (eq d1 nil)) 0.0) ((and d0 (eq d1 nil)) ($mx (loop :for i :from 0 :below d0 :collect 0.0) :nrow 1 :ncol d0)) ((and d0 d1) ($mx (loop :for i :from 0 :below (* d0 d1) :collect 0.0) :nrow d0 :ncol d1)))) (defun $ (m &optional (i T) (j T)) (cond ((not (typep m 'mx)) nil) ((and (eq i T) (eq j T)) m) ((and (eq i T) (numberp j)) (let* ((nr ($nrow m)) (r ($m 0 nr 1)) (mvs ($ptr m)) (rvs ($ptr m))) (dotimes (ii nr) (setf ($prf rvs ii) ($prf mvs (+ (* nr j) ii)))) r)) ((and (numberp i) (eq j T)) (let* ((nc ($ncol m)) (nr ($nrow m)) (r ($m 0 1 nc)) (mvs ($ptr m)) (rvs ($ptr r))) (dotimes (jj nc) (setf ($prf rvs jj) ($prf mvs (+ i (* nr jj))))) r)) ((and (numberp i) (numberp j)) (let* ((nr ($nrow m)) (mvs ($ptr m))) ($prf mvs (+ i (* nr j))))))) (defun $setv (m nv &optional (i T) (j T)) (cond ((and (eq i T) (eq j T)) (cond ((numberp nv) (let ((sz ($size m)) (vs ($ptr m))) (dotimes (i sz) (setf ($prf vs i) (* 1.0 nv))) m)) ((and (typep nv 'MX) (= ($nrow m) ($nrow nv)) (= ($ncol m) ($ncol nv))) ($copy nv m) m))) ((and (eq i T) (numberp j)) (cond ((numberp nv) (let ((mvs ($ptr m)) (nrm ($nrow m))) (dotimes (ii nrm) (setf ($prf mvs (+ (* nrm j) ii)) (* 1.0 nv))))) ((and (typep nv 'MX) (= ($nrow m) ($nrow nv)) ($vector? nv)) (let ((mvs ($ptr m)) (nrm ($nrow m)) (nvs ($ptr nv))) (dotimes (ii nrm) (setf ($prf mvs (+ (* nrm j) ii)) ($prf nvs ii))))))) ((and (numberp i) (eq j T)) (cond ((numberp nv) (let ((mvs ($ptr m)) (nrm ($nrow m)) (ncm ($ncol m))) (dotimes (jj ncm) (setf ($prf mvs (+ (* nrm jj) i)) (* 1.0 nv))))) ((and (typep nv 'MX) (= ($ncol m) ($ncol nv)) ($vector? nv)) (let ((mvs ($ptr m)) (nrm ($nrow m)) (ncm ($ncol m)) (nvs ($ptr nv))) (dotimes (jj ncm) (setf ($prf mvs (+ (* nrm jj) i)) ($prf nvs jj))))))) ((and (numberp i) (numberp j)) (let* ((nr ($nrow m)) (mvs ($ptr m))) (setf ($prf mvs (+ i (* nr j))) (* 1.0 nv)))))) (defsetf $ (m i j) (v) `($setv ,m ,v ,i ,j)) (defun $eye (&optional n) (cond ((null n) 1.0) ((= n 1) ($ones 1 1)) (T (let ((zm ($zeros n n))) (dotimes (i n) (setf ($ zm i i) 1.0)) zm)))) (defun $rows (m &optional indices) (if indices (let* ((nc ($ncol m)) (nr ($count indices)) (nm ($m 0 nr nc))) (loop :for i :from 0 :below nr :do (setf ($ nm i T) ($ m (elt indices i) T))) nm) m)) (defun $cols (m &optional indices) (if indices (let* ((nc ($count indices)) (nr ($nrow m)) (nm ($m 0 nr nc))) (loop :for j :from 0 :below nc :do (setf ($ nm T j) ($ m T (elt indices j)))) nm) m)) (declaim (inline transpose-on)) (defun transpose-on (m nm) (let* ((nrm ($nrow m)) (ncm ($ncol m)) (mv ($fnv m)) (nv ($fnv nm))) (dotimes (j ncm) (dotimes (i nrm) (setf ($ref nv (+ (* ncm i) j)) ($ref mv (+ (* nrm j) i))))) nm)) (defgeneric $transpose (m)) (defmethod $transpose ((n NUMBER)) n) (defmethod $transpose ((m MX)) (transpose-on m ($m 0 ($ncol m) ($nrow m)))) (defun $sm (m i0 j0 nr nc &optional as-vector) (cond ((null as-vector) (let ((nm ($zeros nr nc))) (dotimes (j nc) (dotimes (i nr) (setf ($ nm i j) ($ m (+ i0 i) (+ j0 j))))) nm)) (as-vector (let ((nm ($zeros 1 (* nr nc)))) (dotimes (j nc) (dotimes (i nr) (setf ($ nm 0 (+ (+ (* i nc) j))) ($ m (+ i0 i) (+ j0 j))))) nm)))) (defun $rot180 (m) (let* ((nr ($nrow m)) (nc ($ncol m)) (nm ($zeros nr nc))) (loop :for i :from 0 :below nr :do (loop :for j :from 0 :below nc :do (setf ($ nm i j) ($ m (- nr i 1) (- nc j 1))))) nm))
13,400
Common Lisp
.lisp
271
30.845018
101
0.365082
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
4e93b001dfe25bfe24aa95335114b6f3f8c70fb1c939f71e5b77ae13db71806d
27,299
[ -1 ]
27,300
funcs.lisp
chunsj_mtx/funcs.lisp
(in-package :mtx) (declaim (optimize (speed 3) (safety 0) (debug 1))) (defgeneric $round (m)) (defmethod $round ((n NUMBER)) (* 1.0 (round n))) (defmethod $round ((m MX)) ($map (lambda (v) (* 1.0 (round v))) m)) (defgeneric $exp (m)) (defmethod $exp ((n NUMBER)) (exp n)) (defmethod $exp ((m MX)) ($map #'exp m)) (defgeneric $log (m)) (defmethod $log ((n NUMBER)) (log n)) (defmethod $log ((m MX)) ($map #'log m)) (defgeneric $log10 (m)) (defmethod $log10 ((n NUMBER)) (log n 10)) (defmethod $log10 ((m MX)) ($map (lambda (v) (log v 10)) m)) (defgeneric $expt (m n)) (defmethod $expt ((m NUMBER) n) (expt m n)) (defmethod $expt ((m MX) n) ($map (lambda (v) (expt v n)) m)) (defgeneric $sqrt (m)) (defmethod $sqrt ((n NUMBER)) (sqrt n)) (defmethod $sqrt ((m MX)) ($map #'sqrt m)) (defgeneric $sigmoid (m)) (defmethod $sigmoid ((n NUMBER)) (/ 1.0 (+ 1.0 (exp (- n))))) ;;(defmethod $sigmoid ((m MX)) ($map! (lambda (v) (/ 1.0 (+ 1.0 (exp (- v))))) ($dup m))) ;; trying to avoid overflow (defmethod $sigmoid ((m MX)) ($map! (lambda (v) (* 0.5 (+ 1.0 (tanh (* 0.5 v))))) ($dup m))) (defgeneric $sigmoid! (m)) (defmethod $sigmoid! ((m MX)) ($map! (lambda (v) (* 0.5 (+ 1.0 (tanh (* 0.5 v))))) m)) (defgeneric $sin (m)) (defmethod $sin ((n NUMBER)) (sin n)) (defmethod $sin ((m MX)) ($map #'sin m)) (defgeneric $cos (m)) (defmethod $cos ((n NUMBER)) (cos n)) (defmethod $cos ((m MX)) ($map #'cos m)) (defgeneric $tan (m)) (defmethod $tan ((n NUMBER)) (tan n)) (defmethod $tan ((m MX)) ($map #'tan m)) (defgeneric $sinh (m)) (defmethod $sinh ((n NUMBER)) (sinh n)) (defmethod $sinh ((m MX)) ($map #'sinh m)) (defgeneric $cosh (m)) (defmethod $cosh ((n NUMBER)) (cosh n)) (defmethod $cosh ((m MX)) ($map #'cosh m)) (defgeneric $tanh (m)) (defmethod $tanh ((n NUMBER)) (tanh n)) (defmethod $tanh ((m MX)) ($map #'tanh m)) (defgeneric $asin (m)) (defmethod $asin ((n NUMBER)) (asin n)) (defmethod $asin ((m MX)) ($map #'asin m)) (defgeneric $acos (m)) (defmethod $acos ((n NUMBER)) (acos n)) (defmethod $acos ((m MX)) ($map #'acos m)) (defgeneric $atan (m)) (defmethod $atan ((n NUMBER)) (atan n)) (defmethod $atan ((m MX)) ($map #'atan m)) (defgeneric $softmax (m &key)) (defmethod $softmax ((n NUMBER) &key) n) (defmethod $softmax ((m MX) &key (axis :row)) (let* ((mx ($max m :axis axis)) (exp-m ($exp ($- m mx))) (sum-exp-m ($sum exp-m :axis axis)) (y ($/ exp-m sum-exp-m))) y)) (defgeneric $relu (m)) (defmethod $relu ((n NUMBER)) (max 0 n)) (defmethod $relu ((m MX)) ($map (lambda (v) (max 0 v)) m)) (defgeneric $relu! (m)) (defmethod $relu! ((m MX)) ($map! (lambda (v) (max 0 v)) m)) (defgeneric $lkyrelu (m &key)) (defmethod $lkyrelu ((n NUMBER) &key (lky 0.01)) (if (plusp n) n (* lky n))) (defmethod $lkyrelu ((m MX) &key (lky 0.01)) ($map (lambda (n) (if (plusp n) n (* lky n))) m)) (defgeneric $lkyrelu! (m &key)) (defmethod $lkyrelu! ((m MX) &key (lky 0.01)) ($map! (lambda (n) (if (plusp n) n (* lky n))) m)) (defun $mse (yv tv) ($x (/ 1.0 ($nrow yv)) ($sum ($expt ($- yv tv) 2)))) (defun $cee (yv tv) (let ((delta 1.0E-7) (batch-size ($nrow yv))) ($x (/ -1.0 batch-size) ($sum ($log ($+ delta ($sum ($x yv tv) :axis :row)))))))
3,228
Common Lisp
.lisp
78
39.166667
96
0.57893
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
5e7376f593874dc23f41253edb55dce0b985798750bd7edc1f86996365831281
27,300
[ -1 ]
27,301
nnbs.lisp
chunsj_mtx/nnbs.lisp
(in-package :mtx) (declaim (optimize (speed 3) (safety 0) (debug 1))) (defclass LAYER () ()) (defgeneric forward-propagate (layer &key) (:documentation "returns the result from the layer; generally :xs is input key")) (defgeneric backward-propagate (layer &key) (:documentation "returns computed delta of the layer; generally with previous delta of :d")) (defgeneric optimize-parameters (layer &key o) (:documentation "updates parameters using given optimizer")) (defgeneric regularization (layer) (:documentation "returns computed regularization value to avoid overfitting")) (defgeneric parameters (layer) (:documentation "returns the list of parameters of the layer")) ;; dummy, base implementation (defmethod forward-propagate ((l LAYER) &key)) (defmethod backward-propagate ((l LAYER) &key)) (defmethod optimize-parameters ((l LAYER) &key o) (declare (ignore o))) (defmethod regularization ((l LAYER)) 0.0) (defmethod parameters ((l LAYER)) nil) (defclass OPTIMIZER () ()) (defgeneric initialize-parameters (optimizer params) (:documentation "prepares internal data for given parameters")) (defgeneric update (optimizer params gradients) (:documentation "updates parameters with gradient information; updates should be in-place ones")) (defmethod initialize-parameters ((o OPTIMIZER) params) (declare (ignore params))) (defclass NEURALNETWORK () ()) (defgeneric predict (network &key) (:documentation "returns result of forward propagations of layers")) (defgeneric loss (network &key) (:documentation "returns computed error")) (defgeneric gradient (network &key) (:documentation "computes gradients of parameters using backward propagation")) (defgeneric train (network &key) (:documentation "updates parameters to have improved values for better fit; single step"))
1,805
Common Lisp
.lisp
34
51.176471
99
0.774688
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
7e7458e307ecba4a7e64e43f088446d665b67dda672c35c93fd0c87c96b9d6c4
27,301
[ -1 ]
27,302
synthgr.lisp
chunsj_mtx/scratch/synthgr.lisp
(in-package :mtx) ;; https://iamtrask.github.io/2017/03/21/synthetic-gradients/ (defun binary-list (n &optional acc) (cond ((zerop n) (or acc (list 0))) ((plusp n) (binary-list (ash n -1) (cons (logand 1 n) acc))) (t (error "~S: non-negative argument required, got ~s" 'binary-list n)))) (defun zeros-list (n) (loop :for i :from 0 :below n :collect 0)) (defun ->binary (n sz) (let ((l0 (binary-list n))) (append (zeros-list (- sz ($count l0))) l0))) (defun ->decimal (l) (let ((n ($count l))) (loop :for i :from 0 :below n :sum (* (elt l i) (expt 2 (- n (1+ i))))))) (defun generate-dataset (&key (dim 8) (num 1000)) (let* ((sample-size num) (num-dim dim) (bn (expt 2 (1- num-dim))) (X ($m 0 sample-size (* 2 num-dim))) (y ($m 0 sample-size num-dim))) (loop :for i :from 0 :below sample-size :do (let* ((x0int (random bn)) (x1int (random bn)) (yint (+ x0int x1int))) (setf ($ X i T) ($m (append (->binary x0int num-dim) (->binary x1int num-dim)))) (setf ($ y i T) ($m (->binary yint num-dim))))) (list :x X :y y))) (let* ((num-samples 100) (output-dim 8) (dataset (generate-dataset :dim output-dim :num num-samples)) (X (getf dataset :x)) (y (getf dataset :y)) (o ($adagrad-optimizer :lr 0.08)) (layers (list ($affine-layer (* 2 output-dim) 128 :winit :xavier) ($sigmoid-layer) ($affine-layer 128 64) ($sigmoid-layer) ($affine-layer 64 output-dim))) (n ($snn layers :el ($mse-layer) :o o)) (ntr 2000)) (print ($str "INITIAL: " ($round (predict n :xs X)))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($round (predict n :xs X)))) (print ($str "TRUE: " ($round y))) (print ($str "LOSS: " ($mse ($round (predict n :xs X)) y))) (print ($str "LSST: " ($mse y y)))) (let* ((num-samples 100) (output-dim 8) (dataset (generate-dataset :dim output-dim :num num-samples)) (X (getf dataset :x)) (y (getf dataset :y)) (o ($adagrad-optimizer :lr 0.04)) (layers (list ($affine-layer (* 2 output-dim) 128 :winit :xavier) ($tanh-layer) ($affine-layer 128 64) ($tanh-layer) ($affine-layer 64 output-dim))) (n ($snn layers :el ($mse-layer) :o o)) (ntr 2000)) (print ($str "INITIAL: " ($round (predict n :xs X)))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($round (predict n :xs X)))) (print ($str "TRUE: " ($round y))) (print ($str "LOSS: " ($mse ($round (predict n :xs X)) y))) (print ($str "LSST: " ($mse y y)))) (let* ((num-samples 100) (output-dim 8) (dataset (generate-dataset :dim output-dim :num num-samples)) (X (getf dataset :x)) (y (getf dataset :y)) (o ($adagrad-optimizer :lr 0.005)) (layers (list ($affine-layer (* 2 output-dim) 128 :winit :he) ($lkyrelu-layer :lky 0.001) ($affine-layer 128 64 :winit :he) ($lkyrelu-layer :lky 0.001) ($affine-layer 64 output-dim))) (n ($snn layers :el ($mse-layer) :o o)) (ntr 2000)) (print ($str "INITIAL: " ($round (predict n :xs X)))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($round (predict n :xs X)))) (print ($str "TRUE: " ($round y))) (print ($str "LOSS: " ($mse ($round (predict n :xs X)) y))) (print ($str "LSST: " ($mse y y))))
3,662
Common Lisp
.lisp
85
34.905882
89
0.52046
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
289c0790123bc2a34e30012b7fb44d51747150eb72bc35d3b5d30ca638c6c706
27,302
[ -1 ]
27,303
conv.lisp
chunsj_mtx/scratch/conv.lisp
(in-package :mtx) (let* ((m ($m '(0 1 2 3 4 5 6 7 8 9 10 11))) (f ($m '(1 0 1 2 1 2 3 2 3)))) ($convolute m 4 4 f 3 :b 0.0)) (defparameter *mnist* (read-mnist-data)) (let* ((m ($m '((1 2 3 0) (0 1 2 3) (3 0 1 2) (2 3 0 1)))) (pm ($ptr m)) (mh ($nrow m)) (mw ($ncol m)) (f ($m '((2 0 1) (0 1 2) (1 0 2)))) (pf ($ptr f)) (fw ($ncol f)) (fh ($nrow f)) (stride 1) (padding 0) (ch (1+ (/ (+ (- mh fh) (* 2 padding)) stride))) (cw (1+ (/ (+ (- mw fw) (* 2 padding)) stride))) (cm ($m 0 1 (* ch cw fh fw))) (pcm ($ptr cm)) (n 0)) (list pm pf) (time (dotimes (kkk 1000) (setf n 0) (loop :for i :from 0 :by stride :below ch :do (loop :for j :from 0 :by stride :below cw :do (let* ((sm ($sm m i j fh fw)) (psm ($ptr sm)) (l (* n (* fh fw)))) ;;(print ($fnv sm)) (dotimes (k (* fh fw)) (setf ($prf pcm (+ k l)) ($prf psm k))) ;;(print ($sm cm 0 l 1 (* fh fw))) (incf n)))))) cm) (defun $mkcl (m nr nc fs &key (padding 0) (stride 1)) ;; m and f should be in the form of row vector (let ((cr (1+ (/ (+ (- nr fs) (* 2 padding)) stride))) (cc (1+ (/ (+ (- nc fs) (* 2 padding)) stride)))) (assert (and (integerp cr) (integerp cc)) nil "dimension mismatched") (when (and (integerp cr) (integerp cc)) (let* ((mr (+ nr (* 2 padding))) (mc (+ nc (* 2 padding))) (fd (1- fs)) (cl ($zeros 1 (* fs fs cr cc))) (cli 0)) (loop :for i :from 0 :below mr :by stride :while (< (+ i fd) mr) :do (loop :for j :from 0 :below mc :by stride :while (< (+ j fd) mc) :do (loop :for ik :from 0 :below fs :do (loop :for jk :from 0 :below fs :do (let ((mv (vofm m nr nc padding (+ i ik) (+ j jk)))) (setf ($ cl 0 cli) mv) (incf cli)))))) cl)))) (defun im2cl (m fh fw stride padding) (let* ((mh ($nrow m)) (mw ($ncol m)) (ch (1+ (/ (+ (- mh fh) (* 2 padding)) stride))) (cw (1+ (/ (+ (- mw fw) (* 2 padding)) stride))) (cm ($zeros 1 (* ch cw fh fw))) (pcm ($ptr cm))) (loop :for i :from padding :by stride :below ch :do (loop :for j :from padding :by stride :below cw :do (let* ((sm ($sm m i j fh fw T)) (psm ($ptr sm)) (l (+ (* i (* cw fh fw)) (* j (* fh fw))))) (dotimes (k (* fh fw)) (setf ($prf pcm (+ k l)) ($prf psm k)))))) cm)) (let ((m ($m '((1 2 3 0) (0 1 2 3) (3 0 1 2) (2 3 0 1))))) ($mkcl ($rowv m) 4 4 3)) (let ((m ($reshape ($m '((1 2 3 0) (0 1 2 3) (3 0 1 2) (2 3 0 1))) 1 16))) ($sm m 0 0 3 3 T)) (let* ((m ($m '((1 2 3 0) (0 1 2 3) (3 0 1 2) (2 3 0 1)))) (f ($m '((2 0 1) (0 1 2) (1 0 2))))) ($convolute ($reshape m 1 16) 4 4 ($reshape f 1 9) 3)) (let* ((m ($m '((1 2 3 0) (0 1 2 3) (3 0 1 2) (2 3 0 1)))) (f ($m '((2 0 1) (0 1 2) (1 0 2))))) (im2cl m ($nrow f) ($ncol f) 1 0)) (let* ((m ($m '((1 2 3 0) (0 1 2 3) (3 0 1 2) (2 3 0 1)))) (f ($m '((2 0 1) (0 1 2) (1 0 2))))) (time (dotimes (i 1000) (im2cl m ($nrow f) ($ncol f) 1 0)))) (let* ((train-images (getf *mnist* :train-images))) (im2cl ($reshape ($ train-images 0 T) 28 28) 3 3 1 0)) (let* ((train-images (getf *mnist* :train-images))) (time (dotimes (n 1000) (im2cl ($reshape ($ train-images n T) 28 28) 3 3 1 0)))) (let* ((train-images (getf *mnist* :train-images))) (let ((f ($m '((2 0 1) (0 1 2) (1 0 2)))) (r ($zeros 1 676))) (time (dotimes (n 1000) (let ((mcl (im2cl ($reshape ($ train-images n T) 28 28) 3 3 1 0))) ($gemm ($reshape f 1 9) ($reshape mcl 9 (/ ($size mcl) 9)) :c r)))))) (let* ((m ($m '((1 2 3 0) (0 1 2 3) (3 0 1 2) (2 3 0 1)))) (f ($m '((2 0 1) (0 1 2) (1 0 2))))) ($convolute m f)) (let* ((m ($m '((1 2 3 0) (0 1 2 3) (3 0 1 2) (2 3 0 1)))) (f ($m '((2 0 1) (0 1 2) (1 0 2))))) ($convolute m f :padding 1 :stride 3)) (defun conv-at (images w h i) (let ((m ($reshape ($ images i T) w h)) (f ($m '((2 0 1) (0 1 2) (1 0 2))))) ($convolute m f :stride 1))) (let* ((train-images (getf *mnist* :train-images)) (f ($m '(2 0 1 0 1 2 1 0 2))) (X ($ train-images 0 T)) (c1 ($convolute X 28 28 f 3 :padding 1 :stride 3))) c1) (let* ((train-images (getf *mnist* :train-images)) (X ($ train-images 0 T))) (time (dotimes (i 10) ($mkcl X 28 28 3)))) (* 26 26 9) (let* ((train-images (getf *mnist* :train-images)) (f ($m '(2 0 1 0 1 2 1 0 2))) (ntr 1000)) (time (dotimes (i ntr) ($convolute ($ train-images i T) 28 28 f 3)))) ($reshape ($m '((2 0 1) (0 1 2) (1 0 2))) 1 9) (let* ((train-images (getf *mnist* :train-images)) (c1 (conv-at train-images 28 28 0)) (f ($m '((2 0 1) (0 1 2) (1 0 2)))) (c2 ($convolute ($reshape c1 26 26) f)) (c3 ($convolute ($reshape c2 24 24) f)) (c4 ($convolute ($reshape c3 22 22) f)) (c5 ($convolute ($reshape c4 20 20) f))) c5) ;; XXX too slow yet (let* ((train-images (getf *mnist* :train-images))) (time (dotimes (i 1000) (conv-at train-images 28 28 i)))) (defun idiv (a b) (floor a b)) (let* ((h0 4) (w0 4) (f 3) (h1 (1+ (- h0 f))) (w1 (1+ (- w0 f))) (nd0 1) (up (1- (* nd0 f f h1 w1)))) (loop :for k :from 0 :upto up :do (let* ((p (idiv k (* h1 w1))) (q (mod k (* h1 w1))) (d (idiv (idiv p f) f)) (u (mod (idiv p f) f)) (v (mod p f)) (i1 (idiv q w1)) (j1 (mod q w1)) (i (+ i1 u)) (j (+ j1 v))) (print (list k d i j)))))
6,573
Common Lisp
.lisp
192
24.520833
79
0.397135
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
6d8aacf5a1c271b0821d457bd84a6f3ef8fd1d1f31d950b7fe72a2f1def3d7be
27,303
[ -1 ]
27,304
mkltest.lisp
chunsj_mtx/scratch/mkltest.lisp
;; XXX not working, find how to load properly (org.middleangle.load-blapack-libs::load-foreign-library "/usr/local/lib/libmkl.dylib") (IN-PACKAGE :ORG.MIDDLEANGLE.CL-BLAPACK.BLAS-CFFI) (cffi:defcfun ("SGEMM" %MKLSGEMM) :VOID (TRANSA :STRING) (TRANSB :STRING) (M FORTRAN-INT) (N FORTRAN-INT) (K FORTRAN-INT) (ALPHA FORTRAN-DOUBLE) (A CFFI-FNV-DOUBLE) (LDA FORTRAN-INT) (B CFFI-FNV-DOUBLE) (LDB FORTRAN-INT) (BETA FORTRAN-DOUBLE) (C CFFI-FNV-DOUBLE) (LDC FORTRAN-INT)) (CFFI:DEFCFUN ("SGEMM" %MKLSGEMM) :VOID (TRANSA :STRING) (TRANSB :STRING) (M FORTRAN-INT) (N FORTRAN-INT) (K FORTRAN-INT) (ALPHA FORTRAN-FLOAT) (A CFFI-FNV-FLOAT) (LDA FORTRAN-INT) (B CFFI-FNV-FLOAT) (LDB FORTRAN-INT) (BETA FORTRAN-FLOAT) (C CFFI-FNV-FLOAT) (LDC FORTRAN-INT)) (in-package :mtx) (defun $mklgemm (a nra nca b nrb ncb &key (alpha 1.0D0) (beta 0.0D0) (c nil)) (let* ((transa "N") (transb "N") (c (or c (make-fnv-float (* nra ncb)))) (m (max 0 nra)) (n (max 0 ncb)) (k (max 0 (or nca nrb)))) (org.middleangle.cl-blapack.blas-cffi::%mklsgemm transa transb m n k alpha a (max 1 m) b (max 1 k) beta c (max 1 m)) c)) ($mklgemm ($fnv ($m '((1 2) (3 4)))) 2 2 ($fnv ($m '((1 2) (3 4)))) 2 2) ($mm ($m '((1 2) (3 4))) ($m '((1 2) (3 4))))
1,659
Common Lisp
.lisp
31
38.064516
87
0.48767
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
7edaa0e7aebead1d114dc5e7c86572afae4a31ea11ff9dd1eb91b48c1f9444f2
27,304
[ -1 ]
27,305
perf.lisp
chunsj_mtx/scratch/perf.lisp
(in-package :mtx) (let ((m1 ($m 1.0 100 100)) (m2 ($m 2.0 100 100))) (time (dotimes (i 10000) ($* m1 m2)))) (let ((X ($r 10000 (* 28 28))) (W1 ($r (* 28 28) 100)) (W2 ($r 100 10))) (time (dotimes (n 100) (let* ((Z1 ($* X W1)) (A1 Z1) (Z2 ($* A1 W2)) (A2 Z2)) A2))))
341
Common Lisp
.lisp
14
18
40
0.396923
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
fb47c1a5ac4b68a058f4f364fb6a4ff56cb732677012493ed446d81e2b3638d0
27,305
[ -1 ]
27,306
nnd.lisp
chunsj_mtx/scratch/nnd.lisp
(in-package :mtx) (defclass AFL () ((input-size :initarg :input-size :initform nil) (output-size :initarg :output-size :initform nil) (w :initform nil) (b :initform nil) (x :initform nil) (dw :reader dw :initform nil) (db :reader db :initform nil))) (defmethod print-object ((l AFL) stream) (print-unreadable-object (l stream :type t :identity t) (with-slots (input-size output-size) l (format stream "[~A x ~A]" input-size output-size)))) (defun $afl (input-size output-size &key winit) (let ((l (make-instance 'AFL :input-size input-size :output-size output-size))) (with-slots (w b dw db) l (let ((sc (cond ((eq winit :he) (sqrt (/ 6.0 input-size))) ((eq winit :xavier) (sqrt (/ 3.0 input-size))) (T 1.0)))) (setf w ($x sc ($- ($x 2.0 ($r input-size output-size)) 1.0)) dw ($m 0.0 input-size output-size)) (setf b ($m 1.0 1 output-size) db ($m 0.0 1 output-size))) l))) (defmethod forward-propagate ((l AFL) &key xs) (with-slots (x w b) l (setf x xs) ($xwpb x w b))) (defmethod backward-propagate ((l AFL) &key d) (with-slots (x w dw db) l ($gemm x d :c dw :transa T) ($copy ($sum d :axis :column) db) ($gemm d w :transb T))) (defclass DUMMYOPT (OPTIMIZER) ()) (defmethod update ((o DUMMYOPT) params gradients) (let ((n ($count params))) (dotimes (i n) (let ((p (elt params i)) (g (elt params i))) ($axpy g p :alpha -0.02))) o)) (defun update-parameters (l &key opt) (with-slots (w b dw db) l (update opt (list w b) (list dw db)))) (defmethod predict ((nw LIST) &key xs) (let ((iv xs)) (dolist (l nw) (setf iv (forward-propagate l :xs iv))) iv)) (let ((X ($m '((0 0) (0 1) (1 0) (1 1)))) (y ($m '(0 1 1 1) 1)) (layers (list ($afl 2 1 :winit :xavier))) (v nil) (ys nil) (dout nil) (o (make-instance 'DUMMYOPT))) (dotimes (i 20) (setf v X) (setf ys (predict layers :xs v)) (setf dout ($/ ($- ys y) ($nrow y))) (print ($str i ": " ($mse ys y))) (dolist (l (reverse layers)) (setf dout (backward-propagate l :d dout))) (dolist (l layers) (update-parameters l :opt o))) (setf ys (predict layers :xs v)) (setf dout ($/ ($- ys y) ($nrow y))) (print ($mse ys y)) (print ys))
2,382
Common Lisp
.lisp
69
29
81
0.56231
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
f15fa72e35dcd7b0944203b3e6ce15f779a44fadd2478c043278f608ed429956
27,306
[ -1 ]
27,307
ex-mnist.lisp
chunsj_mtx/ex/ex-mnist.lisp
(in-package :mtx) (defparameter *mnist* (read-mnist-data)) (defparameter *mnist-train-indices* ($shuffle ($iota ($nrow (getf *mnist* :train-images))))) (defparameter *mnist-test-indices* ($shuffle ($iota ($nrow (getf *mnist* :test-images))))) ;; batch data generation (let* ((xtrain (getf *mnist* :train-images)) (bsize 100) (index-parts ($partition *mnist-train-indices* bsize)) (bindices (car index-parts)) (xbatch ($rows xtrain bindices))) (print bindices) (print ($dim xbatch))) (let* ((train-images (getf *mnist* :train-images)) (train-labels (getf *mnist* :train-labels)) (test-images (getf *mnist* :test-images)) (test-labels (getf *mnist* :test-labels)) (train-samples (min 300 ($nrow train-images))) (test-samples 100) (train-indices ($iota train-samples)) (test-indices ($iota test-samples)) (X ($rows train-images train-indices)) (y ($rows train-labels train-indices)) (tX ($rows test-images test-indices)) (ty ($rows test-labels test-indices)) (input-size ($ncol ($ X 0 T))) (hidden-size 50) (output-size 10) (layers (list ($affine-layer input-size hidden-size :winit :xavier) ($tanh-layer) ($affine-layer hidden-size output-size :winit :xavier))) (o ($sgd-optimizer :lr 0.1)) (nn ($snn layers :el ($softmax-layer) :o o)) (ntr 2000)) (print ($str "INITIAL: " ($argmax (predict nn :xs X) :axis :row))) (time (dotimes (i ntr) (train nn :xs X :ts y) (when (= 0 (rem i 100)) (print ($str "ITR[" i "] TRAIN ERROR: " (loss nn :xs X :ts y))) (print ($str " TEST ERROR: " (loss nn :xs tX :ts ty))) (finish-output)))) (print ($str "FINAL: " ($argmax (predict nn :xs X) :axis :row))) (print ($str "TRUE: " ($argmax y :axis :row))) (print ($str "FINAL[T]: " ($argmax (predict nn :xs tX) :axis :row))) (print ($str "TRUE[T]: " ($argmax ty :axis :row)))) ;; with weight penalty (let* ((train-images (getf *mnist* :train-images)) (train-labels (getf *mnist* :train-labels)) (test-images (getf *mnist* :test-images)) (test-labels (getf *mnist* :test-labels)) (train-samples (min 300 ($nrow train-images))) (test-samples 100) (train-indices ($iota train-samples)) (test-indices ($iota test-samples)) (X ($rows train-images train-indices)) (y ($rows train-labels train-indices)) (tX ($rows test-images test-indices)) (ty ($rows test-labels test-indices)) (input-size ($ncol ($ X 0 T))) (hidden-size 50) (output-size 10) (layers (list ($affine-layer input-size hidden-size :winit :xavier :wr 0.1) ($tanh-layer) ($affine-layer hidden-size output-size :winit :xavier :wr 0.1))) (o ($sgd-optimizer :lr 0.1)) (nn ($snn layers :el ($softmax-layer) :o o)) (ntr 2000)) (print ($str "INITIAL: " ($argmax (predict nn :xs X) :axis :row))) (time (dotimes (i ntr) (train nn :xs X :ts y) (when (= 0 (rem i 200)) (print ($str "ITR[" i "] TRAIN ERROR: " (loss nn :xs X :ts y))) (print ($str " TEST ERROR: " (loss nn :xs tX :ts ty))) (finish-output)))) (print ($str "FINAL: " ($argmax (predict nn :xs X) :axis :row))) (print ($str "TRUE: " ($argmax y :axis :row))) (print ($str "FINAL[T]: " ($argmax (predict nn :xs tX) :axis :row))) (print ($str "TRUE[T]: " ($argmax ty :axis :row)))) ;; with dropout (let* ((train-images (getf *mnist* :train-images)) (train-labels (getf *mnist* :train-labels)) (test-images (getf *mnist* :test-images)) (test-labels (getf *mnist* :test-labels)) (train-samples (min 300 ($nrow train-images))) (test-samples 100) (train-indices ($iota train-samples)) (test-indices ($iota test-samples)) (X ($rows train-images train-indices)) (y ($rows train-labels train-indices)) (tX ($rows test-images test-indices)) (ty ($rows test-labels test-indices)) (input-size ($ncol ($ X 0 T))) (hidden-size 50) (output-size 10) (layers (list ($affine-layer input-size hidden-size :winit :xavier) ($tanh-layer) ($dropout-layer) ($affine-layer hidden-size output-size :winit :xavier))) (o ($sgd-optimizer :lr 0.1)) (nn ($snn layers :el ($softmax-layer) :o o)) (ntr 2000)) (print ($str "INITIAL: " ($argmax (predict nn :xs X) :axis :row))) (time (dotimes (i ntr) (train nn :xs X :ts y) (when (= 0 (rem i 100)) (print ($str "ITR[" i "] TRAIN ERROR: " (loss nn :xs X :ts y))) (print ($str " TEST ERROR: " (loss nn :xs tX :ts ty))) (finish-output)))) (print ($str "FINAL: " ($argmax (predict nn :xs X) :axis :row))) (print ($str "TRUE: " ($argmax y :axis :row))) (print ($str "FINAL[T]: " ($argmax (predict nn :xs tX) :axis :row))) (print ($str "TRUE[T]: " ($argmax ty :axis :row))))
5,101
Common Lisp
.lisp
114
37.605263
92
0.568647
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
f3bb24987545fab19059954fbf690852c7ccc225f077c62916220911c78fe6fb
27,307
[ -1 ]
27,308
ex-la.lisp
chunsj_mtx/ex/ex-la.lisp
(in-package :mtx) ;; https://medium.com/towards-data-science/linear-algebra-cheat-sheet-for-deep-learning-cd67aba4526c ;; dot product (let ((y ($m '(1 2 3))) (x ($m '(2 3 4)))) ($* y ($transpose x))) ;; hadamard product (let ((y ($m '(1 2 3))) (x ($m '(2 3 4)))) ($x y x)) ;; broadcasting... (let ((a ($m '((1) (2)))) (b ($m '((3 4) (5 6))))) ($x a b)) (let ((b ($m '((3 4) (5 6)))) (c ($m '(1 2)))) ($x b c)) (let ((a ($m '((1) (2)))) (c ($m '(1 2)))) ($+ a c)) (let ((a ($m '((2 3) (2 3)))) (b ($m '((3 4) (5 6))))) ($x a b)) ($transpose ($m '((1 2) (3 4)))) (let ((a ($m '((1 2)))) (b ($m '((3 4) (5 6))))) ($* a b))
685
Common Lisp
.lisp
27
21.962963
100
0.405239
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
dac5a995f5dc64377002c27f0e367a65b97cf1539146c0d719e1424e945917a3
27,308
[ -1 ]
27,309
ex-mln.lisp
chunsj_mtx/ex/ex-mln.lisp
(in-package :mtx) ;; sigmoid, mse, sgd (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (o ($sgd-optimizer :lr 10.0)) (n ($snn (list ($affine-layer 2 4 :winit :xavier) ($sigmoid-layer) ($affine-layer 4 2 :winit :xavier) ($sigmoid-layer)) :o o)) (ntr 200)) (print ($str "INITIAL: " ($argmax (predict n :xs X) :axis :row))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($argmax (predict n :xs X) :axis :row)))) ;; tanh, mse, sgd (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (o ($sgd-optimizer :lr 2.0)) (n ($snn (list ($affine-layer 2 4 :winit :xavier) ($tanh-layer) ($affine-layer 4 2 :winit :xavier) ($tanh-layer)) :o o)) (ntr 200)) (print ($str "INITIAL: " ($argmax (predict n :xs X)))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($argmax (predict n :xs X))))) ;; sigmoid, mse, adagrad (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (o ($adagrad-optimizer :lr 0.2)) (n ($snn (list ($affine-layer 2 4 :winit :xavier) ($sigmoid-layer) ($affine-layer 4 2 :winit :xavier) ($sigmoid-layer)) :o o)) (ntr 100)) (print ($str "INITIAL: " ($argmax (predict n :xs X)))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($argmax (predict n :xs X))))) ;; sigmoid, cee, sgd (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (o ($sgd-optimizer :lr 10.0)) (n ($snn (list ($affine-layer 2 4 :winit :xavier) ($sigmoid-layer) ($affine-layer 4 2 :winit :xavier) ($sigmoid-layer)) :el ($softmax-layer) :o o)) (ntr 200)) (print ($str "INITIAL: " ($argmax (predict n :xs X)))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($argmax (predict n :xs X))))) ;; sigmoid, cee, adagrad (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (o ($adagrad-optimizer :lr 0.2)) (n ($snn (list ($affine-layer 2 4 :winit :xavier) ($sigmoid-layer) ($affine-layer 4 2 :winit :xavier) ($sigmoid-layer)) :el ($softmax-layer) :o o)) (ntr 400)) (print ($str "INITIAL: " ($argmax ($softmax (predict n :xs X))))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($argmax ($softmax (predict n :xs X)))))) ;; relu, mse, sgd <= initialization dependent (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (o ($sgd-optimizer :lr 0.06)) (n ($snn (list ($affine-layer 2 4 :winit :he) ($relu-layer) ($affine-layer 4 2 :winit :he) ($relu-layer)) :o o)) (ntr 1000)) (print ($str "INITIAL: " ($argmax (predict n :xs X)))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($argmax (predict n :xs X))))) ;; relu, cee, adam <= initialization dependent however works better ;; last relu is removed ;; investigate initial weight distribution (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (o ($adam-optimizer)) (layers (list ($affine-layer 2 4 :winit :he) ($relu-layer) ($affine-layer 4 2 :winit :he))) (n ($snn layers :el ($softmax-layer) :o o)) (ntr 100) (w0 (slot-value (car layers) 'w))) (print ($str "INITIAL: " ($argmax ($softmax (predict n :xs X))))) (print ($str "W0: " w0 ", " ($sum w0))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($argmax ($softmax (predict n :xs X)))))) ;; batch norm test (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (o ($sgd-optimizer :lr 20.0)) (n ($snn (list ($affine-layer 2 4 :winit :xavier) ($batchnorm-layer 4) ($sigmoid-layer) ($affine-layer 4 2 :winit :xavier) ($batchnorm-layer 2) ($sigmoid-layer)) :o o)) (ntr 200)) (print ($str "INITIAL: " ($argmax (predict n :xs X) :axis :row))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($argmax (predict n :xs X) :axis :row)))) ;; batch norm with relu (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (o ($sgd-optimizer :lr 0.06)) (n ($snn (list ($affine-layer 2 4 :winit :xavier) ($batchnorm-layer 4) ($relu-layer) ($affine-layer 4 2 :winit :xavier) ($batchnorm-layer 2)) :o o)) (ntr 100)) (print ($str "INITIAL: " ($argmax (predict n :xs X) :axis :row))) (time (dotimes (i ntr) (train n :xs X :ts y))) (print ($str "FINAL: " ($argmax (predict n :xs X) :axis :row))))
5,383
Common Lisp
.lisp
126
32.777778
67
0.453125
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
13ff795df21535f9c0b2d2802af18f8dbc8ff1efdf4ef009c897e3be854fb7f4
27,309
[ -1 ]
27,310
ex-gnn.lisp
chunsj_mtx/ex/ex-gnn.lisp
(in-package :mtx) ;; error functions, mean square error and cross entroy error ($mse ($m '((1 2 3) (4 5 6) (7 8 9) (10 11 12))) ($m '(11 12 23))) ($cee ($m '((1 2 3) (4 5 6) (7 8 9) (10 11 12))) ($m '(11 12 23))) ;; affine layer test (let* ((al ($affine-layer 2 2 :winit :xavier)) (x ($m '((1 0) (0 1) (1 1) (0 0)))) (y ($m '((1 0) (1 0) (1 0) (0 1)))) (y0 nil) (yc nil)) (setf yc (forward-propagate al :xs x)) (setf y0 yc) (dotimes (i 100) (let ((dout ($- yc y))) (setf dout (backward-propagate al :d dout)) ($axpy (dw al) (slot-value al 'w) :alpha -0.2) ($axpy (db al) (slot-value al 'b) :alpha -0.2) (setf yc (forward-propagate al :xs x)))) (list ($round y0) ($round yc))) ;; linear mapping network (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '(0 1 0 1) 1)) (layers (list ($affine-layer 2 1))) (optimizer ($sgd-optimizer :lr 1.0)) (nw ($snn layers :o optimizer)) (ntr 10)) (dotimes (i ntr) (train nw :xs X :ts y)) ($round (predict nw :xs X))) ;; linear network with sigmoid (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '(0 1 0 1) 1)) (layers (list ($affine-layer 2 1) ($sigmoid-layer))) (optimizer ($sgd-optimizer :lr 1.0)) (nw ($snn layers :o optimizer)) (ntr 100)) (dotimes (i ntr) (train nw :xs X :ts y)) ($round (predict nw :xs X))) ;; as first argument (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '(0 1 0 1) 1)) (layers (list ($affine-layer 2 1))) (optimizer ($sgd-optimizer :lr 1.0)) (nw ($snn layers :o optimizer)) (ntr 100)) (dotimes (i ntr) (train nw :xs X :ts y)) ($round (predict nw :xs X))) ;; or of arguments (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '(0 1 1 1) 1)) (layers (list ($affine-layer 2 1))) (optimizer ($sgd-optimizer :lr 1.0)) (nw ($snn layers :o optimizer)) (ntr 100)) (dotimes (i ntr) (train nw :xs X :ts y)) ($round (predict nw :xs X))) ;; and of arguments (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '(1 0 0 0) 1)) (layers (list ($affine-layer 2 1))) (optimizer ($sgd-optimizer :lr 1.0)) (nw ($snn layers :o optimizer)) (ntr 100)) (dotimes (i ntr) (train nw :xs X :ts y)) ($round (predict nw :xs X))) ;; as onehot encoded output (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((0 1) (1 0) (1 0) (1 0)))) (layers (list ($affine-layer 2 2))) (optimizer ($sgd-optimizer :lr 1.0)) (nw ($snn layers :o optimizer)) (ntr 100)) (dotimes (i ntr) (train nw :xs X :ts y)) ($round (predict nw :xs X))) ;; non-linear network with sigmoid (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '(0 1 1 0) 1)) (layers (list ($affine-layer 2 4) ($sigmoid-layer) ($affine-layer 4 1) ($sigmoid-layer))) (optimizer ($sgd-optimizer :lr 1.0)) (nw ($snn layers :o optimizer)) (ntr 1000)) (dotimes (i ntr) (train nw :xs X :ts y)) ($round (predict nw :xs X))) ;; xor as onehot encoding (let* ((X ($m '((0 0) (1 0) (0 1) (1 1)))) (y ($m '((1 0) (0 1) (0 1) (1 0)))) (layers (list ($affine-layer 2 4) ($sigmoid-layer) ($affine-layer 4 2) ($sigmoid-layer))) (optimizer ($sgd-optimizer :lr 1.0)) (nw ($snn layers :o optimizer)) (ntr 1000)) (dotimes (i ntr) (train nw :xs X :ts y)) ($round (predict nw :xs X)))
3,577
Common Lisp
.lisp
98
30.061224
66
0.492073
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
61fc2a950710cc1b88f70b8e88e89f4e4c5fa0b2568f143f8cbc105b2ca1ed62
27,310
[ -1 ]
27,311
ex-bs.lisp
chunsj_mtx/ex/ex-bs.lisp
(in-package :mtx) ;; matrix creation (print ($m 32456 11 11)) (print ($m ($iota 10000) 100 100)) ;; random matrix ($r 4) ($r 1 4) ($r 4 1) ($r 4 4) ;; add ($+ 1 2 3 4 5) ($+ 1 2 3 ($m '(1 2))) ($+ ($m '(1 0 0 1) 2) ($m '(2 0 0 1) 2) ($m '(1 2 2 2) 2)) ;; subtract ($- 1) ($- 5 4 3 2 1) ($- ($m '(1 2))) ($- 10 ($m '(1 2 3))) ($- 1 2 3 ($m '(1 2))) ($- ($m '(1 0 0 1) 2) ($m '(2 0 0 1) 2) ($m '(1 2 3 4) 2)) ;; multiply, hadamard ($x 1) ($x ($m '(1 2 3 4) 2) ($m '(1 2 3 4) 2)) ($x 1 2 3 4 5) ($x 1 2 3 ($m '(1 2))) ($x ($m '(1 0 0 1) 2) ($m '(2 0 0 1) 2) ($m '(1 2 2 2) 2)) ;; multiply, matrix ($* 1 2 3 4 5) ($* 1 2 3 ($m '(1 2))) ($* ($m '(1 0 0 1) 2) ($m '(1 0 0 1) 2) ($m '(1 2 2 1) 2)) ;; divide ($/ 1) ($/ 1 2 3) ($/ ($m '(1 2 3))) ($/ 10 ($m '(1 2 3))) ($/ 1 2 3 ($m '(1 2))) ($/ ($m '(1 1 1 1) 2) ($m '(2 3 2 1) 2) ($m '(1 2 3 4) 2)) ;; gemm style performance comparison (let ((a ($m 1 100 100)) (b ($m 2 100 100)) (c ($m 0 100 100)) (n 10000)) (time (dotimes (i n) ($mm a b :c c)))) (let ((a ($m 1 100 100)) (b ($m 2 100 100)) (n 10000)) (time (dotimes (i n) ($* a b)))) ;; vector broadcasting (broadcast-vector ($r 4 1) 4) (broadcast-vector ($r 1 4) 4) ;; xwbp or ($+ (* x w) b) (let ((x ($m '(0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1) 2)) (W1 ($- ($* 2.0 ($r 2 4)) 1.0)) (b1 ($r 1 4))) ($+ ($* x W1) (broadcast-vector b1 ($nrow x)))) (let ((x ($m '(0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1) 2)) (W1 ($- ($* 2.0 ($r 2 4)) 1.0)) (b1 ($r 1 4))) ($xwpb X W1 b1)) ;; basic neural network computation performance (let ((X ($r 10000 (* 28 28))) (W1 ($r (* 28 28) 100)) (b1 ($r 1 100)) (W2 ($r 100 10)) (b2 ($r 1 10))) (time (dotimes (i 100) (let* ((Z1 ($xwpb X W1 b1)) (A1 ($sigmoid Z1)) (Z2 ($xwpb A1 W2 b2)) (A2 ($sigmoid Z2))) A2)))) ;; slower than nd4j case (let* ((n 10000) (X ($r n (* 28 28))) (W1 ($r (* 28 28) 100)) (W2 ($r 100 10)) (c1 ($m 0 n 100)) (c2 ($m 0 n 10))) (time (dotimes (i 100) (let* ((Z1 ($mm X W1 :c c1)) (A1 Z1) (Z2 ($mm A1 W2 :c c2)) (A2 Z2)) A2)))) ;; batch performance comparison, yes, batch is faster ;; 1. single record, 10000 times (let* ((n 1) (X ($r n (* 28 28))) (W1 ($r (* 28 28) 100)) (W2 ($r 100 10)) (c1 ($m 0 n 100)) (c2 ($m 0 n 10))) (time (dotimes (i 10000) (let* ((Z1 ($mm X W1 :c c1)) (A1 Z1) (Z2 ($mm A1 W2 :c c2)) (A2 Z2)) A2)))) ;; 2. 100 records, 100 times (let* ((n 1000) (X ($r n (* 28 28))) (W1 ($r (* 28 28) 100)) (W2 ($r 100 10)) (c1 ($m 0 n 100)) (c2 ($m 0 n 10))) (time (dotimes (i 100) (let* ((Z1 ($mm X W1 :c c1)) (A1 Z1) (Z2 ($mm A1 W2 :c c2)) (A2 Z2)) A2)))) ;; 3. 1000 records, 10 times (let* ((n 1000) (X ($r n (* 28 28))) (W1 ($r (* 28 28) 100)) (W2 ($r 100 10)) (c1 ($m 0 n 100)) (c2 ($m 0 n 10))) (time (dotimes (i 10) (let* ((Z1 ($mm X W1 :c c1)) (A1 Z1) (Z2 ($mm A1 W2 :c c2)) (A2 Z2)) A2)))) ;; 4. 10000 records, 1 times (let* ((n 10000) (X ($r n (* 28 28))) (W1 ($r (* 28 28) 100)) (W2 ($r 100 10)) (c1 ($m 0 n 100)) (c2 ($m 0 n 10))) (time (dotimes (i 1) (let* ((Z1 ($mm X W1 :c c1)) (A1 Z1) (Z2 ($mm A1 W2 :c c2)) (A2 Z2)) A2)))) ;; with thread macro (let* ((n 10000) (X ($r n (* 28 28))) (W1 ($r (* 28 28) 100)) (b1 ($r 1 100)) (W2 ($r 100 10)) (b2 ($r 1 10))) (@> X ($xwpb W1 b1) ($sigmoid) ($xwpb W2 b2) ($sigmoid))) ;; elementwise utility functions (let* ((a ($r 4 4))) (print a) (print ($max a)) (print ($imax a)) (print ($min a)) (print ($imin a))) ;; indices of max element by axis (let ((a ($r 5 4))) (print a) (print ($argmax a)) (print ($argmax a :axis :column))) ;; more basic performance test codes ;; allocation comparison (time (dotimes (i 1000) ($vx (* 100 100)))) (time (dotimes (i 1000) ($m 0 100 100))) (time (dotimes (i 1000) ($dup ($m 0 100 100)))) (let ((r ($r 100 100))) (time (dotimes (i 1000) ($copy ($m 0 100 100) r)))) (let ((r ($r 100 100)) (q ($r 100 100))) (time (dotimes (i 1000) ($copy q r)))) ;; transpose uses allocation (let ((r ($r 100 100))) (time (dotimes (i 1000) ($transpose r)))) ;; XXX transpose should be processed with view; realize it when it is required ;; XXX here some time can be reduced (let ((r ($r 100 100))) (time (dotimes (i 1000) ($mm r ($transpose r))))) (let ((r ($r 100 100))) (time (dotimes (i 1000) ($gemm r r :transb T)))) (let ((r ($r 100 100)) (c ($m 0 100 100))) (time (dotimes (i 1000) ($gemm r r :c c :transb T)))) ;; multiplication with allocated result (let ((a ($m 1.0 1 10000)) (b ($m 2.0 10000 1)) (c ($m 0 1 1))) (time (dotimes (i 1000) ($mm a b :c c))) c) ;; direct blas method comparison, double vs single float (let ((a (make-fnv-double 10000 :initial-value 1)) (b (make-fnv-double 10000 :initial-value 2)) (c (make-fnv-double 10000 :initial-value 0))) (time (dotimes (i 1000) (%dgemm "N" "N" 100 100 100 1.0 a 100 b 100 0.0 c 100)))) (let ((a (make-fnv-float 10000 :initial-value 1)) (b (make-fnv-float 10000 :initial-value 2)) (c (make-fnv-float 10000 :initial-value 0))) (time (dotimes (i 1000) (%sgemm "N" "N" 100 100 100 1.0 a 100 b 100 0.0 c 100))))
5,678
Common Lisp
.lisp
215
21.72093
83
0.465796
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
c44b2bedaa4a829bd02133d2cec9e6be9fb6aceb84aa7dc679aff2dabdb3429d
27,311
[ -1 ]
27,312
ex-opt.lisp
chunsj_mtx/ex/ex-opt.lisp
(in-package :mtx) (defun f (x y) ($+ (/ ($expt x 2.0) 20.0) ($expt y 2.0))) (defun df (x y) (list ($/ x 10.0) ($* 2.0 y))) (let* ((init-pos (list ($m '(-7.0)) ($m '(2.0)))) (params init-pos) (grads (list ($m '(0)) ($m '(0)))) (optimizers (list :SGD (make-instance 'SGD :lr 0.95) :MOMENTUM (make-instance 'MOMENTUM :lr 0.1 :m 0.9) :ADAGRAD (make-instance 'ADAGRAD :lr 1.5) :ADAM (make-instance 'ADAM :lr 0.3 :b1 0.9 :b2 0.999)))) (dolist (k (loop :for c :in optimizers :by #'cddr :collect c)) (let ((optimizer (getf optimizers k)) (param-history nil)) (setf params init-pos) (dotimes (n 30) (push params param-history) (setf grads (df (car params) (cadr params))) (update optimizer params grads)) (print ($str k " " (car param-history))))))
896
Common Lisp
.lisp
19
37.947368
81
0.515429
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
912dcad3278ea4c506b6c4554519f2699e50702616baa97c76b1fab69c442e8d
27,312
[ -1 ]
27,313
ex-snn.lisp
chunsj_mtx/ex/ex-snn.lisp
(in-package :mtx) (defun fwd (input weight) ($sigmoid! ($* input weight))) (defun dwb (delta output) ($x delta output ($- 1 output))) ;; single layer example (let* ((X ($m '((0 0 1) (0 1 1) (1 0 1) (1 1 1)))) (y ($m '(0 0 1 1) 1)) (s ($r 3 1)) (a 1) (ntr 1000)) (time (loop :for i :from 0 :below ntr :do (let* ((l1 (fwd X s)) (l1d (dwb ($- l1 y) l1)) (ds ($* ($transpose X) l1d))) (setf s ($- s ($x a ds)))))) (print ($round (fwd X s)))) (let* ((X ($m '((0 0 1) (0 1 1) (1 0 1) (1 1 1)))) (y ($m '(0 0 1 1) 1)) (s ($r 3 1)) (a 1) (ntr 1000) (ds ($m 0 3 1))) (time (dotimes (i ntr) (let* ((l1 (fwd X s)) (l1d (dwb ($- l1 y) l1))) ($gemm X l1d :c ds :transa T) ($axpy ds s :alpha (* -1 a))))) (print ($round (fwd X s)))) (let* ((X ($m '((0 0) (0 1) (1 0) (1 1)))) (y ($m '(0 0 1 1) 1)) (s ($r 2 1)) (a 1) (ntr 1000) (ds ($m 0 3 1))) (time (dotimes (i ntr) (let* ((l1 (fwd X s)) (l1d (dwb ($- l1 y) l1))) ($gemm X l1d :c ds :transa T) ($axpy ds s :alpha (* -1 a))))) (print ($round (fwd X s)))) ;; two layers (let* ((X ($m '((0 0 1) (0 1 1) (1 0 1) (1 1 1)))) (y ($m '(0 1 1 0) 1)) (s0 ($r 3 4)) (s1 ($r 4 1)) (a 1) (ntr 1000)) (time (loop :for i :from 0 :below ntr :do (let* ((l1 (fwd X s0)) (l2 (fwd l1 s1)) (l2d (dwb ($- l2 y) l2)) (l1d (dwb ($* l2d ($transpose s1)) l1)) (ds1 ($* ($transpose l1) l2d)) (ds0 ($* ($transpose X) l1d))) (setf s0 ($- s0 ($x a ds0)) s1 ($- s1 ($x a ds1)))))) (print ($round (fwd (fwd X s0) s1)))) (let* ((X ($m '((0 0 1) (0 1 1) (1 0 1) (1 1 1)))) (y ($m '(0 1 1 0) 1)) (s0 ($r 3 4)) (s1 ($r 4 1)) (a 1) (ntr 1000) (ds1 ($m 0 4 1)) (ds0 ($m 0 3 4)) (d21 ($m 0 4 4))) (time (dotimes (i ntr) (let* ((l1 (fwd X s0)) (l2 (fwd l1 s1)) (l2d (dwb ($- l2 y) l2)) (l1d (dwb ($gemm l2d s1 :c d21 :transb T) l1))) ($gemm l1 l2d :c ds1 :transa T) ($gemm X l1d :c ds0 :transa T) ($axpy ds1 s1 :alpha (* -1 a)) ($axpy ds0 s0 :alpha (* -1 a))))) (print ($round (fwd (fwd X s0) s1)))) (let* ((X ($m '((0 0) (0 1) (1 0) (1 1)))) (y ($m '(0 1 1 0) 1)) (s0 ($r 2 4)) (s1 ($r 4 1)) (a 1) (ntr 1000) (ds1 ($m 0 4 1)) (ds0 ($m 0 2 4)) (d21 ($m 0 4 4))) (time (dotimes (i ntr) (let* ((l1 (fwd X s0)) (l2 (fwd l1 s1)) (l2d (dwb ($- l2 y) l2)) (l1d (dwb ($gemm l2d s1 :c d21 :transb T) l1))) ($gemm l1 l2d :c ds1 :transa T) ($gemm X l1d :c ds0 :transa T) ($axpy ds1 s1 :alpha (* -1 a)) ($axpy ds0 s0 :alpha (* -1 a))))) (print ($round (fwd (fwd X s0) s1)))) ;; relu test case (defun fwd (input weight) ($relu ($* input weight))) (defun dwb (delta output) ($map (lambda (d e) (if (> e 0) d 0.0)) delta output)) (let* ((X ($m '((0 0) (0 1) (1 0) (1 1)))) (y ($m '(0 1 1 0) 1)) (s0 ($x ($rn 2 4) (sqrt (/ 2.0 2.0)))) (s1 ($x ($rn 4 1) (sqrt (/ 2.0 4.0)))) (a 0.1) (ntr 1000) (ds1 ($m 0 4 1)) (ds0 ($m 0 2 4)) (d21 ($m 0 4 4))) ;; working weights ;; (setf s0 ($m '((6.42e-1 3.42e-1 -7.26e-1 9.81e-1) ;; (5.76e-2 -4.99e-1 -3.82e-1 4.85e-1)))) ;; (setf s1 ($m '(5.87e-1 ;; 1.12e+0 ;; -9.92e-1 ;; 1.15e+0) ;; 1)) (print s0) (print s1) (print (/ ($sum s0) (* 2 4))) (print (/ ($sum s1) 4)) (time (dotimes (i ntr) (let* ((l1 (fwd X s0)) (l2 (fwd l1 s1)) (delta2 ($- l2 y)) (l2d (dwb delta2 l2)) (delta1 ($gemm l2d s1 :c d21 :transb T)) (l1d (dwb delta1 l1))) ($gemm l1 l2d :c ds1 :transa T) ($gemm X l1d :c ds0 :transa T) ($axpy ds1 s1 :alpha (* -1 a)) ($axpy ds0 s0 :alpha (* -1 a))))) (print (fwd (fwd X s0) s1)) (print ($round (fwd (fwd X s0) s1))))
4,623
Common Lisp
.lisp
159
20.610063
80
0.370146
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
a0d2ef634e0d6ec65f1babcd65080802e38237a127f222f00af1e79fda0159e9
27,313
[ -1 ]
27,314
mtx.asd
chunsj_mtx/mtx.asd
(asdf:defsystem mtx :name "mtx" :author "Sungjin Chun <[email protected]>" :version "0.1" :maintainer "Sungjin Chun <[email protected]>" :license "GPL3" :description "simple follow up of deep learning from scratch book" :long-description "trying to create a helper code in common lisp using cl-blapack for dlfs book" :depends-on ("org.middleangle.cl-blapack" "org.middleangle.foreign-numeric-vector" "alexandria") :components ((:file "package") (:file "matrix") (:file "basic") (:file "funcs") (:file "utils") (:file "mnist") (:file "nnbs") (:file "layers") (:file "optimizers") (:file "nn")))
775
Common Lisp
.asd
21
27.190476
98
0.558355
chunsj/mtx
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
9d9bf16c2685f1dffbac0e3b3ad1a0b47508ee257dd92b72bb8e1a727843e8ef
27,314
[ -1 ]
27,352
time.lisp
Vortaro_Guild-Master/time.lisp
;; Copyright (C) 2011 Christopher Hanna ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; A lunisolar calendar for the world based on the Metonic Cycle ;; Constants (defconstant +cycle+ 19) ;;19 year cycle with 6940 days (defconstant +lunar-year+ 354) ;; Days in a lunar year (defconstant +long-year+ 384) ;; Days in year with the extra month (defconstant +longer-year+ 388) ;; Days with extra long month (defconstant +month-short+ 29) ;; First month in year is this many days (defconstant +month-long+ 30) ;; Following month is this and these alternate (defconstant +month-extra+ 30) ;; 13th month on year 3, 6, 8, 11, 14 ,19 (defconstant +month-extra-long+ 34) ;; 13th month on year 17 (defconstant +week-regular+ 7) ;; Regular week (defconstant +week-short+ 8) ;; Last week of short month (defconstant +week-long+ 9) ;; Last week of long month and the extra long month (defconstant +week-extra-long+ 6) ;; Last week in month 13 of year 8 ;; Global variables (defvar *year* 1) ;; Holds years that have passed (defvar *year-in-cycle* 1) ;; Holds the year in the cycle (defvar *month* 1) ;; Holds the current month type (defvar *month-of-year* 1) ;; Holds the month in year so far (defvar *week* 1) ;; Holds the current week type (defvar *week-in-month* 1) ;; Holds current week in the month so far (defvar *day* 0) ;; Holds days in year so far (defvar *days-in-year* 0) ;; Holds the total days in the year (defvar *day-of-month* 0) ;; Holds days in month so far (defvar *day-of-week* 0) ;; Holds the current day of the week ;; Counter functions (defun increase-day-counter () ;; Changes the day (incf *day*)) ;; the most basic time unit in the game (defun reset-day-counter () ;; Set back to one on a new year (setf *day* 1)) (defun increase-day-of-week-counter () ;; Keeps track of day of the week -- (incf *day-of-week*)) ;; needs same time as day-counter (defun reset-day-of-week-counter () (setf *day-of-week* 1)) (defun increase-day-of-month-counter () ;; Keeps track of day of the month -- (incf *day-of-month*)) ;; needs same time as day-counter (defun reset-day-of-month-counter () (setf *day-of-month* 1)) (defun increase-week-in-month-counter () ;; Used to track week in month to set (incf *week-in-month*)) ;; weeks not of seven days (defun reset-week-in-month-counter () (setf *week-in-month* 1)) (defun increase-month-counter () ;; Used to increase the month number (incf *month-of-year*)) (defun reset-month-counter () ;; Set back to one on a new year (setf *month-of-year* 0)) (defun increase-year () ;; Increases every year; does not need to be reset (incf *year*)) (defun increase-year-in-cycle () ;; Keep track of year in the 19 year cycle to (incf *year-in-cycle*)) ;; know when to add a 13th month (defun reset-year-in-cycle () ;; Set back to one at the end of the cycle (setf *year-in-cycle* 1)) ;; Definition functions ;; Year functions (defun year-increases () (increase-year-in-cycle) (increase-year)) (defun year-resets () (reset-month-counter) (reset-day-counter)) (defun regular-year () ;; Sets the days in the year to 354 (setf *days-in-year* +lunar-year+)) (defun long-year () ;; Sets the days in the year to 384 (setf *days-in-year* +long-year+)) (defun longer-year () ;; Sets the days in the year to 388 (setf *days-in-year* +longer-year+)) ;; Month functions (defun month-increases () (increase-month-counter)) (defun month-resets () (reset-day-of-month-counter) (reset-week-in-month-counter)) (defun start-short-month () ;; Sets *month* to a short month (setf *month* +month-short+)) (defun start-long-month () ;; Sets *month* to a long month (setf *month* +month-long+)) (defun start-extra-month () ;; Sets *month* to the extra month (setf *month* +month-extra+)) (defun start-extra-long-month () ;; Sets *month* to the extra long month (setf *month* +month-extra-long+)) ;; Week functions (defun week-increases () (increase-week-in-month-counter)) (defun week-resets () (reset-day-of-week-counter)) (defun start-regular-week () (setf *week* +week-regular+)) (defun start-short-week () ;; Sort of a misnomer, short corresponds to the month (setf *week* +week-short+)) ;; ,since this week is actually longer than normal (defun start-long-week () (setf *week* +week-long+)) (defun start-extra-long-week () ;; Not really extra long; 6 days, but it is (setf *week* +week-extra-long+)) ;; named after the month ;; Checks for loops ;; Year checks (defun year-check () ;; Checks if it is time to go to the next year -- part of (year-check-1) ;; main game loop (year-check-2) (year-check-3) (year-check-4) (year-check-5)) (defun year-check-1 () ;; Checking if the next year is a long year (when (and (eql *days-in-year* +lunar-year+) (eql *day* 355) (or (eql *year-in-cycle* 2) (eql *year-in-cycle* 5) (eql *year-in-cycle* 7) (eql *year-in-cycle* 10) (eql *year-in-cycle* 13) (eql *year-in-cycle* 18))) (long-year) (year-increases) (year-resets))) (defun year-check-2 () ;; Checking if the next year is a longer year (when (and (eql *days-in-year* +lunar-year+) (eql *day* 355) (eql *year-in-cycle* 16)) (longer-year) (year-increases) (year-resets))) (defun year-check-3 () ;; Regular year (when (and (eql *days-in-year* +lunar-year+) (eql *day* 355)) (regular-year) (year-increases) (year-resets))) (defun year-check-4 () ;; Starting a year at the end of a long year (when (and (eql *days-in-year* +long-year+) (eql *day* 385)) (regular-year) (year-increases) (year-resets))) (defun year-check-5 () ;; Starting a year at the end of a longer year (when (and (eql *days-in-year* +longer-year+) (eql *day* 389)) (regular-year) (year-increases) (year-resets))) ;;Year in cycle check (defun year-in-cycle-check () ;;Check if it is time to restart the cycle (when (eql *year-in-cycle* 20) (reset-year-in-cycle))) ;; Month Checks (defun month-check () ;; Checks if a new month is here -- it needs a loop and (month-check-1) ;; a time increment to check (month-check-2) (month-check-3) (month-check-4) (month-check-5) (month-check-6)) (defun month-check-1 () ;; See if a 13th month is necessary (when (and (eql *month-of-year* 12) (eql *day-of-month* 31) (or (eql *year-in-cycle* 3) (eql *year-in-cycle* 6) (eql *year-in-cycle* 8) (eql *year-in-cycle* 11) (eql *year-in-cycle* 14) (eql *year-in-cycle* 19))) (start-extra-month) (month-resets) (start-regular-week) (week-resets) (month-increases))) (defun month-check-2 () ;; See if a long 13th month is necessary (when (and (eql *month-of-year* 12) (eql *day-of-month* 31) (eql *year-in-cycle* 17)) (start-extra-long-month) (month-resets) (start-regular-week) (week-resets) (month-increases))) (defun month-check-3 () ;; See if a long month needs to be started (when (and (eql *month* +month-short+) (eql *day-of-month* 30)) (start-long-month) (month-resets) (start-regular-week) (week-resets) (month-increases))) (defun month-check-4 () ;; See if a short month needs to be started (when (and (eql *month* +month-long+) (eql *day-of-month* 31)) (start-short-month) (month-resets) (start-regular-week) (week-resets) (month-increases))) (defun month-check-5 () ;; Start new month at the end of 13th month (when (and (eql *month* +month-extra+) (eql *day-of-month* 31)) (start-short-month) (month-resets) (start-regular-week) (week-resets) (month-increases))) (defun month-check-6 () ;; Start new month at the end of the long 13th month (when (and (eql *month* +month-extra-long+) (eql *day-of-month* 35)) (start-short-month) (month-resets) (start-regular-week) (week-resets) (month-increases))) ;; Week checks (defun week-check () (week-check-1) (week-check-2) (week-check-3) (week-check-4) (week-check-5)) (defun week-check-1 () ;; Check if it is time for the 8 day week (when (and (eql *week-in-month* 3) (eql *day-of-week* 8) (eql *month* +month-short+)) (start-short-week) (week-increases) (week-resets))) (defun week-check-2 () ;; Check if it is time for the 9 day week (when (and (eql *week-in-month* 3) (eql *day-of-week* 8) (eql *month* +month-long+)) (start-long-week) (week-increases) (week-resets))) (defun week-check-3 () ;; Check if it is time for the 9 day week in extra month (when (and (eql *week-in-month* 3) (eql *day-of-week* 8) (eql *month* +month-extra+)) (start-long-week) (week-increases) (week-resets))) (defun week-check-4 () ;; Check if it is time for the 6 day week (when (and (eql *week-in-month* 4) (eql *day-of-week* 8) (eql *month* +month-extra-long+)) (start-extra-long-week) (week-increases) (week-resets))) (defun week-check-5 () ;; Normal week change (when (and (eql *week* +week-regular+) (eql *day-of-week* 8)) (start-regular-week) (week-increases) (week-resets))) ;; Prints the date! (defun print-date () (format t "d~d-m~d-y~d~%" *day-of-month* *month-of-year* *year*) ;; Basic (format t "dow~d-w~d~%" *day-of-week* *week-in-month*) ;; Week data (format t "diy~d-yic~d~%" *day* *year-in-cycle*)) ;; The ticker on which the days change (defvar *tick-p* t) (let ((prev-time 0) (cur-time 0) (difference 0)) (defun set-prev-time () (setf prev-time (get-universal-time))) (defun run-time-functions () ;; Time-dependent functions (increase-day-counter) (increase-day-of-week-counter) (increase-day-of-month-counter) (year-check) (year-in-cycle-check) (month-check) (week-check) (set-prev-time) (setf *tick-p* nil)) (defun ticker () ;; Sends a t signal every 10 seconds (setf cur-time (get-universal-time)) (setf difference (- cur-time prev-time)) (if (>= difference 10) ;; length of tick, and therefore, day (setf *tick-p* t)) (when (eql *tick-p* t) (run-time-functions) (print-date))) (defun loop-start () ;; Loop for many ingame functions (regular-year) (start-short-month) (start-regular-week) (loop (ticker) (sleep 5))))
10,712
Common Lisp
.lisp
269
37.371747
80
0.67767
Vortaro/Guild-Master
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
9b07770822c0bda5b64cd104756b4008aeaa584b9a5301a2d3a060190334e521
27,352
[ -1 ]
27,353
economy.lisp
Vortaro_Guild-Master/economy.lisp
;; Copyright (C) 2011 Christopher Hanna ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; The inner workings of the economic system and for now the trade interface ;; will be here as well (load "time.lisp") (defvar *quantity* 0) ;; How much the merchant wants to buy or sell (defparameter *money* 10000) ;; How much money the merchant has (defvar *supply* 0) (defvar *supply-p* nil) (defun print-money () ;; Shows how much money the player has (format t "Current funds: ~d~%" *money*)) (let ((price 0) (new-supply 0) (supply 20) (rate 14.2) (initial-price 2050) (price-list 0) (average-price 0) (buy-p nil) (sell-p nil)) (defun reset-price-list () (setf price-list nil)) (defun add-price () (push price price-list)) (defun average-price-function (price-list) (setf average-price (let ((list-nonil (remove nil price-list))) (/ (apply #'+ list-nonil) (length list-nonil))))) (defun print-price () ;; Shows how much the unit cost; will be replaced by a (format t "Price: ~d~%" price)) ;; price averager (defun print-average-price () (format t "Average price per unit: ~d~%" average-price)) (defun linear () ;; A linear plot for any good (setf price (round (+ initial-price (* supply (- rate)))))) (defun subtract-money () (setf *money* (- *money* price))) (defun add-money () (setf *money* (+ *money* price))) (defun find-new-buy-supply () ;; Necessary to get the loop to stop (setf new-supply (- supply *quantity*))) (defun find-new-sell-supply () (setf new-supply (+ supply *quantity*))) (defun decrease-supply () (setf supply (decf supply))) (defun increase-supply () (setf supply (incf supply))) (defun set-new-supply () (setf supply new-supply)) (defun buy-loop () (find-new-buy-supply) (format t "s~d ns~d~%" supply new-supply) (do ((intermediate supply (1- intermediate))) ((<= intermediate new-supply)) (linear) (add-price) (print-price) (subtract-money) (decrease-supply)) (average-price-function price-list) (print-average-price) (reset-price-list) (print-money)) (defun sell-loop () (find-new-sell-supply) (format t "s~d ns~d~%" supply new-supply) (do ((intermediate supply (1+ intermediate))) ((>= intermediate new-supply)) (linear) (print-price) (add-money) (increase-supply)) (print-money)) ;; Trade menus (defvar *goods-db* nil) (defparameter *goods-menu* `(("Beer" . ,(lambda ())) ("Fruit Juice" . ,(lambda ())) ("Wine" . ,(lambda ())) ("Fish" . ,(lambda ())) ("Fruit" . ,(lambda ())) ("Grain" . ,(lambda ())) ("Honey" . ,(lambda ())) ("Meat" . ,(lambda ())) ("Roots" . ,(lambda ())) ("Salt" . ,(lambda ())) ("Vegetables" . ,(lambda ())) ("Medicine" . ,(lambda ())) ("Bronze Ingots" . ,(lambda ())) ("Bronze Wares" . ,(lambda ())) ("Cloth" . ,(lambda ())) ("Clothing" . ,(lambda ())) ("Dyes" . ,(lambda ())) ("Glass" . ,(lambda ())) ("Hemp" . ,(lambda ())) ("Furs" . ,(lambda ())) ("Iron Ingots" . ,(lambda ())) ("Iron Wares" . ,(lambda ())) ("Leather" . ,(lambda ())) ("Pitch" . ,(lambda ())) ("Pottery" . ,(lambda ())) ("Stone" . ,(lambda ())) ("Whale Oil" . ,(lambda ())) ("Wool" . ,(lambda ())) ("Leave" . ,(lambda ())))) (defparameter *trade-menu* `(("Buy" . ,(lambda () (set-buy-status) (format t "What would you like to buy?~%") (goods-menu *goods-menu*))) ("Sell" . ,(lambda () (set-sell-status) (format t "What would you like to sell?~%") (goods-menu *goods-menu*))) ("Leave" . ,(lambda () (format t "Come again sometime.~%"))))) (defun load-goods-db (&optional (goods.db "./goods.db")) (with-open-file (in goods.db) (read in))) (defun trade-interface-start () (market-menu "Welcome to the market." *trade-menu*)) (defun set-buy-status () (setf buy-p t)) (defun reset-buy-status () ;; Used to initiate conditional functions based on (setf buy-p nil)) ;; whether the player is buying or selling (defun set-sell-status () (setf sell-p t)) (defun reset-sell-status () (setf sell-p nil)) (defun set-quantity-prompt () (setf *quantity* (or (parse-integer (read-line *query-io*) :junk-allowed t) 0))) (defun market-menu (title entries) (format t "~a~%" title) (dolist (entry entries) (format t "~a~%" (car entry))) (format t "Type the word corresponding to your choice.~%Typing leave will return you to the city.~%") (let ((input (read-line))) (dolist (entry entries) (when (string-equal input (car entry)) (funcall (cdr entry)) (return))) (unless (dolist (entry entries) (when (string-equal input (car entry)) (funcall (cdr entry)) (return t))) (format t "~%~%That's not an option.~%") (trade-interface-start)))) (defun goods-menu (entries) (dolist (entry entries) (format t "~a~%" (car entry))) (format t "Type the word corresponding to your choice.~%Typing cancel will return you to the previous menu.~%") (let ((input (read-line))) (dolist (entry entries) (when (string-equal input (car entry)) (funcall (cdr entry)) (return))) (unless (dolist (entry entries) (when (string-equal input (car entry)) (funcall (cdr entry)) (return t))) (format t "~%~%That's not an option.~%") (goods-menu *goods-menu*)))) (defun trade-menu () (when (eql buy-p t) (format t "How much would you like to buy?~%") (set-quantity-prompt) (buy-loop) (reset-buy-status) (repeat-trade)) (when (eql sell-p t) (format t "How much would you like to sell?~%") (set-quantity-prompt) (sell-loop) (reset-sell-status) (repeat-trade))) (defun repeat-trade () (y-or-n-p "Would you like to trade anything else? ") (if (eql *query-io* t) (market-menu "What else would you like to do?" *trade-menu*))))
6,334
Common Lisp
.lisp
175
33.388571
112
0.644311
Vortaro/Guild-Master
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
591708e51fade4c2a07be875ffc7fd250a1db2be32f59b40fbe0a06e0d63ddd4
27,353
[ -1 ]
27,354
title.lisp
Vortaro_Guild-Master/title.lisp
;; Copyright (C) 2011 Christopher Hanna ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; Title screen (load "time.lisp") (load "economy.lisp") (defparameter *gt-menu* ;; Game testing features to see the game before it is `(("Trade interface" . ,(lambda () (trade-interface-start))) ;; complete ("Game time" . ,(lambda () (loop-start))) ("Exit" . ,(lambda () (format t "Quitting..."))))) (defparameter *main-menu* `(("Play a world" . ,(lambda () (format t "play"))) ("Generate new world" . ,(lambda () (format t "generate"))) ("Game testing features" . ,(lambda () (show-menu "Choose an option" *gt-menu*))) ("Exit" . ,(lambda () (format t "Quitting..."))))) (defun show-menu (title entries) (format t "~a~%" title) (loop for entry in entries and number from 1 do (format t "~a. ~a~%" number (car entry))) (format t "Enter your choice: ") (let ((choice (or (parse-integer (read-line) :junk-allowed t) 0))) (if (< 0 choice (1+ (length entries))) (funcall (cdr (elt entries (1- choice)))) (progn (format t "~%~%That's not an option.~%") (show-menu title entries))))) (defun license () (format t "Guild Master Pre-Alpha Copyright (C) 2011 Christopher Hanna~%~%")) (license) (show-menu "GUILD MASTER" *main-menu*)
1,887
Common Lisp
.lisp
38
47.342105
83
0.670652
Vortaro/Guild-Master
1
0
0
GPL-3.0
9/19/2024, 11:28:28 AM (Europe/Amsterdam)
939be0470e55cb1053482b366ccf6dd4df7704955764e3b0b5efc03065b88cda
27,354
[ -1 ]