Commit graph

1594 commits

Author SHA1 Message Date
Wanda ea561378ac hdl._nir: Remove ArrayMux, use AssignmentList instead. 2024-03-03 18:52:21 +00:00
Wanda fc9369b8e1 hdl._xfrm: Simplify EnableInserter logic. 2024-03-03 18:38:20 +00:00
Wanda 7d295b040a test_hdl_ir: Add a bunch of tests for NIR emitter. 2024-03-03 18:09:08 +00:00
Wanda 3ae7714d04 hdl._ir: Fix reset-less signals in async reset domains. 2024-03-03 18:09:08 +00:00
Wanda 2400d39730 lib.io: Make Pin.name return the whole path.
This prevents duplicate pin names.
2024-02-29 20:32:43 +00:00
Catherine 871d726ad4 build.plat: use tcl_quote instead of tcl_escape.
The premise of `tcl_escape` is incorrect: it is not possible, by design,
to escape a single backslash inside of a Tcl {}-quoted string:

    $ tclsh
    % puts {\\}
    \\

`tcl_quote` should be used instead since it can escape arbitrary strings
(and uses the right algorithm already).
2024-02-29 20:07:38 +00:00
Jaro Habiger 65191be1b1 vendor._lattice_{ice40,ecp5,machxo_2_3l}: fix SDC hierarchy separator. 2024-02-29 20:07:38 +00:00
Catherine 4399700273 vendor._lattice_machxo2_3l: fix buffer factories. 2024-02-29 20:07:38 +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 2bf1b4dafc hdl._ast: Make AST nodes immutable.
Fixes #1067.
2024-02-29 18:56:46 +00:00
Wanda 3271f85650 hdl._nir: Add empty __slots__ to Net and Value. 2024-02-29 18:54:57 +00:00
Wanda f8e2d26b8f hdl._ir: Inline AssignmentLegalizer into netlist building.
Fixes #1150.
2024-02-28 15:15:42 +00:00
Catherine 3a1f0a7c32 CI: use HEAD Amaranth for smoke testing. 2024-02-28 14:18:18 +00:00
Wanda 544258354b build.plat, back.rtlil: Fix #1104 fallout. 2024-02-28 13:51:10 +00:00
Catherine aa9f48ccb2 CI: smoketest some downstream projects. 2024-02-28 13:34:11 +00:00
Wanda 2356e8d06b build.plat: Fix toolchain_prepare interface breakage. 2024-02-28 12:23:38 +00:00
Wanda f2dab705ee lib.io: Expose Pin path and name as attributes. 2024-02-28 11:49:35 +00:00
Wanda 1dd2e6150c lib.io: Add missing __repr__ to signature type. 2024-02-28 09:11:53 +00:00
Wanda 8af9fe2606 lib.memory: Add missing __eq__ to signature types. 2024-02-28 09:06:49 +00:00
Wanda c6bc9b47ef hdl.ir: add IOBufferInstance. 2024-02-27 18:56:24 +00:00
Wanda 85bb5ee77c hdl._dsl: Change FSM codegen to avoid mutating AST nodes.
Fixes #1066.
2024-02-27 16:20:25 +00:00
Wanda f524dd041a lib.io, build.res: Make Pin and related objects interfaces.
Fixes #1040.
2024-02-27 11:40:25 +00:00
Wanda c30585b47b back.rtlil: Emit proper source location for port-signals. 2024-02-27 11:06:42 +00:00
Wanda 1cb9d43841 back.rtlil: Remove code allowing internal yosys cells in Instance.
This was allowed only because Amaranth used it internally. Now that
all uses are gone, let's just disallow it entirely.
2024-02-27 10:34:30 +00:00
Catherine 6dc7c2718c docs/guide: fix a bunch of TODOs. 2024-02-27 09:10:29 +00:00
Catherine 77e41cc88a docs: add stub stdlib/memory, mark guide as done. 2024-02-27 09:10:29 +00:00
Wanda 751e0f4b57 ir: kill Fragment.ports 2024-02-27 08:26:30 +00:00
Wanda a725282751 sim.pysim: Only close VCD/GTKW files if we opened them ourselves.
Fixes #1107.
2024-02-27 07:42:39 +00:00
Wanda fc81ff17f7 hdl._ir: Improve driver-driver conflict message. 2024-02-27 06:31:27 +00:00
Wanda ccf87c62e4 back.rtlil: strip \ from names added to name_map.
Fixes #1154.
2024-02-27 06:26:56 +00:00
Amelia Cuss a586df89ad lib.wiring.connect: diagnostic when no connection made.
If a connect() call results in no connections being made, and it's
because there were no outputs specified at all, issue an error.
Tests enumerate cases per
https://github.com/amaranth-lang/amaranth/pull/1153#issuecomment-1962810678.

Co-authored-by: Catherine <whitequark@whitequark.org>
2024-02-25 09:33:46 +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
Amelia Cuss c40cfc9fb5 lib.enum: honor enum.nonmember.
Use _EnumDict._member_names to determine which members to consider.
This way we don't need to redo sunder/dunder checks, and `nonmember`s
(introduced in py3.11) are correctly excluded.

This is a defacto public API, given it remains usable from py3.8
until py3.12 inclusive.  (_member_names changes from a list to a
keys-only dict for performance reasons in py3.11, but they iterate the
same.) In current Python main (i.e. what will most likely be 3.13), a
"member_names" property is added which returns those keys.
2024-02-19 23:06:22 +00:00
Wanda 890e099ec3 Implement RFC 45: Move hdl.Memory to lib.Memory. 2024-02-19 22:24:58 +00:00
Wanda 6d65dc1366 hdl, back.rtlil: track and emit module/submodule locations. 2024-02-19 21:41:32 +00:00
Wanda 188eb8d453 back.rtlil: emit wire signedness according to Signal signedness. 2024-02-16 22:03:30 +00:00
Wanda 6058ad35cf hdl._ast: make Shape immutable and hashable.
Fixes #1127.
2024-02-16 15:21:05 +00:00
Wanda 24a392887a Implement RFC 43: Rename reset= to init=. 2024-02-15 22:52:24 +00:00
Catherine b30c87fa3e pyproject: suppress superfluous warning. 2024-02-15 19:58:19 +00:00
Catherine 52842ee524 docs: fix link rot. 2024-02-15 19:58:19 +00:00
Wanda e3324e1456 hdl._dsl: fix using 0-width Switch with integer keys.
Fixes #1133.
2024-02-14 19:13:14 +00:00
Wanda 5ffb48b5fb hdl._ast: fix using 0-width Switch with integer keys.
This comes up in `AssignmentLegalizer`-produced `Switch`es for
`ArrayProxy`.
2024-02-14 11:52:35 +00:00
Wanda 0ecd06a7e5 sim: fix using 0-width Switch. 2024-02-14 11:51:19 +00:00
Wanda 8033ddf05e pyproject: change yosys-yowasp requirement to match RTLIL backend. 2024-02-14 11:50:36 +00:00
Wanda 353a8ce7e3 README: add the full list of supported AMD devices. 2024-02-13 21:47:18 +00:00
Catherine 4a8dd808c3 Ensure we build sensible sdists. 2024-02-13 12:52:05 +00:00
Catherine 8677ced404 Update README. 2024-02-13 12:52:05 +00:00
Catherine 0eac9c3fd0 CI: verify package metadata on all builds. 2024-02-13 12:52:05 +00:00
Catherine 841ab94a76 CI: publish packages automatically. 2024-02-13 11:43:44 +00:00