Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
b3exp
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2022
b3exp
Wiki
Verilator
Changes
Page history
New page
Templates
Clone repository
Update Verilator
authored
4 years ago
by
Toru Koizumi
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Verilator.md
+5
-3
5 additions, 3 deletions
Verilator.md
with
5 additions
and
3 deletions
Verilator.md
View page @
7cfdaef9
...
@@ -15,7 +15,7 @@ Verilog HDLの記述をC++に変換し、コンパイル後にシミュレーシ
...
@@ -15,7 +15,7 @@ Verilog HDLの記述をC++に変換し、コンパイル後にシミュレーシ
$ sudo apt-get install verilator
$ sudo apt-get install verilator
```
```
高速化のため、以下の設定をおすすめします。
高速化のため、以下の設定をおすすめします
(編集にはroot権限が必要です)
。
*
`/usr/share/verilator/include/verilated.mk`
の89行目
`#OPT_FAST = -O2 -fstrict-aliasing`
の
`#`
を消すことで最適化を有効にする
*
`/usr/share/verilator/include/verilated.mk`
の89行目
`#OPT_FAST = -O2 -fstrict-aliasing`
の
`#`
を消すことで最適化を有効にする
...
@@ -54,8 +54,10 @@ void uart_rx(unsigned int u) {
...
@@ -54,8 +54,10 @@ void uart_rx(unsigned int u) {
b = 0;
b = 0;
c = 0;
c = 0;
} else if( s != 0 && s + 1000000000000 / uart_Hz / 2 * (2*b+3) < timer_ps ) {
} 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::putchar(c);
std::fflush(stdout);
std::fflush(stdout);
s = 0;
s = 0;
...
...
This diff is collapsed.
Click to expand it.