NEORV32 - Software Framework Documentation
Loading...
Searching...
No Matches
Functions
legacy.h File Reference

Wrappers and functions for backwards compatibility. More...

Go to the source code of this file.

Macros

UART0: Backward compatibility Wrapper, #neorv32_uart_h
#define neorv32_uart0_available()   neorv32_uart_available(NEORV32_UART0)
 
#define neorv32_uart0_get_rx_fifo_depth()   neorv32_uart_get_rx_fifo_depth(NEORV32_UART0)
 
#define neorv32_uart0_get_tx_fifo_depth()   neorv32_uart_get_tx_fifo_depth(NEORV32_UART0)
 
#define neorv32_uart0_setup(baudrate, irq_mask)   neorv32_uart_setup(NEORV32_UART0, baudrate, irq_mask)
 
#define neorv32_uart0_disable()   neorv32_uart_disable(NEORV32_UART0)
 
#define neorv32_uart0_enable()   neorv32_uart_enable(NEORV32_UART0)
 
#define neorv32_uart0_rtscts_disable()   neorv32_uart_rtscts_disable(NEORV32_UART0)
 
#define neorv32_uart0_rtscts_enable()   neorv32_uart_rtscts_enable(NEORV32_UART0)
 
#define neorv32_uart0_putc(c)   neorv32_uart_putc(NEORV32_UART0, c)
 
#define neorv32_uart0_tx_busy()   neorv32_uart_tx_busy(NEORV32_UART0)
 
#define neorv32_uart0_getc()   neorv32_uart_getc(NEORV32_UART0)
 
#define neorv32_uart0_char_received()   neorv32_uart_char_received(NEORV32_UART0)
 
#define neorv32_uart0_char_received_get()   neorv32_uart_char_received_get(NEORV32_UART0)
 
#define neorv32_uart0_puts(s)   neorv32_uart_puts(NEORV32_UART0, s)
 
#define neorv32_uart0_printf(...)   neorv32_uart_printf(NEORV32_UART0, __VA_ARGS__)
 
#define neorv32_uart0_scan(buffer, max_size, echo)   neorv32_uart_scan(NEORV32_UART0, buffer, max_size, echo)
 
UART1: Backward compatibility Wrapper, #neorv32_uart_h
#define neorv32_uart1_available()   neorv32_uart_available(NEORV32_UART1)
 
#define neorv32_uart1_get_rx_fifo_depth()   neorv32_uart_get_rx_fifo_depth(NEORV32_UART1)
 
#define neorv32_uart1_get_tx_fifo_depth()   neorv32_uart_get_tx_fifo_depth(NEORV32_UART1)
 
#define neorv32_uart1_setup(baudrate, irq_mask)   neorv32_uart_setup(NEORV32_UART1, baudrate, irq_mask)
 
#define neorv32_uart1_disable()   neorv32_uart_disable(NEORV32_UART1)
 
#define neorv32_uart1_enable()   neorv32_uart_enable(NEORV32_UART1)
 
#define neorv32_uart1_rtscts_disable()   neorv32_uart_rtscts_disable(NEORV32_UART1)
 
#define neorv32_uart1_rtscts_enable()   neorv32_uart_rtscts_enable(NEORV32_UART1)
 
#define neorv32_uart1_putc(c)   neorv32_uart_putc(NEORV32_UART1, c)
 
#define neorv32_uart1_tx_busy()   neorv32_uart_tx_busy(NEORV32_UART1)
 
#define neorv32_uart1_getc()   neorv32_uart_getc(NEORV32_UART1)
 
#define neorv32_uart1_char_received()   neorv32_uart_char_received(NEORV32_UART1)
 
#define neorv32_uart1_char_received_get()   neorv32_uart_char_received_get(NEORV32_UART1)
 
#define neorv32_uart1_puts(s)   neorv32_uart_puts(NEORV32_UART1, s)
 
#define neorv32_uart1_printf(...)   neorv32_uart_printf(NEORV32_UART1, __VA_ARGS__)
 
#define neorv32_uart1_scan(buffer, max_size, echo)   neorv32_uart_scan(NEORV32_UART1, buffer, max_size, echo)
 
Backward-compatibility layer (before version v1.7.8.2)
Warning
This function is deprecated!
#define neorv32_cfu_cmd0(funct7, rs1, rs2)   neorv32_cfu_r3_instr(funct7, 0, rs1, rs2)
 
#define neorv32_cfu_cmd1(funct7, rs1, rs2)   neorv32_cfu_r3_instr(funct7, 1, rs1, rs2)
 
#define neorv32_cfu_cmd2(funct7, rs1, rs2)   neorv32_cfu_r3_instr(funct7, 2, rs1, rs2)
 
#define neorv32_cfu_cmd3(funct7, rs1, rs2)   neorv32_cfu_r3_instr(funct7, 3, rs1, rs2)
 
#define neorv32_cfu_cmd4(funct7, rs1, rs2)   neorv32_cfu_r3_instr(funct7, 4, rs1, rs2)
 
#define neorv32_cfu_cmd5(funct7, rs1, rs2)   neorv32_cfu_r3_instr(funct7, 5, rs1, rs2)
 
#define neorv32_cfu_cmd6(funct7, rs1, rs2)   neorv32_cfu_r3_instr(funct7, 6, rs1, rs2)
 
#define neorv32_cfu_cmd7(funct7, rs1, rs2)   neorv32_cfu_r3_instr(funct7, 7, rs1, rs2)
 

Functions

void neorv32_uart0_print (const char *s)
 
void neorv32_uart1_print (const char *s)
 
uint64_t neorv32_cpu_get_systime (void)
 
void neorv32_cpu_eint (void)
 
void neorv32_cpu_dint (void)
 

Detailed Description

Wrappers and functions for backwards compatibility.

Warning
Do not use these functions for new designs as they are no longer supported and might get removed in the future.

Macro Definition Documentation

◆ neorv32_cfu_cmd0

#define neorv32_cfu_cmd0 (   funct7,
  rs1,
  rs2 
)    neorv32_cfu_r3_instr(funct7, 0, rs1, rs2)

R3-type CFU custom instruction 0 (funct3 = 000)

◆ neorv32_cfu_cmd1

#define neorv32_cfu_cmd1 (   funct7,
  rs1,
  rs2 
)    neorv32_cfu_r3_instr(funct7, 1, rs1, rs2)

R3-type CFU custom instruction 1 (funct3 = 001)

◆ neorv32_cfu_cmd2

#define neorv32_cfu_cmd2 (   funct7,
  rs1,
  rs2 
)    neorv32_cfu_r3_instr(funct7, 2, rs1, rs2)

R3-type CFU custom instruction 2 (funct3 = 010)

◆ neorv32_cfu_cmd3

#define neorv32_cfu_cmd3 (   funct7,
  rs1,
  rs2 
)    neorv32_cfu_r3_instr(funct7, 3, rs1, rs2)

R3-type CFU custom instruction 3 (funct3 = 011)

◆ neorv32_cfu_cmd4

#define neorv32_cfu_cmd4 (   funct7,
  rs1,
  rs2 
)    neorv32_cfu_r3_instr(funct7, 4, rs1, rs2)

R3-type CFU custom instruction 4 (funct3 = 100)

◆ neorv32_cfu_cmd5

#define neorv32_cfu_cmd5 (   funct7,
  rs1,
  rs2 
)    neorv32_cfu_r3_instr(funct7, 5, rs1, rs2)

R3-type CFU custom instruction 5 (funct3 = 101)

◆ neorv32_cfu_cmd6

#define neorv32_cfu_cmd6 (   funct7,
  rs1,
  rs2 
)    neorv32_cfu_r3_instr(funct7, 6, rs1, rs2)

R3-type CFU custom instruction 6 (funct3 = 110)

◆ neorv32_cfu_cmd7

#define neorv32_cfu_cmd7 (   funct7,
  rs1,
  rs2 
)    neorv32_cfu_r3_instr(funct7, 7, rs1, rs2)

R3-type CFU custom instruction 7 (funct3 = 111)

Function Documentation

◆ neorv32_cpu_dint()

void neorv32_cpu_dint ( void  )
inline

Disable global CPU interrupts (via MIE flag in mstatus CSR).

Note
Interrupts are always enabled when the CPU is in user-mode.

◆ neorv32_cpu_eint()

void neorv32_cpu_eint ( void  )
inline

Enable global CPU interrupts (via MIE flag in mstatus CSR).

Note
Interrupts are always enabled when the CPU is in user-mode.

◆ neorv32_cpu_get_systime()

uint64_t neorv32_cpu_get_systime ( void  )
inline

Get current system time from time[h] CSR.

Note
This function requires the MTIME system timer to be implemented.
Returns
Current system time (64 bit).

◆ neorv32_uart0_print()

void neorv32_uart0_print ( const char *  s)
inline

Print string (zero-terminated) via UART0. Print full line break "\r\n" for every '
'.

Note
This function is blocking.
Warning
This function is deprecated!
Parameters
[in]sPointer to string.

◆ neorv32_uart1_print()

void neorv32_uart1_print ( const char *  s)
inline

Print string (zero-terminated) via UART1. Print full line break "\r\n" for every '
'.

Note
This function is blocking.
Warning
This function is deprecated!
Parameters
[in]sPointer to string.