Skip to content

Commit

Permalink
Add kind test
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonWin committed Oct 13, 2023
1 parent 3b60ec4 commit 33dca22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/vcml/models/arm/gic400.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
};
Expand Down
2 changes: 2 additions & 0 deletions test/models/arm_gicv2m.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

0 comments on commit 33dca22

Please sign in to comment.