diff --git a/bitwise/_version.py b/bitwise/_version.py index 0988857..6a35e85 100644 --- a/bitwise/_version.py +++ b/bitwise/_version.py @@ -1 +1 @@ -__version__ = "0.2" +__version__ = "0.3" diff --git a/bitwise/processor/PROC.py b/bitwise/processor/PROC.py index e1b9029..7a43c68 100644 --- a/bitwise/processor/PROC.py +++ b/bitwise/processor/PROC.py @@ -103,9 +103,10 @@ def __init__(self, clock, instruction, instruction_available, data): p = Wire() q = Wire() - self.datapath = _ProcessorDatapath( + self.controlpath = _ProcessorControlpath( clock, - data, + instruction, + instruction_available, extern, reg_0_in, reg_0_out, @@ -123,10 +124,9 @@ def __init__(self, clock, instruction, instruction_available, data): q ) - self.controlpath = _ProcessorControlpath( + self.datapath = _ProcessorDatapath( clock, - instruction, - instruction_available, + data, extern, reg_0_in, reg_0_out, @@ -332,6 +332,8 @@ def __init__( and_T1_A__or_I1_to_I12_4 = Bus4() and_T2_B__or_I2_to_I10_4 = Bus4() + state.RingCounter4(vcc, clear_n, clock, T_reversed) + _Register10(instruction, func_reg_in, clock, instruction_reg) signal.Decoder1Of16(vcc, op, I_reversed) @@ -383,8 +385,6 @@ def __init__( gate.ANDGate2(clock, aclear, clear) gate.NOTGate(clear, clear_n) - state.RingCounter4(vcc, clear_n, clock, T_reversed) - gate.Buffer(and_T1_I7, alu_function_select[3]) gate.ORGate2(and_T2__or_I2_I4_I6, and_T1_I7, alu_function_select[2]) diff --git a/docs/_build/doctrees/api.doctree b/docs/_build/doctrees/api.doctree index 6e7473d..7c0c529 100644 Binary files a/docs/_build/doctrees/api.doctree and b/docs/_build/doctrees/api.doctree differ diff --git a/docs/_build/doctrees/arithmetic.doctree b/docs/_build/doctrees/arithmetic.doctree index cfe70c0..a6f3bb6 100644 Binary files a/docs/_build/doctrees/arithmetic.doctree and b/docs/_build/doctrees/arithmetic.doctree differ diff --git a/docs/_build/doctrees/changelog.doctree b/docs/_build/doctrees/changelog.doctree index 8540072..a35be2e 100644 Binary files a/docs/_build/doctrees/changelog.doctree and b/docs/_build/doctrees/changelog.doctree differ diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 1bbbb94..4ea618b 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/gate.doctree b/docs/_build/doctrees/gate.doctree index 38f8f16..7eb336a 100644 Binary files a/docs/_build/doctrees/gate.doctree and b/docs/_build/doctrees/gate.doctree differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree index 00d5cc0..701b08d 100644 Binary files a/docs/_build/doctrees/index.doctree and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/install.doctree b/docs/_build/doctrees/install.doctree index bdf0b7e..8f3c0e1 100644 Binary files a/docs/_build/doctrees/install.doctree and b/docs/_build/doctrees/install.doctree differ diff --git a/docs/_build/doctrees/logic.doctree b/docs/_build/doctrees/logic.doctree index 836b6ba..18a145b 100644 Binary files a/docs/_build/doctrees/logic.doctree and b/docs/_build/doctrees/logic.doctree differ diff --git a/docs/_build/doctrees/signal.doctree b/docs/_build/doctrees/signal.doctree index e6acddd..708f079 100644 Binary files a/docs/_build/doctrees/signal.doctree and b/docs/_build/doctrees/signal.doctree differ diff --git a/docs/_build/doctrees/state.doctree b/docs/_build/doctrees/state.doctree index aa029e3..8d47237 100644 Binary files a/docs/_build/doctrees/state.doctree and b/docs/_build/doctrees/state.doctree differ diff --git a/docs/_build/doctrees/storage.doctree b/docs/_build/doctrees/storage.doctree index 10a8092..7e8b33f 100644 Binary files a/docs/_build/doctrees/storage.doctree and b/docs/_build/doctrees/storage.doctree differ diff --git a/docs/_build/doctrees/wire.doctree b/docs/_build/doctrees/wire.doctree index 0076e9d..5cc8cca 100644 Binary files a/docs/_build/doctrees/wire.doctree and b/docs/_build/doctrees/wire.doctree differ diff --git a/docs/_build/html/_sources/install.rst.txt b/docs/_build/html/_sources/install.rst.txt index 83ae5a5..ddc30c5 100644 --- a/docs/_build/html/_sources/install.rst.txt +++ b/docs/_build/html/_sources/install.rst.txt @@ -25,7 +25,7 @@ If there are no errors, you can open a Python session and verify the installatio >> import bitwise as bw >> bw.__version__ - '0.1.1' + '0.3' Refer to the :doc:`changelog ` for version details. In this documentation, it is canonical to have imported Bitwise as ``bw``. diff --git a/docs/_build/html/_static/alabaster.css b/docs/_build/html/_static/alabaster.css index 900083d..0fe69cd 100644 --- a/docs/_build/html/_static/alabaster.css +++ b/docs/_build/html/_static/alabaster.css @@ -1,61 +1,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @import url("basic.css"); /* -- page layout ----------------------------------------------------------- */ body { - font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif; + font-family: Georgia, serif; font-size: 17px; background-color: #fff; color: #000; @@ -159,7 +107,7 @@ div.sphinxsidebarwrapper p.blurb { div.sphinxsidebar h3, div.sphinxsidebar h4 { - font-family: 'Garamond', 'Georgia', serif; + font-family: Georgia, serif; color: #444; font-size: 24px; font-weight: normal; @@ -203,7 +151,7 @@ div.sphinxsidebar ul li.toctree-l2 > a { div.sphinxsidebar input { border: 1px solid #CCC; - font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif; + font-family: Georgia, serif; font-size: 1em; } @@ -218,6 +166,19 @@ div.sphinxsidebar hr { width: 50%; } +div.sphinxsidebar .badge { + border-bottom: none; +} + +div.sphinxsidebar .badge:hover { + border-bottom: none; +} + +/* To address an issue with donation coming after search */ +div.sphinxsidebar h3.donation { + margin-top: 10px; +} + /* -- body styles ----------------------------------------------------------- */ a { @@ -236,7 +197,7 @@ div.body h3, div.body h4, div.body h5, div.body h6 { - font-family: 'Garamond', 'Georgia', serif; + font-family: Georgia, serif; font-weight: normal; margin: 30px 0px 10px 0px; padding: 0; @@ -277,7 +238,7 @@ div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { } div.admonition p.admonition-title { - font-family: 'Garamond', 'Georgia', serif; + font-family: Georgia, serif; font-weight: normal; font-size: 24px; margin: 0 0 10px 0; @@ -366,7 +327,7 @@ p.admonition-title:after { } pre, tt, code { - font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.9em; } @@ -696,4 +657,51 @@ table.docutils.citation, table.docutils.citation td, table.docutils.citation th -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; +} + + +/* relbar */ + +.related { + line-height: 30px; + width: 100%; + font-size: 0.9rem; +} + +.related.top { + border-bottom: 1px solid #EEE; + margin-bottom: 20px; +} + +.related.bottom { + border-top: 1px solid #EEE; +} + +.related ul { + padding: 0; + margin: 0; + list-style: none; +} + +.related li { + display: inline; +} + +nav#rellinks { + float: right; +} + +nav#rellinks li+li:before { + content: "|"; +} + +nav#breadcrumbs li+li:before { + content: "\00BB"; +} + +/* Hide certain items when printing */ +@media print { + div.related { + display: none; + } } \ No newline at end of file diff --git a/docs/_build/html/api.html b/docs/_build/html/api.html index 0bb0f05..9d7be17 100644 --- a/docs/_build/html/api.html +++ b/docs/_build/html/api.html @@ -100,6 +100,8 @@

Quick search

+ +
@@ -260,6 +262,7 @@

Wire

+
diff --git a/docs/_build/html/arithmetic.html b/docs/_build/html/arithmetic.html index b41536e..7b2146e 100644 --- a/docs/_build/html/arithmetic.html +++ b/docs/_build/html/arithmetic.html @@ -104,6 +104,8 @@

Quick search

+ +
@@ -503,6 +505,7 @@

Raises:

+
diff --git a/docs/_build/html/changelog.html b/docs/_build/html/changelog.html index 42192aa..8c0a6c5 100644 --- a/docs/_build/html/changelog.html +++ b/docs/_build/html/changelog.html @@ -96,6 +96,8 @@

Quick search

+ +
@@ -250,6 +252,7 @@

Changed

+
diff --git a/docs/_build/html/gate.html b/docs/_build/html/gate.html index 22908f4..c3b3b12 100644 --- a/docs/_build/html/gate.html +++ b/docs/_build/html/gate.html @@ -110,6 +110,8 @@

Quick search

+ +
@@ -597,6 +599,7 @@

Args:

+
diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html index 1f63232..d0e6139 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/html/genindex.html @@ -85,6 +85,8 @@

Quick search

+ +
@@ -96,6 +98,7 @@

Index

+
diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index 95cbfc7..7cfe920 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -93,6 +93,8 @@

Quick search

+ +
@@ -153,6 +155,7 @@

Quick Example

+
diff --git a/docs/_build/html/install.html b/docs/_build/html/install.html index ac56911..cc591bf 100644 --- a/docs/_build/html/install.html +++ b/docs/_build/html/install.html @@ -103,6 +103,8 @@

Quick search

diff --git a/docs/_build/html/logic.html b/docs/_build/html/logic.html index 41c114f..4ae04a0 100644 --- a/docs/_build/html/logic.html +++ b/docs/_build/html/logic.html @@ -123,6 +123,8 @@

Quick search

+ +
@@ -1121,6 +1123,7 @@

Raises:

+
diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index 9a20e71..a5105af 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -82,6 +82,8 @@

Navigation

+ +

Search

@@ -109,6 +111,7 @@

Search

+
diff --git a/docs/_build/html/signal.html b/docs/_build/html/signal.html index 7a94963..337d8d0 100644 --- a/docs/_build/html/signal.html +++ b/docs/_build/html/signal.html @@ -113,6 +113,8 @@

Quick search

+ +
@@ -827,6 +829,7 @@

Raises:

+
diff --git a/docs/_build/html/state.html b/docs/_build/html/state.html index 21a7ed6..d0b05da 100644 --- a/docs/_build/html/state.html +++ b/docs/_build/html/state.html @@ -111,6 +111,8 @@

Quick search

+ +
@@ -792,6 +794,7 @@

Raises:

+
diff --git a/docs/_build/html/storage.html b/docs/_build/html/storage.html index 6722156..6bfdb38 100644 --- a/docs/_build/html/storage.html +++ b/docs/_build/html/storage.html @@ -105,6 +105,8 @@

Quick search

+ +
@@ -497,6 +499,7 @@

Args:

+
diff --git a/docs/_build/html/wire.html b/docs/_build/html/wire.html index 5e15c72..a5113c8 100644 --- a/docs/_build/html/wire.html +++ b/docs/_build/html/wire.html @@ -101,6 +101,8 @@

Quick search

+ +
@@ -421,6 +423,7 @@

Raises:

+
diff --git a/docs/install.rst b/docs/install.rst index 83ae5a5..ddc30c5 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -25,7 +25,7 @@ If there are no errors, you can open a Python session and verify the installatio >> import bitwise as bw >> bw.__version__ - '0.1.1' + '0.3' Refer to the :doc:`changelog ` for version details. In this documentation, it is canonical to have imported Bitwise as ``bw``. diff --git a/setup.py b/setup.py index 383365a..5596a4a 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,6 @@ def readme(): "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries :: Python Modules" ], diff --git a/tests/processor/test_Processor.py b/tests/processor/test_Processor.py index 0a6e979..2826bd5 100644 --- a/tests/processor/test_Processor.py +++ b/tests/processor/test_Processor.py @@ -63,6 +63,29 @@ def test_Processor_Sum_Ten_Natural_Numbers(self): print(processor_.get_important_wires()) clock.value = 1 + instruction.wire_values = (1, 0, 1, 0, 0, 0, 0, 0, 1, 0) + clock.value = 0 + print(processor_.get_important_wires()) + clock.value = 1 + clock.value = 0 + print(processor_.get_important_wires()) + clock.value = 1 + clock.value = 0 + print(processor_.get_important_wires()) + clock.value = 1 + clock.value = 0 + print(processor_.get_important_wires()) + clock.value = 1 + clock.value = 0 + print(processor_.get_important_wires()) + clock.value = 1 + clock.value = 0 + print(processor_.get_important_wires()) + clock.value = 1 + clock.value = 0 + print(processor_.get_important_wires()) + clock.value = 1 + print(processor_) assert 1 == 0