1# Copyright (c) 2021 Antmicro
2# SPDX-License-Identifier: Apache-2.0
3
4using sysbus
5
6$zephyr_elf?=@../build/zephyr/zephyr.elf
7
8mach create
9machine LoadPlatformDescription $ORIGIN/litex-vexriscv-tflite.repl
10showAnalyzer uart
11logLevel 3 i2c
12
13macro reset
14"""
15    sysbus LoadELF $zephyr_elf
16
17    i2c.adxl345 MaxFifoDepth 1
18    i2c.adxl345 FeedSample $ORIGIN/circle.data
19    i2c.adxl345 FeedSample 0 15000 15000 128
20    i2c.adxl345 FeedSample 0 0 0 128
21    i2c.adxl345 FeedSample $ORIGIN/angle.data
22    i2c.adxl345 FeedSample 0 15000 15000 128
23    i2c.adxl345 FeedSample 0 0 0 128
24    i2c.adxl345 FeedSample $ORIGIN/circle.data
25    i2c.adxl345 FeedSample 0 15000 15000 128
26    i2c.adxl345 FeedSample 0 0 0 128
27    i2c.adxl345 FeedSample $ORIGIN/angle.data
28    i2c.adxl345 FeedSample 0 15000 15000 128
29    i2c.adxl345 FeedSample 0 0 0 128
30
31"""
32
33runMacro $reset
34