Open mdko opened 3 years ago
Merging #398 (6461ae9) into development (0e6fdae) will decrease coverage by
0.09%
. The diff coverage is78.84%
.
@@ Coverage Diff @@
## development #398 +/- ##
===============================================
- Coverage 90.71% 90.62% -0.10%
===============================================
Files 24 24
Lines 5988 6013 +25
===============================================
+ Hits 5432 5449 +17
- Misses 556 564 +8
Impacted Files | Coverage Δ | |
---|---|---|
pyrtl/importexport.py | 85.03% <78.84%> (-0.60%) |
:arrow_down: |
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 0e6fdae...6461ae9. Read the comment docs.
This will import the Verilog module without making its i/o wires the block's i/o wires. Instead, it returns an object whose attributes are input/output wires, accessible via the name of the wires defined on the Verilog module.
Given this Verilog file
You can import it like so
foo.x
andfoo.y
areWireVector
s, notInput
, and they are named with internal names so the module can be imported multiple times without clashes. Similarly,foo.z
isWireVector
, notOutput
. All these wires can be connected to others like normal:The key is the
**as_block**
parameter you pass toinput_from_verilog
, which will determine if block-level I/O is created, or instead a "submodule".This PR also adds support for importing particular models from a BLIF file (since the
input_from_verilog()
function basically wraps the call toinput_from_blif()
).