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 "verilated.h"
// Joachim says:
// Clock: 12 MHz, 38400 bps
// Divisor = 12*10E6 / 38400 = 312
#define BIT_DIV 312
// Clock: 18 MHz, 38400 bps
// Divisor = 18*10E6 / 38400 = 468.75 ~ 469
#define BIT_DIV 469
struct uart {
int bit_div;