First version of zynq cosimulation added

Signed-off-by: Joppe Blondel <joppe@blondel.nl>
This commit is contained in:
2022-09-09 17:53:03 +02:00
parent e18a0c1762
commit 8f03d29894
11 changed files with 1497 additions and 14 deletions

View File

@ -3,6 +3,12 @@
#include "uart.h"
#include "printf.h"
// COSIM control
volatile unsigned int * PAUSE = (unsigned int*) 0x7ffffff4; // Pause the cosimulation
volatile unsigned int * SOS = (unsigned int*) 0x7ffffff8; // (Re)start the cosimulation
volatile unsigned int * EOS = (unsigned int*) 0x7ffffffc; // Stop the cosimulation
void main(){
cpu_disable_interrups();
// Initialize ZYNQ Processing System
@ -10,7 +16,15 @@ void main(){
// Start UART
uart_setup();
*SOS = 1;
printf("Hello World!\n");
for(int i=0; i<32; i++){
printf("i=%d\n", i);
}
*EOS = 1;
for(;;);
}