Aries Embedded RISC-V on MAX10 Gebruikershandleiding - Pagina 20

Blader online of download pdf Gebruikershandleiding voor {categorie_naam} Aries Embedded RISC-V on MAX10. Aries Embedded RISC-V on MAX10 20 pagina's.

RISC-V on MAX10 User Guide
Modify the component instantiation, this example routes the Uart signals to PMod:
u0
:
component
qsys0
(
port map
clk_clk
reset_reset_n
gpio_export
uart_rxd
uart_txd
uart2_rxd
uart2_txd
);
To use the Uart from the RISC-V firmware open the file FpgaConfig.h
Add the memory address and interrupt number as specified in Intel Platform Designer:
# define MEMADDR_UART2
# define IRQ_UART2
Declare the Uart struct:
Uart*
g_Uart2;
extern
Open the file FpgaConfig.c and provide the definition for the struct:
Uart*
g_Uart2
=
(Uart*)(MEMADDR_UART2);
Now the second Uart is available to be used in the firmware:
main() {
int
// Greetings
UartWrite(g_Uart,
"\n\n* * Example Demo - "DBUILD_DATE" *
UartWrite(g_Uart2,
"Hello
Chapter 5. Reference Design
=>
clk25,
=>
resetn,
=>
gpio,
=>
uart_rx,
=>
uart_tx,
=>
pmod_j3(1),
=>
pmod_j3(0)
((uintptr_t)(0x00010300))
1
World\n");
*\n");
Page 20 of 20