Fix spacing (entire file is wrong anyway, will fix later)
[yosys.git] / CodingReadme
index 041f3b1fa1763e200b6e36d5da848ba0e61f0e14..b64e79178c6df48844cb656ce8d784eb11909df2 100644 (file)
@@ -21,7 +21,7 @@ Here is a the C++ code for a "hello_world" Yosys command (hello.cc):
 
        struct HelloWorldPass : public Pass {
                HelloWorldPass() : Pass("hello_world") { }
-               virtual void execute(vector<string>, Design*) {
+               void execute(vector<string>, Design*) override {
                        log("Hello World!\n");
                }
        } HelloWorldPass;
@@ -373,6 +373,7 @@ Finally run all tests with "make config-{clang,gcc,gcc-4.8}":
        cd ~yosys
        make clean
        make test
+       make ystests
        make vloghtb
        make install
 
@@ -411,6 +412,32 @@ Updating the website:
        git commit -am update
        make push
 
+
+
+Cross-Building for Windows with MXE
+===================================
+
+Check http://mxe.cc/#requirements and install all missing requirements.
+
+As root (or other user with write access to /usr/local/src):
+
+       cd /usr/local/src
+       git clone https://github.com/mxe/mxe.git
+       cd mxe
+
+       make -j$(nproc) MXE_PLUGIN_DIRS="plugins/tcl.tk" \
+                       MXE_TARGETS="i686-w64-mingw32.static" \
+                       gcc tcl readline
+
+Then as regular user in some directory where you build stuff:
+
+       git clone https://github.com/cliffordwolf/yosys.git yosys-win32
+       cd yosys-win32
+       make config-mxe
+       make -j$(nproc) mxebin
+
+
+
 How to add unit test
 ====================
 
@@ -429,7 +456,7 @@ well with C/C++ code.  Hence, it was chosen (google test)
 relatively easy learn.
 
 Install and configure google test (manually)
-============================================
+--------------------------------------------
 
 In this section, you will see a brief description of how to install google
 test. However, it is strongly recommended that you take a look to the official
@@ -456,7 +483,7 @@ Ps.: Some distros already have googletest packed. If your distro supports it,
 you can use it instead of compile.
 
 Create new unit test
-=======================
+--------------------
 
 If you want to add new unit tests for Yosys, just follow the steps below:
 
@@ -467,19 +494,13 @@ If you want to add new unit tests for Yosys, just follow the steps below:
   unit test for kernel/celledges.cc, you will need to create a file like this:
   tests/unit/kernel/celledgesTest.cc;
 * Implement your unit test
-* If you want to compile your tests, just go to yosys root directory and type:
-```
-make unit-test
-```
 
 Run unit test
-=============
+-------------
 
-To run all unit tests, you need to compile it first and then run it. Follow the
-steps below (from the yosys root directory):
+To compile and run all unit tests, just go to yosys root directory and type:
 ```
 make unit-test
-make run-all-unitest
 ```
 
 If you want to remove all unit test files, type: