OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [lib/] [source/] [neorv32_rte.c] - Diff between revs 24 and 30

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 24 Rev 30
Line 252... Line 252...
 
 
  // CPU configuration
  // CPU configuration
  neorv32_uart_printf("\n-- Central Processing Unit --\n");
  neorv32_uart_printf("\n-- Central Processing Unit --\n");
 
 
  // ID
  // ID
  neorv32_uart_printf("Hart ID:          %u\n", neorv32_cpu_csr_read(CSR_MHARTID));
  neorv32_uart_printf("Hart ID:           0x%x\n", neorv32_cpu_csr_read(CSR_MHARTID));
 
 
  neorv32_uart_printf("Vendor ID:        0x%x\n", neorv32_cpu_csr_read(CSR_MVENDORID));
  neorv32_uart_printf("Vendor ID:        0x%x\n", neorv32_cpu_csr_read(CSR_MVENDORID));
 
 
  tmp = neorv32_cpu_csr_read(CSR_MARCHID);
  tmp = neorv32_cpu_csr_read(CSR_MARCHID);
  neorv32_uart_printf("Architecture ID:  0x%x", tmp);
  neorv32_uart_printf("Architecture ID:  0x%x", tmp);
 
 
  // Custom user code/ID
 
  neorv32_uart_printf("\nUser ID:          0x%x\n", SYSINFO_USER_CODE);
 
 
 
  // HW version
  // HW version
  neorv32_uart_printf("Hardware version: ");
  neorv32_uart_printf("\nImplementation ID: 0x%x (", neorv32_cpu_csr_read(CSR_MIMPID));
  neorv32_rte_print_hw_version();
  neorv32_rte_print_hw_version();
 
  neorv32_uart_printf(")\n");
 
 
  // CPU architecture
  // CPU architecture
  neorv32_uart_printf("\nArchitecture:     ");
  neorv32_uart_printf("Architecture:      ");
  tmp = neorv32_cpu_csr_read(CSR_MISA);
  tmp = neorv32_cpu_csr_read(CSR_MISA);
  tmp = (tmp >> 30) & 0x03;
  tmp = (tmp >> 30) & 0x03;
  if (tmp == 0) {
  if (tmp == 0) {
    neorv32_uart_printf("unknown");
    neorv32_uart_printf("unknown");
  }
  }
Line 305... Line 303...
    neorv32_uart_printf("Zifencei ");
    neorv32_uart_printf("Zifencei ");
  }
  }
 
 
 
 
  // Misc
  // Misc
  neorv32_uart_printf("\n\n-- System --\n");
  neorv32_uart_printf("\n\n\n-- Processor --\n");
  neorv32_uart_printf("Clock: %u Hz\n", SYSINFO_CLK);
  neorv32_uart_printf("Clock: %u Hz\n", SYSINFO_CLK);
 
  neorv32_uart_printf("User ID: 0x%x\n", SYSINFO_USER_CODE);
 
 
 
 
  // Memory configuration
  // Memory configuration
  neorv32_uart_printf("\n-- Processor Memory Configuration --\n");
  neorv32_uart_printf("\n-- Processor Memory Configuration --\n");
 
 
Line 327... Line 326...
  neorv32_uart_printf("DMEM size:            %u bytes\n", SYSINFO_DMEM_SIZE);
  neorv32_uart_printf("DMEM size:            %u bytes\n", SYSINFO_DMEM_SIZE);
 
 
  neorv32_uart_printf("Bootloader:           ");
  neorv32_uart_printf("Bootloader:           ");
  __neorv32_rte_print_true_false(SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_BOOTLOADER));
  __neorv32_rte_print_true_false(SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_BOOTLOADER));
 
 
  neorv32_uart_printf("External interface:   ");
  neorv32_uart_printf("External M interface: ");
  __neorv32_rte_print_true_false(SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_MEM_EXT));
  __neorv32_rte_print_true_false(SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_MEM_EXT));
 
 
  // peripherals
  // peripherals
  neorv32_uart_printf("\n-- Processor Peripherals --\n");
  neorv32_uart_printf("\n-- Processor Peripherals --\n");
 
 
Line 359... Line 358...
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_WDT));
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_WDT));
 
 
  neorv32_uart_printf("TRNG:    ");
  neorv32_uart_printf("TRNG:    ");
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_TRNG));
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_TRNG));
 
 
  neorv32_uart_printf("DEVNULL: ");
 
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_DEVNULL));
 
 
 
  neorv32_uart_printf("CFU:     ");
  neorv32_uart_printf("CFU:     ");
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_CFU));
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_CFU));
}
}
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.