amaranth/nmigen
whitequark 1fc63a62c0 back.pysim: allow coroutines as processes.
This is a somewhat obscure use case, but it is possible to use async
functions with pysim by carefully using @asyncio.coroutine. That is,
async functions can call back into pysim if they are declared in
a specific way:

  @asyncio.coroutine
  def do_something(self, value):
    yield self.reg.eq(value)

which may then be called from elsewhere with:

  async def test_case(self):
    await do_something(0x1234)

This approach is unfortunately limited in that async functions
cannot yield directly. It should likely be improved by using async
generators, but supporting coroutines in pysim is unobtrustive and
allows existing code that made use of this feature in oMigen to work.
2019-08-21 03:30:37 +00:00
..
back back.pysim: allow coroutines as processes. 2019-08-21 03:30:37 +00:00
build build.plat, hdl.ir: coordinate missing domain creation. 2019-08-19 22:52:01 +00:00
compat back.{rtlil,verilog}: split convert_fragment() off convert(). 2019-08-19 19:49:51 +00:00
hdl build.plat, hdl.ir: coordinate missing domain creation. 2019-08-19 22:52:01 +00:00
lib lib.cdc: use a local clock domain in ResetSynchronizer. 2019-08-19 21:45:08 +00:00
test test.test_examples: Convert pathlib-specific class to string. 2019-08-20 00:54:10 +00:00
vendor vendor.lattice_ice40: use a local clock domain in create_missing_domain(). 2019-08-19 21:46:44 +00:00
__init__.py Fix nmigen.__version__ to work on git-archive artifacts. 2019-08-19 23:14:41 +00:00
_version.py Add versioneer. 2019-05-26 11:20:13 +00:00
asserts.py formal→asserts 2019-08-19 20:23:24 +00:00
cli.py hdl.ir: rename .get_fragment() to .elaborate(). 2019-01-26 02:31:12 +00:00
tools.py hdl: make all public Value classes other than Record final. 2019-05-12 05:40:17 +00:00
tracer.py tracer: fix typo. 2019-08-19 20:20:18 +00:00