Skip to content

WIP: CHG: Use pycparser as a git submodule #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "submodule/pycparser"]
path = submodule/pycparser
url = https://github.com/eliben/pycparser
5 changes: 5 additions & 0 deletions src/C_TO_FSM.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
import os

import C_TO_LOGIC

from utilities import REPO_ABS_DIR

# TODO: Temporarily import from submodule, remove this hack when we create a proper pipelinec setup.py
sys.path.append(REPO_ABS_DIR() + '/submodule/pycparser')
from pycparser import c_ast, c_generator

# FSM funcs cant be main functions
Expand Down
4 changes: 4 additions & 0 deletions src/C_TO_LOGIC.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
# TODO fall back to clang tools?
raise Exception("'cpp' C preprocessor is not installed!")

# TODO: Temporarily import from submodule, remove this hack when we create a proper pipelinec setup.py
sys.path.append(REPO_ABS_DIR() + '/submodule/pycparser')
from pycparser import c_ast, c_parser

# Global default constants for inferring different VHDL implementations of operators
MULT_STYLE_INFERRED = "infer"
MULT_STYLE_FABRIC = "fabric"
Expand Down
7 changes: 6 additions & 1 deletion src/RAW_VHDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
import C_TO_LOGIC
import SW_LIB
import VHDL
from pycparser import c_ast, c_parser # bleh for now

from utilities import REPO_ABS_DIR

# TODO: Temporarily import from submodule, remove this hack when we create a proper pipelinec setup.py
sys.path.append(REPO_ABS_DIR() + '/submodule/pycparser')
from pycparser import c_ast


# Declare variables used internally to c built in C logic
Expand Down
5 changes: 5 additions & 0 deletions src/SW_LIB.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
import C_TO_LOGIC
import SYN
import VHDL

from utilities import REPO_ABS_DIR

# TODO: Temporarily import from submodule, remove this hack when we create a proper pipelinec setup.py
sys.path.append(REPO_ABS_DIR() + '/submodule/pycparser')
from pycparser import c_ast

# Hey lets bootstrap for fun
Expand Down
5 changes: 5 additions & 0 deletions src/VHDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
import SYN
import VERILATOR
import VIVADO

from utilities import REPO_ABS_DIR

# TODO: Temporarily import from submodule, remove this hack when we create a proper pipelinec setup.py
sys.path.append(REPO_ABS_DIR() + '/submodule/pycparser')
from pycparser import c_ast

VHDL_FILE_EXT = ".vhd"
Expand Down
92 changes: 0 additions & 92 deletions src/pycparser/__init__.py

This file was deleted.

Binary file removed src/pycparser/__init__.pyc
Binary file not shown.
Loading