├── .gitignore ├── Makefile ├── README.md ├── debian ├── changelog ├── compat ├── compat_symlinks ├── copyright ├── gencontrol └── rules ├── firmwares.txt ├── hostmot2_import.tcl ├── scripts ├── DESCRIBE ├── build.py ├── cards.py ├── firmwares.py ├── get-version-from-git ├── githelper.sh ├── iselib.py ├── mktar.py ├── mkvertar.py ├── pin.py ├── pinxml.py └── update-dch-from-git └── src ├── 4i65.ucf ├── 4i65ss.ucf ├── 4i68.ucf ├── 4i69.ucf ├── 4i74.ucf ├── 5i20.ucf ├── 5i20ss.ucf ├── 5i21.ucf ├── 5i22.ucf ├── 5i23.ucf ├── 5i24.ucf ├── 5i25.ucf ├── 6i25.ucf ├── 7i43.ucf ├── 7i43u.ucf ├── 7i61.ucf ├── 7i61p.ucf ├── 7i61u.ucf ├── 7i68.ucf ├── 7i76e.ucf ├── 7i80db.ucf ├── 7i80hd.ucf ├── 7i90.ucf ├── 7i90serhm2.ucf ├── 7i90spi.ucf ├── 7i90ssremote.ucf ├── 7i91spi.ucf ├── CountPinsInRange.vhd ├── IDROMConst.vhd ├── InputPinsPerModule.vhd ├── MaxIOPinsPerModule.vhd ├── MaxInputPinsPerModule.vhd ├── MaxOutputPinsPerModule.vhd ├── MaxPinsPerModule.vhd ├── ModuleExists.vhd ├── NumberOfModules.vhd ├── OutputInteg.vhd ├── PIN_24XQCTRONLY_72.vhd ├── PIN_2X7I65_72.vhd ├── PIN_2X7I65_7I44_72.vhd ├── PIN_3x7I65_1x7I44_96.vhd ├── PIN_4x7I65_96.vhd ├── PIN_7I65_7I44_72.vhd ├── PIN_7I74_7I76_34.vhd ├── PIN_7I74_7I77_34.vhd ├── PIN_7I74_SIGMA_34.vhd ├── PIN_7I74x2_34.vhd ├── PIN_7I74x4_68.vhd ├── PIN_7I76E_51.vhd ├── PIN_7I76P_7I76_34.vhd ├── PIN_7I76_34.vhd ├── PIN_7I76_7I74_34.vhd ├── PIN_7I76_7I78_34.vhd ├── PIN_7I76_7I85S_34.vhd ├── PIN_7I76_7I85_34.vhd ├── PIN_7I76x2R_34.vhd ├── PIN_7I76x2_34.vhd ├── PIN_7I76x2_7I74x2_68.vhd ├── PIN_7I76x2_7I77x2_68.vhd ├── PIN_7I76x2_biss_34.vhd ├── PIN_7I76x2_ssi_34.vhd ├── PIN_7I76x3_68.vhd ├── PIN_7I76x3_7I74_68.vhd ├── PIN_7I77E_51.vhd ├── PIN_7I77_72.vhd ├── PIN_7I77_7I74_34.vhd ├── PIN_7I77_7I74_34_toromatic.vhd ├── PIN_7I77_7I74_SSI_34.vhd ├── PIN_7I77_7I74_SSI_FANUC_34.vhd ├── PIN_7I77_7I76P_34.vhd ├── PIN_7I77_7I76_34.vhd ├── PIN_7I77_7I78_34.vhd ├── PIN_7I77_7I85SP_34.vhd ├── PIN_7I77_SSI_7I74_34.vhd ├── PIN_7I77x2R_34.vhd ├── PIN_7I77x2_34.vhd ├── PIN_7I77x2_7I74x2_68.vhd ├── PIN_7I77x2_ssi_34.vhd ├── PIN_7I77x4_68.vhd ├── PIN_7I78_34.vhd ├── PIN_7I78x2_34.vhd ├── PIN_7I85SPx2_34.vhd ├── PIN_7I85Sx2_34.vhd ├── PIN_7I85Sx7I78_34.vhd ├── PIN_7I85x2_34.vhd ├── PIN_7I90SPIHost_72.vhd ├── PIN_Andy1_72.vhd ├── PIN_BASACKWARDS_SVSS6_8_72.vhd ├── PIN_BI1_72.vhd ├── PIN_BISSTEST_34.vhd ├── PIN_BOSSV.vhd ├── PIN_DA2_72.vhd ├── PIN_DA2_ADO_72.vhd ├── PIN_DMMBOB1x2_34.vhd ├── PIN_FA1_72.vhd ├── PIN_FALLBACK_34.vhd ├── PIN_FALLBACK_42.vhd ├── PIN_G540_7I85S_34.vhd ├── PIN_G540x2_34.vhd ├── PIN_HARRISON_72.vhd ├── PIN_IOONLY_34.vhd ├── PIN_JUSTIO_68.vhd ├── PIN_JUSTIO_72.vhd ├── PIN_MAUROPON.vhd ├── PIN_MG_72.vhd ├── PIN_MIKA2_CPR_72.vhd ├── PIN_MIKA2_CPR_96.vhd ├── PIN_MX3660x2_34.vhd ├── PIN_OLDBOSSV.vhd ├── PIN_PBX_SS1_34.vhd ├── PIN_PROB_RFx2_34.vhd ├── PIN_PW64_72.vhd ├── PIN_PktUART1inst_34.vhd ├── PIN_PktUARTTest_72.vhd ├── PIN_R990x2_34.vhd ├── PIN_RMSVSS6_10_8_72.vhd ├── PIN_RMSVSS6_12_8_72.vhd ├── PIN_RMSVSS6_6_8_72.vhd ├── PIN_RMSVSS6_8_72.vhd ├── PIN_RMSVSS7_7_72.vhd ├── PIN_RMSVSS8_6_8_72.vhd ├── PIN_RS12_96.vhd ├── PIN_RSST12_8_96.vhd ├── PIN_SISS36_8_3X7I47_7I44.96.vhd ├── PIN_SISS4_4_72.vhd ├── PIN_SISVST6_2_3_7I47_48.vhd ├── PIN_SP4_34.vhd ├── PIN_SP8_34.vhd ├── PIN_SPSSSVST_7I47_7I65_72.vhd ├── PIN_SPSVST_7I47_7I65_48.vhd ├── PIN_SPSVST_7I47_7I65_72.vhd ├── PIN_SS32_96.vhd ├── PIN_SS8_72.vhd ├── PIN_SSBI4_4_72.vhd ├── PIN_SSSV10_12_72.vhd ├── PIN_SSSV18_12_72.vhd ├── PIN_SSSV6_36_96.vhd ├── PIN_SSSV8_48_96.vhd ├── PIN_SSSVST2_2_4_7I47_72.vhd ├── PIN_SSSVST8_1_5_7I47_72.vhd ├── PIN_SSSVST8_8_8_72.vhd ├── PIN_ST12_72.vhd ├── PIN_ST16_72.vhd ├── PIN_ST18_72.vhd ├── PIN_ST20_72.vhd ├── PIN_ST24_72.vhd ├── PIN_ST36_96.vhd ├── PIN_ST48_96.vhd ├── PIN_STSV6_1_34.vhd ├── PIN_STUA8_4_64.vhd ├── PIN_SV12IM_2X7I48_72.vhd ├── PIN_SV12IM_2X7I49_72.vhd ├── PIN_SV12_2X7I48_72.vhd ├── PIN_SV12_2X7I48_96.vhd ├── PIN_SV12_2X7I49_96.vhd ├── PIN_SV12_3X7I47_72.vhd ├── PIN_SV12_72.vhd ├── PIN_SV12_7I48_7I49_96.vhd ├── PIN_SV12_7I49_48.vhd ├── PIN_SV16_96.vhd ├── PIN_SV24_144.vhd ├── PIN_SV4_7I47S_72.vhd ├── PIN_SV6LA_7I52S_72.vhd ├── PIN_SV6_7I48_48.vhd ├── PIN_SV6_7I49_72.vhd ├── PIN_SV6_7I52S_72.vhd ├── PIN_SV8NA.vhd ├── PIN_SV8_48.vhd ├── PIN_SVBI8_4_42.vhd ├── PIN_SVBI8_8_42.vhd ├── PIN_SVFASS6_6_8_72.vhd ├── PIN_SVRM6_48.vhd ├── PIN_SVSI8_8_42.vhd ├── PIN_SVSP4_6_7I46NA_48.vhd ├── PIN_SVSP6_2_48.vhd ├── PIN_SVSP8_6_7I46_72.vhd ├── PIN_SVSPD6_2_48.vhd ├── PIN_SVSS12_6_7I48_7I52_72.vhd ├── PIN_SVSS4_4_48.vhd ├── PIN_SVSS4_4_72.vhd ├── PIN_SVSS4_8_48.vhd ├── PIN_SVSS4_8_72.vhd ├── PIN_SVSS6_3_48.vhd ├── PIN_SVSS6_4_48.vhd ├── PIN_SVSS6_6_48.vhd ├── PIN_SVSS6_6_72.vhd ├── PIN_SVSS6_8_72.vhd ├── PIN_SVSS6_8_96.vhd ├── PIN_SVSS8_16_96.vhd ├── PIN_SVSS8_3_96.vhd ├── PIN_SVSS8_44_72.vhd ├── PIN_SVSS8_8_42.vhd ├── PIN_SVSS8_8_48.vhd ├── PIN_SVSS8_8_72.vhd ├── PIN_SVSSP4_6_7I46_48.vhd ├── PIN_SVSSSI6_4_4_72.vhd ├── PIN_SVSSST6_6_12_72.vhd ├── PIN_SVST12_12_2X7I48_2X7I47_96.vhd ├── PIN_SVST12_12_2X7I48_96.vhd ├── PIN_SVST16_24_144.vhd ├── PIN_SVST1_4_7I47DA_72.vhd ├── PIN_SVST1_4_7I47S_72.vhd ├── PIN_SVST1_4_7I47_72.vhd ├── PIN_SVST1_5_7I47_72.vhd ├── PIN_SVST24_24_7I52S_144.vhd ├── PIN_SVST2_4_7I47_48.vhd ├── PIN_SVST2_4_7I47_72.vhd ├── PIN_SVST2_4_7I47_96.vhd ├── PIN_SVST2_8_72.vhd ├── PIN_SVST2_8_GREG_72.vhd ├── PIN_SVST4_12NA_48.vhd ├── PIN_SVST4_12_48.vhd ├── PIN_SVST4_4IM2SI_72.vhd ├── PIN_SVST4_4NA_48.vhd ├── PIN_SVST4_4_48.vhd ├── PIN_SVST4_6NA_48.vhd ├── PIN_SVST4_6_48.vhd ├── PIN_SVST4_8_72.vhd ├── PIN_SVST4_8_ADO_72.vhd ├── PIN_SVST4_8_i90_72.vhd ├── PIN_SVST6_1_72.vhd ├── PIN_SVST6_4_7I52S_72.vhd ├── PIN_SVST6_6_7I48_48.vhd ├── PIN_SVST6_6_7I48_72.vhd ├── PIN_SVST6_6_7I52S_48.vhd ├── PIN_SVST6_6_7I52S_72.vhd ├── PIN_SVST6_6_RUDY_72.vhd ├── PIN_SVST8_10_MIKA_CPR_96.vhd ├── PIN_SVST8_12_2x7I47_72.vhd ├── PIN_SVST8_24_96.vhd ├── PIN_SVST8_3P_72.vhd ├── PIN_SVST8_4IM2SI_72.vhd ├── PIN_SVST8_4IM2_72.vhd ├── PIN_SVST8_4P_72.vhd ├── PIN_SVST8_4_72.vhd ├── PIN_SVST8_4_7I47_72.vhd ├── PIN_SVST8_8IM2_72.vhd ├── PIN_SVST8_8_96.vhd ├── PIN_SVSTSP8_12_6_96.vhd ├── PIN_SVSTTP6_5_7I39_72.vhd ├── PIN_SVSTTP6_6_12_96.vhd ├── PIN_SVSTTP6_6_7I39_72.vhd ├── PIN_SVSTUA6_6_6_7I48_72.vhd ├── PIN_SVSTUA6_6_8_7I48_72.vhd ├── PIN_SVTP2_SI2_UA4.vhd ├── PIN_SVTP4_7I39_48.vhd ├── PIN_SVTP6_7I39_72.vhd ├── PIN_SVTW4_1_10_72.vhd ├── PIN_SVTW4_24_24_48.vhd ├── PIN_SVTW8_24_24_72.vhd ├── PIN_SVUA4_8_48.vhd ├── PIN_SVUA6_6_72.vhd ├── PIN_SVUA8_4_72.vhd ├── PIN_SVUA8_8_72.vhd ├── PIN_SVWG8_2IM2_72.vhd ├── PIN_SVWG8_8IM2_72.vhd ├── PIN_SYIL1_34.vhd ├── PIN_SYILX2_34.vhd ├── PIN_TEMP_7I47_48.vhd ├── PIN_TPEN4_5_48.vhd ├── PIN_TPEN6_6_72.vhd ├── PIN_UA12_64.vhd ├── PIN_UA2_34.vhd ├── PIN_UASVST2_2_4_7I47_72.vhd ├── PIN_enslavko_48.vhd ├── PIN_zenbot.vhd ├── PinExists.vhd ├── Sixi25_x9card.vhd ├── Top9030HostMot2.vhd ├── Top9054HostMot2.vhd ├── TopEPPHostMot2.vhd ├── TopEPPSHostMot2.vhd ├── TopEPPSHostMot2b.vhd ├── TopEthernet16HostMot2.vhd ├── TopGCSPIHostMot2.vhd ├── TopPCIHostMot2.vhd ├── TopSSremote.vhd ├── TopSerial16HostMot2.vhd ├── TopUSBHostMot2.vhd ├── adpram.vhd ├── atrans.vhd ├── b32qcondmac.vhd ├── b32qcondmac2w.vhd ├── b32test.vhd ├── binosc.vhd ├── biss.vhd ├── biss_loop.vhd ├── boutreg.vhd ├── bufferedspi.vhd ├── d16w.vhd ├── d8o8.vhd ├── d8o8sq.vhd ├── d8o8sqw.vhd ├── d8o8sqws.vhd ├── daqfifo16.vhd ├── decodedstrobe.vhd ├── decodedstrobe2.vhd ├── dpll.vhd ├── dpram.vhd ├── drqlogic.vhd ├── etherhm2.vhd ├── etherhm2.zip ├── fanucabs.vhd ├── fixicap.vhd ├── hmtimers.vhd ├── hostmot2.vhd ├── hostmotid.vhd ├── i20card.vhd ├── i21card.vhd ├── i22_1000card.vhd ├── i22_1500card.vhd ├── i23card.vhd ├── i24_x16card.vhd ├── i24_x25card.vhd ├── i25_x9card.vhd ├── i43_200card.vhd ├── i43_400card.vhd ├── i61_x16card.vhd ├── i61_x25card.vhd ├── i65card.vhd ├── i68card.vhd ├── i69_x16card.vhd ├── i69_x25card.vhd ├── i74_x9card.vhd ├── i76e_x16card.vhd ├── i77e_x9card.vhd ├── i80db_x16card.vhd ├── i80db_x25card.vhd ├── i80hd_x16card.vhd ├── i80hd_x25card.vhd ├── i90_x9card.vhd ├── idrom.vhd ├── idrom_tools.vhd ├── irqlogic.vhd ├── irqlogics.vhd ├── kubstepgenz.vhd ├── kubstepgenzi.vhd ├── log2.vhd ├── mux1.vhd ├── oneofndecode.vhd ├── parity.vhd ├── pinmaker.vhd.in ├── pktuartr.vhd ├── pktuartr16.vhd ├── pktuartr8.vhd ├── pktuartx.vhd ├── pktuartx16.vhd ├── pktuartx8.vhd ├── pwmpdmgenh.vhd ├── pwmrefh.vhd ├── qcounterate.vhd ├── qcounteratesk.vhd ├── qcountersf.vhd ├── qcountersfp.vhd ├── regmap ├── resmod.zip ├── resolver.vhd ├── resolverdaq2.vhd ├── resrom.vhd ├── resroms.vhd ├── scalercounter.vhd ├── scalertimer.vhd ├── serhm2.zip ├── serialhm2.vhd ├── sigma5enc.vhd ├── simplespi8.vhd ├── simplespi8x.vhd ├── simplespix.vhd ├── simplessi.vhd ├── sine16.vhd ├── srl16delay.vhd ├── sserial.vhd ├── sserialwa.vhd ├── sslbp.zip ├── sslbpram.vhd ├── sslbprom.vhd ├── sslbprom42.vhd ├── sslbprom43.vhd ├── ssremote.vhd ├── ssremote.zip ├── syncwavegen.vhd ├── testram.vhd ├── testrom.vhd ├── threephasepwm.vhd ├── timestamp.vhd ├── twiddle.vhd ├── twidrom.vhd ├── uartr.vhd ├── uartr8.vhd ├── uartx.vhd ├── uartx8.vhd ├── ubrategen.vhd ├── usbram.vhd ├── usbrom.vhd ├── watchdog.vhd ├── wavegen.vhd ├── waveram.vhd ├── wordpr.vhd ├── wordrb.vhd ├── x20_1000card.vhd ├── x20_1500card.vhd ├── x20_2000card.vhd └── xmlrom.vhd.in /.gitignore: -------------------------------------------------------------------------------- 1 | /firmwares.mk 2 | /firmwares-local.mk 3 | /firmwares-local.txt 4 | /fw 5 | /dist 6 | /debian/control 7 | /debian/*.files 8 | /debian/files 9 | /debian/hostmot2-firmware-* 10 | /debian/tmp 11 | *.py[co] 12 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | hostmot2-firmware (0.8) lucid; urgency=low 2 | 3 | * new firmwares: 5i20/SV12_2X7I48 5i20/SVTP_7I39 ti23/SVTP6_7I39 4 | * new upstream vhdl files 5 | * improved build process (some error exits were not detected) 6 | * improved documentation for those who would like to build their own 7 | firmwares 8 | 9 | -- Jeff Epler Sun, 19 Dec 2010 10:25:52 -0600 10 | 11 | hostmot2-firmware (0.7) hardy; urgency=low 12 | 13 | * New firmware SVST2_4_7i47 for 5i20 (servo and stepper pinout for 7i47 14 | daughtercard) 15 | * new firmware TPEN6_6 for 5i20, 5i23, 4i68 and TPEN4_5 for 7i43 16 | (three-phase motor control, currently compatible with emc2 master only) 17 | * Fix the hostmot2-firmware-all package so that it actually installs all 18 | the firmware packages. 19 | 20 | -- Jeff Epler Mon, 05 Jul 2010 13:30:48 -0500 21 | 22 | hostmot2-firmware (0.6) hardy; urgency=low 23 | 24 | * New xml files describing firmware information in a machine-readable 25 | fashion. The exact format should be considered "in flux" until a released 26 | version of pncconf uses it. 27 | * Show better information about stepgen and tppwm pins in PIN and xml 28 | files 29 | * Fix dependency information that could lead to out-of-date BIT files. 30 | 31 | -- Jeff Epler Tue, 27 Apr 2010 07:37:33 -0500 32 | 33 | hostmot2-firmware (0.5) hardy; urgency=low 34 | 35 | * New firmwares: i22-*/SVST2_4_7I47, i20/SV12IM_2X7I48 36 | * Symlinks for compatibility with emc 2.3 firmware locations 37 | * .PIN files in documentation directory, not in /lib/firmware 38 | 39 | -- Jeff Epler Thu, 25 Feb 2010 15:05:03 -0600 40 | 41 | hostmot2-firmware (0.4) hardy; urgency=low 42 | 43 | * Tidy up various things 44 | 45 | -- Jeff Epler Wed, 03 Feb 2010 17:25:15 -0600 46 | 47 | hostmot2-firmware (0.3) unstable; urgency=low 48 | 49 | * Initial release. 50 | 51 | -- Jeff Epler Sat, 23 Jan 2010 10:29:26 -0600 52 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /debian/compat_symlinks: -------------------------------------------------------------------------------- 1 | 7i43-2/SVST4_4.BIT 7i43/SVST4_4S.BIT 2 | 7i43-2/SVST4_6.BIT 7i43/SVST4_6S.BIT 3 | 7i43-2/SVST8.BIT 7i43/SV8S.BIT 4 | 7i43-4/SVST4_12.BIT 7i43/SVST4_12B.BIT 5 | 7i43-4/SVST4_4.BIT 7i43/SVST4_4B.BIT 6 | 7i43-4/SVST4_6.BIT 7i43/SVST4_6B.BIT 7 | 7i43-4/SVST8.BIT 7i43/SV8B.BIT 8 | 5i22-1/SVST8_8.BIT 5i22/SVST8_8S.BIT 9 | 5i22-1/SV16.BIT 5i22/SV16S.BIT 10 | 5i22-1/SVST8_24.BIT 5i22/SVST824S.BIT 11 | 5i22-1.5/SVST8_8.BIT 5i22/SVST8_8B.BIT 12 | 5i22-1.5/SV16.BIT 5i22/SV16B.BIT 13 | 5i22-1.5/SVST8_24.BIT 5i22/SVST824B.BIT 14 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 2 | http://www.mesanet.com 3 | 4 | This program is is licensed under a disjunctive dual license giving you 5 | the choice of one of the two following sets of free software/open source 6 | licensing terms: 7 | 8 | * GNU General Public License (GPL), version 2.0 or later 9 | * 3-clause BSD License 10 | 11 | 12 | The GNU GPL v2 License is available here: 13 | 14 | /usr/share/common-licenses/GPL-2 15 | 16 | The BSD License is available here: 17 | 18 | /usr/share/common-licenses/BSD 19 | 20 | -------------------------------------------------------------------------------- /debian/gencontrol: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # coding=utf-8 3 | # build hostmot2 firmwares 4 | # Copyright © 2009 Jeff Epler 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | import os 20 | import sys 21 | 22 | sys.path.insert(0, 23 | os.path.join( 24 | os.path.dirname(os.path.dirname(os.path.normpath(__file__))), 25 | 'scripts')) 26 | import cards 27 | 28 | path_compat = { 29 | 'i43_200': '7i43/*S.BIT', 30 | 'i43_400': '7i43/*B.BIT', 31 | 'i22_1000': '5i22/*S.BIT', 32 | 'i22_1500': '5i22/*B.BIT', 33 | } 34 | 35 | # this one turns *off* all the actual firmware packages, but does not turn off the "-all" package 36 | only_build_all_deb = False 37 | 38 | # this one turns *on* the "-all" package 39 | build_all_deb = True 40 | 41 | if len(sys.argv) > 1: 42 | if sys.argv[1] == '--all-only': 43 | only_build_all_deb = True 44 | 45 | if sys.argv[1] == '--no-all': 46 | build_all_deb = False 47 | 48 | all_cards = [] 49 | for line in open("firmwares.txt"): 50 | line = line.strip() 51 | if not line or line.startswith("#"): continue 52 | line = line.split() 53 | card = line[0] 54 | if card not in all_cards: all_cards.append(card) 55 | 56 | if not only_build_all_deb: 57 | for card in all_cards: 58 | card = cards.get_card(card) 59 | p = card.path 60 | f = open("debian/hostmot2-firmware-%s.install" % p, "w") 61 | f.write("/lib/firmware/hm2/%s/*.BIT\n" % p) 62 | f.write("/lib/firmware/hm2/%s/*.xml\n" % p) 63 | c = path_compat.get(card, None) 64 | if c: 65 | f.write("lib/firmware/hm2/%s\n" % c) 66 | f = open("debian/hostmot2-firmware-%s.docs" % p, "w") 67 | f.write("fw/%s/*.PIN\n" % p) 68 | 69 | f = open("debian/control", "w") 70 | f.write("""\ 71 | Source: hostmot2-firmware 72 | Section: misc 73 | Priority: extra 74 | Build-Depends: debhelper 75 | Maintainer: Jeff Epler 76 | 77 | """) 78 | 79 | if build_all_deb: 80 | f.write("""\ 81 | Package: hostmot2-firmware-all 82 | Architecture: all 83 | Depends: %s 84 | Description: Meta-package to install all hostmot2 firmwares 85 | This is an empty package that depends on all the separately packaged 86 | firmware images used by EMC2. If your configuration does not need 87 | any firmware, you can safely remove this package. If you know which 88 | specific hostmot2-firmware-* package you need, you can remove this package 89 | and install just the one you need. 90 | 91 | """ % ", ".join("hostmot2-firmware-%s" % cards.get_card(card).path for card in all_cards)) 92 | 93 | if not only_build_all_deb: 94 | for card in all_cards: 95 | card = cards.get_card(card) 96 | f.write("""\ 97 | Package: hostmot2-firmware-%(card)s 98 | Enhances: linuxcnc, linuxcnc-uspace 99 | Architecture: all 100 | Description: HostMot2 firmware images for %(cardname)s 101 | This package contains HostMot2 firmware images for the %(cardname)s 102 | "Anything I/O" board. If you don't use a %(cardname)s you can safely 103 | remove this package. 104 | 105 | """ % {'oldcard': card.path.split("-")[0], 'card': card.path, 'cardname': card.humanname}) 106 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | 4 | build: 5 | $(MAKE) $(MAKEFLAGS) 6 | 7 | install: build 8 | dh $@ 9 | 10 | override_dh_install: 11 | mkdir -p debian/tmp/lib/firmware/hm2 12 | (cd fw; find -name "*.BIT" -or -name "*.xml" | cpio -o) \ 13 | | (cd debian/tmp/lib/firmware/hm2; cpio -i --make-directories) 14 | while read a b; do \ 15 | if [ -f debian/tmp/lib/firmware/hm2/$$a ]; then \ 16 | ( \ 17 | cd debian/tmp/lib/firmware/hm2; \ 18 | mkdir -p `dirname $$b`; \ 19 | ln -sf ../$$a $$b; \ 20 | ); \ 21 | fi; \ 22 | done < debian/compat_symlinks 23 | dh_install 24 | 25 | override_dh_installdocs: 26 | dh_installdocs -A README.md src/regmap 27 | 28 | binary: binary-indep 29 | binary-indep: install debian/control 30 | dh $@ 31 | 32 | debian/control: debian/gencontrol firmwares.txt 33 | debian/gencontrol 34 | 35 | clean: 36 | dh $@ 37 | rm -rf fw firmwares.mk 38 | 39 | .PHONY: check-xst build binary binary-indep clean 40 | # vim:sw=8:sts=8:ts=8:noet 41 | -------------------------------------------------------------------------------- /firmwares.txt: -------------------------------------------------------------------------------- 1 | i90epp SVST8_4 2 | i90spi SVST8_4 3 | i80db25 7I76x2_7I77x2 4 | i80hd25 SVST8_4 5 | i80db16 7I76x3 6 | i80hd16 SVST8_4 7 | x20_1000 SV24 SVST16_24 8 | i22_1500 SV16 SVST8_24 SVST8_8 SVST2_4_7I47 9 | i22_1000 SV16 SVST8_24 SVST8_8 SVST2_4_7I47 10 | i23 SV12 SVST2_4_7I47 SVST4_8 SVST8_4 SVST8_4IM2 SVST8_8IM2 TPEN6_6 SVTP6_7I39 11 | i68 SV12 SVST2_4_7I47 SVST4_8 SVST8_4 SVST8_4IM2 SVST8_8IM2 TPEN6_6 12 | i43_400 SV8 SVST4_12 SVST4_4 SVST4_6 TPEN4_5 SV6_7I48 13 | i43_200 SV8 SVST4_4 TPEN4_5 14 | i20 SV12 SVST2_4_7I47 SVST2_8 SVST8_4 SVST8_4IM2 SVST8_3P SV12IM_2X7I48_72 SV12_2X7I48_72 TPEN6_6 SVTP6_7I39 15 | i65 SV12 SVST8_4 SVST8_4IM2 TPEN6_6 16 | i24 SVST2_8 17 | i25 STSV6_1 18 | -------------------------------------------------------------------------------- /scripts/DESCRIBE: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ -f VERSION ]; then exec cat VERSION; fi 3 | 4 | desc () { 5 | if ! test -d .git ; then 6 | echo 'not git' 7 | else 8 | git describe --dirty 9 | fi 10 | } 11 | 12 | desc | sed s/^v// 13 | -------------------------------------------------------------------------------- /scripts/firmwares.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # coding=utf-8 3 | # build hostmot2 firmwares 4 | # Copyright © 2009 Jeff Epler 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | import os 20 | import sys 21 | 22 | import cards 23 | 24 | def existing(*names): 25 | for n in names: 26 | if os.path.isfile("src/" + n): return n 27 | raise IOError, "Could not find a candidate from %r" % (names,) 28 | 29 | def pin(card, fw): 30 | if fw.endswith("B") or fw.endswith("S"): fw = fw[:-1] 31 | return existing("PIN_%s.vhd" % fw, "PIN_%s_%d.vhd" % (fw, card.pins))[4:-4] 32 | 33 | def gen(card, fw): 34 | print "$(eval $(call FIRMWARE_template,fw/%s/%s,%s,%s,%s))" % ( 35 | card.path, fw, card.__name__, pin(card, fw), card.path) 36 | all_cards = [] 37 | for line in open(sys.argv[1]): 38 | line = line.strip() 39 | if not line or line.startswith("#"): continue 40 | line = line.split() 41 | card = line[0] 42 | if card not in all_cards: all_cards.append(card) 43 | card = getattr(cards, card) 44 | for fw in line[1:]: 45 | gen(card, fw) 46 | 47 | for card in all_cards: 48 | card = cards.get_card(card) 49 | print "$(eval $(call CARD_template,%s))" % card.path 50 | -------------------------------------------------------------------------------- /scripts/get-version-from-git: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source $(git rev-parse --show-toplevel)/scripts/githelper.sh 4 | 5 | githelper $1 6 | 7 | if [ "$DEB_COMPONENT" = "scratch" ]; then 8 | # unknown branches get the VERSION file, plus the branch name (with any 9 | # characters that are invalid in debian version numbers replaced with 10 | # dashes '-'), plus the HEAD commit SHA1 11 | echo $(git describe --match "$GIT_TAG")~${GIT_BRANCH//[^-.+:~a-z0-9]/-}~$(git show --pretty=format:%h HEAD | head -1) 12 | else 13 | # known branches get the "describe" of the most recent signed git tag, 14 | # or of the most recent unsigned tag if no signed tags are found 15 | git describe --match "$GIT_TAG" 16 | fi 17 | 18 | -------------------------------------------------------------------------------- /scripts/githelper.sh: -------------------------------------------------------------------------------- 1 | # 2 | # This is a bash shell fragment, intended to be sourced by scripts that 3 | # want to work with git in the Hostmot2 Firmware repo. 4 | # 5 | # Sets GIT_BRANCH to the passed in branch name; if none is passed in it 6 | # attempts to detect the current branch (this will fail if the repo is in a 7 | # detached HEAD state). 8 | # 9 | # Sets DEB_COMPONENT based on the branch. Official release branches get 10 | # their own component, all other branches go in "scratch". 11 | # 12 | # Sets GIT_TAG to the most recent signed tag (this will fall back to the 13 | # most recent tag of any kind if no signed tag is found). 14 | # 15 | 16 | 17 | function githelper() { 18 | if [ -z "$1" ]; then 19 | GIT_BRANCH=$(git branch | egrep '^\*' | cut -d ' ' -f 2) 20 | if [ "$GIT_BRANCH" = "(no" ]; then 21 | echo "'git branch' says we're not on a branch, pass one in as an argument" > /dev/null 1>&2 22 | return 23 | fi 24 | else 25 | GIT_BRANCH="$1" 26 | fi 27 | 28 | case $GIT_BRANCH in 29 | master) 30 | GIT_TAG_GLOB="v1.*" 31 | DEB_COMPONENT="master" 32 | ;; 33 | v0) 34 | GIT_TAG_GLOB="v0.*" 35 | DEB_COMPONENT="v0" 36 | ;; 37 | *) 38 | GIT_TAG_GLOB="*" 39 | DEB_COMPONENT="scratch" 40 | ;; 41 | esac 42 | 43 | 44 | NEWEST_SIGNED_TAG_UTIME=-1 45 | NEWEST_UNSIGNED_TAG_UTIME=-1 46 | for TAG in $(git tag -l "$GIT_TAG_GLOB"); do 47 | if ! git cat-file tag $TAG > /dev/null 2> /dev/null; then 48 | continue 49 | fi 50 | 51 | TAG_UTIME=$(git cat-file tag $TAG | grep tagger | awk '{print $(NF-1)-$NF*36}') 52 | 53 | if git tag -v "$TAG" > /dev/null 2> /dev/null; then 54 | # it's a valid signed tag 55 | if [ $TAG_UTIME -gt $NEWEST_SIGNED_TAG_UTIME ]; then 56 | NEWEST_SIGNED_TAG=$TAG 57 | NEWEST_SIGNED_TAG_UTIME=$TAG_UTIME 58 | fi 59 | else 60 | # unsigned tag 61 | if [ $TAG_UTIME -gt $NEWEST_UNSIGNED_TAG_UTIME ]; then 62 | NEWEST_UNSIGNED_TAG=$TAG 63 | NEWEST_UNSIGNED_TAG_UTIME=$TAG_UTIME 64 | fi 65 | fi 66 | 67 | done 68 | 69 | if [ $NEWEST_SIGNED_TAG_UTIME -gt -1 ]; then 70 | GIT_TAG="$NEWEST_SIGNED_TAG" 71 | return 72 | fi 73 | 74 | if [ $NEWEST_UNSIGNED_TAG_UTIME -gt -1 ]; then 75 | echo "no signed tags found, falling back to unsigned tags" > /dev/null 1>&2 76 | GIT_TAG="$NEWEST_UNSIGNED_TAG" 77 | return 78 | fi 79 | 80 | echo "no annotated tags found, not even unsigned" > /dev/null 1>&2 81 | } 82 | 83 | -------------------------------------------------------------------------------- /scripts/iselib.py: -------------------------------------------------------------------------------- 1 | import glob 2 | import os 3 | import re 4 | import string 5 | import sys 6 | import time 7 | 8 | settings_sh = None 9 | 10 | def subst(in_, out, **kw): 11 | def rfn(m): 12 | g = m.group(1) 13 | if g == '': return '@' 14 | return kw[g.upper()] 15 | r = re.compile("@([^@]*)@") 16 | s = open(in_).read() 17 | s = r.sub(rfn, s) 18 | open(out, "w").write(s) 19 | 20 | _sq_whitelist = string.lowercase + string.uppercase + string.digits + ".-_/" 21 | def sq(a): 22 | if not a.strip(_sq_whitelist): 23 | return a 24 | return "'" + a.replace("'", "'\\''") + "'" 25 | 26 | timing = [] 27 | 28 | def run(*args): 29 | cmd = " ".join(sq(a) for a in args) 30 | if settings_sh is None: 31 | raise RuntimeError, "Must call use_ise() before run()" 32 | # xilinx 13.3's settings32.sh uses bashisms 33 | cmd = "bash -c '. %s; %s'" % (settings_sh, cmd) 34 | print "#", cmd 35 | sys.stdout.flush() 36 | t0 = time.time() 37 | r = os.system(cmd) 38 | print "# exited with", r; sys.stdout.flush() 39 | t1 = time.time() 40 | timing.append((args[0], (t1-t0))) 41 | if r: 42 | raise SystemExit, os.WEXITSTATUS(r) or 1 43 | 44 | def guess_ise_version(): 45 | with os.popen("map -h | head -1") as p: 46 | info = p.read() 47 | info = info.split()[1].split(".")[0] 48 | try: 49 | return int(info) 50 | except: 51 | return None 52 | 53 | def use_ise(iseversions): 54 | global settings_sh 55 | # Xilinx Webpack 10.1 and 13.3 both install into /opt/Xilinx/, 56 | # into 10.1/ and 13.3/. 57 | # 10.1's settings are in ISE/settings32.sh 58 | # 13.3's settings are in ISE_DS/settings32.sh 59 | for ise in iseversions: 60 | localsettings = os.path.abspath("settings%d.sh" % ise) 61 | if os.path.exists(localsettings): 62 | if os.path.islink(localsettings): localsettings = os.readlink(localsettings) 63 | settings_sh = localsettings 64 | break 65 | 66 | files = glob.glob('/opt/Xilinx/%s/*/settings64.sh' % ise) 67 | if len(files) > 1: 68 | print "multiple settings files found!", files 69 | raise SystemExit, 1 70 | if len(files) == 1: 71 | settings_sh = files[0] 72 | break 73 | 74 | files = glob.glob('/opt/Xilinx/%s.*/*/settings64.sh' % ise) 75 | if len(files) == 1: 76 | settings_sh = files[0] 77 | break 78 | if len(files) > 1: 79 | # use the newest one: sort by minor version since the major versions are all the same 80 | files = sorted(files, key=lambda f: int((f.split('/')[3]).split('.')[1])) 81 | settings_sh = files[-1] 82 | break 83 | 84 | else: 85 | raise SystemExit("Firmware requires one of these ise major versions to build: %s" 86 | % " ".join(map(str, iseversions))) 87 | 88 | print "using Xilinx Webpack settings '%s'" % settings_sh 89 | 90 | def report_timing(): 91 | t = m = s = 0 92 | for k, v in timing: 93 | t += v 94 | m, s = divmod(v, 60) 95 | print "%d:%04.1f-%-11s" % (m, s, k), 96 | print "%d:%04.1f-total" % (m, s) 97 | print 98 | 99 | -------------------------------------------------------------------------------- /scripts/mktar.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import sys 3 | import tarfile 4 | import gzip 5 | import os 6 | 7 | tarname, pattern, replacement = sys.argv[1:4] 8 | members = sys.argv[4:] 9 | 10 | gz = gzip.open(tarname+".tmp", 'wb') 11 | z = tarfile.TarFile(tarname, 'w', fileobj=gz) 12 | for m in members: 13 | zfn = m.replace(pattern, replacement) 14 | z.add(m, zfn) 15 | z.close() 16 | gz.close() 17 | os.rename(tarname+".tmp", tarname) 18 | -------------------------------------------------------------------------------- /scripts/mkvertar.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import tarfile 3 | import sys 4 | import StringIO 5 | import time 6 | 7 | tarname, version = sys.argv[1:] 8 | 9 | tardata = sys.stdin.read() 10 | tarstream = StringIO.StringIO(tardata) 11 | 12 | verstream = StringIO.StringIO(version+"\n") 13 | verinfo = tarfile.TarInfo("%sVERSION" % tarname) 14 | verinfo.mode = 0664 15 | verinfo.size = len(verstream.getvalue()) 16 | verinfo.mtime = time.time() 17 | 18 | tar = tarfile.TarFile(mode='a', fileobj=tarstream) 19 | tar.addfile(verinfo, verstream) 20 | tar.close() 21 | 22 | sys.stdout.write(tarstream.getvalue()) 23 | -------------------------------------------------------------------------------- /scripts/pin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # coding=utf-8 3 | # build hostmot2 firmwares 4 | # Copyright © 2009 Jeff Epler 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | import atexit 20 | import os 21 | import shutil 22 | import string 23 | import sys 24 | import re 25 | import tempfile 26 | import cards 27 | from iselib import * 28 | 29 | card = sys.argv[1] 30 | card = cards.get_card(card) 31 | pinvhdl = sys.argv[2] 32 | cardvhdl = card.name + "card" 33 | 34 | def p(*x): return os.path.join(d, *x) 35 | 36 | def subst(in_, out, **kw): 37 | def rfn(m): 38 | g = m.group(1) 39 | if g == '': return '@' 40 | return kw[g.upper()] 41 | r = re.compile("@([^@]*)@") 42 | s = open(in_).read() 43 | s = r.sub(rfn, s) 44 | open(out, "w").write(s) 45 | 46 | d = tempfile.mkdtemp(prefix='hm2') 47 | print >>sys.stderr, "# tempdir", sq(d) 48 | atexit.register(shutil.rmtree, d) 49 | 50 | sources = [ 51 | 'src/IDROMConst.vhd', 'src/idrom_tools.vhd', 'src/PIN_%s.vhd' % pinvhdl, 52 | 'src/%s.vhd' % cardvhdl, p("pinmaker.vhd")] 53 | sources = [os.path.abspath(s) for s in sources] 54 | subst(sys.argv[3], p("pinmaker.vhd"), PIN=pinvhdl, CARD=cardvhdl, OUT=os.path.abspath(sys.argv[4])) 55 | 56 | use_ise((13,10,9)) 57 | 58 | with open(p("prj"), "wt") as f: 59 | for s in sources: 60 | print >>f, "vhdl work", s 61 | with open(p("scr"), "wt") as f: 62 | print >>f, "run all\nexit" 63 | 64 | os.chdir(d) 65 | run("fuse", "-prj", "prj", "-o", "main", "pinmaker_%s" % pinvhdl) 66 | run("./main", "-tclbatch", "scr") 67 | -------------------------------------------------------------------------------- /scripts/pinxml.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # coding=utf-8 3 | # build hostmot2 firmwares 4 | # Copyright © 2009 Jeff Epler 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | import atexit 20 | import os 21 | import shutil 22 | import string 23 | import sys 24 | import re 25 | import tempfile 26 | import cards 27 | 28 | card = sys.argv[1] 29 | card = cards.get_card(card) 30 | pinvhdl = sys.argv[2] 31 | cardvhdl = card.name + "card" 32 | 33 | _sq_whitelist = string.lowercase + string.uppercase + string.digits + ".-_/" 34 | def sq(a): 35 | if not a.strip(_sq_whitelist): 36 | return a 37 | return "'" + a.replace("'", "'\\''") + "'" 38 | 39 | def run(*args): 40 | print >>sys.stderr, "#", " ".join([sq(a) for a in args]) 41 | r = os.spawnvp(os.P_WAIT, args[0], args) 42 | print >>sys.stderr, "# exited with", r 43 | if r: 44 | raise SystemExit, r 45 | 46 | def p(*x): return os.path.join(d, *x) 47 | 48 | def subst(in_, out, **kw): 49 | def rfn(m): 50 | g = m.group(1) 51 | if g == '': return '@' 52 | return kw[g.upper()] 53 | r = re.compile("@([^@]*)@") 54 | s = open(in_).read() 55 | s = r.sub(rfn, s) 56 | open(out, "w").write(s) 57 | 58 | d = tempfile.mkdtemp(prefix='hm2') 59 | print >>sys.stderr, "# tempdir", sq(d) 60 | atexit.register(shutil.rmtree, d) 61 | 62 | shutil.copy("IDROMConst.vhd", p("IDROMConst.vhd")) 63 | shutil.copy("idrom_tools.vhd", p("idrom_tools.vhd")) 64 | shutil.copy("PIN_%s.vhd" % pinvhdl, p("PIN_%s.vhd") % pinvhdl) 65 | shutil.copy("%s.vhd" % cardvhdl, p("%s.vhd") % cardvhdl) 66 | subst("xmlrom.vhd.in", p("xmlrom_%s.vhd") % pinvhdl, 67 | PIN=pinvhdl, CARD=cardvhdl) 68 | 69 | orgdir = os.getcwd() 70 | os.chdir(d) 71 | run("ghdl", "-a", "-fexplicit", "--ieee=synopsys", 72 | "IDROMConst.vhd", 73 | "idrom_tools.vhd", 74 | "PIN_%s.vhd" % pinvhdl, 75 | "%s.vhd" % cardvhdl, 76 | "xmlrom_%s.vhd" % pinvhdl) 77 | run("ghdl", "-e", "-fexplicit", "--ieee=synopsys", "xmlrom_%s" % pinvhdl) 78 | run("ghdl", "-r", "xmlrom_%s" % pinvhdl) 79 | -------------------------------------------------------------------------------- /scripts/update-dch-from-git: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCE_PACKAGE_NAME=hostmot2-firmware 4 | BUILDER_NAME="Hostmot2 Buildbot" 5 | BUILDER_EMAIL="hm2-buildbot@linuxcnc.org" 6 | 7 | 8 | if [ ! -d debian -o ! -d scripts ]; then 9 | echo "this script must be run from the root of the source tree (the directory with debian and scripts in it)" 10 | exit 1 11 | fi 12 | 13 | 14 | source scripts/githelper.sh 15 | githelper $1 16 | 17 | GIT_VERSION=$(scripts/get-version-from-git $GIT_BRANCH) 18 | if [ $? -ne 0 ]; then 19 | echo "error determining version!" 20 | exit 1 21 | fi 22 | 23 | DEB_VERSION=`git show HEAD:debian/changelog | head -1 | sed 's/.*(\(.*\)).*/\1/'` 24 | 25 | NEW_DEB_VERSION=$(echo $GIT_VERSION | sed -r 's/-pre/~pre/; s/-/./g') 26 | NEW_DEB_VERSION=${NEW_DEB_VERSION/v/} 27 | 28 | if [ "$NEW_DEB_VERSION" = "$DEB_VERSION" ]; then 29 | echo "no changes since the version at the top of the debian/changelog file" 30 | echo "not modifying debian/changelog" 31 | exit 0 32 | fi 33 | 34 | set -e 35 | ( 36 | echo "$SOURCE_PACKAGE_NAME ($NEW_DEB_VERSION) $(lsb_release -cs); urgency=low" 37 | echo 38 | git log --pretty=format:" * %w(72,0,6)%s" $GIT_TAG.. 39 | echo 40 | echo 41 | echo " -- $BUILDER_NAME <$BUILDER_EMAIL> $(date -R)" 42 | echo 43 | git show HEAD:debian/changelog 44 | ) > debian/changelog 45 | 46 | dch -r --nomultimaint "" 47 | -------------------------------------------------------------------------------- /src/CountPinsInRange.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package CountPinsInRange is 72 | function CountPinsInRange(PD : PinDescType; Tag : std_logic_vector(7 downto 0); low : std_logic_vector(7 downto 0); high:std_logic_vector(7 downto 0)) return integer; 73 | end CountPinsInRange; 74 | 75 | package body CountPinsInRange is 76 | 77 | function CountPinsInRange(PD : PinDescType; Tag : std_logic_vector(7 downto 0); low : std_logic_vector(7 downto 0); high:std_logic_vector(7 downto 0)) return integer is 78 | variable result: integer; 79 | begin 80 | result := 0; 81 | for i in 0 to MaxPins-1 loop 82 | if (Tag = PD(i)(15 downto 8)) and (PD(i)(23 downto 16) = x"00") then -- if GTag matches and first instance 83 | if (PD(i)(7 downto 0) >= conv_integer(low)) and (PD(i)(7 downto 0) <= conv_integer(high)) then -- in range 84 | result := result+1; -- count pins that match GTag and in range 85 | end if; 86 | end if; 87 | end loop; 88 | return result; 89 | end; 90 | end CountPinsInRange; -------------------------------------------------------------------------------- /src/InputPinsPerModule.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package InputPinsPerModule is 72 | function InputPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0); Instance : integer) return integer; 73 | end InputPinsPerModule; 74 | 75 | package body InputPinsPerModule is 76 | 77 | function InputPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0); Instance : integer) return integer is 78 | variable result: integer; 79 | begin 80 | result := 0; 81 | for i in 0 to MaxPins-1 loop 82 | if Instance = PD(i)(23 downto 16) then -- if instance matches 83 | if PD(i)(7) = '0' then -- and its an input 84 | if Tag = PD(i)(15 downto 8) then -- if GTag matches 85 | if PD(i)(5 downto 0) > result then -- drop MSB and NMSB to allow 2 input types 86 | result := conv_integer(PD(i)(5 downto 0)); -- find max (63 max) 87 | end if; 88 | end if; 89 | end if; 90 | end if; 91 | end loop; 92 | return result; 93 | end; 94 | end InputPinsPerModule; -------------------------------------------------------------------------------- /src/MaxIOPinsPerModule.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package MaxIOPinsPerModule is 72 | function MaxIOPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0)) return integer; 73 | end MaxIOPinsPerModule; 74 | 75 | package body MaxIOPinsPerModule is 76 | 77 | function MaxIOPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0)) return integer is 78 | variable result: integer; 79 | begin 80 | result := 0; 81 | for i in 0 to MaxPins-1 loop 82 | if Tag = PD(i)(15 downto 8) then -- if GTag matches 83 | if PD(i)(7 downto 6) = "11" then -- and its an IO 84 | if PD(i)(5 downto 0) > result then -- drop MSB and NMSB to allow 2 IO types 85 | result := conv_integer(PD(i)(5 downto 0)); -- find max (63 max) 86 | end if; 87 | end if; 88 | end if; 89 | end loop; 90 | return result; 91 | end; 92 | end MaxIOPinsPerModule; -------------------------------------------------------------------------------- /src/MaxInputPinsPerModule.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package MaxInputPinsPerModule is 72 | function MaxInputPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0)) return integer; 73 | end MaxInputPinsPerModule; 74 | 75 | package body MaxInputPinsPerModule is 76 | 77 | function MaxInputPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0)) return integer is 78 | variable result: integer; 79 | begin 80 | result := 0; 81 | for i in 0 to MaxPins-1 loop 82 | if Tag = PD(i)(15 downto 8) then -- if GTag matches 83 | if PD(i)(7) = '0' then -- and its an input 84 | if PD(i)(5 downto 0) > result then -- drop MSB and NMSB to allow 2 input types 85 | result := conv_integer(PD(i)(5 downto 0)); -- find max (63 max) 86 | end if; 87 | end if; 88 | end if; 89 | end loop; 90 | return result; 91 | end; 92 | end MaxInputPinsPerModule; -------------------------------------------------------------------------------- /src/MaxOutputPinsPerModule.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package MaxOutputPinsPerModule is 72 | function MaxOutputPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0)) return integer; 73 | end MaxOutputPinsPerModule; 74 | 75 | package body MaxOutputPinsPerModule is 76 | 77 | function MaxOutputPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0)) return integer is 78 | variable result: integer; 79 | begin 80 | result := 0; 81 | for i in 0 to MaxPins-1 loop 82 | if Tag = PD(i)(15 downto 8) then -- if GTag matches 83 | if PD(i)(7) = '1' then -- and its an Output 84 | if PD(i)(5 downto 0) > result then -- drop MSB and NMSB to allow 2 Output types 85 | result := conv_integer(PD(i)(5 downto 0)); -- find max (63 max) 86 | end if; 87 | end if; 88 | end if; 89 | end loop; 90 | return result; 91 | end; 92 | end MaxOutputPinsPerModule; -------------------------------------------------------------------------------- /src/MaxPinsPerModule.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package MaxPinsPerModule is 72 | function MaxPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0)) return integer; 73 | end MaxPinsPerModule; 74 | 75 | package body MaxPinsPerModule is 76 | 77 | function MaxPinsPerModule(PD : PinDescType; Tag : std_logic_vector(7 downto 0)) return integer is 78 | variable result: integer; 79 | begin 80 | result := 0; 81 | for i in 0 to MaxPins-1 loop 82 | if Tag = PD(i)(15 downto 8) then -- if GTag matches 83 | if PD(i)(6 downto 0) > result then -- drop MSB output flag 84 | result := conv_integer(PD(i)(6 downto 0)); -- find max 85 | end if; 86 | end if; 87 | end loop; 88 | return result; 89 | end; 90 | end MaxPinsPerModule; -------------------------------------------------------------------------------- /src/ModuleExists.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package ModuleExists is 72 | function ModuleExists(MID : ModuleIDType; Tag : std_logic_vector(7 downto 0)) return boolean; 73 | end ModuleExists; 74 | 75 | package body ModuleExists is 76 | 77 | function ModuleExists(MID : ModuleIDType; Tag : std_logic_vector(7 downto 0)) return boolean is 78 | variable result: boolean; 79 | begin 80 | result := false; 81 | for i in 0 to MaxModules-1 loop 82 | if Tag = MID(i).GTag then -- if GTag matches 83 | result := true; 84 | end if; 85 | end loop; 86 | return result; 87 | end; 88 | end ModuleExists; -------------------------------------------------------------------------------- /src/NumberOfModules.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package NumberOfModules is 72 | function NumberOfModules(MID : ModuleIDType; Tag : std_logic_vector(7 downto 0)) return integer; 73 | end NumberOfModules; 74 | 75 | package body NumberOfModules is 76 | 77 | function NumberOfModules(MID : ModuleIDType; Tag : std_logic_vector(7 downto 0)) return integer is 78 | variable result: integer; 79 | begin 80 | result := 0; 81 | for i in 0 to MaxModules-1 loop 82 | if Tag = MID(i).GTag then 83 | result := conv_integer(MID(i).NumInstances); 84 | end if; 85 | end loop; 86 | return result; 87 | end; 88 | end NumberOfModules; -------------------------------------------------------------------------------- /src/PinExists.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package PinExists is 72 | function PinExists(PD : PinDescType; Tag : std_logic_vector(7 downto 0); Pin : std_logic_vector(7 downto 0)) return boolean; 73 | end PinExists; 74 | 75 | package body PinExists is 76 | 77 | function PinExists(PD : PinDescType; Tag : std_logic_vector(7 downto 0); Pin : std_logic_vector(7 downto 0)) return boolean is 78 | variable result: boolean; 79 | begin 80 | result := false; 81 | for i in 0 to MaxPins-1 loop 82 | if (Tag = PD(i)(15 downto 8)) and (Pin = PD(i)(7 downto 0)) then -- if GTag matches and Pin matches 83 | result := true; 84 | end if; 85 | end loop; 86 | return result; 87 | end; 88 | end PinExists; -------------------------------------------------------------------------------- /src/Sixi25_x9card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package SixI25_x9card is 72 | -- 6i25 card specific info 73 | constant ClockHigh: integer := ClockHigh6I25; 74 | constant ClockMed: integer := ClockMed6I25; 75 | constant ClockLow: integer := ClockLow6I25; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName6i25; 78 | constant FPGASize: integer := 9; 79 | constant FPGAPins: integer := 144; 80 | constant IOPorts: integer := 2; 81 | constant IOWidth: integer := 34; 82 | constant PortWidth: integer := 17; 83 | constant LIOWidth: integer := 6; 84 | constant LEDCount: integer := 2; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | constant DIDVID : std_logic_vector(31 downto 0) := x"61252718"; 88 | constant SSID : std_logic_vector(31 downto 0) := x"61252718"; 89 | end package SixI25_x9card; 90 | -------------------------------------------------------------------------------- /src/b32test.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.std_logic_ARITH.ALL; 4 | use IEEE.std_logic_UNSIGNED.ALL; 5 | Library UNISIM; 6 | use UNISIM.vcomponents.all; 7 | 8 | 9 | entity b32test is 10 | 11 | port ( 12 | LCLK : in std_logic; 13 | IOBITS: inout std_logic_vector (71 downto 0); 14 | LEDS: out std_logic_vector(1 downto 0) 15 | 16 | ); 17 | end b32test; 18 | 19 | architecture dataflow of b32test is 20 | 21 | -- alias SYNCLK: std_logic is LCLK; 22 | 23 | -- CLK multiplier DCM signals 24 | 25 | signal fclk : std_logic; 26 | signal clkfx: std_logic; 27 | signal clk0: std_logic; 28 | 29 | signal iabus: std_logic_vector(11 downto 0); 30 | signal idbus: std_logic_vector(23 downto 0); 31 | signal mradd: std_logic_vector(11 downto 0); 32 | signal mwadd: std_logic_vector(11 downto 0); 33 | signal mibus: std_logic_vector(31 downto 0); 34 | signal mobus: std_logic_vector(31 downto 0); 35 | signal mwrite: std_logic; 36 | signal mread: std_logic; 37 | 38 | signal testport: std_logic_vector(23 downto 0); 39 | signal muxedmibus: std_logic_vector(31 downto 0); 40 | signal ioradd: std_logic_vector(11 downto 0); 41 | 42 | begin 43 | 44 | ClockMult : DCM 45 | generic map ( 46 | CLKDV_DIVIDE => 2.0, 47 | CLKFX_DIVIDE => 2, 48 | CLKFX_MULTIPLY => 4, -- 3 for 72, 4 FOR 96 MHz, 5 for 120 MHz, 6 for 144 MHz 49 | CLKIN_DIVIDE_BY_2 => FALSE, 50 | CLKIN_PERIOD => 20.0, 51 | CLKOUT_PHASE_SHIFT => "NONE", 52 | CLK_FEEDBACK => "1X", 53 | DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS", 54 | 55 | DFS_FREQUENCY_MODE => "LOW", 56 | DLL_FREQUENCY_MODE => "LOW", 57 | DUTY_CYCLE_CORRECTION => TRUE, 58 | FACTORY_JF => X"C080", 59 | PHASE_SHIFT => 0, 60 | STARTUP_WAIT => FALSE) 61 | port map ( 62 | 63 | CLK0 => clk0, -- 64 | CLKFB => clk0, -- DCM clock feedback 65 | CLKFX => clkfx, 66 | CLKIN => LCLK, -- Clock input (from IBUFG, BUFG or DCM) 67 | PSCLK => '0', -- Dynamic phase adjust clock input 68 | PSEN => '0', -- Dynamic phase adjust enable input 69 | PSINCDEC => '0', -- Dynamic phase adjust increment/decrement 70 | RST => '0' -- DCM asynchronous reset input 71 | ); 72 | 73 | BUFG_inst : BUFG 74 | port map ( 75 | O => FClk, -- Clock buffer output 76 | I => clkfx -- Clock buffer input 77 | ); 78 | 79 | -- End of DCM_inst instantiation 80 | 81 | aproc: entity Big32 82 | 83 | port map ( 84 | clk => fclk, 85 | reset => '0', 86 | iabus => iabus, -- program address bus 87 | idbus => idbus, -- program data bus 88 | mradd => mradd, -- memory read address 89 | mwadd => mwadd, -- memory write address 90 | mibus => muxedmibus, -- memory data in bus 91 | mobus => mobus, -- memory data out bus 92 | mwrite => mwrite, -- memory write signal 93 | mread => mread, -- memory read signal 94 | carryflg => LEDS(0) -- carry flag 95 | ); 96 | 97 | programROM : entity testrom 98 | port map( 99 | addr => iabus(10 downto 0), 100 | clk => fclk, 101 | din => x"000000", 102 | dout => idbus, 103 | we => '0' 104 | ); 105 | 106 | DataRam : entity testram 107 | port map( 108 | addra => mwadd(10 downto 0), 109 | addrb => mradd(10 downto 0), 110 | clk => fclk, 111 | dina => mobus, 112 | -- douta => 113 | doutb => mibus, 114 | wea => mwrite 115 | ); 116 | 117 | 118 | testouts: process(fclk) 119 | begin 120 | if rising_edge(fclk) then 121 | ioradd <= mradd; 122 | if mwadd = x"000" and mwrite ='1' then 123 | testport <= mobus(23 downto 0); 124 | end if; 125 | end if; 126 | IOBITS(23 downto 0) <= testport; 127 | IOBITS(71 downto 48) <= (others => '0'); 128 | 129 | 130 | 131 | if ioradd = x"001" then 132 | muxedmibus <= x"00" & IOBITS(47 downto 24); 133 | else 134 | muxedmibus <= mibus; 135 | end if; 136 | 137 | LEDS(1) <= '0'; 138 | 139 | 140 | end process testouts; 141 | 142 | 143 | end dataflow; 144 | 145 | -------------------------------------------------------------------------------- /src/binosc.vhd: -------------------------------------------------------------------------------- 1 | library ieee; 2 | use ieee.std_logic_1164.all; 3 | use ieee.std_logic_arith.all; 4 | use ieee.std_logic_unsigned.all; 5 | -- 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.log2.all; 71 | 72 | entity binosc is -- binary divider for simple clocks etc 73 | generic( width : integer); 74 | port ( clk : in std_logic; 75 | ibus0 : in std_logic; 76 | loadena : in std_logic; 77 | oscout : out std_logic_vector(width -1 downto 0)); 78 | end binosc; 79 | 80 | architecture Behavioral of binosc is 81 | 82 | signal counter : std_logic_vector(width-1 downto 0); 83 | signal enareg : std_logic; 84 | 85 | begin 86 | abinosc: process (clk,counter,enareg) 87 | begin 88 | if rising_edge(clk) then 89 | if enareg = '1' then 90 | counter <= counter + 1; 91 | else 92 | counter <= (others => '0'); 93 | end if; 94 | if loadena = '1' then 95 | enareg <= ibus0; 96 | end if; 97 | end if; 98 | oscout <= counter; 99 | end process; 100 | end Behavioral; 101 | 102 | -------------------------------------------------------------------------------- /src/decodedstrobe.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; 3 | use IEEE.std_logic_UNSIGNED.ALL; 4 | use IEEE.std_logic_ARITH.ALL; 5 | -- 6 | -- Copyright (C) 2009, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | package decodedstrobe is 71 | function decodedstrobe(paddr: in std_logic_vector;maddr: in std_logic_vector;ena: in std_logic) return std_logic; 72 | end decodedstrobe; 73 | 74 | package body decodedstrobe is 75 | 76 | function decodedstrobe(paddr: in std_logic_vector;maddr: in std_logic_vector;ena: in std_logic) 77 | return std_logic is 78 | variable result: std_logic; 79 | begin 80 | if (paddr=maddr) and (ena = '1') then 81 | result := '1'; 82 | else 83 | result := '0'; 84 | end if; 85 | return result; 86 | end; 87 | 88 | end decodedstrobe; 89 | 90 | -------------------------------------------------------------------------------- /src/decodedstrobe2.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; 3 | use IEEE.std_logic_UNSIGNED.ALL; 4 | use IEEE.std_logic_ARITH.ALL; 5 | -- 6 | -- Copyright (C) 2009, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | package decodedstrobe2 is 71 | function decodedstrobe2(paddr: in std_logic_vector;maddr: in std_logic_vector;ena1 : in std_logic;ena2: in std_logic) return std_logic; 72 | end decodedstrobe2; 73 | 74 | package body decodedstrobe2 is 75 | 76 | function decodedstrobe2(paddr: in std_logic_vector;maddr: in std_logic_vector;ena1: in std_logic;ena2: in std_logic) 77 | return std_logic is 78 | variable result: std_logic; 79 | begin 80 | if (paddr=maddr) and (ena1 = '1') and (ena2 = '1') then 81 | result := '1'; 82 | else 83 | result := '0'; 84 | end if; 85 | return result; 86 | end; 87 | 88 | end decodedstrobe2; 89 | 90 | -------------------------------------------------------------------------------- /src/drqlogic.vhd: -------------------------------------------------------------------------------- 1 | 2 | library IEEE; 3 | use IEEE.STD_LOGIC_1164.ALL; 4 | use IEEE.STD_LOGIC_ARITH.ALL; 5 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 6 | 7 | 8 | entity dmdrqlogic is 9 | generic ( 10 | ndrqs : integer ); 11 | port ( clk : in std_logic; 12 | ibus : in std_logic_vector (31 downto 0); 13 | obus : out std_logic_vector (31 downto 0); 14 | loadmode : in std_logic; 15 | readmode : in std_logic; 16 | drqsources : in std_logic_vector (ndrqs-1 downto 0); 17 | dreqout : out std_logic; 18 | demandmode : out std_logic); 19 | end dmdrqlogic; 20 | 21 | architecture Behavioral of dmdrqlogic is 22 | constant zeromask: std_logic_vector (ndrqs-1 downto 0) := (others => '0'); 23 | signal modereg: std_logic_vector (31 downto 0); 24 | alias mask: std_logic_vector (ndrqs-1 downto 0) is modereg(ndrqs+15 downto 16); -- 16 max 25 | alias enable: std_logic is modereg(0); 26 | signal drq: std_logic; 27 | begin 28 | admdrq: process(clk,drqsources,readmode,mask, modereg) 29 | begin 30 | if rising_edge(clk) then 31 | if loadmode = '1' then 32 | modereg <= ibus; 33 | end if; 34 | end if; 35 | if (mask and drqsources) /= 0 then 36 | drq <= enable; 37 | else 38 | drq <= '0'; 39 | end if; 40 | demandmode <= enable; 41 | obus <= (others => 'Z'); 42 | if readmode = '1' then 43 | obus(31 downto 16) <= modereg(31 downto 16); 44 | obus(0) <= modereg(0); 45 | obus(1) <= drq; 46 | obus(15 downto 2) <= (others => '0'); 47 | end if; 48 | dreqout <= drq; 49 | end process; 50 | end Behavioral; 51 | 52 | -------------------------------------------------------------------------------- /src/etherhm2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinuxCNC/hostmot2-firmware/c15c0c3c0af826fd2996aa1eddb8669f154bb2a5/src/etherhm2.zip -------------------------------------------------------------------------------- /src/fixicap.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; 3 | use IEEE.std_logic_UNSIGNED.ALL; 4 | use IEEE.std_logic_ARITH.ALL; 5 | -- 6 | -- Copyright (C) 2009, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | package FixICap is -- Return data 16 bit icap data with both bytes bit reversed 71 | function FixICap(input : in std_logic_vector) return std_logic_vector; 72 | end FixICap; 73 | 74 | package body fixicap is 75 | function FixICap(input : in std_logic_vector) return std_logic_vector is 76 | variable result : std_logic_vector(15 downto 0); 77 | begin 78 | for i in 0 to 7 loop 79 | result(i) := input(7-i); 80 | end loop; 81 | for i in 8 to 15 loop 82 | result(i) := input(23-i); 83 | end loop; 84 | return result; 85 | end FixICap; 86 | end fixicap; 87 | 88 | -------------------------------------------------------------------------------- /src/hostmotid.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.STD_LOGIC_1164.ALL; 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- 7 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 8 | -- http://www.mesanet.com 9 | -- 10 | -- This program is is licensed under a disjunctive dual license giving you 11 | -- the choice of one of the two following sets of free software/open source 12 | -- licensing terms: 13 | -- 14 | -- * GNU General Public License (GPL), version 2.0 or later 15 | -- * 3-clause BSD License 16 | -- 17 | -- 18 | -- The GNU GPL License: 19 | -- 20 | -- This program is free software; you can redistribute it and/or modify 21 | -- it under the terms of the GNU General Public License as published by 22 | -- the Free Software Foundation; either version 2 of the License, or 23 | -- (at your option) any later version. 24 | -- 25 | -- This program is distributed in the hope that it will be useful, 26 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | -- GNU General Public License for more details. 29 | -- 30 | -- You should have received a copy of the GNU General Public License 31 | -- along with this program; if not, write to the Free Software 32 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 33 | -- 34 | -- 35 | -- The 3-clause BSD License: 36 | -- 37 | -- Redistribution and use in source and binary forms, with or without 38 | -- modification, are permitted provided that the following conditions 39 | -- are met: 40 | -- 41 | -- * Redistributions of source code must retain the above copyright 42 | -- notice, this list of conditions and the following disclaimer. 43 | -- 44 | -- * Redistributions in binary form must reproduce the above 45 | -- copyright notice, this list of conditions and the following 46 | -- disclaimer in the documentation and/or other materials 47 | -- provided with the distribution. 48 | -- 49 | -- * Neither the name of Mesa Electronics nor the names of its 50 | -- contributors may be used to endorse or promote products 51 | -- derived from this software without specific prior written 52 | -- permission. 53 | -- 54 | -- 55 | -- Disclaimer: 56 | -- 57 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 58 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 59 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 60 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 61 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 62 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 63 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 64 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 65 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 66 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 67 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 68 | -- POSSIBILITY OF SUCH DAMAGE. 69 | -- 70 | 71 | 72 | entity hostmotid is 73 | generic ( 74 | buswidth : integer; 75 | cookie : std_logic_vector(31 downto 0); 76 | namelow : std_logic_vector(31 downto 0); 77 | namehigh : std_logic_vector(31 downto 0); 78 | idromoffset : std_logic_vector(31 downto 0)); 79 | port ( 80 | readid : in std_logic; 81 | addr : in std_logic_vector(1 downto 0); 82 | obus : out std_logic_vector (buswidth-1 downto 0)); 83 | end hostmotid; 84 | 85 | architecture Behavioral of hostmotid is 86 | 87 | begin 88 | 89 | hostmotidproc: process (readid,addr) 90 | begin 91 | obus <= ( others => 'Z'); 92 | if readid = '1' then 93 | case addr is 94 | when "00" => obus <= cookie; 95 | when "01" => obus <= namelow; 96 | when "10" => obus <= namehigh; 97 | when "11" => obus <= idromoffset; 98 | when others => null; 99 | end case; 100 | end if; 101 | end process; 102 | 103 | end Behavioral; 104 | 105 | -------------------------------------------------------------------------------- /src/i20card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i20card is 72 | -- 5I20 card specific info 73 | constant ClockHigh: integer := ClockHigh20; 74 | constant ClockMed: integer := ClockMed20; 75 | constant ClockLow: integer := ClockLow20; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName5i20; 78 | constant FPGASize: integer := 200; 79 | constant FPGAPins: integer := 208; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i20card; 89 | -------------------------------------------------------------------------------- /src/i21card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i21card is 72 | -- 5i21 card specific info 73 | constant ClockHigh: integer := ClockHigh21; 74 | constant ClockMed: integer := ClockMed21; 75 | constant ClockLow: integer := ClockLow21; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName5i21; 78 | constant FPGASize: integer := 400; 79 | constant FPGAPins: integer := 208; 80 | constant IOPorts: integer := 2; 81 | constant IOWidth: integer := 64; 82 | constant PortWidth: integer := 32; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i21card; 89 | -------------------------------------------------------------------------------- /src/i22_1000card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i22_1000card is 72 | -- 5I22_1000 card specific info 73 | constant ClockHigh: integer := ClockHigh22; 74 | constant ClockMed: integer := ClockMed22; 75 | constant ClockLow: integer := ClockLow22; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName5I22; 78 | constant FPGASize: integer := 1000; 79 | constant FPGAPins: integer := 320; 80 | constant IOPorts: integer := 4; 81 | constant IOWidth: integer := 96; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i22_1000card; 89 | -------------------------------------------------------------------------------- /src/i22_1500card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i22_1500card is 72 | -- 5I22_1500 card specific info 73 | constant ClockHigh: integer := ClockHigh22; 74 | constant ClockMed: integer := ClockMed22; 75 | constant ClockLow: integer := ClockLow22; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName5i22; 78 | constant FPGASize: integer := 1500; 79 | constant FPGAPins: integer := 320; 80 | constant IOPorts: integer := 4; 81 | constant IOWidth: integer := 96; 82 | constant LIOWidth: integer := 0; 83 | constant PortWidth: integer := 24; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i22_1500card; 89 | -------------------------------------------------------------------------------- /src/i23card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i23card is 72 | -- 5i23 card specific info 73 | constant ClockHigh: integer := ClockHigh23; 74 | constant ClockMed: integer := ClockMed23; 75 | constant ClockLow: integer := ClockLow23; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName5i23; 78 | constant FPGASize: integer := 400; 79 | constant FPGAPins: integer := 208; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 2; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i23card; 89 | -------------------------------------------------------------------------------- /src/i24_x16card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i24_x16card is 72 | -- 5i24 card specific info 73 | constant ClockHigh: integer := ClockHigh24; 74 | constant ClockMed: integer := ClockMed24; 75 | constant ClockLow: integer := ClockLow24; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName5i24; 78 | constant FPGASize: integer := 16; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 4; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | constant DIDVID : std_logic_vector(31 downto 0) := x"51242718"; 88 | constant SSID : std_logic_vector(31 downto 0) := x"51242718"; 89 | end package i24_x16card; 90 | -------------------------------------------------------------------------------- /src/i24_x25card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i24_x25card is 72 | -- 5i24 card specific info 73 | constant ClockHigh: integer := ClockHigh24; 74 | constant ClockMed: integer := ClockMed24; 75 | constant ClockLow: integer := ClockLow24; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName5i24; 78 | constant FPGASize: integer := 25; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 4; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | constant DIDVID : std_logic_vector(31 downto 0) := x"51242718"; 88 | constant SSID : std_logic_vector(31 downto 0) := x"51242718"; 89 | end package i24_x25card; 90 | -------------------------------------------------------------------------------- /src/i25_x9card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i25_x9card is 72 | -- 5i25 card specific info 73 | constant ClockHigh: integer := ClockHigh25; 74 | constant ClockMed: integer := ClockMed25; 75 | constant ClockLow: integer := ClockLow25; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName5i25; 78 | constant FPGASize: integer := 9; 79 | constant FPGAPins: integer := 144; 80 | constant IOPorts: integer := 2; 81 | constant IOWidth: integer := 34; 82 | constant PortWidth: integer := 17; 83 | constant LIOWidth: integer := 6; 84 | constant LEDCount: integer := 2; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | constant DIDVID : std_logic_vector(31 downto 0) := x"51252718"; 88 | constant SSID : std_logic_vector(31 downto 0) := x"51252718"; 89 | end package i25_x9card; 90 | -------------------------------------------------------------------------------- /src/i43_200card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i43_200card is 72 | -- 7i43_200 card specific info 73 | constant ClockHigh: integer := ClockHigh43; 74 | constant ClockMed: integer := ClockMed43; 75 | constant ClockLow: integer := ClockLow43; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I43; 78 | constant FPGASize: integer := 200; 79 | constant FPGAPins: integer := 144; 80 | constant IOPorts: integer := 2; 81 | constant IOWidth: integer := 48; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i43_200card; 89 | -------------------------------------------------------------------------------- /src/i43_400card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i43_400card is 72 | -- 7i43_400 card specific info 73 | constant ClockHigh: integer := ClockHigh43; 74 | constant ClockMed: integer := ClockMed43; 75 | constant ClockLow: integer := ClockLow43; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I43; 78 | constant FPGASize: integer := 400; 79 | constant FPGAPins: integer := 144; 80 | constant IOPorts: integer := 2; 81 | constant IOWidth: integer := 48; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i43_400card; 89 | -------------------------------------------------------------------------------- /src/i61_x16card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i61_x16card is 72 | -- 7i61_x16 card specific info 73 | constant ClockHigh: integer := ClockHigh61; 74 | constant ClockMed: integer := ClockMed61; 75 | constant ClockLow: integer := ClockLow61; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I61; 78 | constant FPGASize: integer := 16; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 4; 81 | constant IOWidth: integer := 96; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i61_x16card; 89 | -------------------------------------------------------------------------------- /src/i61_x25card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i61_x25card is 72 | -- 7i61_x25 card specific info 73 | constant ClockHigh: integer := ClockHigh61; 74 | constant ClockMed: integer := ClockMed61; 75 | constant ClockLow: integer := ClockLow61; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I61; 78 | constant FPGASize: integer := 25; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 4; 81 | constant IOWidth: integer := 96; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i61_x25card; 89 | -------------------------------------------------------------------------------- /src/i65card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i65card is 72 | -- 4I65 card specific info 73 | constant ClockHigh: integer := ClockHigh20; 74 | constant ClockMed: integer := ClockMed20; 75 | constant ClockLow: integer := ClockLow20; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName4i65; 78 | constant FPGASize: integer := 200; 79 | constant FPGAPins: integer := 208; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i65card; 89 | -------------------------------------------------------------------------------- /src/i68card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i68card is 72 | -- 4I68 card specific info 73 | constant ClockHigh: integer := ClockHigh68; 74 | constant ClockMed: integer := ClockMed68; 75 | constant ClockLow: integer := ClockLow68; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName4i68; 78 | constant FPGASize: integer := 400; 79 | constant FPGAPins: integer := 208; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 4; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i68card; 89 | -------------------------------------------------------------------------------- /src/i69_x16card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i69_x16card is 72 | -- 4I69 card specific info 73 | constant ClockHigh: integer := ClockHigh69; 74 | constant ClockMed: integer := ClockMed69; 75 | constant ClockLow: integer := ClockLow69; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName4i69; 78 | constant FPGASize: integer := 16; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 5; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i69_x16card; 89 | -------------------------------------------------------------------------------- /src/i69_x25card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i69_x25card is 72 | -- 4I69 card specific info 73 | constant ClockHigh: integer := ClockHigh69; 74 | constant ClockMed: integer := ClockMed69; 75 | constant ClockLow: integer := ClockLow69; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName4i69; 78 | constant FPGASize: integer := 25; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 5; 84 | constant LEDCount: integer := 8; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i69_x25card; 89 | -------------------------------------------------------------------------------- /src/i74_x9card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i74_x9card is 72 | -- 4i74 card specific info 73 | constant ClockHigh: integer := ClockHigh25; 74 | constant ClockMed: integer := ClockMed25; 75 | constant ClockLow: integer := ClockLow25; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName4i74; 78 | constant FPGASize: integer := 9; 79 | constant FPGAPins: integer := 144; 80 | constant IOPorts: integer := 2; 81 | constant IOWidth: integer := 42; 82 | constant PortWidth: integer := 21; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 0; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | constant DIDVID : std_logic_vector(31 downto 0) := x"41742718"; 88 | constant SSID : std_logic_vector(31 downto 0) := x"41742718"; 89 | end package i74_x9card; 90 | -------------------------------------------------------------------------------- /src/i76e_x16card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i76e_x16card is 72 | -- 7I76E card specific info 73 | constant ClockHigh: integer := ClockHigh76; 74 | constant ClockMed: integer := ClockMed76; 75 | constant ClockLow: integer := ClockLow76; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I76E; 78 | constant FPGASize: integer := 16; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 51; 82 | constant PortWidth: integer := 17; 83 | constant LIOWidth: integer := 4; 84 | constant LEDCount: integer := 4; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i76e_x16card; 89 | -------------------------------------------------------------------------------- /src/i77e_x9card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i77e_x9card is 72 | -- 7I77E card specific info 73 | constant ClockHigh: integer := ClockHigh25; 74 | constant ClockLow: integer := ClockLow25; 75 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 76 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I77E; 77 | constant FPGASize: integer := 9; 78 | constant FPGAPins: integer := 144; 79 | constant IOPorts: integer := 3; 80 | constant IOWidth: integer := 51; 81 | constant PortWidth: integer := 17; 82 | constant LIOWidth: integer := 4; 83 | constant LEDCount: integer := 4; 84 | constant SepClocks: boolean := true; 85 | constant OneWS: boolean := true; 86 | 87 | end package i77e_x9card; 88 | -------------------------------------------------------------------------------- /src/i80db_x16card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i80db_x16card is 72 | -- 7I80DB16 card specific info 73 | constant ClockHigh: integer := ClockHigh80; 74 | constant ClockMed: integer := ClockMed80; 75 | constant ClockLow: integer := ClockLow80; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I80DB; 78 | constant FPGASize: integer := 16; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 4; 81 | constant IOWidth: integer := 68; 82 | constant PortWidth: integer := 17; 83 | constant LIOWidth: integer := 4; 84 | constant LEDCount: integer := 4; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i80db_x16card; 89 | -------------------------------------------------------------------------------- /src/i80db_x25card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i80db_x25card is 72 | -- 7I80DB card specific info 73 | constant ClockHigh: integer := ClockHigh80; 74 | constant ClockMed: integer := ClockMed80; 75 | constant ClockLow: integer := ClockLow80; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I80DB; 78 | constant FPGASize: integer := 25; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 4; 81 | constant IOWidth: integer := 68; 82 | constant PortWidth: integer := 17; 83 | constant LIOWidth: integer := 4; 84 | constant LEDCount: integer := 4; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i80db_x25card; 89 | -------------------------------------------------------------------------------- /src/i80hd_x16card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i80hd_x16card is 72 | -- 7I80HD card specific info 73 | constant ClockHigh: integer := ClockHigh80; 74 | constant ClockMed: integer := ClockMed80; 75 | constant ClockLow: integer := ClockLow80; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I80HD; 78 | constant FPGASize: integer := 16; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 4; 84 | constant LEDCount: integer := 4; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i80hd_x16card; 89 | -------------------------------------------------------------------------------- /src/i80hd_x25card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i80hd_x25card is 72 | -- 7I80HD card specific info 73 | constant ClockHigh: integer := ClockHigh80; 74 | constant ClockMed: integer := ClockMed80; 75 | constant ClockLow: integer := ClockLow80; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I80HD; 78 | constant FPGASize: integer := 25; 79 | constant FPGAPins: integer := 256; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 4; 84 | constant LEDCount: integer := 4; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package i80hd_x25card; 89 | -------------------------------------------------------------------------------- /src/i90_x9card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package i90_x9card is 72 | -- 7I90 x9 card specific info 73 | constant ClockHigh: integer := ClockHigh90; 74 | constant ClockMed: integer := ClockMed90; 75 | constant ClockLow: integer := ClockLow90; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName7I90; 78 | constant FPGASize: integer := 9; 79 | constant FPGAPins: integer := 144; 80 | constant IOPorts: integer := 3; 81 | constant IOWidth: integer := 72; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 6; 84 | constant LEDCount: integer := 2; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := false; 87 | end package i90_x9card; 88 | -------------------------------------------------------------------------------- /src/log2.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; 3 | use IEEE.std_logic_UNSIGNED.ALL; 4 | use IEEE.std_logic_ARITH.ALL; 5 | -- 6 | -- Copyright (C) 2009, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | package log2 is 71 | function log2(d:integer) return integer; 72 | end log2; 73 | 74 | package body log2 is 75 | 76 | function log2(d: integer) return integer is 77 | variable m : integer := 1; 78 | variable l : integer := 0; 79 | begin 80 | while m < d loop 81 | m := m * 2; 82 | l := l + 1; 83 | end loop; 84 | return(l); 85 | end; 86 | 87 | end log2; 88 | 89 | -------------------------------------------------------------------------------- /src/mux1.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; 3 | use IEEE.std_logic_UNSIGNED.ALL; 4 | use IEEE.std_logic_ARITH.ALL; 5 | -- 6 | -- Copyright (C) 2009, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | package mux1 is 71 | function mux1(data: in std_logic_vector;sel: in std_logic_vector) return std_logic; 72 | end mux1; 73 | 74 | package body mux1 is 75 | function mux1(data: in std_logic_vector;sel: in std_logic_vector) 76 | return std_logic is 77 | variable result: std_logic; 78 | begin 79 | result := data(to_integer(sel)); 80 | return result; 81 | end; 82 | end mux1; 83 | 84 | -------------------------------------------------------------------------------- /src/oneofndecode.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; 3 | use IEEE.std_logic_UNSIGNED.ALL; 4 | use IEEE.std_logic_ARITH.ALL; 5 | -- 6 | -- Copyright (C) 2009, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | package oneofndecode is 71 | function OneOfNdecode(width : integer;ena1 : std_logic;ena2 : std_logic; dec : std_logic_vector) return std_logic_vector; 72 | end oneofndecode; 73 | 74 | package body oneofndecode is 75 | function OneOfNdecode(width : integer;ena1 : std_logic;ena2 : std_logic; dec : std_logic_vector) return std_logic_vector is 76 | variable result : std_logic_vector(width-1 downto 0); 77 | begin 78 | if ena1 = '1' and ena2 = '1' then 79 | for i in 0 to width -1 loop 80 | if conv_integer(dec) = i then 81 | result(i) := '1'; 82 | else 83 | result(i) := '0'; 84 | end if; 85 | end loop; 86 | else 87 | result := (others => '0'); 88 | end if; 89 | return result; 90 | end OneOfNDecode; 91 | end oneofndecode; 92 | 93 | -------------------------------------------------------------------------------- /src/parity.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; 3 | use IEEE.std_logic_UNSIGNED.ALL; 4 | use IEEE.std_logic_ARITH.ALL; 5 | -- 6 | -- Copyright (C) 2011, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | package parity is 71 | function parity(data : std_logic_vector) return std_logic; 72 | end parity; 73 | 74 | package body parity is 75 | 76 | function parity(data: std_logic_vector) return std_logic is 77 | variable p : std_logic := '0'; 78 | begin 79 | for i in data'range loop 80 | p := p xor data(i); 81 | end loop; 82 | return(p); 83 | end; 84 | 85 | end parity; 86 | 87 | -------------------------------------------------------------------------------- /src/pinmaker.vhd.in: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use std.textio.all; 3 | use IEEE.std_logic_1164.all; -- defines std_logic types 4 | use IEEE.STD_LOGIC_ARITH.ALL; 5 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 6 | use IEEE.STD_LOGIC_TEXTIO.ALL; 7 | 8 | use work.IDROMConst.all; 9 | use work.PIN_@PIN@.all; 10 | use work.@CARD@.all; 11 | use work.idrom_tools.all; 12 | 13 | entity pinmaker_@PIN@ is 14 | 15 | function GetPinDesc(i: integer) return PinDescRecord is 16 | variable pr : PinDescRecord; 17 | variable pv : std_logic_vector(31 downto 0); 18 | begin 19 | return MakePinRecord(PinDesc(i)); 20 | end function; 21 | 22 | function Clock(idx : std_logic_vector(7 downto 0)) return integer is 23 | variable m: integer; 24 | begin 25 | if(idx = ClockHighTag) then m := ClockHigh; 26 | else m := ClockLow; 27 | end if; 28 | return (m + 500000)/1000000; 29 | end; 30 | 31 | end pinmaker_@PIN@; 32 | 33 | architecture bbb of pinmaker_@PIN@ is 34 | file output_file : TEXT open write_mode is in "@OUT@"; 35 | begin 36 | process 37 | variable so: line; 38 | variable i: integer; 39 | variable mr : ModuleRecord; 40 | variable pr : PinDescRecord; 41 | begin 42 | write(so, string'("Modules in configuration:")); 43 | writeline(output_file, so); 44 | 45 | write(so, 46 | string'(" # Tag Ver Clock Cnt Regs Stride Mult Base")); 47 | writeline(output_file, so); 48 | 49 | for i in 0 to MaxModules-1 loop 50 | mr := ModuleId(i); 51 | if(mr.GTag = NullTag) then 52 | exit; 53 | end if; 54 | 55 | write(so, ' ', RIGHT, 1); 56 | write(so, i, RIGHT, 2); 57 | write(so, TagToName(mr.GTag), RIGHT, 12); 58 | write(so, ' ', RIGHT, 1); 59 | write(so, conv_integer(mr.Version), RIGHT, 4); 60 | write(so, ' ', RIGHT, 1); 61 | write(so, Clock(mr.Clock), RIGHT, 3); 62 | write(so, string'("MHz"), RIGHT, 3); 63 | write(so, ' ', RIGHT, 1); 64 | write(so, conv_integer(mr.NumInstances), RIGHT, 4); 65 | write(so, ' ', RIGHT, 1); 66 | write(so, conv_integer(mr.NumRegisters), RIGHT, 4); 67 | write(so, ' ', RIGHT, 1); 68 | write(so, conv_integer(mr.Strides), RIGHT, 6); 69 | write(so, ' ', RIGHT, 1); 70 | write(so, conv_integer(signed(mr.MultRegs)), RIGHT, 4); 71 | write(so, ' ', RIGHT, 1); 72 | write(so, string'("0x")); 73 | hwrite(so, mr.BaseAddr, RIGHT, 4); 74 | writeline(output_file, so); 75 | end loop; 76 | writeline(output_file, so); 77 | 78 | 79 | for i in 0 to IOWidth-1 loop 80 | if((i mod PortWidth) = 0) then 81 | writeline(output_file, so); 82 | write(so, string'("PIN IO# Module Chan Func")); 83 | writeline(output_file, so); 84 | end if; 85 | pr := GetPinDesc(i); 86 | write(so, Conn(BoardNameLow, BoardNameHigh, i, PortWidth)); 87 | write(so, string'("-")); 88 | write(so, conv_integer(i) mod 24*2+1, LEFT, 2); 89 | write(so, ' ', RIGHT, 1); 90 | write(so, i, RIGHT, 3); 91 | if(pr.SecFunc /= NullTag) then 92 | write(so, ' ', RIGHT, 1); 93 | write(so, TagToName(pr.SecFunc), LEFT, 14); 94 | write(so, ' ', RIGHT, 1); 95 | if((pr.SecInst and x"80") /= 0) then 96 | write(so, string'("ALL ")); 97 | else 98 | write(so, conv_integer(pr.SecInst), RIGHT, 4); 99 | end if; 100 | write(so, ' ', RIGHT, 1); 101 | write(so, Funct(pr.SecFunc, pr.SecPin), RIGHT, 4); 102 | end if; 103 | writeline(output_file, so); 104 | end loop; 105 | 106 | wait; 107 | end process; 108 | end bbb; 109 | 110 | -------------------------------------------------------------------------------- /src/resmod.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinuxCNC/hostmot2-firmware/c15c0c3c0af826fd2996aa1eddb8669f154bb2a5/src/resmod.zip -------------------------------------------------------------------------------- /src/scalertimer.vhd: -------------------------------------------------------------------------------- 1 | 2 | library IEEE; 3 | use IEEE.STD_LOGIC_1164.ALL; 4 | use IEEE.STD_LOGIC_ARITH.ALL; 5 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 6 | 7 | -- 8 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 9 | -- http://www.mesanet.com 10 | -- 11 | -- This program is is licensed under a disjunctive dual license giving you 12 | -- the choice of one of the two following sets of free software/open source 13 | -- licensing terms: 14 | -- 15 | -- * GNU General Public License (GPL), version 2.0 or later 16 | -- * 3-clause BSD License 17 | -- 18 | -- 19 | -- The GNU GPL License: 20 | -- 21 | -- This program is free software; you can redistribute it and/or modify 22 | -- it under the terms of the GNU General Public License as published by 23 | -- the Free Software Foundation; either version 2 of the License, or 24 | -- (at your option) any later version. 25 | -- 26 | -- This program is distributed in the hope that it will be useful, 27 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | -- GNU General Public License for more details. 30 | -- 31 | -- You should have received a copy of the GNU General Public License 32 | -- along with this program; if not, write to the Free Software 33 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 34 | -- 35 | -- 36 | -- The 3-clause BSD License: 37 | -- 38 | -- Redistribution and use in source and binary forms, with or without 39 | -- modification, are permitted provided that the following conditions 40 | -- are met: 41 | -- 42 | -- * Redistributions of source code must retain the above copyright 43 | -- notice, this list of conditions and the following disclaimer. 44 | -- 45 | -- * Redistributions in binary form must reproduce the above 46 | -- copyright notice, this list of conditions and the following 47 | -- disclaimer in the documentation and/or other materials 48 | -- provided with the distribution. 49 | -- 50 | -- * Neither the name of Mesa Electronics nor the names of its 51 | -- contributors may be used to endorse or promote products 52 | -- derived from this software without specific prior written 53 | -- permission. 54 | -- 55 | -- 56 | -- Disclaimer: 57 | -- 58 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 59 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 60 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 61 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 62 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 63 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 64 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 65 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 66 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 67 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 68 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 69 | -- POSSIBILITY OF SUCH DAMAGE. 70 | -- 71 | 72 | 73 | entity scalertimer is 74 | Port ( obus : out std_logic_vector (31 downto 0); 75 | readtimer : in std_logic; 76 | clk : in std_logic); 77 | end scalertimer; 78 | 79 | architecture Behavioral of scalertimer is 80 | signal timer: std_logic_vector(31 downto 0); 81 | 82 | begin 83 | atimer: process (clk) 84 | begin 85 | if rising_edge(clk) then 86 | timer <= timer+1; 87 | end if; -- clk 88 | obus <= (others => 'Z'); 89 | if readtimer = '1' then 90 | obus <= timer; 91 | end if; 92 | end process; 93 | end Behavioral; 94 | 95 | -------------------------------------------------------------------------------- /src/serhm2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinuxCNC/hostmot2-firmware/c15c0c3c0af826fd2996aa1eddb8669f154bb2a5/src/serhm2.zip -------------------------------------------------------------------------------- /src/sslbp.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinuxCNC/hostmot2-firmware/c15c0c3c0af826fd2996aa1eddb8669f154bb2a5/src/sslbp.zip -------------------------------------------------------------------------------- /src/ssremote.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinuxCNC/hostmot2-firmware/c15c0c3c0af826fd2996aa1eddb8669f154bb2a5/src/ssremote.zip -------------------------------------------------------------------------------- /src/wordrb.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.STD_LOGIC_1164.ALL; 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | -- 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | entity wordrb is 71 | generic (size : integer; 72 | buswidth : integer); 73 | port ( 74 | obus: out STD_LOGIC_VECTOR (31 downto 0); 75 | readport: in STD_LOGIC; 76 | portdata: in STD_LOGIC_VECTOR (size-1 downto 0) ); 77 | end wordrb; 78 | 79 | architecture behavioral of wordrb is 80 | 81 | begin 82 | awordiorb: process (portdata,readport) 83 | begin 84 | obus <= (others => 'Z'); 85 | if readport = '1' then 86 | obus(size-1 downto 0) <= portdata; 87 | obus(buswidth -1 downto size) <= (others => '0'); 88 | end if; 89 | end process; 90 | 91 | end behavioral; 92 | -------------------------------------------------------------------------------- /src/x20_1000card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package x20_1000card is 72 | -- 3x20_1000 card specific info 73 | constant ClockHigh: integer := ClockHighx20; 74 | constant ClockMed: integer := ClockMedx20; 75 | constant ClockLow: integer := ClockLowx20; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName3x20; 78 | constant FPGASize: integer := 1000; 79 | constant FPGAPins: integer := 456; 80 | constant IOPorts: integer := 6; 81 | constant IOWidth: integer := 144; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 1; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package x20_1000card; 89 | -------------------------------------------------------------------------------- /src/x20_1500card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package x20_1500card is 72 | -- 3x20_1500 card specific info 73 | constant ClockHigh: integer := ClockHighx20; 74 | constant ClockMed: integer := ClockMedx20; 75 | constant ClockLow: integer := ClockLowx20; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName3x20; 78 | constant FPGASize: integer := 1500; 79 | constant FPGAPins: integer := 456; 80 | constant IOPorts: integer := 6; 81 | constant IOWidth: integer := 144; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 1; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package x20_1500card; 89 | -------------------------------------------------------------------------------- /src/x20_2000card.vhd: -------------------------------------------------------------------------------- 1 | library IEEE; 2 | use IEEE.std_logic_1164.all; -- defines std_logic types 3 | use IEEE.STD_LOGIC_ARITH.ALL; 4 | use IEEE.STD_LOGIC_UNSIGNED.ALL; 5 | 6 | -- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics 7 | -- http://www.mesanet.com 8 | -- 9 | -- This program is is licensed under a disjunctive dual license giving you 10 | -- the choice of one of the two following sets of free software/open source 11 | -- licensing terms: 12 | -- 13 | -- * GNU General Public License (GPL), version 2.0 or later 14 | -- * 3-clause BSD License 15 | -- 16 | -- 17 | -- The GNU GPL License: 18 | -- 19 | -- This program is free software; you can redistribute it and/or modify 20 | -- it under the terms of the GNU General Public License as published by 21 | -- the Free Software Foundation; either version 2 of the License, or 22 | -- (at your option) any later version. 23 | -- 24 | -- This program is distributed in the hope that it will be useful, 25 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | -- GNU General Public License for more details. 28 | -- 29 | -- You should have received a copy of the GNU General Public License 30 | -- along with this program; if not, write to the Free Software 31 | -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 32 | -- 33 | -- 34 | -- The 3-clause BSD License: 35 | -- 36 | -- Redistribution and use in source and binary forms, with or without 37 | -- modification, are permitted provided that the following conditions 38 | -- are met: 39 | -- 40 | -- * Redistributions of source code must retain the above copyright 41 | -- notice, this list of conditions and the following disclaimer. 42 | -- 43 | -- * Redistributions in binary form must reproduce the above 44 | -- copyright notice, this list of conditions and the following 45 | -- disclaimer in the documentation and/or other materials 46 | -- provided with the distribution. 47 | -- 48 | -- * Neither the name of Mesa Electronics nor the names of its 49 | -- contributors may be used to endorse or promote products 50 | -- derived from this software without specific prior written 51 | -- permission. 52 | -- 53 | -- 54 | -- Disclaimer: 55 | -- 56 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 | -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 | -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 | -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 | -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 61 | -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 62 | -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 64 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 | -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 66 | -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 67 | -- POSSIBILITY OF SUCH DAMAGE. 68 | -- 69 | 70 | use work.IDROMConst.all; 71 | package x20_2000card is 72 | -- 3x20_2000 card specific info. Note: ISE only! Webpack users are out in the cold 73 | constant ClockHigh: integer := ClockHighx20; 74 | constant ClockMed: integer := ClockMedx20; 75 | constant ClockLow: integer := ClockLowx20; 76 | constant BoardNameLow : std_Logic_Vector(31 downto 0) := BoardNameMESA; 77 | constant BoardNameHigh : std_Logic_Vector(31 downto 0) := BoardName3x20; 78 | constant FPGASize: integer := 2000; 79 | constant FPGAPins: integer := 456; 80 | constant IOPorts: integer := 6; 81 | constant IOWidth: integer := 144; 82 | constant PortWidth: integer := 24; 83 | constant LIOWidth: integer := 0; 84 | constant LEDCount: integer := 1; 85 | constant SepClocks: boolean := true; 86 | constant OneWS: boolean := true; 87 | 88 | end package x20_2000card; 89 | --------------------------------------------------------------------------------