2012-10-21 01:14:50 +00:00
|
|
|
<!doctype html>
|
2016-03-20 17:50:14 +00:00
|
|
|
<html>
|
2022-03-28 10:26:49 +00:00
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
|
|
|
|
|
<title>Renode: Easy CI for your Weird Hardware</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="dist/reset.css">
|
|
|
|
<link rel="stylesheet" href="dist/reveal.css">
|
|
|
|
<link rel="stylesheet" href="dist/theme/black.css">
|
|
|
|
|
|
|
|
<!-- Theme used for syntax highlighted code -->
|
|
|
|
<link rel="stylesheet" href="plugin/highlight/monokai.css">
|
|
|
|
</head>
|
|
|
|
|
2022-03-28 14:34:23 +00:00
|
|
|
<!--
|
2022-03-28 10:26:49 +00:00
|
|
|
* Emulators are useful tools
|
|
|
|
- PC emulator (e.g. Docker on Mac, WSL on Linux)
|
|
|
|
- NES emulator -- fun and games, realtime output
|
|
|
|
- Also have debugging emulators
|
|
|
|
- Renode
|
|
|
|
|
|
|
|
* Renode Stack
|
|
|
|
- CPU cores written in C
|
|
|
|
- arm, i386, ppc, riscv, sparc, xtensa
|
|
|
|
- Windows, Mac, Linux
|
|
|
|
- Peripherals and UI written in C#
|
|
|
|
- Extensible via Python and C#
|
|
|
|
- Write once. Run anywhere. Using C# to define new peripherals
|
|
|
|
|
|
|
|
* Three major users
|
|
|
|
- Designers of new boards
|
|
|
|
- Reverse engineering exsisting hardware
|
|
|
|
- Silicon designers
|
|
|
|
|
|
|
|
* Designers of new boards
|
|
|
|
- One or more chips
|
|
|
|
- How are they connected?
|
|
|
|
- What weird hardware exists?
|
|
|
|
|
|
|
|
* Concurrent emulation of multiple devices
|
|
|
|
- Can connect multiple devices, e.g. via UART, GPIO, SPI, Ethernet, CAN...
|
|
|
|
- All devices are emulated using the same time source
|
|
|
|
- Helps to debug timing differences with different processors on a board
|
|
|
|
|
|
|
|
* Board definition format
|
|
|
|
- Easily define memory layout
|
|
|
|
- Easily move blocks around
|
|
|
|
- Only define what's necessary
|
|
|
|
- You don't need to be perfect, just good enough!
|
|
|
|
|
|
|
|
* Can read SVD files
|
|
|
|
|
|
|
|
* Hardware has Similarities
|
|
|
|
- Picture of existing register sets
|
|
|
|
- There are only so many combinations
|
|
|
|
- Rip. Mix. Burn. Many chips are just copies of one another.
|
|
|
|
|
|
|
|
* Tests in CI
|
|
|
|
|
|
|
|
* Reverse engineering existing hardware
|
|
|
|
|
|
|
|
* If it's a supported architecture, it's easy to run code
|
|
|
|
* LoadBinary and set PC
|
|
|
|
* Can skip much of the boot ROM
|
|
|
|
* Attach GDB
|
|
|
|
* Reproducible makes it easy to test theories
|
|
|
|
|
|
|
|
* Developing new Silicon blocks
|
|
|
|
|
|
|
|
* Betrusted hardware
|
|
|
|
- Create a new design in LiteX / Verilog
|
|
|
|
- Document the design
|
|
|
|
- Create a model
|
|
|
|
- Timing isn't as critical
|
|
|
|
|
2022-03-28 14:34:23 +00:00
|
|
|
-->
|
2022-03-28 10:26:49 +00:00
|
|
|
|
|
|
|
<body>
|
|
|
|
<div class="reveal">
|
|
|
|
<div class="slides">
|
|
|
|
<section>
|
|
|
|
<section>
|
|
|
|
<h2>What is an Emulator?</h2>
|
|
|
|
<ul>
|
2022-03-28 14:34:23 +00:00
|
|
|
<li>Console</li>
|
2022-03-28 10:26:49 +00:00
|
|
|
<li>Desktop</li>
|
|
|
|
<li>CPU</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
2022-03-28 14:34:23 +00:00
|
|
|
<h2>Whole-System Emulator</h2>
|
2022-03-28 10:26:49 +00:00
|
|
|
<ul>
|
2022-03-28 14:34:23 +00:00
|
|
|
<li>Wii Virtual Console</li>
|
2022-03-28 10:26:49 +00:00
|
|
|
<li>VirtualBox</li>
|
|
|
|
<li>Parallels</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
2022-03-28 14:34:23 +00:00
|
|
|
<h2>Transparent Emulator</h2>
|
2022-03-28 10:26:49 +00:00
|
|
|
<ul>
|
2022-03-28 14:34:23 +00:00
|
|
|
<li>HyperV</li>
|
|
|
|
<li>WSL2/Docker</li>
|
2022-03-28 10:26:49 +00:00
|
|
|
<li>qemu on Linux</li>
|
|
|
|
<li>Rosetta on Mac</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
2022-03-28 14:34:23 +00:00
|
|
|
<h2>Debugger/Emulator</h2>
|
2022-03-28 10:26:49 +00:00
|
|
|
<ul>
|
2022-03-28 14:34:23 +00:00
|
|
|
<li>FCEUX (Nintendo Entertainment System)</li>
|
|
|
|
<li>Dolphin (Wii / Gamecube)</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Renode Is All of These</h2>
|
|
|
|
<ul>
|
|
|
|
<li>Console: Able to present an interactive environment</li>
|
|
|
|
<li>Transparent: Can run in CI via Robot commands</li>
|
|
|
|
<li>Debugger: Has a GDB server built in</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<section>
|
|
|
|
<h2>Example of Weird Hardware</h2>
|
|
|
|
<ul>
|
|
|
|
<li>NRF52840</li>
|
|
|
|
<li>LM74 Temperature Sensor</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Example of Weird Hardware</h2>
|
|
|
|
<ul>
|
|
|
|
<li>NRF52833</li>
|
|
|
|
<li>LM74 Temperature Sensor</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Example of Weird Hardware</h2>
|
|
|
|
<ul>
|
|
|
|
<li>BlueNRG1</li>
|
|
|
|
<li>LM74 Temperature Sensor</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Example of Weird Hardware</h2>
|
|
|
|
<ul>
|
|
|
|
<li>RISC-V</li>
|
|
|
|
<li>FPGA-based framebuffer</li>
|
|
|
|
<li>Initial graphical demo in 1 hour</li>
|
2022-03-28 10:26:49 +00:00
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
</section>
|
2022-03-29 08:15:55 +00:00
|
|
|
<section>
|
|
|
|
<section>
|
|
|
|
<h2>What makes hardware "Weird"?</h2>
|
|
|
|
<ul>
|
|
|
|
<li>Unusual CPU architecture</li>
|
|
|
|
<li>Different model of chip than commonly found</li>
|
|
|
|
<li>Additional hardware</li>
|
|
|
|
<li>More CPUs per board</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Unusual CPU architecture</h2>
|
|
|
|
Sorry, can't help
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Different model CPU</h2>
|
|
|
|
<ul>
|
|
|
|
<li>Maybe it's just a variant</li>
|
|
|
|
<li>Perhaps memory regions were shuffled</li>
|
|
|
|
<li>Does it use the same hardware block as someone else?</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>New hardware version</h2>
|
|
|
|
<ul>
|
|
|
|
<li>Do you use the new, specialized features?</li>
|
|
|
|
<li>Lots of UARTs support Infrared. Do you need that?</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Completely new hardware</h2>
|
|
|
|
<ul>
|
|
|
|
<li>Time to break out C#</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<section>
|
|
|
|
<h2>What is "Firmware"?</h2>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>How does this interact with $VENDOR_TOOL?</h2>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>What about boot ROMs?</h2>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>What about missing registers?</h2>
|
|
|
|
<ul>
|
|
|
|
<li>Very few projects use built-in blocks</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<section>
|
|
|
|
<h2>SVD Files</h2>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Logging Memory Accesses</h2>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Debugging with GDB</h2>
|
|
|
|
</section>
|
|
|
|
</section>
|
2021-11-11 14:13:31 +00:00
|
|
|
</div>
|
2022-03-28 10:26:49 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script src="dist/reveal.js"></script>
|
|
|
|
<script src="plugin/notes/notes.js"></script>
|
|
|
|
<script src="plugin/zoom/zoom.js"></script>
|
|
|
|
<script src="plugin/markdown/markdown.js"></script>
|
|
|
|
<script src="plugin/highlight/highlight.js"></script>
|
|
|
|
<script>
|
|
|
|
/** This used to be a part of Reveal.js, but was removed at some point */
|
|
|
|
function getQueryHash() {
|
|
|
|
function deserialize(value) {
|
|
|
|
if (typeof value === 'string') {
|
|
|
|
if (value === 'null') return null;
|
|
|
|
else if (value === 'true') return true;
|
|
|
|
else if (value === 'false') return false;
|
|
|
|
else if (value.match(/^-?[\d\.]+$/)) return parseFloat(value);
|
|
|
|
}
|
|
|
|
return value;
|
|
|
|
}
|
2012-03-24 16:48:16 +00:00
|
|
|
|
2022-03-28 10:26:49 +00:00
|
|
|
let query = {};
|
|
|
|
location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi, a => {
|
|
|
|
query[a.split('=').shift()] = a.split('=').pop();
|
2012-08-12 00:25:55 +00:00
|
|
|
});
|
2022-03-28 10:26:49 +00:00
|
|
|
// Basic deserialization
|
|
|
|
for (let i in query) {
|
|
|
|
let value = query[i];
|
|
|
|
|
|
|
|
query[i] = deserialize(unescape(value));
|
|
|
|
}
|
|
|
|
|
|
|
|
// Do not accept new dependencies via query config to avoid
|
|
|
|
// the potential of malicious script injection
|
|
|
|
if (typeof query['dependencies'] !== 'undefined') delete query['dependencies'];
|
|
|
|
|
|
|
|
return query;
|
|
|
|
|
|
|
|
}
|
|
|
|
var presenter = !!getQueryHash().s;
|
|
|
|
// More info about initialization & config:
|
|
|
|
// - https://revealjs.com/initialization/
|
|
|
|
// - https://revealjs.com/config/
|
|
|
|
Reveal.initialize({
|
|
|
|
hash: true,
|
|
|
|
|
|
|
|
controls: presenter ? false : true,
|
|
|
|
progress: true,
|
|
|
|
history: true,
|
|
|
|
center: true,
|
|
|
|
controlsTutorial: presenter ? false : true,
|
|
|
|
|
|
|
|
slideNumber: presenter ? null : 'c/t',
|
|
|
|
|
|
|
|
// The "normal" size of the presentation, aspect ratio will be preserved
|
|
|
|
// when the presentation is scaled to fit different resolutions. Can be
|
|
|
|
// specified using percentage units.
|
|
|
|
width: 960,
|
|
|
|
height: 700,
|
|
|
|
|
|
|
|
// Factor of the display size that should remain empty around the content
|
|
|
|
margin: 0.1,
|
|
|
|
|
|
|
|
multiplex: {
|
|
|
|
// Example values. To generate your own, see the socket.io server instructions.
|
|
|
|
secret: getQueryHash().s || null,
|
|
|
|
id: '160c0567ef5ca18f',
|
|
|
|
url: 'https://p.xobs.io/'
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// Bounds for smallest/largest possible scale to apply to content
|
|
|
|
minScale: 0.02,
|
|
|
|
maxScale: 5.5,
|
|
|
|
|
|
|
|
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
|
|
|
|
|
|
|
// Don't forget to add the dependencies
|
|
|
|
dependencies: [
|
|
|
|
{ src: 'https://reveal-multiplex.glitch.me/socket.io/socket.io.js', async: true },
|
|
|
|
{ src: 'https://reveal-multiplex.glitch.me/client.js', async: true }
|
|
|
|
],
|
|
|
|
|
|
|
|
// Learn about plugins: https://revealjs.com/plugins/
|
|
|
|
plugins: [RevealMarkdown, RevealHighlight, RevealZoom]
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
2022-03-29 08:15:55 +00:00
|
|
|
</html>
|