Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: azonenberg/yosys
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8d3c7064598f
Choose a base ref
...
head repository: azonenberg/yosys
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 662a04781504
Choose a head ref
  • 5 commits
  • 18 files changed
  • 1 contributor

Commits on May 16, 2017

  1. Improve simplec back-end

    cliffordwolf committed May 16, 2017
    Copy the full SHA
    35be567 View commit details
  2. Copy the full SHA
    9f4fbc5 View commit details

Commits on May 17, 2017

  1. Copy the full SHA
    05cdd58 View commit details
  2. Copy the full SHA
    6934b86 View commit details
  3. Copy the full SHA
    662a047 View commit details
26 changes: 26 additions & 0 deletions CodingReadme
Original file line number Diff line number Diff line change
@@ -411,6 +411,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
====================

12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -176,9 +176,10 @@ yosys.html: misc/yosys.html
$(P) cp misc/yosys.html yosys.html

else ifeq ($(CONFIG),mxe)
PKG_CONFIG = /usr/local/src/mxe/usr/bin/i686-w64-mingw32.static-pkg-config
CXX = /usr/local/src/mxe/usr/bin/i686-w64-mingw32.static-gcc
LD = /usr/local/src/mxe/usr/bin/i686-w64-mingw32.static-gcc
CXXFLAGS += -std=c++11 -Os -D_POSIX_SOURCE
CXXFLAGS += -std=c++11 -Os -D_POSIX_SOURCE -DYOSYS_MXE_HACKS -Wno-attributes
CXXFLAGS := $(filter-out -fPIC,$(CXXFLAGS))
LDFLAGS := $(filter-out -rdynamic,$(LDFLAGS)) -s
LDLIBS := $(filter-out -lrt,$(LDLIBS))
@@ -213,7 +214,7 @@ LDLIBS += -lcurses
ABCMKARGS += "ABC_READLINE_LIBRARIES=-lcurses -lreadline"
endif
ifeq ($(CONFIG),mxe)
LDLIBS += -lpdcurses
LDLIBS += -ltermcap
endif
endif

@@ -226,9 +227,14 @@ ifeq ($(ENABLE_TCL),1)
TCL_VERSION ?= tcl$(shell bash -c "tclsh <(echo 'puts [info tclversion]')")
TCL_INCLUDE ?= /usr/include/$(TCL_VERSION)

ifeq ($(CONFIG),mxe)
CXXFLAGS += -DYOSYS_ENABLE_TCL
LDLIBS += -ltcl86 -lwsock32 -lws2_32 -lnetapi32
else
CXXFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --cflags tcl || echo -I$(TCL_INCLUDE)) -DYOSYS_ENABLE_TCL
LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --libs tcl || echo -l$(TCL_VERSION))
endif
endif

ifeq ($(ENABLE_GPROF),1)
CXXFLAGS += -pg
@@ -557,9 +563,7 @@ config-emcc: clean

config-mxe: clean
echo 'CONFIG := mxe' > Makefile.conf
echo 'ENABLE_TCL := 0' >> Makefile.conf
echo 'ENABLE_PLUGINS := 0' >> Makefile.conf
echo 'ENABLE_READLINE := 0' >> Makefile.conf

config-msys2: clean
echo 'CONFIG := msys2' > Makefile.conf
12 changes: 12 additions & 0 deletions backends/blif/blif.cc
Original file line number Diff line number Diff line change
@@ -279,6 +279,18 @@ struct BlifDumper
continue;
}

if (!config->icells_mode && cell->type == "$_ANDNOT_") {
f << stringf(".names %s %s %s\n10 1\n",
cstr(cell->getPort("\\A")), cstr(cell->getPort("\\B")), cstr(cell->getPort("\\Y")));
continue;
}

if (!config->icells_mode && cell->type == "$_ORNOT_") {
f << stringf(".names %s %s %s\n1- 1\n-0 1\n",
cstr(cell->getPort("\\A")), cstr(cell->getPort("\\B")), cstr(cell->getPort("\\Y")));
continue;
}

if (!config->icells_mode && cell->type == "$_AOI3_") {
f << stringf(".names %s %s %s %s\n-00 1\n0-0 1\n",
cstr(cell->getPort("\\A")), cstr(cell->getPort("\\B")), cstr(cell->getPort("\\C")), cstr(cell->getPort("\\Y")));
Loading