Commit graph

37 commits

Author SHA1 Message Date
Wanda 877a1062a6 hdl._nir: add combinational cycle detection.
Fixes #704.
Fixes #1143.
2024-04-13 14:01:47 +00:00
Wanda 580706fafd hdl._nir, back.rtlil: use Format.* to emit enum attributes and wires for fields. 2024-04-11 22:02:26 +00:00
Wanda 7936b87667 hdl._ir: add caches for Matches and PriorityMatch cells. 2024-04-06 10:25:42 +00:00
Wanda 9bd536bbf9 hdl._ir: fix SwitchValue LHS lowering. 2024-04-04 23:13:00 +00:00
Wanda 2d59242bf7 back.rtlil: refactor to use intermediate structures.
Fixes #1100.
2024-04-04 00:58:39 +00:00
Wanda 81c35a5922 hdl._ir: remove Fragment.drivers. 2024-04-04 00:55:06 +00:00
Wanda f21d3d0c6a hdl._ir: add all_undef_to_ff mode. 2024-04-03 18:47:45 +00:00
Wanda 466536efcf hdl._ir: raise an error when an elaboratable is duplicated in hierarchy.
Fixes #1194.
2024-04-03 10:11:07 +00:00
Wanda 2cf9bbf306 hdl._ast: add SwitchValue, reimplement ArrayProxy with it. 2024-04-03 10:01:44 +00:00
Wanda 0e4c2de725 Implement RFC 59: Get rid of upwards propagation of clock domains 2024-04-02 17:00:42 +00:00
Wanda 0c041f2602 hdl._ir: rename Instance.named_ports to Instance.ports.
Made possible by the new port propagation code freeing up the name.
2024-03-26 20:36:12 +00:00
Thomas Watson c7f719ab93 hdl.ast: allow Signals to be privately named using name=""
* Given a private name `$\d+` in RTLIL (as they are not named in the IR)

* Not automatically added to VCD files (as they are not named in the IR)

* Cannot be traced to a VCD (as they have no name to put in the file)

* Cannot be used with an unnamed top-level port (as there is no name)
2024-03-25 19:15:24 +00:00
Wanda 8c65a79cdd hdl._ir: Remove support for non-Elaboratable elaboratables.
Fixes #1216.
2024-03-20 08:20:23 +00:00
Wanda 744576011f Implement RFC 53: Low-level I/O primitives.
Co-authored-by: Catherine <whitequark@whitequark.org>
Co-authored-by: mcclure <mcclure@users.noreply.github.com>
2024-03-18 20:33:22 +00:00
Wanda 18b54ded0a hdl._ir: Fix fallout from #1190, add more tests. 2024-03-16 14:17:00 +00:00
Wanda cb96b15b8c hdl._ir: Remove all support for fragment flattening. 2024-03-11 21:28:46 +00:00
Wanda bfe541a6d7 Implement RFC 50: Print and string formatting.
Co-authored-by: Catherine <whitequark@whitequark.org>
2024-03-11 09:42:43 +00:00
Wanda 127fe1fd2e hdl._xfrm: Get rid of _insert_resets, move the logic downstream. 2024-03-03 19:34:35 +00:00
Wanda ea561378ac hdl._nir: Remove ArrayMux, use AssignmentList instead. 2024-03-03 18:52:21 +00:00
Wanda 7d295b040a test_hdl_ir: Add a bunch of tests for NIR emitter. 2024-03-03 18:09:08 +00:00
Wanda 76a7dc396c hdl._ir: Handle duplicate fragment names. 2024-02-29 20:03:38 +00:00
Wanda 047b64d02c test_hdl_ir: Add NIR testcases for Instance. 2024-02-29 19:39:20 +00:00
Wanda f8e2d26b8f hdl._ir: Inline AssignmentLegalizer into netlist building.
Fixes #1150.
2024-02-28 15:15:42 +00:00
Wanda c6bc9b47ef hdl.ir: add IOBufferInstance. 2024-02-27 18:56:24 +00:00
Wanda 751e0f4b57 ir: kill Fragment.ports 2024-02-27 08:26:30 +00:00
Catherine 09029cdd91 hdl._ir: remember origins of a fragment during elaboration.
This isn't expected to result in a significant increase in memory use,
so for now it's enabled by default. Elaboration chains where it is not
desired to preserve origins can delete the `origins` attribute from
the fragment and nothing will be stored.

The interface `Fragment.origins` remains private, as is the rest of
the `Fragment` interface (including itself), but it enables certain
codebases that currently use a much more invasive technique to rely on
reading a single private field.
2024-02-22 19:03:55 +00:00
Wanda 6d65dc1366 hdl, back.rtlil: track and emit module/submodule locations. 2024-02-19 21:41:32 +00:00
Wanda 45dbce13df hdl: consistently use "comb" for combinatorial domain.
Fixes #1097.
2024-02-09 19:32:55 +00:00
Wanda 6e06fc013f hdl.ir: associate statements with domains.
Fixes #1079.
2024-02-09 05:33:16 +00:00
Catherine 5dd1223cf8 amaranth.hdl: start all private names with an underscore.
This change completes commit 9dc0617e and makes all the tests pass.
It corresponds with the ongoing langauge reference documentation effort.

Fixes #781.
2024-01-30 17:20:45 +00:00
Catherine 79adbed313 sim.pysim: move name extractor functionality to Fragment.
At the moment there are two issues with assignment of names in pysim:
1. Names are not deduplicated. It is possible (and frequent) for names
   to be included twice in VCD output.
2. Names are different compared to what is emitted in RTLIL, Verilog,
   or CXXRTL output.

This commit fixes issue (1), and issue (2) will be fixed by the new IR.
2023-11-25 06:26:36 +00:00
Marcelina Kościelnicka 8c4a15ab92 hdl.mem: lower Memory directly to $mem_v2 RTLIL cell.
The design decision of using split memory ports in the internal
representation (copied from Yosys) was misguided and caused no end
of misery. Remove any uses of `$memrd`/`$memwr` and lower memories
directly to a combined memory cell, currently the RTLIL one.
2023-09-03 03:27:51 +00:00
whitequark 599615ee3a hdl.ir: reject elaboratables that elaborate to themselves.
Fixes #592.
2021-12-11 12:40:05 +00:00
whitequark 909a3b8be7 Rename nMigen to Amaranth HDL. 2021-12-10 10:34:13 +00:00
Robin Ole Heinemann 2d85f888d6 tests: rename tests with duplicate names 2021-05-18 20:18:55 +00:00
Xiretza eb152da59b hdl.ir: Update error message for Instance arguments
48d4ee4 added the option to specify attributes using Instance arguments,
but the error message wasn't updated accordingly.
2020-10-18 23:55:46 +00:00
whitequark 67b957d4f4 tests: move out of the main package.
Compared to tests in the repository root, tests in the package have
many downsides:
  * Unless explicitly excluded in find_packages(), tests and their
    support code effectively become a part of public API.
    This, unfortunately, happened with FHDLTestCase, which was never
    intended for downstream use.
  * Even if explicitly excluded from the setuptools package, using
    an editable install, or setting PYTHONPATH still allows accessing
    the tests.
  * Having a sub-package that is present in the source tree but not
    exported (or, worse, exported only sometimes) is confusing.
  * The name `nmigen.test` cannot be used for anything else, such as
    testing utilities that *are* intended for downstream use.
2020-08-27 00:33:31 +00:00
Renamed from nmigen/test/test_hdl_ir.py (Browse further)