Here is a motor driving BlackSoc example using existing modules, so no new Verilog was needed:
I built a test rig for testing encoder motors.
This example is driven from a mobile phone which sends commands to the HC-10 Bluetooth Low Energy device. It has command for forwards, backwards, left, right and stop. This uses mod_rs232 for the serial connection to the HM-10.
The encoders on the motors are read using mod_rotary. The Oled display is written to using mod_spi_oled. The motors are driven using mod_pwm and their direction set using mod_gpio.
Here is the example code:
I want to transfer this to a robot base and make it mobile. It needs a range sensor adding - probably the time of flight one. However, I am running out of BlackIce resources, so will probably have to remove something to add that.
There is also an issue in making the system turnkey, as it currently needs a Linux host and both USB devices connected. Putting a Raspberry Pi Zero on the RPi header might be the easiest solution to that. I could also use that for Wifi control rather than using the HM-10 module.