Next: , Previous: Overview, Up: Top


2 Infrastructure

SIMSYNCH unpacks into a directory called ‘synch’. I set up design directories as peers of ‘synch’; that is, both are subdirectories of the same directory. I find it useful to put related designs in one directory. I use short design names which prefix all SIMSYNCH files which comprise that design. For instance, a design comprised of files foo.scm, fooio.scm, and foojtag.scm having a block named ‘xp’ would compile into foo-xp.pds. In order to load SIMSYNCH files, you need to create a local SLIB catalog (named usercat) within the design directory or your HOME directory. This catalog translates symbols to the pathnames of SIMSYNCH files.

     ;;; "usercat": SLIB catalog additions for SIMSYNCH.     -*-scheme-*-
     (
      (simsynch      . "../synch/simsynch.scm")
      (run           . "../synch/run.scm")
      (models        . "../synch/models.scm")
      (logic         . "../synch/logic.scm")
      (machxl        . "../synch/scm2mach.scm")
      (verilog       . "../synch/scm2vrlg.scm")
      (vhdl          . "../synch/scm2vhdl.scm")
      )

My design files can then load SIMSYNCH with the expression:

(require 'simsynch)

— Function: Time-stamp: time-string

The Time-stamp: procedure is named to exploit a feature of the Emacs text editor. The Emacs command ‘M-x time-stampupdates the string in the Time-stamp: expression to the current time and author.

If Time-stamp: is not called, the default time-stamp is #f; the default author is me. — Function: Revision-stamp: obj
— Function: Configuration-stamp: obj
— Function: Company-stamp: company-name-string

The rest of these stamps are not supported by Emacs. All of these information fields are used in creating the headers for logic compiler design files. This information can also be used to in creating identification fields for programmable logic devices.

          (Time-stamp: "97/10/17 14:31:24 jaffer")
          (Company-stamp: "Bipolar Technologies")
          (Revision-stamp: 0)
— Function: create-board board-name dbtype

Creates an SLIB relational database of type dbtype as file board-name.db. The returned open database has empty tables for describing the pin and signal arrangements for a design.

After all calls have been made to define-synchronous-system, do the following to commit the database file:

          (solidify-database *board*)

If the database file board-name.db was not closed, solidified, or synced from a previous run, create-board will fail with the error:

          ;                        loading SIMSYNCH 1b7
          
          ;While loading "../synch/simsynch.scm", line 219:
            ;loaded from "uart.scm", line 24:
          ;ERROR: "uart.db" locked by "jaffer@aubrey.jaffer.3837:1056316195"

In order to proceed, delete the .#board-name.db and/or ~$board-name.db files:

            36 Jun 22 17:09 .#uart.db -> jaffer@aubrey.jaffer.3837:1056316195
           162 Jun 22 17:09 ~$uart.db
— Variable: *design*

This symbol names the design. *design* should be set before loading SIMSYNCH files. The design name is used in constructing filenames. The default value for *design* is test.

— Variable: *board*

When loaded, the file simsynch.scm sets the identifier *board* to the database created by (create-board *design* 'alist-table).

— Function: comment string1 ...

Appends string1 ... to the strings given as arguments to previous calls comment. — Function: comment

Returns the (appended) strings given as arguments to previous calls comment and empties the current string collection.

— Read syntax: #;text-till-end-of-line

Behaves as (comment "text-till-end-of-line").

synch:register-ptag, synch:register-block, synch:define-pin, and synch:define-signal capture the documentation strings specified before them by ‘#;’ or calls to comment.