forked from YosysHQ/yosys
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split CodingReadme into multiple files
- Loading branch information
1 parent
92d5550
commit d9ec35a
Showing
11 changed files
with
295 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,7 @@ | |
Dockerfile | ||
README.md | ||
manual | ||
CodingReadme | ||
guidelines | ||
CodeOfConduct | ||
.travis | ||
.travis.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
Checklist for adding internal cell types | ||
======================================== | ||
|
||
Things to do right away: | ||
|
||
- Add to kernel/celltypes.h (incl. eval() handling for non-mem cells) | ||
- Add to InternalCellChecker::check() in kernel/rtlil.cc | ||
- Add to techlibs/common/simlib.v | ||
- Add to techlibs/common/techmap.v | ||
|
||
Things to do after finalizing the cell interface: | ||
|
||
- Add support to kernel/satgen.h for the new cell type | ||
- Add to manual/CHAPTER_CellLib.tex (or just add a fixme to the bottom) | ||
- Maybe add support to the Verilog backend for dumping such cells as expression | ||
|
||
|
||
|
||
Checklist for creating Yosys releases | ||
===================================== | ||
|
||
Update the CHANGELOG file: | ||
|
||
cd ~yosys | ||
gitk & | ||
vi CHANGELOG | ||
|
||
|
||
Update and check documentation: | ||
|
||
cd ~yosys | ||
make update-manual | ||
make manual | ||
- sanity check the figures in the appnotes and presentation | ||
- if there are any odd things -> investigate | ||
- make cosmetic changes to the .tex files if necessary | ||
|
||
cd ~yosys | ||
vi README guidelines/* | ||
- is the information provided in those file still up to date | ||
|
||
|
||
Then with default config setting: | ||
|
||
cd ~yosys | ||
make vgtest | ||
|
||
cd ~yosys | ||
./yosys -p 'proc; show' tests/simple/fiedler-cooley.v | ||
./yosys -p 'proc; opt; show' tests/simple/fiedler-cooley.v | ||
./yosys -p 'synth; show' tests/simple/fiedler-cooley.v | ||
./yosys -p 'synth_xilinx -top up3down5; show' tests/simple/fiedler-cooley.v | ||
|
||
cd ~yosys/examples/cmos | ||
bash testbench.sh | ||
|
||
cd ~yosys/examples/basys3 | ||
bash run.sh | ||
|
||
|
||
Test building plugins with various of the standard passes: | ||
|
||
yosys-config --build test.so equiv_simple.cc | ||
- also check the code examples in guidelines/GettingStarted | ||
|
||
|
||
And if a version of the verific library is currently available: | ||
|
||
cd ~yosys | ||
cat frontends/verific/build_amd64.txt | ||
- follow instructions | ||
|
||
cd frontends/verific | ||
../../yosys test_navre.ys | ||
|
||
|
||
Finally run all tests with "make config-{clang,gcc,gcc-4.8}": | ||
|
||
cd ~yosys | ||
make clean | ||
make test | ||
make ystests | ||
make vloghtb | ||
make install | ||
|
||
cd ~yosys-bigsim | ||
make clean | ||
make full | ||
|
||
cd ~vloghammer | ||
make purge gen_issues gen_samples | ||
make SYN_LIST="yosys" SIM_LIST="icarus yosim verilator" REPORT_FULL=1 world | ||
chromium-browser report.html | ||
|
||
|
||
Release: | ||
|
||
- set YOSYS_VER to x.y.z in Makefile | ||
- remove "bumpversion" target from Makefile | ||
- update version string in CHANGELOG | ||
git commit -am "Yosys x.y.z" | ||
|
||
- push tag to github | ||
- post changelog on github | ||
- post short release note on reddit | ||
|
||
|
||
Updating the website: | ||
|
||
cd ~yosys | ||
make manual | ||
make install | ||
|
||
- update pdf files on the website | ||
|
||
cd ~yosys-web | ||
make update_cmd | ||
make update_show | ||
git commit -am update | ||
make push |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Coding Style | ||
============ | ||
|
||
|
||
Formatting of code | ||
------------------ | ||
|
||
- Yosys code is using tabs for indentation. Tabs are 8 characters. | ||
|
||
- A continuation of a statement in the following line is indented by | ||
two additional tabs. | ||
|
||
- Lines are as long as you want them to be. A good rule of thumb is | ||
to break lines at about column 150. | ||
|
||
- Opening braces can be put on the same or next line as the statement | ||
opening the block (if, switch, for, while, do). Put the opening brace | ||
on its own line for larger blocks, especially blocks that contains | ||
blank lines. | ||
|
||
- Otherwise stick to the Linux Kernel Coding Style: | ||
https://www.kernel.org/doc/Documentation/CodingStyle | ||
|
||
|
||
C++ Language | ||
------------- | ||
|
||
Yosys is written in C++11. At the moment only constructs supported by | ||
gcc 4.8 are allowed in Yosys code. This will change in future releases. | ||
|
||
In general Yosys uses "int" instead of "size_t". To avoid compiler | ||
warnings for implicit type casts, always use "GetSize(foobar)" instead | ||
of "foobar.size()". (GetSize() is defined in kernel/yosys.h) | ||
|
||
Use range-based for loops whenever applicable. |
Oops, something went wrong.