From b6abb6964ab9d0665076b8e20f0ce0fdb61a16a5 Mon Sep 17 00:00:00 2001 From: David Banks Date: Sun, 27 Oct 2019 17:32:29 +0000 Subject: [PATCH] Z80: Update all builds to 8 comparators and 16KB code Change-Id: I8adc986caab323de395301ba397f4c7874e50d49 --- firmware/AtomBusMon.c | 12 -------- src/Z80CpuMon.vhd | 4 +-- src/Z80CpuMonALS.vhd | 2 +- target/godil_500/icez80/memory.bmm | 32 ++++++++++++++++++++-- target/lx9_jason/icez80/memory.bmm | 32 ++++++++++++++++++++-- target/lx9_jason_flipped/icez80/memory.bmm | 32 ++++++++++++++++++++-- 6 files changed, 93 insertions(+), 21 deletions(-) diff --git a/firmware/AtomBusMon.c b/firmware/AtomBusMon.c index 6788e91..f8d8897 100644 --- a/firmware/AtomBusMon.c +++ b/firmware/AtomBusMon.c @@ -53,9 +53,7 @@ char *cmdStrings[] = { #endif "test", "srec", -#if !defined(CPU_Z80) "special", -#endif #endif "reset", "trace", @@ -96,9 +94,7 @@ void (*cmdFuncs[])(char *params) = { #endif doCmdTest, doCmdSRec, -#if !defined(CPU_Z80) doCmdSpecial, -#endif #endif doCmdReset, doCmdTrace, @@ -282,12 +278,7 @@ void (*cmdFuncs[])(char *params) = { * Watch/Breakpoint Definitions ********************************************************/ -// The space available for address comparators depends on the size of the CPU core -#if defined(CPU_Z80) -#define MAXBKPTS 4 -#else #define MAXBKPTS 8 -#endif // The current number of watches/breakpoints int numbkpts = 0; @@ -1174,7 +1165,6 @@ void doCmdSRec(char *params) { } -#if !defined(CPU_Z80) void logSpecial(char *function, int value) { log0("%s", function); if (value) { @@ -1188,13 +1178,11 @@ void doCmdSpecial(char *params) { int special = -1; sscanf(params, "%x", &special); if (special >= 0 && special <= 3) { - CTRL_PORT &= ~SPECIAL_MASK; CTRL_PORT = (CTRL_PORT & ~SPECIAL_MASK) | (special << SPECIAL_0); } logSpecial("NMI", CTRL_PORT & (1 << SPECIAL_1)); logSpecial("IRQ", CTRL_PORT & (1 << SPECIAL_0)); } -#endif #endif // CPU_EMBEDDED diff --git a/src/Z80CpuMon.vhd b/src/Z80CpuMon.vhd index bd14d84..17242bb 100644 --- a/src/Z80CpuMon.vhd +++ b/src/Z80CpuMon.vhd @@ -29,8 +29,8 @@ entity Z80CpuMon is ClkMult : integer := 10; -- default value correct for GODIL ClkDiv : integer := 31; -- default value correct for GODIL ClkPer : real := 20.345; -- default value correct for GODIL - num_comparators : integer := 4; -- default value correct for GODIL - avr_prog_mem_size : integer := 1024 * 9 -- default value correct for GODIL + num_comparators : integer := 8; -- default value correct for GODIL + avr_prog_mem_size : integer := 1024 * 16 -- default value correct for GODIL ); port ( clock49 : in std_logic; diff --git a/src/Z80CpuMonALS.vhd b/src/Z80CpuMonALS.vhd index 6b062f5..4a5d276 100644 --- a/src/Z80CpuMonALS.vhd +++ b/src/Z80CpuMonALS.vhd @@ -130,7 +130,7 @@ begin ClkMult => 8, ClkDiv => 25, ClkPer => 20.000, - num_comparators => 4, + num_comparators => 8, avr_prog_mem_size => 1024 * 16 ) port map ( diff --git a/target/godil_500/icez80/memory.bmm b/target/godil_500/icez80/memory.bmm index 13098d9..b038ae6 100644 --- a/target/godil_500/icez80/memory.bmm +++ b/target/godil_500/icez80/memory.bmm @@ -1,6 +1,6 @@ ADDRESS_MAP avrmap PPC405 0 - ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x000047ff] + ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x00007fff] BUS_BLOCK mon/Inst_AVR8/PM_Inst/RAM_Inst[0].Ram [15:0]; END_BUS_BLOCK; @@ -36,7 +36,35 @@ ADDRESS_MAP avrmap PPC405 0 BUS_BLOCK mon/Inst_AVR8/PM_Inst/RAM_Inst[8].Ram [15:0]; END_BUS_BLOCK; - + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[9].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[10].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[11].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[12].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[13].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[14].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[15].Ram [15:0]; + END_BUS_BLOCK; + END_ADDRESS_SPACE; END_ADDRESS_MAP; \ No newline at end of file diff --git a/target/lx9_jason/icez80/memory.bmm b/target/lx9_jason/icez80/memory.bmm index 13098d9..b038ae6 100644 --- a/target/lx9_jason/icez80/memory.bmm +++ b/target/lx9_jason/icez80/memory.bmm @@ -1,6 +1,6 @@ ADDRESS_MAP avrmap PPC405 0 - ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x000047ff] + ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x00007fff] BUS_BLOCK mon/Inst_AVR8/PM_Inst/RAM_Inst[0].Ram [15:0]; END_BUS_BLOCK; @@ -36,7 +36,35 @@ ADDRESS_MAP avrmap PPC405 0 BUS_BLOCK mon/Inst_AVR8/PM_Inst/RAM_Inst[8].Ram [15:0]; END_BUS_BLOCK; - + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[9].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[10].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[11].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[12].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[13].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[14].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[15].Ram [15:0]; + END_BUS_BLOCK; + END_ADDRESS_SPACE; END_ADDRESS_MAP; \ No newline at end of file diff --git a/target/lx9_jason_flipped/icez80/memory.bmm b/target/lx9_jason_flipped/icez80/memory.bmm index 13098d9..b038ae6 100644 --- a/target/lx9_jason_flipped/icez80/memory.bmm +++ b/target/lx9_jason_flipped/icez80/memory.bmm @@ -1,6 +1,6 @@ ADDRESS_MAP avrmap PPC405 0 - ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x000047ff] + ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x00007fff] BUS_BLOCK mon/Inst_AVR8/PM_Inst/RAM_Inst[0].Ram [15:0]; END_BUS_BLOCK; @@ -36,7 +36,35 @@ ADDRESS_MAP avrmap PPC405 0 BUS_BLOCK mon/Inst_AVR8/PM_Inst/RAM_Inst[8].Ram [15:0]; END_BUS_BLOCK; - + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[9].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[10].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[11].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[12].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[13].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[14].Ram [15:0]; + END_BUS_BLOCK; + + BUS_BLOCK + mon/Inst_AVR8/PM_Inst/RAM_Inst[15].Ram [15:0]; + END_BUS_BLOCK; + END_ADDRESS_SPACE; END_ADDRESS_MAP; \ No newline at end of file