2 * ARM MPS2 FPGAIO emulation
4 * Copyright (c) 2018 Linaro Limited
5 * Written by Peter Maydell
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 or
9 * (at your option) any later version.
12 /* This is a model of the FPGAIO register block in the AN505
13 * FPGA image for the MPS2 dev board; it is documented in the
15 * http://infocenter.arm.com/help/topic/com.arm.doc.dai0505b/index.html
18 * + sysbus MMIO region 0: the register bank
24 #include "hw/sysbus.h"
26 #define TYPE_MPS2_FPGAIO "mps2-fpgaio"
27 #define MPS2_FPGAIO(obj) OBJECT_CHECK(MPS2FPGAIO, (obj), TYPE_MPS2_FPGAIO)
31 SysBusDevice parent_obj
;
40 /* QEMU_CLOCK_VIRTUAL time at which counter and pscntr were last synced */
41 int64_t pscntr_sync_ticks
;
42 /* Values of COUNTER and PSCNTR at time pscntr_sync_ticks */
46 uint32_t prescale_clk
;
48 /* These hold the CLOCK_VIRTUAL ns tick when the CLK1HZ/CLK100HZ was zero */
49 int64_t clk1hz_tick_offset
;
50 int64_t clk100hz_tick_offset
;