Skip to content

Commit e971d24

Browse files
committed
PyCoRAM 0.9.0
1 parent fd46cca commit e971d24

File tree

483 files changed

+10684918
-3522
lines changed

Some content is hidden

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

483 files changed

+10684918
-3522
lines changed

Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TARGET=./input/tests/single_memory/
1+
TARGET=./sample/test/single_memory/
22

33
.PHONY: all
44
all: sim
@@ -21,9 +21,6 @@ view:
2121

2222
.PHONY: clean
2323
clean:
24-
rm -rf *.pyc __pycache__ parsetab.py *.out *.html
25-
make clean -C controlthread
26-
make clean -C rtlconverter
27-
make clean -C utils
28-
make clean -C input
29-
make clean -C pyverilog
24+
make clean -C ./pycoram
25+
make clean -C ./sample
26+
rm -rf *.pyc __pycache__ pycoram.egg-info build dist

README.md

Lines changed: 64 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,106 @@
11
PyCoRAM
22
==============================
3-
Python-based Implementation of CoRAM Memory Architecture with a Python-to-Verilog High-Level Synthesis Compiler for AXI4 Interconnections
43

5-
Copyright (C) 2014, Shinya Takamaeda-Yamazaki
4+
Python-based Portable IP-core Synthesis Framework for FPGA-based Computing
5+
6+
Copyright (C) 2013, Shinya Takamaeda-Yamazaki
67

78
E-mail: shinya\_at\_is.naist.jp
89

910

1011
License
1112
==============================
13+
1214
Apache License 2.0
1315
(http://www.apache.org/licenses/LICENSE-2.0)
1416

1517

1618
What's PyCoRAM?
1719
==============================
1820

19-
PyCoRAM is a Python-based Implementation of CoRAM (Connected RAM) Memory Architecture.
20-
PyCoRAM generates AXI4 IP-core design from your computing kernel logic and memory access pattern descriptions in Python.
21-
The generated IP-core can be used as a standard IP-core with other common IP-cores together on vendor-provided EDK.
22-
PyCoRAM includes a Verilog-to-Verilog design translator and a Python-to-Verilog high-level synthesis compiler to generate a control logic of memory operations.
21+
PyCoRAM is a Python-based portable IP-core synthesis framework with CoRAM (Connected RAM) memory architecture.
22+
23+
PyCoRAM framework generates a portable IP-core package from computing logic descriptions in Verilog HDL and memory access pattern descriptions in Python.
24+
Designers can easily build an FPGA-based custom accelerator using a generated IP-core with any common IP-cores on vendor-provided EDA tools.
25+
PyCoRAM framework includes (1) the Verilog-to-Verilog design translation compiler and (2) the Python-to-Verilog high-level synthesis (HLS) compiler for generating control circuits of memory operations.
2326

24-
PyCoRAM differs in some points from the original soft-logic implementation of CoRAM on existing FPGAs.
27+
There are some major differences between PyCoRAM and the original soft-logic implementation of CoRAM.
2528

2629
* Memory access pattern representation in Python
27-
- The original CoRAM uses C to represent a memory access pattern (control thread). In PyCoRAM, you can describe in easier way using popular scripting language.
28-
- The Python script of memory access pattern is translated into hardware design of Verilog HDL by a Python-to-Verilog high-level synthesis compiler.
29-
* AMBA AXI4 Interconnection Support
30-
- The original CoRAM uses CONNECT to generate an on-chip interconnect. PyCoRAM compiler generates IP-core design for AXI4 interconnection from you computing kernel logic. AMBA AXI4 is standard interconnection architecture supported in various environments.
30+
- The original CoRAM uses C language to represent a memory access pattern (called 'control thread').
31+
- In PyCoRAM, you can easily describe them by using popular lightweight scripting language.
32+
- A Python script of memory access patterns is translated into an RT-level hardware design in Verilog HDL by the Python-to-Verilog high-level synthesis compiler.
33+
* Commercial interconnect supports (AMBA AXI4 and Altera Avalon)
34+
- The original CoRAM uses CONNECT to generate an on-chip interconnect.
35+
- PyCoRAM compiler generates a IP-core design with AMBA AXI4 or Altera Avalon. Both are commonly used on vendor-provided EDA tools.
3136
* Parameterized RTL Design Support
32-
- The original CoRAM has some limitations in description of computing kernel logic. PyCoRAM has a sophisticated RTL analyzer to translate your logic design into suitable design for PyCoRAM.
33-
37+
- The original CoRAM has some limitations in Verilog HDL description of computing logic, such as no supports of generate statement.
38+
- PyCoRAM has a sophisticated RTL analyzer/translator to convert RTL descriptions into synthesizable IP-core package under memory abstractions of CoRAM.
39+
3440

3541
Requirements
3642
==============================
3743

3844
Software
3945
--------------------------------------------------------------------------------
4046

41-
### For simulation
42-
43-
* Python3 (3.3 or later)
44-
* Pyverilog (0.7.0 or later)
45-
- My original hardware design processing toolkit for Verilog HDL
46-
- Pyverilog-lite is included in this package.
47+
* Python (2.7 or later, 3.3 or later)
4748
* Icarus Verilog (0.9.6 or later)
48-
- Preprocessor of Pyverilog uses 'iverilog -E' command instead of the preprocessor.
49+
- 'iverilog -E' command is used for the preprocessor.
4950
* Jinja2 (2.7 or later)
50-
- Code generator requires jinja2 module.
51-
- 'pip3 install jinja2'
51+
- The code generator uses Jinja2 template engine.
52+
- 'pip install jinja2' (for Python 2.x) or 'pip3 install jinja2' (for Python 3.x)
53+
5254

53-
Icarus Verilog and Synopsys VCS are supported for Verilog simulation.
55+
* Pyverilog (Python-based Verilog HDL Design Processing Toolkit) is already included in this package.
5456

55-
### For synthesis of an FPGA circuit design (bit-file)
57+
### for RTL simulation
58+
59+
* Icarus Verilog or Synopsys VCS
60+
- Icarus Verilog is an open-sourced Verilog simulator
61+
- VCS is a very fast commercial Verilog simulator
62+
63+
### for bitstream synthesis
5664

5765
* Xilinx Platform Studio (14.6 or later)
66+
* Altera Qsys (14.0 or later)
5867

5968
(Recommended) FPGA Board
6069
--------------------------------------------------------------------------------
6170

62-
* Digilent Atlys (Spartan-6)
63-
* Xilinx ML605 (Virtex-6)
64-
* Xilinx VC707 (Virtex-7)
71+
* Digilent Atlys (Xilinx Spartan-6)
72+
* Xilinx ML605 (Xilinx Virtex-6)
73+
* Xilinx VC707 (Xilinx Virtex-7)
74+
* Altera DE2-115 (Altera Cyclone-4)
75+
* Altera Cyclone-5 GX Starter Kit
76+
77+
78+
Installation
79+
==============================
80+
81+
If you want to use PyCoRAM as a general library, you can install on your environment by using setup.py.
82+
83+
If Python 2.7 is used,
84+
85+
python setup.py install
86+
87+
If Python 3.x is used,
88+
89+
python3 setup.py install
90+
91+
Then you can use the pycoram command from your console.
92+
93+
pycoram-0.9.0-py3.4.1
6594

6695

6796
Getting Started
6897
==============================
6998

70-
You can find the sample input projects in 'input/tests/single\_memory'.
99+
First, please check 'base.mk' in 'sample'. If you use the installed pycoram command on your environment, please modify 'TARGET' in base.mk as below (the version number depends on your environment)
100+
101+
TARGET=pycoram-0.9.0-py2.7.0
102+
103+
You can find the sample projects in 'sample/tests/single\_memory'.
71104

72105
* ctrl\_thread.py : Control-thread definition in Python
73106
* userlogic.v : User-defined Verilog code using CoRAM memory blocks
@@ -79,7 +112,7 @@ Then type 'make' and 'make run' to simulate sample system.
79112

80113
Or type commands as below directly.
81114

82-
python3 pycoram.py -t userlogic -I ./include/ ./input/tests/single_memory/ctrl_thread.py ./input/tests/single_memory/userlogic.v
115+
python3 pycoram/pycoram.py sample/default.config -t userlogic -I include/ sample/tests/single_memory/ctrl_thread.py sample/tests/single_memory/userlogic.v
83116
iverilog -I pycoram_userlogic_v1_00_a/hdl/verilog/ pycoram_userlogic_v1_00_a/test/test_pycoram_userlogic.v
84117
./a.out
85118

@@ -94,7 +127,7 @@ A bit-stream can be synthesized by using Xilinx Platform Studio.
94127
Please copy the generated IP-core into 'pcores' directory of XPS project.
95128

96129

97-
This software has some sample project in 'input'.
130+
This software has some sample project in 'sample'.
98131
To build them, please modify 'Makefile', so that the corresponding files and parameters are selected (especially INPUT, MEMIMG and USERTEST)
99132

100133

@@ -104,7 +137,7 @@ PyCoRAM Command Options
104137
Command
105138
------------------------------
106139

107-
python3 pycoram.py [-t topmodule] [-I includepath]+ [--memimg=filename] [--usertest=filename] [--simaddrwidth=int] [--noaxi] [-o outputfile] [file]+
140+
python3 pycoram.py config.conf [-t topmodule] [-I includepath]+ [--memimg=filename] [--usertest=filename] [file]+
108141

109142
Description
110143
------------------------------
@@ -124,12 +157,6 @@ Description
124157
* --usertest
125158
- User-defined test code file (option, if you need).
126159
The code is copied into testbench script.
127-
* --simaddrwidth
128-
- DRAM address width of DRAM stub in the testbench.
129-
* --noaxi
130-
- The compiler does NOT generate the system with AXI4 bus interface. default is disabled.
131-
* -o
132-
- Name of output file in no-AXI mode. default is "out.v".
133160

134161

135162
Publication
@@ -150,4 +177,3 @@ Related Project
150177
- A General Purpose Memory Architecture for FPGAs
151178
- The original CoRAM developed at CMU
152179

153-

input/9-point-stencil/Makefile

Lines changed: 0 additions & 59 deletions
This file was deleted.

input/9-point-stencil/testbench.v

Lines changed: 0 additions & 22 deletions
This file was deleted.

input/Makefile

Lines changed: 0 additions & 7 deletions
This file was deleted.

input/cache/Makefile

Lines changed: 0 additions & 59 deletions
This file was deleted.

input/fpga/Makefile

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)