https://github.com/ams/cadr4
CADR4 -- accurate model of the MIT CADR
https://github.com/ams/cadr4
cadr lisp lisp-machine lispmachine machine mit retrocomputing
Last synced: 5 months ago
JSON representation
CADR4 -- accurate model of the MIT CADR
- Host: GitHub
- URL: https://github.com/ams/cadr4
- Owner: ams
- License: agpl-3.0
- Created: 2023-10-30T16:55:38.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-08-22T18:58:20.000Z (10 months ago)
- Last Synced: 2025-08-22T20:58:48.900Z (10 months ago)
- Topics: cadr, lisp, lisp-machine, lispmachine, machine, mit, retrocomputing
- Language: VHDL
- Homepage: http://tumbleweed.nu/lm-3
- Size: 121 MB
- Stars: 17
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# cadr4
Experiments of the third kind... This is an attempt at making a
faithful and accurate HDL implementation of CADR. There will be no
attempt at making this synthesizable (at this time)!
## Random chit-chat
There is a IRC channel on irc.libera.net, ##lispm for random
chit-chat. Feel free to send bugs directly to ams@gnu.org.
## Setup
### Prerequisites
- Git
- GNU Make
- Python 3
- [GHDL](http://ghdl.free.fr/) with the GCC or LLVM code generator or [NVC](https://github.com/nickg/nvc)
- optionally some sort of FST/VCD viewer:
- [Surfer](https://surfer-project.org)
- [GTKWave](https://gtkwave.sourceforge.net/)
### Makefile
Makefile is divided into three parts; Makefile.config and Makefile.common are always used.
Makefile.ghdl and Makefile.nvc are used depending on the value of the CADR4_HDLCOMPILER variable (ghdl or nvc). Default is ghdl.
### Build
```
git clone https://github.com/ams/cadr4
cd cadr4
make
```
All build artifacts are created under `build` directory.
### Run
#### Run CADR
Two special testbenches cadr_tb and cadr_boot_tb are autogenerated by make (build/cadr_tb.vhd and build/cadr_boot_tb.vhd), and it connects everything in CADR and ICMEM. cadr_boot_tb auto boots CADR.
```
make run-cadr_tb or run-cadr_boot_tb
```
The diagnostic display (5x 7-segment LED displays with dot) is displayed on the console.
#### Run Tests
```
make check
```
runs all available tests.
## wave.opt file (GHDL)
This is only applicable when GHDL is used.
If there is a `wave.opt` file at the project root, it is used as waveform options file in GHDL (`--read-wave-opt`).
If the file contains "recreate" in its first line, the file is deleted and recreated. This will show all signal paths.
If the file contains "ignore" in its first line, the file is ignored, `--read-wave-opt` is not used.
## top.include and top.exclude files (NVC)
This is only applicable when NVC is used.
NVC by default uses top.include and top.exclude files (where top representes the name of the top-level unit name) in the project root.
Every signal in the design hierarchy is saved to `build/signals.nvc` gtkwave save file with `wf-%` target.
## File Organization
- cadr: cadr and icmem components based on CADR schematics
- cadr1: busint components based on CADR1 schematics
- cosim_vhpi: VHPI cosimulation sources for NVC
- cosim_vpi: VPI cosimulation sources for GHDL
- dip: dip components used by cadr, icmem and busint components
- doc: various documents and resources
- helper: non-CADR components required to run cadr_tb
- rom: ROM files loaded to CADR (P)ROMs and RAMs
- scripts: utility scripts
- soap: utility to generate SUDS (*_suds.vhd) files
- ttl: ttl components used by dip components
Each folder have a README.md containing more information.
## Packages
- work.cadr_book: cadr components
- work.icmem_book: icmem components
- work.busint_book: busint components
- work.dip: dip components
- work.amd,ecc,fairchild,intel,signetics,sn74,other: ttl components
- work.misc: misc functions and procedures (no components)
## Documentation
- [The CADR Microprocessor](https://tumbleweed.nu/r/lm-3/uv/cadr.html)
- [Implementation of a List Processing Machine](https://tumbleweed.nu/r/lm-3/uv/knight-thesis.html)
- [CADR Schematics](https://tumbleweed.nu/lm-3/schematics.html)
- [Interactive CADR Schematics](https://www.nexoid.at/cadr/clock1.html)