Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased¶
Added¶
Changed¶
Deprecated¶
Removed¶
Fixed¶
0.8.0 - 2025-06-26¶
Added¶
New library module
torii.lib.memfor more generic-ish not SoC specific memory constructs, such as maps for busses.New library module
torii.lib.busAdded
torii.lib.coding.cobsmodule for Consistent Overhead Byte Stuffing encoders.Added
torii.lib.coding.cobs.RCOBSEncoderfor Reverse Consistent Overhead Byte Stuffing, which is a streaming friendly COBS implementation that doesn’t need a full message buffer.
Added
torii.hdl.ast.Edgefortorii.hdl.ast.Samplebased edge detection on either rising or falling edges.The
torii.test.TestCasenow has anengineproperty that lets you specify the simulation backend, It’s onlypysimfor now.Added
onandenabledas valid values forTrueandoffanddisabledas valid values forFalsewhen thetypeparam ofget_linter_optionisbool.Added new
torii.util.fsmodule for Filesystem related utilities and abstractions, currently only hasworking_dir, which is a context manager for switching working directories for an operation.Added a new way to build C++-based native modules with
torii.tools.cxx.compile_cxx.
Changed¶
torii.hdl.ast.Pastis now exported in the roottorii.hdlmodule.torii.util.get_linter_optionsnow inspects the whole file for “Magic Comments”torii.util.get_linter_optionandtorii.util.get_linter_optionshave been memoized to prevent expensive re-parsing of large files.torii.tools.cxx.build_cxxis now based on the newtorii.tools.cxx.compile_cxx.
Deprecated¶
The
torii.tools.yosys.YosysErrorbeing exported fromtorii.back.cxxrtlandtorii.back.veriloghas been deprecated and will be removed in a future release.The
torii.lib.soc.memorymodule has been deprecated and contents moved totorii.lib.memtorii.lib.soc.memory.MemoryMapandtorii.lib.soc.memory.ResourceInfoare now intorii.lib.mem.map
The
torii.lib.soc.wishbonemodule has been deprecated and contents moved totorii.lib.bus.wishbone.The
torii.util.decorators.memoizedecorator has been deprecated in favor offunctools.cache.The
torii.util.decorators.extenddecorator has been deprecated and is slated for removal.The
torii.tools.cxx.build_cxxfunction is deprecated in favor of thetorii.tools.cxx.compile_cxxfunction replacement.The
rdyandacksignals insidetorii.lib.stdio.AsyncSerialRxhave been renamed todoneandstartto better align with their function.
Fixed¶
Lots of documentation fixes.
Made sure that pullup attribute annotations on iCE40 devices are respected and conveyed through the PCF
0.7.7 - 2025-03-11¶
Deprecated¶
torii.lib.streams.simple.StreamInterface.connecthas been deprecated as it shadows the superclass method in an incompatible way.
Fixed¶
Added missing
connectmethod on thetorii.lib.streams.simple.StreamInterface.
0.7.6 - 2025-03-7¶
Fixed¶
Fixed the omission of the extra stream fields in the
torii.lib.stream.simple.StreamInterface’sattach
0.7.5 - 2025-03-7¶
Added¶
Added kwargs-based constructor to
DomainRenamerto allow for more ergonomic usage (DomainRenamer(sync = 'pipe'))Added new library components
torii.lib.streamtorii.lib.stream.simple.StreamInterface- A unidirectional stream interface.torii.lib.stream.simple.StreamArbiter- A simple N:1 stream arbiter forStreamInterfaces
Changed¶
torii.hdl.cd.ClockDomainnow has a proper__repr__Updated minimum/maximum
pyvcdversionThe
typing_extensionsdependency is now gated behind the active python version, meaning only 3.11 and older need it.Rose/Fell/Stablenow importable from thetorii.hdlroot module.
Deprecated¶
Deprecated constructing the
DomainRenamerwith a single domain as a string (DomainRenamer('sync')), or a literal dictionary (DomainRenamer({'sync': 'pipe'})) in favor of kwargs-based constructionDeprecated root-level HDL imports (
from torii import *), all imports for torii HDL constructs should now be done viatorii.hdlexclusively.The
DIR_NONE/DIR_FANIN/DIR_FANOUTconstants have been deprecated in favor of using the enum values fromDirection
Removed¶
Removed deprecated
torii.assertsmodule, it’s now only intorii.lib.formal
Fixed¶
More typing fixes
Fixed
torii.util.traceron pypy3.11
0.7.1 - 2024-11-20¶
Fixed¶
Fixed a bug with typing asserts that caused resource unwinding to fail on differential pairs.
0.7.0 - 2024-11-20 [YANKED]¶
Added¶
Added new
torii.platform.formal.FormalPlatformfor formal verification of Torii designs.Added formal platform examples
Added
Value.inc()andValue.dec()calls to help deal with thesig.eq(sig + 1)pattern that is all too common.Added explicit mention of Python 3.13 support.
Added
structured recordsto allow for ease of typingtorii.hdl.rec.Record’s
Changed¶
Torii
Elaboratable’s now have a new optionalformalfunction for use in formal verification with the ToriiFormalPlatform.Torii platforms now have
get_override_listandget_override_intoverrides for platform template support.Torii platforms now have optional
descriptionandpretty_nameproperties.Use of
read_ilanghas been replaced withread_rtlilin the Gowin platform, which was the only platform that used the deprecated Yosys command.
Deprecated¶
Moved the contents of
torii.assertstotorii.lib.formal.
Removed¶
Removed deprecated
log2_intRemoved deprecated
torii.platform.vendor.intelModuleRemoved deprecated parameter
run_scriptfromBuildPlan.execute_local
Fixed¶
Fixed huge chunk of typing, lots to do but should improve useability and ergonomics.
Fixed a resource layout issue within the
torii.platform.resources.interface.HyperBusResource
0.6.2 - 2024-10-12¶
Fixed¶
Fixed a bug in the definition of the
QSPIResourceintorii.platform.resources.memory, again…
0.6.1 - 2024-10-12 [YANKED]¶
Fixed¶
Fixed a bug in the definition of the
QSPIResourceintorii.platform.resources.memory
0.6.0 - 2024-05-06¶
Added¶
Rough initial type annotations to
torii.hdl.memAdded the ability to specify
tarfor thetorii.build.run.BuildPlan.archivecall.Added check inside
Records to ensure they’re properly constructed prior to accessing their fields.Added the ability to override a Value’s operators.
Added the ability to put non-signals into
write_vcd’stracesparameter.Added name disambiguation for traced signals where they share the same name.
Added
ValueLikeandShapeLike, mainly for additional typing and instance checking assistance.Added the ability for
CatandSlice, statements to be cast as aConstvalue.Added
#!/bin/shto the top of build shell scripts.Added
BuildPlan.extractto extract files from the build plan without having to run it, this replaces the functionality that occurred whenBuildPlan.execute_localwas passed withrun_script = False.Added
BuildPlan.execute_dockerto allow for invoking a build inside a specified docker container.Added
log2_ceilandlog2_exactto replacelog2_intwith theFalseandTrueparams respectively.ShapeCastableobjects can now be const initialized.
Changed¶
Improved Oscillator frequency diagnostics for
torii.vendor.GowinPlatform.Fixed
torii.lib.fifoFIFOs to use the new memory semantics correctly.torii.lib.soc.csrMultiplexer shadow registers have been re-designed.Bumped minimum Python version from 3.9 to 3.10.
Renamed
IntelPlatformtoAlteraPlatform.FWFT mode is default for all FIFOs now.
Bumped the minimum version of Yosys to 0.30.
Empty
Caseblocks now throw an exception when being used in place of aDefaultblockBehavioral change warning in empty
Value.matches()where currently it returnsConst(1)but will returnConst(0)in the future.We now only close a VCD or GTKW file in the simulator if it was opened by the simulator.
Build shell scripts will now be marked as executable on unix-like hosts.
Instanceobjects know collect source location information.Memories have been turned into a first-class IR representation.
Out-of-range rests now error, not just warn.
A warning is now generated when a
Case()falls after aDefault(), and an error is raised when there are multipleDefault()’s in aSwitchShape casting a
range(1)now resolves to anunsigned(0)
Deprecated¶
Deprecated
torii.vendor.intelandtorii.vendor.intel.IntelPlatformin favor oftorii.vendor.alteraandtorii.vendor.altera.AlteraPlatform.Deprecated
execute_local()’srun_scriptparam in favor ofextractDeprecated use of
log2_intin favor oflog2_ceilandlog2_exactwhere appropriate.
Removed¶
Removed deprecated
torii.platform.vendor.lattice_*modules.Removed deprecated
Replcall in favor ofValue.replicate.Removed
set -xif theverboseparam is set for platform builds.Removed the last little bit of
$verilog_initial_triggertraces.Removed sub-classing of
AnyValueandProperty
Fixed¶
Fixed
ToriiTestCase.settleto handle “0” count settles.Fixed
torii.hdl.dsl.Module’s constructor to properly usesuper()rather than a parent class name call.Load of typing annotation fixes.
Cleaned up a load of blank
asserts, they should now have more clear error diagnostics.Fixed a handful of typos throughout the library and documentation.
Fixed tracer calls for Python 3.13
Fixed
Arraynot being indexable by aValueCastable.Fixed
ValueCastablenot being accepted as a simulation coroutine command.Fixed handling of redundant
Casebranches.Fixed
Value.shift_rightandValue.as_signededge cases.Fixed using 0-width
Switch’s with integer keys.Trying to use the Python
inoperator on aValuenow raises a sensible error.When indexing or slicing a Value with another Value, it now raises an error and suggests to use
Value.bit_selectorValue.word_selectinstead.Fixed simulation look when process catches an injected exception.
0.5.0 - 2023-10-11¶
Added¶
Added some minor comments to the
torii.sim.coremodule about the function of some of the objects.Added
torii.vendor.gowin.GowinPlatform.Added support for Xilinx Atrix UltraScale+ part numbers.
Added
envargument toBuildPlan.execute_local.Allowed removing
srcattributes on RTLIL output.
Changed¶
Moved the Lattice platform defs into their own submodule
torii.platform.vendor.lattice.Replaced the
distutils.ccompilerwith thesetuptools.command.build_extmodule fortorii.tools.cxx.Disabled the warning emitted on
~True/~Falsewhen using it as a value in Torii in Python versions older than 3.12.Relaxed the
PyVCDdependency version to now also include0.5.Ensured
Value.__abs__now returnsunsignedShape.Restructured the
torii.lib.codingmodule away from being a monolithic file.Prohibited absolute paths in
BuildPlan.add_file.Added lowering of
Memory’s directly to RTLIL$mem_v2cells.Ensured
Partoffsets are always unsigned.Disallowed
signed(0)values.
Deprecated¶
Old Lattice platform names have been deprecated in favor of the new platform location.
Deprecated
Replin favor ofValue.replicate.
Removed¶
Removed the
torii.climoduleRemoved the
remote-buildcategory from thesetup.pyextra_requiresdue to removal of remote builds.
Fixed¶
Fixed an issue where the
IrDAResourcewas not imported into thetorii.platform.resources__init__.pyFixed the
torii.utils.tracermodule to properly handleSTORE_DEREFandEXTENDED_ARGs.Fixed signed value normalization inside
Const.Fixed issue with
Value.rotate_left/Value.rotate_righton 0-width values.Fixed a semantic issue with range handling inside
Shape.cast.Fixed an off-by-one issue in the validation of
Slicees.Fixed the signedness of the resulting
Shapewhen doing subtraction.Fixed handling of
ValueKey.__eq__.Fixed source-location attribution for
Slicees.Fixed the order of when
Value.castshould have been called in thePartandSliceconstructors.Fixed a warning on python 3.12 with the
pyrtlsimulator warning about bitwise negations on booleans.Fixed a test case failure that would only occur on Windows due to it’s backwards path separator.
Ensured
Value.castis insidePart’s andSlices constructor.Fixed test case that was having issues on Windows paths.
Removed translation of empty subfragments as that would cause unintentional blackboxing on Vivado and Yosys.
0.4.5 - 2023-03-26¶
Added¶
Added
-noromand-procoptions to verilog generation if available in Yosys.Added a small tutorial on using
platform.add_filewithInstancefor referencing external modules.Added conversion helpers to/from picoseconds.
Changed¶
Updated the minimum Yosys version to
0.15.Minor typing updates.
Value.matchesnow returnsConst(1)when no value is supplied.Platform.buildnow allows for lists of strings to be passed for argument.Invocations of
read_ilangin Yosys scripts has been replaced withread_rtlilasread_ilanghas been deprecated for a while now.Replaced
sim_caseinToriiTestCasewithToriiTestCase.simulationand added two attributes for defining the simulation domainToriiTestCase.comb_domainandToriiTestCase.sync_domain, the latter of which takes adomain =param to specify which synchronous domain it is using.The default platform in
ToriiTestCasehas been replaced withNone, rather thanMockPlatformGated the initialization of the
ToriiTestCasedutbehind a check to prevent non-simulating tests, and tests that don’t use the DUT from exploding.Made the
connectorsproperty onPlatform’s optional, it now currently defaults to an empty list.Updated rich dependency version from
~=12.6.0to>=12.6.0
Deprecated¶
Deprecated the current
torii.cli.*methods in anticipation of replacing them.
Removed¶
Removed remote SSH build support
Removed
Value.__hash__
Fixed¶
Corrected how environment variables were extracted making them more consistent.
Fixed the
ToriiTestCaseso it’s now properly functionalClarified the usage of
Catin the language documentation, noting that it can take more than two arguments for concatenation.Added a warning on potential off-by-one errors when invoking
Signalwith arangeand having the reset value be the same as the end of the range.
0.4.4 - 2023-02-25¶
Added¶
Handle
Repl’s inValueKeyAllow for
IntEnum’s inValue.castAdded proper testing for the
torii.util.unitsmodule.Added proper testing for the
torii.util.stringmodule.Added support for
name =in property checks, such asAssert, etc.Added exports for
convertandconvert_fragmentfor rtlil, cxxrtl, and verilog into the roottorii.backmodule.
Changed¶
Updated the copyright years in the license file.
Hardened the RTLIL backend against generating Yosys reserved port names.
Removed warning on
IntEnum’s inCat(meow)Ensured that files are always are written with Unix
LFline endings.Renamed the
_toolchainmodule totools.Moved the
tool_env_varfromtorii.toolsintotorii.util.string.Renamed nox session names for
flake8andmypyintolintandtypecheckRenamed nox session names for
build_distsandupload_distintobuildanduploadAdded a default help formatter for the built-in CLI stub.
Deprecated¶
Deprecated the remote SSH builds.
Deprecated passing non
ElaboratableorFragmentobjects toFragment.get.
Removed¶
Removed
Shapeandtuplecasts and comparisons.Removed
UserValueand associated machinery.Removed default ports from
rtlil_convertandverilog_convert.Removed
stepfromcore.Simulatorin favor ofadvance.Removed support for the
AMARANTH_ENV_*environment variables.Removed the
_BuiltinYosysproxy object and associated bits.
Fixed¶
Fixed an issue with the
TORII_environment variables not being recognized.Fixed missing f-strings in the
cxxrtl,ast, andintelmodules.Fixed an issue in the
LatticeECP5platform that would have caused broken SystemVerilog inclusions.Fixed a bunch of miscellaneous spelling things.
Fixed an issue where
srcattributes would be added to generated RTLIL even if theemit_srcattribute wasFalse.Fixed an issue where the tracer would encounter an unknown opcode and would return None.
Fixed the
iec_sizeutility method to behave a bit better with strange sizes.Fixed the
tcl_quotestring method that would leave un-escaped"’s causing the TCL script to fail due to invalid syntax.Fixed an issue in the
LatticeICE40platform where theIceStormtoolchain environment variable was not being normalized properly.
0.4.3 - 2022-12-28¶
Fixed¶
Fixed a small issue with the newline changes that caused synthesis to fail
Fixed up the ULPI instance to properly handle the
clksignal and constrain it
0.4.2 - 2022-12-18¶
Fixed¶
Fixed the project URLs for the documentation and package.
Fixed some minor issues in the install documentation.
Fixed the line endings on generated *nix build scripts.
Fixed an issue where the built-in test harness was broken with writing VCDs.
0.4.1 - 2022-12-04¶
Fixed¶
Fixed issue with
invoke_toolnot emitting the environment variable properly
0.4.0 - 2022-12-02 [YANKED]¶
Added¶
Folded in
stdiolibrary components.Folded in
soclibrary components.Folded in resources from torii-boards into the
torii.platform.resourcesmodule.Added flake8 configuration file.
Added mypy configuration file.
Added Code Of Conduct.
Added a
noxfile.pyfor use with nox.Added an updated python unittest wrapper for use with Torii.
Added string utility module.
Added units utility module.
Added dependency
rich.Added
CANResourcetotorii.platform.resources.interface.Added
ice40warmboottotorii.lib.vendor.lattice.ice40.Added empty
torii.lib.vendor.xilinxmodule.Added
VGADACResourcetotorii.platform.resources.display.Added preliminary support for the yosys+nextpnr-xilinx flow on the Xilinx platform.
Added Changelog file.
Added
QSPIFlashResourcetotorii.platform.resources.memory.Added
JTAGResourcetotorii.platform.resources.interface.Added
EthernetResourcetotorii.platform.resources.interface.
Changed¶
Refactored the documentation.
Migrated string escape functions from the
TemplatedPlatforminto the new strings utility module.Moved
log2_intandbits_forinto the new units utility module.Moved vendor modules into
torii.platform.vendor.Replaced deprecated
abstractpropertieswithproperty/abstractmethodcombo.Moved the
tracermodule intotorii.util.Moved the
_unusedmodule intotorii.hdl.
Removed¶
Removed the
nMigencompatibility layer.Removed the
migencompatibility layer.Removed the compatibility tests.
Removed the RPC server.
Removed the old FHDL test case.
Removed the
tuplecase fromShape.Removed the warning from
rtlil.convertandverilog.convertabout implicit ports.Removed the
_ignore_deprecateddecorator.Removed the
Calias forConst.
Fixed¶
Fixed the package name.
Fixed the package authors.
Fixed the package trove classifiers.
Fixed all flake8 warnings on the entire codebase.
Fixed indentation.
Fixed docstring formatting.
0.1.0 - 0.3.0¶
No changelog is provided for these versions as they are all older tagged releases of Amaranth from before the fork.