@@ -192,28 +192,29 @@ class Multiplexer(Elaboratable):
192192 are possible for connecting the CSR bus to the CPU:
193193 * The CPU could access the CSR bus directly (with no intervening logic other than simple
194194 translation of control signals). In this case, the register alignment should be set
195- to 1, and each *w*-bit register would occupy *ceil(w/n)* addresses from the CPU
196- perspective, requiring the same amount of memory instructions to access.
195+ to 1 (i.e. `alignment` should be set to 0), and each *w*-bit register would occupy
196+ *ceil(w/n)* addresses from the CPU perspective, requiring the same amount of memory
197+ instructions to access.
197198 * The CPU could also access the CSR bus through a width down-converter, which would issue
198199 *k/n* CSR accesses for each CPU access. In this case, the register alignment should be
199200 set to *k/n*, and each *w*-bit register would occupy *ceil(w/k)* addresses from the CPU
200201 perspective, requiring the same amount of memory instructions to access.
201202
202- If alignment is greater than 1, it affects which CSR bus write is considered a write to
203- the last register chunk. For example, if a 24-bit register is used with a 8-bit CSR bus and
204- a CPU with a 32-bit datapath, a write to this register requires 4 CSR bus writes to complete
205- and the 4th write is the one that actually writes the value to the register. This allows
206- determining write latency solely from the amount of addresses the register occupies in
207- the CPU address space, and the width of the CSR bus.
203+ If the register alignment (i.e. `2 ** alignment`) is greater than 1, it affects which CSR bus
204+ write is considered a write to the last register chunk. For example, if a 24-bit register is
205+ used with a 8-bit CSR bus and a CPU with a 32-bit datapath, a write to this register requires
206+ 4 CSR bus writes to complete and the 4th write is the one that actually writes the value to
207+ the register. This allows determining write latency solely from the amount of addresses the
208+ register occupies in the CPU address space, and the width of the CSR bus.
208209
209210 Parameters
210211 ----------
211212 addr_width : int
212213 Address width. See :class:`Interface`.
213214 data_width : int
214215 Data width. See :class:`Interface`.
215- alignment : int
216- Register alignment. See :class:`Interface `.
216+ alignment : log2 of int
217+ Register alignment. See :class:`..memory.MemoryMap `.
217218
218219 Attributes
219220 ----------
@@ -327,8 +328,8 @@ class Decoder(Elaboratable):
327328 Address width. See :class:`Interface`.
328329 data_width : int
329330 Data width. See :class:`Interface`.
330- alignment : int
331- Window alignment. See :class:`Interface `.
331+ alignment : log2 of int
332+ Window alignment. See :class:`..memory.MemoryMap `.
332333
333334 Attributes
334335 ----------
0 commit comments