Knowledge

MyHDL

Source 📝

57:
An advanced datatype system, independent of traditional datatypes. MyHDL's translator tool automatically writes conversion functions when the target language requires them.
1107: 1653: 1130: 45:
The ability to generate a testbench (Conversion of test benches) with test vectors in VHDL or Verilog, based on complex computations in Python.
1308: 1278: 1152: 1100: 1293: 936: 1338: 1219: 1140: 24: 20: 946: 1333: 1093: 1033: 1019: 941: 1157: 1116: 1575: 1313: 1199: 1182: 1167: 1162: 1005: 1552: 1493: 1379: 1503: 1394: 1384: 1209: 1567: 1514: 1399: 1298: 1204: 1612: 1468: 1194: 1172: 1075: 77:
The example is a small combinatorial design, more specifically the binary to Gray code converter:
1488: 1404: 1419: 1266: 1288: 1135: 1047: 1522: 69:
Here, you can see some examples of conversions from MyHDL designs to VHDL and/or Verilog.
991: 1624: 1647: 1595: 1580: 1452: 1374: 1261: 1537: 1527: 1177: 1323: 1237: 1145: 1542: 1473: 1442: 1254: 1607: 1602: 1585: 1547: 1354: 1232: 1061: 1062:"MyHDL: A Python-Based Hardware Description Language | Linux Journal" 1590: 1483: 1414: 1359: 1318: 1283: 1249: 952: 1557: 1447: 1409: 1273: 1227: 219:
You can create an instance and convert to Verilog and VHDL as follows:
39: 1619: 1478: 1303: 1187: 1085: 1389: 1369: 1532: 1244: 35: 1089: 1364: 992:"Conversion to Verilog and VHDL — MyHDL 0.11 documentation" 973: 1048:"Co-simulation with Verilog — MyHDL 0.11 documentation" 1034:"What's new in MyHDL 0.6 — MyHDL 0.11 documentation" 1020:"What's new in MyHDL 0.6 — MyHDL 0.11 documentation" 1006:"What's new in MyHDL 0.6 — MyHDL 0.11 documentation" 1566: 1513: 1502: 1461: 1435: 1428: 1347: 1218: 1123: 1076:"Conversion examples — MyHDL 0.11 documentation" 1101: 355:The generated Verilog code looks as follows: 54:The ability to do co-simulation with Verilog. 8: 51:The ability to convert output verification. 1510: 1432: 1108: 1094: 1086: 554:The generated VHDL code looks as follows: 48:The ability to convert a list of signals. 965: 118:B -- input intbv signal, binary encoded 121:G -- output intbv signal, gray encoded 7: 61:MyHDL is developed by Jan Decaluwe. 14: 937:Comparison of Free EDA software 115:"""Gray encoder. 1654:Hardware description languages 1: 25:hardware description language 947:Electronic design automation 73:A small combinatorial design 30:Features of MyHDL include: 1670: 942:Comparison of EDA Software 42:code from a MyHDL design. 1200:Circuit underutilization 1183:Reconfigurable computing 556: 357: 221: 79: 34:The ability to generate 1210:Hardware acceleration 1400:Microchip Technology 1205:High-level synthesis 571:IEEE.std_logic_1164. 1469:Intel Quartus Prime 1195:Soft microprocessor 65:Conversion examples 1117:Programmable logic 607:work.pck_myhdl_06. 127:""" 124:width -- bit width 1641: 1640: 1637: 1636: 1633: 1632: 1420:Texas Instruments 583:IEEE.numeric_std. 1661: 1511: 1433: 1110: 1103: 1096: 1087: 1080: 1079: 1072: 1066: 1065: 1058: 1052: 1051: 1044: 1038: 1037: 1030: 1024: 1023: 1016: 1010: 1009: 1002: 996: 995: 988: 982: 981: 970: 926: 923: 920: 917: 914: 911: 908: 905: 902: 899: 896: 893: 890: 887: 884: 881: 878: 875: 872: 869: 866: 863: 860: 857: 854: 851: 848: 845: 842: 839: 836: 833: 830: 827: 824: 821: 818: 815: 812: 809: 806: 803: 800: 797: 794: 791: 788: 785: 782: 779: 776: 773: 770: 767: 764: 761: 758: 755: 752: 749: 746: 743: 740: 737: 734: 731: 728: 725: 722: 719: 716: 713: 710: 707: 704: 701: 698: 695: 692: 689: 686: 683: 680: 677: 674: 671: 668: 665: 662: 659: 656: 653: 650: 647: 644: 641: 638: 635: 632: 629: 626: 623: 620: 617: 614: 611: 608: 605: 602: 599: 596: 593: 590: 587: 584: 581: 578: 575: 572: 569: 566: 563: 560: 550: 547: 544: 541: 538: 535: 532: 529: 526: 523: 520: 517: 514: 511: 508: 505: 502: 499: 496: 493: 490: 487: 484: 481: 478: 475: 472: 469: 466: 463: 460: 457: 454: 451: 448: 445: 442: 439: 436: 433: 430: 427: 424: 421: 418: 415: 412: 409: 406: 403: 400: 397: 394: 391: 388: 385: 382: 379: 376: 373: 370: 367: 364: 361: 351: 348: 345: 342: 339: 336: 333: 330: 327: 324: 321: 318: 315: 312: 309: 306: 303: 300: 297: 294: 291: 288: 285: 282: 279: 276: 273: 270: 267: 264: 261: 258: 255: 252: 249: 246: 243: 240: 237: 234: 231: 228: 225: 215: 212: 209: 206: 203: 200: 197: 194: 191: 188: 185: 182: 179: 176: 173: 170: 167: 164: 161: 158: 155: 152: 149: 146: 143: 140: 137: 134: 131: 128: 125: 122: 119: 116: 113: 110: 107: 104: 101: 98: 95: 92: 89: 86: 83: 1669: 1668: 1664: 1663: 1662: 1660: 1659: 1658: 1644: 1643: 1642: 1629: 1562: 1505: 1498: 1457: 1424: 1343: 1214: 1119: 1114: 1084: 1083: 1074: 1073: 1069: 1060: 1059: 1055: 1046: 1045: 1041: 1032: 1031: 1027: 1018: 1017: 1013: 1004: 1003: 999: 990: 989: 985: 972: 971: 967: 962: 933: 928: 927: 924: 921: 918: 915: 912: 909: 906: 903: 900: 897: 894: 891: 888: 885: 882: 879: 876: 873: 870: 867: 864: 861: 858: 855: 852: 849: 846: 843: 840: 837: 834: 831: 828: 825: 822: 819: 816: 813: 810: 807: 804: 801: 798: 795: 792: 789: 786: 783: 780: 777: 774: 771: 768: 765: 762: 759: 756: 753: 750: 747: 744: 741: 738: 735: 732: 729: 726: 723: 720: 717: 714: 711: 708: 705: 702: 699: 696: 693: 690: 687: 684: 681: 678: 675: 672: 669: 666: 663: 660: 657: 654: 651: 648: 645: 642: 639: 636: 633: 630: 627: 624: 621: 618: 615: 612: 609: 606: 603: 600: 597: 594: 591: 588: 585: 582: 579: 576: 573: 570: 567: 564: 561: 558: 552: 551: 548: 545: 542: 539: 536: 533: 530: 527: 524: 521: 518: 515: 512: 509: 506: 503: 500: 497: 494: 491: 488: 485: 482: 479: 476: 473: 470: 467: 464: 461: 458: 455: 452: 449: 446: 443: 440: 437: 434: 431: 428: 425: 422: 419: 416: 413: 410: 407: 404: 401: 398: 395: 392: 389: 386: 383: 380: 377: 374: 371: 368: 365: 362: 359: 353: 352: 349: 346: 343: 340: 337: 334: 331: 328: 325: 322: 319: 316: 313: 310: 307: 304: 301: 298: 295: 292: 289: 286: 283: 280: 277: 274: 271: 268: 265: 262: 259: 256: 253: 250: 247: 244: 241: 238: 235: 232: 229: 226: 223: 217: 216: 213: 210: 207: 204: 201: 198: 195: 192: 189: 186: 183: 180: 177: 174: 171: 168: 165: 162: 159: 156: 153: 150: 147: 144: 141: 138: 135: 132: 129: 126: 123: 120: 117: 114: 111: 108: 105: 102: 99: 96: 93: 90: 87: 84: 81: 67: 12: 11: 5: 1667: 1665: 1657: 1656: 1646: 1645: 1639: 1638: 1635: 1634: 1631: 1630: 1628: 1627: 1622: 1617: 1616: 1615: 1610: 1600: 1599: 1598: 1588: 1583: 1578: 1572: 1570: 1564: 1563: 1561: 1560: 1555: 1550: 1545: 1540: 1535: 1530: 1525: 1519: 1517: 1508: 1500: 1499: 1497: 1496: 1491: 1486: 1481: 1476: 1471: 1465: 1463: 1459: 1458: 1456: 1455: 1450: 1445: 1439: 1437: 1430: 1426: 1425: 1423: 1422: 1417: 1412: 1407: 1402: 1397: 1392: 1387: 1382: 1377: 1372: 1367: 1362: 1357: 1351: 1349: 1345: 1344: 1342: 1341: 1336: 1331: 1326: 1321: 1316: 1311: 1306: 1301: 1296: 1291: 1286: 1281: 1276: 1271: 1270: 1269: 1259: 1258: 1257: 1252: 1242: 1241: 1240: 1235: 1224: 1222: 1216: 1215: 1213: 1212: 1207: 1202: 1197: 1192: 1191: 1190: 1180: 1175: 1170: 1165: 1160: 1155: 1150: 1149: 1148: 1138: 1133: 1127: 1125: 1121: 1120: 1115: 1113: 1112: 1105: 1098: 1090: 1082: 1081: 1067: 1053: 1039: 1025: 1011: 997: 983: 964: 963: 961: 958: 957: 956: 950: 944: 939: 932: 929: 910:BIN2GRAY_LOGIC 718:BIN2GRAY_LOGIC 557: 426:BIN2GRAY_LOGIC 358: 222: 80: 66: 63: 59: 58: 55: 52: 49: 46: 43: 13: 10: 9: 6: 4: 3: 2: 1666: 1655: 1652: 1651: 1649: 1626: 1623: 1621: 1618: 1614: 1611: 1609: 1606: 1605: 1604: 1601: 1597: 1594: 1593: 1592: 1589: 1587: 1584: 1582: 1581:LatticeMico32 1579: 1577: 1574: 1573: 1571: 1569: 1565: 1559: 1556: 1554: 1551: 1549: 1546: 1544: 1541: 1539: 1536: 1534: 1531: 1529: 1526: 1524: 1521: 1520: 1518: 1516: 1512: 1509: 1507: 1501: 1495: 1492: 1490: 1487: 1485: 1482: 1480: 1477: 1475: 1472: 1470: 1467: 1466: 1464: 1460: 1454: 1451: 1449: 1446: 1444: 1441: 1440: 1438: 1434: 1431: 1427: 1421: 1418: 1416: 1413: 1411: 1408: 1406: 1403: 1401: 1398: 1396: 1393: 1391: 1388: 1386: 1383: 1381: 1378: 1376: 1373: 1371: 1368: 1366: 1363: 1361: 1358: 1356: 1353: 1352: 1350: 1346: 1340: 1337: 1335: 1332: 1330: 1327: 1325: 1322: 1320: 1317: 1315: 1312: 1310: 1307: 1305: 1302: 1300: 1297: 1295: 1292: 1290: 1287: 1285: 1282: 1280: 1277: 1275: 1272: 1268: 1265: 1264: 1263: 1262:SystemVerilog 1260: 1256: 1253: 1251: 1248: 1247: 1246: 1243: 1239: 1236: 1234: 1231: 1230: 1229: 1226: 1225: 1223: 1221: 1217: 1211: 1208: 1206: 1203: 1201: 1198: 1196: 1193: 1189: 1186: 1185: 1184: 1181: 1179: 1176: 1174: 1171: 1169: 1166: 1164: 1161: 1159: 1156: 1154: 1151: 1147: 1144: 1143: 1142: 1139: 1137: 1134: 1132: 1129: 1128: 1126: 1122: 1118: 1111: 1106: 1104: 1099: 1097: 1092: 1091: 1088: 1077: 1071: 1068: 1063: 1057: 1054: 1049: 1043: 1040: 1035: 1029: 1026: 1021: 1015: 1012: 1007: 1001: 998: 993: 987: 984: 979: 975: 969: 966: 959: 954: 951: 948: 945: 943: 940: 938: 935: 934: 930: 555: 356: 317:bin2gray_inst 281:bin2gray_inst 220: 78: 75: 74: 70: 64: 62: 56: 53: 50: 47: 44: 41: 37: 33: 32: 31: 28: 26: 22: 18: 1538:LatticeMico8 1528:ARM Cortex-M 1504:Intellectual 1328: 1070: 1056: 1042: 1028: 1014: 1000: 986: 977: 968: 919:architecture 700:architecture 553: 354: 218: 130:@always_comb 76: 72: 71: 68: 60: 29: 16: 15: 1568:Open-source 1515:Proprietary 1324:Flow to HDL 1146:Logic block 775:to_unsigned 595:std.textio. 1543:MicroBlaze 1494:Simulators 1474:Xilinx ISE 960:References 1613:Microwatt 1608:Libre-SOC 1603:Power ISA 1586:OpenCores 1548:PicoBlaze 1355:Accellera 1348:Companies 1220:Languages 978:myhdl.org 955:compilers 549:endmodule 287:toVerilog 1648:Category 1591:OpenRISC 1506:property 1484:ModelSim 1462:Software 1436:Hardware 1429:Products 1415:Synopsys 1385:Infineon 1360:Achronix 1319:C to HDL 1284:Handel-C 1124:Concepts 953:C to HDL 931:See also 748:unsigned 739:variable 709:bin2gray 694:bin2gray 667:unsigned 640:unsigned 619:bin2gray 453:9'h0 363:bin2gray 329:bin2gray 293:bin2gray 85:bin2gray 1558:Nios II 1448:Stratix 1410:Siemens 1395:Lattice 1380:Cadence 1274:SystemC 1228:Verilog 907:process 724:process 559:library 429:integer 40:Verilog 27:(HDL). 23:-based 1620:RISC-V 1479:Vivado 1453:Virtex 1339:Chisel 1304:PALASM 1188:Xputer 974:"Home" 799:resize 757:downto 691:entity 676:downto 649:downto 616:entity 408:always 390:output 360:module 323:toVHDL 263:Signal 239:Signal 211:return 21:Python 1390:Intel 1370:Aldec 1329:MyHDL 1255:VITAL 949:(EDA) 922:MyHDL 856:<= 766:begin 715:begin 703:MyHDL 525:<= 519:begin 420:begin 381:input 347:width 311:width 269:intbv 245:intbv 224:width 214:logic 184:width 178:range 148:intbv 136:logic 103:width 19:is a 17:MyHDL 1596:1200 1553:Nios 1533:LEON 1334:ELLA 1314:CUPL 1309:ABEL 1289:Lola 1279:AHDL 1245:VHDL 1178:PSoC 1158:EPLD 1153:CPLD 1141:FPGA 1131:ASIC 898:loop 883:Bext 862:Bext 841:loop 793:Bext 769:Bext 742:Bext 625:port 562:IEEE 537:Bext 531:Bext 492:< 459:Bext 447:Bext 441:Bext 208:Bext 202:Bext 196:next 160:Bext 142:Bext 38:and 36:VHDL 1625:Zet 1576:JOP 1523:ARC 1489:VTR 1443:iCE 1405:NXP 1375:Arm 1365:AMD 1299:UPF 1294:PSL 1267:DPI 1250:AMS 1238:AMS 1173:GAL 1168:PAL 1163:PLA 1136:SoC 916:end 904:end 895:end 892:)); 880:xor 817:for 688:end 664:out 610:all 604:use 598:all 592:use 586:all 580:use 574:all 568:use 546:end 543:end 471:for 438:reg 399:reg 169:for 139:(): 133:def 109:int 82:def 1650:: 976:. 877:)) 865:(( 829:to 823:in 814:); 796::= 790:); 772::= 763:); 736:is 712:is 706:of 685:); 655:); 637:in 622:is 540:); 411:@( 378:); 278:)) 254:)) 187:): 175:in 112:): 1233:A 1109:e 1102:t 1095:v 1078:. 1064:. 1050:. 1036:. 1022:. 1008:. 994:. 980:. 925:; 913:; 901:; 889:i 886:( 874:1 871:+ 868:i 859:( 853:) 850:i 847:( 844:G 838:1 835:- 832:8 826:0 820:i 811:9 808:, 805:B 802:( 787:9 784:, 781:0 778:( 760:0 754:8 751:( 745:: 733:) 730:B 727:( 721:: 697:; 682:) 679:0 673:7 670:( 661:: 658:G 652:0 646:7 643:( 634:: 631:B 628:( 613:; 601:; 589:; 577:; 565:; 534:^ 528:( 522:G 516:) 513:1 510:+ 507:i 504:= 501:i 498:; 495:8 489:i 486:; 483:0 480:= 477:i 474:( 468:; 465:B 462:= 456:; 450:= 444:; 435:; 432:i 423:: 417:) 414:B 405:; 402:G 396:; 393:G 387:; 384:B 375:G 372:, 369:B 366:( 350:) 344:, 341:G 338:, 335:B 332:, 326:( 320:= 314:) 308:, 305:G 302:, 299:B 296:, 290:( 284:= 275:0 272:( 266:( 260:= 257:G 251:0 248:( 242:( 236:= 233:B 230:8 227:= 205:^ 199:= 193:. 190:G 181:( 172:i 166:B 163:= 157:) 154:0 151:( 145:= 106:: 100:, 97:G 94:, 91:B 88:(

Index

Python
hardware description language
VHDL
Verilog
Comparison of Free EDA software
Comparison of EDA Software
Electronic design automation
C to HDL
"Home"
"Conversion to Verilog and VHDL — MyHDL 0.11 documentation"
"What's new in MyHDL 0.6 — MyHDL 0.11 documentation"
"What's new in MyHDL 0.6 — MyHDL 0.11 documentation"
"What's new in MyHDL 0.6 — MyHDL 0.11 documentation"
"Co-simulation with Verilog — MyHDL 0.11 documentation"
"MyHDL: A Python-Based Hardware Description Language | Linux Journal"
"Conversion examples — MyHDL 0.11 documentation"
v
t
e
Programmable logic
ASIC
SoC
FPGA
Logic block
CPLD
EPLD
PLA
PAL
GAL
PSoC

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.