diff --git a/examples/02-Sys-DFF-delay/Alhambra-II/02-Sys-DFF-delay.ice b/examples/02-Sys-DFF-delay/Alhambra-II/02-Sys-DFF-delay.ice index d081b8c..93f973a 100644 --- a/examples/02-Sys-DFF-delay/Alhambra-II/02-Sys-DFF-delay.ice +++ b/examples/02-Sys-DFF-delay/Alhambra-II/02-Sys-DFF-delay.ice @@ -42,8 +42,8 @@ ] }, "position": { - "x": 1496, - "y": 272 + "x": 1368, + "y": 320 } }, { @@ -59,18 +59,6 @@ "y": 280 } }, - { - "id": "62de8e9e-0501-4330-862f-ccbf2af46044", - "type": "db33ba62b645fbf5ad349b666b64662512b13cdd", - "position": { - "x": 648, - "y": 376 - }, - "size": { - "width": 96, - "height": 64 - } - }, { "id": "304702e1-1d61-4553-8266-250f3462a605", "type": "basic.info", @@ -79,8 +67,8 @@ "readonly": true }, "position": { - "x": 536, - "y": 88 + "x": 432, + "y": 96 }, "size": { "width": 1048, @@ -119,8 +107,8 @@ "id": "4852fe59-4478-42e7-8c79-5e2864e6712f", "type": "c2cf3dc743e8e6bcf2a82ac9781eb9129e1ff0b2", "position": { - "x": 1312, - "y": 304 + "x": 1184, + "y": 352 }, "size": { "width": 96, @@ -135,8 +123,8 @@ "readonly": true }, "position": { - "x": 1296, - "y": 416 + "x": 1168, + "y": 464 }, "size": { "width": 184, @@ -167,8 +155,8 @@ "readonly": true }, "position": { - "x": 1608, - "y": 296 + "x": 1480, + "y": 344 }, "size": { "width": 104, @@ -183,38 +171,14 @@ "readonly": true }, "position": { - "x": 1456, - "y": 200 + "x": 1328, + "y": 248 }, "size": { "width": 264, "height": 56 } }, - { - "id": "950025ba-e779-4350-b20b-06bfa3f57196", - "type": "db33ba62b645fbf5ad349b666b64662512b13cdd", - "position": { - "x": 888, - "y": 360 - }, - "size": { - "width": 96, - "height": 64 - } - }, - { - "id": "0854b8d8-a64f-4814-a08d-c4319d23ee75", - "type": "db33ba62b645fbf5ad349b666b64662512b13cdd", - "position": { - "x": 1056, - "y": 344 - }, - "size": { - "width": 96, - "height": 64 - } - }, { "id": "1496abb9-c94c-4496-8e98-54d4a3a2b1a2", "type": "basic.info", @@ -223,8 +187,8 @@ "readonly": true }, "position": { - "x": 912, - "y": 432 + "x": 856, + "y": 448 }, "size": { "width": 96, @@ -239,8 +203,8 @@ "readonly": true }, "position": { - "x": 1080, - "y": 416 + "x": 1016, + "y": 448 }, "size": { "width": 96, @@ -255,13 +219,49 @@ "readonly": true }, "position": { - "x": 952, - "y": 280 + "x": 896, + "y": 296 }, "size": { "width": 200, "height": 56 } + }, + { + "id": "281b5e8b-d0c6-47eb-b4da-683e7998bcbd", + "type": "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284", + "position": { + "x": 1000, + "y": 376 + }, + "size": { + "width": 96, + "height": 64 + } + }, + { + "id": "a736ab78-48d3-4fb4-9e96-85bf7e1317ec", + "type": "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284", + "position": { + "x": 832, + "y": 376 + }, + "size": { + "width": 96, + "height": 64 + } + }, + { + "id": "1f5deb5d-e721-4732-b37d-c5e1a8450ea5", + "type": "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284", + "position": { + "x": 648, + "y": 376 + }, + "size": { + "width": 96, + "height": 64 + } } ], "wires": [ @@ -271,7 +271,7 @@ "port": "3d584b0a-29eb-47af-8c43-c0822282ef05" }, "target": { - "block": "62de8e9e-0501-4330-862f-ccbf2af46044", + "block": "1f5deb5d-e721-4732-b37d-c5e1a8450ea5", "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" } }, @@ -281,7 +281,7 @@ "port": "constant-out" }, "target": { - "block": "62de8e9e-0501-4330-862f-ccbf2af46044", + "block": "1f5deb5d-e721-4732-b37d-c5e1a8450ea5", "port": "65194b18-5d2a-41b2-bd86-01be99978ad6" } }, @@ -298,258 +298,38 @@ }, { "source": { - "block": "62de8e9e-0501-4330-862f-ccbf2af46044", - "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" - }, - "target": { - "block": "950025ba-e779-4350-b20b-06bfa3f57196", - "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" - } - }, - { - "source": { - "block": "950025ba-e779-4350-b20b-06bfa3f57196", + "block": "1f5deb5d-e721-4732-b37d-c5e1a8450ea5", "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" }, "target": { - "block": "0854b8d8-a64f-4814-a08d-c4319d23ee75", + "block": "a736ab78-48d3-4fb4-9e96-85bf7e1317ec", "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" } }, { "source": { - "block": "0854b8d8-a64f-4814-a08d-c4319d23ee75", - "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" - }, - "target": { - "block": "4852fe59-4478-42e7-8c79-5e2864e6712f", - "port": "adf3a6ae-71e2-43dd-b504-c2cdbc14dab7" - } - } - ] - } - }, - "dependencies": { - "db33ba62b645fbf5ad349b666b64662512b13cdd": { - "package": { - "name": "sys-DFF", - "version": "2.1", - "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" - }, - "design": { - "graph": { - "blocks": [ - { - "id": "3943e194-090b-4553-9df3-88bc4b17abc2", - "type": "basic.input", - "data": { - "name": "", - "clock": true - }, - "position": { - "x": 208, - "y": 160 - } - }, - { - "id": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78", - "type": "basic.output", - "data": { - "name": "" - }, - "position": { - "x": 816, - "y": 224 - } - }, - { - "id": "bf2f0c53-2d04-4cba-aa70-2df85502d24f", - "type": "basic.input", - "data": { - "name": "", - "clock": false - }, - "position": { - "x": 208, - "y": 304 - } - }, - { - "id": "65194b18-5d2a-41b2-bd86-01be99978ad6", - "type": "basic.constant", - "data": { - "name": "", - "value": "0", - "local": false - }, - "position": { - "x": 512, - "y": 64 - } - }, - { - "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;", - "params": [ - { - "name": "INI" - } - ], - "ports": { - "in": [ - { - "name": "clk" - }, - { - "name": "d" - } - ], - "out": [ - { - "name": "q" - } - ] - } - }, - "position": { - "x": 384, - "y": 168 - }, - "size": { - "width": 344, - "height": 176 - } - }, - { - "id": "53d11290-50b3-40fb-b253-222cb296b075", - "type": "basic.info", - "data": { - "info": "Parameter: Initial value", - "readonly": true - }, - "position": { - "x": 488, - "y": 32 - }, - "size": { - "width": 208, - "height": 40 - } - }, - { - "id": "c25a29cd-d5ed-435e-b375-e6d5557660d8", - "type": "basic.info", - "data": { - "info": "System clock", - "readonly": true - }, - "position": { - "x": 208, - "y": 136 - }, - "size": { - "width": 120, - "height": 32 - } - }, - { - "id": "ecafc6fa-330b-4ba7-aa67-40b3ea48f1f1", - "type": "basic.info", - "data": { - "info": "Input data", - "readonly": true - }, - "position": { - "x": 224, - "y": 280 - }, - "size": { - "width": 112, - "height": 40 - } - }, - { - "id": "df95c331-682d-4733-a62d-ad9fcd75f96a", - "type": "basic.info", - "data": { - "info": "Output", - "readonly": true - }, - "position": { - "x": 840, - "y": 200 - }, - "size": { - "width": 80, - "height": 40 - } - }, - { - "id": "dd8217df-b56d-49a9-ae94-f5e0c96e1460", - "type": "basic.info", - "data": { - "info": "# D Flip-Flop (system)\n\nIt stores the input data that arrives at cycle n \nIts output is shown in the cycle n+1", - "readonly": true - }, - "position": { - "x": 144, - "y": -136 - }, - "size": { - "width": 488, - "height": 104 - } - } - ], - "wires": [ - { - "source": { - "block": "3943e194-090b-4553-9df3-88bc4b17abc2", - "port": "out" - }, - "target": { - "block": "bdc170f0-4468-4137-bd79-4624c9cadf2b", - "port": "clk" - } - }, - { - "source": { - "block": "bdc170f0-4468-4137-bd79-4624c9cadf2b", - "port": "q" - }, - "target": { - "block": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78", - "port": "in" - } - }, - { - "source": { - "block": "65194b18-5d2a-41b2-bd86-01be99978ad6", - "port": "constant-out" - }, - "target": { - "block": "bdc170f0-4468-4137-bd79-4624c9cadf2b", - "port": "INI" - } - }, - { - "source": { - "block": "bf2f0c53-2d04-4cba-aa70-2df85502d24f", - "port": "out" - }, - "target": { - "block": "bdc170f0-4468-4137-bd79-4624c9cadf2b", - "port": "d" - } - } - ] + "block": "a736ab78-48d3-4fb4-9e96-85bf7e1317ec", + "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" + }, + "target": { + "block": "281b5e8b-d0c6-47eb-b4da-683e7998bcbd", + "port": "bf2f0c53-2d04-4cba-aa70-2df85502d24f" + } + }, + { + "source": { + "block": "281b5e8b-d0c6-47eb-b4da-683e7998bcbd", + "port": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78" + }, + "target": { + "block": "4852fe59-4478-42e7-8c79-5e2864e6712f", + "port": "adf3a6ae-71e2-43dd-b504-c2cdbc14dab7" + } } - } - }, + ] + } + }, + "dependencies": { "d30ca9ee4f35f6cb76d5e5701447fc2b739bc640": { "package": { "name": "bit-0", @@ -6171,6 +5951,253 @@ ] } } + }, + "58ed2b5c7e33e2f215ccba6c101d9ea4ff60f284": { + "package": { + "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" + }, + "design": { + "graph": { + "blocks": [ + { + "id": "54dbabeb-8aef-4184-8fdc-87528aca29a3", + "type": "basic.output", + "data": { + "name": "nc" + }, + "position": { + "x": 816, + "y": 112 + } + }, + { + "id": "3943e194-090b-4553-9df3-88bc4b17abc2", + "type": "basic.input", + "data": { + "name": "", + "clock": true + }, + "position": { + "x": 208, + "y": 184 + } + }, + { + "id": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78", + "type": "basic.output", + "data": { + "name": "" + }, + "position": { + "x": 816, + "y": 232 + } + }, + { + "id": "bf2f0c53-2d04-4cba-aa70-2df85502d24f", + "type": "basic.input", + "data": { + "name": "", + "clock": false + }, + "position": { + "x": 208, + "y": 280 + } + }, + { + "id": "65194b18-5d2a-41b2-bd86-01be99978ad6", + "type": "basic.constant", + "data": { + "name": "", + "value": "0", + "local": false + }, + "position": { + "x": 512, + "y": 64 + } + }, + { + "id": "bdc170f0-4468-4137-bd79-4624c9cadf2b", + "type": "basic.code", + "data": { + "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" + } + ], + "ports": { + "in": [ + { + "name": "clk" + }, + { + "name": "d" + } + ], + "out": [ + { + "name": "q" + } + ] + } + }, + "position": { + "x": 384, + "y": 168 + }, + "size": { + "width": 352, + "height": 192 + } + }, + { + "id": "53d11290-50b3-40fb-b253-222cb296b075", + "type": "basic.info", + "data": { + "info": "Parameter: Initial value", + "readonly": true + }, + "position": { + "x": 488, + "y": 32 + }, + "size": { + "width": 208, + "height": 40 + } + }, + { + "id": "c25a29cd-d5ed-435e-b375-e6d5557660d8", + "type": "basic.info", + "data": { + "info": "System clock", + "readonly": true + }, + "position": { + "x": 208, + "y": 160 + }, + "size": { + "width": 120, + "height": 32 + } + }, + { + "id": "ecafc6fa-330b-4ba7-aa67-40b3ea48f1f1", + "type": "basic.info", + "data": { + "info": "Input data", + "readonly": true + }, + "position": { + "x": 224, + "y": 256 + }, + "size": { + "width": 112, + "height": 40 + } + }, + { + "id": "df95c331-682d-4733-a62d-ad9fcd75f96a", + "type": "basic.info", + "data": { + "info": "Output", + "readonly": true + }, + "position": { + "x": 840, + "y": 200 + }, + "size": { + "width": 80, + "height": 40 + } + }, + { + "id": "dd8217df-b56d-49a9-ae94-f5e0c96e1460", + "type": "basic.info", + "data": { + "info": "# D Flip-Flop (system)\n\nIt stores the input data that arrives at cycle n \nIts output is shown in the cycle n+1", + "readonly": true + }, + "position": { + "x": 144, + "y": -136 + }, + "size": { + "width": 488, + "height": 104 + } + }, + { + "id": "92bfbcf5-6016-4ad8-963c-c5c7747304d0", + "type": "basic.info", + "data": { + "info": "Not connected", + "readonly": true + }, + "position": { + "x": 808, + "y": 88 + }, + "size": { + "width": 176, + "height": 32 + } + } + ], + "wires": [ + { + "source": { + "block": "3943e194-090b-4553-9df3-88bc4b17abc2", + "port": "out" + }, + "target": { + "block": "bdc170f0-4468-4137-bd79-4624c9cadf2b", + "port": "clk" + } + }, + { + "source": { + "block": "bdc170f0-4468-4137-bd79-4624c9cadf2b", + "port": "q" + }, + "target": { + "block": "aa84d31e-cd92-44c7-bb38-c7a4cd903a78", + "port": "in" + } + }, + { + "source": { + "block": "65194b18-5d2a-41b2-bd86-01be99978ad6", + "port": "constant-out" + }, + "target": { + "block": "bdc170f0-4468-4137-bd79-4624c9cadf2b", + "port": "INI" + } + }, + { + "source": { + "block": "bf2f0c53-2d04-4cba-aa70-2df85502d24f", + "port": "out" + }, + "target": { + "block": "bdc170f0-4468-4137-bd79-4624c9cadf2b", + "port": "d" + } + } + ] + } + } } } } \ No newline at end of file