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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [example/] [demo_trng/] [main.c] - Diff between revs 65 and 68

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

Rev 65 Rev 68
Line 80... Line 80...
 
 
  // check available hardware extensions and compare with compiler flags
  // check available hardware extensions and compare with compiler flags
  neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
  neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
 
 
  // intro
  // intro
  neorv32_uart0_printf("\n--- TRNG Demo ---\n\n");
  neorv32_uart0_printf("\n<<< NEORV32 TRNG Demo >>>\n");
 
 
  // check if TRNG unit is implemented at all
  // check if TRNG unit is implemented at all
  if (neorv32_trng_available() == 0) {
  if (neorv32_trng_available() == 0) {
    neorv32_uart0_printf("No TRNG implemented.");
    neorv32_uart0_printf("No TRNG implemented.");
    return 1;
    return 1;
  }
  }
 
 
  // enable TRNG
  // enable TRNG
  neorv32_trng_enable();
  neorv32_trng_enable();
 
  neorv32_cpu_delay_ms(100); // TRNG "warm up"
 
 
  while(1) {
  while(1) {
 
 
    // main menu
    // main menu
    neorv32_uart0_printf("\nCommands:\n"
    neorv32_uart0_printf("\nCommands:\n"

powered by: WebSVN 2.1.0

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