We use Makefile recipies and Git to help automate a lot of the functionality.
All IP has an associated name, corresponding to the main directory name. To check if an IP name is valid (a.k.a. it doesn't already exist), run
make check-ip IP=<name>
(replacing name
with your desired name)
Once you have verified that the IP name is a valid one, you can create the IP using
make new-ip IP=<name>
This will create a new Git branch for the desired IP, a new directory for it, as well as a starter file.
It will also set the branch's upstream, so that users who are familiar with basic Git without branches can simply use it as normal
with add
, commit
, and push
commands
The makefile will attempt to parse your IP
into separate words. For example, names like FFTTwiddleGenerator
will be converted to fft_twiddle_generator
. This is for a couple reasons:
- So that one member cannot create the
FixedPoint
IP when thefixed_point
IP already exists (to prevent naming confusion) - To make sure folder naming conventions are kept so that python can properly recognize them as module names.
The program will ask for confirmation after attempting to automatically convert your name. If you are ok with the result, type y
in the command prompt, and then return
. If not, type n
and then return
.
We recommend typing in IP
either
- as a series of lowercase words separated by dashes or underscores (
example-name
) - or in PascalCase (
ExampleName
).
and to avoid starting words with numbers or using non-alphaneumeric characters.
NOTE: We recommend running pytest
manually to do your own testing.
Runs all the tests in the entire test suite. This runs a new pytest instance for every IP, to prevent memory leaks from building while running the whole test suite, primarily to stop github actions from crashing.
make test EXTRA_ARGS="-n auto"
Allows for an optional flag EXTRA_ARGS
to pass in pytest flags.
Clears all the files in your build
directory. Useful especially after running make test
, which can generate tons of files.
Checks all verilog files in the repository for whether they follow the linting (code style) guidelines.
You can select specific IP to check using
make lint IP=<name of ip folder>
This requires svlint
to be installed and in your PATH
as well as requiring sudo apt-get install moreutils
(which should be the case for your ecelinux
machine).
Note: Github actions has an automated script that already runs this on push, so installing svlint
is entirely optional. However, there is a tutorial here on how to do so, if you want to.
Runs testfloat_gen and generates the output in a specified file.
make testfloat_gen FUNC=<func_name> EXTRA_ARGS=<extra_args> OUTPUT_FILE=<output_file> BUILD_DIR=<build_directory>