diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-10-26 08:00:42 +0200 |
---|---|---|
committer | Jiri Gaisler <jiri@gaisler.se> | 2022-10-26 08:49:36 +0200 |
commit | 3229549f42030fd3eceeaaf0a054cf9328f252a1 (patch) | |
tree | f06d902534c0323ae3b0fb3c80575831924f264b | |
parent | Support extended interrupts (diff) | |
download | sis-3229549f42030fd3eceeaaf0a054cf9328f252a1.tar.bz2 |
Add -extirq option to support simulating the UT700
-rw-r--r-- | gr740.c | 3 | ||||
-rw-r--r-- | grlib.c | 7 | ||||
-rw-r--r-- | grlib.h | 1 | ||||
-rw-r--r-- | help.c | 3 | ||||
-rw-r--r-- | leon3.c | 5 | ||||
-rw-r--r-- | sis.c | 5 | ||||
-rw-r--r-- | sis.h | 1 |
7 files changed, 18 insertions, 7 deletions
@@ -56,7 +56,8 @@ init_sim (void) { int i; - irqmp_extirq = 10; + if (irqmp_extirq < 0) + irqmp_extirq = 10; for (i = 0; i < NCPU; i++) grlib_ahbm_add (&leon3s, 0); @@ -409,8 +409,11 @@ static uint32 irqmp_pextack[NCPU]; /* Mask with the supported interrupts */ static uint32 irqmp_mask; -/* The extended interrupt line (a zero value disables the feature) */ -int irqmp_extirq; +/* + * This is the extended interrupt line (a zero value disables the feature; + * if -1 use the default value of the CPU). + */ +int irqmp_extirq = -1; static void irqmp_init (void) @@ -106,4 +106,3 @@ extern void apbuart_close_port (void); extern void apbuart_flush (void); extern const struct grlib_ipcore gptimer, irqmp, apbuart, apbmst, greth, l2c, leon3s, srctrl, ns16550, clint, plic, sdctrl, s5test; -extern int irqmp_extirq; @@ -26,9 +26,10 @@ sis_usage () printf ("usage: sis [-uart1 uart_device1] [-uart2 uart_device2]\n"); printf ("[-m <n>] [-dumbio] [-gdb] [-port port]\n"); + printf ("[-nouartrx] [-extirq number]\n"); printf ("[-cov] [-nfp] [-ift] [-wrp] [-rom8] [-uben]\n"); printf ("[-freq frequency] [-c batch_file]\n"); - printf ("[-erc32] [-leon2] [-leon3] [-griscv] [-rv32]\n"); + printf ("[-erc32] [-leon2] [-leon3] [-gr740] [-griscv] [-rv32]\n"); printf ("[-d] [-v] [-rt] [-bridge name] [files]\n"); } @@ -56,8 +56,9 @@ init_sim (void) { int i; - /* Use extended interrupt line of GR712RC */ - irqmp_extirq = 12; + /* Use extended interrupt line of GR712RC by default */ + if (irqmp_extirq < 0) + irqmp_extirq = 12; for (i = 0; i < ncpu; i++) grlib_ahbm_add (&leon3s, 0); @@ -147,6 +147,11 @@ main (argc, argv) { nouartrx = 1; } + else if (strcmp (argv[stat], "-extirq") == 0) + { + if ((stat + 1) < argc) + irqmp_extirq = VAL (argv[++stat]); + } else if (strcmp (argv[stat], "-r") == 0) { run = 1; @@ -305,6 +305,7 @@ extern void sys_halt (void); extern int elf_load (char *fname, int load); extern double get_time (void); extern int nouartrx; +extern int irqmp_extirq; //extern host_callback *sim_callback; extern int dumbio; extern int tty_setup; |