Update bit divisor calc in verilator's uart to our current 18 MHz

This commit is contained in:
Daniel Lublin 2022-10-03 13:11:53 +02:00
parent 6f31bbe37a
commit 2bb62af183
No known key found for this signature in database
GPG Key ID: 75BD0FEB8D3E7830

View File

@ -24,10 +24,9 @@
#include "Vapplication_fpga.h" #include "Vapplication_fpga.h"
#include "verilated.h" #include "verilated.h"
// Joachim says: // Clock: 18 MHz, 38400 bps
// Clock: 12 MHz, 38400 bps // Divisor = 18*10E6 / 38400 = 468.75 ~ 469
// Divisor = 12*10E6 / 38400 = 312 #define BIT_DIV 469
#define BIT_DIV 312
struct uart { struct uart {
int bit_div; int bit_div;