Commit graph

1571 commits

Author SHA1 Message Date
Catherine b2d8a18cbf lib.wiring: fix _gettypeattr fallback path. 2023-11-27 15:42:24 +00:00
Catherine a2e87b370e lib.wiring: fix typo in Signature.flatten. 2023-11-27 15:42:24 +00:00
Wanda 57748a66a6 lib.io: fix Pin.eq to work when FlippedInterface is involved.
This was broken by #915, when platform started handing out
`FlippedInterface` versions of `Pin`.
2023-11-27 06:35:55 +00:00
Catherine 74e613b49d lib.wiring: expand flipped object forwarding to respect @property and del.
Although `@property` is the most common case, any descriptors are now
properly supported.

The special casing of methods goes away as they work by having functions
implement the descriptor protocol. (`__get__` has some special behavior
to make this possible.)

This is some of the most cursed code I have ever written, yet it is
obviously necessary.
2023-11-26 12:53:59 +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
Catherine e7b15e1321 sim._pyrtl: formatting. NFCI 2023-11-25 06:26:36 +00:00
Catherine 89d1c9bb28 docs: update changelog. 2023-11-25 02:05:54 +00:00
Catherine 28e1d2833f test_lib_fifo: eliminate uses of deprecated Past and Rose. 2023-11-25 01:22:32 +00:00
Wanda 1b74c2904c docs: fix required yosys version. 2023-11-24 04:14:27 +00:00
William D. Jones abd74ead55 lib.wiring: flip sub-interfaces accessed via FlippedInterface. 2023-11-22 03:07:41 +00:00
Wanda 1802f7fddd lib.wiring: fix search-and-replace accident. NFC 2023-11-21 16:16:59 +00:00
Catherine fc06dd7644 back.verilog: require Yosys >=0.35.
Fixes #931.
2023-11-21 14:52:42 +00:00
Catherine f9da3c0d16 Pyupgrade to 3.8+. NFCI 2023-11-14 13:07:21 +00:00
Catherine e55dec9615 CI: adjust the required job to never be skipped.
While this fails a normal required status check, the merge group will
succeed even if a required status check is skipped.
2023-10-30 20:31:51 +00:00
Vegard Storheil Eriksen 879601380d ast: allow overriding Value operators. 2023-10-30 20:17:51 +00:00
Wanda 1c3227d956 lib.enum: use plain EnumMeta as metaclass when shape not used. 2023-10-25 17:00:24 +00:00
Wanda 4e4085a95b Implement RFC 20: Deprecate non-FWFT FIFOs.
Tracking issue #875.
2023-10-24 20:49:51 +00:00
Wanda a60b9960c5 lib.fifo: reimplement SyncFIFOBuffered without inner SyncFIFO. 2023-10-24 20:49:51 +00:00
Wanda bfd962670d lib.fifo: make fwft=True the default 2023-10-24 20:49:51 +00:00
Wanda e53d78474f test_lib_wiring: squash UnusedElaboratable warnings. 2023-10-24 20:18:16 +00:00
Wanda 00699f7c41 lib.enum: allow using functional syntax for enum creation.
Fixes #910.
2023-10-21 05:46:12 +00:00
Wanda dacbd9dfb0 docs: upgrade Sphinx. 2023-10-20 15:47:56 +00:00
Catherine 7e254b8657 build.res: fix issue #937. 2023-10-20 15:08:10 +00:00
Wanda 1159e52921 tracer: recognize Python 3.13's CALL_KW opcode. 2023-10-20 14:45:11 +00:00
Nelson Gauthier bc316b41a8 lib.io: Pin.oe should have Flow.Out 2023-10-20 13:41:36 +00:00
Vegard Storheil Eriksen 392ead8d00 lib.data: return View from .const() 2023-10-10 09:59:37 +00:00
Catherine 7582ec301c CI: fix YoWASP cache key calculation. 2023-10-09 00:27:49 +00:00
Catherine ac68453fe4 CI: require tests to pass on 3.12, test on 3.13-dev. 2023-10-09 00:27:49 +00:00
Wanda 470477a88f lib.wiring: fix Component.signature on subclasses without annotations.
On Python <3.10, classes without annotations do not get an
`__annotations__` member at all, so the `getattr` on a subclass falls
back to the parent class `__annotations__`, attempting to create
signature members twice.  Fix that by looking at the `__dict__` instead.
2023-10-08 22:49:47 +00:00
Jean-François Nguyen c7da6c1292 lib.wiring: add Interface to __all__. 2023-10-05 14:11:38 +00:00
Wanda ccf7aaf00d sim._pyrtl: fix masking for bitwise operands and muxes.
Fixes #926.
2023-10-05 12:26:47 +00:00
Catherine cce4e4462e build.plat: allow removing src attributes from RTLIL output.
This is important for Glasgow, which uses RTLIL hash as cache key,
and expects it to be stable between CI jobs.
2023-10-05 01:51:20 +00:00
Wanda c9416674d1 hdl.mem: fix transparent read handling for simple write ports.
Fixes #922.
2023-10-03 09:39:32 +00:00
David SPORN 0c3ada6250 Reference to my series of articles 2023-09-28 09:51:48 +00:00
Nelson Gauthier 8c56b2033f lib.wiring: Remove superfluous method alias 2023-09-27 17:50:33 +00:00
Catherine ec9da2d4d6 lib.wiring: Component.signature should not be a class method.
While the capability of providing signatures for components that are not
parametric is useful, most Amaranth gateware is heavily parameterized,
and the capability is not worth making most subclasses Liskov-incompatible
with the base class (where the derived class would not provide `signature`
as a class method anymore).
2023-09-27 11:32:06 +00:00
Catherine a90bc7b91a lib.wiring: create flipped interface from flipped signature.
Fixes #914.

Co-authored-by: Nelson Gauthier <nelson.gauthier@gmail.com>
2023-09-27 11:17:29 +00:00
Catherine b871f2ad79 pyproject: use yowasp-yosys for tests.
This change means that tests will succeed even if the system Yosys binary is broken.
yices2 must still be present on the system.
2023-09-27 11:17:29 +00:00
Catherine fcafad1f70 hdl.ir: Elaboratable does not need ABCMeta as its metaclass.
This was introduced in commit 44711b7d, and was never used within
Amaranth itself. While technically a breaking change I think this
will not cause enough breakage to warrant a deprecation cycle
(nor can we make this a deprecation this without a lot of work).
2023-09-25 17:19:48 +00:00
Catherine 04b542a626 vendor._gowin: fix typo. 2023-09-25 14:15:11 +00:00
Catherine 57933b974d ast: fix pylance's type inference on Value._rhs_signals(). NFC 2023-09-25 14:15:11 +00:00
Catherine e6ec0be889 examples,docs: ensure amaranth-boards is available as a dev dependency. 2023-09-25 14:15:11 +00:00
Catherine d27681b157 vendor.GowinPlatform: account for rouding error in frequency calculation. 2023-09-25 08:41:49 +00:00
Catherine 47851c2328 vendor.GowinPlatform: fix fencepost error in oscillator range.
Python ranges are half-open (exclusive).
2023-09-25 08:41:49 +00:00
Catherine bfd62569c8 vendor.GowinPlatform: improve oscillator frequency diagnostic. 2023-09-25 08:41:49 +00:00
Wanda 05cb82b8fc ast: fix const-castable expression handling in Signal(reset=).
The code to accept const-castable expressions was previously added in
0c4fda92fe, but it was untested and had
a few bugs.

Fixes #911.
2023-09-24 02:46:43 +00:00
crzwdjk 11d5bb19eb vendor._lattice_ice40: add an icepack_opts override
Add an icepack_opts override in case the user wants to pass
extra options to icepack as part of the build process.
2023-09-13 20:05:01 +00:00
Catherine ecba1a1863 back.rtlil: put hierarchy in module name instead of an attribute.
The attribute sees essentially no use and the information is much
better served by putting it in the module name. In addition this
means that the entire tree can be renamed simply by renaming the top
module.

Tools like GTKWave show the names of the instances, not the modules,
so they are not affected by the longer names.
2023-09-13 12:46:46 +00:00
Catherine d32ca04326 pyproject: migrate to PDM build backend.
`.git_archival.txt` and the functionality of deriving SCM version
from a GitHub generated archive is removed pending implementation of
pdm-project/pdm-backend#194.
2023-09-12 01:40:48 +00:00
Catherine a9d03805ff lib.io: add a deprecation warning on Pin.eq.
This will stop working once `Pin` is no longer inheriting from
`Record`.
2023-09-05 14:07:33 +00:00