diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-09-16 11:26:44 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-09-16 11:26:44 +0200 |
commit | fa96cf4a1694afb1ac83e9fc9b894420fc210b97 (patch) | |
tree | 288f120a5d8371f12ebe32046f16dd896f2cd751 /CodingStyle | |
parent | 6644e27cd4112070eca0958c19b71e97ba29a80d (diff) | |
download | yosys-fa96cf4a1694afb1ac83e9fc9b894420fc210b97.tar.gz yosys-fa96cf4a1694afb1ac83e9fc9b894420fc210b97.tar.bz2 yosys-fa96cf4a1694afb1ac83e9fc9b894420fc210b97.zip |
Added new CodingReadme file (replaces CodingStyle and CHECKLISTS)
Diffstat (limited to 'CodingStyle')
-rw-r--r-- | CodingStyle | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/CodingStyle b/CodingStyle deleted file mode 100644 index e076cbd89..000000000 --- a/CodingStyle +++ /dev/null @@ -1,43 +0,0 @@ - - -Section 0: Notes on the existing codebase ------------------------------------------ - -Not all parts of Yosys adhere to this coding styles for historical -reasons. When adding code to existing parts of the system, adhere -to this guide for the new code instead of trying to mimic to style -of the surrounding code. - - - -Section 1: 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. - -- Otherwise stick to the Linux Kernel Coding Stlye: - https://www.kernel.org/doc/Documentation/CodingStyle - - -Section 2: C++ Langugage ------------------------- - -Yosys is written in C++11. At the moment only constructs supported by -gcc 4.6 is 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 "SIZE(foobar)" instead -of "foobar.size()". (the macro SIZE() is defined by kernel/yosys.h) - -Use range-based for loops whenever applicable. - |