cornell-brg / pymtl

Python-based hardware modeling framework
BSD 3-Clause "New" or "Revised" License
237 stars 82 forks source link

Failed Installation #176

Closed MattCatz closed 5 years ago

MattCatz commented 5 years ago

I am trying to install pymtl. I have tried multiple times and ready through and am unsuccessful at getting some of the pymtl verilator related tests to pass. I have tested my verilator installation. My suspicion is that pymtl is unable to communicate with my verilator installation correctly but I am not able to diagnose the issue. Any help would be appreciated.

Verifying Verilator

$ make test

Summary of configuration:
  Compiled in defaults if not in environment:
    SYSTEMC            =
    SYSTEMC_ARCH       =
    SYSTEMC_INCLUDE    =
    SYSTEMC_LIBDIR     =
    SYSTEMPERL         =
    SYSTEMPERL_INCLUDE =
    VERILATOR_ROOT     = /usr/local/share/verilator

Environment:
    PERL               =
    SYSTEMC            =
    SYSTEMC_ARCH       =
    SYSTEMC_INCLUDE    =
    SYSTEMC_LIBDIR     =
    SYSTEMPERL         =
    SYSTEMPERL_INCLUDE =
    VERILATOR_ROOT     = /tmp/verilator/verilator-3.876/test_c/..
    VERILATOR_BIN      =

skipping some test stuff...

obj_dir/simx
Enabling waves...
Hello World!
[0] 0 1 0 3 3f_ffffffff_ffffffff
[1] 0 1 0 3 3f_ffffffff_ffffffff
[2] 0 0 0 0 0_00000000_00000000
[3] 1 0 0 0 0_00000000_00000000
[4] 1 0 0 0 0_00000000_00000000
[5] 1 0 0 0 0_00000000_00000000
[6] 1 0 0 0 0_00000000_00000000
[7] 1 0 0 0 0_00000000_00000000
[8] 0 0 0 0 0_00000000_00000000
[9] 0 0 0 0 0_00000000_00000000
[10] 0 0 0 0 0_00000000_00000000
[11] 0 1 0 3 3f_ffffffff_ffffffff
[12] 0 1 0 3 3f_ffffffff_ffffffff
[13] 1 1 0 3 3f_ffffffff_ffffffff
[14] 1 1 0 3 3f_ffffffff_ffffffff
[15] 1 1 0 3 3f_ffffffff_ffffffff
[16] 1 1 0 3 3f_ffffffff_ffffffff
[17] 1 1 0 3 3f_ffffffff_ffffffff
[18] 0 1 0 3 3f_ffffffff_ffffffff
[19] 0 1 0 3 3f_ffffffff_ffffffff
[20] 0 1 0 3 3f_ffffffff_ffffffff
[21] 0 1 1 3 3f_ffffffff_ffffffff
All Tests passed
make[1]: Leaving directory '/tmp/verilator/verilator-3.876/test_c'
make[1]: Entering directory '/tmp/verilator/verilator-3.876/test_sc'

%Skip: SYSTEMC_INCLUDE not in environment

make[1]: Leaving directory '/tmp/verilator/verilator-3.876/test_sc'
Tests passed!

Type 'make install' to install documentation.

Installing Verilator

$ sudo make install
/usr/bin/install -c -m 644 verilator.pc /usr/local/share/pkgconfig

Installed!

Verifying Versions

$ lsb_release -a
LSB Version:    core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

$ verilator --version
Verilator 3.876 2015-08-12 rev verilator_3_876-1-g5f21385

$pkg-config --print-variables verilator
datarootdir
exec_prefix
includedir
libdir
pcfiledir
prefix

$ python --version
Python 2.7.15rc1

$ pip --version
pip 19.0.1 (python 2.7)

$ pip list
apipkg         1.5
atomicwrites   1.2.1
attrs          18.2.0
cffi           1.11.5
execnet        1.5.0
funcsigs       1.0.2
greenlet       0.4.15
more-itertools 5.0.0
pathlib2       2.3.3
pip            19.0.1
pkg-resources  0.0.0
pluggy         0.8.1
py             1.7.0
pycparser      2.19
pymtl          0.1-156-g025fa94 /home/mcather/projects/pymtl
pyparsing      2.3.1
pytest         4.1.1
pytest-forked  1.0.1
pytest-xdist   1.26.0
scandir        1.9.0
setuptools     40.6.3
six            1.12.0
wheel          0.32.3

Running Tests

$ cd pymtl/build
$ pytest ..

========================================================================== test session starts ===========================================================================
platform linux2 -- Python 2.7.15rc1, pytest-4.1.1, py-1.7.0, pluggy-0.8.1
rootdir: /home/mcather/projects/pymtl, inifile: pytest.ini
plugins: xdist-1.26.0, forked-1.0.1
collected 1061 items

../pclib/cl/InValRdyRandStallAdapter_test.py .........                                                                                                             [  0%]
../pclib/cl/OutValRdyInelasticPipeAdapter_test.py ...................                                                                                              [  2%]
../pclib/cl/adapters_test.py .....                                                                                                                                 [  3%]
../pclib/cl/pipelines_test.py ...................................                                                                                                  [  6%]
../pclib/cl/queues_test.py ...................................................................                                                                     [ 12%]
../pclib/fl/BytesMemPortAdapter_test.py ....                                                                                                                       [ 13%]
../pclib/fl/Bytes_test.py ...                                                                                                                                      [ 13%]
../pclib/fl/ListBytesProxy_test.py .                                                                                                                               [ 13%]
../pclib/fl/QueuePortProxy_test.py ....                                                                                                                            [ 13%]
../pclib/ifcs/MemMsg_test.py ....                                                                                                                                  [ 14%]
../pclib/ifcs/NetMsg_test.py ..                                                                                                                                    [ 14%]
../pclib/ifcs/ValRdyBundle_test.py .....                                                                                                                           [ 14%]
../pclib/ifcs/XcelMsg_test.py ....                                                                                                                                 [ 15%]
../pclib/rtl/Bus_test.py .                                                                                                                                         [ 15%]
../pclib/rtl/Crossbar_test.py .                                                                                                                                    [ 15%]
../pclib/rtl/Decoder_test.py ..                                                                                                                                    [ 15%]
../pclib/rtl/Mux_test.py .......                                                                                                                                   [ 16%]
../pclib/rtl/PipeCtrl_test.py .........                                                                                                                            [ 17%]
../pclib/rtl/RegisterFile_test.py ...                                                                                                                              [ 17%]
../pclib/rtl/SRAMs_test.py ....                                                                                                                                    [ 17%]
../pclib/rtl/arbiters_test.py ..                                                                                                                                   [ 18%]
../pclib/rtl/arith_test.py .....................                                                                                                                   [ 19%]
../pclib/rtl/onehot_test.py ..                                                                                                                                     [ 20%]
../pclib/rtl/queues_test.py ..................                                                                                                                     [ 21%]
../pclib/rtl/regs_test.py ........                                                                                                                                 [ 22%]
../pclib/test/SparseMemoryImage_test.py s                                                                                                                          [ 22%]
../pclib/test/TestMemory_test.py .......................                                                                                                           [ 24%]
../pclib/test/TestNetSink_test.py ........                                                                                                                         [ 25%]
../pclib/test/TestRandomDelay_test.py ....                                                                                                                         [ 26%]
../pclib/test/TestSimpleNetSink_test.py ...                                                                                                                        [ 26%]
../pclib/test/TestSimpleSink_test.py .                                                                                                                             [ 26%]
../pclib/test/TestSink_test.py ............                                                                                                                        [ 27%]
../pclib/test/TestSource_test.py ........                                                                                                                          [ 28%]
../pclib/test/TestSrcSinkSim_test.py ....                                                                                                                          [ 28%]
../pclib/test/TestSynchronizer_test.py .......                                                                                                                     [ 29%]
../pclib/test/TestVectorSimulator_test.py .                                                                                                                        [ 29%]
../pymtl/datatypes/BitStruct_test.py .x....x                                                                                                                       [ 30%]
../pymtl/datatypes/Bits_test.py ...................................                                                                                                [ 33%]
../pymtl/datatypes/helpers_test.py ........                                                                                                                        [ 34%]
../pymtl/model/Model_test.py .............                                                                                                                         [ 35%]
../pymtl/model/PortBundle_test.py .....                                                                                                                            [ 35%]
../pymtl/tools/deprecated/ast_transformer_test.py .............................                                                                                    [ 38%]
../pymtl/tools/deprecated/ast_typer_test.py .............................                                                                                          [ 41%]
../pymtl/tools/integration/verilog_tests/verilog_test.py FFFFFFFFFFFFFFFFFFFFFFFFFFFF..                                                                            [ 44%]
../pymtl/tools/simulation/SimulationTool_bug_test.py ...............                                                                                               [ 45%]
../pymtl/tools/simulation/SimulationTool_comb_test.py ............................................................                                                 [ 51%]
../pymtl/tools/simulation/SimulationTool_mix_test.py ............                                                                                                  [ 52%]
../pymtl/tools/simulation/SimulationTool_seq_test.py ..............                                                                                                [ 53%]
../pymtl/tools/simulation/SimulationTool_struct_test.py ...................................                                                                        [ 56%]
../pymtl/tools/simulation/SimulationTool_transl_test.py ........x...x.x......X..x..................................................                                [ 63%]
../pymtl/tools/simulation/SimulationTool_wire_test.py ...........X                                                                                                 [ 65%]
../pymtl/tools/simulation/ast_visitor_test.py ...........................................                                                                          [ 69%]
../pymtl/tools/simulation/vcd_test.py .................................................................................................................X           [ 79%]
../pymtl/tools/translation/verilator_sim_test.py FF                                                                                                                [ 80%]
../pymtl/tools/translation/verilog_behavioral_test.py sssFFFFFFFFFFFFFFFFFFFFFFFFFFFxFFFFFFFFFFFFFFFFFFxsFFFFxFFFFFFFFFFFFFFFsssFFFFFFFFFFFxxFFFxFFxxxxFxxFFxxxxxx [ 90%]
FxxxxxxxxxxxxxxxxxxxFFFFFFFFxxxxxxxxxFFFFFFFFFFFF                                                                                                                  [ 94%]
../pymtl/tools/translation/verilog_bug_test.py FFFF.                                                                                                               [ 95%]
../pymtl/tools/translation/verilog_structural_test.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFxxFFFFFFFFFFFxFx                                                            [100%]

=============================================== 183 failed, 811 passed, 8 skipped, 56 xfailed, 3 xpassed in 106.54 seconds ===============================================
$ pytest .. --test-verilog
========================================================================== test session starts ===========================================================================
platform linux2 -- Python 2.7.15rc1, pytest-4.1.1, py-1.7.0, pluggy-0.8.1
rootdir: /home/mcather/projects/pymtl, inifile: pytest.ini
plugins: xdist-1.26.0, forked-1.0.1
collected 1061 items

../pclib/cl/InValRdyRandStallAdapter_test.py sssssssss                                                                                                             [  0%]
../pclib/cl/OutValRdyInelasticPipeAdapter_test.py sssssssssssssssssss                                                                                              [  2%]
../pclib/cl/adapters_test.py sssss                                                                                                                                 [  3%]
../pclib/cl/pipelines_test.py sssssssssssssssssssssssssssssssssss                                                                                                  [  6%]
../pclib/cl/queues_test.py sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss                                                                     [ 12%]
../pclib/fl/BytesMemPortAdapter_test.py ssss                                                                                                                       [ 13%]
../pclib/fl/Bytes_test.py sss                                                                                                                                      [ 13%]
../pclib/fl/ListBytesProxy_test.py s                                                                                                                               [ 13%]
../pclib/fl/QueuePortProxy_test.py ssss                                                                                                                            [ 13%]
../pclib/ifcs/MemMsg_test.py ssss                                                                                                                                  [ 14%]
../pclib/ifcs/NetMsg_test.py ss                                                                                                                                    [ 14%]
../pclib/ifcs/ValRdyBundle_test.py FFFFF                                                                                                                           [ 14%]
../pclib/ifcs/XcelMsg_test.py ssss                                                                                                                                 [ 15%]
../pclib/rtl/Bus_test.py F                                                                                                                                         [ 15%]
../pclib/rtl/Crossbar_test.py F                                                                                                                                    [ 15%]
../pclib/rtl/Decoder_test.py FF                                                                                                                                    [ 15%]
../pclib/rtl/Mux_test.py FFFFFFF                                                                                                                                   [ 16%]
../pclib/rtl/PipeCtrl_test.py FFFFFFFFF                                                                                                                            [ 17%]
../pclib/rtl/RegisterFile_test.py FFF                                                                                                                              [ 17%]
../pclib/rtl/SRAMs_test.py FFFF                                                                                                                                    [ 17%]
../pclib/rtl/arbiters_test.py FF                                                                                                                                   [ 18%]
../pclib/rtl/arith_test.py FFFFFFFFFFFFFFFFFFFFF                                                                                                                   [ 19%]
../pclib/rtl/onehot_test.py FF                                                                                                                                     [ 20%]
../pclib/rtl/queues_test.py FFFFFFFFFFFFFFFFFF                                                                                                                     [ 21%]
../pclib/rtl/regs_test.py FFFFFFFF                                                                                                                                 [ 22%]
../pclib/test/SparseMemoryImage_test.py s                                                                                                                          [ 22%]
../pclib/test/TestMemory_test.py sssssssssssssssssssssss                                                                                                           [ 24%]
../pclib/test/TestNetSink_test.py ssssssss                                                                                                                         [ 25%]
../pclib/test/TestRandomDelay_test.py ssss                                                                                                                         [ 26%]
../pclib/test/TestSimpleNetSink_test.py sss                                                                                                                        [ 26%]
../pclib/test/TestSimpleSink_test.py s                                                                                                                             [ 26%]
../pclib/test/TestSink_test.py ssssssssssss                                                                                                                        [ 27%]
../pclib/test/TestSource_test.py ssssssss                                                                                                                          [ 28%]
../pclib/test/TestSrcSinkSim_test.py ssss                                                                                                                          [ 28%]
../pclib/test/TestSynchronizer_test.py sssssss                                                                                                                     [ 29%]
../pclib/test/TestVectorSimulator_test.py s                                                                                                                        [ 29%]
../pymtl/datatypes/BitStruct_test.py ssFFFFs                                                                                                                       [ 30%]
../pymtl/datatypes/Bits_test.py sssssssssssssssssssssssssssssssssss                                                                                                [ 33%]
../pymtl/datatypes/helpers_test.py ssssssss                                                                                                                        [ 34%]
../pymtl/model/Model_test.py sssssssssssss                                                                                                                         [ 35%]
../pymtl/model/PortBundle_test.py sssss                                                                                                                            [ 35%]
../pymtl/tools/deprecated/ast_transformer_test.py sssssssssssssssssssssssssssss                                                                                    [ 38%]
../pymtl/tools/deprecated/ast_typer_test.py sssssssssssssssssssssssssssss                                                                                          [ 41%]
../pymtl/tools/integration/verilog_tests/verilog_test.py ssssssssssssssssssssssssssssss                                                                            [ 44%]
../pymtl/tools/simulation/SimulationTool_bug_test.py sssssssssssssss                                                                                               [ 45%]
../pymtl/tools/simulation/SimulationTool_comb_test.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss                                                 [ 51%]
../pymtl/tools/simulation/SimulationTool_mix_test.py ssssssssssss                                                                                                  [ 52%]
../pymtl/tools/simulation/SimulationTool_seq_test.py ssssssssssssss                                                                                                [ 53%]
../pymtl/tools/simulation/SimulationTool_struct_test.py sssssssssssssssssssssssssssssssssss                                                                        [ 56%]
../pymtl/tools/simulation/SimulationTool_transl_test.py sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss                                [ 63%]
../pymtl/tools/simulation/SimulationTool_wire_test.py ssssssssssss                                                                                                 [ 65%]
../pymtl/tools/simulation/ast_visitor_test.py sssssssssssssssssssssssssssssssssssssssssss                                                                          [ 69%]
../pymtl/tools/simulation/vcd_test.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss           [ 79%]
../pymtl/tools/translation/verilator_sim_test.py ss                                                                                                                [ 80%]
../pymtl/tools/translation/verilog_behavioral_test.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 90%]
sssssssssssssssssssssssssssssssssssssssssssssssss                                                                                                                  [ 94%]
../pymtl/tools/translation/verilog_bug_test.py sssss                                                                                                               [ 95%]
../pymtl/tools/translation/verilog_structural_test.py sssssssssssssssssssssssssssssssssssssssssssssssss                                                            [100%]

================================================================ 87 failed, 974 skipped in 44.31 seconds =================================================================
MattCatz commented 5 years ago

Upon further investigation I discover it was in fact an issue with verilator. The issues was similar to this verilator issue.