pymtl / pymtl3

Pymtl 3 (Mamba), an open-source Python-based hardware generation, simulation, and verification framework
BSD 3-Clause "New" or "Revised" License
388 stars 46 forks source link

Finalize Bits semantics & achieve 100% coverage for Bits_test #177

Closed jsn1993 closed 4 years ago

jsn1993 commented 4 years ago

In this PR I implemented stricter semantics for the binary operations.

I also leverage pytest-coverage to add tests to cover 100% of PythonBits.py.

I realize that slots are not automatically inherited so I add them to BitsN classes.

codecov[bot] commented 4 years ago

Codecov Report

Merging #177 into dev-3.0-release will increase coverage by 0.22%. The diff coverage is 100.00%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           dev-3.0-release     #177      +/-   ##
===================================================
+ Coverage            90.28%   90.50%   +0.22%     
===================================================
  Files                  296      296              
  Lines                26496    26834     +338     
===================================================
+ Hits                 23922    24287     +365     
+ Misses                2574     2547      -27     
Impacted Files Coverage Δ
pymtl3/datatypes/bits_import.py 100.00% <ø> (ø)
pymtl3/datatypes/PythonBits.py 100.00% <100.00%> (+10.89%) :arrow_up:
pymtl3/datatypes/test/bits_test.py 100.00% <100.00%> (ø)
pymtl3/dsl/test/ComponentLevel2_test.py 90.73% <100.00%> (ø)
...ckends/verilog/import_/test/ImportedObject_test.py 100.00% <100.00%> (ø)
pymtl3/stdlib/ifcs/mem_ifcs_test.py 100.00% <100.00%> (ø)
...backends/verilog/import_/VerilatorImportConfigs.py 89.41% <0.00%> (+0.34%) :arrow_up:
.../passes/backends/verilog/VerilogPlaceholderPass.py 92.22% <0.00%> (+1.50%) :arrow_up:
...sses/backends/verilog/VerilogPlaceholderConfigs.py 95.65% <0.00%> (+4.47%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1b9ca40...b7dffb4. Read the comment docs.