mirror of
https://github.com/hoglet67/AtomBusMon.git
synced 2024-06-26 00:29:28 +00:00
Experimental AtomFast6502 adding bus mon function
Change-Id: Ib5115d9e7b736c45bb46a0a063325a0173b6f823
This commit is contained in:
parent
eaf6f90ab6
commit
8a857ae45e
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@ AtomBusMon_summary.html
|
|||
src/AtomBusMon_bd.bmm
|
||||
src/AtomCpuMon_bd.bmm
|
||||
src/AtomCpuMon_bd.bmm
|
||||
src/AtomFast6502_bd.bmm
|
||||
src/Z80CpuMon_bd.bmm
|
||||
src/MC6809ECpuMon_bd.bmm
|
||||
*~
|
||||
|
|
|
@ -20,43 +20,249 @@
|
|||
</file>
|
||||
<file xil_pn:name="src/AtomFast6502.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="2"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="8"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="60"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/T6502/T65_ALU.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="3"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="3"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="52"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/T6502/T65_MCode.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="4"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="2"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="51"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/T6502/T65_Pack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="5"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="1"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="28"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/T6502/T65.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="6"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="4"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="57"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/oho_dy1/Oho_Dy1.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="7"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="53"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/oho_dy1/OhoPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="8"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="29"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/CommonPacks/avr_adr_pack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="60"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="27"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/CommonPacks/AVRuCPackage.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="61"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="6"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/CommonPacks/spi_mod_comp_pack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="62"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="50"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/CommonPacks/std_library.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="63"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="26"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/CommonPacks/SynthCtrlPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="64"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="1"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Core/alu_avr.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="65"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="25"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Core/AVR_Core_CompPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="66"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="24"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Core/avr_core.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="67"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="49"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Core/bit_processor.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="68"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="23"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Core/io_adr_dec.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="69"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="22"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Core/io_reg_file.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="70"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="21"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Core/pm_fetch_dec.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="71"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="20"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Core/reg_file.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="72"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="19"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/JTAGCompPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="74"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="18"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/JTAGDataPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="75"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="5"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/JTAGOCDPrgTop.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="76"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="48"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/JTAGPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="77"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="4"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/JTAGProgrammerPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="78"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="3"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/JTAGTAPCtrlSMPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="79"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="2"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/OCDProgcp2.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="80"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="17"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/OCDProgTCK.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="81"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="16"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/Resync1b_cp2.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="82"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="15"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/JTAG_OCD_Prg/Resync1b_TCK.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="83"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="14"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/MemArbAndMux/ArbiterAndMux.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="85"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="47"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/MemArbAndMux/MemAccessCompPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="86"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="46"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/MemArbAndMux/MemAccessCtrlPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="87"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="13"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/MemArbAndMux/MemRdMux.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="88"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="45"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/MemArbAndMux/RAMAdrDcd.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="89"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="44"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Memory/prog_mem_init.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="90"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="12"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Memory/XMemCompPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="94"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="42"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Peripheral/portx.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="99"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="40"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Peripheral/SynchronizerCompPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="101"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="11"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Peripheral/SynchronizerDFF.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="102"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="10"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Peripheral/SynchronizerLatch.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="103"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="9"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Peripheral/Timer_Counter.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="105"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="39"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Peripheral/uart.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="106"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="38"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/resync/rsnc_bit.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="107"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="8"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/resync/rsnc_comp_pack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="108"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="7"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/spi_mod/spi_mod.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="113"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="37"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/spi_mod/spi_slv_sel_comp_pack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="114"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="35"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/spi_mod/spi_slv_sel.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="115"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="36"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/uC/AVR_uC_CompPack.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="116"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="34"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/uC/AVR8.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="117"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="55"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/uC/external_mux.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="119"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="33"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/uC/ExtIRQ_Controller.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="120"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="32"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/uC/RAMDataReg.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="121"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="31"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/uC/ResetGenerator.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="122"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="30"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/DCM/DCM0.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="124"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="54"/>
|
||||
</file>
|
||||
<file xil_pn:name="ipcore_dir/WatchEvents.xco" xil_pn:type="FILE_COREGEN">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="125"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="56"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AtomFast6502.bmm" xil_pn:type="FILE_BMM">
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/BusMonCore.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="123"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="58"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AlanD/R65Cx2.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="123"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="7"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="59"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/DCM/DCM2.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="119"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="6"/>
|
||||
<file xil_pn:name="src/AVR8/Memory/XDM2Kx8.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="120"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="43"/>
|
||||
</file>
|
||||
<file xil_pn:name="src/AVR8/Memory/XPM9Kx16.vhd" xil_pn:type="FILE_VHDL">
|
||||
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="121"/>
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="41"/>
|
||||
</file>
|
||||
<file xil_pn:name="ipcore_dir/WatchEvents.xise" xil_pn:type="FILE_COREGENISE">
|
||||
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
|
||||
</file>
|
||||
</files>
|
||||
|
||||
|
|
53
firmware/Makefile.6502fast
Normal file
53
firmware/Makefile.6502fast
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Paths that will need changing
|
||||
|
||||
ATOMFPGA=$(HOME)/atom/AtomBusMon
|
||||
PAPILIO_LOADER=/opt/GadgetFactory/papilio-loader/programmer
|
||||
XILINX=/opt/Xilinx/14.7
|
||||
|
||||
# Shouldn't need to make changes below this point
|
||||
|
||||
BIT_FILE=$(ATOMFPGA)/working/AtomFast6502.bit
|
||||
BMM_FILE=$(ATOMFPGA)/src/AtomFast6502_bd.bmm
|
||||
|
||||
|
||||
# Papilio dev environment
|
||||
PROG=${PAPILIO_LOADER}/linux32/papilio-prog
|
||||
BSCAN=${PAPILIO_LOADER}/bscan_spi_xc3s500e.bit
|
||||
SREC_CAT=srec_cat
|
||||
GAWK=gawk
|
||||
DATA2MEM=${XILINX}/ISE_DS/ISE/bin/lin/data2mem
|
||||
|
||||
# AVR dev environment
|
||||
MCU=atmega103
|
||||
F_CPU=15855484
|
||||
CC=avr-gcc
|
||||
OBJCOPY=avr-objcopy
|
||||
|
||||
CFLAGS=-DCPU=6502 -DCPUEMBEDDED -DF_CPU=${F_CPU}UL -DSERIAL_STATUS -DCOOKED_SERIAL -DNOUSART1 -mmcu=$(MCU) -Wall -Os -mcall-prologues
|
||||
|
||||
OBJECTS=AtomBusMon.o dis6502.o regs6502.o status.o
|
||||
|
||||
build: avr6502fast.bit
|
||||
|
||||
avr6502fast.bit: avr_progmem.mem
|
||||
$(DATA2MEM) -bm $(BMM_FILE) -bd avr_progmem.mem -bt $(BIT_FILE) -o b avr6502fast.bit
|
||||
|
||||
avr_progmem.mem: avr_progmem.hex
|
||||
$(SREC_CAT) $< -Intel -Byte_Swap 2 -Data_Only -o tmp.mem -vmem 8
|
||||
$(GAWK) ' BEGIN{FS=" ";} { $$1= ""; print}' tmp.mem > $@
|
||||
rm tmp.mem
|
||||
|
||||
|
||||
avr_progmem.hex : avr_progmem.out
|
||||
$(OBJCOPY) -R .eeprom -O ihex avr_progmem.out avr_progmem.hex
|
||||
avr_progmem.out : $(OBJECTS)
|
||||
$(CC) $(CFLAGS) -o avr_progmem.out -Wl,-Map,avr_progmem.map $^
|
||||
%.o : %.c
|
||||
$(CC) $(CFLAGS) -Os -c $<
|
||||
%.o : %.S
|
||||
$(CC) $(CFLAGS) -Os -c $<
|
||||
|
||||
.phony: clean
|
||||
|
||||
clean:
|
||||
rm -f avr6502fast.bit avr_progmem.mem avr_progmem.hex avr_progmem.out avr_progmem.map *.o
|
42
src/AtomFast6502.bmm
Normal file
42
src/AtomFast6502.bmm
Normal file
|
@ -0,0 +1,42 @@
|
|||
ADDRESS_MAP avrmap PPC405 0
|
||||
|
||||
ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x000047ff]
|
||||
BUS_BLOCK
|
||||
mon/Inst_AVR8/PM_Inst/RAM_Word0 [15:0];
|
||||
END_BUS_BLOCK;
|
||||
|
||||
BUS_BLOCK
|
||||
mon/Inst_AVR8/PM_Inst/RAM_Word1 [15:0];
|
||||
END_BUS_BLOCK;
|
||||
|
||||
BUS_BLOCK
|
||||
mon/Inst_AVR8/PM_Inst/RAM_Word2 [15:0];
|
||||
END_BUS_BLOCK;
|
||||
|
||||
BUS_BLOCK
|
||||
mon/Inst_AVR8/PM_Inst/RAM_Word3 [15:0];
|
||||
END_BUS_BLOCK;
|
||||
|
||||
BUS_BLOCK
|
||||
mon/Inst_AVR8/PM_Inst/RAM_Word4 [15:0];
|
||||
END_BUS_BLOCK;
|
||||
|
||||
BUS_BLOCK
|
||||
mon/Inst_AVR8/PM_Inst/RAM_Word5 [15:0];
|
||||
END_BUS_BLOCK;
|
||||
|
||||
BUS_BLOCK
|
||||
mon/Inst_AVR8/PM_Inst/RAM_Word6 [15:0];
|
||||
END_BUS_BLOCK;
|
||||
|
||||
BUS_BLOCK
|
||||
mon/Inst_AVR8/PM_Inst/RAM_Word7 [15:0];
|
||||
END_BUS_BLOCK;
|
||||
|
||||
BUS_BLOCK
|
||||
mon/Inst_AVR8/PM_Inst/RAM_Word8 [15:0];
|
||||
END_BUS_BLOCK;
|
||||
|
||||
END_ADDRESS_SPACE;
|
||||
|
||||
END_ADDRESS_MAP;
|
|
@ -1,8 +1,11 @@
|
|||
|
||||
NET "clock49" LOC="P89" | IOSTANDARD = LVCMOS33 | PERIOD = 20.35ns ; # 49.152 MHz Oscillator
|
||||
|
||||
NET "clock49" CLOCK_DEDICATED_ROUTE = FALSE;
|
||||
PIN "mon/inst_dcm0/DCM_INST.CLKIN" CLOCK_DEDICATED_ROUTE = FALSE;
|
||||
|
||||
#NET "VSS" LOC="P16" | IOSTANDARD = LVCMOS33 ; # 6502 pin 1
|
||||
NET "Rdy" LOC="P95" | IOSTANDARD = LVCMOS33 ; # 6502 pin 2
|
||||
#NET "Rdy" LOC="P95" | IOSTANDARD = LVCMOS33 ; # 6502 pin 2
|
||||
NET "Phi1" LOC="P18" | IOSTANDARD = LVCMOS33 ; # 6502 pin 3
|
||||
NET "IRQ_n" LOC="P17" | IOSTANDARD = LVCMOS33 | PULLUP ; # 6502 pin 4
|
||||
#NET "NC" LOC="P94" | IOSTANDARD = LVCMOS33 ; # 6502 pin 5
|
||||
|
@ -50,13 +53,13 @@ NET "sw1" LOC="P39" | IOSTANDARD = LVCMOS33 ; # Bottom Switch
|
|||
NET "nsw2" LOC="P69" | IOSTANDARD = LVCMOS33 | PULLUP ; # Top Switch
|
||||
|
||||
# I/O's for test connector
|
||||
NET test<0> LOC=P48 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
NET test<1> LOC=P49 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
NET test<2> LOC=P27 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
NET test<3> LOC=P44 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
NET test<4> LOC=P50 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
NET test<5> LOC=P42 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
NET test<6> LOC=P99 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
#NET tvs1 LOC=P48 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
#NET tvs0 LOC=P49 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
NET tmosi LOC=P27 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
NET tdin LOC=P44 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
NET tcclk LOC=P50 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
#NET tm1 LOC=P42 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
#NET thsw LOC=P99 | IOSTANDARD = LVCMOS33 | DRIVE=16 ;
|
||||
|
||||
NET "avr_TxD" LOC="P26" | IOSTANDARD = LVCMOS33 ;
|
||||
NET "avr_RxD" LOC="P15" | IOSTANDARD = LVCMOS33 ;
|
||||
|
|
|
@ -31,7 +31,7 @@ entity AtomFast6502 is
|
|||
clock49 : in std_logic;
|
||||
|
||||
-- 6502 Signals
|
||||
Rdy : in std_logic;
|
||||
--Rdy : in std_logic;
|
||||
Phi0 : in std_logic;
|
||||
Phi1 : out std_logic;
|
||||
Phi2 : out std_logic;
|
||||
|
@ -63,7 +63,10 @@ entity AtomFast6502 is
|
|||
led6 : out std_logic;
|
||||
led8 : out std_logic;
|
||||
|
||||
test : out std_logic_vector(6 downto 0)
|
||||
-- OHO_DY1 connected to test connector
|
||||
tmosi : out std_logic;
|
||||
tdin : out std_logic;
|
||||
tcclk : out std_logic
|
||||
|
||||
);
|
||||
end AtomFast6502;
|
||||
|
@ -71,7 +74,6 @@ end AtomFast6502;
|
|||
architecture behavioral of AtomFast6502 is
|
||||
|
||||
signal Din : std_logic_vector(7 downto 0);
|
||||
signal Dout : std_logic_vector(7 downto 0);
|
||||
|
||||
-- Signal from the internal core
|
||||
signal Dout0 : std_logic_vector(7 downto 0);
|
||||
|
@ -84,12 +86,14 @@ architecture behavioral of AtomFast6502 is
|
|||
signal Addr1 : std_logic_vector(15 downto 0);
|
||||
signal R_W_n1 : std_logic;
|
||||
signal Sync1 : std_logic;
|
||||
signal Rdy_int : std_logic;
|
||||
|
||||
signal cpu_addr_us: unsigned (15 downto 0);
|
||||
signal cpu_dout_us: unsigned (7 downto 0);
|
||||
|
||||
signal clock_16x : std_logic;
|
||||
signal cpu_clk : std_logic;
|
||||
signal busmon_clk : std_logic;
|
||||
signal R_W_n_int : std_logic;
|
||||
|
||||
signal cpu_clken : std_logic;
|
||||
|
@ -105,9 +109,62 @@ architecture behavioral of AtomFast6502 is
|
|||
signal edge0 : std_logic;
|
||||
signal edge1 : std_logic;
|
||||
|
||||
|
||||
|
||||
signal Regs : std_logic_vector(63 downto 0);
|
||||
signal Regs1 : std_logic_vector(255 downto 0);
|
||||
signal memory_rd : std_logic;
|
||||
signal memory_wr : std_logic;
|
||||
signal memory_addr : std_logic_vector(15 downto 0);
|
||||
signal memory_dout : std_logic_vector(7 downto 0);
|
||||
signal memory_din : std_logic_vector(7 downto 0);
|
||||
signal memory_done : std_logic;
|
||||
|
||||
begin
|
||||
|
||||
mon : entity work.BusMonCore port map (
|
||||
clock49 => clock49,
|
||||
Addr => Addr1,
|
||||
Data => Data,
|
||||
Phi2 => busmon_clk,
|
||||
Rd_n => not R_W_n1,
|
||||
Wr_n => R_W_n1,
|
||||
RdIO_n => '1',
|
||||
WrIO_n => '1',
|
||||
Sync => Sync1,
|
||||
Rdy => Rdy_int,
|
||||
nRSTin => Res_n,
|
||||
nRSTout => Res_n,
|
||||
CountCycle => Rdy_int,
|
||||
trig => trig,
|
||||
lcd_rs => open,
|
||||
lcd_rw => open,
|
||||
lcd_e => open,
|
||||
lcd_db => open,
|
||||
avr_RxD => avr_RxD,
|
||||
avr_TxD => avr_TxD,
|
||||
sw1 => sw1,
|
||||
nsw2 => nsw2,
|
||||
led3 => led3,
|
||||
led6 => led6,
|
||||
led8 => led8,
|
||||
tmosi => tmosi,
|
||||
tdin => tdin,
|
||||
tcclk => tcclk,
|
||||
Regs => Regs1,
|
||||
RdMemOut=> memory_rd,
|
||||
WrMemOut=> memory_wr,
|
||||
RdIOOut => open,
|
||||
WrIOOut => open,
|
||||
AddrOut => memory_addr,
|
||||
DataOut => memory_dout,
|
||||
DataIn => memory_din,
|
||||
Done => memory_done,
|
||||
SS_Step => open,
|
||||
SS_Single => open
|
||||
);
|
||||
Regs1(63 downto 0) <= Regs;
|
||||
Regs1(255 downto 64) <= (others => '0');
|
||||
|
||||
GenT65Core: if UseT65Core generate
|
||||
inst_t65: entity work.T65 port map (
|
||||
mode => "00",
|
||||
|
@ -116,7 +173,7 @@ begin
|
|||
Res_n => Res_n,
|
||||
Enable => cpu_clken,
|
||||
Clk => clock_16x,
|
||||
Rdy => Rdy,
|
||||
Rdy => Rdy_int,
|
||||
IRQ_n => IRQ_n,
|
||||
NMI_n => NMI_n,
|
||||
R_W_n => R_W_n0,
|
||||
|
@ -125,7 +182,7 @@ begin
|
|||
A(15 downto 0) => Addr0,
|
||||
DI => Din,
|
||||
DO => Dout0,
|
||||
Regs => open
|
||||
Regs => Regs
|
||||
);
|
||||
end generate;
|
||||
|
||||
|
@ -142,13 +199,34 @@ begin
|
|||
nwe => R_W_n0,
|
||||
sync => Sync0,
|
||||
sync_irq => open,
|
||||
Regs => open
|
||||
Regs => Regs
|
||||
);
|
||||
Dout0 <= std_logic_vector(cpu_dout_us);
|
||||
Addr0 <= std_logic_vector(cpu_addr_us);
|
||||
end generate;
|
||||
|
||||
|
||||
|
||||
|
||||
Phi1 <= Phi1_int;
|
||||
Phi2 <= Phi2_int;
|
||||
busmon_clk <= Phi2_int;
|
||||
Din <= Data;
|
||||
|
||||
|
||||
Addr <= memory_addr when (memory_rd = '1' or memory_wr = '1') else Addr1;
|
||||
R_W_n <= '1' when memory_rd = '1' else '0' when memory_wr = '1' else R_W_n1;
|
||||
Sync <= Sync1;
|
||||
|
||||
Data <= memory_dout when cpu_dataen = '1' and memory_wr = '1' else
|
||||
Dout1 when cpu_dataen = '1' and R_W_n1 = '0' and memory_rd = '0' else
|
||||
(others => 'Z');
|
||||
|
||||
memory_done <= memory_rd or memory_wr;
|
||||
|
||||
|
||||
|
||||
|
||||
inst_dcm2 : entity work.DCM2 port map(
|
||||
CLKIN_IN => Phi0,
|
||||
CLKFX_OUT => clock_16x,
|
||||
|
@ -208,6 +286,7 @@ begin
|
|||
if (clk_div = "0000") then
|
||||
Phi1_int <= '1';
|
||||
Phi2_int <= '0';
|
||||
memory_din <= Data;
|
||||
elsif (clk_div = "1000") then
|
||||
Phi1_int <= '0';
|
||||
Phi2_int <= '1';
|
||||
|
@ -219,8 +298,8 @@ begin
|
|||
Sync1 <= Sync0;
|
||||
end if;
|
||||
-- Skew data by one cycle
|
||||
if (clk_div = "1011") then
|
||||
cpu_dataen <= not R_W_n0;
|
||||
if (clk_div = "1000") then
|
||||
cpu_dataen <= '1';
|
||||
Dout1 <= Dout0;
|
||||
elsif (clk_div = "0001") then
|
||||
cpu_dataen <= '0';
|
||||
|
@ -229,26 +308,5 @@ begin
|
|||
end if;
|
||||
end process;
|
||||
|
||||
Phi1 <= Phi1_int;
|
||||
Phi2 <= Phi2_int;
|
||||
Din <= Data;
|
||||
Addr <= Addr1;
|
||||
R_W_n <= R_W_n1;
|
||||
Sync <= Sync1;
|
||||
Data <= Dout1 when cpu_dataen = '1' else "ZZZZZZZZ";
|
||||
|
||||
led3 <= '1';
|
||||
led6 <= '1';
|
||||
led8 <= '1';
|
||||
avr_TxD <= '1';
|
||||
|
||||
test(0) <= clock_16x;
|
||||
test(1) <= Phi1_int;
|
||||
test(2) <= Phi2_int;
|
||||
test(3) <= dcm_locked;
|
||||
test(4) <= dcm_reset;
|
||||
test(5) <= R_W_n1;
|
||||
test(6) <= '1';
|
||||
|
||||
end behavioral;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user