tree: 945d3d82d75a878e13117c387a0d7b0caf6c3588 [path history] [tgz]
  1. API/
  2. Cache/
  3. CommandLine/
  4. Common/
  5. Config/
  6. Design/
  7. DesignCompile/
  8. ErrorReporting/
  9. Expression/
  10. Library/
  11. Package/
  12. parser/
  13. SourceCompile/
  14. Testbench/
  15. Utils/
  16. hellosureworld.cpp
  17. main.cpp
  18. README.md
  19. surelog.h
src/README.md

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

SURELOG project

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Executable: surelog

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Dependancies Install

Please see INSTALL

Build

  • cd Surelog
make
make install (/usr/local/bin and /usr/local/lib/surelog by default, use DESTDIR= for alternative locations)

Run a test

  • When in the Surelog/build directory, run one of the following:

  • dist/Release/surelog -help

  • dist/Release/surelog -writepp -parse ../tests/UnitElabBlock/top.v

  • dist/Release/hellosureworld ../tests/UnitElabBlock/top.v -parse -mutestdout

Create your own executable with the libsurelog.a library

  • The CMake file CMakeLists.txt contains the instructions to create your own executable that uses the surelog library for design parsing and creation of the Design/Testbench data model.

  • The source file hellosureworld.cpp contains the “HelloWorld” for surelog library usage and data model browsing.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Modus operanti for grammar development:

  • Edit the grammar file in the G4 directory, test the grammar locally with the java targets:
    • cd Surelog/grammar;
    • ant compile_java;
    • ant javac;
    • ant test_pp_tokens or
    • ant test_tree ... (There are several debug targets in the build.xml)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

TESTS and REGRESSIONS

The following regression script will run all tests under tests and third_party/tests:

  • cd build
  • ../tests/regression.tcl

Regression options:

  • regression.tcl help
  • regression.tcl tests= (Tests matching regular expression)
    • test= (Just that test)
    • debug=<none, valgrind, ddd>
    • build=<debug, release>
    • mt= (Number of threads per process - regression runs 1 process at a time)
    • large (large tests too)
    • show_diff (Shows text diff)
  • regression.tcl update (Updates the diffs)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

PROFILING / MEMORY ANALYSIS

  • Either

    • env CPUPROFILE=./prof env LD_PRELOAD=“/usr/lib/libprofiler.so” build/dist/Debug/surelog
  • Or

    • google-pprof --callgrind build/dist/Debug/surelog prof >> call
    • kcachegrind call
  • Get Google tools:

    • sudo apt-get install google-perftools graphviz
    • sudo apt-get install libgoogle-perftools-dev
    • sudo apt-get install gperftools
  • When running valgrind add the -nopython command line argument

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

SOURCE FORMATTING

clang-format -i -style=Google -sort-includes=false

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Useful links:

http://ecee.colorado.edu/~mathys/ecen2350/IntelSoftware/pdf/IEEE_Std1800-2017_8299595.pdf https://google.github.io/flatbuffers/flatbuffers_guide_use_cpp.html https://www.csee.umbc.edu/portal/help/VHDL/verilog/command_line_plus_options.html http://sven.xtreme-eda.com/ https://www.edaplayground.com/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++