Skip to content
No description, website, or topics provided.
C++ Makefile Python Shell Coq
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
graphs
iverilog @ dc5429e
netlists
scripts
tgt-nemo
.gitignore
.gitmodules
LICENSE
README.md

README.md

Nemo

Author: Timothy Trippel
Email: timothy.trippel@ll.mit.edu
Last Updated: 02/12/2019

About

Nemo is a custom Verilog compiler backend target module to be used along side the open source frontend Verilog compiler tool Icarus Verilog (http://iverilog.icarus.com/). Nemo allows an IC designer to create signal dependency graphs for any signal(s) in the design after it has been synthesized and mapped.

In order for Nemo to be usefull, it must be invoked by the Icarus Verilog (IVL) frontend compiler and interacts with the data structures created by IVL via the IVL API defined by in the "ivl_target.h" header file. In order to use Nemo, one must first build/install IVL before building/installing Nemo.

Nemo takes as input the following:

Input Type Default
1 Verilog Netlist file name(s)* n/a
2 Verilog Top Module top module name* n/a
3 Critical Signal Prefix string "critical"
4 Search Depth unsigned int 1
5 Dot Output File Name unsigned int 1

*Verilog netlists should include a netlist file describing the standard cell modules used for synthesis must be included in Verilog files. A script to generate this from a Verilog description of a STD cell library is included in the "scripts/" directory.

Nemo identifies critical signals in the input Verilog netlist (e.g., the output from a Verilog synthesis tool) based on a signal prefix match (defined in input) and generates a signal ependency graph (to a graph depth also defined in input) to identify which signals in a design have the potential to influence a critical signal. Nemo outputs the critical signal dependency graph in the Graphviz .dot format.

Example Nemo input files, a Verilog netlist and a standard cell Verilog netlist, are available in the "netlists/" directory. Example Nemo output files, a DOT file and a PDF visual representation of the DOT file, are available in the "graphs/" directory.

Configurations

There are several parameters that can be configured within Nemo to achieve various goals. All #define configurations are located in the "nemo.h" file. The following configurations are:

  1. DEBUG_PRINTS < true | false > - if true, include print statements for debugging code
  2. INCLUDE_LOCAL_SIGNALS < true | false > - if true, include signals generated by IVL frontend
  3. ENUMERATE_ENTIRE_CIRCUIT < true | false > - if true, create signal dependencies for entire circuit
  4. IGNORE_CLK_SIGNALS < true | false > - if true, create signal dependencies for entire circuit
  5. SEQUENTIAL_CLK_PIN_NAME < string > - CLK signal name that is ignored by nemo in graph propogation

Installation

1. Cloning Nemo Git Repository

The Nemo Git repository contains IVL as a Git submodule. Thus there are two ways to initialize the Nemo git repository as follows:

git clone --recurse-submodules https://llcad-github.llan.ll.mit.edu/HSS/nemo

-OR-

git clone https://llcad-github.llan.ll.mit.edu/HSS/nemo git submodule init git submodule update

2. Disabling optimization functions of IVL

Disabling the optimization functions of IVL is important for preserving the input netlists structure as-is for analysis by Nemo. To do so, you must simply comment out two blocks of code in the "main.cc" file in the top-level IVL source code (lines 1179, and 1182-1188) submodule directory as follows:

Line 1179: cout << "RUNNING FUNCTORS" << endl;

Line 1182-1188:

while (!net_func_queue.empty()) {
	net_func func = net_func_queue.front();
	net_func_queue.pop();
	if (verbose_flag)
		cerr<<" -F "<<net_func_to_name(func)<< " ..." <<endl;
	func(des);
}

3. Building Nemo/IVL

A. Automatic IVL/Nemo Installation:

The Makefile provided with the Nemo repository (nemo/tgt-nemo/Makefile) contains targets for automatically building the IVL submodule and Nemo IVL target module all in one swoop.

  1. cd <nemo repository>
  2. cd tgt-nemo
  3. make all

B. Manual IVL/Nemo Installation:

Alternatively, one can choose to manually build IVL first, then manually build/install Nemo. Building IVL and Nemo manually can be accomplished using the following installation instructions:

  1. IVL Manual Installation:

    1. cd <nemo repository>
    2. cd iverilog
    3. comment out IVL optimization functions (see above)
    4. sh autoconf.sh
    5. ./configure --prefix=$(pwd)
    6. make install
    7. cd ..
  2. Nemo Manual Installation:

    1. cd tgt-nemo
    2. make all

C. Export IVL to Path Enviroment Variable:

Add the following to your .bash_profile or .bashrc:

PATH=$PATH:<nemo dir>/iverilog/bin

Nemo User Guide

Run Nemo Test

  1. cd <nemo repository>
  2. cd tgt-nemo
  3. make test

Run Nemo from Command Line

iverilog -v \
	-pnemo_sig_prefix=<critical signal prefix> \
	-pnemo_search_depth=<search depth> \
	-t nemo \
	-s <top module name> \
	-o <output file name>.dot \
	<Verilog Netlist(s)> \
	<Verilog STD Cell Netlist>

Development History

Update 1.1 - 9/14/17

Nemo has been updated to account for more complex port-to-port signal connections that occur when two modules are hooked up in a netlist.

Nemo has also been updated to tolerate/ignore clock tree signals that can be identified with a user specified prefix that is to be declared defined in the "nemo.h" file (SEQUENTIAL_CLK_PIN_NAME). The option to analyze or ignore the clock tree signals is also defined in the "nemo.h" file (IGNORE_CLK_SIGNALS).

Update 1.2 - 2/12/19

Nemo has been updated to accept more configuration information as from the command line, to enable streamlined integration with other tool flows. The following additional configuration inputs have been enabled:

  1. Critical signal prefix string (string)
  2. Search depth (unsigned integer)

Each configuration input is passed on the command line by prefixing a "-p" to each parameter name as follows:

  1. -pnemo_sig_prefix=
  2. -pnemo_search_depth=

Nemo has also been updated to include IVL as a git submodule for easier deployment and installation.

License

Copyright (c) 2017, Massachusetts Institute of Technology.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited.

This material is based upon work supported by the Assistant Secretary of Defense for Research and Engineering under Air Force Contract No. FA8721-05-C-0002 and/or FA8702-15-D-0001. Any opinions, findings, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Assistant Secretary of Defense for Research and Engineering.

© 2017 Massachusetts Institute of Technology.

The software/firmware is provided to you on an As-Is basis

Delivered to the U.S. Government with Unlimited Rights, as defined in DFARS Part 252.227-7013 or 7014 (Feb 2014). Notwithstanding any copyright notice, U.S. Government rights in this work are defined by DFARS 252.227-7013 or DFARS 252.227-7014 as detailed above. Use of this work other than as specifically authorized by the U.S. Government may violate any copyrights that exist in this work.

You can’t perform that action at this time.