UCSBarchlab / PyRTL

A collection of classes providing simple hardware specification, simulation, tracing, and testing suitable for teaching and research. Simplicity, usability, clarity, and extensibility are the overarching goals, rather than performance or optimization.
http://ucsbarchlab.github.io/PyRTL
BSD 3-Clause "New" or "Revised" License
257 stars 78 forks source link

Don't generate nands on BLIF import #401

Closed mdko closed 3 years ago

mdko commented 3 years ago

In this commit, I updated blif import to be a little more general, but in so doing, introduced a place where n (nand) nets are created. The n net is a non-primitive in PyRTL, and should only be introduced via a call to nand_synth(), and so issues come up if you import a BLIF that generates a n, and then try to export it to Verilog, for example, where checks are made for unsupported nets.

This PR just converts any n seen during BLIF import into a combination of ~ and &.

codecov-commenter commented 3 years ago

Codecov Report

Merging #401 (750cc70) into development (2d9ab35) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           development     #401   +/-   ##
============================================
  Coverage        90.71%   90.71%           
============================================
  Files               24       24           
  Lines             5989     5989           
============================================
  Hits              5433     5433           
  Misses             556      556           
Impacted Files Coverage Δ
pyrtl/importexport.py 85.65% <100.00%> (ø)

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 2d9ab35...750cc70. Read the comment docs.