Fix 68hc11 timer device (accuracy, io, timer overflow)
[binutils-gdb.git] / sim / m68hc11 / ChangeLog
1 2000-09-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
2
3 * dv-m68hc11tim.c (m68hc11tim_timer_event): Compute the overflow
4 interrupt and compare events accurately. Take into account the
5 pending ticks not processed by the simulator yet (introduced a shift).
6 (m68hc11_port_event): Reset the timer interrupt delays.
7 (m68hc11tim_io_read_buffer): Be able to read several bytes.
8 (m68hc11tim_io_write_buffer): Likewise for write.
9 (m68hc11tim_io_write_buffer): Recompute the timer overflow interrupt.
10
11 2000-09-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
12
13 * dv-m68hc11spi.c (m68hc11spi_io_read_buffer): Clear the interrupts.
14 (m68hc11spi_io_write_buffer): Likewise and fix the spi frame.
15 (m68hc11spi_info): Clarify the status report
16 of the SPI when a byte is being sent.
17 (m68hc11spi_clock): Fix the spi send frame.
18
19 2000-08-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
20
21 * sim-main.h (m68hc11_map_level): Define level of address mappings.
22 * dv-m68hc11eepr.c (struct m68hc11eepr ): New flag to indicate
23 whether the eeprom is currently mapped or not.
24 (m68hc11eepr_port_event): Use the flag to see if we must unmap
25 or map the eeprom. Update the flag to reflect the current state.
26 Use M6811_EEPROM_LEVEL when mapping the eeprom.
27 (m68hc11eepr_finish): Remove overlap hack.
28 (attach_m68hc11eepr_regs): Use M6811_IO_LEVEL when mapping the
29 config and control registers.
30 * dv-m68hc11.c (m68hc11cpu_finish): Remove overlap hack.
31 (attach_m68hc11_regs): Use M6811_IO_LEVEL.
32 (m68hc11cpu_io_write): Likewise when unmapping and re-mapping.
33 * dv-m68hc11spi.c (m68hc11spi_finish): Likewise.
34 (attach_m68hc11spi_regs): Likewise.
35 * dv-m68hc11tim.c (m68hc11tim_finish): Likewise.
36 (attach_m68hc11tim_regs): Likewise.
37 * dv-m68hc11sio.c (m68hc11sio_finish): Likewise.
38 (attach_m68hc11sio_regs): Likewise.
39 * interp.c (sim_open): Likewise.
40 * dv-nvram.c (attach_nvram_regs): Likewise.
41
42 Thu Jul 27 21:27:25 2000 Andrew Cagney <cagney@b1.cygnus.com>
43
44 * configure, config.in: Regenerate.
45
46 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
47
48 * Makefile.in (SIM_RUN_OBJS): Define to use nrun.c
49 * dv-m68hc11.c (m68hc11cpu_finish): Register detach address callback.
50 (dv_m6811_detach_address_callback): New function to detach a
51 device from an address space.
52 * dv-m68hc11eepr.c (m68hc11eepr_port_event): Initialize
53 config register according to --cpu-config option.
54 * sim-main.h (_sim_cpu): Add cpu_config member.
55 * interp.c (sim_open): Delete specific simulator options.
56 * m68hc11_sim.c (cpu_option_handler): New options
57 --emulos and -cpu-config <val> to configure the simulator.
58 (cpu_initialize): Initialize cpu_config member.
59
60 2000-06-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
61
62 * emulos.c: Fix indentation and comments.
63 * gencode.c: Likewise.
64 * dv-m68hc11tim.c (m68hc11tim_timer_event): Handle COMPARE_EVENT.
65 (m68hc11tim_io_write_buffer): Write compare registers and
66 setup compare event.
67 * interp.c: Remove unused global variables.
68 * interrupts.c (idefs): New compare interrupts.
69 Fix indentation and comments.
70 * interrupts.h: Likewise.
71
72 2000-06-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
73
74 * dv-m68hc11sio.c: Fix indentation and comments.
75 Remove INT_PORT.
76 * dv-m68hc11.c: Fix indentation and comments.
77 (m68hc11cpu_port_event): Move initialization of M6811_HPRIO from here.
78 * m68hc11_sim.c (cpu_reset): To here.
79 * dv-m68hc11eepr.c: Fix indentation and comments.
80
81 2000-06-17 Stephane Carrez <Stephane.Carrez@worldnet.fr>
82
83 * dv-nvram.c: New file, rename from dv-pram.c.
84 * dv-pram.c: Delete file.
85 * sim-main.h: Incorporate m68hc11_sim.h.
86 * m68hc11_sim.h: Delete file.
87 * configure.in: Rename pram into nvram.
88 * interp.c (sim_open): Likewise in creation of device tree.
89
90 2000-05-31 Stephane Carrez <Stephane.Carrez@worldnet.fr>
91
92 * interp.c (sim_open): Create the SPI device.
93 * dv-m68hc11spi.c: New file for SPI device simulation.
94 * configure.in (hw_extra_devices): Add SPI device.
95
96 2000-05-28 Stephane Carrez <Stephane.Carrez@worldnet.fr>
97
98 * interrupts.c (interrupts_initialize): Clear XIRQ accounting.
99 (interrupts_process): Separate IRQ and XIRQ accounting.
100 (interrupts_info): Report XIRQ accounting.
101 * interrupts.h (struct interrupts): Added accounting for XIRQ.
102
103 2000-04-16 Stephane Carrez <stcarrez@worldnet.fr>
104
105 * dv-pram.c (attach_pram_regs): Fix the 'save-modified' mode.
106 * m68hc11_sim.h (_sim_cpu): Allow configuration of cpu mode.
107 * dv-m68hc11.c (attach_m68hc11_regs): Get the cpu MODA,MODB
108 configuration from the 'mode' device tree property.
109 (m68hc11cpu_port_event): Reset M6811_HPRIO to the cpu MODA, MODB
110 configuration.
111
112 2000-02-24 Stephane Carrez <stcarrez@worldnet.fr>
113
114 * sim-main.h: Remove WITH_TARGET_* defines.
115 * Makefile.in (SIM_EXTRA_CFLAGS): Specify the WITH_TARGET_* flags.
116
117 2000-02-08 Stephane Carrez <stcarrez@worldnet.fr>
118
119 * dv-m68hc11sio.c (m68hc11sio_port_event): Setup the SCI to
120 1200 baud when cpu is in bootstrap mode.
121
122 * dv-m68hc11tim.c (m68hc11tim_io_write_buffer): Be able to
123 write in the TCTN timer register.
124
125 * dv-m68hc11sio.c (m68hc11sio_io_write_buffer): Divide cpu clock
126 by 4 to obtain the E clock frequency.
127 (sccr2_desc): Use M6811_TIE for TIE bit.
128 (m68hc11sio_info): Fix baud rate report.
129
130 * dv-m68hc11tim.c (to_realtime): Likewise.
131
132 * interp.c (sim_open): When building device tree, only provide
133 devices that do not exist yet.
134
135 * emulos.c: Fix compilation pb under Windows.
136
137 * dv-m68hc11.c (attach_m68hc11_regs): Get the clock frequency
138 from the 'clock' property.
139
140 2000-01-02 Stephane Carrez <stcarrez@worldnet.fr>
141
142 * m68hc11_sim.h (*_REGNUM): Define.
143 (_sim_cpu): New member cpu_page0_reg table.
144 * interp.c (sim_create_inferior): Fill the cpu_page0_reg table with
145 addresses of soft registers in .page0.
146 (sim_fetch_register, sim_store_register): Use cpu_page0_reg table
147 to get/set soft registers.
148
149 1999-12-31 Stephane Carrez <stcarrez@worldnet.fr>
150
151 * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Clear byte to avoid
152 returning random values.
153
154 1999-12-17 Stephane Carrez <stcarrez@worldnet.fr>
155
156 * gencode.c: Fix "subb N,x" that used a instead of b.
157
158 1999-09-09 Stephane Carrez <stcarrez@worldnet.fr>
159
160 * gencode.c: Fixed sbc8 and adc8 when there was a initial carry.
161
162 1999-09-01 Stephane Carrez <stcarrez@worldnet.fr>
163
164 * sim-main.h (SIM_HANDLES_LMA): Define to enable loading using lma.
165
166 1999-08-14 Stephane Carrez <stcarrez@worldnet.fr>
167
168 * dv-m68hc11.c (attach_m68hc11_regs): Save the size of the
169 register region in the m68hc11cpu struct.
170 (m68hc11cpu_io_write): When the IO mapping addres changes,
171 detach the register region and re-attach it at the new address.
172 (m68hc11cpu_io_read_buffer): Renamed base_address into
173 attach_address.
174 (m68hc11cpu_io_write_buffer): Likewise. Pass the hw pointer
175 to m68hc11cpu_io_write.
176
177 1999-08-13 Stephane Carrez <stcarrez@worldnet.fr>
178
179 * gencode.c: For sbc8, check the carry and increment the source
180 before trying to set the carry for the result.
181
182 1999-05-24 John S. Kallal <kallal@voicenet.com>
183
184 * interp.c (sim_get_info): Don't crash if the command line is 0.
185 Define prototype for sim_get_info() and init_system().
186 (sim_info): Correct call to sim_get_info().
187
188 1999-05-16 Stephane Carrez <stcarrez@worldnet.fr>
189
190 * configure.in: Recognize m6811-*-*.
191 * configure: Regenerate.
192 * m68hc11_sim.h (cpu_ccr_update_add8, cpu_ccr_update_add16,
193 cpu_ccr_update_sub8, cpu_ccr_update_sub16):
194 Correct the computation of carry of 8 and 16-bits add and subtract.
195 * gencode.c: Use cpu_ccr_update_sub8 for subtraction (carry and
196 overflow set in a different manner than add).
197
198 1999-05-14 Stephane Carrez <stcarrez@worldnet.fr>
199
200 * dv-m68hc11.c (dv_m6811_attach_address_callback): Removed a
201 trace message.
202 * interp.c (sim_open, sim_create_inferior): Initialize the
203 cpu_elf_start from the ELF header.
204 * m68hc11_sim.c (cpu_initialize): Clear the new data members.
205 (cpu_restart): Use cpu_elf_start as the starting address when
206 the flag is set.
207 (cpu_special): When cpu_use_elf_start is set, the WAI instruction
208 exits the simulator (exit status is in D).
209 * m68hc11_sim.h (_sim_cpu): Added members cpu_use_elf_start and
210 cpu_elf_star to start execution at address specified in ELF file.
211
212 1999-05-02 Stephane Carrez <stcarrez@worldnet.fr>
213
214 * Makefile.in, config.in, configure, configure.in: New files.
215 * gencode.c: New file, generation of 68HC11 interpreter.
216 * m68hc11_sim.h, m68hc11_sim.c: New files, specific operations
217 for interpreter.
218 * interrupts.c, interrupts.h: New files, management of interrupts.
219 * interp.c, sim-main.h,
220 * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c,
221 dv-m68hc11tim.c, dv-pram.c: New files representing devices for
222 68HC11 (dv-pram.c is generic and could probably migrate to common).
223 * emulos.c: New file, basic emulation of some os.