[Add] software simulator add

This commit is contained in:
bLueriVerLHR
2023-05-11 17:55:41 +08:00
parent 4e39007d17
commit 0bf1c68d94
16 changed files with 535 additions and 10 deletions

10
labus/serial.cc Normal file
View File

@@ -0,0 +1,10 @@
#include <serial.hh>
#include <common.h>
Serial::Serial(size_t siz) : WRDevice(siz) {}
void Serial::write(char *buf, size_t addr, size_t len) {
for (size_t i = 0; i < len; ++i)
putc(buf[i], stdout);
fflush(stdout);
}