diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2010-11-12 13:11:18 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2010-11-12 13:11:18 +0100 |
commit | c9c4555f8d38053ed2da4b0f81fd86301a14d8cb (patch) | |
tree | 59a32bee8ef753da2399650200473a93645bedbd /simulator.c | |
parent | e0330d9534d8cfeffff81f426df1d3277702b835 (diff) |
Implement more instructions
Diffstat (limited to 'simulator.c')
-rw-r--r-- | simulator.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/simulator.c b/simulator.c index e4880e9..fb41893 100644 --- a/simulator.c +++ b/simulator.c @@ -357,16 +357,16 @@ static void dump_call_stack(void) printf("============================================================\n"); } -void simulating(void) +void simulator_run(void) { - struct image_info * info = get_image_info(); - struct NIOS_CPU * cpu = NULL; + struct image_info *info = get_image_info(); + struct NIOS_CPU *cpu = NULL; uint32_t code = 0; uint32_t exec_result = 0; - + /* register the segment fault and Ctrl-C handler */ register_signal_handler(); - + /* init cpu*/ reset_cpu(); cpu = get_nios_cpu(); @@ -381,7 +381,7 @@ void simulating(void) /* main loop to simulating the execute of NIOSII */ printf("Enter simulating ..................\n"); - while(1){ + while (1) { /* Get the instruction */ code = get_instruct(cpu, info->mem_base, info->base_addr); |