tree: 0aa2790fec682feeefc7b7eee512e69bcf0d7cbc [path history] [tgz]
  1. API/
  2. Cache/
  3. CommandLine/
  4. Common/
  5. Config/
  6. Design/
  7. DesignCompile/
  8. ErrorReporting/
  9. Expression/
  10. Library/
  11. nbproject/
  12. Package/
  13. parser/
  14. SourceCompile/
  15. Testbench/
  16. Testcases/
  17. Utils/
  18. .dep.inc
  19. build3rdparty.sh
  20. build3rdparty_mini.sh
  21. buildall.sh
  22. buildantlr.sh
  23. buildantlr_mini.sh
  24. buildccache.sh
  25. builddebug.sh
  26. buildflatbuffer.sh
  27. buildpp.sh
  28. buildpython.sh
  29. buildrelease.sh
  30. buildreleasepp.sh
  31. main.cpp
  32. Makefile
  33. python_listener.py
  34. README.md
  35. release.tcl
SVIncCompil/README.md

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

SURELOG project

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

Executable: surelog

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

Development Environment Required:

  • Linux (Ubuntu or Centos)

  • Unlimit all limits, in your .cshrc or .bashrc put “ulimit -s” that will enable gcc to compile the very large Antlr generated C++ files

  • The following tools need to be installed on your machine:

    • Java jdk (For Antlr generation) sudo apt-get install default-jdk
    • Compiler: gcc with C11 support
      • g++-7
      • sudo add-apt-repository ppa:jonathonf/gcc-7.2
      • sudo apt-get update
      • sudo apt-get install gcc-7 g++-7
    • Python3.6
    • uuid
    • uuid-dev
    • cmake
    • tclsh
    • maven
    • git
    • swig
    • pkg-config
    • Java “ant” build system (For G4 directory)
    • IDE: >= netbeans8.2
    • ddd for Core dump debug
    • valgrind --tool=memcheck to check for memory corruptions
    • tcmalloc
  • Surelog Source code git clone https://github.com/alainmarcel/Surelog.git

Build

  • Run 3rd party build script (Builds antlr4.7.2, python3.6, flatbuffer, ccache)

    • cd Surelog/SVIncCompil
    • ./build3rdparty.sh
  • Build Surelog Pick your choice:

    • ./buildall.sh (Builds all targets, release, debug...)
    • ./buildrelease.sh (Builds the release target)
    • ./builddebug.sh (Builds the debug target)
    • ./buildreleasepp.sh (Updates the preprrocessor grammar and build the release target)
    • ./buildpp.sh (Updates the preprrocessor grammar and build all targets)

Run a test

  • dist/Release/GNU-Linux/surelog -help
  • dist/Release/GNU-Linux/surelog -writepp -parse ../TESTCASES/UnitTest/top.v

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

Modus operanti for grammar development:

  • Edit the grammar file in the G4 directory, test the grammar locally with the java targets: ant compile_java; ant javac; ant test_pp_tokens

  • Then generate for the C++ target and copy the cpp files in SVIncCompil/parser: ant compile_cpp; ant copy_cpp

  • Import the project SVIncCompil in NetBeans, develop using the imported antlr generated code.

Voila!

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

TESTS and REGRESSIONS

Create tests in Netbeans under the Testcase directory, Copy an exisitng launcher in the Project Manager Launcher menu, adapt to the test

The following regression script will run all tests:

  • cd Testcases
  • ./regression.tcl

Regression options:

  • regression.tcl help
  • regression.tcl tests= (Tests matching regular expression)
    • test= (Just that test)
    • debug=<none, valgrind, ddd>
    • build=<debug, advanced, release, notcmalloc>
    • commit="commit text"
    • mt="
    • large (large tests too)
    • show_diff (Shows text diff)
  • regression.tcl update (Updates the diffs)

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

RELEASES

  • ./release.tcl Releases the following:

  • ./release.tcl

    • Created dist/surelog_release_notcmalloc.tar.gz
    • Created dist/surelog_release_tcmalloc.tar.gz
    • Created dist/surelog_debug_notcmalloc.tar.gz
    • Created dist/surelog_debug_tcmalloc.tar.gz

Run this script at least once to create symbolic links for the Python Listener

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

PROFILING

  • Either

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

    • google-pprof --callgrind ../../dist/Debug/GNU-Linux/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

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

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

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