UCSBarchlab / PyRTL

A collection of classes providing simple hardware specification, simulation, tracing, and testing suitable for teaching and research. Simplicity, usability, clarity, and extensibility are the overarching goals, rather than performance or optimization.
http://ucsbarchlab.github.io/PyRTL
BSD 3-Clause "New" or "Revised" License
253 stars 76 forks source link

Find better way to handle special WireVector subclasses like `_MemIndexed` #406

Open mdko opened 2 years ago

mdko commented 2 years ago

Special WireVector classes (beyond the normal Register/Const/Input/Output) like _MemIndexed, while not user-facing, end up being exposed nonetheless when used in conjunction with block methods. For example, see #405, which added a special error message to help alert the user why using the result of a memory read doesn't work as a key into the set of source/destination nets the block returns.

I suspect similar issues may occur when using a _MemIndexed as the input to a net transform, etc., so this issue is a call for further investigation and testing and possible internal rewrites to how _MemIndexed is implemented.