blob: 5321618b05be9eceb5adfa3df8fcd28d81fa96e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Chisel3
chisel3 is a new FIRRTL based chisel
the current backward incompatiabilities with chisel 2.x are:
```scala
val wire = Bits(width = 15)
```
is
```scala
val wire = Wire(Bits(width = 15))
```
## Chisel3 Infrastructure.
Chisel3 is much more modular than Chisel2. What was once provided by a
monolithic Scala program, is provided by separate components.
Currently, those components are:
- Chisel3 (Scala)
- firrtl (Stanza)
and for the C++ simulator
- filter (Python/C++)
- flo-llvm (C++)
- clang
firrtl can generate Verilog output directly, so fewer components are
required for Verilog testing.
### Stanza
In order to build firrtl, you need a (currently patched) copy of
Stanza. (We should add this to the firrtl repo in utils/bin.)
### firrtl
We assume that copies (or links to) firrtl and filter are in
chisel3/bin. flo-llvm and clang should be found in your $PATH.
Follow the instructions on the firrtl repo for building firrtl and put
the resulting binary (utils/bin/firrtl) in chisel3/bin.
### filter
filter is available from the chisel3 repo as a .cpp file. ucbjrl has a
Python version. You could implment it using sed or awk.
### flo-llvm
flo-llvm is Palmer's flo to (.o,.v) converter. It's hosted at:
https://github.com/ucb-bar/flo
and
https://github.com/palmer-dabbelt/flo-llvm
Installation instructions can be found at:
https://wiki.eecs.berkeley.edu/dreamer/Main/DistroSetup
### clang
clang is available for Linux and Mac OS X and usually comes installed
with development tools. You need to ensure that the version you're
using is compatible with flo-llvm (currently, clang/llvm 3.6). There
are instructions on the web for managing multiple versions of
clang/llvm.
Once you have all the components in place, build and publish Chisel3:
```shell
% cd chisel3
% sbt clean publish-local
```
## Repos of Test Code
- Basic Chisel3 tests https://github.com/ucb-bar/chisel3-tests
bin directory contains shell script wrappers that may need editing for your environment (absolute paths)
- Tutorials https://github.com/ucb-bar/chisel-tutorial
branch chisel3prep should be buildable with either Chisel2 or Chisel3.
```shell
% make chiselVersion=2.3-SNAPSHOT clean check
```
or
```shell
% make chiselVersion=3.0 clean check
```
|