mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-25 17:29:40 +00:00
Formalises TODO list and marches onward into execution state.
This commit is contained in:
parent
dcc0ee3679
commit
57edfe8751
@ -22,6 +22,7 @@ State::State(const ProcessorBase &src): State() {
|
|||||||
registers.status = src.get_status();
|
registers.status = src.get_status();
|
||||||
registers.program_counter = src.program_counter_.full;
|
registers.program_counter = src.program_counter_.full;
|
||||||
registers.prefetch = src.prefetch_queue_.full;
|
registers.prefetch = src.prefetch_queue_.full;
|
||||||
|
registers.instruction = src.decoded_instruction_.full;
|
||||||
|
|
||||||
// Inputs.
|
// Inputs.
|
||||||
inputs.bus_interrupt_level = uint8_t(src.bus_interrupt_level_);
|
inputs.bus_interrupt_level = uint8_t(src.bus_interrupt_level_);
|
||||||
@ -31,6 +32,23 @@ State::State(const ProcessorBase &src): State() {
|
|||||||
inputs.bus_request = src.bus_request_;
|
inputs.bus_request = src.bus_request_;
|
||||||
inputs.bus_grant = false; // TODO (within the 68000).
|
inputs.bus_grant = false; // TODO (within the 68000).
|
||||||
inputs.halt = src.halt_;
|
inputs.halt = src.halt_;
|
||||||
|
|
||||||
|
// TODO:
|
||||||
|
// execution_state_
|
||||||
|
// last_trace_flag_
|
||||||
|
// pending_interrupt_level_
|
||||||
|
// accepted_interrupt_level_
|
||||||
|
// is_starting_interrupt_
|
||||||
|
// dbcc_false_address_
|
||||||
|
// next_word_
|
||||||
|
// active_[program_/micro_op_/step_]
|
||||||
|
|
||||||
|
// Execution state.
|
||||||
|
execution_state.e_clock_phase = src.e_clock_phase_.as<uint8_t>();
|
||||||
|
execution_state.effective_address[0] = src.effective_address_[0].full;
|
||||||
|
execution_state.effective_address[1] = src.effective_address_[1].full;
|
||||||
|
execution_state.source_data = src.source_bus_data_[0].full;
|
||||||
|
execution_state.destination_data = src.destination_bus_data_[0].full;
|
||||||
}
|
}
|
||||||
|
|
||||||
void State::apply(ProcessorBase &target) {
|
void State::apply(ProcessorBase &target) {
|
||||||
@ -54,6 +72,7 @@ State::Registers::Registers() {
|
|||||||
DeclareField(status);
|
DeclareField(status);
|
||||||
DeclareField(program_counter);
|
DeclareField(program_counter);
|
||||||
DeclareField(prefetch);
|
DeclareField(prefetch);
|
||||||
|
DeclareField(instruction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,5 +90,9 @@ State::Inputs::Inputs() {
|
|||||||
|
|
||||||
State::ExecutionState::ExecutionState() {
|
State::ExecutionState::ExecutionState() {
|
||||||
if(needs_declare()) {
|
if(needs_declare()) {
|
||||||
|
DeclareField(e_clock_phase);
|
||||||
|
DeclareField(effective_address);
|
||||||
|
DeclareField(source_data);
|
||||||
|
DeclareField(destination_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ struct State: public Reflection::StructImpl<State> {
|
|||||||
uint16_t status;
|
uint16_t status;
|
||||||
uint32_t program_counter;
|
uint32_t program_counter;
|
||||||
uint32_t prefetch;
|
uint32_t prefetch;
|
||||||
|
uint16_t instruction;
|
||||||
|
|
||||||
Registers();
|
Registers();
|
||||||
} registers;
|
} registers;
|
||||||
@ -60,6 +61,11 @@ struct State: public Reflection::StructImpl<State> {
|
|||||||
obviously doesn't.
|
obviously doesn't.
|
||||||
*/
|
*/
|
||||||
struct ExecutionState: public Reflection::StructImpl<ExecutionState> {
|
struct ExecutionState: public Reflection::StructImpl<ExecutionState> {
|
||||||
|
uint8_t e_clock_phase;
|
||||||
|
uint32_t effective_address[2];
|
||||||
|
uint32_t source_data;
|
||||||
|
uint32_t destination_data;
|
||||||
|
|
||||||
ExecutionState();
|
ExecutionState();
|
||||||
} execution_state;
|
} execution_state;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user