[libre-riscv-dev] Wish to work on
rishucoding at gmail.com
Mon Mar 25 10:15:02 GMT 2019
I am sorry for being unresponsive and inactive for past 2 weeks, was busy
in my cousin's marriage and a small urgent work.
So, I started following the AddressEncoder file; generated the waveforms
and was able to understand many things. But have a few queries :
1. in TLB/test/test_address_encoder.py : we have passed width as 4 but we
are specifying our in_val "like :in_val = 0b001 " in 3 bits only. Shouldn't
the correct way be
*in_val = 0b0001 ? *
2. In TLB/src/AddressEncoder.py, I didn't understood the meaning of output:
It says "The output line will always have the lowest value address output".
So: does it mean we are following a priority table like this? :
I3 I2 I1 I0 O1 O0 V
0 0 0 0 x x 0
1 0 0 1
0 1 1
1 0 1
1 1 1
Let's say we have 4 inputs, 2 outputs and one valid bit: lowest number is
given highest priority. So, if input is 0b1010, then output is 01.
Also, I think this idea follows with the testing snippets in test bench.
3. "The output is valid when either single or multiple match is
high.Otherwise the output is zero. " Do we have only one output variable
"o"? In one case, output can be 0 for let's say an input = 0b0001.
I am not able to follow, which output does this line talk for "Otherwise
the output is zero. ". Shouldn't we have an explicit valid bit; separate
from output bits?
4. Not able to understand this snippet:
49 m.d.comb +=
Also, what does the variable 'n' do? [From the waveforms, it seems to me as
a valid bit ,but quite confused here :( ]
More information about the libre-riscv-dev