-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from akukulanski/master
port nmigen -> amaranth
- Loading branch information
Showing
6 changed files
with
47 additions
and
30 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
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 @@ | ||
from .amaranth_cocotb import * |
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,17 +1,18 @@ | ||
from nmigen_cocotb import run, get_current_module | ||
from amaranth_cocotb import run, get_current_module | ||
from toplevel import design, ports | ||
|
||
import cocotb | ||
from cocotb.triggers import Timer | ||
|
||
|
||
@cocotb.test() | ||
def just_a_timer(dut): | ||
yield Timer(10, 'ns') | ||
async def just_a_timer(dut): | ||
await Timer(10, 'ns') | ||
|
||
|
||
def test_module(): | ||
run(design, get_current_module(), ports=ports, vcd_file='output.vcd') | ||
|
||
|
||
if __name__ == '__main__': | ||
test_module() | ||
|
||
|
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,13 +1,13 @@ | ||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name="nmigen_cocotb", | ||
version="0.1", | ||
name='amaranth-cocotb', | ||
author='Andres Demski', | ||
py_modules=['nmigen_cocotb'], | ||
packages=find_packages(), | ||
setup_requires=['cocotb'], | ||
install_requires=['cocotb-test @ git+https://github.com/themperek/cocotb-test.git#egg=cocotb-test', | ||
'nmigen @ git+https://github.com/nmigen/nmigen.git@master#egg=nmigen'], | ||
#dependency_links=['git+https://github.com/m-labs/nmigen.git#egg=nmigen', | ||
#'git+https://github.com/themperek/cocotb-test.git#egg=cocotb-test'] | ||
install_requires=[ | ||
'cocotb-test', | ||
'amaranth @ git+https://github.com/amaranth-lang/amaranth.git#egg=amaranth', | ||
'amaranth-yosys' | ||
] | ||
) |