I've coded up a first go at four pipeline stages so far: Fetch, Decode, Execute, and Write. After the relative complexity of the Fetch implementation, the rest has been pretty straight forward, and I've started running the first bit of compiled code through the pipline. Here's that start of our …
Moxie requires some interesting instruction fetch logic.
For my initial implementation I'm assuming a 32-bit path to instruction memory. But moxie has both 16- and 48-bit instructions, so it's not like simple RISC cores that can feed the pipeline on every cycle. My solution is to feed 32-bit instruction memory …
I picked up a lightly used FPGA development board from craigslist today. It's the Altera DE2 board with a Cyclone II FPGA.
There are a few nice things about this board...
- It's loaded with real and useful peripherals: 16x2 LCD Panel, VGA DAC, lots of LEDs, RS232, IrDA, PS/2 …
...Just in case you were wondering!
But it's been slow going. The good news is that moxie is front and centre for me again, so let's see what we can do over the next few weeks. And over these next few weeks I'm promising myself not to touch a C …
I just committed a little binary analysis tool to moxiedev. You can use it to perform simple static analysis on moxie binaries. The kinds of things I'm looking for are compiler bugs (because I know there's still one there that is triggered by -frerun-cse-after-loop), and instruction statistics. For instance, which …
It's been a while since my last update. What can I say... summer was nice.
But now, back to business! I've just committed some long overdue patches to the upstream GNU tools:
- Add a device tree blob to the gdb simulator. This lets us describe the gdb sim target to …
Tonight I got a hello world app to use uClibc's puts()
routine! This
is a big deal because it's the first time I've had system calls coming
in from userland. I haven't checked the changes in yet, because they're
a mess, but here's a basic run-down of what I had …
I've been taking advantage of the nice summer weather recently, so it's taken me a while to get around to this... but here's the first moxie userland app!
#include <string.h>
#define MSG "Hello, World!\n"
void __attribute__((noinline)) gloss_write (int fd, char *ptr, int len)
{
asm("swi 5"); // "write …
Sooo..... it turns out there's lots to take care of before userland apps like BusyBox can run.
- The root filesystem. This one is easy. I just built a short Hello World application in C with moxie-uclinux-gcc. This produces an executable in BFLT format which I call 'init'. The kernel build …