Added software implementation
This commit is contained in:
@ -49,23 +49,22 @@
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "xil_printf.h"
|
#include "xil_printf.h"
|
||||||
#include "xil_io.h"
|
#include "xil_io.h"
|
||||||
|
#define SIMPELVGA_REG_BASE (0x43c00000)
|
||||||
#include <simplevga.h>
|
#define SIMPELVGA_REG_X (SIMPELVGA_REG_BASE + 0)
|
||||||
|
#define SIMPELVGA_REG_Y (SIMPELVGA_REG_BASE + 4)
|
||||||
|
#define SIMPELVGA_REG_COLOR (SIMPELVGA_REG_BASE + 8)
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
init_platform();
|
init_platform();
|
||||||
|
|
||||||
print("Hello World\n\r");
|
print("Hello World\n\r");
|
||||||
SIMPLEVGA_mWriteReg(XPAR_SIMPLEVGA_0_S00_AXI_BASEADDR, SIMPLEVGA_S00_AXI_SLV_REG0_OFFSET, 0xFFFFFFFF);
|
Xil_Out32(SIMPELVGA_REG_X, (460 << 16) + 160);
|
||||||
SIMPLEVGA_mWriteReg(XPAR_SIMPLEVGA_0_S00_AXI_BASEADDR, SIMPLEVGA_S00_AXI_SLV_REG1_OFFSET, 0xFFFFFFFF);
|
Xil_Out32(SIMPELVGA_REG_Y, (360 << 16) + 120);
|
||||||
SIMPLEVGA_mWriteReg(XPAR_SIMPLEVGA_0_S00_AXI_BASEADDR, SIMPLEVGA_S00_AXI_SLV_REG2_OFFSET, 0xFFFFFFFF);
|
|
||||||
unsigned long x = 1;
|
|
||||||
while(1) {
|
while(1) {
|
||||||
for(x = 1; x < 100; x++) {
|
unsigned long x;
|
||||||
unsigned long xreg = ((640-x) << 16) + x;
|
for(x = 0; x <= 0b111111; x++) {
|
||||||
SIMPLEVGA_mWriteReg(XPAR_SIMPLEVGA_0_S00_AXI_BASEADDR, SIMPLEVGA_S00_AXI_SLV_REG0_OFFSET, x);
|
Xil_Out32(SIMPELVGA_REG_COLOR, x);
|
||||||
|
printf("Set color %x\n",x);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user