Skip to content

Commit

Permalink
[sw] update TRNG-using programs
Browse files Browse the repository at this point in the history
  • Loading branch information
stnolting committed May 18, 2023
1 parent f879493 commit 229dbd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sw/example/demo_trng/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int main(void) {
}

// enable TRNG
neorv32_trng_enable();
neorv32_trng_enable(0); // no interrupts
neorv32_cpu_delay_ms(100); // TRNG "warm up"

while(1) {
Expand Down
4 changes: 2 additions & 2 deletions sw/example/game_of_life/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ int main(void) {
// check if TRNG was synthesized
if (neorv32_trng_available()) {
neorv32_uart0_printf("\nTRNG detected. Using TRNG for universe initialization.\n");
neorv32_trng_enable();
neorv32_trng_enable(0);
trng_available = 1;
}

Expand Down Expand Up @@ -226,7 +226,7 @@ void print_universe(int u){

for (y=0; y<NUM_CELLS_Y; y++) {
neorv32_uart0_putc('|');

for (x=0; x<NUM_CELLS_X; x++) {
if (get_cell(u, x, y))
neorv32_uart0_putc((char)CELL_ALIVE);
Expand Down

0 comments on commit 229dbd2

Please sign in to comment.