|
|
|
@ -1,32 +1,32 @@
|
|
|
|
|
#lang br
|
|
|
|
|
(provide #%top-interaction #%module-begin (all-defined-out))
|
|
|
|
|
|
|
|
|
|
(define-inverting #'(chip-program "CHIP" _arg ...)
|
|
|
|
|
(define #'(chip-program "CHIP" _arg ...)
|
|
|
|
|
#'(chip _arg ...))
|
|
|
|
|
|
|
|
|
|
(define-inverting #'(pin-spec _label _pin-list ";")
|
|
|
|
|
(define #'(pin-spec _label _pin-list ";")
|
|
|
|
|
#'_pin-list)
|
|
|
|
|
|
|
|
|
|
(define-inverting #'(pin-list _id _comma-id ...)
|
|
|
|
|
#'(_id _comma-id ...))
|
|
|
|
|
(define-inverting #'(pin-list _id _another-id ...)
|
|
|
|
|
#'(_id _another-id ...))
|
|
|
|
|
|
|
|
|
|
(define-inverting #'(comma-id "," _id)
|
|
|
|
|
(define #'(another-id "," _id)
|
|
|
|
|
#'_id)
|
|
|
|
|
|
|
|
|
|
(define-inverting #'(part-spec "PARTS:" _part-list)
|
|
|
|
|
(define #'(part-spec "PARTS:" _part-list)
|
|
|
|
|
#'_part-list)
|
|
|
|
|
|
|
|
|
|
(define-inverting #'(part-list _part ...)
|
|
|
|
|
(define #'(part-list _part ...)
|
|
|
|
|
#'(begin _part ...))
|
|
|
|
|
|
|
|
|
|
(define-inverting #'(part _partname "(" _firstpin "=" _firstval _commaidpair ... (_lastpin _pinout) ")" ";")
|
|
|
|
|
(define-inverting #'(part _partname "(" _firstpin "=" _firstval _another-id-pair ... (_lastpin _pinout) ")" ";")
|
|
|
|
|
#'(begin
|
|
|
|
|
(define _pinout (call-part _partname [_firstpin _firstval] _commaidpair ...))))
|
|
|
|
|
(define _pinout (call-part _partname [_firstpin _firstval] _another-id-pair ...))))
|
|
|
|
|
|
|
|
|
|
(define #'(comma-id-pair "," _firstid "=" _secondid)
|
|
|
|
|
(define #'(another-id-pair "," _firstid "=" _secondid)
|
|
|
|
|
#'(_firstid _secondid))
|
|
|
|
|
|
|
|
|
|
(define-inverting #'(call-part _Part [_pin-in _val-id] ...)
|
|
|
|
|
(define #'(call-part _Part [_pin-in _val-id] ...)
|
|
|
|
|
(with-syntax ([part-path (format "~a.hdl" (syntax->datum #'_Part))]
|
|
|
|
|
[(kw ...) (map (λ(pi) (string->keyword (format "~a" (syntax->datum pi)))) (syntax->list #'(_pin-in ...)))])
|
|
|
|
|
#'(let ()
|
|
|
|
|