Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
fa4bfbeb
Commit
fa4bfbeb
authored
Aug 18, 2017
by
Jens Korinth
Browse files
Fix README.md markdown syntax
parent
7854cfd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
fa4bfbeb
...
...
@@ -8,26 +8,28 @@ did not fit your needs.
Requirements
----------------------
*
Vivado 2016.x+
*
Chisel 3.x
*(currently using `3.0-SNAPSHOT`)*
*
*optional*
: sbt
*
Vivado 2016.x+
*
Chisel 3.x
*(currently using `3.0-SNAPSHOT`)*
*
*optional*
: sbt
Basic Usage
-----------
Class
`ModuleBuilder`
provides an abstract base class for an executable object with a
`main`
method. You'll only need to provide a list of Chisel cores you'd like to wrap into IP-XACT.
A full example can be found in
`example`
; test it as follows:
1.
Source the Vivado settings scripts, make sure
`vivado`
is in the
`PATH`
.
2.
In the
`chisel-packaging`
base dir, do:
1.
Source the Vivado settings scripts, make sure
`vivado`
is in the
`PATH`
.
2.
In the
`chisel-packaging`
base dir, do:
cp example/
*
.
3.
Execute via:
3.
Execute via:
sbt run
4.
This should create a new directory
`ip`
, which contains subdirectories for each core.
4.
This should create a new directory
`ip`
, which contains subdirectories for each core.
The subdirectories contain the Verilog sources and the IP-XACT
`component.xml`
.
You can use the
`ip`
directory as a base directory for user IP in Vivado, the cores should
...
...
@@ -36,41 +38,43 @@ automatically appear in Vivado and IP-Integrator.
Usage in Chisel Projects (*sbt*)
--------------------------------
The easiest way to setup
`chisel-packaging`
for your Chisel project with
`sbt`
is using
**git subtree**
([this article] [1] has an excellent intro to subtrees) as follows:
1.
In your the base directory of your project, add a new remote
*chisel-packaging*
:
1.
In your the base directory of your project, add a new remote
*chisel-packaging*
:
git remote add chisel-packaging https://bitbucket.org/jkorinth/chisel-packaging.git
2.
Setup a subtree in
`packaging`
:
2.
Setup a subtree in
`packaging`
:
git subtree add --prefix packaging chisel-packaging master --squash
This will clone the
`chisel-packaging`
into the
`packaging`
folder.
3.
Add a project dependency in your
`build.sbt`
, add lines:
3.
Add a project dependency in your
`build.sbt`
, add lines:
lazy val packaging = project.in(file("packaging"))
lazy val root = (project in file(".")).dependsOn(packaging)
*Note that the empty lines are **not optional** - a quirk of sbt.*
4.
Implement
`chisel.packaging.ModuleBuilder`
in your own code; if you've chosen
4.
Implement
`chisel.packaging.ModuleBuilder`
in your own code; if you've chosen
a different directory than
`packaging`
for the subtree, you can pass it to the
baseclass constructor -- see
[
example/ModuleBuilderTest.scala
][
3
]
5.
Build the IP-XACT cores via
`sbt run`
.
5.
Build the IP-XACT cores via
`sbt run`
.
Gotchas
-------
*
The python script requires
`vivado`
to be in
`PATH`
, so you need to source the Vivado
*
The python script requires
`vivado`
to be in
`PATH`
, so you need to source the Vivado
settings scripts first.
*
The repo is setup for Chisel 3.x; it can be used for Chisel 2.x, but that requires
*
The repo is setup for Chisel 3.x; it can be used for Chisel 2.x, but that requires
manual changes - open an issue in the issue tracker if you need it.
*
If you're using the
`sbt`
approach outlined above, make sure your
`build.sbt`
contains
*
If you're using the
`sbt`
approach outlined above, make sure your
`build.sbt`
contains
the empty lines; they are required by
`sbt`
.
[
1
]:
https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree
...
...
Jens Korinth
@jk
mentioned in commit
17f0d672
·
Mar 05, 2018
mentioned in commit
17f0d672
mentioned in commit 17f0d67240ebf5d7e1d0be9162d272b04256c47d
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment