285 lines
17 KiB
HTML
285 lines
17 KiB
HTML
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
|
|
<!-- Load the player -->
|
|
<script type="text/javascript" src="player.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="style.css">
|
|
</head>
|
|
<body>
|
|
<div class="title">
|
|
<span class="episode_name">Studying the Machine Interrupt Registers</span>
|
|
<div class="refs_container">
|
|
<span>References ▼</span>
|
|
<div class="mouse_catcher"></div>
|
|
<div class="refs">
|
|
<a data-id="3" href="https://github.com/ucb-bar/rocket/blob/master/src/main/scala/instructions.scala" target="_blank" class="ref">
|
|
<span data-timestamp="543" class="timecode">(<span class="time">9:03</span>)</span>
|
|
<span class="ref_content">
|
|
<div class="source">GitHub</div>
|
|
<div class="ref_title">instructions.scala</div>
|
|
</span>
|
|
</a>
|
|
<a data-id="3" href="https://en.wikipedia.org/wiki/Register-transfer_level" target="_blank" class="ref">
|
|
<span data-timestamp="543" class="timecode">(<span class="time">9:03</span>)</span>
|
|
<span class="ref_content">
|
|
<div class="source">Wikipedia</div>
|
|
<div class="ref_title">Register-transfer level</div>
|
|
</span>
|
|
</a>
|
|
<a data-id="4" href="https://forums.sifive.com/t/confusion-regarding-freedom-e-sdk-inline-asm/383" target="_blank" class="ref">
|
|
<span data-timestamp="955" class="timecode">(<span class="time">15:55</span>)</span>
|
|
<span class="ref_content">
|
|
<div class="source">SiFive Forums</div>
|
|
<div class="ref_title">Confusion Regarding Freedom E SDK inline asm</div>
|
|
</span>
|
|
</a>
|
|
<a data-id="6" href="https://riscv.org/specifications" target="_blank" class="ref">
|
|
<span data-timestamp="1344" class="timecode">(<span class="time">22:24</span>)</span>
|
|
<span class="ref_content">
|
|
<div class="source">RISC-V"</div>
|
|
<div class="ref_title">User-Level ISA Specification v2.1</div>
|
|
</span>
|
|
</a>
|
|
<a data-id="8" href="http://ericw.ca/notes/a-tiny-guide-to-gcc-inline-assembly.html" target="_blank" class="ref">
|
|
<span data-timestamp="1733" class="timecode">(<span class="time">28:53</span>)</span>
|
|
<span class="ref_content">
|
|
<div class="source">ericw.</div>
|
|
<div class="ref_title">A Tiny Guide to GCC Inline Assembly</div>
|
|
</span>
|
|
</a>
|
|
<a data-id="10" href="https://riscv.org/specifications/privileged-isa/" target="_blank" class="ref">
|
|
<span data-timestamp="2421" class="timecode">(<span class="time">40:21</span>)</span>
|
|
<span class="ref_content">
|
|
<div class="source">RISC-V</div>
|
|
<div class="ref_title">Draft Privileged ISA Specification v1.9.1</div>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<span class="annotator_container">Annotator: <span class="annotator">Miblo</span></span>
|
|
</div>
|
|
<div class="player_container">
|
|
<div class="video_container" data-videoId="ug5WkCROkOk"></div>
|
|
<div class="markers_container">
|
|
<div class="marker" data-timestamp="6">
|
|
<div class="content"><span class="timecode">0:06</span>Recap and set the stage for the day</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">0:06</span>Recap and set the stage for the day</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">0:06</span>Recap and set the stage for the day</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="51">
|
|
<div class="content"><span class="timecode">0:51</span>Intuition on two's complement</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">0:51</span>Intuition on two's complement</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">0:51</span>Intuition on two's complement</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="250">
|
|
<div class="content"><span class="timecode">4:10</span>We are counting with zeroes</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">4:10</span>We are counting with zeroes</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">4:10</span>We are counting with zeroes</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="543" data-ref="3">
|
|
<div class="content"><span class="timecode">9:03</span>Revisit instructions.scala and research register-transfer level</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">9:03</span>Revisit instructions.scala and research register-transfer level</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">9:03</span>Revisit instructions.scala and research register-transfer level</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="955" data-ref="4">
|
|
<div class="content"><span class="timecode">15:55</span>Come to understand how to specify that rs1 represents an immediate or a register, thanks to the reply to the "Confusion Regarding Freedom E SDK inline asm" forum thread</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">15:55</span>Come to understand how to specify that rs1 represents an immediate or a register, thanks to the reply to the "Confusion Regarding Freedom E SDK inline asm" forum thread</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">15:55</span>Come to understand how to specify that rs1 represents an immediate or a register, thanks to the reply to the "Confusion Regarding Freedom E SDK inline asm" forum thread</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="1105">
|
|
<div class="content"><span class="timecode">18:25</span>Read clear_csr() to put csrrc into perspective with our new understanding of pseudo-instructions and the i vs r hints</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">18:25</span>Read clear_csr() to put csrrc into perspective with our new understanding of pseudo-instructions and the i vs r hints</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">18:25</span>Read clear_csr() to put csrrc into perspective with our new understanding of pseudo-instructions and the i vs r hints</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="1344" data-ref="6">
|
|
<div class="content"><span class="timecode">22:24</span>Read about CSRRCI in the CSR Instructions section of the User-Level ISA Specification</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">22:24</span>Read about CSRRCI in the CSR Instructions section of the User-Level ISA Specification</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">22:24</span>Read about CSRRCI in the CSR Instructions section of the User-Level ISA Specification</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="1385">
|
|
<div class="content"><span class="timecode">23:05</span>Walk through clear_csr() again</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">23:05</span>Walk through clear_csr() again</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">23:05</span>Walk through clear_csr() again</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="1733" data-ref="8">
|
|
<div class="content"><span class="timecode">28:53</span>GNU Assembly Syntax: Constraints and Syntax</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">28:53</span>GNU Assembly Syntax: Constraints and Syntax</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">28:53</span>GNU Assembly Syntax: Constraints and Syntax</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="2115">
|
|
<div class="content"><span class="timecode">35:15</span>Continue reading clear_csr()</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">35:15</span>Continue reading clear_csr()</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">35:15</span>Continue reading clear_csr()</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="2421" data-ref="10">
|
|
<div class="content"><span class="timecode">40:21</span>Pop back up to the top of the stack, to reset_demo(), and read about the currently allocated RISC-V machine-level CSR addresses</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">40:21</span>Pop back up to the top of the stack, to reset_demo(), and read about the currently allocated RISC-V machine-level CSR addresses</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">40:21</span>Pop back up to the top of the stack, to reset_demo(), and read about the currently allocated RISC-V machine-level CSR addresses</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="2651">
|
|
<div class="content"><span class="timecode">44:11</span>Read about Machine Interrupt Registers, including the mie (machine interrupt-enable) register</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">44:11</span>Read about Machine Interrupt Registers, including the mie (machine interrupt-enable) register</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">44:11</span>Read about Machine Interrupt Registers, including the mie (machine interrupt-enable) register</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="2966">
|
|
<div class="content"><span class="timecode">49:26</span>Note how common it is in plic_driver.c for us to compute an address of a memory mapped register in order to mess with interrupts</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">49:26</span>Note how common it is in plic_driver.c for us to compute an address of a memory mapped register in order to mess with interrupts</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">49:26</span>Note how common it is in plic_driver.c for us to compute an address of a memory mapped register in order to mess with interrupts</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="3105">
|
|
<div class="content"><span class="timecode">51:45</span>A few words on the sponge mode that we're in</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">51:45</span>A few words on the sponge mode that we're in</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">51:45</span>A few words on the sponge mode that we're in</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="3170">
|
|
<div class="content"><span class="timecode">52:50</span>Continue reading about the Machine Interrupt Registers</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">52:50</span>Continue reading about the Machine Interrupt Registers</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">52:50</span>Continue reading about the Machine Interrupt Registers</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="3513">
|
|
<div class="content"><span class="timecode">58:33</span>Return to demo_gpio.c and come to understand the clear_csr() calls in relation to the documentation</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">58:33</span>Return to demo_gpio.c and come to understand the clear_csr() calls in relation to the documentation</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">58:33</span>Return to demo_gpio.c and come to understand the clear_csr() calls in relation to the documentation</div>
|
|
</div>
|
|
</div>
|
|
<div class="marker" data-timestamp="4008">
|
|
<div class="content"><span class="timecode">1:06:48</span>We're out of time for today</div>
|
|
<div class="progress faded">
|
|
<div class="content"><span class="timecode">1:06:48</span>We're out of time for today</div>
|
|
</div>
|
|
<div class="progress main">
|
|
<div class="content"><span class="timecode">1:06:48</span>We're out of time for today</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
var player = new Player(document.querySelector(".player_container"), onRefChanged);
|
|
window.addEventListener("resize", function() { player.updateSize(); });
|
|
document.addEventListener("keypress", function(ev) {
|
|
switch (ev.key) {
|
|
case 'n':
|
|
case 'd':
|
|
case 's': {
|
|
player.jumpToNextMarker();
|
|
} break;
|
|
|
|
case 'p':
|
|
case 'a':
|
|
case 'w': {
|
|
player.jumpToPrevMarker();
|
|
} break;
|
|
}
|
|
});
|
|
|
|
var refTimecodes = document.querySelectorAll(".refs .ref .timecode");
|
|
for (var i = 0; i < refTimecodes.length; ++i) {
|
|
refTimecodes[i].addEventListener("click", function(ev) {
|
|
if (player) {
|
|
var time = ev.currentTarget.getAttribute("data-timestamp");
|
|
player.setTime(parseInt(time, 10));
|
|
player.play();
|
|
ev.preventDefault();
|
|
return false;
|
|
}
|
|
});
|
|
}
|
|
|
|
var refSources = document.querySelectorAll(".refs .ref");
|
|
for (var i = 0; i < refSources.length; ++i) {
|
|
refSources[i].addEventListener("click", function(ev) {
|
|
if (player) {
|
|
player.pause();
|
|
}
|
|
});
|
|
}
|
|
|
|
function onRefChanged(ref) {
|
|
if (ref !== undefined && ref !== null) {
|
|
document.querySelector(".refs_container").classList.add("current");
|
|
var refs = document.querySelectorAll(".refs .ref");
|
|
for (var i = 0; i < refs.length; ++i) {
|
|
var dataID = refs[i].getAttribute("data-id");
|
|
if (ref == dataID) {
|
|
refs[i].classList.add("current");
|
|
} else {
|
|
refs[i].classList.remove("current");
|
|
}
|
|
}
|
|
} else {
|
|
document.querySelector(".refs_container").classList.remove("current");
|
|
var refs = document.querySelectorAll(".refs .ref");
|
|
for (var i = 0; i < refs.length; ++i) {
|
|
refs[i].classList.remove("current");
|
|
}
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|