From 2fe57666485b5a2ac346ea448dc98b930252ed79 Mon Sep 17 00:00:00 2001 From: Obijuan Date: Sat, 14 Oct 2023 18:42:16 +0200 Subject: [PATCH] sys-DFF-ld-rst-block: updated --- blocks/DFFs/Block/Sys-DFF-ld-rst.ice | 264 ++-- .../Alhambra-II/01-manual-testing.ice | 1152 ++++++++++------- 2 files changed, 837 insertions(+), 579 deletions(-) diff --git a/blocks/DFFs/Block/Sys-DFF-ld-rst.ice b/blocks/DFFs/Block/Sys-DFF-ld-rst.ice index b49361d..7eaea61 100644 --- a/blocks/DFFs/Block/Sys-DFF-ld-rst.ice +++ b/blocks/DFFs/Block/Sys-DFF-ld-rst.ice @@ -1,9 +1,9 @@ { "version": "1.2", "package": { - "name": "sys-DFF-ld-rst", - "version": "2.5", - "description": "Sys-DFF-ld-rst. System - D Flip-flop. Capture data every system clock cycle. from input si. If load is active, the data is captured from the d input. Reset input", + "name": "sys-DFF-ld-rst-block", + "version": "3", + "description": "Sys-DFF-ld-rst. System - D Flip-flop. Capture data every system clock cycle. from input si. If load is active, the data is captured from the d input. Reset input. Block implementation", "author": "Juan González-Gómez (Obijuan)", "image": "%3Csvg%20width=%22249.521%22%20height=%22268.178%22%20viewBox=%220%200%2066.01921%2070.955445%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform=%22translate(-38.141%20-48.028)%22%3E%3Crect%20width=%2224.412%22%20height=%2213.185%22%20x=%2279.352%22%20y=%2253.67%22%20ry=%222.247%22%20fill=%22#fff%22%20stroke=%22#000%22%20stroke-width=%22.794%22%20stroke-linecap=%22round%22/%3E%3Cg%20stroke=%22#000%22%20stroke-width=%221.442%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M77.902%2088.18l13.607%2016.672-6.918-20.534%22%20fill=%22#ccc%22%20stroke-width=%221.0924880399999999%22/%3E%3Cpath%20d=%22M70.517%2080.116l-9.232-19.613-6.45%203.725-2.07-3.584%2020.905-12.07%202.07%203.584-6.093%203.518%2012.03%2018.222s5.4-2.025%208.536.74c3.136%202.766%202.52%204.92%202.887%204.773L69.412%2093.049s-2.848-3.696-2.16-6.796c.687-3.1%203.265-6.137%203.265-6.137z%22%20fill=%22red%22%20stroke-width=%221.0924880399999999%22/%3E%3C/g%3E%3Ctext%20style=%22line-height:1.25%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22400%22%20font-size=%2210.583%22%20font-family=%22sans-serif%22%20fill=%22#00f%22%20stroke-width=%22.265%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22700%22%3ESys%3C/tspan%3E%3C/text%3E%3Cg%20transform=%22translate(-55.377%2022.259)%20scale(1.09073)%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20cx=%22100.602%22%20cy=%2273.815%22%20r=%2214.559%22%20fill=%22#ececec%22%20stroke-width=%22.608%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M106.978%2082.142h-3.353V63.316H97.54v18.678h-3.652%22%20fill=%22none%22%20stroke-width=%221.521%22/%3E%3C/g%3E%3C/g%3E%3C/svg%3E" }, @@ -51,14 +51,6 @@ "type": "basic.input", "data": { "name": "rst", - "virtual": true, - "pins": [ - { - "index": "0", - "name": "NULL", - "value": "NULL" - } - ], "clock": false }, "position": { @@ -71,15 +63,7 @@ "type": "basic.inputLabel", "data": { "name": "rst", - "blockColor": "red", - "virtual": true, - "pins": [ - { - "index": "0", - "name": "NULL", - "value": "NULL" - } - ] + "blockColor": "red" }, "position": { "x": 136, @@ -220,15 +204,7 @@ "type": "basic.outputLabel", "data": { "name": "rst", - "blockColor": "red", - "virtual": true, - "pins": [ - { - "index": "0", - "name": "NULL", - "value": "NULL" - } - ] + "blockColor": "red" }, "position": { "x": 584, @@ -423,18 +399,6 @@ "height": 96 } }, - { - "id": "3e66b384-c29b-4edf-9831-6e5140a89691", - "type": "dfa7edc9373492388c38c768173e06aea82860d6", - "position": { - "x": 856, - "y": 392 - }, - "size": { - "width": 96, - "height": 64 - } - }, { "id": "9882f115-c569-4ead-b964-3bcf73e36816", "type": "c1653fb9d46cb18a515599972fbcf6692524bc96", @@ -458,6 +422,18 @@ "width": 96, "height": 64 } + }, + { + "id": "2a8bebbd-73c4-4142-b5a4-80311a25952b", + "type": "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284", + "position": { + "x": 856, + "y": 392 + }, + "size": { + "width": 96, + "height": 64 + } } ], "wires": [ @@ -557,13 +533,13 @@ "port": "outlabel" }, "target": { - "block": "3e66b384-c29b-4edf-9831-6e5140a89691", + "block": "2a8bebbd-73c4-4142-b5a4-80311a25952b", "port": "3943e194-090b-4553-9df3-88bc4b17abc2" } }, { "source": { - "block": "3e66b384-c29b-4edf-9831-6e5140a89691", + "block": "2a8bebbd-73c4-4142-b5a4-80311a25952b", "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" }, "target": { @@ -577,7 +553,7 @@ "port": "constant-out" }, "target": { - "block": "3e66b384-c29b-4edf-9831-6e5140a89691", + "block": "2a8bebbd-73c4-4142-b5a4-80311a25952b", "port": "65194b18-5d2a-41b2-bd86-01be99978ad6" } }, @@ -597,7 +573,7 @@ "port": "56c306d0-95f2-48b3-a0fd-cd7bfb35dce8" }, "target": { - "block": "3e66b384-c29b-4edf-9831-6e5140a89691", + "block": "2a8bebbd-73c4-4142-b5a4-80311a25952b", "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" } }, @@ -780,10 +756,99 @@ } } }, - "dfa7edc9373492388c38c768173e06aea82860d6": { + "6b14d5741f7e62a08c61190175d6447b05954bbd": { + "package": { + "name": "1-bit-gen-constant", + "version": "0.0.2", + "description": "1-bit generic constant (0/1)", + "author": "Juan Gonzalez-Gomez (Obijuan)", + "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22145.608%22%20height=%22247.927%22%20viewBox=%220%200%20136.50729%20232.43134%22%3E%3Cg%20style=%22line-height:0%25;-inkscape-font-specification:'Ubuntu%20Mono'%22%3E%3Cpath%20d=%22M56.012%20146.905q9.055%206.708%2020.459%2017.105%2011.404%2010.062%2022.472%2021.8%2011.403%2011.74%2021.465%2024.15%2010.062%2012.074%2016.1%2022.471h-32.87q-6.372-10.397-15.763-21.13-9.392-11.068-20.124-21.13-10.398-10.062-21.13-18.447-10.398-8.385-18.783-14.087v74.794H0V4.695L27.838%200v141.874q18.447-16.1%2036.894-31.863%2018.447-16.1%2033.205-33.205h32.533q-14.422%2017.106-34.881%2035.217-20.124%2018.112-39.577%2034.882z%22%20style=%22line-height:1.25%22%20font-size=%22335.399%22%20font-weight=%22400%22%20font-family=%22Ubuntu%20Mono%22%20letter-spacing=%220%22%20word-spacing=%220%22%20fill=%22green%22/%3E%3C/g%3E%3C/svg%3E" + }, + "design": { + "graph": { + "blocks": [ + { + "id": "5d443143-4aca-4d4f-ba40-2b88451b86d3", + "type": "basic.output", + "data": { + "name": "" + }, + "position": { + "x": 960, + "y": 248 + } + }, + { + "id": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", + "type": "basic.constant", + "data": { + "name": "", + "value": "0", + "local": false + }, + "position": { + "x": 728, + "y": 128 + } + }, + { + "id": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", + "type": "basic.code", + "data": { + "code": "assign k = VALUE;", + "params": [ + { + "name": "VALUE" + } + ], + "ports": { + "in": [], + "out": [ + { + "name": "k" + } + ] + } + }, + "position": { + "x": 672, + "y": 248 + }, + "size": { + "width": 208, + "height": 64 + } + } + ], + "wires": [ + { + "source": { + "block": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", + "port": "constant-out" + }, + "target": { + "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", + "port": "VALUE" + } + }, + { + "source": { + "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", + "port": "k" + }, + "target": { + "block": "5d443143-4aca-4d4f-ba40-2b88451b86d3", + "port": "in" + } + } + ] + } + } + }, + "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284": { "package": { "name": "sys-DFF-verilog", - "version": "2.3", + "version": "3", "description": "System - D Flip-flop. Capture data every system clock cycle. Verilog implementation", "author": "Juan González-Gómez (Obijuan)", "image": "%3Csvg%20width=%22196.313%22%20height=%22216.83%22%20viewBox=%220%200%2051.941051%2057.369679%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform=%22translate(-52.22%20-48.028)%22%3E%3Crect%20width=%2224.412%22%20height=%2213.185%22%20x=%2279.352%22%20y=%2253.67%22%20ry=%222.247%22%20fill=%22#fff%22%20stroke=%22#000%22%20stroke-width=%22.794%22%20stroke-linecap=%22round%22/%3E%3Cg%20stroke=%22#000%22%20stroke-width=%221.442%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M77.902%2088.18l13.607%2016.672-6.918-20.534%22%20fill=%22#ccc%22%20stroke-width=%221.0924880399999999%22/%3E%3Cpath%20d=%22M70.517%2080.116l-9.232-19.613-6.45%203.725-2.07-3.584%2020.905-12.07%202.07%203.584-6.093%203.518%2012.03%2018.222s5.4-2.025%208.536.74c3.136%202.766%202.52%204.92%202.887%204.773L69.412%2093.049s-2.848-3.696-2.16-6.796c.687-3.1%203.265-6.137%203.265-6.137z%22%20fill=%22red%22%20stroke-width=%221.0924880399999999%22/%3E%3C/g%3E%3Ctext%20style=%22line-height:1.25%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22400%22%20font-size=%2210.583%22%20font-family=%22sans-serif%22%20fill=%22#00f%22%20stroke-width=%22.265%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22700%22%3ESys%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E" @@ -811,7 +876,7 @@ }, "position": { "x": 208, - "y": 160 + "y": 184 } }, { @@ -822,7 +887,7 @@ }, "position": { "x": 816, - "y": 224 + "y": 232 } }, { @@ -834,7 +899,7 @@ }, "position": { "x": 208, - "y": 304 + "y": 280 } }, { @@ -854,7 +919,7 @@ "id": "bdc170f0-4468-4137-bd79-4624c9cadf2b", "type": "basic.code", "data": { - "code": "//-- Initial value\nreg q = INI;\n\n//-- Capture the input data \n//-- on the rising edge of \n//-- the system clock\nalways @(posedge clk)\n q <= d;", + "code": "//-- Initial value\nreg qi = INI;\n\n//-- Capture the input data \n//-- on the rising edge of \n//-- the system clock\nalways @(posedge clk)\n qi <= d;\n \n//-- Connect the register with the\n//-- output\nassign q = qi;", "params": [ { "name": "INI" @@ -881,8 +946,8 @@ "y": 168 }, "size": { - "width": 344, - "height": 176 + "width": 352, + "height": 192 } }, { @@ -910,7 +975,7 @@ }, "position": { "x": 208, - "y": 136 + "y": 160 }, "size": { "width": 120, @@ -926,7 +991,7 @@ }, "position": { "x": 224, - "y": 280 + "y": 256 }, "size": { "width": 112, @@ -1026,95 +1091,6 @@ ] } } - }, - "6b14d5741f7e62a08c61190175d6447b05954bbd": { - "package": { - "name": "1-bit-gen-constant", - "version": "0.0.2", - "description": "1-bit generic constant (0/1)", - "author": "Juan Gonzalez-Gomez (Obijuan)", - "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22145.608%22%20height=%22247.927%22%20viewBox=%220%200%20136.50729%20232.43134%22%3E%3Cg%20style=%22line-height:0%25;-inkscape-font-specification:'Ubuntu%20Mono'%22%3E%3Cpath%20d=%22M56.012%20146.905q9.055%206.708%2020.459%2017.105%2011.404%2010.062%2022.472%2021.8%2011.403%2011.74%2021.465%2024.15%2010.062%2012.074%2016.1%2022.471h-32.87q-6.372-10.397-15.763-21.13-9.392-11.068-20.124-21.13-10.398-10.062-21.13-18.447-10.398-8.385-18.783-14.087v74.794H0V4.695L27.838%200v141.874q18.447-16.1%2036.894-31.863%2018.447-16.1%2033.205-33.205h32.533q-14.422%2017.106-34.881%2035.217-20.124%2018.112-39.577%2034.882z%22%20style=%22line-height:1.25%22%20font-size=%22335.399%22%20font-weight=%22400%22%20font-family=%22Ubuntu%20Mono%22%20letter-spacing=%220%22%20word-spacing=%220%22%20fill=%22green%22/%3E%3C/g%3E%3C/svg%3E" - }, - "design": { - "graph": { - "blocks": [ - { - "id": "5d443143-4aca-4d4f-ba40-2b88451b86d3", - "type": "basic.output", - "data": { - "name": "" - }, - "position": { - "x": 960, - "y": 248 - } - }, - { - "id": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", - "type": "basic.constant", - "data": { - "name": "", - "value": "0", - "local": false - }, - "position": { - "x": 728, - "y": 128 - } - }, - { - "id": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", - "type": "basic.code", - "data": { - "code": "assign k = VALUE;", - "params": [ - { - "name": "VALUE" - } - ], - "ports": { - "in": [], - "out": [ - { - "name": "k" - } - ] - } - }, - "position": { - "x": 672, - "y": 248 - }, - "size": { - "width": 208, - "height": 64 - } - } - ], - "wires": [ - { - "source": { - "block": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", - "port": "constant-out" - }, - "target": { - "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", - "port": "VALUE" - } - }, - { - "source": { - "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", - "port": "k" - }, - "target": { - "block": "5d443143-4aca-4d4f-ba40-2b88451b86d3", - "port": "in" - } - } - ] - } - } } } } \ No newline at end of file diff --git a/examples/TESTs/DFFs/Sys-DFF-ld-rst/Alhambra-II/01-manual-testing.ice b/examples/TESTs/DFFs/Sys-DFF-ld-rst/Alhambra-II/01-manual-testing.ice index c6bbe7c..bd649b8 100644 --- a/examples/TESTs/DFFs/Sys-DFF-ld-rst/Alhambra-II/01-manual-testing.ice +++ b/examples/TESTs/DFFs/Sys-DFF-ld-rst/Alhambra-II/01-manual-testing.ice @@ -128,11 +128,11 @@ } }, { - "id": "66e940cc-0f89-484f-92f8-489c62144251", - "type": "dfa7edc9373492388c38c768173e06aea82860d6", + "id": "19bea2e6-ad53-40bf-a9a3-270e421e3a86", + "type": "febcfed8636b8ee9a98750b96ed9e53a165dd4a8", "position": { - "x": 288, - "y": 216 + "x": 136, + "y": 232 }, "size": { "width": 96, @@ -140,11 +140,11 @@ } }, { - "id": "19bea2e6-ad53-40bf-a9a3-270e421e3a86", - "type": "febcfed8636b8ee9a98750b96ed9e53a165dd4a8", + "id": "a888a85b-adc1-4c8b-b2eb-b3c433c076b3", + "type": "2f169f3a1deff908fb7c4915947bdd3a944d794b", "position": { - "x": 136, - "y": 232 + "x": 544, + "y": 480 }, "size": { "width": 96, @@ -152,8 +152,8 @@ } }, { - "id": "921df284-4b4a-41c8-ae15-aa6d1a640721", - "type": "dfa7edc9373492388c38c768173e06aea82860d6", + "id": "a58abc43-6830-4073-a89b-6a6a2beaf807", + "type": "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284", "position": { "x": 456, "y": 216 @@ -164,11 +164,11 @@ } }, { - "id": "a888a85b-adc1-4c8b-b2eb-b3c433c076b3", - "type": "2f169f3a1deff908fb7c4915947bdd3a944d794b", + "id": "10511254-a753-498d-9d9f-9720d7fa6dc7", + "type": "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284", "position": { - "x": 544, - "y": 480 + "x": 288, + "y": 216 }, "size": { "width": 96, @@ -176,8 +176,8 @@ } }, { - "id": "71e2a3f6-b5d2-42f0-a6c3-371aa6dd13b5", - "type": "335f4590bddd45279d6e4c885df2f594229485e5", + "id": "316f23ea-eec8-404b-80ab-fb8683055e25", + "type": "312299164fff2ae3089d4a015fa53ce99bb4f13c", "position": { "x": 688, "y": 296 @@ -202,7 +202,7 @@ }, { "source": { - "block": "71e2a3f6-b5d2-42f0-a6c3-371aa6dd13b5", + "block": "316f23ea-eec8-404b-80ab-fb8683055e25", "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" }, "target": { @@ -216,7 +216,7 @@ "port": "3d584b0a-29eb-47af-8c43-c0822282ef05" }, "target": { - "block": "66e940cc-0f89-484f-92f8-489c62144251", + "block": "10511254-a753-498d-9d9f-9720d7fa6dc7", "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" } }, @@ -226,7 +226,7 @@ "port": "constant-out" }, "target": { - "block": "71e2a3f6-b5d2-42f0-a6c3-371aa6dd13b5", + "block": "316f23ea-eec8-404b-80ab-fb8683055e25", "port": "65194b18-5d2a-41b2-bd86-01be99978ad6" } }, @@ -236,7 +236,7 @@ "port": "3d584b0a-29eb-47af-8c43-c0822282ef05" }, "target": { - "block": "71e2a3f6-b5d2-42f0-a6c3-371aa6dd13b5", + "block": "316f23ea-eec8-404b-80ab-fb8683055e25", "port": "a8816b54-ab32-4b97-ac3d-9bbf5f21b7a0" } }, @@ -246,7 +246,7 @@ "port": "3d584b0a-29eb-47af-8c43-c0822282ef05" }, "target": { - "block": "71e2a3f6-b5d2-42f0-a6c3-371aa6dd13b5", + "block": "316f23ea-eec8-404b-80ab-fb8683055e25", "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" }, "vertices": [ @@ -258,22 +258,22 @@ }, { "source": { - "block": "66e940cc-0f89-484f-92f8-489c62144251", + "block": "10511254-a753-498d-9d9f-9720d7fa6dc7", "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" }, "target": { - "block": "921df284-4b4a-41c8-ae15-aa6d1a640721", + "block": "a58abc43-6830-4073-a89b-6a6a2beaf807", "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" } }, { "source": { - "block": "921df284-4b4a-41c8-ae15-aa6d1a640721", + "block": "a58abc43-6830-4073-a89b-6a6a2beaf807", "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" }, "target": { - "block": "71e2a3f6-b5d2-42f0-a6c3-371aa6dd13b5", - "port": "fd6a999c-e5c2-4490-9623-431d0bec1bac" + "block": "316f23ea-eec8-404b-80ab-fb8683055e25", + "port": "6ea26cf0-a872-4d29-b9d6-7f7a97ac18a9" }, "vertices": [ { @@ -288,7 +288,7 @@ "port": "4e8afe74-8f38-4873-97ee-f7585d99a4aa" }, "target": { - "block": "71e2a3f6-b5d2-42f0-a6c3-371aa6dd13b5", + "block": "316f23ea-eec8-404b-80ab-fb8683055e25", "port": "be2f203f-1d38-4b61-a7e1-46c11a432db9" } } @@ -5918,11 +5918,235 @@ } } }, - "dfa7edc9373492388c38c768173e06aea82860d6": { + "2f169f3a1deff908fb7c4915947bdd3a944d794b": { "package": { - "name": "sys-DFF-verilog", - "version": "2.3", - "description": "System - D Flip-flop. Capture data every system clock cycle. Verilog implementation", + "name": "start", + "version": "0.2", + "description": "start: Start signal: It goes from 1 to 0 when the system clock starts. 1 cycle pulse witch", + "author": "Juan González-Gómez (Obijuan)", + "image": "%3Csvg%20width=%22223.262%22%20height=%22223.558%22%20viewBox=%220%200%2059.071472%2059.149732%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform=%22translate(-79.271%20-21.442)%22%3E%3Ctext%20style=%22line-height:1.25%22%20x=%2288.424%22%20y=%2229.297%22%20font-weight=%22400%22%20font-size=%2210.583%22%20font-family=%22sans-serif%22%20stroke-width=%22.265%22%3E%3Ctspan%20x=%2288.424%22%20y=%2229.297%22%3EStart!%3C/tspan%3E%3C/text%3E%3Ctext%20y=%2279.431%22%20x=%22124.459%22%20style=%22line-height:0%25%22%20font-weight=%22400%22%20font-size=%2238.048%22%20letter-spacing=%220%22%20word-spacing=%220%22%20transform=%22scale(.99853%201.00147)%22%20font-family=%22sans-serif%22%20fill=%22#00f%22%20stroke-width=%22.706%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20y=%2279.431%22%20x=%22124.459%22%20font-weight=%22700%22%20font-size=%2221.742%22%3E0%3C/tspan%3E%3C/text%3E%3Ccircle%20r=%2223.501%22%20cy=%2256.6%22%20cx=%22103.263%22%20fill=%22#ececec%22%20stroke=%22green%22%20stroke-width=%22.982%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M114.284%2070.04H101.95V39.653h-9.822%22%20fill=%22none%22%20stroke=%22green%22%20stroke-width=%222.455%22%20stroke-linecap=%22round%22/%3E%3Cg%20transform=%22translate(30.94%2013.308)%22%3E%3Crect%20width=%2224.412%22%20height=%2213.185%22%20x=%2280.3%22%20y=%2221.375%22%20ry=%222.247%22%20fill=%22#fff%22%20stroke=%22#000%22%20stroke-width=%22.794%22%20stroke-linecap=%22round%22/%3E%3Ctext%20style=%22line-height:1.25%22%20x=%2282.245%22%20y=%2230.943%22%20font-weight=%22400%22%20font-size=%2210.583%22%20font-family=%22sans-serif%22%20fill=%22#00f%22%20stroke-width=%22.265%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20x=%2282.245%22%20y=%2230.943%22%20font-weight=%22700%22%3ESys%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/g%3E%3C/svg%3E", + "otid": 1616923422866 + }, + "design": { + "graph": { + "blocks": [ + { + "id": "81d475cc-5bee-43d0-8d5f-04e967295a79", + "type": "basic.input", + "data": { + "name": "", + "clock": true + }, + "position": { + "x": 296, + "y": -48 + } + }, + { + "id": "b3cc17d8-a01d-46d6-ae9a-6ea2d7051569", + "type": "basic.inputLabel", + "data": { + "blockColor": "yellow", + "name": "clk" + }, + "position": { + "x": 448, + "y": -48 + } + }, + { + "id": "3b7cf626-0ae4-4c72-930a-3220f1daf9c4", + "type": "basic.outputLabel", + "data": { + "blockColor": "yellow", + "name": "clk", + "oldBlockColor": "fuchsia" + }, + "position": { + "x": 344, + "y": 120 + } + }, + { + "id": "4e8afe74-8f38-4873-97ee-f7585d99a4aa", + "type": "basic.output", + "data": { + "name": "" + }, + "position": { + "x": 656, + "y": 216 + } + }, + { + "id": "aa3def64-52dd-48fc-9f35-74b8aa3ddf76", + "type": "basic.constant", + "data": { + "name": "", + "value": "1", + "local": true + }, + "position": { + "x": 488, + "y": 104 + } + }, + { + "id": "3c9e71f9-0859-42dc-a502-3197737b54a0", + "type": "basic.info", + "data": { + "info": "System clock", + "readonly": true + }, + "position": { + "x": 304, + "y": -80 + }, + "size": { + "width": 120, + "height": 40 + } + }, + { + "id": "6e4bfa72-a3b5-4c96-8e28-d8c9774c174d", + "type": "d30ca9ee4f35f6cb76d5e5701447fc2b739bc640", + "position": { + "x": 216, + "y": 216 + }, + "size": { + "width": 96, + "height": 64 + } + }, + { + "id": "35c5d8da-dcf3-4f49-a4d9-02e1cb4f8bf9", + "type": "basic.info", + "data": { + "info": "Initial value: 1", + "readonly": true + }, + "position": { + "x": 504, + "y": 280 + }, + "size": { + "width": 152, + "height": 40 + } + }, + { + "id": "38b140e8-42af-44bf-a530-6ca9bbbed5e4", + "type": "basic.info", + "data": { + "info": "Initial value: 0", + "readonly": true + }, + "position": { + "x": 216, + "y": 288 + }, + "size": { + "width": 152, + "height": 40 + } + }, + { + "id": "546e6c09-c455-4f86-86d0-3afd77f4b09e", + "type": "basic.info", + "data": { + "info": "Falling edge", + "readonly": true + }, + "position": { + "x": 368, + "y": 264 + }, + "size": { + "width": 136, + "height": 40 + } + }, + { + "id": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", + "type": "85dc1f75bb2706cba6e6c504fec08ea7c5195798", + "position": { + "x": 488, + "y": 200 + }, + "size": { + "width": 96, + "height": 64 + } + } + ], + "wires": [ + { + "source": { + "block": "81d475cc-5bee-43d0-8d5f-04e967295a79", + "port": "out" + }, + "target": { + "block": "b3cc17d8-a01d-46d6-ae9a-6ea2d7051569", + "port": "inlabel" + }, + "vertices": [] + }, + { + "source": { + "block": "3b7cf626-0ae4-4c72-930a-3220f1daf9c4", + "port": "outlabel" + }, + "target": { + "block": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", + "port": "3943e194-090b-4553-9df3-88bc4b17abc2" + }, + "vertices": [ + { + "x": 456, + "y": 184 + } + ] + }, + { + "source": { + "block": "6e4bfa72-a3b5-4c96-8e28-d8c9774c174d", + "port": "3d584b0a-29eb-47af-8c43-c0822282ef05" + }, + "target": { + "block": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", + "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" + } + }, + { + "source": { + "block": "aa3def64-52dd-48fc-9f35-74b8aa3ddf76", + "port": "constant-out" + }, + "target": { + "block": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", + "port": "65194b18-5d2a-41b2-bd86-01be99978ad6" + } + }, + { + "source": { + "block": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", + "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" + }, + "target": { + "block": "4e8afe74-8f38-4873-97ee-f7585d99a4aa", + "port": "in" + } + } + ] + } + } + }, + "85dc1f75bb2706cba6e6c504fec08ea7c5195798": { + "package": { + "name": "sys-DFF", + "version": "2.2", + "description": "System - D Flip-flop. Capture data every system clock cycle", "author": "Juan González-Gómez (Obijuan)", "image": "%3Csvg%20width=%22196.313%22%20height=%22216.83%22%20viewBox=%220%200%2051.941051%2057.369679%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform=%22translate(-52.22%20-48.028)%22%3E%3Crect%20width=%2224.412%22%20height=%2213.185%22%20x=%2279.352%22%20y=%2253.67%22%20ry=%222.247%22%20fill=%22#fff%22%20stroke=%22#000%22%20stroke-width=%22.794%22%20stroke-linecap=%22round%22/%3E%3Cg%20stroke=%22#000%22%20stroke-width=%221.442%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M77.902%2088.18l13.607%2016.672-6.918-20.534%22%20fill=%22#ccc%22%20stroke-width=%221.0924880399999999%22/%3E%3Cpath%20d=%22M70.517%2080.116l-9.232-19.613-6.45%203.725-2.07-3.584%2020.905-12.07%202.07%203.584-6.093%203.518%2012.03%2018.222s5.4-2.025%208.536.74c3.136%202.766%202.52%204.92%202.887%204.773L69.412%2093.049s-2.848-3.696-2.16-6.796c.687-3.1%203.265-6.137%203.265-6.137z%22%20fill=%22red%22%20stroke-width=%221.0924880399999999%22/%3E%3C/g%3E%3Ctext%20style=%22line-height:1.25%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22400%22%20font-size=%2210.583%22%20font-family=%22sans-serif%22%20fill=%22#00f%22%20stroke-width=%22.265%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22700%22%3ESys%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E" }, @@ -6165,235 +6389,11 @@ } } }, - "2f169f3a1deff908fb7c4915947bdd3a944d794b": { + "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284": { "package": { - "name": "start", - "version": "0.2", - "description": "start: Start signal: It goes from 1 to 0 when the system clock starts. 1 cycle pulse witch", - "author": "Juan González-Gómez (Obijuan)", - "image": "%3Csvg%20width=%22223.262%22%20height=%22223.558%22%20viewBox=%220%200%2059.071472%2059.149732%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform=%22translate(-79.271%20-21.442)%22%3E%3Ctext%20style=%22line-height:1.25%22%20x=%2288.424%22%20y=%2229.297%22%20font-weight=%22400%22%20font-size=%2210.583%22%20font-family=%22sans-serif%22%20stroke-width=%22.265%22%3E%3Ctspan%20x=%2288.424%22%20y=%2229.297%22%3EStart!%3C/tspan%3E%3C/text%3E%3Ctext%20y=%2279.431%22%20x=%22124.459%22%20style=%22line-height:0%25%22%20font-weight=%22400%22%20font-size=%2238.048%22%20letter-spacing=%220%22%20word-spacing=%220%22%20transform=%22scale(.99853%201.00147)%22%20font-family=%22sans-serif%22%20fill=%22#00f%22%20stroke-width=%22.706%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20y=%2279.431%22%20x=%22124.459%22%20font-weight=%22700%22%20font-size=%2221.742%22%3E0%3C/tspan%3E%3C/text%3E%3Ccircle%20r=%2223.501%22%20cy=%2256.6%22%20cx=%22103.263%22%20fill=%22#ececec%22%20stroke=%22green%22%20stroke-width=%22.982%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M114.284%2070.04H101.95V39.653h-9.822%22%20fill=%22none%22%20stroke=%22green%22%20stroke-width=%222.455%22%20stroke-linecap=%22round%22/%3E%3Cg%20transform=%22translate(30.94%2013.308)%22%3E%3Crect%20width=%2224.412%22%20height=%2213.185%22%20x=%2280.3%22%20y=%2221.375%22%20ry=%222.247%22%20fill=%22#fff%22%20stroke=%22#000%22%20stroke-width=%22.794%22%20stroke-linecap=%22round%22/%3E%3Ctext%20style=%22line-height:1.25%22%20x=%2282.245%22%20y=%2230.943%22%20font-weight=%22400%22%20font-size=%2210.583%22%20font-family=%22sans-serif%22%20fill=%22#00f%22%20stroke-width=%22.265%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20x=%2282.245%22%20y=%2230.943%22%20font-weight=%22700%22%3ESys%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/g%3E%3C/svg%3E", - "otid": 1616923422866 - }, - "design": { - "graph": { - "blocks": [ - { - "id": "81d475cc-5bee-43d0-8d5f-04e967295a79", - "type": "basic.input", - "data": { - "name": "", - "clock": true - }, - "position": { - "x": 296, - "y": -48 - } - }, - { - "id": "b3cc17d8-a01d-46d6-ae9a-6ea2d7051569", - "type": "basic.inputLabel", - "data": { - "blockColor": "yellow", - "name": "clk" - }, - "position": { - "x": 448, - "y": -48 - } - }, - { - "id": "3b7cf626-0ae4-4c72-930a-3220f1daf9c4", - "type": "basic.outputLabel", - "data": { - "blockColor": "yellow", - "name": "clk", - "oldBlockColor": "fuchsia" - }, - "position": { - "x": 344, - "y": 120 - } - }, - { - "id": "4e8afe74-8f38-4873-97ee-f7585d99a4aa", - "type": "basic.output", - "data": { - "name": "" - }, - "position": { - "x": 656, - "y": 216 - } - }, - { - "id": "aa3def64-52dd-48fc-9f35-74b8aa3ddf76", - "type": "basic.constant", - "data": { - "name": "", - "value": "1", - "local": true - }, - "position": { - "x": 488, - "y": 104 - } - }, - { - "id": "3c9e71f9-0859-42dc-a502-3197737b54a0", - "type": "basic.info", - "data": { - "info": "System clock", - "readonly": true - }, - "position": { - "x": 304, - "y": -80 - }, - "size": { - "width": 120, - "height": 40 - } - }, - { - "id": "6e4bfa72-a3b5-4c96-8e28-d8c9774c174d", - "type": "d30ca9ee4f35f6cb76d5e5701447fc2b739bc640", - "position": { - "x": 216, - "y": 216 - }, - "size": { - "width": 96, - "height": 64 - } - }, - { - "id": "35c5d8da-dcf3-4f49-a4d9-02e1cb4f8bf9", - "type": "basic.info", - "data": { - "info": "Initial value: 1", - "readonly": true - }, - "position": { - "x": 504, - "y": 280 - }, - "size": { - "width": 152, - "height": 40 - } - }, - { - "id": "38b140e8-42af-44bf-a530-6ca9bbbed5e4", - "type": "basic.info", - "data": { - "info": "Initial value: 0", - "readonly": true - }, - "position": { - "x": 216, - "y": 288 - }, - "size": { - "width": 152, - "height": 40 - } - }, - { - "id": "546e6c09-c455-4f86-86d0-3afd77f4b09e", - "type": "basic.info", - "data": { - "info": "Falling edge", - "readonly": true - }, - "position": { - "x": 368, - "y": 264 - }, - "size": { - "width": 136, - "height": 40 - } - }, - { - "id": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", - "type": "85dc1f75bb2706cba6e6c504fec08ea7c5195798", - "position": { - "x": 488, - "y": 200 - }, - "size": { - "width": 96, - "height": 64 - } - } - ], - "wires": [ - { - "source": { - "block": "81d475cc-5bee-43d0-8d5f-04e967295a79", - "port": "out" - }, - "target": { - "block": "b3cc17d8-a01d-46d6-ae9a-6ea2d7051569", - "port": "inlabel" - }, - "vertices": [] - }, - { - "source": { - "block": "3b7cf626-0ae4-4c72-930a-3220f1daf9c4", - "port": "outlabel" - }, - "target": { - "block": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", - "port": "3943e194-090b-4553-9df3-88bc4b17abc2" - }, - "vertices": [ - { - "x": 456, - "y": 184 - } - ] - }, - { - "source": { - "block": "6e4bfa72-a3b5-4c96-8e28-d8c9774c174d", - "port": "3d584b0a-29eb-47af-8c43-c0822282ef05" - }, - "target": { - "block": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", - "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" - } - }, - { - "source": { - "block": "aa3def64-52dd-48fc-9f35-74b8aa3ddf76", - "port": "constant-out" - }, - "target": { - "block": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", - "port": "65194b18-5d2a-41b2-bd86-01be99978ad6" - } - }, - { - "source": { - "block": "b36ad6f3-efc4-41b7-8fa1-6b9b5a91af50", - "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" - }, - "target": { - "block": "4e8afe74-8f38-4873-97ee-f7585d99a4aa", - "port": "in" - } - } - ] - } - } - }, - "85dc1f75bb2706cba6e6c504fec08ea7c5195798": { - "package": { - "name": "sys-DFF", - "version": "2.2", - "description": "System - D Flip-flop. Capture data every system clock cycle", + "name": "sys-DFF-verilog", + "version": "3", + "description": "System - D Flip-flop. Capture data every system clock cycle. Verilog implementation", "author": "Juan González-Gómez (Obijuan)", "image": "%3Csvg%20width=%22196.313%22%20height=%22216.83%22%20viewBox=%220%200%2051.941051%2057.369679%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform=%22translate(-52.22%20-48.028)%22%3E%3Crect%20width=%2224.412%22%20height=%2213.185%22%20x=%2279.352%22%20y=%2253.67%22%20ry=%222.247%22%20fill=%22#fff%22%20stroke=%22#000%22%20stroke-width=%22.794%22%20stroke-linecap=%22round%22/%3E%3Cg%20stroke=%22#000%22%20stroke-width=%221.442%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M77.902%2088.18l13.607%2016.672-6.918-20.534%22%20fill=%22#ccc%22%20stroke-width=%221.0924880399999999%22/%3E%3Cpath%20d=%22M70.517%2080.116l-9.232-19.613-6.45%203.725-2.07-3.584%2020.905-12.07%202.07%203.584-6.093%203.518%2012.03%2018.222s5.4-2.025%208.536.74c3.136%202.766%202.52%204.92%202.887%204.773L69.412%2093.049s-2.848-3.696-2.16-6.796c.687-3.1%203.265-6.137%203.265-6.137z%22%20fill=%22red%22%20stroke-width=%221.0924880399999999%22/%3E%3C/g%3E%3Ctext%20style=%22line-height:1.25%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22400%22%20font-size=%2210.583%22%20font-family=%22sans-serif%22%20fill=%22#00f%22%20stroke-width=%22.265%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22700%22%3ESys%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E" }, @@ -6420,7 +6420,7 @@ }, "position": { "x": 208, - "y": 160 + "y": 184 } }, { @@ -6431,7 +6431,7 @@ }, "position": { "x": 816, - "y": 224 + "y": 232 } }, { @@ -6443,7 +6443,7 @@ }, "position": { "x": 208, - "y": 304 + "y": 280 } }, { @@ -6463,7 +6463,7 @@ "id": "bdc170f0-4468-4137-bd79-4624c9cadf2b", "type": "basic.code", "data": { - "code": "//-- Initial value\nreg q = INI;\n\n//-- Capture the input data \n//-- on the rising edge of \n//-- the system clock\nalways @(posedge clk)\n q <= d;", + "code": "//-- Initial value\nreg qi = INI;\n\n//-- Capture the input data \n//-- on the rising edge of \n//-- the system clock\nalways @(posedge clk)\n qi <= d;\n \n//-- Connect the register with the\n//-- output\nassign q = qi;", "params": [ { "name": "INI" @@ -6490,8 +6490,8 @@ "y": 168 }, "size": { - "width": 344, - "height": 176 + "width": 352, + "height": 192 } }, { @@ -6519,7 +6519,7 @@ }, "position": { "x": 208, - "y": 136 + "y": 160 }, "size": { "width": 120, @@ -6535,7 +6535,7 @@ }, "position": { "x": 224, - "y": 280 + "y": 256 }, "size": { "width": 112, @@ -6636,11 +6636,11 @@ } } }, - "335f4590bddd45279d6e4c885df2f594229485e5": { + "312299164fff2ae3089d4a015fa53ce99bb4f13c": { "package": { - "name": "sys-DFF-ld-rst-verilog", - "version": "2.4", - "description": "Sys-DFF-ld-rst-verilog. System - D Flip-flop. Capture data every system clock cycle. from input si. If load is active, the data is captured from the d input. Reset input. Verilog implementation", + "name": "sys-DFF-ld-rst-block", + "version": "3", + "description": "Sys-DFF-ld-rst. System - D Flip-flop. Capture data every system clock cycle. from input si. If load is active, the data is captured from the d input. Reset input. Block implementation", "author": "Juan González-Gómez (Obijuan)", "image": "%3Csvg%20width=%22249.521%22%20height=%22268.178%22%20viewBox=%220%200%2066.01921%2070.955445%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform=%22translate(-38.141%20-48.028)%22%3E%3Crect%20width=%2224.412%22%20height=%2213.185%22%20x=%2279.352%22%20y=%2253.67%22%20ry=%222.247%22%20fill=%22#fff%22%20stroke=%22#000%22%20stroke-width=%22.794%22%20stroke-linecap=%22round%22/%3E%3Cg%20stroke=%22#000%22%20stroke-width=%221.442%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M77.902%2088.18l13.607%2016.672-6.918-20.534%22%20fill=%22#ccc%22%20stroke-width=%221.0924880399999999%22/%3E%3Cpath%20d=%22M70.517%2080.116l-9.232-19.613-6.45%203.725-2.07-3.584%2020.905-12.07%202.07%203.584-6.093%203.518%2012.03%2018.222s5.4-2.025%208.536.74c3.136%202.766%202.52%204.92%202.887%204.773L69.412%2093.049s-2.848-3.696-2.16-6.796c.687-3.1%203.265-6.137%203.265-6.137z%22%20fill=%22red%22%20stroke-width=%221.0924880399999999%22/%3E%3C/g%3E%3Ctext%20style=%22line-height:1.25%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22400%22%20font-size=%2210.583%22%20font-family=%22sans-serif%22%20fill=%22#00f%22%20stroke-width=%22.265%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20x=%2281.296%22%20y=%2263.239%22%20font-weight=%22700%22%3ESys%3C/tspan%3E%3C/text%3E%3Cg%20transform=%22translate(-55.377%2022.259)%20scale(1.09073)%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20cx=%22100.602%22%20cy=%2273.815%22%20r=%2214.559%22%20fill=%22#ececec%22%20stroke-width=%22.608%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M106.978%2082.142h-3.353V63.316H97.54v18.678h-3.652%22%20fill=%22none%22%20stroke-width=%221.521%22/%3E%3C/g%3E%3C/g%3E%3C/svg%3E" }, @@ -6648,77 +6648,54 @@ "graph": { "blocks": [ { - "id": "54dbabeb-8aef-4184-8fdc-87528aca29a3", - "type": "basic.output", + "id": "3943e194-090b-4553-9df3-88bc4b17abc2", + "type": "basic.input", "data": { - "name": "nc" + "name": "", + "clock": true }, "position": { - "x": 1064, - "y": 128 + "x": -16, + "y": 160 } }, { - "id": "75de70cb-5830-47f5-8da4-305d1b5a06ef", - "type": "basic.outputLabel", + "id": "b48b1bb4-5b7c-4283-ad79-22ae399cf86a", + "type": "basic.inputLabel", "data": { "name": "clk", "blockColor": "yellow" }, "position": { - "x": 304, - "y": 152 + "x": 120, + "y": 160 } }, { - "id": "3943e194-090b-4553-9df3-88bc4b17abc2", - "type": "basic.input", - "data": { - "name": "", - "clock": true - }, - "position": { - "x": -16, - "y": 160 - } - }, - { - "id": "b48b1bb4-5b7c-4283-ad79-22ae399cf86a", - "type": "basic.inputLabel", - "data": { - "name": "clk", - "blockColor": "yellow" - }, - "position": { - "x": 120, - "y": 160 - } - }, - { - "id": "e1596f69-7823-419d-9ec1-73f2b471a50f", + "id": "54dbabeb-8aef-4184-8fdc-87528aca29a3", "type": "basic.output", "data": { "name": "nc" }, "position": { - "x": 1056, - "y": 200 + "x": 1136, + "y": 232 } }, { - "id": "fd6a999c-e5c2-4490-9623-431d0bec1bac", + "id": "6ea26cf0-a872-4d29-b9d6-7f7a97ac18a9", "type": "basic.input", "data": { "name": "rst", "clock": false }, "position": { - "x": 0, - "y": 240 + "x": -8, + "y": 256 } }, { - "id": "f1bc73d7-915e-43b7-adff-5cff01cce5fd", + "id": "1dd10336-2db2-4731-9163-3cff3011667d", "type": "basic.inputLabel", "data": { "name": "rst", @@ -6726,42 +6703,42 @@ }, "position": { "x": 136, - "y": 240 + "y": 256 } }, { - "id": "fce2f544-bf03-4df9-b72e-ddf5237474cc", + "id": "75de70cb-5830-47f5-8da4-305d1b5a06ef", "type": "basic.outputLabel", "data": { - "name": "rst", - "blockColor": "red" + "name": "clk", + "blockColor": "yellow" }, "position": { - "x": 320, - "y": 248 + "x": 728, + "y": 280 } }, { - "id": "33bfbbd9-1b7e-4b73-aa22-20a65d3729dc", - "type": "basic.outputLabel", + "id": "06059133-0c23-4d2e-aedd-a123b30a8545", + "type": "basic.output", "data": { - "name": "si", - "blockColor": "fuchsia" + "name": "nc" }, "position": { - "x": 320, + "x": 1128, "y": 312 } }, { - "id": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78", - "type": "basic.output", + "id": "345f71f6-e4e6-4226-b7dd-ea78718c0874", + "type": "basic.outputLabel", "data": { - "name": "" + "name": "d", + "blockColor": "fuchsia" }, "position": { - "x": 1056, - "y": 312 + "x": 288, + "y": 344 } }, { @@ -6773,7 +6750,7 @@ }, "position": { "x": -16, - "y": 352 + "y": 376 } }, { @@ -6785,30 +6762,42 @@ }, "position": { "x": 128, - "y": 352 + "y": 376 } }, { - "id": "345f71f6-e4e6-4226-b7dd-ea78718c0874", + "id": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78", + "type": "basic.output", + "data": { + "name": "" + }, + "position": { + "x": 1128, + "y": 408 + } + }, + { + "id": "33bfbbd9-1b7e-4b73-aa22-20a65d3729dc", "type": "basic.outputLabel", "data": { - "name": "d", + "name": "si", "blockColor": "fuchsia" }, "position": { - "x": 320, - "y": 376 + "x": 288, + "y": 408 } }, { - "id": "816d014e-c403-417c-bc7d-9ea6fcfc86ec", - "type": "basic.output", + "id": "47e3df0e-f0c6-495f-8f19-3615eafd7d5d", + "type": "basic.outputLabel", "data": { - "name": "nc" + "name": "load", + "blockColor": "navy" }, "position": { - "x": 1064, - "y": 448 + "x": 288, + "y": 488 } }, { @@ -6820,7 +6809,7 @@ }, "position": { "x": -16, - "y": 472 + "y": 496 } }, { @@ -6832,30 +6821,30 @@ }, "position": { "x": 128, - "y": 472 + "y": 496 } }, { - "id": "47e3df0e-f0c6-495f-8f19-3615eafd7d5d", - "type": "basic.outputLabel", + "id": "816d014e-c403-417c-bc7d-9ea6fcfc86ec", + "type": "basic.output", "data": { - "name": "load", - "blockColor": "navy" + "name": "nc" }, "position": { - "x": 328, - "y": 520 + "x": 1136, + "y": 496 } }, { - "id": "94ddedd0-b0af-4ae6-b2d6-1b62cbe308b1", - "type": "basic.output", + "id": "a62cf3f6-aa03-42d0-bd0b-0012dc1112b9", + "type": "basic.outputLabel", "data": { - "name": "nc" + "name": "rst", + "blockColor": "red" }, "position": { - "x": 1064, - "y": 552 + "x": 584, + "y": 536 } }, { @@ -6867,7 +6856,7 @@ }, "position": { "x": -8, - "y": 576 + "y": 600 } }, { @@ -6879,7 +6868,18 @@ }, "position": { "x": 128, - "y": 576 + "y": 600 + } + }, + { + "id": "94ddedd0-b0af-4ae6-b2d6-1b62cbe308b1", + "type": "basic.output", + "data": { + "name": "nc" + }, + "position": { + "x": 1136, + "y": 600 } }, { @@ -6891,8 +6891,8 @@ "local": false }, "position": { - "x": 648, - "y": 72 + "x": 864, + "y": 168 } }, { @@ -6903,8 +6903,8 @@ "readonly": true }, "position": { - "x": 624, - "y": 40 + "x": 840, + "y": 128 }, "size": { "width": 208, @@ -6936,7 +6936,7 @@ }, "position": { "x": -8, - "y": 320 + "y": 344 }, "size": { "width": 192, @@ -6951,8 +6951,8 @@ "readonly": true }, "position": { - "x": 1080, - "y": 288 + "x": 1152, + "y": 392 }, "size": { "width": 80, @@ -6967,11 +6967,11 @@ "readonly": true }, "position": { - "x": -16, - "y": -120 + "x": -8, + "y": -72 }, "size": { - "width": 512, + "width": 552, "height": 128 } }, @@ -6983,8 +6983,8 @@ "readonly": true }, "position": { - "x": 1056, - "y": 104 + "x": 1128, + "y": 208 }, "size": { "width": 176, @@ -7000,7 +7000,7 @@ }, "position": { "x": -8, - "y": 440 + "y": 464 }, "size": { "width": 192, @@ -7016,7 +7016,7 @@ }, "position": { "x": 0, - "y": 552 + "y": 576 }, "size": { "width": 192, @@ -7024,47 +7024,51 @@ } }, { - "id": "bd1d463d-ea2f-4dcc-b3f9-a5dffa12d123", - "type": "basic.code", - "data": { - "ports": { - "in": [ - { - "name": "clk" - }, - { - "name": "rst" - }, - { - "name": "si" - }, - { - "name": "d" - }, - { - "name": "load" - } - ], - "out": [ - { - "name": "q" - } - ] - }, - "params": [ - { - "name": "INI" - } - ], - "code": "//-- Initial value\nreg q = INI;\n\nalways @(posedge clk)\nbegin\n \n //-- Reset the circuit\n if (rst == 1'b1)\n q <= INI;\n \n else\n \n //-- When load is active\n //-- the input data is captured\n if (load == 1'b1)\n q <= d;\n else\n //-- if not, the serial input is captured\n q <= si;\n \nend\n" + "id": "10f4227f-a9d4-4a08-95c9-b7d3ab74508c", + "type": "c1653fb9d46cb18a515599972fbcf6692524bc96", + "position": { + "x": 448, + "y": 392 }, + "size": { + "width": 96, + "height": 96 + } + }, + { + "id": "9882f115-c569-4ead-b964-3bcf73e36816", + "type": "c1653fb9d46cb18a515599972fbcf6692524bc96", "position": { - "x": 480, - "y": 176 + "x": 720, + "y": 392 }, "size": { - "width": 424, - "height": 336 + "width": 96, + "height": 96 + } + }, + { + "id": "2b565a91-e761-4286-8cef-a23df5258d9d", + "type": "6b14d5741f7e62a08c61190175d6447b05954bbd", + "position": { + "x": 568, + "y": 336 + }, + "size": { + "width": 96, + "height": 64 + } + }, + { + "id": "2a8bebbd-73c4-4142-b5a4-80311a25952b", + "type": "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284", + "position": { + "x": 856, + "y": 392 + }, + "size": { + "width": 96, + "height": 64 } } ], @@ -7111,68 +7115,102 @@ }, { "source": { - "block": "75de70cb-5830-47f5-8da4-305d1b5a06ef", + "block": "33bfbbd9-1b7e-4b73-aa22-20a65d3729dc", "port": "outlabel" }, "target": { - "block": "bd1d463d-ea2f-4dcc-b3f9-a5dffa12d123", - "port": "clk" + "block": "10f4227f-a9d4-4a08-95c9-b7d3ab74508c", + "port": "a50d1088-061e-4af0-89cd-59567d3904ee" + } + }, + { + "source": { + "block": "345f71f6-e4e6-4226-b7dd-ea78718c0874", + "port": "outlabel" }, - "vertices": [ - { - "x": 432, - "y": 200 - } - ] + "target": { + "block": "10f4227f-a9d4-4a08-95c9-b7d3ab74508c", + "port": "33f6051a-9627-4b08-b821-351edc31a2ad" + } }, { "source": { - "block": "33bfbbd9-1b7e-4b73-aa22-20a65d3729dc", + "block": "47e3df0e-f0c6-495f-8f19-3615eafd7d5d", "port": "outlabel" }, "target": { - "block": "bd1d463d-ea2f-4dcc-b3f9-a5dffa12d123", - "port": "si" + "block": "10f4227f-a9d4-4a08-95c9-b7d3ab74508c", + "port": "1e7e3cd6-ed00-468a-9f7c-0bb91e020dce" } }, { "source": { - "block": "345f71f6-e4e6-4226-b7dd-ea78718c0874", + "block": "6ea26cf0-a872-4d29-b9d6-7f7a97ac18a9", + "port": "out" + }, + "target": { + "block": "1dd10336-2db2-4731-9163-3cff3011667d", + "port": "inlabel" + } + }, + { + "source": { + "block": "a62cf3f6-aa03-42d0-bd0b-0012dc1112b9", "port": "outlabel" }, "target": { - "block": "bd1d463d-ea2f-4dcc-b3f9-a5dffa12d123", - "port": "d" + "block": "9882f115-c569-4ead-b964-3bcf73e36816", + "port": "1e7e3cd6-ed00-468a-9f7c-0bb91e020dce" } }, { "source": { - "block": "47e3df0e-f0c6-495f-8f19-3615eafd7d5d", + "block": "75de70cb-5830-47f5-8da4-305d1b5a06ef", "port": "outlabel" }, "target": { - "block": "bd1d463d-ea2f-4dcc-b3f9-a5dffa12d123", - "port": "load" + "block": "2a8bebbd-73c4-4142-b5a4-80311a25952b", + "port": "3943e194-090b-4553-9df3-88bc4b17abc2" } }, { "source": { - "block": "fd6a999c-e5c2-4490-9623-431d0bec1bac", - "port": "out" + "block": "2a8bebbd-73c4-4142-b5a4-80311a25952b", + "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" }, "target": { - "block": "f1bc73d7-915e-43b7-adff-5cff01cce5fd", - "port": "inlabel" + "block": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78", + "port": "in" } }, { "source": { - "block": "fce2f544-bf03-4df9-b72e-ddf5237474cc", - "port": "outlabel" + "block": "65194b18-5d2a-41b2-bd86-01be99978ad6", + "port": "constant-out" + }, + "target": { + "block": "2a8bebbd-73c4-4142-b5a4-80311a25952b", + "port": "65194b18-5d2a-41b2-bd86-01be99978ad6" + } + }, + { + "source": { + "block": "10f4227f-a9d4-4a08-95c9-b7d3ab74508c", + "port": "56c306d0-95f2-48b3-a0fd-cd7bfb35dce8" + }, + "target": { + "block": "9882f115-c569-4ead-b964-3bcf73e36816", + "port": "a50d1088-061e-4af0-89cd-59567d3904ee" + } + }, + { + "source": { + "block": "9882f115-c569-4ead-b964-3bcf73e36816", + "port": "56c306d0-95f2-48b3-a0fd-cd7bfb35dce8" }, "target": { - "block": "bd1d463d-ea2f-4dcc-b3f9-a5dffa12d123", - "port": "rst" + "block": "2a8bebbd-73c4-4142-b5a4-80311a25952b", + "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" } }, { @@ -7181,17 +7219,261 @@ "port": "constant-out" }, "target": { - "block": "bd1d463d-ea2f-4dcc-b3f9-a5dffa12d123", - "port": "INI" + "block": "2b565a91-e761-4286-8cef-a23df5258d9d", + "port": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4" + }, + "vertices": [ + { + "x": 712, + "y": 264 + } + ] + }, + { + "source": { + "block": "2b565a91-e761-4286-8cef-a23df5258d9d", + "port": "5d443143-4aca-4d4f-ba40-2b88451b86d3" + }, + "target": { + "block": "9882f115-c569-4ead-b964-3bcf73e36816", + "port": "33f6051a-9627-4b08-b821-351edc31a2ad" + }, + "vertices": [ + { + "x": 680, + "y": 392 + } + ] + } + ] + } + } + }, + "c1653fb9d46cb18a515599972fbcf6692524bc96": { + "package": { + "name": "Mux-2-1-verilog", + "version": "0.1", + "description": "2-to-1 Multplexer (1-bit channels). Verilog implementation", + "author": "Juan González-Gómez (Obijuan)", + "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2280.833%22%20height=%22158.56%22%20viewBox=%220%200%2075.781585%20148.65066%22%3E%3Cpath%20d=%22M74.375%2036.836c0-12.691-6.99-24.413-18.326-30.729-11.335-6.316-25.284-6.262-36.568.141C8.198%2012.652%201.304%2024.427%201.407%2037.118v74.415c-.103%2012.69%206.79%2024.466%2018.074%2030.87%2011.284%206.403%2025.233%206.457%2036.568.14%2011.336-6.316%2018.326-18.037%2018.326-30.728z%22%20fill=%22none%22%20stroke=%22#00f%22%20stroke-width=%222.813%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Ctext%20style=%22line-height:125%25%22%20x=%227.448%22%20y=%2291.518%22%20transform=%22matrix(1.00472%200%200%20.9953%2020.25%2033.697)%22%20font-weight=%22400%22%20font-size=%2233.509%22%20font-family=%22sans-serif%22%20letter-spacing=%220%22%20word-spacing=%220%22%3E%3Ctspan%20x=%227.448%22%20y=%2291.518%22%3E0%3C/tspan%3E%3C/text%3E%3Ctext%20style=%22line-height:125%25%22%20x=%227.359%22%20y=%2214.582%22%20transform=%22matrix(1.00472%200%200%20.9953%2020.25%2033.697)%22%20font-weight=%22400%22%20font-size=%2233.509%22%20font-family=%22sans-serif%22%20letter-spacing=%220%22%20word-spacing=%220%22%3E%3Ctspan%20x=%227.359%22%20y=%2214.582%22%3E1%3C/tspan%3E%3C/text%3E%3C/svg%3E", + "otid": 1618922858665 + }, + "design": { + "graph": { + "blocks": [ + { + "id": "33f6051a-9627-4b08-b821-351edc31a2ad", + "type": "basic.input", + "data": { + "name": "1", + "clock": false + }, + "position": { + "x": 320, + "y": -64 + } + }, + { + "id": "a50d1088-061e-4af0-89cd-59567d3904ee", + "type": "basic.input", + "data": { + "name": "0", + "clock": false + }, + "position": { + "x": 320, + "y": 24 + } + }, + { + "id": "56c306d0-95f2-48b3-a0fd-cd7bfb35dce8", + "type": "basic.output", + "data": { + "name": "" + }, + "position": { + "x": 976, + "y": 24 } }, + { + "id": "1e7e3cd6-ed00-468a-9f7c-0bb91e020dce", + "type": "basic.input", + "data": { + "name": "sel", + "clock": false + }, + "position": { + "x": 320, + "y": 112 + } + }, + { + "id": "b64f5610-774d-45c0-bbc6-85b1a6713f43", + "type": "basic.code", + "data": { + "code": "//-- 2-to-1 Multiplexer \n\nassign o = sel ? i1 : i0;", + "params": [], + "ports": { + "in": [ + { + "name": "i1" + }, + { + "name": "i0" + }, + { + "name": "sel" + } + ], + "out": [ + { + "name": "o" + } + ] + } + }, + "position": { + "x": 560, + "y": -80 + }, + "size": { + "width": 304, + "height": 272 + } + } + ], + "wires": [ { "source": { - "block": "bd1d463d-ea2f-4dcc-b3f9-a5dffa12d123", - "port": "q" + "block": "b64f5610-774d-45c0-bbc6-85b1a6713f43", + "port": "o" }, "target": { - "block": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78", + "block": "56c306d0-95f2-48b3-a0fd-cd7bfb35dce8", + "port": "in" + }, + "vertices": [] + }, + { + "source": { + "block": "1e7e3cd6-ed00-468a-9f7c-0bb91e020dce", + "port": "out" + }, + "target": { + "block": "b64f5610-774d-45c0-bbc6-85b1a6713f43", + "port": "sel" + }, + "vertices": [] + }, + { + "source": { + "block": "a50d1088-061e-4af0-89cd-59567d3904ee", + "port": "out" + }, + "target": { + "block": "b64f5610-774d-45c0-bbc6-85b1a6713f43", + "port": "i0" + }, + "vertices": [] + }, + { + "source": { + "block": "33f6051a-9627-4b08-b821-351edc31a2ad", + "port": "out" + }, + "target": { + "block": "b64f5610-774d-45c0-bbc6-85b1a6713f43", + "port": "i1" + }, + "vertices": [] + } + ] + } + } + }, + "6b14d5741f7e62a08c61190175d6447b05954bbd": { + "package": { + "name": "1-bit-gen-constant", + "version": "0.0.2", + "description": "1-bit generic constant (0/1)", + "author": "Juan Gonzalez-Gomez (Obijuan)", + "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22145.608%22%20height=%22247.927%22%20viewBox=%220%200%20136.50729%20232.43134%22%3E%3Cg%20style=%22line-height:0%25;-inkscape-font-specification:'Ubuntu%20Mono'%22%3E%3Cpath%20d=%22M56.012%20146.905q9.055%206.708%2020.459%2017.105%2011.404%2010.062%2022.472%2021.8%2011.403%2011.74%2021.465%2024.15%2010.062%2012.074%2016.1%2022.471h-32.87q-6.372-10.397-15.763-21.13-9.392-11.068-20.124-21.13-10.398-10.062-21.13-18.447-10.398-8.385-18.783-14.087v74.794H0V4.695L27.838%200v141.874q18.447-16.1%2036.894-31.863%2018.447-16.1%2033.205-33.205h32.533q-14.422%2017.106-34.881%2035.217-20.124%2018.112-39.577%2034.882z%22%20style=%22line-height:1.25%22%20font-size=%22335.399%22%20font-weight=%22400%22%20font-family=%22Ubuntu%20Mono%22%20letter-spacing=%220%22%20word-spacing=%220%22%20fill=%22green%22/%3E%3C/g%3E%3C/svg%3E" + }, + "design": { + "graph": { + "blocks": [ + { + "id": "5d443143-4aca-4d4f-ba40-2b88451b86d3", + "type": "basic.output", + "data": { + "name": "" + }, + "position": { + "x": 960, + "y": 248 + } + }, + { + "id": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", + "type": "basic.constant", + "data": { + "name": "", + "value": "0", + "local": false + }, + "position": { + "x": 728, + "y": 128 + } + }, + { + "id": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", + "type": "basic.code", + "data": { + "code": "assign k = VALUE;", + "params": [ + { + "name": "VALUE" + } + ], + "ports": { + "in": [], + "out": [ + { + "name": "k" + } + ] + } + }, + "position": { + "x": 672, + "y": 248 + }, + "size": { + "width": 208, + "height": 64 + } + } + ], + "wires": [ + { + "source": { + "block": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", + "port": "constant-out" + }, + "target": { + "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", + "port": "VALUE" + } + }, + { + "source": { + "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", + "port": "k" + }, + "target": { + "block": "5d443143-4aca-4d4f-ba40-2b88451b86d3", "port": "in" } }