Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 2.79 KB

README.org

File metadata and controls

58 lines (47 loc) · 2.79 KB

CHIL: Constructing Hardware in Lisp

CHIL — Constructing Hardware in Lisp

Based on the ideas of parameterized hardware with higher-level type-checking from Chisel and Nanopass Compiler Construction. In addition, the highly malleable Lisp family of languages can allow for syntactic extensions that would be very difficult in Verilog, SystemVerilog, or VHDL, or simply difficult in Scala and Chisel.

Dependencies

  • A Common Lisp compiler (SBCL preferred)
    • I am trying to write this in a portable way (as this is mostly a DSL), so any compiler may work.
  • ASDF (Another System Definition Facility)
    • This is the build tool
    • It does *NOT* download dependencies for you!
  • Quicklisp
    • This is the package management tool for Common Lisp.
    • Quicklisp plugs into ASDF to download and load/build the source for you.
  • UIOP (Utilities for Implementation and OS Portability)
  • Alexandria
  • ~lisp-unit2~
    • Only needed for testing!

Building

CHIL builds using the standard ASDF build system.

Building on the REPL

Make sure ASDF is capable of finding your copy of CHIL.

  1. (asdf:compile-system :chil)

If you want to force a rebuild, ASDF supports that too. (asdf:compile-system :chil :force t).

Known Problems

When compiling Chil, you will receive the following deprecation warning:

   DEPRECATED-FUNCTION-STYLE-WARNING: Using deprecated function ASDF/BACKWARD-INTERFACE:SYSTEM-DEFINITION-PATHNAME -- please update your code to use a newer API.
The docstring for this function says:
DEPRECATED. This function used to expose ASDF internals with subtle
differences with respect to user expectations, that have been refactored
away since. We recommend you use ASDF:SYSTEM-SOURCE-FILE instead for a
mostly compatible replacement that we're supporting, or even
ASDF:SYSTEM-SOURCE-DIRECTORY or ASDF:SYSTEM-RELATIVE-PATHNAME
if that's whay you mean.

This comes from check-it’s package.lisp file. check-it has not received updates in several years, so it uses now-deprecated functions from asdf3. The interoperation of check-it with lisp-unit2 is a known pain-point, and those issues along with this deprecation leads me to beleive forking or making my own property-testing library will be a good idea.

Testing

CHIL uses lisp-unit2 for its unit testing system.

Testing on the REPL

Make sure ASDF if capable of finding your copy of CHIL and lisp-unit2.

  • (asdf:test-system :chil)
  • (lisp-unit2:run-tests :package :chil/tests)

Why?

I personally felt this when specialty connection operators were required to be defined as experimental in chisel3; operators which I needed to connect hardware together.