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

Subversion Repositories neorv32

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

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

Rev 48 Rev 49
Line 267... Line 267...
 
 
  uint32_t tmp;
  uint32_t tmp;
  int i;
  int i;
  char c;
  char c;
 
 
  neorv32_uart_printf("\n\n<< Hardware Configuration Overview >>\n");
  neorv32_uart_printf("\n\n<<< Processor Configuration Overview >>>\n");
 
 
 
  // Processor - general stuff
 
  neorv32_uart_printf("\n=== << General >> ===\n");
 
  neorv32_uart_printf("Clock:   %u Hz\n", SYSINFO_CLK);
 
  neorv32_uart_printf("User ID: 0x%x\n", SYSINFO_USER_CODE);
 
 
 
 
  // CPU configuration
  // CPU configuration
  neorv32_uart_printf("\n---- Central Processing Unit ----\n");
  neorv32_uart_printf("\n=== << CPU >> ===\n");
 
 
  // ID
  // ID
  neorv32_uart_printf("Hart ID:           0x%x\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));
Line 283... Line 289...
  neorv32_uart_printf("Architecture ID:   0x%x", tmp);
  neorv32_uart_printf("Architecture ID:   0x%x", tmp);
  if (tmp == NEORV32_ARCHID) {
  if (tmp == NEORV32_ARCHID) {
    neorv32_uart_printf(" (NEORV32)");
    neorv32_uart_printf(" (NEORV32)");
  }
  }
 
 
  // HW version
  // hardware version
  neorv32_uart_printf("\nImplementation ID: 0x%x (", neorv32_cpu_csr_read(CSR_MIMPID));
  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");
  neorv32_uart_printf(")\n");
 
 
  // CPU architecture
  // CPU architecture
Line 351... Line 357...
 
 
  // check hardware performance monitors
  // check hardware performance monitors
  neorv32_uart_printf("HPM Counters:      %u\n", neorv32_cpu_hpm_get_counters());
  neorv32_uart_printf("HPM Counters:      %u\n", neorv32_cpu_hpm_get_counters());
 
 
 
 
  // Misc - system
 
  neorv32_uart_printf("\n\n---- Processor - General ----\n");
 
  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=== << Memory Configuration >> ===\n");
 
 
  neorv32_uart_printf("Instr. base address:  0x%x\n", SYSINFO_ISPACE_BASE);
  neorv32_uart_printf("Instr. base address:  0x%x\n", SYSINFO_ISPACE_BASE);
  neorv32_uart_printf("Internal IMEM:        ");
  neorv32_uart_printf("Internal IMEM:        ");
  __neorv32_rte_print_true_false(SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_MEM_INT_IMEM));
  __neorv32_rte_print_true_false(SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_MEM_INT_IMEM));
  neorv32_uart_printf("IMEM size:            %u bytes\n", SYSINFO_IMEM_SIZE);
  neorv32_uart_printf("IMEM size:            %u bytes\n", SYSINFO_IMEM_SIZE);
Line 422... Line 422...
  else {
  else {
    neorv32_uart_printf("little\n");
    neorv32_uart_printf("little\n");
  }
  }
 
 
  // peripherals
  // peripherals
  neorv32_uart_printf("\n\n---- Processor - Peripherals ----\n");
  neorv32_uart_printf("\n=== << Peripherals >> ===\n");
 
 
  tmp = SYSINFO_FEATURES;
  tmp = SYSINFO_FEATURES;
 
 
  neorv32_uart_printf("GPIO  - ");
  neorv32_uart_printf("GPIO  - ");
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_GPIO));
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_GPIO));
Line 452... Line 452...
  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("CFS   - ");
  neorv32_uart_printf("CFS   - ");
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_CFS));
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_CFS));
 
 
 
  neorv32_uart_printf("NCO   - ");
 
  __neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_NCO));
}
}
 
 
 
 
/**********************************************************************//**
/**********************************************************************//**
 * NEORV32 runtime environment: Private function to print true or false.
 * NEORV32 runtime environment: Private function to print true or false.

powered by: WebSVN 2.1.0

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