Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Break out verilog module, mostly #15

Merged
merged 2 commits into from
Jun 2, 2022
Merged

Break out verilog module, mostly #15

merged 2 commits into from
Jun 2, 2022

Conversation

dan-fritchman
Copy link
Contributor

  • Break out modules for Verilog reading and the Design class.
  • Fix Spice SUBCKT case-sensitivity.
  • Fail when encountering Verilog ast.Assign

… SUBCKT case-sensitivity. Fail when encountering Verilog ast.Assign
@@ -447,8 +53,11 @@ def DefineOptions(optparser):
optparser.add_option('--verilog_include', dest='verilog_includes', default=[], action='append', help='verilog include paths')
optparser.add_option('--verilog_defines', dest='verilog_defines', default=[], action='append', help='verilog macro definitions')
optparser.add_option('--spef', dest='spef_files', default=[], action='append', help='spef files')

# FIXME: what is the difference between these two "spice" options?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--spice files are read for their contents (i.e. a circuit.Module is loaded from their netlists)
--spice_headers are read for their port orders and kept as ExternalModules

circuit.py Outdated
@@ -563,9 +561,16 @@ def __init__(self, ast_node=None):
self.time_unit_prefix = None
# How many 10^x of a Henry. (None => x = 0)
self.inductance_unit_prefix = None

@classmethod
def from_verilog(cls, ast_node: "verilog.ast.Node") -> "Module":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep consistent with style in rest of project: FromVerilog

@dan-fritchman
Copy link
Contributor Author

FWIW, noticed this in the style guide:

Code that is to be released as open source should follow the public style guide on GitHub instead.

And that (https://google.github.io/styleguide/pyguide#3164-guidelines-derived-from-guidos-recommendations) says:

Functions | lower_with_under()

So, I suppose this is really a much larger AI for the maintainer!

@growly
Copy link
Contributor

growly commented Jun 2, 2022

👀

oh no they changed everything

@growly growly merged commit 6b2d0b4 into main Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants