-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SvgPcb layout template backend + netlister refactor (#337)
- Add EXPERIMENTAL (alpha stage) layout template generator for svg-pcb, with example for SwitchMatrix. - Components with a defined template (extends `SvgPcbTemplateBlock` and defines `_svgpcb_template`) generates custom layout templates - Other components (not part of a component above or subtree) generate into footprints from the netlister - Add refdes netlists to test suite - Add barebones keyboard example - Netlister refactor - Move refdes parsing into the Backend, and how it's handled into the netlist file generator (instead of embedded in the NetlistTransform) - Move netlist data structures (block, net, pin) into the NetlistGenerator (instead of the file generator), clean up the data structures to use more structured types (instead of strings) where possible - Pins treated differently from ports, netlister only considers IR-level connections - Clean up and improve net naming priority (in particular prioritizing link names), this simplifies some names - Fix XIAO-ESP32C3 definition - TransformUtil.Path improvements - `.append_*` supports multiple paths - `.starts_with` prefix check w/ unit tests - Lots of cleanup of unit tests
- Loading branch information
Showing
74 changed files
with
35,876 additions
and
568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import unittest | ||
|
||
from .TransformUtil import Path | ||
|
||
|
||
class PathTestCase(unittest.TestCase): | ||
def test_startswith(self) -> None: | ||
path = Path.empty() | ||
self.assertTrue(path.append_block('a', 'b').startswith(path.append_block('a'))) | ||
self.assertFalse(path.append_block('a').startswith(path.append_block('a', 'b'))) | ||
self.assertTrue(path.append_block('a').startswith(path.append_block('a'))) | ||
self.assertTrue(path.append_block('a', 'b').startswith(path.append_block('a', 'b'))) | ||
|
||
self.assertFalse(path.append_block('a').startswith(path.append_link('a'))) | ||
|
||
self.assertTrue(path.append_block('a').append_link('b').startswith(path.append_block('a'))) | ||
self.assertTrue(path.append_block('a').append_link('b').startswith(path.append_block('a').append_link('b'))) | ||
self.assertTrue(path.append_block('a').append_link('b', 'c').startswith(path.append_block('a').append_link('b'))) | ||
self.assertTrue(path.append_block('a').append_link('b', 'c').startswith(path.append_block('a').append_link('b', 'c'))) | ||
self.assertFalse(path.append_block('a').append_link('b').startswith(path.append_link('b'))) | ||
self.assertFalse(path.append_block('a').append_link('b').startswith(path.append_block('a', 'b'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.