Hadn't added all files to previous commit
This commit is contained in:
parent
4638346f85
commit
2595dc1b6c
17
cpu/Makefile
17
cpu/Makefile
@ -14,9 +14,22 @@ wave: ${VVP}
|
||||
vvp ${VVP} -lxt2
|
||||
gtkwave test.lx2 gtkwave_savefile.gtkw
|
||||
|
||||
${VVP} : ${SOURCES} ${INCLUDES}
|
||||
${VVP} : ${SOURCES} ${INCLUDES} boot_code.txt
|
||||
iverilog -g2012 ${SOURCES} -o $@
|
||||
|
||||
.PHONY: 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);
|
||||
reg [15:0] memory [0:15];
|
||||
reg [15:0] memory [0:127];
|
||||
initial begin
|
||||
$readmemh("boot_code.txt", memory);
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user