mirror of
https://github.com/hoglet67/AtomBusMon.git
synced 2025-08-15 15:27:23 +00:00
6809: Added special command to inhibit IRQ/FIRQ/NMI
Change-Id: I9b94fec5f464ecdb6bb0a4cd2a430401a182c929
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
* VERSION and NAME are used in the start-up message
|
* VERSION and NAME are used in the start-up message
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
#define VERSION "0.75"
|
#define VERSION "0.76"
|
||||||
|
|
||||||
#if (CPU == Z80)
|
#if (CPU == Z80)
|
||||||
#define NAME "ICE-T80"
|
#define NAME "ICE-T80"
|
||||||
@@ -51,7 +51,7 @@ char *cmdStrings[] = {
|
|||||||
#endif
|
#endif
|
||||||
"test",
|
"test",
|
||||||
"srec",
|
"srec",
|
||||||
#if (CPU == 6502)
|
#if (CPU != Z80)
|
||||||
"special",
|
"special",
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -94,7 +94,7 @@ void (*cmdFuncs[])(char *params) = {
|
|||||||
#endif
|
#endif
|
||||||
doCmdTest,
|
doCmdTest,
|
||||||
doCmdSRec,
|
doCmdSRec,
|
||||||
#if (CPU == 6502)
|
#if (CPU != Z80)
|
||||||
doCmdSpecial,
|
doCmdSpecial,
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -1160,7 +1160,7 @@ void doCmdSRec(char *params) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (CPU == 6502)
|
#if (CPU != Z80)
|
||||||
void logSpecial(char *function, int value) {
|
void logSpecial(char *function, int value) {
|
||||||
log0("%s", function);
|
log0("%s", function);
|
||||||
if (value) {
|
if (value) {
|
||||||
|
@@ -132,6 +132,7 @@ architecture behavioral of MC6809ECpuMon is
|
|||||||
signal SS_Single : std_logic;
|
signal SS_Single : std_logic;
|
||||||
signal SS_Step : std_logic;
|
signal SS_Step : std_logic;
|
||||||
signal CountCycle : std_logic;
|
signal CountCycle : std_logic;
|
||||||
|
signal special : std_logic_vector(1 downto 0);
|
||||||
|
|
||||||
signal clk_count : std_logic_vector(1 downto 0);
|
signal clk_count : std_logic_vector(1 downto 0);
|
||||||
signal quadrature : std_logic_vector(1 downto 0);
|
signal quadrature : std_logic_vector(1 downto 0);
|
||||||
@@ -166,6 +167,10 @@ architecture behavioral of MC6809ECpuMon is
|
|||||||
signal sw_interrupt_n : std_logic; -- switch to pause the CPU
|
signal sw_interrupt_n : std_logic; -- switch to pause the CPU
|
||||||
signal sw_reset_n : std_logic; -- switch to reset the CPU
|
signal sw_reset_n : std_logic; -- switch to reset the CPU
|
||||||
|
|
||||||
|
signal NMI_n_masked : std_logic;
|
||||||
|
signal IRQ_n_masked : std_logic;
|
||||||
|
signal FIRQ_n_masked : std_logic;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
-- Generics allows polarity of switches/LEDs to be tweaked from the project file
|
-- Generics allows polarity of switches/LEDs to be tweaked from the project file
|
||||||
@@ -232,10 +237,15 @@ begin
|
|||||||
DataOut => memory_dout,
|
DataOut => memory_dout,
|
||||||
DataIn => memory_din,
|
DataIn => memory_din,
|
||||||
Done => memory_done,
|
Done => memory_done,
|
||||||
|
Special => special,
|
||||||
SS_Step => SS_Step,
|
SS_Step => SS_Step,
|
||||||
SS_Single => SS_Single
|
SS_Single => SS_Single
|
||||||
);
|
);
|
||||||
|
|
||||||
|
NMI_n_masked <= NMI_n or special(1);
|
||||||
|
FIRQ_n_masked <= FIRQ_n or special(1);
|
||||||
|
IRQ_n_masked <= IRQ_n or special(0);
|
||||||
|
|
||||||
-- The CPU is slightly pipelined and the register update of the last
|
-- The CPU is slightly pipelined and the register update of the last
|
||||||
-- instruction overlaps with the opcode fetch of the next instruction.
|
-- instruction overlaps with the opcode fetch of the next instruction.
|
||||||
--
|
--
|
||||||
@@ -290,9 +300,9 @@ begin
|
|||||||
irq_gen : process(cpu_clk)
|
irq_gen : process(cpu_clk)
|
||||||
begin
|
begin
|
||||||
if falling_edge(cpu_clk) then
|
if falling_edge(cpu_clk) then
|
||||||
NMI_sync <= not NMI_n;
|
NMI_sync <= not NMI_n_masked;
|
||||||
IRQ_sync <= not IRQ_n;
|
IRQ_sync <= not IRQ_n_masked;
|
||||||
FIRQ_sync <= not FIRQ_n;
|
FIRQ_sync <= not FIRQ_n_masked;
|
||||||
nRST_sync <= RES_n and nRSTout;
|
nRST_sync <= RES_n and nRSTout;
|
||||||
HALT_sync <= not HALT_n;
|
HALT_sync <= not HALT_n;
|
||||||
end if;
|
end if;
|
||||||
|
Reference in New Issue
Block a user