2024: Domino Containers - The Next Step. News from the Domino Container commu...
Tech talk with Antmicro - Building your world out of blocks with renode and lite x
1. RISC-V Summit, December 8-10, 2020
Piotr Zierhoffer, pzierhoffer@antmicro.com
Building your world
out of blocks with
Renode and LiteX
2. ANTMICRO
Building your world out of blocks with Renode and LiteX
• Turning ideas into software-driven products
• We use, develop, advocate open source
• Member of Linux Foundation, Zephyr Project,
CHIPS Alliance, OpenPOWER Foundation,
Strategic Founding member of RISC-V
International
• Introducing new design methodologies
and workflows based on open source
3. TYPICAL PRODUCT DEVELOPMENT
CYCLE (SIMPLIFIED)
• Time consuming
• Expensive
• Sequential
Building your world out of blocks with Renode and LiteX
Analyze requirements
Select or prepare custom hardware
Write software
Reevaluate hardware decisions
Update hardware
Update software
4. AN ALTERNATIVE
• Prepare the hardware up front
• Wait with software development until
hardware is ready
• Constrain your software with capabilities
of hardware
• Go through the whole development
process to verify if your product actually
works
Work incrementally following the evolution of
your project
Develop software early in the product life cycle
Adjust all pieces to match your product needs
Test all components in a CI environment, for all
changes of software OR hardware
Building your world out of blocks with Renode and LiteX
7. Open source hardware-simulation framework for:
• Development of complex software
for embedded and IoT systems
• Architectural exploration and research
• Pre-silicon prototyping and HW-SW
co-development
What is Renode?
14. LITEX SOC GENERATOR
• Powered by Migen
• Allows to create an SoC with different CPUs
• Supports many vendor tools as well as open source
• Creates a basic BSP along with the design
Building your world out of blocks with Renode and LiteX
16. LITEX ECOSYSTEM
• Zephyr port
• Linux port
• Active community
▫ IRC: #litex @ freenode.net
▫ mailing list: linux-litex@googlegroups.com
Building your world out of blocks with Renode and LiteX
17. PUTTING THE BLOCKS TOGETHER
Building your world out of blocks with Renode and LiteX
20. LITEX-RENODE
• LiteX generates a platform description in
csr.csv output file
• Automatic generation from LiteX
configuration (CSV)
▫ platform (REPL)
▫ script (RESC)
▫ Zephyr DTS overlay
• Perfect for CI setup
Building your world out of blocks with Renode and LiteX
23. DEBUG ALWAYS AVAILABLE
(machine) cpu StartGdbServer 3333
(gdb) target remote :3333
(gdb) break whenever_i_want_to
(gdb) continue
Building your world out of blocks with Renode and LiteX
24. CUSTOM INSTRUCTIONS
AND CSR SUPPORT
RegisterCSR((ulong)0x3e1, () => counterValue, value => UpdateCounter(value));
InstallCustomInstruction(pattern: "0000011-----sssss---ddddd0001011", handler:
HandleMaskirqInstruction);
private void HandleMaskirqInstruction(UInt64 opcode)
{
var rd = (int)BitHelper.GetValue(opcode, 7, 5);
var rs = (int)BitHelper.GetValue(opcode, 15, 5);
var newValue = (uint)X[rs].RawValue;
var previousValue = disabledInterrupts;
disabledInterrupts = newValue;
if(rd != 0)
{
X[rd] = previousValue;
}
}
Building your world out of blocks with Renode and LiteX
25. WHY EVEN RECOMPILE?
(machine) cpu InstallCustomInstructionHandlerFromString
"00010100011100000000000010010011"
"cpu.DebugLog('I’m running Python here!')"
Building your world out of blocks with Renode and LiteX