[libre-riscv-dev] query in soc/TLB

Rishabh Jain rishucoding at gmail.com
Fri Apr 12 13:43:01 BST 2019


hi everyone,

Daniel,luke: could you please look into these:
for file soc/TLB/src/AddressEncoder.py
1. is this table for priority encoder correct?

I3   I2   I1   I0 | O1  O0  V
0    0    0    0  |  x    x    0
x    x    x    1  |  0    0    1
x    x    1    0  |  0    1    1
x    1    0    0  |  1    0    1
1    0    0    0  |  1    1    1

i believe this table follows with line 87 and 96 of
soc/TLB/test/test_address_encoder.py.
though Jacob answered this previously, but his table was giving priority to
the highest bit.

2. in line 104 of soc/TLB/test/test_address_encoder.py, you are passing 4
bits as width.. but then in test cases, you are using in_val with 3 bits. i
mean this is working, but any reason for passing 4 instead of 3?

3. how do i go about understanding the module priority encoder and encoder.
i really like nmigen having these built-in combinational ckts.. but to know
what member variables are present and how the module is working, where to
look?
I am struggling with values "encoder.n" and "p_encoder.n" .. i guess these
are related to "valid input".

4. I guess there is silly mistake on line 56 of AddressEncoder.py:
should be : "Line56:  "# Multiple Match if encoder n is valid" "

By Tuesday, I will be able to check other modules in TLB.
I appreciate the efforts put by Daniel in commenting on the code. Really
good comments.


More information about the libre-riscv-dev mailing list