// 33.333Mhz / 38400hz * 4 = 217.013 => 215+2,1 => 215,1
// using a 100Mhz clock,
// 100Mhz / 38400hz * 4 = 651.039 => 215+2,3 => 215,3
- sasc_brg sasc_brg(clk, !rst_in, 215, 3, sio_ce, sio_ce_x4);
+ // using a 100Mhz clock, 115200baud
+ // 100Mhz / 115200hz * 4 = 217.013 => 215+2,1 => 215,1
+// sasc_brg sasc_brg(clk, !rst_in, 215, 3, sio_ce, sio_ce_x4);
+ sasc_brg sasc_brg(clk, !rst_in, 215, 1, sio_ce, sio_ce_x4);
sasc_top sasc_top(clk, !rst_in,
uart_in,
uart_out,
this.sp = new RXTXPort("/dev/ttyS0");
sp.setInputBufferSize(0);
sp.setOutputBufferSize(0);
- sp.setSerialPortParams(38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
+ //sp.setSerialPortParams(38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
+ sp.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
//sp.setFlowControlMode(sp.FLOWCONTROL_RTSCTS_IN | sp.FLOWCONTROL_RTSCTS_OUT);
sp.setFlowControlMode(0);
try {