Skip to content

Commit

Permalink
Merge branch 'master' into verilog-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Oct 4, 2018
2 parents 21dd8bc + 7d64f7e commit e3684e4
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[run]
omit =
silica/_config.py
silica/_testing.py
silica/magma_compile.py
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ python:

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- verilator
- g++-4.9

before_install:
# BEGIN: coreir installation
Expand All @@ -18,8 +21,13 @@ before_install:

install:
- pip install -r requirements.txt
- pip install python-coveralls
- pip install pytest pytest-cov

script:
- pip install -e .
- pytest --cov=silica --doctest-modules
- pytest --cov=silica


after_success:
- coveralls
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Silica
[![Build Status](https://travis-ci.org/leonardt/silica.svg?branch=master)](https://travis-ci.org/leonardt/silica)
[![Coverage Status](https://coveralls.io/repos/github/leonardt/silica/badge.svg?branch=master)](https://coveralls.io/github/leonardt/silica?branch=master)

A language for constructing hardware finite state machines using coroutines.

Expand Down
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def silica_test():
magma_clear_circuit_cache()
clear_cachedFunctions()

# os.system("rm -rf tests/build/*")
os.system("rm -rf tests/build/*")
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
description='',
packages=["silica"],
install_requires=[
"fault==0.24"
"fault==0.27"
]
)
5 changes: 5 additions & 0 deletions silica/magma_compile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# **NOTE:** Support for this backend is not currently being maintained so does
# not likely work in its current state.
# TODO: If reviving this backend, please enable coverage checking in
# `.coveragerc`

import ast
from silica.transformations.replace_assign_to_bits import replace_assign_to_bits
from silica.transformations.specialize_arguments import specialize_arguments
Expand Down
12 changes: 6 additions & 6 deletions tests/test_lbmem.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from common import evaluate_circuit


@si.combinational
def saturating_add(a : si.UInt(7), b : si.UInt(7), max_ : si.UInt(7)) -> si.UInt(7):
c = a + b
if c == max_:
c = 0
return c
# @si.combinational
# def saturating_add(a : si.UInt(7), b : si.UInt(7), max_ : si.UInt(7)) -> si.UInt(7):
# c = a + b
# if c == max_:
# c = 0
# return c


@si.generator
Expand Down

0 comments on commit e3684e4

Please sign in to comment.