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

Implement pass data APIs #165

Closed ptpan closed 4 years ago

ptpan commented 4 years ago
  1. Implemented set_metadata, has_metadata, and get_metadata
  2. Translation pass, import pass, and placeholder pass now use the metadata APIs
  3. When TranslationImportPass is applied, all placeholders will be translated and imported
  4. Translating a top level is now effectively a no-op because it has been pickled by the placeholder pass
  5. Preliminary inference of has_clk, has_reset, and vl_line_trace
  6. By default placeholder wrappers will use single underscore to mangle signal names
  7. Replace .pymtl_sim_root with pymtl.ini. Currently only support AutoPrefixoption in PLACEHOLDER section

We have decided to adopt an incremental approach to deploy the metadata APIs. In this PR only the translation and import related passes use them. We will gradually port more passes to use this and completely abandon the ad-hoc configuration attribute approach by the 3.0 release.

codecov[bot] commented 4 years ago

Codecov Report

Merging #165 into dev-3.0-release will increase coverage by 0.03%. The diff coverage is 93.42%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           dev-3.0-release     #165      +/-   ##
===================================================
+ Coverage            89.20%   89.24%   +0.03%     
===================================================
  Files                  290      291       +1     
  Lines                25188    25327     +139     
===================================================
+ Hits                 22470    22603     +133     
- Misses                2718     2724       +6     
Impacted Files Coverage Δ
pymtl3/passes/__init__.py 100.00% <ø> (ø)
pymtl3/passes/backends/verilog/__init__.py 100.00% <ø> (ø)
pymtl3/passes/backends/yosys/__init__.py 100.00% <ø> (ø)
pymtl3/passes/errors.py 66.66% <0.00%> (ø)
pymtl3/stdlib/test/test_utils.py 43.22% <20.00%> (-1.70%) :arrow_down:
pymtl3/dsl/errors.py 92.30% <66.66%> (-1.25%) :arrow_down:
...sses/backends/verilog/VerilogPlaceholderConfigs.py 85.29% <75.00%> (+1.20%) :arrow_up:
pymtl3/passes/tracing/TracingConfigs.py 83.33% <80.00%> (-16.67%) :arrow_down:
pymtl3/passes/PlaceholderPass.py 90.90% <84.61%> (+12.33%) :arrow_up:
.../translation/structural/VStructuralTranslatorL1.py 88.03% <85.71%> (-1.73%) :arrow_down:
... and 34 more

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 64759ec...9dadc13. Read the comment docs.