Skip to content

Commit 1699094

Browse files
committed
Merge branch 'develop'
2 parents 4276169 + 3a94f66 commit 1699094

File tree

51 files changed

+1250
-630
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1250
-630
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language: python
33
sudo: false
44

55
python:
6-
- 3.6
6+
- 3.7
77

88
addons:
99
apt:
@@ -12,7 +12,7 @@ addons:
1212
- verilator
1313

1414
install:
15-
- pip install jinja2 pytest pytest-pythonpath pyverilog ipgen numpy
15+
- pip install pytest pytest-pythonpath jinja2 pyverilog numpy
1616

1717
script:
1818
- python -m pytest tests examples

README.md

Lines changed: 60 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Veriloggen
33

44
[![Build Status](https://travis-ci.org/PyHDI/veriloggen.svg)](https://travis-ci.org/PyHDI/veriloggen)
55

6-
A library for constructing a Verilog HDL source code in Python
6+
A Mixed-Paradigm Hardware Construction Framework
77

88
Copyright 2015, Shinya Takamaeda-Yamazaki and Contributors
99

@@ -42,10 +42,15 @@ url={http://dx.doi.org/10.1007/978-3-319-16214-0_42},
4242
What's Veriloggen?
4343
==============================
4444

45-
Veriloggen is an open-sourced library for constructing a Verilog HDL source code in Python.
45+
Veriloggen is a mixed-paradigm framework for constructing a hardware in Python.
46+
47+
Veriloggen provides a low-level abstraction of Verilog HDL AST. You can build up a hardware design written in Verilog HDL very easily by using the AST abstraction and the entire functionality of Python.
48+
49+
In addition to the low-level abstraction of Verilog HDL, Veriloggen provides high-level abstractions to productively express a hardware structure.
50+
51+
- **Stream** is a dataflow-based high-level synthesis layer for high-performance parallel stream processing.
52+
- **Thread** is a procedural high-level synthesis layer to express sequential behaviors, such as DMA transfers and controls.
4653

47-
Veriloggen is not a behavior synthesis (or high level synthesis). Veriloggen provides a lightweight abstraction of Verilog HDL AST. You can build up a hardware design written in Verilog HDL very easily by using the AST abstraction and the entire functionality of Python.
48-
4954
Veriloggen is not designed for designing a hardware by programmer directly, but is for providing an efficient abstraction to develop a more efficient domain specific language and tools.
5055

5156

@@ -77,38 +82,49 @@ Requirements
7782
--------------------
7883

7984
- Python3: 3.6 or later
80-
8185
- Icarus Verilog: 10.1 or later
8286

8387
```
8488
sudo apt install iverilog
8589
```
8690

87-
- Pyverilog: 1.1.4 or later
8891
- Jinja2: 2.10 or later
89-
- NumPy: 1.14 or later
92+
- Pyverilog: 1.2.0 or later
93+
- NumPy: 1.17 or later
9094

9195
```
9296
pip3 install pyverilog jinja2 numpy
9397
```
9498

95-
Optional Installation
99+
Optional installation for testing
96100
--------------------
97101

98-
- pytest: 3.2 or later
99-
- pytest-pythonpath: 0.7 or later
102+
These are required for automatic testing of **tests** and **examples**.
103+
We recommend to install these testing library to verify experimental features.
100104

101-
These are required for the testing execution of test codes in tests and examples.
105+
- pytest: 3.8.1 or later
106+
- pytest-pythonpath: 0.7.3 or later
102107

103108
```
104109
pip3 install pytest pytest-pythonpath
105110
```
106111

112+
For fast RTL simulation, we recommend to install Verilator.
113+
114+
- Verilator: 3.916 or later
115+
116+
```
117+
sudo apt install verilator
118+
```
119+
120+
Optional installation for visualization
121+
--------------------
122+
123+
To visualize the generated hardware by veriloggen.stream, these libraries are required.
124+
107125
- Graphviz: 2.38.0 or later
108126
- Pygraphviz: 1.3.1 or later
109127

110-
These are required for graph visualization by veriloggen.dataflow:
111-
112128
```
113129
sudo apt install graphviz
114130
pip3 install pygraphviz
@@ -117,16 +133,16 @@ pip3 install pygraphviz
117133
Install
118134
--------------------
119135

120-
Install Veriloggen:
136+
Now you can install Veriloggen using setup.py script:
121137

122138
```
123139
python3 setup.py install
124140
```
125141

126-
On Docker
142+
Docker
127143
--------------------
128144

129-
Dockerfile is available, so that you can try Veriloggen on Docker without any installation on your host platform.
145+
Dockerfile is available. You can try Veriloggen on Docker without any installation on your host platform.
130146

131147
```
132148
cd docker
@@ -137,7 +153,27 @@ make
137153
```
138154

139155

140-
Getting Started
156+
Examples and testing
157+
==============================
158+
159+
There are some exapmles in **examples** and various testing codes in **tests**.
160+
The testing codes are actually good small examples suggesting how to represent a desired function.
161+
162+
To run the testing codes, please type the following commands.
163+
164+
```
165+
cd tests
166+
python3 -m pytest .
167+
```
168+
169+
If you use Verilator instead of Icarus Verilog for RTL simulation, set "--sim" option.
170+
171+
```
172+
python3 -m pytest --sim=verilator .
173+
```
174+
175+
176+
Getting started
141177
==============================
142178

143179
You can find some examples in 'veriloggen/examples/' and 'veriloggen/tests'.
@@ -338,16 +374,16 @@ If you installed GTKwave and enable 'sim.view_waveform()' in 'hello_led.py', you
338374
![waveform.png](img/waveform.png)
339375

340376

341-
Veriloggen Extension Libraries
377+
Veriloggen extension libraries
342378
==============================
343379

344-
Mixed-Paradigm High-Level Synthesis
380+
Mixed-paradigm high-level synthesis
345381
--------------------
346382

347383
- veriloggen.thread.Thread: Procedural high-level synthesis for DMA and I/O controls
348384
- veriloggen.thread.Stream: Dataflow-based high-level synthesis for high-performance stream processing
349385

350-
Frequently-used Abstractions
386+
Frequently-used abstractions
351387
--------------------
352388

353389
- veriloggen.verilog: Verilog HDL source code synthesis and import APIs
@@ -358,8 +394,11 @@ Frequently-used Abstractions
358394
Please see examples and tests directories for many examples.
359395

360396

361-
Related Project
397+
Related project
362398
==============================
363399

364400
[Pyverilog](https://github.com/PyHDI/Pyverilog)
365401
- Python-based Hardware Design Processing Toolkit for Verilog HDL
402+
403+
[NNgen](https://github.com/NNgen/nngen)
404+
- A Fully-Customizable Hardware Synthesis Compiler for Deep Neural Network

README.rst

Lines changed: 72 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Veriloggen
33

44
|Build Status|
55

6-
A library for constructing a Verilog HDL source code in Python
6+
A Mixed-Paradigm Hardware Construction Framework
77

88
Copyright 2015, Shinya Takamaeda-Yamazaki and Contributors
99

@@ -43,13 +43,21 @@ Pyverilog. (Veriloggen is constructed on Pyverilog.)
4343
What’s Veriloggen?
4444
==================
4545

46-
Veriloggen is an open-sourced library for constructing a Verilog HDL
47-
source code in Python.
46+
Veriloggen is a mixed-paradigm framework for constructing a hardware in
47+
Python.
4848

49-
Veriloggen is not a behavior synthesis (or high level synthesis).
50-
Veriloggen provides a lightweight abstraction of Verilog HDL AST. You
51-
can build up a hardware design written in Verilog HDL very easily by
52-
using the AST abstraction and the entire functionality of Python.
49+
Veriloggen provides a low-level abstraction of Verilog HDL AST. You can
50+
build up a hardware design written in Verilog HDL very easily by using
51+
the AST abstraction and the entire functionality of Python.
52+
53+
In addition to the low-level abstraction of Verilog HDL, Veriloggen
54+
provides high-level abstractions to productively express a hardware
55+
structure.
56+
57+
- **Stream** is a dataflow-based high-level synthesis layer for
58+
high-performance parallel stream processing.
59+
- **Thread** is a procedural high-level synthesis layer to express
60+
sequential behaviors, such as DMA transfers and controls.
5361

5462
Veriloggen is not designed for designing a hardware by programmer
5563
directly, but is for providing an efficient abstraction to develop a
@@ -90,39 +98,51 @@ Requirements
9098
------------
9199

92100
- Python3: 3.6 or later
93-
94101
- Icarus Verilog: 10.1 or later
95102

96103
::
97104

98105
sudo apt install iverilog
99106

100-
- Pyverilog: 1.1.4 or later
101107
- Jinja2: 2.10 or later
102-
- NumPy: 1.14 or later
108+
- Pyverilog: 1.2.0 or later
109+
- NumPy: 1.17 or later
103110

104111
::
105112

106113
pip3 install pyverilog jinja2 numpy
107114

108-
Optional Installation
109-
---------------------
115+
Optional installation for testing
116+
---------------------------------
110117

111-
- pytest: 3.2 or later
112-
- pytest-pythonpath: 0.7 or later
118+
These are required for automatic testing of **tests** and **examples**.
119+
We recommend to install these testing library to verify experimental
120+
features.
113121

114-
These are required for the testing execution of test codes in tests and
115-
examples.
122+
- pytest: 3.8.1 or later
123+
- pytest-pythonpath: 0.7.3 or later
116124

117125
::
118126

119127
pip3 install pytest pytest-pythonpath
120128

129+
For fast RTL simulation, we recommend to install Verilator.
130+
131+
- Verilator: 3.916 or later
132+
133+
::
134+
135+
sudo apt install verilator
136+
137+
Optional installation for visualization
138+
---------------------------------------
139+
140+
To visualize the generated hardware by veriloggen.stream, these
141+
libraries are required.
142+
121143
- Graphviz: 2.38.0 or later
122144
- Pygraphviz: 1.3.1 or later
123145

124-
These are required for graph visualization by veriloggen.dataflow:
125-
126146
::
127147

128148
sudo apt install graphviz
@@ -131,17 +151,17 @@ These are required for graph visualization by veriloggen.dataflow:
131151
Install
132152
-------
133153

134-
Install Veriloggen:
154+
Now you can install Veriloggen using setup.py script:
135155

136156
::
137157

138158
python3 setup.py install
139159

140-
On Docker
141-
---------
160+
Docker
161+
------
142162

143-
Dockerfile is available, so that you can try Veriloggen on Docker
144-
without any installation on your host platform.
163+
Dockerfile is available. You can try Veriloggen on Docker without any
164+
installation on your host platform.
145165

146166
::
147167

@@ -151,7 +171,28 @@ without any installation on your host platform.
151171
cd veriloggen/examples/led/
152172
make
153173

154-
Getting Started
174+
Examples and testing
175+
====================
176+
177+
There are some exapmles in **examples** and various testing codes in
178+
**tests**. The testing codes are actually good small examples suggesting
179+
how to represent a desired function.
180+
181+
To run the testing codes, please type the following commands.
182+
183+
::
184+
185+
cd tests
186+
python3 -m pytest .
187+
188+
If you use Verilator instead of Icarus Verilog for RTL simulation, set
189+
“–sim” option.
190+
191+
::
192+
193+
python3 -m pytest --sim=verilator .
194+
195+
Getting started
155196
===============
156197

157198
You can find some examples in ‘veriloggen/examples/’ and
@@ -359,18 +400,18 @@ If you installed GTKwave and enable ‘sim.view_waveform()’ in
359400

360401
waveform.png
361402

362-
Veriloggen Extension Libraries
403+
Veriloggen extension libraries
363404
==============================
364405

365-
Mixed-Paradigm High-Level Synthesis
406+
Mixed-paradigm high-level synthesis
366407
-----------------------------------
367408

368409
- veriloggen.thread.Thread: Procedural high-level synthesis for DMA and
369410
I/O controls
370411
- veriloggen.thread.Stream: Dataflow-based high-level synthesis for
371412
high-performance stream processing
372413

373-
Frequently-used Abstractions
414+
Frequently-used abstractions
374415
----------------------------
375416

376417
- veriloggen.verilog: Verilog HDL source code synthesis and import APIs
@@ -380,11 +421,14 @@ Frequently-used Abstractions
380421

381422
Please see examples and tests directories for many examples.
382423

383-
Related Project
424+
Related project
384425
===============
385426

386427
`Pyverilog <https://github.com/PyHDI/Pyverilog>`__ - Python-based
387428
Hardware Design Processing Toolkit for Verilog HDL
388429

430+
`NNgen <https://github.com/NNgen/nngen>`__ - A Fully-Customizable
431+
Hardware Synthesis Compiler for Deep Neural Network
432+
389433
.. |Build Status| image:: https://travis-ci.org/PyHDI/veriloggen.svg
390434
:target: https://travis-ci.org/PyHDI/veriloggen

docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ RUN apt update && apt upgrade -y
33
RUN apt install build-essential -y
44
RUN apt install git -y
55
RUN apt install python3 python3-pip -y
6-
RUN apt install iverilog gtkwave -y
7-
RUN apt install python-pygraphviz -y
8-
RUN pip3 install jinja2 pytest pytest-pythonpath pyverilog ipgen
6+
RUN apt install iverilog verilator gtkwave -y
7+
RUN pip3 install jinja2 pyverilog numpy
8+
RUN pip3 install pytest pytest-pythonpath
99
RUN mkdir /home/veriloggen/
1010
WORKDIR "/home/veriloggen"
1111
RUN git clone https://github.com/PyHDI/veriloggen.git

0 commit comments

Comments
 (0)