OR1K support
 All Functions Typedefs Groups
Functions
Miscellaneous utility functions

Functions

void or1k_report (unsigned long int value)
 
unsigned long int or1k_rand (void)
 
void or1k_uart_set_read_cb (void(*cb)(char c))
 

Detailed Description

Function Documentation

unsigned long int or1k_rand ( void  )

Get (pseudo) random number

This should return pseudo-random numbers, based on a Galois LFSR.

Returns
(Pseudo) Random number
void or1k_report ( unsigned long int  value)

Report value to simulator

Uses the built-in simulator functionality.

Parameters
valueValue to report
void or1k_uart_set_read_cb ( void(*)(char c)  cb)

Register UART callback

This function sets a callback function that is called when a character is received via UART. The callback function has no return and a gets the character as parameter. When a character is received, the function is called.

Example (UART echo):

void uart_in(char c) {
printf("%c", c); // Echo
}
int main() {
while (1) {}
}