From 411295e33ac78e8643487d637ca5ebd0c84c26f6 Mon Sep 17 00:00:00 2001 From: obijuan Date: Sun, 15 May 2022 17:11:11 +0200 Subject: [PATCH] ADC: Examples 1 and 2 updated to the new ADC version --- examples/ADC/01-Potentiometer-LEDs.ice | 116 +- examples/ADC/02-Potentiometer-serial.ice | 1416 ++++++++++++---------- 2 files changed, 856 insertions(+), 676 deletions(-) diff --git a/examples/ADC/01-Potentiometer-LEDs.ice b/examples/ADC/01-Potentiometer-LEDs.ice index 81aac23..daf78b7 100644 --- a/examples/ADC/01-Potentiometer-LEDs.ice +++ b/examples/ADC/01-Potentiometer-LEDs.ice @@ -8,7 +8,7 @@ "image": "" }, "design": { - "board": "icezum", + "board": "alhambra-ii", "graph": { "blocks": [ { @@ -20,7 +20,7 @@ { "index": "0", "name": "ADC_SDA", - "value": "90" + "value": "83" } ], "virtual": false, @@ -40,7 +40,7 @@ { "index": "0", "name": "ADC_SCL", - "value": "91" + "value": "84" } ], "virtual": false @@ -60,42 +60,42 @@ { "index": "7", "name": "LED7", - "value": "104" + "value": "37" }, { "index": "6", "name": "LED6", - "value": "102" + "value": "38" }, { "index": "5", "name": "LED5", - "value": "101" + "value": "39" }, { "index": "4", "name": "LED4", - "value": "99" + "value": "41" }, { "index": "3", "name": "LED3", - "value": "98" + "value": "42" }, { "index": "2", "name": "LED2", - "value": "97" + "value": "43" }, { "index": "1", "name": "LED1", - "value": "96" + "value": "44" }, { "index": "0", "name": "LED0", - "value": "95" + "value": "45" } ], "virtual": false @@ -155,7 +155,7 @@ }, "position": { "x": -1696, - "y": -416 + "y": -424 }, "size": { "width": 136, @@ -452,7 +452,7 @@ "0851e7c0bc752c07a32e339ef30176e3180dca90": { "package": { "name": "adc", - "version": "0.1", + "version": "0.2", "description": "Analog-to-digital-converter", "author": "Juan Gonzalez-Gomez (Obiuan)", "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20id=%22Ebene_1%22%20width=%22272.885%22%20height=%22360.534%22%20viewBox=%220%200%20272.88513%20360.53439%22%3E%3Cdefs%20id=%22defs25%22%3E%3Cmarker%20id=%22TriangleOutM%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M2.308%200l-3.46%202v-4z%22%20id=%22path972%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854-6%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend-5%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836-3%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleOutM-7%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path972-5%22%20d=%22M2.308%200l-3.46%202v-4z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-3%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-5%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-6%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-2%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-3-9%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-6-1%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-5-2%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-3-7%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cdefs%20id=%22defs3%22%3E%3Cpath%20id=%22a%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3C/defs%3E%3Cpath%20id=%22path880%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3Cmarker%20id=%22TriangleInM%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-2.308%200l3.46-2v4z%22%20id=%22path4321%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22EmptyTriangleInM%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-.508%200l3.46-2v4z%22%20id=%22path4339%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22TriangleOutM-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M2.308%200l-3.46%202v-4z%22%20id=%22path4297%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22marker4456%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path4458%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22marker4428%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path4430%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-67%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path4179%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cpath%20id=%22path919%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3Cpath%20id=%22path998%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleOutM-4%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path972-7%22%20d=%22M2.308%200l-3.46%202v-4z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-2%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-4%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-0%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-62%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-3-99%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-6-0%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-5-8%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-3-1%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22TriangleOutM-7-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M2.308%200l-3.46%202v-4z%22%20id=%22path972-5-1%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend-3-1%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836-5-0%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-6-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854-2-4%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-3-9-0%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854-6-1-3%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend-5-2-9%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836-3-7-1%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cdefs%20id=%22defs3-9%22%3E%3Cpath%20d=%22M-58.3-45h653.6v640H-58.3z%22%20id=%22a-6%22/%3E%3C/defs%3E%3Cpath%20d=%22M-58.3-45h653.6v640H-58.3z%22%20id=%22path880-9%22/%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleInM-3%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4321-3%22%20d=%22M-2.308%200l3.46-2v4z%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22EmptyTriangleInM-8%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4339-0%22%20d=%22M-.508%200l3.46-2v4z%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleOutM-3-5%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4297-6%22%20d=%22M2.308%200l-3.46%202v-4z%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22marker4456-6%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4458-4%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22marker4428-0%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4430-0%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-67-4%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4179-6%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cpath%20d=%22M-58.3-45h653.6v640H-58.3z%22%20id=%22path1228%22/%3E%3C/defs%3E%3Ctitle%20id=%22title2%22%3EAnalogsignal%3C/title%3E%3Cg%20id=%22g6%22%20transform=%22matrix(2.66197%200%200%20-2.6081%20-266.143%20348.922)%22%20fill=%22#ff0%22%20stroke-width=%22.631%22%20stroke-linecap=%22round%22%3E%3Cpath%20id=%22path4%22%20d=%22M136.595%2057.528l14.719-12.747%2014.663%2012.747m-6.246-3.93v17.136h-15.754V53.598z%22/%3E%3C/g%3E%3Cg%20id=%22g992-3%22%20transform=%22matrix(2.49948%200%200%202.49948%20-213.902%20137.88)%22%20stroke-width=%221.526%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%22%20id=%22path992-2-6%22%20fill=%22#ececec%22%20stroke-width=%22.929%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20id=%22path1773-2-3-1-8-9-7%22%20d=%22M106.978%2082.142h-3.353V63.316H97.54v18.678h-3.652%22%20fill=%22none%22%20stroke-width=%222.322%22/%3E%3C/g%3E%3Cpath%20id=%22path10%22%20d=%22M7.61%2080.976C14.27%2036.763%2021.114-7.26%2027.77%205.32c6.846%2012.575%2011.841%20145.026%2020.35%20151.315%208.324%206.291%2021.83-109.323%2030.34-113.58%208.324-4.066%2011.838%2094.531%2020.16%2088.238%208.512-6.288%2022.015-130.229%2030.337-125.973%208.51%204.253%2011.84%20149.098%2020.351%20151.315%208.326%202.037%2020.163-136.516%2030.339-138.738%209.99-2.034%2020.161%20119.69%2030.337%20125.978%2010.174%206.473%2023.676-79.732%2030.335-88.053%206.662-8.509%206.662%2031.447%2010.177%2037.734%203.33%206.293%206.66%203.147%209.99%200%22%20stroke-miterlimit=%2210%22%20fill=%22none%22%20stroke=%22#00f%22%20stroke-width=%226.281%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Ctext%20style=%22line-height:1.25;-inkscape-font-specification:ubuntu;text-align:center%22%20x=%22131.832%22%20y=%22272.84%22%20id=%22text849%22%20font-weight=%22400%22%20font-size=%2247.637%22%20font-family=%22ubuntu%22%20letter-spacing=%220%22%20word-spacing=%220%22%20text-anchor=%22middle%22%20stroke-width=%221.662%22%20stroke-linecap=%22round%22%3E%3Ctspan%20id=%22tspan847%22%20x=%22131.832%22%20y=%22272.84%22%20style=%22-inkscape-font-specification:'ubuntu%20Medium'%22%20font-weight=%22500%22%20stroke-width=%22.928%22%20fill=%22green%22%3E01001100%3C/tspan%3E%3C/text%3E%3Cstyle%20id=%22style2%22%3E.st0%7Bdisplay:none%7D.st1%7Bfill:none;stroke:#303030;stroke-width:.7;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10%7D.st2%7Bfill:#303030%7D%3C/style%3E%3Cg%20id=%22g992-3-2%22%20transform=%22matrix(2.49948%200%200%202.49948%20-16.118%20138.484)%22%20stroke-width=%221.526%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%22%20id=%22path992-2-6-67%22%20fill=%22#ececec%22%20stroke-width=%22.929%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20id=%22path1773-2-3-1-8-9-7-5%22%20d=%22M106.978%2082.142h-3.353V63.316H97.54v18.678h-3.652%22%20fill=%22none%22%20stroke-width=%222.322%22/%3E%3C/g%3E%3Ctext%20style=%22line-height:1.25;-inkscape-font-specification:ubuntu;text-align:center%22%20x=%22133.042%22%20y=%22334.844%22%20id=%22text849-6%22%20font-weight=%22400%22%20font-size=%2247.637%22%20font-family=%22ubuntu%22%20letter-spacing=%220%22%20word-spacing=%220%22%20text-anchor=%22middle%22%20stroke-width=%221.662%22%20stroke-linecap=%22round%22%3E%3Ctspan%20id=%22tspan847-9%22%20x=%22133.042%22%20y=%22334.844%22%20style=%22-inkscape-font-specification:'ubuntu%20Medium'%22%20font-weight=%22500%22%20stroke-width=%22.928%22%3EADC%3C/tspan%3E%3C/text%3E%3C/svg%3E" @@ -6350,6 +6350,18 @@ "width": 232, "height": 88 } + }, + { + "id": "dd7847f3-ea23-454b-a234-13b78250d000", + "type": "d30ca9ee4f35f6cb76d5e5701447fc2b739bc640", + "position": { + "x": 592, + "y": 312 + }, + "size": { + "width": 96, + "height": 64 + } } ], "wires": [ @@ -6595,6 +6607,22 @@ "y": 464 } ] + }, + { + "source": { + "block": "dd7847f3-ea23-454b-a234-13b78250d000", + "port": "3d584b0a-29eb-47af-8c43-c0822282ef05" + }, + "target": { + "block": "17946732-21fc-48c5-93f3-e9d1ad735480", + "port": "743b5299-2d89-4783-b7c9-12a5b36df406" + }, + "vertices": [ + { + "x": 744, + "y": 360 + } + ] } ] } @@ -6948,6 +6976,68 @@ } } }, + "d30ca9ee4f35f6cb76d5e5701447fc2b739bc640": { + "package": { + "name": "bit-0", + "version": "0.2", + "description": "Constant bit 0", + "author": "Jesus Arroyo", + "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22125.776%22%20height=%22197.727%22%20viewBox=%220%200%20110.54641%20173.78236%22%3E%3Cpath%20d=%22M69.664%20107.353l13.494%2029.374L70.719%20168.5l13.788%204.283m-42.761-62.916S38.148%20136.825%2033.22%20139C28.298%20141.18%201%20161.403%201%20161.403l8.729%2010.636%22%20fill=%22none%22%20stroke=%22green%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cg%20style=%22line-height:0%25%22%3E%3Cpath%20d=%22M65.536%2024.562q-9.493%200-15.876%208.251-6.303%208.156-8.855%2023.604-2.553%2015.448%201.037%2023.7%203.59%208.155%2013.084%208.155%209.334%200%2015.636-8.155%206.383-8.252%208.936-23.7%202.553-15.448-1.037-23.604-3.59-8.251-12.925-8.251zm4.07-24.564q23.056%200%2033.507%2014.969%2010.53%2014.968%206.143%2041.45-4.388%2026.482-19.865%2041.45-15.478%2014.968-38.534%2014.968-23.136%200-33.667-14.968Q6.659%2082.9%2011.047%2056.417q4.387-26.482%2019.865-41.45Q46.469-.002%2069.605-.002z%22%20style=%22line-height:1.25;-inkscape-font-specification:'sans-serif%20Bold%20Italic'%22%20font-style=%22italic%22%20font-weight=%22700%22%20font-size=%22179.184%22%20font-family=%22sans-serif%22%20letter-spacing=%220%22%20word-spacing=%220%22%20fill=%22green%22/%3E%3C/g%3E%3C/svg%3E" + }, + "design": { + "graph": { + "blocks": [ + { + "id": "3d584b0a-29eb-47af-8c43-c0822282ef05", + "type": "basic.output", + "data": { + "name": "" + }, + "position": { + "x": 456, + "y": 120 + } + }, + { + "id": "61331ec5-2c56-4cdd-b607-e63b1502fa65", + "type": "basic.code", + "data": { + "code": "//-- Constant bit-0\nassign q = 1'b0;\n\n", + "params": [], + "ports": { + "in": [], + "out": [ + { + "name": "q" + } + ] + } + }, + "position": { + "x": 168, + "y": 112 + }, + "size": { + "width": 248, + "height": 80 + } + } + ], + "wires": [ + { + "source": { + "block": "61331ec5-2c56-4cdd-b607-e63b1502fa65", + "port": "q" + }, + "target": { + "block": "3d584b0a-29eb-47af-8c43-c0822282ef05", + "port": "in" + } + } + ] + } + } + }, "3e4cef8e5d182ddc9806ac0f5a9ee24351737373": { "package": { "name": "i2c-stop", diff --git a/examples/ADC/02-Potentiometer-serial.ice b/examples/ADC/02-Potentiometer-serial.ice index 7301884..d8295b9 100644 --- a/examples/ADC/02-Potentiometer-serial.ice +++ b/examples/ADC/02-Potentiometer-serial.ice @@ -8,7 +8,7 @@ "image": "" }, "design": { - "board": "icezum", + "board": "alhambra-ii", "graph": { "blocks": [ { @@ -20,7 +20,7 @@ { "index": "0", "name": "ADC_SDA", - "value": "90" + "value": "83" } ], "virtual": false, @@ -40,7 +40,7 @@ { "index": "0", "name": "ADC_SCL", - "value": "91" + "value": "84" } ], "virtual": false @@ -60,42 +60,42 @@ { "index": "7", "name": "LED7", - "value": "104" + "value": "37" }, { "index": "6", "name": "LED6", - "value": "102" + "value": "38" }, { "index": "5", "name": "LED5", - "value": "101" + "value": "39" }, { "index": "4", "name": "LED4", - "value": "99" + "value": "41" }, { "index": "3", "name": "LED3", - "value": "98" + "value": "42" }, { "index": "2", "name": "LED2", - "value": "97" + "value": "43" }, { "index": "1", "name": "LED1", - "value": "96" + "value": "44" }, { "index": "0", "name": "LED0", - "value": "95" + "value": "45" } ], "virtual": false @@ -114,7 +114,7 @@ { "index": "0", "name": "TX", - "value": "8" + "value": "61" } ], "virtual": false @@ -213,18 +213,6 @@ "height": 56 } }, - { - "id": "1aa1089f-d81a-4699-a162-c100423720b6", - "type": "0851e7c0bc752c07a32e339ef30176e3180dca90", - "position": { - "x": -1872, - "y": -312 - }, - "size": { - "width": 96, - "height": 128 - } - }, { "id": "219023e3-d4b1-4ed0-9c5d-e93d6df062a3", "type": "18fd28fbb97a4fd982053988e015aa934dcd6014", @@ -312,6 +300,18 @@ "width": 192, "height": 40 } + }, + { + "id": "cbfa6bc7-4672-495d-9d6a-9f9d8fdce777", + "type": "fe216fc3f7e19209c184579380d23a46cb3ac1b5", + "position": { + "x": -1872, + "y": -312 + }, + "size": { + "width": 96, + "height": 128 + } } ], "wires": [ @@ -327,76 +327,69 @@ }, { "source": { - "block": "219023e3-d4b1-4ed0-9c5d-e93d6df062a3", - "port": "6a253ddf-22b2-43cd-ba6f-561bd1af6970" + "block": "87d6687f-566a-4394-a0a0-4fb3ae8357d5", + "port": "09701eaa-8d79-487f-b003-267e04095bb1" }, "target": { - "block": "1aa1089f-d81a-4699-a162-c100423720b6", - "port": "09a84e89-0e4a-43cc-a5b9-6c8ac6ce5742" - }, - "size": 2 + "block": "b498075f-0835-4151-ad0a-bb14792dc9a5", + "port": "in" + } }, { "source": { - "block": "6901f9c0-d7de-4616-ac84-4fd92cc1d12f", - "port": "c138a610-b61f-4e7c-bb8a-c4f3b0b9f95c" + "block": "cbfa6bc7-4672-495d-9d6a-9f9d8fdce777", + "port": "2dd424a5-e616-4505-8a89-4982cdd7539d" }, "target": { - "block": "1aa1089f-d81a-4699-a162-c100423720b6", - "port": "bfc6f0ec-0d3a-4caa-9d40-9f4e8f59f112" - } + "block": "2dd424a5-e616-4505-8a89-4982cdd7539d", + "port": "in" + }, + "size": 8 }, { "source": { - "block": "2be9e09c-41a7-4b56-b5c9-ce8d03fceb0a", - "port": "out" + "block": "cbfa6bc7-4672-495d-9d6a-9f9d8fdce777", + "port": "43bc16ab-b91d-405c-bef0-887bd1a85fd7" }, "target": { - "block": "1aa1089f-d81a-4699-a162-c100423720b6", - "port": "2be9e09c-41a7-4b56-b5c9-ce8d03fceb0a" + "block": "43bc16ab-b91d-405c-bef0-887bd1a85fd7", + "port": "in" } }, { "source": { - "block": "1aa1089f-d81a-4699-a162-c100423720b6", - "port": "43bc16ab-b91d-405c-bef0-887bd1a85fd7" + "block": "2be9e09c-41a7-4b56-b5c9-ce8d03fceb0a", + "port": "out" }, "target": { - "block": "43bc16ab-b91d-405c-bef0-887bd1a85fd7", - "port": "in" + "block": "cbfa6bc7-4672-495d-9d6a-9f9d8fdce777", + "port": "2be9e09c-41a7-4b56-b5c9-ce8d03fceb0a" } }, { "source": { - "block": "1aa1089f-d81a-4699-a162-c100423720b6", - "port": "2dd424a5-e616-4505-8a89-4982cdd7539d" + "block": "219023e3-d4b1-4ed0-9c5d-e93d6df062a3", + "port": "6a253ddf-22b2-43cd-ba6f-561bd1af6970" }, "target": { - "block": "2dd424a5-e616-4505-8a89-4982cdd7539d", - "port": "in" + "block": "cbfa6bc7-4672-495d-9d6a-9f9d8fdce777", + "port": "09a84e89-0e4a-43cc-a5b9-6c8ac6ce5742" }, - "size": 8 + "size": 2 }, { "source": { - "block": "1aa1089f-d81a-4699-a162-c100423720b6", - "port": "2dd424a5-e616-4505-8a89-4982cdd7539d" + "block": "6901f9c0-d7de-4616-ac84-4fd92cc1d12f", + "port": "c138a610-b61f-4e7c-bb8a-c4f3b0b9f95c" }, "target": { - "block": "87d6687f-566a-4394-a0a0-4fb3ae8357d5", - "port": "27183891-b385-412b-bc55-21df1dd0280e" - }, - "vertices": [ - { - "x": -1696, - "y": -144 - } - ], - "size": 8 + "block": "cbfa6bc7-4672-495d-9d6a-9f9d8fdce777", + "port": "bfc6f0ec-0d3a-4caa-9d40-9f4e8f59f112" + } }, { "source": { - "block": "1aa1089f-d81a-4699-a162-c100423720b6", + "block": "cbfa6bc7-4672-495d-9d6a-9f9d8fdce777", "port": "f4f0b0cc-6b11-417f-b8de-933dd739752b" }, "target": { @@ -406,19 +399,26 @@ "vertices": [ { "x": -1744, - "y": -120 + "y": -112 } ] }, { "source": { - "block": "87d6687f-566a-4394-a0a0-4fb3ae8357d5", - "port": "09701eaa-8d79-487f-b003-267e04095bb1" + "block": "cbfa6bc7-4672-495d-9d6a-9f9d8fdce777", + "port": "2dd424a5-e616-4505-8a89-4982cdd7539d" }, "target": { - "block": "b498075f-0835-4151-ad0a-bb14792dc9a5", - "port": "in" - } + "block": "87d6687f-566a-4394-a0a0-4fb3ae8357d5", + "port": "27183891-b385-412b-bc55-21df1dd0280e" + }, + "vertices": [ + { + "x": -1696, + "y": -160 + } + ], + "size": 8 } ] } @@ -539,152 +539,540 @@ } } }, - "0851e7c0bc752c07a32e339ef30176e3180dca90": { + "18fd28fbb97a4fd982053988e015aa934dcd6014": { "package": { - "name": "adc", - "version": "0.1", - "description": "Analog-to-digital-converter", - "author": "Juan Gonzalez-Gomez (Obiuan)", - "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20id=%22Ebene_1%22%20width=%22272.885%22%20height=%22360.534%22%20viewBox=%220%200%20272.88513%20360.53439%22%3E%3Cdefs%20id=%22defs25%22%3E%3Cmarker%20id=%22TriangleOutM%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M2.308%200l-3.46%202v-4z%22%20id=%22path972%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854-6%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend-5%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836-3%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleOutM-7%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path972-5%22%20d=%22M2.308%200l-3.46%202v-4z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-3%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-5%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-6%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-2%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-3-9%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-6-1%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-5-2%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-3-7%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cdefs%20id=%22defs3%22%3E%3Cpath%20id=%22a%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3C/defs%3E%3Cpath%20id=%22path880%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3Cmarker%20id=%22TriangleInM%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-2.308%200l3.46-2v4z%22%20id=%22path4321%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22EmptyTriangleInM%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-.508%200l3.46-2v4z%22%20id=%22path4339%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22TriangleOutM-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M2.308%200l-3.46%202v-4z%22%20id=%22path4297%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22marker4456%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path4458%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22marker4428%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path4430%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-67%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path4179%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cpath%20id=%22path919%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3Cpath%20id=%22path998%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleOutM-4%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path972-7%22%20d=%22M2.308%200l-3.46%202v-4z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-2%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-4%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-0%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-62%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-3-99%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-6-0%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-5-8%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-3-1%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22TriangleOutM-7-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M2.308%200l-3.46%202v-4z%22%20id=%22path972-5-1%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend-3-1%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836-5-0%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-6-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854-2-4%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-3-9-0%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854-6-1-3%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend-5-2-9%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836-3-7-1%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cdefs%20id=%22defs3-9%22%3E%3Cpath%20d=%22M-58.3-45h653.6v640H-58.3z%22%20id=%22a-6%22/%3E%3C/defs%3E%3Cpath%20d=%22M-58.3-45h653.6v640H-58.3z%22%20id=%22path880-9%22/%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleInM-3%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4321-3%22%20d=%22M-2.308%200l3.46-2v4z%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22EmptyTriangleInM-8%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4339-0%22%20d=%22M-.508%200l3.46-2v4z%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleOutM-3-5%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4297-6%22%20d=%22M2.308%200l-3.46%202v-4z%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22marker4456-6%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4458-4%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22marker4428-0%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4430-0%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-67-4%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4179-6%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cpath%20d=%22M-58.3-45h653.6v640H-58.3z%22%20id=%22path1228%22/%3E%3C/defs%3E%3Ctitle%20id=%22title2%22%3EAnalogsignal%3C/title%3E%3Cg%20id=%22g6%22%20transform=%22matrix(2.66197%200%200%20-2.6081%20-266.143%20348.922)%22%20fill=%22#ff0%22%20stroke-width=%22.631%22%20stroke-linecap=%22round%22%3E%3Cpath%20id=%22path4%22%20d=%22M136.595%2057.528l14.719-12.747%2014.663%2012.747m-6.246-3.93v17.136h-15.754V53.598z%22/%3E%3C/g%3E%3Cg%20id=%22g992-3%22%20transform=%22matrix(2.49948%200%200%202.49948%20-213.902%20137.88)%22%20stroke-width=%221.526%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%22%20id=%22path992-2-6%22%20fill=%22#ececec%22%20stroke-width=%22.929%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20id=%22path1773-2-3-1-8-9-7%22%20d=%22M106.978%2082.142h-3.353V63.316H97.54v18.678h-3.652%22%20fill=%22none%22%20stroke-width=%222.322%22/%3E%3C/g%3E%3Cpath%20id=%22path10%22%20d=%22M7.61%2080.976C14.27%2036.763%2021.114-7.26%2027.77%205.32c6.846%2012.575%2011.841%20145.026%2020.35%20151.315%208.324%206.291%2021.83-109.323%2030.34-113.58%208.324-4.066%2011.838%2094.531%2020.16%2088.238%208.512-6.288%2022.015-130.229%2030.337-125.973%208.51%204.253%2011.84%20149.098%2020.351%20151.315%208.326%202.037%2020.163-136.516%2030.339-138.738%209.99-2.034%2020.161%20119.69%2030.337%20125.978%2010.174%206.473%2023.676-79.732%2030.335-88.053%206.662-8.509%206.662%2031.447%2010.177%2037.734%203.33%206.293%206.66%203.147%209.99%200%22%20stroke-miterlimit=%2210%22%20fill=%22none%22%20stroke=%22#00f%22%20stroke-width=%226.281%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Ctext%20style=%22line-height:1.25;-inkscape-font-specification:ubuntu;text-align:center%22%20x=%22131.832%22%20y=%22272.84%22%20id=%22text849%22%20font-weight=%22400%22%20font-size=%2247.637%22%20font-family=%22ubuntu%22%20letter-spacing=%220%22%20word-spacing=%220%22%20text-anchor=%22middle%22%20stroke-width=%221.662%22%20stroke-linecap=%22round%22%3E%3Ctspan%20id=%22tspan847%22%20x=%22131.832%22%20y=%22272.84%22%20style=%22-inkscape-font-specification:'ubuntu%20Medium'%22%20font-weight=%22500%22%20stroke-width=%22.928%22%20fill=%22green%22%3E01001100%3C/tspan%3E%3C/text%3E%3Cstyle%20id=%22style2%22%3E.st0%7Bdisplay:none%7D.st1%7Bfill:none;stroke:#303030;stroke-width:.7;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10%7D.st2%7Bfill:#303030%7D%3C/style%3E%3Cg%20id=%22g992-3-2%22%20transform=%22matrix(2.49948%200%200%202.49948%20-16.118%20138.484)%22%20stroke-width=%221.526%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%22%20id=%22path992-2-6-67%22%20fill=%22#ececec%22%20stroke-width=%22.929%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20id=%22path1773-2-3-1-8-9-7-5%22%20d=%22M106.978%2082.142h-3.353V63.316H97.54v18.678h-3.652%22%20fill=%22none%22%20stroke-width=%222.322%22/%3E%3C/g%3E%3Ctext%20style=%22line-height:1.25;-inkscape-font-specification:ubuntu;text-align:center%22%20x=%22133.042%22%20y=%22334.844%22%20id=%22text849-6%22%20font-weight=%22400%22%20font-size=%2247.637%22%20font-family=%22ubuntu%22%20letter-spacing=%220%22%20word-spacing=%220%22%20text-anchor=%22middle%22%20stroke-width=%221.662%22%20stroke-linecap=%22round%22%3E%3Ctspan%20id=%22tspan847-9%22%20x=%22133.042%22%20y=%22334.844%22%20style=%22-inkscape-font-specification:'ubuntu%20Medium'%22%20font-weight=%22500%22%20stroke-width=%22.928%22%3EADC%3C/tspan%3E%3C/text%3E%3C/svg%3E" + "name": "Valor_0_2bits", + "version": "0.0.1", + "description": "Valor constante 0 para bus de 2 bits", + "author": "Juan Gonzalez-Gomez (Obijuan)", + "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22145.966%22%20height=%22305.779%22%20viewBox=%220%200%20136.8427%20286.66758%22%3E%3Cg%20font-weight=%22400%22%20font-family=%22Ubuntu%20Mono%22%20letter-spacing=%220%22%20word-spacing=%220%22%3E%3Ctext%20style=%22line-height:125%25;-inkscape-font-specification:'Ubuntu%20Mono'%22%20x=%22293.115%22%20y=%22648.344%22%20font-size=%22335.399%22%20fill=%22green%22%20transform=%22translate(-308.544%20-436.037)%22%3E%3Ctspan%20x=%22293.115%22%20y=%22648.344%22%3E0%3C/tspan%3E%3C/text%3E%3Ctext%20style=%22line-height:125%25;-inkscape-font-specification:'Ubuntu%20Mono'%22%20x=%22341.722%22%20y=%22721.624%22%20font-size=%2283.077%22%20transform=%22translate(-308.544%20-436.037)%22%3E%3Ctspan%20x=%22341.722%22%20y=%22721.624%22%3E00%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E" }, "design": { "graph": { "blocks": [ { - "id": "25c04d0a-ea74-40e4-af03-b65df00fafd0", - "type": "basic.input", - "data": { - "name": "", - "clock": true - }, - "position": { - "x": -2048, - "y": -232 - } - }, - { - "id": "2be9e09c-41a7-4b56-b5c9-ce8d03fceb0a", - "type": "basic.input", - "data": { - "name": "adc-sda", - "clock": false - }, - "position": { - "x": -544, - "y": -184 - } - }, - { - "id": "43bc16ab-b91d-405c-bef0-887bd1a85fd7", + "id": "6a253ddf-22b2-43cd-ba6f-561bd1af6970", "type": "basic.output", "data": { - "name": "adc_scl" - }, - "position": { - "x": 24, - "y": -104 - } - }, - { - "id": "09a84e89-0e4a-43cc-a5b9-6c8ac6ce5742", - "type": "basic.input", - "data": { - "name": "ch", + "name": "k", "range": "[1:0]", - "clock": false, "size": 2 }, "position": { - "x": -2040, - "y": 88 + "x": 928, + "y": 256 } }, { - "id": "2dd424a5-e616-4505-8a89-4982cdd7539d", - "type": "basic.output", + "id": "ad7918eb-22dd-4b6c-949f-e428f5a55530", + "type": "basic.constant", "data": { "name": "", - "range": "[7:0]", - "size": 8 + "value": "0", + "local": true }, "position": { - "x": 208, - "y": 312 + "x": 728, + "y": 136 } }, { - "id": "bfc6f0ec-0d3a-4caa-9d40-9f4e8f59f112", - "type": "basic.input", - "data": { - "name": "start", - "clock": false - }, + "id": "ae9e32fe-296d-4700-a429-1178ece2609d", + "type": "1577535d38e0077281a8de7dc00933b07ec4f543", "position": { - "x": -2040, - "y": 696 + "x": 728, + "y": 256 + }, + "size": { + "width": 96, + "height": 64 } - }, + } + ], + "wires": [ { - "id": "f4f0b0cc-6b11-417f-b8de-933dd739752b", - "type": "basic.output", - "data": { - "name": "done" + "source": { + "block": "ae9e32fe-296d-4700-a429-1178ece2609d", + "port": "603ddbc9-28cf-4ecc-a0c6-a5a2ce3b0b26" }, - "position": { - "x": -1280, - "y": 864 - } + "target": { + "block": "6a253ddf-22b2-43cd-ba6f-561bd1af6970", + "port": "in" + }, + "size": 2 }, { - "id": "5d1a3bb7-8f31-4c17-9f0e-09fdcf7bd807", - "type": "basic.memory", - "data": { - "name": "Canal-reg", - "list": "02 //-- Canal 0\n04 //-- Canal 1\n06 //-- Canal 2\n08 //-- Canal 3", - "local": true, - "format": 10 - }, - "position": { - "x": -1728, - "y": -80 + "source": { + "block": "ad7918eb-22dd-4b6c-949f-e428f5a55530", + "port": "constant-out" }, - "size": { - "width": 224, - "height": 104 + "target": { + "block": "ae9e32fe-296d-4700-a429-1178ece2609d", + "port": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4" } - }, + } + ] + } + } + }, + "1577535d38e0077281a8de7dc00933b07ec4f543": { + "package": { + "name": "Constante-2bits", + "version": "0.0.1", + "description": "Valor genérico constante, de 2 bits. Su valor se introduce como parámetro. Por defecto vale 0", + "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%3Ctext%20style=%22line-height:125%25;-inkscape-font-specification:'Ubuntu%20Mono'%22%20x=%22293.115%22%20y=%22648.344%22%20font-weight=%22400%22%20font-size=%22335.399%22%20font-family=%22Ubuntu%20Mono%22%20letter-spacing=%220%22%20word-spacing=%220%22%20fill=%22green%22%20transform=%22translate(-316.929%20-415.913)%22%3E%3Ctspan%20x=%22293.115%22%20y=%22648.344%22%3Ek%3C/tspan%3E%3C/text%3E%3C/svg%3E" + }, + "design": { + "graph": { + "blocks": [ { - "id": "3b4b7515-4e2b-46d2-8994-7ea4b3ad22e3", - "type": "basic.constant", + "id": "603ddbc9-28cf-4ecc-a0c6-a5a2ce3b0b26", + "type": "basic.output", "data": { - "name": "", - "value": "3", - "local": true + "name": "k", + "range": "[1:0]", + "size": 2 }, "position": { - "x": -1416, + "x": 960, "y": 248 } }, { - "id": "9e7fbae9-cce7-42d1-b650-6e315c04c922", + "id": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", "type": "basic.constant", "data": { "name": "", - "value": "1", - "local": true + "value": "0", + "local": false }, "position": { - "x": -1216, - "y": 128 + "x": 728, + "y": 112 } }, { - "id": "22ab7ece-cc08-4d88-8169-0c27996f429f", - "type": "basic.memory", + "id": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", + "type": "basic.code", "data": { - "name": "Comandos i2c", - "list": "03_00_cc //-- Write. Reg 0 <-- CC. Modo Auto-scan\n01_02_00 //-- Sel Reg 2\n00_00_00 //-- Lectura!", + "code": "assign k = VALUE;", + "params": [ + { + "name": "VALUE" + } + ], + "ports": { + "in": [], + "out": [ + { + "name": "k", + "range": "[1:0]", + "size": 2 + } + ] + } + }, + "position": { + "x": 672, + "y": 248 + }, + "size": { + "width": 208, + "height": 64 + } + } + ], + "wires": [ + { + "source": { + "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", + "port": "k" + }, + "target": { + "block": "603ddbc9-28cf-4ecc-a0c6-a5a2ce3b0b26", + "port": "in" + }, + "size": 2 + }, + { + "source": { + "block": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", + "port": "constant-out" + }, + "target": { + "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", + "port": "VALUE" + } + } + ] + } + } + }, + "c6459cf10c1547cd019a1270349def563247dd01": { + "package": { + "name": "Serial-tx", + "version": "0.2", + "description": "Transmisor serie", + "author": "Juan Gonzalez-Gómez (Obijuan)", + "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20height=%22223.269%22%20width=%22293.137%22%20viewBox=%220%200%20274.81662%20209.31615%22%3E%3Cg%20transform=%22translate(347.142%20-102.544)%20scale(1.04907)%22%20stroke=%22#000%22%3E%3Cpath%20d=%22M-170.798%20177.526l.315%2036.011%2040.397-37.263v-33.51z%22%20fill=%22#fff%22%20stroke-width=%223.541%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M-308.584%20177.892l53.235-35.7%20124.635.628-39.456%2035.7%22%20fill=%22#fff%22%20stroke-width=%223.541%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Crect%20ry=%223.509%22%20height=%2236.325%22%20width=%22139.039%22%20y=%22178.153%22%20x=%22-308.895%22%20fill=%22#fff%22%20stroke-width=%223.541%22%20stroke-linecap=%22square%22/%3E%3Cg%20transform=%22matrix(1.88858%200%200%201.88858%20-312.436%20138.651)%22%20stroke-width=%22.938%22%20stroke-linecap=%22square%22%3E%3Ccircle%20cy=%2230.367%22%20cx=%2211.326%22%20r=%223.15%22%20fill=%22red%22/%3E%3Ccircle%20cy=%2230.367%22%20cx=%2220.611%22%20r=%223.15%22%20fill=%22#faa%22/%3E%3Ccircle%20cy=%2230.367%22%20cx=%2262.82%22%20r=%223.15%22%20fill=%22green%22/%3E%3Ccircle%20cy=%2230.367%22%20cx=%2230.554%22%20r=%223.15%22%20fill=%22red%22/%3E%3C/g%3E%3C/g%3E%3Ctext%20y=%2228.295%22%20x=%2270.801%22%20style=%22line-height:0%25%22%20font-weight=%22400%22%20font-size=%2265.172%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=%221.209%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20y=%2228.295%22%20x=%2270.801%22%20font-weight=%22700%22%20font-size=%2237.241%22%3ESerial%3C/tspan%3E%3C/text%3E%3Cg%20transform=%22translate(-49.71%20-39.925)%20scale(2.8106)%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%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%3Cg%20transform=%22translate(-240.978%20-39.925)%20scale(2.8106)%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%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%3Ccircle%20cx=%22233.043%22%20cy=%2281.071%22%20r=%2240.92%22%20fill=%22#ececec%22%20stroke=%22green%22%20stroke-width=%221.71%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M261.766%2092.931h-4.696V67.437h-48.103v25.295h-5.116%22%20fill=%22none%22%20stroke=%22green%22%20stroke-width=%224.275%22%20stroke-linecap=%22round%22/%3E%3Ctext%20y=%22165.6%22%20x=%22108.068%22%20style=%22line-height:0%25%22%20font-weight=%22400%22%20font-size=%2265.172%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=%221.209%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20y=%22165.6%22%20x=%22108.068%22%20font-weight=%22700%22%20font-size=%2237.241%22%3ETX%3C/tspan%3E%3C/text%3E%3C/svg%3E" + }, + "design": { + "graph": { + "blocks": [ + { + "id": "09701eaa-8d79-487f-b003-267e04095bb1", + "type": "basic.output", + "data": { + "name": "TX" + }, + "position": { + "x": 960, + "y": 120 + } + }, + { + "id": "4c296e24-7312-407a-8fb0-f3a6d4feb3ab", + "type": "basic.input", + "data": { + "name": "", + "clock": true + }, + "position": { + "x": -16, + "y": 120 + } + }, + { + "id": "27183891-b385-412b-bc55-21df1dd0280e", + "type": "basic.input", + "data": { + "name": "", + "range": "[7:0]", + "clock": false, + "size": 8 + }, + "position": { + "x": -16, + "y": 272 + } + }, + { + "id": "75d4695e-f445-4762-9ae9-c9bf0e51974f", + "type": "basic.output", + "data": { + "name": "busy" + }, + "position": { + "x": 960, + "y": 272 + } + }, + { + "id": "6bb28a95-e6e4-4044-9c22-c4404693b6b1", + "type": "basic.input", + "data": { + "name": "txmit", + "clock": false + }, + "position": { + "x": 0, + "y": 424 + } + }, + { + "id": "42306dfc-8702-4c9a-98d6-56b4c86fff21", + "type": "basic.output", + "data": { + "name": "done" + }, + "position": { + "x": 960, + "y": 424 + } + }, + { + "id": "671d0b4d-317d-4aef-8422-8b9a400211a4", + "type": "basic.constant", + "data": { + "name": "", + "value": "115200", + "local": false + }, + "position": { + "x": 480, + "y": -72 + } + }, + { + "id": "3238443f-338d-4796-b54a-c463c5f191aa", + "type": "basic.code", + "data": { + "code": "//-- Constantes para obtener las velocidades estándares\n`define B115200 104 \n`define B57600 208\n`define B38400 313\n`define B19200 625\n`define B9600 1250\n`define B4800 2500\n`define B2400 5000\n`define B1200 10000\n`define B600 20000\n`define B300 40000\n\n//-- Constante para calcular los baudios\nlocalparam BAUDRATE = (BAUD==115200) ? `B115200 : //-- OK\n (BAUD==57600) ? `B57600 : //-- OK\n (BAUD==38400) ? `B38400 : //-- Ok\n (BAUD==19200) ? `B19200 : //-- OK\n (BAUD==9600) ? `B9600 : //-- OK\n (BAUD==4800) ? `B4800 : //-- OK \n (BAUD==2400) ? `B2400 : //-- OK\n (BAUD==1200) ? `B1200 : //-- OK\n (BAUD==600) ? `B600 : //-- OK\n (BAUD==300) ? `B300 : //-- OK\n `B115200 ; //-- Por defecto 115200 baudios\n\n\n//---- GENERADOR DE BAUDIOS\n\n//-- Calcular el numero dde bits para almacenar el divisor\nlocalparam N = $clog2(BAUDRATE);\n\n//-- Contador para implementar el divisor\n//-- Es un contador modulo BAUDRATE\nreg [N-1:0] divcounter = 0;\n\n//-- Cable de reset para el contador\n//-- Comparador que resetea el contador cuando se alcanza el tope\n//-- o cuando el estado del biestable es 0 (apagado)\nwire reset = ov_gen | (state == 0);\n\n//-- Contador con reset\nalways @(posedge clk)\n if (reset)\n divcounter <= 0;\n else\n divcounter <= divcounter + 1;\n\n//-- Hemos llegado al final\nwire ov_gen = (divcounter == BAUDRATE-1);\n\n\n\n//-- REGISTRO DESPLAZAMIENTO\n\n//-- Salida serie. Inicialmete a 1 (reposo) \nreg TX = 1;\n\n//-- Registro de desplazamiento de 9 bits\n//-- Inicializado todo a 1s\nreg [8:0] q = 9'h1FF;\n\n//-- La entrada de shift es la salida del generador de baudios\nwire shift = ov_gen;\n\nalways @(posedge clk)\n if (txmit_tic)\n //-- Carga del registro\n q <= {data, 1'b0};\n \n else if (shift)\n //-- Desplazamiento. Rellenar con 1 (bit de stop)\n q <= {1'b1, q[8:1]};\n \n//-- Sacar el bit de menor peso por serial-out \nwire so;\nassign so = q[0];\n\n//-- La salida tx la registramos\nalways @(posedge clk)\n TX <= so;\n \n//-- La señal de entrada txmit se pasa por un \n//-- detector de flancos de subida para generar un tic\nreg q_re = 0;\nwire txmit_tic;\n\nalways @(posedge clk)\n q_re <= txmit;\n \nassign txmit_tic = (~q_re & txmit); \n\n\n\n//-- Estado de transmisor\n//-- 0: Parado\n//-- 1: Ocupado (transmitiendo)\nreg state = 0;\n \nalways @(posedge clk)\n //-- Empieza la transmision: ocupado\n if (txmit)\n state <= 1'b1;\n \n //-- Acaba la transmision: libre \n else if (ov)\n state <= 1'b0;\n\n//-- Contador de bits enviados\nreg [3:0] bits = 0;\nalways @(posedge clk)\n //-- Si la cuenta ha terminado... volver a 0\n if (ov)\n bits <= 2'b00;\n else\n if (shift)\n bits <= bits + 1;\n\n//-- Comprobar si se ha transmitido el último bit (overflow)\n//-- 1 bit de start + 8 bits de datos + 1 bit de stop\nwire ov = (bits == 10);\n\n//-- La señal de ocupado es el estado del transmisor\nassign busy = state;\n\n//-- La señal de done es la de overflow pero retrasada un\n//-- periodo de reloj del sistema y que el biestable \n//-- llegue al estado de parado antes de que se \n//-- empiece otra transmision\n\nreg done=0;\n\nalways @(posedge clk)\n done <= ov;\n", + "params": [ + { + "name": "BAUD" + } + ], + "ports": { + "in": [ + { + "name": "clk" + }, + { + "name": "data", + "range": "[7:0]", + "size": 8 + }, + { + "name": "txmit" + } + ], + "out": [ + { + "name": "TX" + }, + { + "name": "busy" + }, + { + "name": "done" + } + ] + } + }, + "position": { + "x": 248, + "y": 72 + }, + "size": { + "width": 560, + "height": 456 + } + } + ], + "wires": [ + { + "source": { + "block": "3238443f-338d-4796-b54a-c463c5f191aa", + "port": "TX" + }, + "target": { + "block": "09701eaa-8d79-487f-b003-267e04095bb1", + "port": "in" + } + }, + { + "source": { + "block": "671d0b4d-317d-4aef-8422-8b9a400211a4", + "port": "constant-out" + }, + "target": { + "block": "3238443f-338d-4796-b54a-c463c5f191aa", + "port": "BAUD" + } + }, + { + "source": { + "block": "4c296e24-7312-407a-8fb0-f3a6d4feb3ab", + "port": "out" + }, + "target": { + "block": "3238443f-338d-4796-b54a-c463c5f191aa", + "port": "clk" + } + }, + { + "source": { + "block": "27183891-b385-412b-bc55-21df1dd0280e", + "port": "out" + }, + "target": { + "block": "3238443f-338d-4796-b54a-c463c5f191aa", + "port": "data" + }, + "size": 8 + }, + { + "source": { + "block": "6bb28a95-e6e4-4044-9c22-c4404693b6b1", + "port": "out" + }, + "target": { + "block": "3238443f-338d-4796-b54a-c463c5f191aa", + "port": "txmit" + } + }, + { + "source": { + "block": "3238443f-338d-4796-b54a-c463c5f191aa", + "port": "busy" + }, + "target": { + "block": "75d4695e-f445-4762-9ae9-c9bf0e51974f", + "port": "in" + } + }, + { + "source": { + "block": "3238443f-338d-4796-b54a-c463c5f191aa", + "port": "done" + }, + "target": { + "block": "42306dfc-8702-4c9a-98d6-56b4c86fff21", + "port": "in" + } + } + ] + } + } + }, + "fe216fc3f7e19209c184579380d23a46cb3ac1b5": { + "package": { + "name": "adc", + "version": "0.2", + "description": "Analog-to-digital-converter", + "author": "Juan Gonzalez-Gomez (Obiuan)", + "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20id=%22Ebene_1%22%20width=%22272.885%22%20height=%22360.534%22%20viewBox=%220%200%20272.88513%20360.53439%22%3E%3Cdefs%20id=%22defs25%22%3E%3Cmarker%20id=%22TriangleOutM%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M2.308%200l-3.46%202v-4z%22%20id=%22path972%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854-6%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend-5%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836-3%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleOutM-7%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path972-5%22%20d=%22M2.308%200l-3.46%202v-4z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-3%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-5%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-6%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-2%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-3-9%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-6-1%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-5-2%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-3-7%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cdefs%20id=%22defs3%22%3E%3Cpath%20id=%22a%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3C/defs%3E%3Cpath%20id=%22path880%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3Cmarker%20id=%22TriangleInM%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-2.308%200l3.46-2v4z%22%20id=%22path4321%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22EmptyTriangleInM%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-.508%200l3.46-2v4z%22%20id=%22path4339%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22TriangleOutM-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M2.308%200l-3.46%202v-4z%22%20id=%22path4297%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22marker4456%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path4458%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22marker4428%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path4430%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-67%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path4179%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cpath%20id=%22path919%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3Cpath%20id=%22path998%22%20d=%22M-58.3-45h653.6v640H-58.3z%22/%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleOutM-4%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path972-7%22%20d=%22M2.308%200l-3.46%202v-4z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-2%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-4%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-0%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-62%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-3-99%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path854-6-0%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow1Mend-5-8%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path836-3-1%22%20d=%22M-4%200l-2%202%207-2-7-2z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22TriangleOutM-7-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M2.308%200l-3.46%202v-4z%22%20id=%22path972-5-1%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend-3-1%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836-5-0%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-6-3%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854-2-4%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow2Mend-3-9-0%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20id=%22path854-6-1-3%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20id=%22Arrow1Mend-5-2-9%22%20orient=%22auto%22%20overflow=%22visible%22%3E%3Cpath%20d=%22M-4%200l-2%202%207-2-7-2z%22%20id=%22path836-3-7-1%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cdefs%20id=%22defs3-9%22%3E%3Cpath%20d=%22M-58.3-45h653.6v640H-58.3z%22%20id=%22a-6%22/%3E%3C/defs%3E%3Cpath%20d=%22M-58.3-45h653.6v640H-58.3z%22%20id=%22path880-9%22/%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleInM-3%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4321-3%22%20d=%22M-2.308%200l3.46-2v4z%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22EmptyTriangleInM-8%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4339-0%22%20d=%22M-.508%200l3.46-2v4z%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22TriangleOutM-3-5%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4297-6%22%20d=%22M2.308%200l-3.46%202v-4z%22%20fill=%22#00f%22%20fill-rule=%22evenodd%22%20stroke=%22#00f%22%20stroke-width=%22.5332%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22marker4456-6%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4458-4%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22marker4428-0%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4430-0%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cmarker%20orient=%22auto%22%20id=%22Arrow2Mend-67-4%22%20overflow=%22visible%22%3E%3Cpath%20id=%22path4179-6%22%20d=%22M-5.231-2.42L1.324-.01-5.23%202.401c1.047-1.423%201.041-3.37%200-4.821z%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%22.375%22%20stroke-linejoin=%22round%22/%3E%3C/marker%3E%3Cpath%20d=%22M-58.3-45h653.6v640H-58.3z%22%20id=%22path1228%22/%3E%3C/defs%3E%3Ctitle%20id=%22title2%22%3EAnalogsignal%3C/title%3E%3Cg%20id=%22g6%22%20transform=%22matrix(2.66197%200%200%20-2.6081%20-266.143%20348.922)%22%20fill=%22#ff0%22%20stroke-width=%22.631%22%20stroke-linecap=%22round%22%3E%3Cpath%20id=%22path4%22%20d=%22M136.595%2057.528l14.719-12.747%2014.663%2012.747m-6.246-3.93v17.136h-15.754V53.598z%22/%3E%3C/g%3E%3Cg%20id=%22g992-3%22%20transform=%22matrix(2.49948%200%200%202.49948%20-213.902%20137.88)%22%20stroke-width=%221.526%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%22%20id=%22path992-2-6%22%20fill=%22#ececec%22%20stroke-width=%22.929%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20id=%22path1773-2-3-1-8-9-7%22%20d=%22M106.978%2082.142h-3.353V63.316H97.54v18.678h-3.652%22%20fill=%22none%22%20stroke-width=%222.322%22/%3E%3C/g%3E%3Cpath%20id=%22path10%22%20d=%22M7.61%2080.976C14.27%2036.763%2021.114-7.26%2027.77%205.32c6.846%2012.575%2011.841%20145.026%2020.35%20151.315%208.324%206.291%2021.83-109.323%2030.34-113.58%208.324-4.066%2011.838%2094.531%2020.16%2088.238%208.512-6.288%2022.015-130.229%2030.337-125.973%208.51%204.253%2011.84%20149.098%2020.351%20151.315%208.326%202.037%2020.163-136.516%2030.339-138.738%209.99-2.034%2020.161%20119.69%2030.337%20125.978%2010.174%206.473%2023.676-79.732%2030.335-88.053%206.662-8.509%206.662%2031.447%2010.177%2037.734%203.33%206.293%206.66%203.147%209.99%200%22%20stroke-miterlimit=%2210%22%20fill=%22none%22%20stroke=%22#00f%22%20stroke-width=%226.281%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Ctext%20style=%22line-height:1.25;-inkscape-font-specification:ubuntu;text-align:center%22%20x=%22131.832%22%20y=%22272.84%22%20id=%22text849%22%20font-weight=%22400%22%20font-size=%2247.637%22%20font-family=%22ubuntu%22%20letter-spacing=%220%22%20word-spacing=%220%22%20text-anchor=%22middle%22%20stroke-width=%221.662%22%20stroke-linecap=%22round%22%3E%3Ctspan%20id=%22tspan847%22%20x=%22131.832%22%20y=%22272.84%22%20style=%22-inkscape-font-specification:'ubuntu%20Medium'%22%20font-weight=%22500%22%20stroke-width=%22.928%22%20fill=%22green%22%3E01001100%3C/tspan%3E%3C/text%3E%3Cstyle%20id=%22style2%22%3E.st0%7Bdisplay:none%7D.st1%7Bfill:none;stroke:#303030;stroke-width:.7;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10%7D.st2%7Bfill:#303030%7D%3C/style%3E%3Cg%20id=%22g992-3-2%22%20transform=%22matrix(2.49948%200%200%202.49948%20-16.118%20138.484)%22%20stroke-width=%221.526%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%22%20id=%22path992-2-6-67%22%20fill=%22#ececec%22%20stroke-width=%22.929%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20id=%22path1773-2-3-1-8-9-7-5%22%20d=%22M106.978%2082.142h-3.353V63.316H97.54v18.678h-3.652%22%20fill=%22none%22%20stroke-width=%222.322%22/%3E%3C/g%3E%3Ctext%20style=%22line-height:1.25;-inkscape-font-specification:ubuntu;text-align:center%22%20x=%22133.042%22%20y=%22334.844%22%20id=%22text849-6%22%20font-weight=%22400%22%20font-size=%2247.637%22%20font-family=%22ubuntu%22%20letter-spacing=%220%22%20word-spacing=%220%22%20text-anchor=%22middle%22%20stroke-width=%221.662%22%20stroke-linecap=%22round%22%3E%3Ctspan%20id=%22tspan847-9%22%20x=%22133.042%22%20y=%22334.844%22%20style=%22-inkscape-font-specification:'ubuntu%20Medium'%22%20font-weight=%22500%22%20stroke-width=%22.928%22%3EADC%3C/tspan%3E%3C/text%3E%3C/svg%3E" + }, + "design": { + "graph": { + "blocks": [ + { + "id": "25c04d0a-ea74-40e4-af03-b65df00fafd0", + "type": "basic.input", + "data": { + "name": "", + "clock": true + }, + "position": { + "x": -2048, + "y": -232 + } + }, + { + "id": "2be9e09c-41a7-4b56-b5c9-ce8d03fceb0a", + "type": "basic.input", + "data": { + "name": "adc-sda", + "clock": false + }, + "position": { + "x": -544, + "y": -184 + } + }, + { + "id": "43bc16ab-b91d-405c-bef0-887bd1a85fd7", + "type": "basic.output", + "data": { + "name": "adc_scl" + }, + "position": { + "x": 24, + "y": -104 + } + }, + { + "id": "09a84e89-0e4a-43cc-a5b9-6c8ac6ce5742", + "type": "basic.input", + "data": { + "name": "ch", + "range": "[1:0]", + "clock": false, + "size": 2 + }, + "position": { + "x": -2040, + "y": 88 + } + }, + { + "id": "2dd424a5-e616-4505-8a89-4982cdd7539d", + "type": "basic.output", + "data": { + "name": "", + "range": "[7:0]", + "size": 8 + }, + "position": { + "x": 208, + "y": 312 + } + }, + { + "id": "bfc6f0ec-0d3a-4caa-9d40-9f4e8f59f112", + "type": "basic.input", + "data": { + "name": "start", + "clock": false + }, + "position": { + "x": -2040, + "y": 696 + } + }, + { + "id": "f4f0b0cc-6b11-417f-b8de-933dd739752b", + "type": "basic.output", + "data": { + "name": "done" + }, + "position": { + "x": -1280, + "y": 864 + } + }, + { + "id": "5d1a3bb7-8f31-4c17-9f0e-09fdcf7bd807", + "type": "basic.memory", + "data": { + "name": "Canal-reg", + "list": "02 //-- Canal 0\n04 //-- Canal 1\n06 //-- Canal 2\n08 //-- Canal 3", + "local": true, + "format": 10 + }, + "position": { + "x": -1728, + "y": -80 + }, + "size": { + "width": 224, + "height": 104 + } + }, + { + "id": "3b4b7515-4e2b-46d2-8994-7ea4b3ad22e3", + "type": "basic.constant", + "data": { + "name": "", + "value": "3", + "local": true + }, + "position": { + "x": -1416, + "y": 248 + } + }, + { + "id": "9e7fbae9-cce7-42d1-b650-6e315c04c922", + "type": "basic.constant", + "data": { + "name": "", + "value": "1", + "local": true + }, + "position": { + "x": -1216, + "y": 128 + } + }, + { + "id": "22ab7ece-cc08-4d88-8169-0c27996f429f", + "type": "basic.memory", + "data": { + "name": "Comandos i2c", + "list": "03_00_cc //-- Write. Reg 0 <-- CC. Modo Auto-scan\n01_02_00 //-- Sel Reg 2\n00_00_00 //-- Lectura!", "local": true, "format": 10 }, @@ -6440,6 +6828,18 @@ "width": 232, "height": 88 } + }, + { + "id": "dd7847f3-ea23-454b-a234-13b78250d000", + "type": "d30ca9ee4f35f6cb76d5e5701447fc2b739bc640", + "position": { + "x": 592, + "y": 312 + }, + "size": { + "width": 96, + "height": 64 + } } ], "wires": [ @@ -6685,6 +7085,22 @@ "y": 464 } ] + }, + { + "source": { + "block": "dd7847f3-ea23-454b-a234-13b78250d000", + "port": "3d584b0a-29eb-47af-8c43-c0822282ef05" + }, + "target": { + "block": "17946732-21fc-48c5-93f3-e9d1ad735480", + "port": "743b5299-2d89-4783-b7c9-12a5b36df406" + }, + "vertices": [ + { + "x": 744, + "y": 360 + } + ] } ] } @@ -7038,6 +7454,68 @@ } } }, + "d30ca9ee4f35f6cb76d5e5701447fc2b739bc640": { + "package": { + "name": "bit-0", + "version": "0.2", + "description": "Constant bit 0", + "author": "Jesus Arroyo", + "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22125.776%22%20height=%22197.727%22%20viewBox=%220%200%20110.54641%20173.78236%22%3E%3Cpath%20d=%22M69.664%20107.353l13.494%2029.374L70.719%20168.5l13.788%204.283m-42.761-62.916S38.148%20136.825%2033.22%20139C28.298%20141.18%201%20161.403%201%20161.403l8.729%2010.636%22%20fill=%22none%22%20stroke=%22green%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cg%20style=%22line-height:0%25%22%3E%3Cpath%20d=%22M65.536%2024.562q-9.493%200-15.876%208.251-6.303%208.156-8.855%2023.604-2.553%2015.448%201.037%2023.7%203.59%208.155%2013.084%208.155%209.334%200%2015.636-8.155%206.383-8.252%208.936-23.7%202.553-15.448-1.037-23.604-3.59-8.251-12.925-8.251zm4.07-24.564q23.056%200%2033.507%2014.969%2010.53%2014.968%206.143%2041.45-4.388%2026.482-19.865%2041.45-15.478%2014.968-38.534%2014.968-23.136%200-33.667-14.968Q6.659%2082.9%2011.047%2056.417q4.387-26.482%2019.865-41.45Q46.469-.002%2069.605-.002z%22%20style=%22line-height:1.25;-inkscape-font-specification:'sans-serif%20Bold%20Italic'%22%20font-style=%22italic%22%20font-weight=%22700%22%20font-size=%22179.184%22%20font-family=%22sans-serif%22%20letter-spacing=%220%22%20word-spacing=%220%22%20fill=%22green%22/%3E%3C/g%3E%3C/svg%3E" + }, + "design": { + "graph": { + "blocks": [ + { + "id": "3d584b0a-29eb-47af-8c43-c0822282ef05", + "type": "basic.output", + "data": { + "name": "" + }, + "position": { + "x": 456, + "y": 120 + } + }, + { + "id": "61331ec5-2c56-4cdd-b607-e63b1502fa65", + "type": "basic.code", + "data": { + "code": "//-- Constant bit-0\nassign q = 1'b0;\n\n", + "params": [], + "ports": { + "in": [], + "out": [ + { + "name": "q" + } + ] + } + }, + "position": { + "x": 168, + "y": 112 + }, + "size": { + "width": 248, + "height": 80 + } + } + ], + "wires": [ + { + "source": { + "block": "61331ec5-2c56-4cdd-b607-e63b1502fa65", + "port": "q" + }, + "target": { + "block": "3d584b0a-29eb-47af-8c43-c0822282ef05", + "port": "in" + } + } + ] + } + } + }, "3e4cef8e5d182ddc9806ac0f5a9ee24351737373": { "package": { "name": "i2c-stop", @@ -10668,105 +11146,11 @@ "id": "ca6198dd-3208-49f0-8089-7a221c78637d", "type": "1577535d38e0077281a8de7dc00933b07ec4f543", "position": { - "x": 728, - "y": 256 - }, - "size": { - "width": 96, - "height": 64 - } - } - ], - "wires": [ - { - "source": { - "block": "ca6198dd-3208-49f0-8089-7a221c78637d", - "port": "603ddbc9-28cf-4ecc-a0c6-a5a2ce3b0b26" - }, - "target": { - "block": "6a253ddf-22b2-43cd-ba6f-561bd1af6970", - "port": "in" - }, - "size": 2 - }, - { - "source": { - "block": "ad7918eb-22dd-4b6c-949f-e428f5a55530", - "port": "constant-out" - }, - "target": { - "block": "ca6198dd-3208-49f0-8089-7a221c78637d", - "port": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4" - } - } - ] - } - } - }, - "1577535d38e0077281a8de7dc00933b07ec4f543": { - "package": { - "name": "Constante-2bits", - "version": "0.0.1", - "description": "Valor genérico constante, de 2 bits. Su valor se introduce como parámetro. Por defecto vale 0", - "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%3Ctext%20style=%22line-height:125%25;-inkscape-font-specification:'Ubuntu%20Mono'%22%20x=%22293.115%22%20y=%22648.344%22%20font-weight=%22400%22%20font-size=%22335.399%22%20font-family=%22Ubuntu%20Mono%22%20letter-spacing=%220%22%20word-spacing=%220%22%20fill=%22green%22%20transform=%22translate(-316.929%20-415.913)%22%3E%3Ctspan%20x=%22293.115%22%20y=%22648.344%22%3Ek%3C/tspan%3E%3C/text%3E%3C/svg%3E" - }, - "design": { - "graph": { - "blocks": [ - { - "id": "603ddbc9-28cf-4ecc-a0c6-a5a2ce3b0b26", - "type": "basic.output", - "data": { - "name": "k", - "range": "[1:0]", - "size": 2 - }, - "position": { - "x": 960, - "y": 248 - } - }, - { - "id": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", - "type": "basic.constant", - "data": { - "name": "", - "value": "0", - "local": false - }, - "position": { - "x": 728, - "y": 112 - } - }, - { - "id": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", - "type": "basic.code", - "data": { - "code": "assign k = VALUE;", - "params": [ - { - "name": "VALUE" - } - ], - "ports": { - "in": [], - "out": [ - { - "name": "k", - "range": "[1:0]", - "size": 2 - } - ] - } - }, - "position": { - "x": 672, - "y": 248 + "x": 728, + "y": 256 }, "size": { - "width": 208, + "width": 96, "height": 64 } } @@ -10774,23 +11158,23 @@ "wires": [ { "source": { - "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", - "port": "k" + "block": "ca6198dd-3208-49f0-8089-7a221c78637d", + "port": "603ddbc9-28cf-4ecc-a0c6-a5a2ce3b0b26" }, "target": { - "block": "603ddbc9-28cf-4ecc-a0c6-a5a2ce3b0b26", + "block": "6a253ddf-22b2-43cd-ba6f-561bd1af6970", "port": "in" }, "size": 2 }, { "source": { - "block": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4", + "block": "ad7918eb-22dd-4b6c-949f-e428f5a55530", "port": "constant-out" }, "target": { - "block": "7dbe7521-0f9f-43ee-ab0c-0439e2c20bc2", - "port": "VALUE" + "block": "ca6198dd-3208-49f0-8089-7a221c78637d", + "port": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4" } } ] @@ -11184,272 +11568,57 @@ "name": "", "range": "[2:0]", "clock": false, - "size": 3 - }, - "position": { - "x": 152, - "y": 160 - } - }, - { - "id": "437fac17-b8b4-4d9f-8d03-27300b3b9466", - "type": "basic.constant", - "data": { - "name": "", - "value": "0", - "local": false - }, - "position": { - "x": 408, - "y": 48 - } - }, - { - "id": "9c811723-c900-4ceb-9989-036b071ee3fe", - "type": "basic.code", - "data": { - "code": "assign eq = (a == B);", - "params": [ - { - "name": "B" - } - ], - "ports": { - "in": [ - { - "name": "a", - "range": "[2:0]", - "size": 3 - } - ], - "out": [ - { - "name": "eq" - } - ] - } - }, - "position": { - "x": 344, - "y": 160 - }, - "size": { - "width": 224, - "height": 64 - } - } - ], - "wires": [ - { - "source": { - "block": "9c811723-c900-4ceb-9989-036b071ee3fe", - "port": "eq" - }, - "target": { - "block": "0344dacc-8583-456b-b377-8cb4ab97cf94", - "port": "in" - } - }, - { - "source": { - "block": "0867b1bc-1cc5-4707-8ddb-40d0318d237c", - "port": "out" - }, - "target": { - "block": "9c811723-c900-4ceb-9989-036b071ee3fe", - "port": "a" - }, - "size": 3 - }, - { - "source": { - "block": "437fac17-b8b4-4d9f-8d03-27300b3b9466", - "port": "constant-out" - }, - "target": { - "block": "9c811723-c900-4ceb-9989-036b071ee3fe", - "port": "B" - } - } - ] - } - } - }, - "fbbede7f059cd50db81d1e80b2e575ed877c91a0": { - "package": { - "name": "mi-tabla2-8", - "version": "0.1", - "description": "Circuito combinacional de 2 entradas y 8 salidas", - "author": "IceFactory 0.1", - "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22184.803%22%20height=%22197.944%22%20viewBox=%220%200%20173.25325%20185.57257%22%3E%3Cg%20transform=%22translate(-181.933%20-240.254)%22%20stroke=%22#000%22%3E%3Crect%20width=%22170.253%22%20height=%22182.573%22%20x=%22183.433%22%20y=%22241.754%22%20ry=%2219.969%22%20fill=%22#3e8db8%22%20stroke-width=%223%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22196.408%22%20y=%22274.019%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22246.344%22%20y=%22274.413%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22296.415%22%20y=%22274.413%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22196.408%22%20y=%22381.832%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22246.344%22%20y=%22382.225%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22296.415%22%20y=%22382.225%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Ctext%20style=%22line-height:125%25;text-align:center%22%20x=%22267.708%22%20y=%22368.911%22%20font-weight=%22400%22%20font-size=%2212.5%22%20font-family=%22sans-serif%22%20letter-spacing=%220%22%20word-spacing=%220%22%20text-anchor=%22middle%22%20fill=%22#ff0%22%20stroke-width=%223%22%3E%3Ctspan%20x=%22267.708%22%20y=%22368.911%22%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20font-weight=%22700%22%20font-size=%2270%22%3EHEX%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E" - }, - "design": { - "graph": { - "blocks": [ - { - "id": "186c4116-7846-4c8e-98a0-7376675105f1", - "type": "basic.input", - "data": { - "name": "", - "range": "[1:0]", - "clock": false, - "size": 2 - }, - "position": { - "x": -8, - "y": 424 - } - }, - { - "id": "f9c58d8f-75fc-4483-b0d2-d584a555b1c5", - "type": "basic.output", - "data": { - "name": "", - "range": "[7:0]", - "size": 8 - }, - "position": { - "x": 632, - "y": 424 - } - }, - { - "id": "c71c44ac-0500-4eb5-9c1c-4ea21cd78377", - "type": "basic.memory", - "data": { - "name": "", - "list": "0\n0\n0\n0", - "local": false - }, - "position": { - "x": 328, - "y": 96 - }, - "size": { - "width": 96, - "height": 104 - } - }, - { - "id": "48c38eba-4e12-44d9-a55b-a93def6a27db", - "type": "basic.code", - "data": { - "code": "\n//-- Bits del bus de entrada\nlocalparam N = 2;\n\n//-- Bits del bus de salida\nlocalparam M = 8;\n\n//-- Calcular tamaño de la tabla\n//-- (filas) segun los bits de entrada\nlocalparam TAM = 2 ** N;\n\n//-- Definición de la tabla\n//-- Tabla de TAM elementos de M bits\nreg [M-1:0] tabla[0:TAM-1];\n\n//-- Read the table\nassign q = tabla[i];\n\n//-- Init table from DATA parameters\ninitial begin\n if (DATA) $readmemh(DATA, tabla);\nend", - "params": [ - { - "name": "DATA" - } - ], - "ports": { - "in": [ - { - "name": "i", - "range": "[1:0]", - "size": 2 - } - ], - "out": [ - { - "name": "q", - "range": "[7:0]", - "size": 8 - } - ] - } - }, - "position": { - "x": 176, - "y": 264 - }, - "size": { - "width": 392, - "height": 384 - } - } - ], - "wires": [ - { - "source": { - "block": "c71c44ac-0500-4eb5-9c1c-4ea21cd78377", - "port": "memory-out" - }, - "target": { - "block": "48c38eba-4e12-44d9-a55b-a93def6a27db", - "port": "DATA" - } - }, - { - "source": { - "block": "186c4116-7846-4c8e-98a0-7376675105f1", - "port": "out" - }, - "target": { - "block": "48c38eba-4e12-44d9-a55b-a93def6a27db", - "port": "i" - }, - "size": 2 - }, - { - "source": { - "block": "48c38eba-4e12-44d9-a55b-a93def6a27db", - "port": "q" - }, - "target": { - "block": "f9c58d8f-75fc-4483-b0d2-d584a555b1c5", - "port": "in" - }, - "size": 8 - } - ] - } - } - }, - "18fd28fbb97a4fd982053988e015aa934dcd6014": { - "package": { - "name": "Valor_0_2bits", - "version": "0.0.1", - "description": "Valor constante 0 para bus de 2 bits", - "author": "Juan Gonzalez-Gomez (Obijuan)", - "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22145.966%22%20height=%22305.779%22%20viewBox=%220%200%20136.8427%20286.66758%22%3E%3Cg%20font-weight=%22400%22%20font-family=%22Ubuntu%20Mono%22%20letter-spacing=%220%22%20word-spacing=%220%22%3E%3Ctext%20style=%22line-height:125%25;-inkscape-font-specification:'Ubuntu%20Mono'%22%20x=%22293.115%22%20y=%22648.344%22%20font-size=%22335.399%22%20fill=%22green%22%20transform=%22translate(-308.544%20-436.037)%22%3E%3Ctspan%20x=%22293.115%22%20y=%22648.344%22%3E0%3C/tspan%3E%3C/text%3E%3Ctext%20style=%22line-height:125%25;-inkscape-font-specification:'Ubuntu%20Mono'%22%20x=%22341.722%22%20y=%22721.624%22%20font-size=%2283.077%22%20transform=%22translate(-308.544%20-436.037)%22%3E%3Ctspan%20x=%22341.722%22%20y=%22721.624%22%3E00%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E" - }, - "design": { - "graph": { - "blocks": [ - { - "id": "6a253ddf-22b2-43cd-ba6f-561bd1af6970", - "type": "basic.output", - "data": { - "name": "k", - "range": "[1:0]", - "size": 2 + "size": 3 }, "position": { - "x": 928, - "y": 256 + "x": 152, + "y": 160 } }, { - "id": "ad7918eb-22dd-4b6c-949f-e428f5a55530", + "id": "437fac17-b8b4-4d9f-8d03-27300b3b9466", "type": "basic.constant", "data": { "name": "", "value": "0", - "local": true + "local": false }, "position": { - "x": 728, - "y": 136 + "x": 408, + "y": 48 } }, { - "id": "ae9e32fe-296d-4700-a429-1178ece2609d", - "type": "1577535d38e0077281a8de7dc00933b07ec4f543", + "id": "9c811723-c900-4ceb-9989-036b071ee3fe", + "type": "basic.code", + "data": { + "code": "assign eq = (a == B);", + "params": [ + { + "name": "B" + } + ], + "ports": { + "in": [ + { + "name": "a", + "range": "[2:0]", + "size": 3 + } + ], + "out": [ + { + "name": "eq" + } + ] + } + }, "position": { - "x": 728, - "y": 256 + "x": 344, + "y": 160 }, "size": { - "width": 96, + "width": 224, "height": 64 } } @@ -11457,242 +11626,163 @@ "wires": [ { "source": { - "block": "ae9e32fe-296d-4700-a429-1178ece2609d", - "port": "603ddbc9-28cf-4ecc-a0c6-a5a2ce3b0b26" + "block": "9c811723-c900-4ceb-9989-036b071ee3fe", + "port": "eq" }, "target": { - "block": "6a253ddf-22b2-43cd-ba6f-561bd1af6970", + "block": "0344dacc-8583-456b-b377-8cb4ab97cf94", "port": "in" + } + }, + { + "source": { + "block": "0867b1bc-1cc5-4707-8ddb-40d0318d237c", + "port": "out" }, - "size": 2 + "target": { + "block": "9c811723-c900-4ceb-9989-036b071ee3fe", + "port": "a" + }, + "size": 3 }, { "source": { - "block": "ad7918eb-22dd-4b6c-949f-e428f5a55530", + "block": "437fac17-b8b4-4d9f-8d03-27300b3b9466", "port": "constant-out" }, "target": { - "block": "ae9e32fe-296d-4700-a429-1178ece2609d", - "port": "c0fb4784-5e8c-4f41-9f4b-6daa2e9e03a4" + "block": "9c811723-c900-4ceb-9989-036b071ee3fe", + "port": "B" } } ] } } }, - "c6459cf10c1547cd019a1270349def563247dd01": { + "fbbede7f059cd50db81d1e80b2e575ed877c91a0": { "package": { - "name": "Serial-tx", - "version": "0.2", - "description": "Transmisor serie", - "author": "Juan Gonzalez-Gómez (Obijuan)", - "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20height=%22223.269%22%20width=%22293.137%22%20viewBox=%220%200%20274.81662%20209.31615%22%3E%3Cg%20transform=%22translate(347.142%20-102.544)%20scale(1.04907)%22%20stroke=%22#000%22%3E%3Cpath%20d=%22M-170.798%20177.526l.315%2036.011%2040.397-37.263v-33.51z%22%20fill=%22#fff%22%20stroke-width=%223.541%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M-308.584%20177.892l53.235-35.7%20124.635.628-39.456%2035.7%22%20fill=%22#fff%22%20stroke-width=%223.541%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Crect%20ry=%223.509%22%20height=%2236.325%22%20width=%22139.039%22%20y=%22178.153%22%20x=%22-308.895%22%20fill=%22#fff%22%20stroke-width=%223.541%22%20stroke-linecap=%22square%22/%3E%3Cg%20transform=%22matrix(1.88858%200%200%201.88858%20-312.436%20138.651)%22%20stroke-width=%22.938%22%20stroke-linecap=%22square%22%3E%3Ccircle%20cy=%2230.367%22%20cx=%2211.326%22%20r=%223.15%22%20fill=%22red%22/%3E%3Ccircle%20cy=%2230.367%22%20cx=%2220.611%22%20r=%223.15%22%20fill=%22#faa%22/%3E%3Ccircle%20cy=%2230.367%22%20cx=%2262.82%22%20r=%223.15%22%20fill=%22green%22/%3E%3Ccircle%20cy=%2230.367%22%20cx=%2230.554%22%20r=%223.15%22%20fill=%22red%22/%3E%3C/g%3E%3C/g%3E%3Ctext%20y=%2228.295%22%20x=%2270.801%22%20style=%22line-height:0%25%22%20font-weight=%22400%22%20font-size=%2265.172%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=%221.209%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20y=%2228.295%22%20x=%2270.801%22%20font-weight=%22700%22%20font-size=%2237.241%22%3ESerial%3C/tspan%3E%3C/text%3E%3Cg%20transform=%22translate(-49.71%20-39.925)%20scale(2.8106)%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%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%3Cg%20transform=%22translate(-240.978%20-39.925)%20scale(2.8106)%22%20stroke=%22green%22%20stroke-linecap=%22round%22%3E%3Ccircle%20r=%2214.559%22%20cy=%2273.815%22%20cx=%22100.602%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%3Ccircle%20cx=%22233.043%22%20cy=%2281.071%22%20r=%2240.92%22%20fill=%22#ececec%22%20stroke=%22green%22%20stroke-width=%221.71%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M261.766%2092.931h-4.696V67.437h-48.103v25.295h-5.116%22%20fill=%22none%22%20stroke=%22green%22%20stroke-width=%224.275%22%20stroke-linecap=%22round%22/%3E%3Ctext%20y=%22165.6%22%20x=%22108.068%22%20style=%22line-height:0%25%22%20font-weight=%22400%22%20font-size=%2265.172%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=%221.209%22%3E%3Ctspan%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20y=%22165.6%22%20x=%22108.068%22%20font-weight=%22700%22%20font-size=%2237.241%22%3ETX%3C/tspan%3E%3C/text%3E%3C/svg%3E" + "name": "mi-tabla2-8", + "version": "0.1", + "description": "Circuito combinacional de 2 entradas y 8 salidas", + "author": "IceFactory 0.1", + "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22184.803%22%20height=%22197.944%22%20viewBox=%220%200%20173.25325%20185.57257%22%3E%3Cg%20transform=%22translate(-181.933%20-240.254)%22%20stroke=%22#000%22%3E%3Crect%20width=%22170.253%22%20height=%22182.573%22%20x=%22183.433%22%20y=%22241.754%22%20ry=%2219.969%22%20fill=%22#3e8db8%22%20stroke-width=%223%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22196.408%22%20y=%22274.019%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22246.344%22%20y=%22274.413%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22296.415%22%20y=%22274.413%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22196.408%22%20y=%22381.832%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22246.344%22%20y=%22382.225%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Crect%20width=%2244.038%22%20height=%2231.478%22%20x=%22296.415%22%20y=%22382.225%22%20ry=%220%22%20fill=%22#e6e6e6%22%20stroke-width=%222%22%20stroke-linecap=%22square%22%20stroke-linejoin=%22round%22/%3E%3Ctext%20style=%22line-height:125%25;text-align:center%22%20x=%22267.708%22%20y=%22368.911%22%20font-weight=%22400%22%20font-size=%2212.5%22%20font-family=%22sans-serif%22%20letter-spacing=%220%22%20word-spacing=%220%22%20text-anchor=%22middle%22%20fill=%22#ff0%22%20stroke-width=%223%22%3E%3Ctspan%20x=%22267.708%22%20y=%22368.911%22%20style=%22-inkscape-font-specification:'sans-serif%20Bold'%22%20font-weight=%22700%22%20font-size=%2270%22%3EHEX%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E" }, "design": { "graph": { "blocks": [ { - "id": "09701eaa-8d79-487f-b003-267e04095bb1", - "type": "basic.output", - "data": { - "name": "TX" - }, - "position": { - "x": 960, - "y": 120 - } - }, - { - "id": "4c296e24-7312-407a-8fb0-f3a6d4feb3ab", - "type": "basic.input", - "data": { - "name": "", - "clock": true - }, - "position": { - "x": -16, - "y": 120 - } - }, - { - "id": "27183891-b385-412b-bc55-21df1dd0280e", + "id": "186c4116-7846-4c8e-98a0-7376675105f1", "type": "basic.input", "data": { "name": "", - "range": "[7:0]", + "range": "[1:0]", "clock": false, - "size": 8 - }, - "position": { - "x": -16, - "y": 272 - } - }, - { - "id": "75d4695e-f445-4762-9ae9-c9bf0e51974f", - "type": "basic.output", - "data": { - "name": "busy" - }, - "position": { - "x": 960, - "y": 272 - } - }, - { - "id": "6bb28a95-e6e4-4044-9c22-c4404693b6b1", - "type": "basic.input", - "data": { - "name": "txmit", - "clock": false + "size": 2 }, "position": { - "x": 0, + "x": -8, "y": 424 } }, { - "id": "42306dfc-8702-4c9a-98d6-56b4c86fff21", + "id": "f9c58d8f-75fc-4483-b0d2-d584a555b1c5", "type": "basic.output", "data": { - "name": "done" + "name": "", + "range": "[7:0]", + "size": 8 }, "position": { - "x": 960, + "x": 632, "y": 424 } }, { - "id": "671d0b4d-317d-4aef-8422-8b9a400211a4", - "type": "basic.constant", + "id": "c71c44ac-0500-4eb5-9c1c-4ea21cd78377", + "type": "basic.memory", "data": { "name": "", - "value": "115200", + "list": "0\n0\n0\n0", "local": false }, "position": { - "x": 480, - "y": -72 + "x": 328, + "y": 96 + }, + "size": { + "width": 96, + "height": 104 } }, { - "id": "3238443f-338d-4796-b54a-c463c5f191aa", + "id": "48c38eba-4e12-44d9-a55b-a93def6a27db", "type": "basic.code", "data": { - "code": "//-- Constantes para obtener las velocidades estándares\n`define B115200 104 \n`define B57600 208\n`define B38400 313\n`define B19200 625\n`define B9600 1250\n`define B4800 2500\n`define B2400 5000\n`define B1200 10000\n`define B600 20000\n`define B300 40000\n\n//-- Constante para calcular los baudios\nlocalparam BAUDRATE = (BAUD==115200) ? `B115200 : //-- OK\n (BAUD==57600) ? `B57600 : //-- OK\n (BAUD==38400) ? `B38400 : //-- Ok\n (BAUD==19200) ? `B19200 : //-- OK\n (BAUD==9600) ? `B9600 : //-- OK\n (BAUD==4800) ? `B4800 : //-- OK \n (BAUD==2400) ? `B2400 : //-- OK\n (BAUD==1200) ? `B1200 : //-- OK\n (BAUD==600) ? `B600 : //-- OK\n (BAUD==300) ? `B300 : //-- OK\n `B115200 ; //-- Por defecto 115200 baudios\n\n\n//---- GENERADOR DE BAUDIOS\n\n//-- Calcular el numero dde bits para almacenar el divisor\nlocalparam N = $clog2(BAUDRATE);\n\n//-- Contador para implementar el divisor\n//-- Es un contador modulo BAUDRATE\nreg [N-1:0] divcounter = 0;\n\n//-- Cable de reset para el contador\n//-- Comparador que resetea el contador cuando se alcanza el tope\n//-- o cuando el estado del biestable es 0 (apagado)\nwire reset = ov_gen | (state == 0);\n\n//-- Contador con reset\nalways @(posedge clk)\n if (reset)\n divcounter <= 0;\n else\n divcounter <= divcounter + 1;\n\n//-- Hemos llegado al final\nwire ov_gen = (divcounter == BAUDRATE-1);\n\n\n\n//-- REGISTRO DESPLAZAMIENTO\n\n//-- Salida serie. Inicialmete a 1 (reposo) \nreg TX = 1;\n\n//-- Registro de desplazamiento de 9 bits\n//-- Inicializado todo a 1s\nreg [8:0] q = 9'h1FF;\n\n//-- La entrada de shift es la salida del generador de baudios\nwire shift = ov_gen;\n\nalways @(posedge clk)\n if (txmit_tic)\n //-- Carga del registro\n q <= {data, 1'b0};\n \n else if (shift)\n //-- Desplazamiento. Rellenar con 1 (bit de stop)\n q <= {1'b1, q[8:1]};\n \n//-- Sacar el bit de menor peso por serial-out \nwire so;\nassign so = q[0];\n\n//-- La salida tx la registramos\nalways @(posedge clk)\n TX <= so;\n \n//-- La señal de entrada txmit se pasa por un \n//-- detector de flancos de subida para generar un tic\nreg q_re = 0;\nwire txmit_tic;\n\nalways @(posedge clk)\n q_re <= txmit;\n \nassign txmit_tic = (~q_re & txmit); \n\n\n\n//-- Estado de transmisor\n//-- 0: Parado\n//-- 1: Ocupado (transmitiendo)\nreg state = 0;\n \nalways @(posedge clk)\n //-- Empieza la transmision: ocupado\n if (txmit)\n state <= 1'b1;\n \n //-- Acaba la transmision: libre \n else if (ov)\n state <= 1'b0;\n\n//-- Contador de bits enviados\nreg [3:0] bits = 0;\nalways @(posedge clk)\n //-- Si la cuenta ha terminado... volver a 0\n if (ov)\n bits <= 2'b00;\n else\n if (shift)\n bits <= bits + 1;\n\n//-- Comprobar si se ha transmitido el último bit (overflow)\n//-- 1 bit de start + 8 bits de datos + 1 bit de stop\nwire ov = (bits == 10);\n\n//-- La señal de ocupado es el estado del transmisor\nassign busy = state;\n\n//-- La señal de done es la de overflow pero retrasada un\n//-- periodo de reloj del sistema y que el biestable \n//-- llegue al estado de parado antes de que se \n//-- empiece otra transmision\n\nreg done=0;\n\nalways @(posedge clk)\n done <= ov;\n", + "code": "\n//-- Bits del bus de entrada\nlocalparam N = 2;\n\n//-- Bits del bus de salida\nlocalparam M = 8;\n\n//-- Calcular tamaño de la tabla\n//-- (filas) segun los bits de entrada\nlocalparam TAM = 2 ** N;\n\n//-- Definición de la tabla\n//-- Tabla de TAM elementos de M bits\nreg [M-1:0] tabla[0:TAM-1];\n\n//-- Read the table\nassign q = tabla[i];\n\n//-- Init table from DATA parameters\ninitial begin\n if (DATA) $readmemh(DATA, tabla);\nend", "params": [ { - "name": "BAUD" + "name": "DATA" } ], "ports": { "in": [ { - "name": "clk" - }, - { - "name": "data", - "range": "[7:0]", - "size": 8 - }, - { - "name": "txmit" + "name": "i", + "range": "[1:0]", + "size": 2 } ], "out": [ { - "name": "TX" - }, - { - "name": "busy" - }, - { - "name": "done" + "name": "q", + "range": "[7:0]", + "size": 8 } ] } }, "position": { - "x": 248, - "y": 72 + "x": 176, + "y": 264 }, "size": { - "width": 560, - "height": 456 + "width": 392, + "height": 384 } } ], "wires": [ { "source": { - "block": "3238443f-338d-4796-b54a-c463c5f191aa", - "port": "TX" - }, - "target": { - "block": "09701eaa-8d79-487f-b003-267e04095bb1", - "port": "in" - } - }, - { - "source": { - "block": "671d0b4d-317d-4aef-8422-8b9a400211a4", - "port": "constant-out" - }, - "target": { - "block": "3238443f-338d-4796-b54a-c463c5f191aa", - "port": "BAUD" - } - }, - { - "source": { - "block": "4c296e24-7312-407a-8fb0-f3a6d4feb3ab", - "port": "out" + "block": "c71c44ac-0500-4eb5-9c1c-4ea21cd78377", + "port": "memory-out" }, "target": { - "block": "3238443f-338d-4796-b54a-c463c5f191aa", - "port": "clk" + "block": "48c38eba-4e12-44d9-a55b-a93def6a27db", + "port": "DATA" } }, { "source": { - "block": "27183891-b385-412b-bc55-21df1dd0280e", + "block": "186c4116-7846-4c8e-98a0-7376675105f1", "port": "out" }, "target": { - "block": "3238443f-338d-4796-b54a-c463c5f191aa", - "port": "data" - }, - "size": 8 - }, - { - "source": { - "block": "6bb28a95-e6e4-4044-9c22-c4404693b6b1", - "port": "out" + "block": "48c38eba-4e12-44d9-a55b-a93def6a27db", + "port": "i" }, - "target": { - "block": "3238443f-338d-4796-b54a-c463c5f191aa", - "port": "txmit" - } + "size": 2 }, { "source": { - "block": "3238443f-338d-4796-b54a-c463c5f191aa", - "port": "busy" + "block": "48c38eba-4e12-44d9-a55b-a93def6a27db", + "port": "q" }, "target": { - "block": "75d4695e-f445-4762-9ae9-c9bf0e51974f", + "block": "f9c58d8f-75fc-4483-b0d2-d584a555b1c5", "port": "in" - } - }, - { - "source": { - "block": "3238443f-338d-4796-b54a-c463c5f191aa", - "port": "done" }, - "target": { - "block": "42306dfc-8702-4c9a-98d6-56b4c86fff21", - "port": "in" - } + "size": 8 } ] }