-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into gussmith23/lr-egglog-…
…antiunify
- Loading branch information
Showing
24 changed files
with
2,339 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*.dep | ||
*.zo | ||
|
||
.vscode/* | ||
.lit_test_times.txt | ||
**/Output | ||
|
||
**/.DS_Store | ||
**/.lit_test_times.txt | ||
**/Output/ | ||
**/__pycache__ | ||
|
||
target | ||
Cargo.lock | ||
.env | ||
|
||
**/*.so* | ||
**/*.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# User should set these variables. | ||
# | ||
# Optional environment variables which you opt not to set should be | ||
# deleted/commented out. | ||
# | ||
# OPTIONAL: Path to llvm-config binary. Only needed if LLVM's `llvm-config` and | ||
# `FileCheck` binaries are not in the PATH. | ||
export LLVM_CONFIG="/path/to/llvm-config" | ||
# OPTIONAL: Path to Yosys binary. Only needed if the `yosys` binary is not | ||
# available on your path, or if you want to use a specific version of Yosys. | ||
export YOSYS="/path/to/yosys" | ||
|
||
|
||
# Do not modify below this line. | ||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
export CHURCHROAD_DIR=$SCRIPTPATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,7 @@ | |
|
||
target | ||
Cargo.lock | ||
.env | ||
|
||
**/*.so* | ||
**/*.d |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
[package] | ||
name = "lakeroad-egglog" | ||
name = "churchroad" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
egglog = { git = "https://github.com/egraphs-good/egglog", rev = "41562802315eccc9136c9d2ae6967d2df4071420" } | ||
log = "0.4.20" | ||
log = "0.4.20" | ||
lexpr = "0.2.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
# Churchroad | ||
|
||
:letsgo3: | ||
|
||
## Yosys Plugin | ||
|
||
[`./yosys-plugin/](./yosys-plugin/) | ||
|
||
We provide a Yosys plugin, | ||
which can output Churchroad IR | ||
from Yosys. | ||
Please see the README | ||
in that directory | ||
for information on building | ||
and using the plugin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
# This script exports a number of variables that help to pin the versions of | ||
# various Churchroad dependencies. | ||
# | ||
# To use, source this script before running relevant commands e.g. in a | ||
# Dockerfile. | ||
# | ||
# This is just one possible way to implement dependency tracking. Some of the | ||
# other options are: | ||
# - No tracking at all. E.g. in the Dockerfile, we could clone Yosys at a | ||
# specific commit, using a "magic constant" commit hash. This isn't ideal, | ||
# because if we use Yosys elsewhere (e.g. in the evaluation) we have to make | ||
# sure we keep the commit hashes in sync. | ||
# - Git submodules. This is very similar to what we've chosen to do, but it's | ||
# more directly supported by Git. However, it's a bit overkill to add a full | ||
# repository as a submodule when we only need the resulting binary. | ||
# | ||
# This option is essentially a lighter-weight version of submodules. We track | ||
# the commit hashes of the dependencies we need, but nothing additional is | ||
# cloned on a `git clone --recursive`. | ||
|
||
export YOSYS_COMMIT_HASH="f8d4d7128cf72456cc03b0738a8651ac5dbe52e1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
target | ||
# For now, adding Cargo.lock to repo. | ||
# Cargo.lock | ||
/target | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
black==24.2.0 | ||
lit==15.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
|
||
set -e | ||
|
||
cargo test | ||
cargo test | ||
|
||
./yosys-plugin/run_tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
churchroad.so: churchroad.cc | ||
$(CXX) $(shell yosys-config --cxxflags --ldflags) -shared -o $@ churchroad.cc -lboost_filesystem | ||
|
||
clean: | ||
rm -rfv *.d *.o churchroad.so* | ||
|
||
-include *.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Churchroad Backend Plugin for Yosys | ||
|
||
We provide a plugin | ||
for Yosys | ||
which produces Churchroad code. | ||
|
||
## Note on Building | ||
|
||
Yosys plugins are simply shared libraries | ||
that can be loaded into Yosys at runtime. | ||
As a result, | ||
you are required to build | ||
a Yosys plugin using the same | ||
build environment | ||
as your `yosys` binary. | ||
The easiest way to ensure this | ||
is to simply build Yosys | ||
from source. | ||
If you prefer to use | ||
a prebuilt Yosys binary, | ||
Yosys provides a Docker image | ||
which sets up the appropriate | ||
environment: | ||
<https://github.com/YosysHQ-GmbH/tabby-cad-plugin-build> | ||
We don't yet support | ||
using this option easily. | ||
If you would like this feature, | ||
please open an issue. | ||
Until then, all plugin users should build Yosys | ||
from source. |
Oops, something went wrong.