[Libre-soc-bugs] [Bug 485] Create I-Cache from microwatt icache.vhdl

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Oct 8 19:35:39 BST 2020


--- Comment #62 from Cole Poirier <colepoirier at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #59)
>  139     sim.add_sync_process(wrap(icache_mmu_sim(mmu)))
>  140     sim.add_sync_process(wrap(wb_get(icache, "ICACHE")))
> right.
> ok.
> the default dict here you have left it as mem_default.
> that mem_default is set up to answer an example taken from gem5-power which
> is *specifically* for dcache.
> it has absolutely no entries for instruction cache reading whatsoever 

Yes indeed, because...

> also this is not the test that needs to be written (yet).
> the test that needs to be written - *still using wb_get when taking two
> arguments one of which is a mem dict* - is to test the icache, *not the
> icache using the mmu*

... this. Also I was trying to infer what to do from the existing test in that
file, which turns out to have been the wrong approach. To confirm, I can use
wb_get without modification... Can I import it into icache.py or should I be
writing the test in the same file as wb_get(). How is wb_get connected to
ICache? Like this?

sim.add_sync_process(wrap(wb_get(icache, icache_mem, "ICACHE")))

> in other words look at icache.py unit test and instead of the SRAM add the
> wb_get as the sync process with a nicely pre-prepared mem dict (that
> contains 100 randomly created keys and values)

I don't see how the wb_get fn can be used in icache.py given the global
variable... though I think it's likely I'm showing my python ignorance here.

> later we can and will do "icache-with-mmu" but only after doing "icache"
> because if we have not tested icache how can we tell what is faulty if the
> with-mmu fails?

Of course, I was just starting from the working dcache_mmu_test because the
global varible threw me off, but I was also thrown off by looking at the
test_mmu_dcache and thinking I should follow it's design... Just lots of
confusion on my end.

> one test at a time.

The only way to do it successfully :)

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list