Changes
Page history
Update Verilator
authored
Nov 30, 2020
by
Toru Koizumi
Show whitespace changes
Inline
Side-by-side
Verilator.md
View page @
7cfdaef9
...
...
@@ -15,7 +15,7 @@ Verilog HDLの記述をC++に変換し、コンパイル後にシミュレーシ
$ sudo apt-get install verilator
```
高速化のため、以下の設定をおすすめします。
高速化のため、以下の設定をおすすめします
(編集にはroot権限が必要です)
。
*
`/usr/share/verilator/include/verilated.mk`
の89行目
`#OPT_FAST = -O2 -fstrict-aliasing`
の
`#`
を消すことで最適化を有効にする
...
...
@@ -54,8 +54,10 @@ void uart_rx(unsigned int u) {
b = 0;
c = 0;
} else if( s != 0 && s + 1000000000000 / uart_Hz / 2 * (2*b+3) < timer_ps ) {
c |= u << b;
if( ++b == 8 ) {
if( b < 8 ) {
c += u << b;
++b;
} else {
std::putchar(c);
std::fflush(stdout);
s = 0;
...
...
...
...