If you don't have a Python version 3.7 or greater installed, you can install it with https://conda.io/miniconda.html.
See https://github.com/rdaly525/coreir/blob/master/INSTALL.md for instructions
You'll need the dependencies for the hwtypes packages, see these instructions
Used for Verilog simulation
$ brew install verilator
$ apt-get install verilator
Install Python libraries
$ pip install magma-lang mantle fault
$ pip install pytest
$ pytest tests