Skip to content

Commit

Permalink
There is no doubt fiction makes a better job of the truth (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwa authored Jun 4, 2020
1 parent 93df4da commit 329fdaa
Show file tree
Hide file tree
Showing 63 changed files with 3,018 additions and 1,328 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ script:
- mkdir -p build
- cd build
# set compiler, python executable, and Z3 build verbosity
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DPYTHON_EXECUTABLE=$(which $PY_CMD) -DBUILD_Z3_VERBOSE=TRUE ..
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DPYTHON_EXECUTABLE=$(which $PY_CMD) -DBUILD_Z3_VERBOSE=TRUE -DENABLE_PROGRESS_BARS=OFF ..
# build fiction
- make -j2
# run integration tests
- ./fiction -ef ../test/integration.fc -l log.json
- ./fiction -ef ../test/integration.fc

matrix:
include:
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,52 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## v0.3.1 - 2020-06-04
*There is no doubt fiction makes a better job of the truth.* — Doris Lessing

### Added
- Command `equiv` for logical and delay equivalence checking of `fcn_gate_layout`s against a specification
- Command `energy` to print and log energy dissipation of current `fcn_gate_layout` based on a physical model for the QCA-ONE library
- Command `area` to print and log area usage in nm²
- Parameter `-a` and flag `-A` to enable asynchronous parallelism for `exact`
- Flag `--minimize_wires/-w` for `exact` to compute the minimum amount of wire segments needed
- Flag `-s` for `show -n` for less detailed visualization of `logic_network` objects
- `Dockerfile` and instructions for how to create an image using [Docker](https://www.docker.com/) (thanks to Mario Kneidinger!)
- CMake option to toggle animated progress bars on command line

### Changed
- `exact` has been completely reworked to utilize true incremental SMT solving without push/pop mechanics (thanks to Alan Mishchenko for the inspiration!)
- `exact --artificial_latches/-a` has been renamed to `exact --clock_latches/-l`
- `exact -m` has been renamed to `exact -c`
- Standard resolves for clocking scheme names to their commonly used variants, e.g., `2DDWave` becomes `2DDWave4`
- Energy dissipation will no longer be logged using command `ps -g`; use new command `energy` instead
- Command `cell` can be found in command class `Technology` now
- Increased font size of clock numbers in SVG files by 2pt for better readability
- Changed constructor parameter types for core data structures (network and layouts)
- Changed `std::size_t` to fixed-size data types in lots of places
- Use library caching for *Travis* builds to speed up build time
- Moved to the latest releases of all libraries

### Fixed
- Runtime logging in `exact`
- Performance issues in `ortho`
- Python detection in CMake under different versions
- `ortho -b` losing bent wire connections
- `fcn_layout::random_face`'s index to coordinate mapping again, but for real now (thanks to Till Schlechtweg!)
- `logic_network`s are deep-copied for each physical design call now to secure them from external changes
- Gates and wires without directions assigned are mapped to standard rotations using QCA-ONE library now
- Rotation issues with border gate-pin I/Os using QCA-ONE library
- 3-output fan-outs are correctly printed as fan-outs when using `print -g` now
- Testing `ofstream`'s for `is_open` in writers now (thanks to DeepCode!)
- Several compiler issues under MacOS and Windows (thanks to Umberto Garlando and Fabrizio Riente for pointing them out!)
- Z3 build script error under Unix with CMake version <= 3.12.0
- Z3 linking on MacOS (thanks to Daniel Staack!)
- bibTeX citation information correctly handles last names and arXiv prefixes now

### Removed
- `exact --limit_crossings/-c` and `exact --limit_wires/-w` as they have been replaced by respective optimization flags
- Legends in `print -g/-c`

## v0.3.0 - 2019-11-22
*Sometimes, fiction was so powerful that it even had reverberations in the real world.* &mdash; Delphine de Vigan

Expand Down Expand Up @@ -92,6 +138,7 @@ For more information, see <https://svn.boost.org/trac10/ticket/11735>

## v0.2.0 - 2019-03-21
*Fiction reveals the truth that reality obscures.* &mdash; Jessamyn West

### Added
- Export `fcn_cell_layout` objects as SVG using `show -c`. See README for more information
- `ps -g` displays and logs critical path and throughput of `fcn_gate_layout` objects
Expand Down Expand Up @@ -122,6 +169,7 @@ For more information, see <https://svn.boost.org/trac10/ticket/11735>

## v0.1.1 - 2018-12-29
*Literature is a luxury; fiction is a necessity.* &mdash; G. K. Chesterton

### Added
- Technology-specific energy model for `fcn_gate_layout`; supports QCA thus far
- Support for `print -c` to write a textual representation of `fcn_cell_layout` objects
Expand Down
26 changes: 20 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.2)
project(fiction
LANGUAGES CXX
VERSION 0.3.0)
VERSION 0.3.1)

# C++17
set(CMAKE_CXX_STANDARD 17)
Expand All @@ -11,7 +11,7 @@ if (MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /w /O2")
else ()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Wpedantic -Wno-unknown-pragmas -Wno-mismatched-tags -Wno-gnu-anonymous-struct -Wno-nested-anon-types -g")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Wpedantic -Wno-unknown-pragmas -Wno-mismatched-tags -Wno-gnu-anonymous-struct -Wno-nested-anon-types -g -fms-extensions")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -w -O3")
endif ()

Expand All @@ -22,6 +22,14 @@ endif ()
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")

# Enable progress bars
if (NOT WIN32)
option(ENABLE_PROGRESS_BARS "Enable animated progress bars in command line" ON)
if (ENABLE_PROGRESS_BARS)
add_definitions(-DPROGRESS_BARS)
endif ()
endif()

# Include header files
include_directories(src/algo/ src/io/ src/io/cmd/ src/tech/ src/topo/ src/util/)

Expand Down Expand Up @@ -55,8 +63,10 @@ if (UNIX)
# Require Python interpreter
if (${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonInterp) # deprecated since CMake 3.12, but works far better
set(Z3_PYTHON ${PYTHON_EXECUTABLE})
else ()
find_package(Python COMPONENTS Interpreter)
set(Z3_PYTHON ${Python_EXECUTABLE})
endif ()
# Add option to compile Z3 with verbose output
option(BUILD_Z3_VERBOSE "Output status and warnings during Z3 build" OFF)
Expand All @@ -71,7 +81,11 @@ if (UNIX)
set(Z3_LIB_FLAG --staticlib)
set(Z3_LINK_TARGET libz3.a)
else ()
set(Z3_LINK_TARGET libz3.so)
if (APPLE)
set(Z3_LINK_TARGET libz3.dylib)
else ()
set(Z3_LINK_TARGET libz3.so)
endif ()
endif ()

# include and library paths
Expand All @@ -82,7 +96,7 @@ if (UNIX)
add_custom_command(
OUTPUT ${Z3_LIB_DIR}/${Z3_LINK_TARGET}
PRE_BUILD
COMMAND ${Python_EXECUTABLE} scripts/mk_make.py -s --prefix=${Z3_DIR} ${Z3_LIB_FLAG} ${Z3_OUTPUT_CHANNEL}
COMMAND ${Z3_PYTHON} scripts/mk_make.py -s --prefix=${Z3_DIR} ${Z3_LIB_FLAG} ${Z3_OUTPUT_CHANNEL}
COMMAND $(MAKE) -C build ${Z3_OUTPUT_CHANNEL}
COMMAND $(MAKE) -C build install ${Z3_OUTPUT_CHANNEL}
WORKING_DIRECTORY ${LIB_PREFIX}/z3/)
Expand All @@ -96,7 +110,7 @@ elseif (WIN32)
set(Z3_LINK_TARGET libz3.lib)
set(Z3_INCLUDE_DIR "${LIB_PREFIX}/z3/src/api" CACHE PATH "Path to Z3's custom include directory")
set(Z3_LIB_DIR "${LIB_PREFIX}/z3/build" CACHE PATH "Path to Z3's custom library directory")
include_directories(${Z3_INCLUDE_DIR}/c++)
include_directories(${Z3_INCLUDE_DIR}/c++)
endif ()

# Include Z3
Expand All @@ -118,4 +132,4 @@ if (UNIX)
endif ()

# Link against Boost, Z3, alice, and lorina
target_link_libraries(fiction ${Boost_LIBRARIES} ${Z3_LIB_DIR}/${Z3_LINK_TARGET} alice mockturtle)
target_link_libraries(fiction ${Boost_FILESYSTEM_LIBRARIES} ${Boost_SYSTEM_LIBRARIES} ${Z3_LIB_DIR}/${Z3_LINK_TARGET} alice mockturtle)
Loading

0 comments on commit 329fdaa

Please sign in to comment.