Compare commits
2 Commits
4638346f85
...
57b159bce3
Author | SHA1 | Date | |
---|---|---|---|
57b159bce3 | |||
2595dc1b6c |
23
README.md
23
README.md
@ -1,3 +1,24 @@
|
|||||||
# 9086
|
# 9086
|
||||||
|
|
||||||
An binary compatible 8086 CPU with as many optimizations as possible
|
A CPU that aims to be binary compatible with the 8086 and with as many optimisations as possible
|
||||||
|
|
||||||
|
### Progress
|
||||||
|
* [X] Executing code
|
||||||
|
* [ ] can calculate the sieve of Eratosthenes
|
||||||
|
* [ ] can boot up MS-DOS / FreeDOS
|
||||||
|
* [ ] Is completely binary compatible
|
||||||
|
* [ ] Is pipelined
|
||||||
|
* [ ] Is Out of Order
|
||||||
|
* [ ] Is superscalar
|
||||||
|
|
||||||
|
### Building it
|
||||||
|
To build it you need Icarus Verilog, bin86, GNU make, xxd and the posix coreutils.
|
||||||
|
Go into the cpu directory and run `make`
|
||||||
|
|
||||||
|
At the time of development the versions used are :
|
||||||
|
|
||||||
|
* Icarus Verilog version 11.0 (stable)
|
||||||
|
* bin86 version: 0.16.17
|
||||||
|
* GNU Make 4.3
|
||||||
|
* xxd 2022-01-14
|
||||||
|
* GNU coreutils 8.32
|
||||||
|
17
cpu/Makefile
17
cpu/Makefile
@ -14,9 +14,22 @@ wave: ${VVP}
|
|||||||
vvp ${VVP} -lxt2
|
vvp ${VVP} -lxt2
|
||||||
gtkwave test.lx2 gtkwave_savefile.gtkw
|
gtkwave test.lx2 gtkwave_savefile.gtkw
|
||||||
|
|
||||||
${VVP} : ${SOURCES} ${INCLUDES}
|
${VVP} : ${SOURCES} ${INCLUDES} boot_code.txt
|
||||||
iverilog -g2012 ${SOURCES} -o $@
|
iverilog -g2012 ${SOURCES} -o $@
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f ${VVP} test.lx2
|
rm -f ${VVP} test.lx2 boot_code.txt boot_code.bin
|
||||||
|
|
||||||
|
boot_code.txt:boot_code.bin
|
||||||
|
dd if=/dev/zero bs=1 count=256 of=boot_code.stage status=none
|
||||||
|
dd if=boot_code.bin of=boot_code.stage conv=notrunc,nocreat status=none
|
||||||
|
xxd -ps -c 2 boot_code.stage > boot_code.txt
|
||||||
|
rm boot_code.stage
|
||||||
|
|
||||||
|
boot_code.bin:boot_code.asm
|
||||||
|
as86 -0 $< -b $@
|
||||||
|
|
||||||
|
.PHONY: dumpas
|
||||||
|
dumpas: boot_code.bin
|
||||||
|
objdump -D -b binary -m i8086 boot_code.bin
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
module rom(input [19:0] address,output wire [15:0] data ,input rd,input cs);
|
module rom(input [19:0] address,output wire [15:0] data ,input rd,input cs);
|
||||||
reg [15:0] memory [0:15];
|
reg [15:0] memory [0:127];
|
||||||
initial begin
|
initial begin
|
||||||
$readmemh("boot_code.txt", memory);
|
$readmemh("boot_code.txt", memory);
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user