[libre-riscv-dev] first version of test issuer is functional

Luke Kenneth Casson Leighton lkcl at lkcl.net
Wed Jun 17 12:30:44 BST 2020


i got these working, overnight:

https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/simple/test/test_issuer.py;hb=HEAD
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/simple/issuer.py;hb=HEAD

this is a module and associated unit test that are specifically
designed to be as simple and as absolutely clear as possible, and are
specifically intended to test the combined Function Units yet at the
same time actually allow "arbitrary code execution" including loops.

at present the instructions are pushed into a TestMemory (16 words),
and read out sequentially, disregarding changes made by the Branch
Unit.  this because that is what the Simulator currently does, and so
consequently all the Function Unit tests are *also* designed to
*produce* changes to the PC, but not to actually listen to them.

to be able to run programs in a loop (and have them verified) it is
necessary to first to go back to the qemu-simulator comparator
(test_sim.py), add the capability to the *Simulator* (ISACaller) to be
able to read instructions from a memory area, and then finally come
back to the hardware and do the same thing.

given that we need to be able to run the original unit tests as well
(the ones that just receive a list of instructions), this "listening
to PC" will have to be done as a mode, both by the simulator and by
the hardware.

l.

---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68



More information about the libre-riscv-dev mailing list