diff --git a/include/vcml/models/arm/gic400.h b/include/vcml/models/arm/gic400.h index f02ba30f..e815e8ad 100644 --- a/include/vcml/models/arm/gic400.h +++ b/include/vcml/models/arm/gic400.h @@ -23,11 +23,11 @@ namespace vcml { namespace arm { -using cpu_mask_t = u8; - class gic400 : public peripheral { public: + using cpu_mask_t = u8; + enum irq_as : address_space { IRQ_AS_SGI, IRQ_AS_PPI, @@ -60,12 +60,12 @@ class gic400 : public peripheral AMBA_IFID = 0x0202143b, }; - enum handling_model : size_t { + enum handling_model { N_N = 0, // all processors handle the interrupt N_1 = 1 // only one processor handles interrupt }; - enum trigger_mode : size_t { + enum trigger_mode { LEVEL = 0, // interrupt asserted when signal is active EDGE = 1 // interrupt triggered on rising edge }; diff --git a/test/models/arm_gicv2m.cpp b/test/models/arm_gicv2m.cpp index caa33c78..475d74f2 100644 --- a/test/models/arm_gicv2m.cpp +++ b/test/models/arm_gicv2m.cpp @@ -76,5 +76,7 @@ TEST(gicv2m, gicv2m) { for (size_t i = BASE_SPI; i < BASE_SPI + NUM_SPI; i++) gicv2m.out[i].bind(stim.in[i]); + EXPECT_STREQ(gicv2m.kind(), "vcml::arm::gicv2m"); + sc_core::sc_start(); }