Skip to content

Commit 5310f06

Browse files
authored
Merge pull request #12 from twilco/post-four
Post four
2 parents 63e5a7a + 06ca6e9 commit 5310f06

14 files changed

+300
-7
lines changed

_posts/2019-04-27-riscv-from-scratch-2.markdown

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ git clone git@github.com:twilco/riscv-from-scratch.git
3131
# via HTTPS rather than SSH
3232
# alternatively, if you are a GitHub user, you can fork this repo.
3333
# https://help.github.com/en/articles/fork-a-repo
34-
3534
cd riscv-from-scratch/work
3635
{% endhighlight %}
3736

@@ -530,9 +529,11 @@ From here we can use `gdb` as normal - `s` to step to the next instruction, `inf
530529

531530
### What's next
532531

533-
We accomplished, and hopefully learned, a lot today! I've never had a formal plan for this series, instead simply following whatever is most interesting to me at each moment, so I'm not sure exactly sure what will come next. I particularly enjoyed the deep dive we took into the `jal` instruction, so perhaps in our next post we'll build upon the foundation we created here but instead replace `add.c` with some pure RISC-V assembly program. If you have something in particular you'd like to see or have any questions about what we covered here, let me know by opening an issue at [https://github.com/twilco/twilco.github.io/issues](https://github.com/twilco/twilco.github.io/issues). After the next post in the series is complete I'll link to it below.
532+
In our next post, we'll continue to build on our knowledge of RISC-V assembly by beginning implementation of a driver for the UART onboard the `virt` QEMU machine. Expect to learn about what a UART is and how it works, additional devicetree properties, the basic building blocks required to implement an NS16550A-compatible UART driver, and more.
533+
534+
Sound interesting? This post has been released - [click here to check it out](https://twilco.github.io{% post_url 2019-07-08-riscv-from-scratch-3 %}). If you have any questions, comments, or corrections, feel free to [open up an issue](https://github.com/twilco/twilco.github.io/issues) or leave a comment below via [utterances](https://github.com/utterance/utterances).
534535

535-
Thanks for reading, and hope to see you in the next post!
536+
Thanks for reading!
536537

537538
### Extra credit
538539

_posts/2019-07-08-riscv-from-scratch-3.markdown

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ So, without further ado, let's begin.
2828
UART stands for "**U**niversal **A**synchronous **R**eceiver-**T**ransmitter", and is a physical hardware device (_not_ a protocol, à la [I2C](https://en.wikipedia.org/wiki/I%C2%B2C) or [SPI](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface)) used to transmit and receive serial data. Serial data transmission is the process of sending data sequentially, bit-by-bit. In contrast, parallel data transmission is the process of sending multiple bits all at once. This image from the [serial communication Wikipedia page](https://en.wikipedia.org/wiki/Serial_communication) illustrates the difference well:
2929

3030
{:refdef: style="text-align: center;"}
31-
<a href="/assets/img/riscv-from-scratch-pt-3/Parallel_and_Serial_Transmission.gif">![serial and parallel transmission contrasted](/assets/img/riscv-from-scratch-pt-3/Parallel_and_Serial_Transmission.gif)</a>
32-
{: refdef}
31+
<a href="/assets/img/riscv-from-scratch/pt-3/Parallel_and_Serial_Transmission.gif">![serial and parallel transmission contrasted](/assets/img/riscv-from-scratch/pt-3/Parallel_and_Serial_Transmission.gif)</a>
32+
{:refdef}
3333

3434
UARTs never specify a rate at which data should be received or transmitted (also called a *clock rate* or *clock signal*), which is what makes them asynchronous rather than synchronous. Instead, transmitting UARTs frame each packet of data with start and stop bits, which informs receiving UARTs of when to start and stop reading data.
3535

@@ -266,6 +266,7 @@ Today we learned about UARTs and USARTs, the NS16550A specification, interrupts,
266266

267267
In the next post, we'll discuss and implement _function prologues_ for our two driver functions `uart_get_char` and `uart_put_char`. Function prologues are an important part of making function calls possible in the world of assembly. We will be walking through a function prologue step-by-step, with diagrams detailing changes to the stack and registers with every instruction.
268268

269-
When the next post is complete I'll link it here. If you have any questions, comments, or corrections, feel free to [open up an issue](https://github.com/twilco/twilco.github.io/issues) or leave a comment below via [utterances](https://github.com/utterance/utterances).
269+
This post has been released - [click here to check it out]({% post_url 2019-07-28-riscv-from-scratch-4 %}). If you have any questions, comments, or corrections, feel free to [open up an issue](https://github.com/twilco/twilco.github.io/issues) or leave a comment below via [utterances](https://github.com/utterance/utterances).
270+
271+
Thanks for reading!
270272

271-
Thanks for reading - hope to see you in the next post!

0 commit comments

Comments
 (0)