1
0
mirror of https://github.com/Gehstock/Mist_FPGA.git synced 2026-04-06 21:20:00 +00:00

Phoenix: merge cores, add DSWs

This commit is contained in:
Gyorgy Szombathelyi
2022-08-31 17:54:02 +02:00
parent e9603cc4e3
commit 4167bf4228
75 changed files with 437 additions and 12026 deletions

View File

@@ -1,30 +0,0 @@
# -------------------------------------------------------------------------- #
#
# Copyright (C) 1991-2013 Altera Corporation
# Your use of Altera Corporation's design tools, logic functions
# and other software and tools, and its AMPP partner logic
# functions, and any output files from any of the foregoing
# (including device programming or simulation files), and any
# associated documentation or information are expressly subject
# to the terms and conditions of the Altera Program License
# Subscription Agreement, Altera MegaCore Function License
# Agreement, or other applicable license agreement, including,
# without limitation, that your use is for the sole purpose of
# programming logic devices manufactured by Altera and sold by
# Altera or its authorized distributors. Please refer to the
# applicable agreement for further details.
#
# -------------------------------------------------------------------------- #
#
# Quartus II 64-Bit
# Version 13.1.0 Build 162 10/23/2013 SJ Web Edition
# Date created = 02:40:30 January 25, 2017
#
# -------------------------------------------------------------------------- #
QUARTUS_VERSION = "13.1"
DATE = "02:40:30 January 25, 2017"
# Revisions
PROJECT_REVISION = "Capitol_mist"

View File

@@ -1,419 +0,0 @@
# -------------------------------------------------------------------------- #
#
# Copyright (C) 1991-2014 Altera Corporation
# Your use of Altera Corporation's design tools, logic functions
# and other software and tools, and its AMPP partner logic
# functions, and any output files from any of the foregoing
# (including device programming or simulation files), and any
# associated documentation or information are expressly subject
# to the terms and conditions of the Altera Program License
# Subscription Agreement, Altera MegaCore Function License
# Agreement, or other applicable license agreement, including,
# without limitation, that your use is for the sole purpose of
# programming logic devices manufactured by Altera and sold by
# Altera or its authorized distributors. Please refer to the
# applicable agreement for further details.
#
# -------------------------------------------------------------------------- #
#
# Quartus II 64-Bit
# Version 13.1.4 Build 182 03/12/2014 SJ Web Edition
# Date created = 18:25:30 June 25, 2019
#
# -------------------------------------------------------------------------- #
#
# Notes:
#
# 1) The default values for assignments are stored in the file:
# Capitol_mist_assignment_defaults.qdf
# If this file doesn't exist, see file:
# assignment_defaults.qdf
#
# 2) Altera recommends that you do not modify this file. This
# file is updated automatically by the Quartus II software
# and any changes you make may be lost or overwritten.
#
# -------------------------------------------------------------------------- #
# Project-Wide Assignments
# ========================
set_global_assignment -name ORIGINAL_QUARTUS_VERSION 13.1
set_global_assignment -name PROJECT_CREATION_TIME_DATE "21:40:24 MAY 17, 2014"
set_global_assignment -name LAST_QUARTUS_VERSION 13.1
set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
set_global_assignment -name NUM_PARALLEL_PROCESSORS ALL
set_global_assignment -name SMART_RECOMPILE ON
set_global_assignment -name FLOW_ENABLE_IO_ASSIGNMENT_ANALYSIS ON
set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:rtl/build_id.tcl"
set_global_assignment -name SYSTEMVERILOG_FILE rtl/Capitol_MiST.sv
set_global_assignment -name VHDL_FILE rtl/phoenix.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_effect3.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_effect2.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_effect1.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_video.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_music.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/PROM_40.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/PROM_39.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/PROM_24.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/PROM_23.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/prog.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/col_l.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/col_h.vhd
set_global_assignment -name VHDL_FILE rtl/pll.vhd
set_global_assignment -name VHDL_FILE rtl/gen_ram.vhd
set_global_assignment -name QIP_FILE ../../../common/mist/mist.qip
# Pin & Location Assignments
# ==========================
set_location_assignment PIN_7 -to LED
set_location_assignment PIN_54 -to CLOCK_27
set_location_assignment PIN_144 -to VGA_R[5]
set_location_assignment PIN_143 -to VGA_R[4]
set_location_assignment PIN_142 -to VGA_R[3]
set_location_assignment PIN_141 -to VGA_R[2]
set_location_assignment PIN_137 -to VGA_R[1]
set_location_assignment PIN_135 -to VGA_R[0]
set_location_assignment PIN_133 -to VGA_B[5]
set_location_assignment PIN_132 -to VGA_B[4]
set_location_assignment PIN_125 -to VGA_B[3]
set_location_assignment PIN_121 -to VGA_B[2]
set_location_assignment PIN_120 -to VGA_B[1]
set_location_assignment PIN_115 -to VGA_B[0]
set_location_assignment PIN_114 -to VGA_G[5]
set_location_assignment PIN_113 -to VGA_G[4]
set_location_assignment PIN_112 -to VGA_G[3]
set_location_assignment PIN_111 -to VGA_G[2]
set_location_assignment PIN_110 -to VGA_G[1]
set_location_assignment PIN_106 -to VGA_G[0]
set_location_assignment PIN_136 -to VGA_VS
set_location_assignment PIN_119 -to VGA_HS
set_location_assignment PIN_65 -to AUDIO_L
set_location_assignment PIN_80 -to AUDIO_R
set_location_assignment PIN_105 -to SPI_DO
set_location_assignment PIN_88 -to SPI_DI
set_location_assignment PIN_126 -to SPI_SCK
set_location_assignment PIN_127 -to SPI_SS2
set_location_assignment PIN_91 -to SPI_SS3
set_location_assignment PIN_13 -to CONF_DATA0
set_location_assignment PIN_49 -to SDRAM_A[0]
set_location_assignment PIN_44 -to SDRAM_A[1]
set_location_assignment PIN_42 -to SDRAM_A[2]
set_location_assignment PIN_39 -to SDRAM_A[3]
set_location_assignment PIN_4 -to SDRAM_A[4]
set_location_assignment PIN_6 -to SDRAM_A[5]
set_location_assignment PIN_8 -to SDRAM_A[6]
set_location_assignment PIN_10 -to SDRAM_A[7]
set_location_assignment PIN_11 -to SDRAM_A[8]
set_location_assignment PIN_28 -to SDRAM_A[9]
set_location_assignment PIN_50 -to SDRAM_A[10]
set_location_assignment PIN_30 -to SDRAM_A[11]
set_location_assignment PIN_32 -to SDRAM_A[12]
set_location_assignment PIN_83 -to SDRAM_DQ[0]
set_location_assignment PIN_79 -to SDRAM_DQ[1]
set_location_assignment PIN_77 -to SDRAM_DQ[2]
set_location_assignment PIN_76 -to SDRAM_DQ[3]
set_location_assignment PIN_72 -to SDRAM_DQ[4]
set_location_assignment PIN_71 -to SDRAM_DQ[5]
set_location_assignment PIN_69 -to SDRAM_DQ[6]
set_location_assignment PIN_68 -to SDRAM_DQ[7]
set_location_assignment PIN_86 -to SDRAM_DQ[8]
set_location_assignment PIN_87 -to SDRAM_DQ[9]
set_location_assignment PIN_98 -to SDRAM_DQ[10]
set_location_assignment PIN_99 -to SDRAM_DQ[11]
set_location_assignment PIN_100 -to SDRAM_DQ[12]
set_location_assignment PIN_101 -to SDRAM_DQ[13]
set_location_assignment PIN_103 -to SDRAM_DQ[14]
set_location_assignment PIN_104 -to SDRAM_DQ[15]
set_location_assignment PIN_58 -to SDRAM_BA[0]
set_location_assignment PIN_51 -to SDRAM_BA[1]
set_location_assignment PIN_85 -to SDRAM_DQMH
set_location_assignment PIN_67 -to SDRAM_DQML
set_location_assignment PIN_60 -to SDRAM_nRAS
set_location_assignment PIN_64 -to SDRAM_nCAS
set_location_assignment PIN_66 -to SDRAM_nWE
set_location_assignment PIN_59 -to SDRAM_nCS
set_location_assignment PIN_33 -to SDRAM_CKE
set_location_assignment PIN_43 -to SDRAM_CLK
set_location_assignment PLL_1 -to "pll27:pll|altpll:altpll_component"
# Classic Timing Assignments
# ==========================
set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
# Analysis & Synthesis Assignments
# ================================
set_global_assignment -name CYCLONEII_OPTIMIZATION_TECHNIQUE SPEED
set_global_assignment -name FAMILY "Cyclone III"
set_global_assignment -name TOP_LEVEL_ENTITY Capitol_MiST
set_global_assignment -name DEVICE_FILTER_PACKAGE TQFP
set_global_assignment -name DEVICE_FILTER_PIN_COUNT 144
set_global_assignment -name ALLOW_POWER_UP_DONT_CARE ON
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS ON
set_global_assignment -name SAVE_DISK_SPACE OFF
set_global_assignment -name DEVICE_FILTER_SPEED_GRADE 8
# Fitter Assignments
# ==================
set_global_assignment -name FITTER_EARLY_TIMING_ESTIMATE_MODE OPTIMISTIC
set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC ON
set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_RETIMING ON
set_global_assignment -name PHYSICAL_SYNTHESIS_ASYNCHRONOUS_SIGNAL_PIPELINING ON
set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION ON
set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC_FOR_AREA ON
set_global_assignment -name PHYSICAL_SYNTHESIS_MAP_LOGIC_TO_MEMORY_FOR_AREA ON
set_global_assignment -name PHYSICAL_SYNTHESIS_EFFORT EXTRA
set_global_assignment -name DEVICE EP3C25E144C8
set_global_assignment -name CYCLONEIII_CONFIGURATION_SCHEME "PASSIVE SERIAL"
set_global_assignment -name FORCE_CONFIGURATION_VCCIO ON
set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "3.3-V LVTTL"
set_global_assignment -name CRC_ERROR_OPEN_DRAIN OFF
set_global_assignment -name RESERVE_DATA0_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name RESERVE_DATA1_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name RESERVE_FLASH_NCE_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name RESERVE_DCLK_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name CYCLONEII_RESERVE_NCEO_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name OPTIMIZE_HOLD_TIMING "ALL PATHS"
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING ON
set_global_assignment -name FITTER_EFFORT "AUTO FIT"
# Assembler Assignments
# =====================
set_global_assignment -name GENERATE_RBF_FILE ON
set_global_assignment -name USE_CONFIGURATION_DEVICE OFF
# SignalTap II Assignments
# ========================
set_global_assignment -name ENABLE_SIGNALTAP OFF
set_global_assignment -name USE_SIGNALTAP_FILE output_files/video.stp
# Power Estimation Assignments
# ============================
set_global_assignment -name POWER_PRESET_COOLING_SOLUTION "23 MM HEAT SINK WITH 200 LFPM AIRFLOW"
set_global_assignment -name POWER_BOARD_THERMAL_MODEL "NONE (CONSERVATIVE)"
# Advanced I/O Timing Assignments
# ===============================
set_global_assignment -name OUTPUT_IO_TIMING_NEAR_END_VMEAS "HALF VCCIO" -rise
set_global_assignment -name OUTPUT_IO_TIMING_NEAR_END_VMEAS "HALF VCCIO" -fall
set_global_assignment -name OUTPUT_IO_TIMING_FAR_END_VMEAS "HALF SIGNAL SWING" -rise
set_global_assignment -name OUTPUT_IO_TIMING_FAR_END_VMEAS "HALF SIGNAL SWING" -fall
# --------------------------
# start ENTITY(Capitol_MiST)
# Pin & Location Assignments
# ==========================
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[0]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[1]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[2]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[3]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[4]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[5]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[6]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[7]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[8]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[9]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[10]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[11]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[12]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[13]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[14]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[15]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[0]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[1]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[2]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[3]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[4]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[5]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[6]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[7]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[8]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[9]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[10]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[11]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[12]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_BA[0]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_BA[1]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQMH
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQML
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_nRAS
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_nCAS
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_nWE
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_nCS
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[0]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[1]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[2]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[3]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[4]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[5]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[6]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[7]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[8]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[9]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[10]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[11]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[12]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[13]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[14]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[15]
# Fitter Assignments
# ==================
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[6]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[7]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[8]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[9]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[10]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[11]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[12]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[6]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[7]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[8]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[9]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[10]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[11]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[12]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[13]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[14]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[15]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_BA[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_BA[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQML
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQMH
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_nRAS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_nCAS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_nWE
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_nCS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_CKE
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_CLK
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_HS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_VS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to LED
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to AUDIO_L
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to AUDIO_R
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_DO
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to CONF_DATA0
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to AUDIO_L
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to AUDIO_R
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CLOCK_27
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CONF_DATA0
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to LED
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_DI
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_DO
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_SCK
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_SS2
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_SS3
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_HS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_VS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[6]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[7]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[8]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[9]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[10]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[11]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[12]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[6]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[7]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[8]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[9]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[10]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[11]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[12]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[13]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[14]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[15]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_BA[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_BA[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQMH
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQML
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_nRAS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_nCAS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_nWE
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_nCS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_CKE
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_CLK
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to CLOCK_27
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_DI
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_SCK
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_SS2
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_SS3
# start DESIGN_PARTITION(Top)
# ---------------------------
# Incremental Compilation Assignments
# ===================================
set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
# end DESIGN_PARTITION(Top)
# -------------------------
# end ENTITY(Capitol_MiST)
# ------------------------
set_global_assignment -name QIP_FILE ../../../common/CPU/T80/T80.qip
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top

View File

@@ -1,42 +0,0 @@
#************************************************************
# THIS IS A WIZARD-GENERATED FILE.
#
# Version 13.1.4 Build 182 03/12/2014 SJ Full Version
#
#************************************************************
# Copyright (C) 1991-2014 Altera Corporation
# Your use of Altera Corporation's design tools, logic functions
# and other software and tools, and its AMPP partner logic
# functions, and any output files from any of the foregoing
# (including device programming or simulation files), and any
# associated documentation or information are expressly subject
# to the terms and conditions of the Altera Program License
# Subscription Agreement, Altera MegaCore Function License
# Agreement, or other applicable license agreement, including,
# without limitation, that your use is for the sole purpose of
# programming logic devices manufactured by Altera and sold by
# Altera or its authorized distributors. Please refer to the
# applicable agreement for further details.
# Clock constraints
create_clock -name {SPI_SCK} -period 41.666 -waveform { 20.8 41.666 } [get_ports {SPI_SCK}]
# Automatically constrain PLL and other generated clocks
derive_pll_clocks -create_base_clocks
# Automatically calculate clock uncertainty to jitter and other effects.
derive_clock_uncertainty
set_clock_groups -asynchronous -group [get_clocks {SPI_SCK}] -group [get_clocks {pll|altpll_component|auto_generated|pll1|clk[*]}]
set_output_delay -add_delay -clock_fall -clock [get_clocks {pll|altpll_component|auto_generated|pll1|clk[0]}] 1.000 [get_ports {AUDIO_L}]
set_output_delay -add_delay -clock_fall -clock [get_clocks {pll|altpll_component|auto_generated|pll1|clk[0]}] 1.000 [get_ports {AUDIO_R}]
set_output_delay -add_delay -clock_fall -clock [get_clocks {pll|altpll_component|auto_generated|pll1|clk[0]}] 1.000 [get_ports {LED}]
set_output_delay -add_delay -clock_fall -clock [get_clocks {pll|altpll_component|auto_generated|pll1|clk[0]}] 1.000 [get_ports {VGA_*}]
set_multicycle_path -to {VGA_*[*]} -setup 2
set_multicycle_path -to {VGA_*[*]} -hold 1

View File

@@ -1,24 +0,0 @@
---------------------------------------------------------------------------------
--
-- Arcade: Capitol for MiST by Gehstock
-- 15 Mar 2019
--
---------------------------------------------------------------------------------
-- Copyright (c) DAR - Feb 2016
-- https://sourceforge.net/projects/darfpga/files/Software%20VHDL/phoenix/
---------------------------------------------------------------------------------
--
-- Only controls and OSD are rotated on VGA output.
--
--
-- Keyboard inputs :
--
-- ESC : Coin
-- F1 : Start 1 player
-- F2 : Start 2 players
-- SPACE : Fire
-- ARROW KEYS : Movement/Shield
--
-- Joystick support.
--
---------------------------------------------------------------------------------

View File

@@ -1,169 +0,0 @@
//============================================================================
// Arcade: Capitol
//
//-------------------------------------------------------------------------------
// DE2-35 Top level for Phoenix by Dar (darfpga@aol.fr) (April 2016)
// http://darfpga.blogspot.fr
//
//
//-------------------------------------------------------------------------------
module Capitol_MiST
(
output LED,
output [5:0] VGA_R,
output [5:0] VGA_G,
output [5:0] VGA_B,
output VGA_HS,
output VGA_VS,
output AUDIO_L,
output AUDIO_R,
input SPI_SCK,
output SPI_DO,
input SPI_DI,
input SPI_SS2,
input SPI_SS3,
input CONF_DATA0,
input CLOCK_27
);
`include "rtl\build_id.v"
localparam CONF_STR = {
"Capitol;;",
"O2,Rotate Controls,Off,On;",
"O34,Scanlines,Off,25%,50%,75%;",
"O5,Blend,Off,On;",
"T0,Reset;",
"V,v1.21.",`BUILD_DATE
};
wire rotate = status[2];
wire [1:0] scanlines = status[4:3];
wire blend = status[5];
assign LED = 1;
assign AUDIO_R = AUDIO_L;
wire clk_sys, clk_22;
wire pll_locked;
pll pll(
.inclk0(CLOCK_27),
.areset(0),
.c0(clk_sys),
.c1(clk_22)
);
wire [31:0] status;
wire [1:0] buttons;
wire [1:0] switches;
wire [7:0] joystick_0;
wire [7:0] joystick_1;
wire scandoublerD;
wire ypbpr;
reg [11:0] audio;
wire hb1, hb2, vb;
wire blankn = ~((hb1 & hb2) | vb);
wire hs, vs;
wire [1:0] r,g,b;
wire key_pressed;
wire [7:0] key_code;
wire key_strobe;
phoenix phoenix(
.clk(clk_sys),
.reset(status[0] | buttons[1]),
.dip_switch(8'b00001111),
.btn_coin(m_coin1 | m_coin2),
.btn_player_start({m_two_players,m_one_player}),
.btn_left(m_left),
.btn_right(m_right),
.btn_barrier(m_fireB),
.btn_fire(m_fireA),
.video_r(r),
.video_g(g),
.video_b(b),
.video_hs(hs),
.video_vs(vs),
.video_vblank(vb),
.video_hblank_bg(hb1),
.video_hblank_fg(hb2),
.audio_select("000"),
.audio(audio)
);
mist_video #(.COLOR_DEPTH(2), .SD_HCNT_WIDTH(10)) mist_video(
.clk_sys(clk_22),
.SPI_SCK(SPI_SCK),
.SPI_SS3(SPI_SS3),
.SPI_DI(SPI_DI),
.R(blankn ? r : 0),
.G(blankn ? g : 0),
.B(blankn ? b : 0),
.HSync(~hs),
.VSync(~vs),
.VGA_R(VGA_R),
.VGA_G(VGA_G),
.VGA_B(VGA_B),
.VGA_VS(VGA_VS),
.VGA_HS(VGA_HS),
.ce_divider(1'b1),
.blend(blend),
.rotate({1'b1,rotate}),
.scandoubler_disable(scandoublerD),
.scanlines(scanlines),
.ypbpr(ypbpr)
);
user_io #(
.STRLEN(($size(CONF_STR)>>3)))
user_io(
.clk_sys (clk_sys ),
.conf_str (CONF_STR ),
.SPI_CLK (SPI_SCK ),
.SPI_SS_IO (CONF_DATA0 ),
.SPI_MISO (SPI_DO ),
.SPI_MOSI (SPI_DI ),
.buttons (buttons ),
.switches (switches ),
.scandoubler_disable (scandoublerD ),
.ypbpr (ypbpr ),
.key_strobe (key_strobe ),
.key_pressed (key_pressed ),
.key_code (key_code ),
.joystick_0 (joystick_0 ),
.joystick_1 (joystick_1 ),
.status (status )
);
dac #(
.C_bits(15))
dac(
.clk_i(clk_sys),
.res_n_i(1),
.dac_i({audio, 3'b000}),
.dac_o(AUDIO_L)
);
wire m_up, m_down, m_left, m_right, m_fireA, m_fireB, m_fireC, m_fireD, m_fireE, m_fireF;
wire m_up2, m_down2, m_left2, m_right2, m_fire2A, m_fire2B, m_fire2C, m_fire2D, m_fire2E, m_fire2F;
wire m_tilt, m_coin1, m_coin2, m_coin3, m_coin4, m_one_player, m_two_players, m_three_players, m_four_players;
arcade_inputs inputs (
.clk ( clk_sys ),
.key_strobe ( key_strobe ),
.key_pressed ( key_pressed ),
.key_code ( key_code ),
.joystick_0 ( joystick_0 ),
.joystick_1 ( joystick_1 ),
.rotate ( rotate ),
.orientation ( 2'b11 ),
.joyswap ( 1'b0 ),
.oneplayer ( 1'b1 ),
.controls ( {m_tilt, m_coin4, m_coin3, m_coin2, m_coin1, m_four_players, m_three_players, m_two_players, m_one_player} ),
.player1 ( {m_fireF, m_fireE, m_fireD, m_fireC, m_fireB, m_fireA, m_up, m_down, m_left, m_right} ),
.player2 ( {m_fire2F, m_fire2E, m_fire2D, m_fire2C, m_fire2B, m_fire2A, m_up2, m_down2, m_left2, m_right2} )
);
endmodule

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity PROM_23 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of PROM_23 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"10",X"90",X"70",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"0F",X"08",X"08",X"04",X"FF",X"FF",X"FF",X"7E",X"3F",X"1C",X"88",X"E4",
X"E0",X"F8",X"FC",X"FE",X"FE",X"FF",X"FF",X"FF",X"02",X"01",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"E3",X"F1",X"F8",X"7C",X"7E",X"3F",X"1F",X"07",
X"17",X"1F",X"FF",X"7F",X"3F",X"9F",X"8F",X"C7",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"20",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"01",X"02",X"04",X"08",X"10",X"20",X"40",X"80",X"40",X"20",X"10",X"08",X"04",X"02",X"01",X"02",
X"04",X"08",X"10",X"20",X"40",X"80",X"40",X"20",X"10",X"08",X"04",X"02",X"01",X"02",X"04",X"08",
X"10",X"20",X"40",X"80",X"40",X"20",X"10",X"08",X"04",X"02",X"01",X"02",X"04",X"08",X"10",X"20",
X"40",X"80",X"40",X"20",X"10",X"08",X"04",X"02",X"01",X"02",X"04",X"08",X"10",X"20",X"40",X"80",
X"00",X"18",X"3C",X"7E",X"3C",X"18",X"00",X"00",X"00",X"00",X"20",X"70",X"70",X"20",X"00",X"00",
X"10",X"38",X"7C",X"FE",X"7C",X"38",X"10",X"00",X"20",X"A4",X"38",X"FE",X"38",X"A4",X"20",X"00",
X"44",X"AA",X"AA",X"01",X"01",X"AA",X"AA",X"44",X"44",X"AA",X"82",X"01",X"01",X"82",X"AA",X"44",
X"44",X"82",X"82",X"01",X"01",X"82",X"82",X"44",X"40",X"80",X"80",X"00",X"00",X"80",X"80",X"00",
X"3C",X"6E",X"EF",X"EF",X"EF",X"EF",X"6E",X"3C",X"3C",X"66",X"E7",X"E7",X"E7",X"E7",X"66",X"3C",
X"3C",X"66",X"C3",X"C3",X"C3",X"C3",X"66",X"3C",X"E8",X"D0",X"F0",X"5E",X"70",X"30",X"30",X"10",
X"E8",X"C8",X"E4",X"C3",X"E3",X"C4",X"E8",X"C8",X"10",X"30",X"30",X"70",X"7E",X"D0",X"F0",X"C8",
X"73",X"06",X"04",X"0C",X"1E",X"30",X"7C",X"C0",X"18",X"18",X"70",X"00",X"00",X"70",X"18",X"18",
X"C0",X"7C",X"30",X"1E",X"0C",X"04",X"06",X"73",X"E0",X"E0",X"E0",X"E0",X"C0",X"C0",X"C0",X"C0",
X"C5",X"AB",X"AD",X"9D",X"9C",X"B4",X"B4",X"F0",X"F0",X"B4",X"B4",X"9C",X"9D",X"AD",X"AB",X"C5",
X"C0",X"C0",X"C0",X"C0",X"E0",X"E0",X"E0",X"E0",X"80",X"84",X"48",X"30",X"1F",X"30",X"48",X"84",
X"18",X"24",X"24",X"24",X"24",X"24",X"24",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"90",X"F0",X"F8",X"3F",X"00",X"00",X"00",X"00",X"00",X"02",X"3C",X"CC",X"14",X"24",X"48",X"88",
X"FF",X"FF",X"C1",X"80",X"80",X"00",X"00",X"00",X"08",X"08",X"08",X"0C",X"8F",X"8E",X"C6",X"FF",
X"08",X"08",X"D0",X"E0",X"78",X"1E",X"00",X"00",X"C0",X"80",X"80",X"E0",X"1B",X"0C",X"34",X"C4",
X"FF",X"FF",X"C3",X"81",X"80",X"00",X"00",X"00",X"00",X"01",X"01",X"03",X"83",X"83",X"C7",X"FF",
X"FF",X"08",X"10",X"20",X"C0",X"C0",X"60",X"30",X"00",X"30",X"60",X"C0",X"C0",X"A0",X"10",X"08",
X"FF",X"FF",X"C7",X"83",X"81",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"81",X"83",X"C7",X"FF",
X"E0",X"E0",X"E0",X"E0",X"C0",X"80",X"00",X"00",X"00",X"00",X"80",X"C0",X"E0",X"E0",X"F8",X"F8",
X"F9",X"FF",X"FF",X"19",X"19",X"FF",X"FF",X"00",X"00",X"FF",X"FF",X"F9",X"F9",X"FF",X"FF",X"F9",
X"C0",X"20",X"F8",X"FF",X"F8",X"20",X"C0",X"00",X"30",X"2E",X"30",X"28",X"30",X"2E",X"30",X"28",
X"10",X"38",X"EC",X"4E",X"EC",X"38",X"10",X"00",X"00",X"E0",X"F0",X"A0",X"00",X"00",X"00",X"00",
X"A0",X"00",X"40",X"00",X"00",X"00",X"00",X"00",X"F8",X"F4",X"E0",X"40",X"00",X"00",X"00",X"00",
X"00",X"00",X"60",X"80",X"10",X"00",X"00",X"00",X"0C",X"0E",X"5F",X"FB",X"B9",X"C8",X"E4",X"60",
X"00",X"0C",X"0E",X"2F",X"7F",X"7E",X"F2",X"FF",X"D0",X"A0",X"08",X"00",X"00",X"00",X"00",X"00",
X"FB",X"F0",X"D0",X"40",X"20",X"00",X"00",X"00",X"30",X"78",X"68",X"C0",X"40",X"00",X"00",X"00",
X"1E",X"00",X"7F",X"FF",X"00",X"F2",X"6A",X"B0",X"00",X"1C",X"00",X"7F",X"7F",X"00",X"FA",X"F0",
X"00",X"00",X"00",X"00",X"2A",X"00",X"00",X"00",X"00",X"00",X"00",X"2A",X"2A",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"E8",X"00",X"00",X"00",X"00",X"00",X"00",X"08",X"DC",X"08",X"00",X"00",
X"00",X"00",X"00",X"1C",X"DC",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",
X"57",X"07",X"57",X"07",X"57",X"07",X"56",X"FC",X"55",X"00",X"55",X"00",X"55",X"00",X"55",X"FF",
X"01",X"03",X"FF",X"FF",X"57",X"07",X"57",X"07",X"00",X"00",X"FF",X"FF",X"55",X"00",X"55",X"00",
X"00",X"00",X"FC",X"00",X"FF",X"FC",X"00",X"00",X"00",X"FF",X"00",X"FF",X"00",X"FF",X"FF",X"00",
X"00",X"00",X"FF",X"00",X"AA",X"00",X"00",X"00",X"00",X"FF",X"00",X"2A",X"00",X"54",X"00",X"00",
X"FF",X"00",X"FF",X"FF",X"00",X"FF",X"00",X"FF",X"00",X"00",X"00",X"2A",X"00",X"00",X"00",X"00",
X"00",X"FF",X"00",X"FF",X"00",X"FF",X"00",X"00",X"04",X"04",X"06",X"06",X"07",X"07",X"00",X"00",
X"FF",X"FC",X"E0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"E0",X"FC",
X"FF",X"6F",X"C7",X"07",X"0F",X"1F",X"3E",X"00",X"00",X"00",X"3E",X"1F",X"0F",X"07",X"C7",X"6F",
X"E0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"79",X"00",X"F0",X"00",X"00",X"00",X"00",X"F8",X"00",X"F8",X"00",X"00",X"00",X"00",X"F0",X"00",
X"00",X"80",X"80",X"C0",X"E0",X"C0",X"80",X"80",X"00",X"80",X"80",X"C4",X"EE",X"C4",X"80",X"80",
X"00",X"80",X"80",X"CE",X"EE",X"CE",X"80",X"80",X"00",X"80",X"8E",X"DF",X"FF",X"DF",X"8E",X"80",
X"FE",X"88",X"88",X"90",X"E0",X"80",X"80",X"00",X"00",X"00",X"80",X"80",X"E0",X"90",X"88",X"88",
X"3F",X"08",X"08",X"04",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"04",X"08",X"08",
X"01",X"02",X"04",X"08",X"10",X"20",X"40",X"80",X"01",X"02",X"04",X"08",X"10",X"20",X"40",X"80",
X"03",X"0C",X"30",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"0C",X"30",X"C0",
X"0F",X"F0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0F",X"F0",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"0F",X"F0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0F",X"F0",
X"80",X"40",X"20",X"10",X"08",X"04",X"02",X"01",X"80",X"40",X"20",X"10",X"08",X"04",X"02",X"01",
X"00",X"00",X"00",X"00",X"C0",X"30",X"0C",X"03",X"C0",X"30",X"0C",X"03",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"F0",X"0F",X"00",X"00",X"00",X"00",X"F0",X"0F",X"00",X"00",
X"00",X"00",X"F0",X"0F",X"00",X"00",X"00",X"00",X"F0",X"0F",X"00",X"00",X"00",X"00",X"00",X"00",
X"80",X"C0",X"E0",X"C0",X"80",X"80",X"80",X"00",X"E0",X"C0",X"80",X"80",X"80",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"C0",X"00",X"00",X"80",X"80",X"80",X"C0",X"E0",X"C0",
X"80",X"80",X"80",X"C0",X"E0",X"C0",X"80",X"80",X"A0",X"F0",X"60",X"C0",X"80",X"80",X"80",X"00",
X"00",X"00",X"80",X"80",X"80",X"C0",X"60",X"F0",X"60",X"C0",X"80",X"80",X"80",X"00",X"00",X"00",
X"80",X"80",X"80",X"C0",X"60",X"F0",X"A0",X"F0",X"80",X"C0",X"60",X"F0",X"A0",X"F0",X"60",X"C0",
X"60",X"F0",X"A0",X"F0",X"60",X"C0",X"80",X"80",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"C0",
X"E0",X"70",X"78",X"EE",X"B8",X"EE",X"78",X"70",X"78",X"EE",X"B8",X"EE",X"78",X"70",X"E0",X"C0",
X"80",X"80",X"80",X"80",X"C0",X"C0",X"E0",X"70",X"B8",X"EE",X"78",X"70",X"E0",X"C0",X"C0",X"80",
X"80",X"80",X"C0",X"C0",X"E0",X"70",X"78",X"EE",X"78",X"70",X"E0",X"C0",X"C0",X"80",X"80",X"80",
X"C0",X"C0",X"E0",X"70",X"78",X"EE",X"B8",X"EE",X"70",X"5E",X"E0",X"E0",X"C0",X"C0",X"80",X"80",
X"00",X"80",X"80",X"C0",X"C0",X"E0",X"F0",X"5E",X"03",X"07",X"03",X"01",X"03",X"01",X"03",X"03",
X"03",X"03",X"03",X"01",X"03",X"01",X"03",X"07",X"7F",X"70",X"7F",X"D0",X"F8",X"E0",X"C0",X"80",
X"00",X"00",X"00",X"80",X"C0",X"E0",X"F8",X"D0",X"1E",X"0F",X"1E",X"0C",X"07",X"03",X"0F",X"07",
X"0E",X"07",X"0F",X"07",X"0F",X"03",X"07",X"0C",X"18",X"0C",X"18",X"0C",X"07",X"03",X"0F",X"07",
X"F0",X"FF",X"D0",X"F8",X"E0",X"C0",X"80",X"80",X"00",X"00",X"00",X"00",X"80",X"F0",X"A0",X"FE",
X"3C",X"1E",X"3C",X"1D",X"0F",X"07",X"0F",X"03",X"18",X"3C",X"1C",X"3E",X"1F",X"3F",X"0F",X"19",
X"F0",X"FE",X"A0",X"F0",X"80",X"00",X"00",X"00",X"80",X"80",X"80",X"C0",X"E0",X"F8",X"D0",X"FF",
X"3C",X"19",X"0F",X"3F",X"1F",X"3E",X"1C",X"3C",X"07",X"03",X"0F",X"07",X"0F",X"1D",X"3C",X"1E",
X"D0",X"F8",X"E0",X"C0",X"80",X"80",X"80",X"80",X"00",X"00",X"80",X"F0",X"A0",X"FE",X"F0",X"FF",
X"3C",X"1D",X"0F",X"07",X"0F",X"03",X"07",X"03",X"1C",X"3E",X"1F",X"3F",X"0F",X"19",X"3C",X"1E",
X"A0",X"F0",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"E0",X"F8",X"D0",X"FF",X"F0",X"FE",
X"0F",X"3F",X"1F",X"3E",X"1C",X"3C",X"18",X"38",X"0F",X"07",X"0F",X"1D",X"3C",X"1E",X"3C",X"19",
X"80",X"F0",X"A0",X"FE",X"F0",X"FF",X"D0",X"F8",X"0F",X"07",X"0F",X"03",X"07",X"03",X"07",X"03",
X"1F",X"3F",X"0F",X"19",X"3C",X"1E",X"3C",X"1D",X"E0",X"F8",X"D0",X"FF",X"F0",X"FE",X"A0",X"F0",
X"1F",X"3E",X"1C",X"3C",X"18",X"38",X"30",X"70",X"0F",X"1D",X"3C",X"1E",X"3C",X"19",X"0F",X"3F",
X"A0",X"FE",X"F0",X"FF",X"D0",X"F8",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"F0",
X"0F",X"19",X"3C",X"1E",X"3C",X"1D",X"0F",X"07",X"30",X"38",X"18",X"3C",X"1C",X"3E",X"1F",X"3F",
X"D0",X"FF",X"F0",X"FE",X"A0",X"F0",X"80",X"00",X"80",X"80",X"80",X"80",X"80",X"C0",X"E0",X"F8",
X"3C",X"1E",X"3C",X"19",X"0F",X"3F",X"1F",X"3E",X"07",X"03",X"07",X"03",X"0F",X"07",X"0F",X"1D",
X"30",X"B0",X"E0",X"E0",X"C0",X"E0",X"F8",X"D0",X"90",X"A0",X"F0",X"E0",X"E0",X"E0",X"F8",X"D0",
X"A4",X"EC",X"C8",X"90",X"AC",X"08",X"98",X"50",X"C4",X"8C",X"A8",X"14",X"3C",X"64",X"5C",X"98",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"02",X"06",X"06",X"0A",X"0A",X"12",X"34",X"08",X"0A",X"0F",X"0F",X"0E",X"0E",X"0E",X"06",
X"03",X"07",X"0D",X"2A",X"3A",X"3A",X"76",X"D6",X"08",X"09",X"0E",X"0F",X"0F",X"0E",X"0C",X"06",
X"48",X"6C",X"3C",X"1C",X"1E",X"0E",X"06",X"02",X"00",X"80",X"80",X"60",X"30",X"98",X"90",X"D8",
X"8E",X"C6",X"44",X"56",X"72",X"2A",X"0B",X"06",X"00",X"80",X"E0",X"A0",X"B8",X"1C",X"1C",X"08",
X"0A",X"01",X"0C",X"04",X"0E",X"0E",X"0D",X"0C",X"0E",X"07",X"09",X"00",X"08",X"0C",X"0D",X"0F",
X"03",X"03",X"03",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"03",X"03",
X"0C",X"08",X"08",X"08",X"08",X"08",X"08",X"08",X"0F",X"07",X"0E",X"06",X"0E",X"0C",X"0C",X"0C",
X"08",X"08",X"0C",X"0C",X"0C",X"0C",X"0E",X"06",X"80",X"C0",X"C0",X"C0",X"60",X"60",X"60",X"70",
X"03",X"03",X"03",X"01",X"01",X"01",X"01",X"01",X"07",X"03",X"07",X"03",X"03",X"03",X"03",X"03",
X"C0",X"C0",X"60",X"60",X"60",X"70",X"30",X"38",X"C0",X"C0",X"80",X"80",X"80",X"00",X"00",X"00",
X"18",X"38",X"30",X"70",X"60",X"60",X"60",X"C0",X"03",X"03",X"03",X"03",X"03",X"03",X"07",X"03",
X"00",X"01",X"01",X"01",X"01",X"01",X"03",X"03",X"03",X"01",X"01",X"01",X"01",X"01",X"00",X"00",
X"60",X"60",X"60",X"70",X"30",X"38",X"18",X"3C",X"30",X"70",X"60",X"60",X"60",X"C0",X"C0",X"C0",
X"03",X"03",X"03",X"03",X"07",X"03",X"07",X"03",X"01",X"01",X"01",X"01",X"03",X"03",X"03",X"03",
X"03",X"03",X"03",X"03",X"03",X"01",X"01",X"01",X"60",X"70",X"30",X"38",X"18",X"3C",X"1C",X"3E",
X"80",X"80",X"80",X"C0",X"C0",X"C0",X"60",X"60",X"60",X"60",X"60",X"C0",X"C0",X"C0",X"80",X"80",
X"03",X"03",X"07",X"03",X"07",X"03",X"0F",X"07",X"01",X"01",X"03",X"03",X"03",X"03",X"03",X"03",
X"03",X"03",X"03",X"01",X"01",X"01",X"01",X"01",X"0F",X"03",X"07",X"03",X"07",X"03",X"03",X"03",
X"00",X"00",X"00",X"08",X"08",X"08",X"08",X"08",X"1C",X"3C",X"18",X"38",X"30",X"70",X"60",X"60",
X"00",X"00",X"00",X"01",X"01",X"01",X"01",X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"00",X"00",X"00",X"00",X"00",
X"80",X"80",X"80",X"80",X"80",X"00",X"00",X"00",X"E0",X"C0",X"C0",X"80",X"80",X"80",X"80",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",
X"00",X"00",X"80",X"80",X"80",X"80",X"C0",X"C0",X"03",X"03",X"03",X"03",X"03",X"03",X"03",X"03");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity PROM_24 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of PROM_24 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"1C",X"9C",X"FE",X"FE",X"7E",X"1E",X"00",
X"00",X"78",X"7E",X"7F",X"7F",X"38",X"38",X"1C",X"20",X"10",X"88",X"C1",X"E1",X"70",X"38",X"1C",
X"00",X"00",X"20",X"90",X"48",X"24",X"90",X"48",X"0E",X"07",X"03",X"01",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0E",X"07",X"13",X"09",X"04",X"02",X"00",X"00",
X"10",X"00",X"80",X"C4",X"E2",X"71",X"38",X"1C",X"00",X"00",X"00",X"00",X"80",X"C0",X"60",X"30",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"07",X"03",X"01",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"0F",X"0F",X"0C",X"0F",X"07",X"07",
X"F0",X"F4",X"EC",X"FE",X"7E",X"1E",X"00",X"00",X"C0",X"C0",X"E0",X"00",X"E0",X"F0",X"C8",X"38",
X"07",X"07",X"03",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"01",X"03",X"03",X"03",X"07",X"07",
X"00",X"F0",X"E8",X"D8",X"B0",X"F0",X"70",X"30",X"00",X"30",X"70",X"F0",X"B8",X"D8",X"E8",X"F0",
X"07",X"07",X"07",X"03",X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"01",X"03",X"07",X"07",
X"E0",X"E0",X"E0",X"E0",X"C0",X"80",X"00",X"00",X"00",X"00",X"80",X"C0",X"E0",X"E0",X"E0",X"E0",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"C0",X"00",X"00",X"F0",X"00",X"00",X"C0",X"00",X"00",X"00",X"10",X"18",X"10",X"00",X"00",X"00",
X"E0",X"78",X"00",X"F8",X"00",X"78",X"E0",X"00",X"0E",X"5E",X"0C",X"58",X"F8",X"F0",X"B0",X"80",
X"FE",X"F8",X"FC",X"FE",X"7E",X"3C",X"30",X"00",X"6F",X"DF",X"FE",X"FE",X"EE",X"CC",X"00",X"00",
X"37",X"7F",X"9E",X"78",X"FC",X"FC",X"B8",X"90",X"00",X"00",X"00",X"04",X"26",X"37",X"9F",X"FF",
X"00",X"00",X"00",X"02",X"04",X"29",X"0D",X"12",X"EF",X"7E",X"FE",X"FC",X"7C",X"30",X"00",X"00",
X"2E",X"7F",X"EF",X"FE",X"FA",X"78",X"30",X"00",X"02",X"07",X"17",X"3E",X"B8",X"FC",X"EC",X"40",
X"00",X"18",X"00",X"0C",X"2A",X"9D",X"95",X"EF",X"00",X"00",X"14",X"00",X"28",X"05",X"0F",X"3F",
X"00",X"00",X"00",X"FF",X"FF",X"FF",X"00",X"00",X"00",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"50",X"50",X"03",X"FC",X"00",X"00",X"00",X"00",X"54",X"54",X"00",X"00",X"FF",
X"00",X"00",X"00",X"FF",X"FF",X"FF",X"FF",X"00",X"00",X"00",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",
X"00",X"00",X"54",X"54",X"00",X"54",X"54",X"00",X"FF",X"00",X"FF",X"FF",X"FF",X"00",X"00",X"00",
X"FF",X"00",X"00",X"00",X"2A",X"00",X"00",X"FF",X"04",X"04",X"06",X"06",X"07",X"07",X"FF",X"00",
X"F0",X"00",X"00",X"30",X"00",X"C0",X"00",X"00",X"00",X"00",X"00",X"C0",X"00",X"30",X"00",X"00",
X"00",X"00",X"00",X"01",X"00",X"00",X"00",X"3F",X"00",X"3F",X"00",X"00",X"00",X"01",X"00",X"00",
X"1F",X"F0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"F0",
X"7E",X"3F",X"FF",X"7F",X"7C",X"70",X"60",X"00",X"00",X"00",X"60",X"70",X"7C",X"7F",X"FF",X"3F",
X"00",X"00",X"0E",X"1F",X"1F",X"1F",X"0E",X"00",X"00",X"00",X"0E",X"1F",X"1F",X"1F",X"0E",X"00",
X"00",X"00",X"0E",X"1F",X"1F",X"1F",X"0E",X"00",X"00",X"00",X"0E",X"1F",X"1F",X"1F",X"0E",X"00",
X"F7",X"81",X"81",X"82",X"02",X"84",X"A8",X"E0",X"00",X"E0",X"98",X"84",X"02",X"82",X"81",X"81",
X"77",X"40",X"40",X"20",X"20",X"10",X"0C",X"03",X"00",X"03",X"0C",X"10",X"20",X"20",X"40",X"40",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"00",X"80",X"80",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"00",X"80",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",
X"00",X"00",X"00",X"20",X"00",X"00",X"00",X"00",X"20",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"20",X"00",
X"00",X"00",X"00",X"00",X"20",X"00",X"00",X"00",X"00",X"40",X"10",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"10",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"10",X"40",X"10",X"00",X"00",X"00",X"10",X"40",X"10",X"00",X"00",
X"00",X"10",X"40",X"10",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"16",X"40",X"16",X"00",X"00",X"00",X"16",X"40",X"16",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"40",X"16",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"80",X"00",X"00",X"96",X"00",X"00",X"80",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"80",X"00",X"00",X"96",X"40",X"96",X"80",X"AE",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"AE",X"00",X"04",X"00",X"00",X"02",X"00",X"02",X"00",
X"00",X"00",X"02",X"00",X"02",X"00",X"00",X"04",X"8F",X"80",X"8F",X"20",X"18",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"20",X"19",X"00",X"19",X"03",X"00",X"00",X"0C",X"00",
X"0C",X"00",X"0C",X"00",X"0C",X"00",X"00",X"03",X"17",X"03",X"17",X"03",X"00",X"00",X"0C",X"00",
X"00",X"0F",X"20",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"40",X"1E",
X"33",X"01",X"33",X"02",X"00",X"00",X"0C",X"00",X"00",X"30",X"00",X"30",X"00",X"30",X"00",X"06",
X"00",X"1E",X"40",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"20",X"0F",
X"33",X"06",X"00",X"30",X"00",X"30",X"00",X"30",X"06",X"00",X"0C",X"00",X"00",X"02",X"33",X"01",
X"20",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"40",X"1E",X"00",X"0F",
X"33",X"02",X"00",X"00",X"0C",X"00",X"06",X"00",X"00",X"30",X"00",X"30",X"00",X"06",X"33",X"01",
X"40",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"20",X"0F",X"00",X"1E",
X"00",X"30",X"00",X"30",X"00",X"30",X"00",X"00",X"0C",X"00",X"00",X"02",X"33",X"01",X"33",X"06",
X"00",X"30",X"40",X"1E",X"00",X"0F",X"20",X"18",X"00",X"00",X"0C",X"00",X"06",X"00",X"06",X"00",
X"00",X"30",X"00",X"06",X"33",X"01",X"33",X"02",X"00",X"18",X"20",X"0F",X"00",X"1E",X"40",X"30",
X"00",X"30",X"00",X"30",X"00",X"00",X"00",X"00",X"00",X"02",X"33",X"01",X"33",X"06",X"00",X"30",
X"40",X"1E",X"00",X"0F",X"20",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",
X"00",X"06",X"33",X"01",X"33",X"02",X"00",X"00",X"00",X"00",X"00",X"30",X"00",X"30",X"00",X"30",
X"20",X"0F",X"00",X"1E",X"40",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",
X"33",X"01",X"33",X"06",X"00",X"30",X"00",X"30",X"06",X"00",X"06",X"00",X"0C",X"00",X"00",X"02",
X"F0",X"F0",X"E0",X"E0",X"00",X"00",X"18",X"20",X"F0",X"E0",X"F0",X"60",X"60",X"00",X"18",X"20",
X"BC",X"FC",X"F8",X"F2",X"EC",X"F8",X"F8",X"F0",X"FC",X"FC",X"FC",X"F4",X"FC",X"FC",X"FC",X"F8",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"02",X"16",X"06",X"0E",X"0E",X"1E",X"3C",X"00",X"02",X"03",X"03",X"03",X"03",X"01",X"01",
X"03",X"07",X"4F",X"2E",X"3E",X"3E",X"7E",X"FE",X"00",X"01",X"03",X"03",X"03",X"03",X"03",X"01",
X"78",X"7C",X"3C",X"1C",X"1E",X"0E",X"26",X"02",X"00",X"80",X"80",X"E0",X"F0",X"F8",X"F4",X"F8",
X"FE",X"FE",X"73",X"7E",X"7E",X"AF",X"0F",X"06",X"00",X"80",X"E4",X"E0",X"F8",X"FC",X"FC",X"F8",
X"02",X"07",X"07",X"07",X"03",X"03",X"01",X"00",X"02",X"03",X"07",X"07",X"07",X"07",X"07",X"03",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"00",X"0C",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"00",X"06",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"06",X"00",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"00",X"30",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"06",X"00",X"06",X"00",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"00",X"06",X"00",X"06",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity PROM_39 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of PROM_39 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"7C",X"12",X"12",X"12",X"7E",X"7C",X"00",
X"00",X"34",X"4A",X"4A",X"4A",X"7E",X"7E",X"00",X"00",X"24",X"42",X"42",X"42",X"7E",X"3C",X"00",
X"00",X"3C",X"42",X"42",X"42",X"7E",X"7E",X"00",X"00",X"42",X"4A",X"4A",X"4A",X"7E",X"7E",X"00",
X"00",X"02",X"0A",X"0A",X"0A",X"7E",X"7E",X"00",X"00",X"34",X"52",X"52",X"42",X"7E",X"3C",X"00",
X"00",X"7E",X"08",X"08",X"08",X"7E",X"7E",X"00",X"00",X"42",X"42",X"7E",X"7E",X"42",X"42",X"00",
X"00",X"7E",X"7E",X"7E",X"40",X"40",X"30",X"00",X"00",X"42",X"24",X"18",X"08",X"7E",X"7E",X"00",
X"00",X"40",X"40",X"40",X"40",X"7E",X"7E",X"00",X"00",X"7E",X"02",X"7C",X"02",X"7E",X"7E",X"00",
X"00",X"7E",X"20",X"18",X"04",X"7E",X"7E",X"00",X"00",X"3C",X"42",X"42",X"42",X"7E",X"3C",X"00",
X"00",X"0C",X"12",X"12",X"12",X"7E",X"7E",X"00",X"00",X"40",X"3C",X"62",X"42",X"7E",X"3C",X"00",
X"00",X"44",X"2A",X"1A",X"0A",X"7E",X"7E",X"00",X"00",X"34",X"72",X"4A",X"4A",X"4E",X"2C",X"00",
X"00",X"02",X"02",X"7E",X"7E",X"02",X"02",X"00",X"00",X"3E",X"40",X"40",X"40",X"7E",X"7E",X"00",
X"00",X"1E",X"20",X"40",X"20",X"3E",X"1E",X"00",X"00",X"3E",X"40",X"38",X"40",X"7E",X"3E",X"00",
X"00",X"42",X"26",X"1C",X"38",X"74",X"62",X"00",X"00",X"06",X"08",X"70",X"08",X"0E",X"06",X"00",
X"00",X"42",X"46",X"4E",X"5A",X"72",X"62",X"00",X"00",X"00",X"00",X"18",X"18",X"00",X"00",X"00",
X"00",X"00",X"18",X"24",X"24",X"18",X"00",X"00",X"00",X"00",X"42",X"66",X"3C",X"18",X"00",X"00",
X"00",X"00",X"00",X"18",X"3C",X"66",X"42",X"00",X"00",X"00",X"24",X"18",X"7E",X"18",X"24",X"00",
X"00",X"00",X"3C",X"46",X"4A",X"52",X"3C",X"00",X"00",X"00",X"40",X"40",X"7E",X"42",X"44",X"00",
X"00",X"00",X"64",X"4A",X"52",X"62",X"44",X"00",X"00",X"00",X"34",X"4A",X"4A",X"4A",X"42",X"00",
X"00",X"00",X"08",X"7E",X"08",X"08",X"0E",X"00",X"00",X"00",X"30",X"4A",X"4A",X"4A",X"4E",X"00",
X"00",X"00",X"30",X"4A",X"4A",X"4A",X"3C",X"00",X"00",X"00",X"06",X"1A",X"32",X"62",X"06",X"00",
X"00",X"00",X"34",X"4A",X"4A",X"4A",X"34",X"00",X"00",X"00",X"3C",X"52",X"52",X"52",X"0C",X"00",
X"00",X"00",X"60",X"F8",X"FF",X"F8",X"60",X"00",X"00",X"00",X"08",X"08",X"08",X"08",X"08",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"3C",X"66",X"66",X"3C",X"18",X"00",
X"00",X"3C",X"42",X"5A",X"5A",X"42",X"3C",X"00",X"00",X"00",X"06",X"09",X"51",X"01",X"02",X"00",
X"FC",X"E0",X"70",X"38",X"1C",X"3E",X"00",X"00",X"00",X"3E",X"1C",X"38",X"70",X"E0",X"FC",X"9F",
X"E0",X"70",X"38",X"7C",X"00",X"00",X"00",X"00",X"00",X"7C",X"38",X"70",X"E0",X"FC",X"9F",X"FC",
X"70",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"70",X"E0",X"FC",X"9F",X"FC",X"E0",
X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"70",X"E0",X"FC",X"9F",X"FC",X"E0",X"70",
X"70",X"E0",X"FC",X"9F",X"FC",X"E0",X"70",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",
X"E0",X"FC",X"9F",X"FC",X"E0",X"70",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"70",
X"FC",X"9F",X"FC",X"E0",X"70",X"38",X"7C",X"00",X"00",X"00",X"00",X"00",X"7C",X"38",X"70",X"E0",
X"9F",X"FC",X"E0",X"70",X"38",X"1C",X"3E",X"00",X"00",X"00",X"3E",X"1C",X"38",X"70",X"E0",X"FC",
X"7F",X"C7",X"0E",X"1C",X"38",X"70",X"FC",X"00",X"FC",X"70",X"38",X"1C",X"0E",X"C7",X"7F",X"E3",
X"CE",X"1C",X"38",X"70",X"FC",X"00",X"00",X"00",X"FC",X"70",X"38",X"1C",X"CE",X"7F",X"E3",X"7F",
X"3C",X"78",X"FC",X"00",X"00",X"00",X"00",X"00",X"FC",X"78",X"3C",X"DE",X"7F",X"E3",X"7F",X"DE",
X"FC",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FC",X"78",X"FC",X"7F",X"E3",X"7F",X"FC",X"78",
X"78",X"FC",X"7F",X"E3",X"7F",X"FC",X"78",X"FC",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FC",
X"DE",X"7F",X"E3",X"7F",X"DE",X"3C",X"78",X"FC",X"00",X"00",X"00",X"00",X"00",X"FC",X"78",X"3C",
X"7F",X"E3",X"7F",X"CE",X"1C",X"38",X"70",X"FC",X"00",X"00",X"00",X"FC",X"70",X"38",X"1C",X"CE",
X"E3",X"7F",X"C7",X"0E",X"1C",X"38",X"70",X"FC",X"00",X"FC",X"70",X"38",X"1C",X"0E",X"C7",X"7F",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",
X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",
X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",
X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"0E",X"00",X"00",X"00",X"00",X"00",X"03",X"0E",X"03",X"00",
X"00",X"00",X"00",X"0E",X"00",X"00",X"00",X"00",X"03",X"0E",X"03",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"E0",X"00",X"00",X"00",X"00",X"00",X"30",X"E0",X"30",X"00",
X"00",X"00",X"00",X"E0",X"00",X"00",X"00",X"00",X"30",X"E0",X"30",X"00",X"00",X"00",X"00",X"00",
X"03",X"03",X"FF",X"FF",X"03",X"03",X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",
X"FF",X"FF",X"03",X"03",X"07",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"03",X"03",
X"03",X"03",X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"03",X"03",X"FF",X"FF",
X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"03",X"03",X"FF",X"FF",X"03",X"03",
X"0C",X"0C",X"FC",X"FC",X"0C",X"0C",X"38",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"38",
X"FC",X"FC",X"0C",X"0C",X"38",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"38",X"0C",X"0C",
X"0C",X"0C",X"38",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"38",X"0C",X"0C",X"FC",X"FC",
X"38",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"38",X"0C",X"0C",X"FC",X"FC",X"0C",X"0C",
X"06",X"0F",X"1F",X"1F",X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"1C",
X"1F",X"1F",X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"0F",
X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"0F",X"1F",X"1F",
X"07",X"05",X"02",X"02",X"02",X"07",X"00",X"00",X"00",X"00",X"06",X"0F",X"1F",X"1F",X"0F",X"06",
X"00",X"18",X"3F",X"3F",X"18",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"03",X"03",
X"3F",X"3F",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",
X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"3F",X"3F",
X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",X"00",X"18",X"3F",X"3F",X"18",X"00",
X"30",X"30",X"F0",X"F0",X"30",X"30",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",
X"F0",X"F0",X"30",X"30",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"30",
X"30",X"30",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"30",X"F0",X"F0",
X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"30",X"F0",X"F0",X"30",X"30",
X"C0",X"C0",X"C0",X"C0",X"C0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",
X"C0",X"C0",X"C0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",
X"C0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",X"C0",X"C0",
X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",X"C0",X"C0",X"C0",X"C0",
X"00",X"00",X"7F",X"7F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"7B",X"87",
X"7F",X"7F",X"00",X"00",X"00",X"00",X"00",X"00",X"0E",X"09",X"01",X"01",X"09",X"0E",X"00",X"00",
X"22",X"22",X"03",X"03",X"22",X"22",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"7F",X"7F",
X"04",X"08",X"0F",X"0F",X"08",X"84",X"87",X"7B",X"00",X"00",X"00",X"00",X"7F",X"7F",X"00",X"00",
X"00",X"00",X"FF",X"FF",X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",
X"FF",X"FF",X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",
X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"FF",X"FF",
X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"FF",X"FF",X"00",X"00",
X"78",X"7C",X"7C",X"7C",X"7C",X"78",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",
X"7C",X"7C",X"7C",X"78",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"78",X"7C",
X"7C",X"78",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"78",X"7C",X"7C",X"7C",
X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"78",X"7C",X"7C",X"7C",X"7C",X"78",
X"E0",X"F0",X"F0",X"F0",X"F0",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",
X"C0",X"C0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",
X"F0",X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"F0",X"F0",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",X"C0",X"C0",X"80",
X"1E",X"1F",X"1F",X"1F",X"1F",X"1E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",
X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",X"C0",
X"07",X"07",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"07",X"07",X"07",X"07",
X"00",X"00",X"08",X"04",X"08",X"14",X"08",X"00",X"00",X"00",X"08",X"26",X"10",X"26",X"0C",X"00",
X"01",X"01",X"01",X"01",X"01",X"01",X"00",X"00",X"00",X"00",X"2C",X"00",X"4D",X"20",X"14",X"00",
X"07",X"07",X"07",X"07",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"07",X"07",
X"01",X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"01",X"01",X"01",X"01",
X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"07",X"07",X"07",X"07",X"07",X"07",
X"0F",X"0F",X"0F",X"0F",X"0F",X"0F",X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",
X"0F",X"0F",X"0F",X"0F",X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"0F",X"0F",
X"1F",X"1F",X"1E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"1E",X"1F",X"1F",X"1F",X"1F",
X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"0F",X"0F",X"0F",X"0F",X"0F",X"0F",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"14",X"20",X"05",X"2A",X"00",X"32",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"8C",X"C2",X"C0",X"F0",X"3A",X"38",X"0C",X"46",X"0C",X"80",X"FC",X"FF",X"F0",X"82",X"F0",X"38",
X"05",X"1C",X"78",X"F2",X"F0",X"C4",X"98",X"72",X"3F",X"3D",X"2D",X"66",X"26",X"43",X"12",X"20",
X"3B",X"3B",X"75",X"EE",X"F5",X"3B",X"7B",X"9F",X"20",X"09",X"2C",X"84",X"44",X"ED",X"6D",X"7F",
X"E2",X"80",X"0C",X"1E",X"1E",X"8C",X"00",X"00",X"F8",X"78",X"B0",X"60",X"F3",X"DB",X"D8",X"30",
X"0C",X"1E",X"0C",X"80",X"C0",X"C0",X"64",X"B2",X"77",X"27",X"03",X"20",X"00",X"08",X"1C",X"08",
X"EF",X"F9",X"77",X"37",X"7C",X"DF",X"EB",X"7D",X"20",X"41",X"04",X"31",X"7B",X"71",X"33",X"6F",
X"00",X"00",X"04",X"00",X"24",X"0E",X"04",X"00",X"00",X"06",X"16",X"00",X"02",X"00",X"00",X"00",
X"00",X"00",X"40",X"00",X"00",X"68",X"00",X"00",X"00",X"60",X"F4",X"60",X"00",X"20",X"00",X"00",
X"B8",X"FC",X"4C",X"F8",X"F0",X"C8",X"C0",X"80",X"FC",X"3E",X"D6",X"DB",X"FB",X"F7",X"FE",X"DC",
X"C0",X"E8",X"E0",X"70",X"F8",X"F4",X"2C",X"F8",X"9F",X"BF",X"77",X"F7",X"E6",X"FC",X"F0",X"E2",
X"C0",X"E2",X"B8",X"9E",X"E7",X"97",X"D7",X"DF",X"E3",X"F3",X"7E",X"1E",X"0C",X"00",X"30",X"30",
X"00",X"C2",X"C0",X"18",X"3C",X"3E",X"62",X"C3",X"EB",X"FF",X"5F",X"DD",X"C3",X"B2",X"BE",X"1C",
X"1C",X"BD",X"E7",X"E3",X"D9",X"FD",X"FF",X"CF",X"30",X"FC",X"BE",X"3E",X"6E",X"DC",X"70",X"E0",
X"7E",X"77",X"B7",X"B7",X"77",X"EF",X"BE",X"BC",X"B0",X"E8",X"3C",X"9E",X"EE",X"EC",X"E8",X"FC",
X"7C",X"CF",X"F7",X"FE",X"6E",X"0F",X"0F",X"06",X"1F",X"7D",X"FB",X"B7",X"F3",X"D9",X"6F",X"3F",
X"0F",X"07",X"1C",X"7D",X"6B",X"3F",X"7F",X"3F",X"00",X"00",X"00",X"02",X"10",X"00",X"2E",X"0F",
X"6F",X"37",X"1F",X"14",X"0F",X"2F",X"07",X"03",X"37",X"7E",X"DF",X"DB",X"DB",X"69",X"3C",X"6F",
X"03",X"03",X"2B",X"1E",X"1E",X"25",X"3F",X"3B",X"F3",X"F3",X"F9",X"DF",X"6F",X"27",X"9F",X"0F",
X"0F",X"1F",X"3F",X"67",X"ED",X"D9",X"DB",X"FB",X"03",X"6E",X"F3",X"E7",X"F1",X"FE",X"1F",X"03",
X"B1",X"59",X"0C",X"24",X"02",X"00",X"00",X"00",X"77",X"CF",X"BB",X"80",X"EF",X"77",X"FA",X"3E",
X"01",X"00",X"02",X"04",X"7D",X"59",X"B7",X"FE",X"CB",X"F7",X"FF",X"FF",X"6C",X"9F",X"F3",X"7C",
X"6E",X"7F",X"07",X"FB",X"FD",X"BD",X"9F",X"DF",X"FF",X"FF",X"FE",X"63",X"CB",X"9D",X"FF",X"F3",
X"3C",X"FE",X"CF",X"BD",X"BD",X"F3",X"7E",X"18",X"19",X"3C",X"7E",X"5E",X"66",X"7E",X"9C",X"00",
X"06",X"00",X"78",X"7C",X"65",X"3C",X"00",X"02",X"00",X"01",X"18",X"3C",X"3C",X"18",X"02",X"40");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity PROM_40 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of PROM_40 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"18",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"24",X"18",X"7E",X"18",X"24",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"F0",X"00",X"00",X"1F",X"00",X"00",X"F0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"18",X"00",X"00",X"00",
X"00",X"00",X"3C",X"3C",X"3C",X"3C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",
X"00",X"00",X"26",X"05",X"2A",X"A4",X"50",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",
X"00",X"40",X"B4",X"19",X"85",X"52",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",
X"8D",X"17",X"00",X"44",X"08",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",
X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"08",X"04",X"40",X"0B",X"06",
X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"57",X"A2",X"4C",X"04",X"10",X"00",X"00",X"00",
X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"04",X"0C",X"02",X"52",X"BD",
X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"C3",
X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"C3",X"00",
X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"C3",X"00",X"00",
X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"C3",X"00",X"00",X"00",
X"00",X"00",X"00",X"C3",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",
X"00",X"00",X"C3",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",
X"00",X"C3",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",
X"C3",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",
X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",
X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",
X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"03",X"0E",X"03",X"00",X"00",X"00",X"00",X"00",X"0E",X"00",X"00",
X"00",X"00",X"03",X"0E",X"03",X"00",X"00",X"00",X"00",X"0E",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"30",X"E0",X"30",X"00",X"00",X"00",X"00",X"00",X"E0",X"00",X"00",
X"00",X"00",X"30",X"E0",X"30",X"00",X"00",X"00",X"00",X"E0",X"00",X"00",X"00",X"00",X"00",X"00",
X"0C",X"0C",X"80",X"80",X"0C",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"80",X"80",X"0C",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0C",
X"0C",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0C",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0C",X"80",X"80",X"0C",X"0C",
X"30",X"30",X"00",X"00",X"30",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"30",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"30",
X"30",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"30",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"30",X"00",X"00",X"30",X"30",
X"06",X"0F",X"1F",X"1F",X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"1C",
X"1F",X"1F",X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"0F",
X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"0F",X"1F",X"1F",
X"07",X"05",X"02",X"02",X"05",X"07",X"00",X"00",X"00",X"00",X"06",X"0F",X"1F",X"1F",X"0F",X"06",
X"00",X"18",X"3C",X"3C",X"18",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"03",X"03",X"00",X"00",
X"3C",X"3C",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",
X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"3C",X"3C",
X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",X"00",X"18",X"3C",X"3C",X"18",X"00",
X"C0",X"C0",X"00",X"00",X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",
X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",X"C0",X"C0",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"60",X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"78",X"84",
X"60",X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"0E",X"09",X"01",X"01",X"09",X"0E",X"00",X"00",
X"22",X"22",X"02",X"02",X"22",X"22",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",X"60",
X"07",X"0B",X"08",X"08",X"0B",X"87",X"84",X"78",X"00",X"00",X"00",X"00",X"60",X"60",X"00",X"00",
X"03",X"03",X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",
X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"03",X"03",
X"00",X"30",X"00",X"00",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"82",X"82",X"B2",X"84",X"48",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"48",X"84",X"B2",
X"B3",X"86",X"CC",X"78",X"30",X"00",X"00",X"00",X"00",X"30",X"78",X"CC",X"86",X"B3",X"83",X"83",
X"48",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"48",X"84",X"82",X"82",X"82",X"82",X"84",
X"00",X"C0",X"00",X"00",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"20",X"20",X"20",X"40",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"20",
X"CC",X"18",X"30",X"E0",X"C0",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"18",X"CC",X"0C",X"0C",
X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"20",X"20",X"20",X"20",X"40",
X"00",X"0C",X"00",X"00",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"30",X"60",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"60",X"30",X"30",X"30",
X"0B",X"08",X"0C",X"07",X"03",X"00",X"00",X"00",X"00",X"03",X"07",X"0C",X"08",X"0B",X"08",X"08",
X"00",X"00",X"08",X"10",X"22",X"14",X"00",X"00",X"00",X"00",X"1C",X"22",X"2A",X"02",X"14",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"08",X"12",X"69",X"2A",X"04",X"08",
X"08",X"08",X"0B",X"08",X"04",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"04",X"08",X"0B",
X"06",X"06",X"03",X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"01",X"03",X"06",X"06",X"06",X"06",
X"04",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"04",X"08",X"0B",X"08",X"08",X"0B",X"08",
X"8C",X"6C",X"10",X"10",X"6C",X"8C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"10",X"10",X"2C",X"4C",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"8C",X"6C",
X"4C",X"8C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"8C",X"4C",X"20",X"20",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"4C",X"2C",X"10",X"10",X"6C",X"8C",
X"E3",X"00",X"00",X"00",X"00",X"E3",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"1C",
X"E0",X"00",X"10",X"10",X"08",X"07",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"1C",
X"CC",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"CC",X"30",X"30",
X"00",X"10",X"0A",X"55",X"02",X"55",X"22",X"08",X"07",X"08",X"10",X"10",X"00",X"E0",X"1C",X"03",
X"00",X"80",X"40",X"20",X"10",X"08",X"44",X"00",X"04",X"00",X"80",X"EA",X"80",X"01",X"A0",X"10",
X"44",X"00",X"10",X"62",X"C0",X"80",X"08",X"20",X"12",X"09",X"20",X"04",X"80",X"42",X"00",X"20",
X"97",X"15",X"0A",X"51",X"1B",X"24",X"0E",X"0B",X"24",X"80",X"28",X"80",X"04",X"04",X"01",X"2A",
X"00",X"10",X"00",X"4C",X"0C",X"00",X"00",X"20",X"80",X"C0",X"42",X"80",X"21",X"62",X"E0",X"C0",
X"00",X"4C",X"01",X"00",X"08",X"00",X"84",X"C0",X"00",X"00",X"00",X"20",X"02",X"40",X"08",X"00",
X"06",X"0E",X"18",X"98",X"03",X"20",X"14",X"02",X"08",X"40",X"04",X"00",X"00",X"09",X"1C",X"30",
X"00",X"00",X"04",X"00",X"04",X"0E",X"14",X"00",X"00",X"10",X"00",X"02",X"00",X"00",X"00",X"00",
X"00",X"00",X"40",X"10",X"00",X"68",X"60",X"00",X"04",X"00",X"00",X"08",X"80",X"00",X"00",X"00",
X"48",X"18",X"30",X"00",X"00",X"10",X"40",X"00",X"00",X"C0",X"E8",X"2C",X"0C",X"18",X"00",X"00",
X"00",X"20",X"80",X"C0",X"00",X"DA",X"D0",X"80",X"20",X"C0",X"88",X"18",X"38",X"30",X"00",X"00",
X"00",X"00",X"40",X"70",X"18",X"68",X"28",X"20",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"30",
X"00",X"C0",X"40",X"00",X"00",X"00",X"00",X"18",X"14",X"A0",X"B0",X"3A",X"3C",X"1C",X"00",X"00",
X"00",X"00",X"18",X"3C",X"36",X"62",X"00",X"00",X"20",X"60",X"60",X"E0",X"D0",X"20",X"80",X"00",
X"80",X"8C",X"4C",X"4C",X"8C",X"18",X"40",X"40",X"00",X"80",X"E0",X"60",X"30",X"30",X"10",X"00",
X"33",X"3C",X"0C",X"01",X"01",X"00",X"20",X"80",X"00",X"02",X"06",X"4C",X"0E",X"27",X"10",X"00",
X"40",X"00",X"83",X"03",X"16",X"24",X"00",X"00",X"00",X"68",X"60",X"02",X"10",X"00",X"00",X"00",
X"1C",X"1E",X"00",X"03",X"00",X"00",X"10",X"00",X"08",X"00",X"24",X"26",X"26",X"17",X"03",X"00",
X"00",X"02",X"00",X"01",X"01",X"1A",X"10",X"04",X"0C",X"0E",X"27",X"20",X"30",X"18",X"80",X"40",
X"00",X"40",X"00",X"18",X"1A",X"26",X"2C",X"0C",X"01",X"1E",X"3F",X"3E",X"1F",X"0F",X"02",X"01",
X"20",X"10",X"08",X"24",X"00",X"41",X"00",X"00",X"0E",X"39",X"FC",X"FF",X"3B",X"28",X"98",X"22",
X"01",X"00",X"02",X"00",X"08",X"40",X"31",X"CE",X"76",X"3C",X"08",X"00",X"93",X"60",X"0C",X"03",
X"11",X"00",X"38",X"04",X"02",X"40",X"E0",X"60",X"00",X"18",X"21",X"9C",X"34",X"62",X"00",X"0C",
X"00",X"00",X"30",X"46",X"4E",X"1C",X"00",X"00",X"00",X"00",X"00",X"30",X"1C",X"00",X"81",X"00",
X"20",X"00",X"00",X"30",X"19",X"00",X"40",X"00",X"00",X"01",X"00",X"98",X"18",X"00",X"00",X"00");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,30 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity col_h is
port (
clk : in std_logic;
addr : in std_logic_vector(6 downto 0);
data : out std_logic_vector(3 downto 0)
);
end entity;
architecture prom of col_h is
type rom is array(0 to 127) of std_logic_vector(3 downto 0);
signal rom_data: rom := (
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0110","0101","0011","0101","0110","0110","0110",
"0001","0011","0011","0110","0010","0011","0011","0011","0111","0101","0101","0011","0111","0101","0101","0101",
"0000","0000","0000","0000","0000","0000","0000","0000","0110","0001","0001","0011","0011","0011","0001","0100",
"0110","0101","0101","0111","0111","0111","0111","0011","0110","0111","0111","0101","0101","0101","0011","0111",
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0010","0101","0011","0011","0011","0011","0011",
"0001","0011","0011","0110","0110","0110","0110","0110","0101","0101","0101","0011","0101","0101","0101","0101",
"0000","0000","0000","0000","0000","0000","0000","0000","0110","0001","0001","0100","0100","0100","0011","0100",
"0110","0101","0101","0101","0101","0101","0111","0011","0101","0111","0111","0111","0111","0111","0101","0111");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,30 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity col_l is
port (
clk : in std_logic;
addr : in std_logic_vector(6 downto 0);
data : out std_logic_vector(3 downto 0)
);
end entity;
architecture prom of col_l is
type rom is array(0 to 127) of std_logic_vector(3 downto 0);
signal rom_data: rom := (
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0010","0100","0010","0101","0010","0010","0010",
"0000","0001","0010","0000","0010","0001","0001","0001","0000","0001","0001","0001","0110","0100","0100","0100",
"0000","0000","0000","0000","0000","0000","0000","0000","0100","0001","0001","0011","0011","0011","0001","0000",
"0010","0101","0101","0001","0001","0001","0111","0000","0110","0111","0111","0101","0101","0101","0011","0111",
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0010","0100","0010","0001","0001","0001","0001",
"0000","0001","0010","0000","0010","0010","0010","0010","0000","0001","0001","0001","0100","0100","0100","0100",
"0000","0000","0000","0000","0000","0000","0000","0000","0100","0001","0001","0100","0100","0100","0011","0100",
"0010","0101","0101","0101","0101","0101","0111","0000","0101","0111","0111","0011","0011","0011","0101","0111");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

File diff suppressed because it is too large Load Diff

View File

@@ -1,462 +0,0 @@
---------------------------------------------------------------------------------
-- DE2-35 Top level for Phoenix by Dar (darfpga@aol.fr)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
entity phoenix is
generic (
C_test_picture: boolean := false;
C_tile_rom: boolean := true; -- false: disable tile ROM to try game logic on small FPGA
-- reduce ROMs: 14 is normal game, 13 will draw initial screen, 12 will repeatedly blink 1 line of garbage
C_autofire: boolean := true;
-- C_audio: boolean := true;
C_prog_rom_addr_bits: integer range 12 to 14 := 14
);
port(
clk : in std_logic; -- 11 MHz for TV, 25 MHz for VGA
reset : in std_logic;
ce_pix : out std_logic;
dip_switch : in std_logic_vector(7 downto 0);
-- game controls, normal logic '1':pressed, '0':released
btn_coin: in std_logic;
btn_player_start: in std_logic_vector(1 downto 0);
btn_fire, btn_left, btn_right, btn_barrier: in std_logic;
video_r : out std_logic_vector(1 downto 0);
video_g : out std_logic_vector(1 downto 0);
video_b : out std_logic_vector(1 downto 0);
video_vblank, video_hblank_bg, video_hblank_fg: out std_logic;
video_hs : out std_logic;
video_vs : out std_logic;
sound_fire : out std_logic; -- '1' when missile fires
sound_explode: out std_logic; -- '1' when ship explodes
sound_burn : out std_logic; -- bird burns
sound_fireball: out std_logic; -- bird explodes in 2 fireballs
sound_ab : out std_logic_vector(15 downto 0);
audio_select : in std_logic_vector(2 downto 0) := (others => '0');
audio : out std_logic_vector(11 downto 0)
);
end phoenix;
architecture struct of phoenix is
signal reset_n: std_logic;
signal hcnt : std_logic_vector(9 downto 1);
signal vcnt : std_logic_vector(8 downto 1);
signal sync : std_logic;
signal adrsel : std_logic;
signal rdy : std_logic := '1';
signal vblank : std_logic;
signal hblank_bkgrd : std_logic;
signal hblank_frgrd : std_logic;
signal ce_pix1 : std_logic;
signal cpu_ce : std_logic;
signal cpu_adr : std_logic_vector(15 downto 0);
signal cpu_di : std_logic_vector( 7 downto 0);
signal cpu_do : std_logic_vector( 7 downto 0);
signal cpu_wr_n : std_logic;
signal prog_do : std_logic_vector( 7 downto 0);
signal S_prog_rom_addr : std_logic_vector(13 downto 0);
signal frgnd_horz_cnt : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_horz_cnt : std_logic_vector(7 downto 0) := (others =>'0');
signal vert_cnt : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_ram_adr: std_logic_vector(10 downto 0) := (others =>'0');
signal bkgnd_ram_adr: std_logic_vector(10 downto 0) := (others =>'0');
signal frgnd_ram_do : std_logic_vector( 7 downto 0) := (others =>'0');
signal bkgnd_ram_do : std_logic_vector( 7 downto 0) := (others =>'0');
signal frgnd_ram_we : std_logic := '0';
signal bkgnd_ram_we : std_logic := '0';
signal frgnd_graph_adr : std_logic_vector(11 downto 0) := (others =>'0');
signal bkgnd_graph_adr : std_logic_vector(11 downto 0) := (others =>'0');
signal palette_adr : std_logic_vector( 6 downto 0) := (others =>'0');
signal A11 : std_logic;
signal frgnd_clk : std_logic;
signal bkgnd_clk : std_logic;
signal frgnd_tile_id : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_tile_id : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_bit0_graph : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_bit1_graph : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_bit0_graph : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_bit1_graph : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_bit0_graph_r : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_bit1_graph_r : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_bit0_graph_r : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_bit1_graph_r : std_logic_vector(7 downto 0) := (others =>'0');
signal fr_bit0 : std_logic;
signal fr_bit1 : std_logic;
signal bk_bit0 : std_logic;
signal bk_bit1 : std_logic;
signal fr_lin : std_logic_vector(2 downto 0);
signal bk_lin : std_logic_vector(2 downto 0);
signal color_set : std_logic;
signal color_id : std_logic_vector(5 downto 0);
signal rgb : std_logic_vector(7 downto 0);
signal player2 : std_logic := '0';
signal pl2_cocktail : std_logic := '0';
signal bkgnd_offset : std_logic_vector(7 downto 0) := (others =>'0');
signal sound_a : std_logic_vector(7 downto 0) := (others =>'0');
signal sound_b : std_logic_vector(7 downto 0) := (others =>'0');
signal clk10 : std_logic;
signal snd1 : std_logic_vector( 7 downto 0) := (others =>'0');
signal snd2 : std_logic_vector( 1 downto 0) := (others =>'0');
signal snd3 : std_logic_vector( 7 downto 0) := (others =>'0');
signal song : std_logic_vector( 7 downto 0) := (others =>'0');
signal mixed : std_logic_vector(11 downto 0) := (others =>'0');
signal sound_string : std_logic_vector(31 downto 0);
signal coin : std_logic;
signal player_start : std_logic_vector(1 downto 0);
signal buttons : std_logic_vector(3 downto 0);
signal R_autofire : std_logic_vector(21 downto 0);
begin
-- game core uses inverted control logic
coin <= not btn_coin; -- insert coin
player_start <= not btn_player_start; -- select 1 or 2 players
buttons(1) <= not btn_right; -- Right
buttons(2) <= not btn_left; -- Left
buttons(3) <= '1'; -- Protection
G_not_autofire: if not C_autofire generate
buttons(0) <= not btn_fire; -- Fire
end generate;
G_yes_autofire: if C_autofire generate
process(clk)
begin
if rising_edge(clk) then
if btn_fire='1' then
R_autofire <= R_autofire-1;
else
R_autofire <= (others => '0');
end if;
end if;
end process;
buttons(0) <= not R_autofire(R_autofire'high);
end generate;
video: entity work.phoenix_video
port map
(
clk11 => clk,
ce_pix => ce_pix1,
hcnt => hcnt,
vcnt => vcnt,
sync_hs => video_hs,
sync_vs => video_vs,
adrsel => adrsel, -- RAM address selector ('0')cpu / ('1')video_generator
rdy => rdy, -- Ready ('1')cpu can access RAMs read/write
vblank => vblank,
hblank_frgrd => hblank_frgrd,
hblank_bkgrd => hblank_bkgrd,
reset => reset
);
reset_n <= not reset;
ce_pix <= ce_pix1;
process(clk)
begin
if rising_edge(clk) then
cpu_ce <= not cpu_ce;
end if;
end process;
-- microprocessor 8085
cpu8085 : entity work.T8080se
generic map
(
Mode => 2,
T2Write => 0
)
port map(
RESET_n => reset_n,
CLK => clk,
CLKEN => cpu_ce,
READY => rdy,
HOLD => '1',
INT => '1',
INTE => open,
DBIN => open,
SYNC => open,
VAIT => open,
HLDA => open,
WR_n => cpu_wr_n,
A => cpu_adr,
DI => cpu_di,
DO => cpu_do
);
-- mux prog, ram, vblank, switch... to processor data bus in
cpu_di <= prog_do when cpu_adr(15 downto 14) = "00" else
frgnd_ram_do when cpu_adr(13 downto 10) = 2#00_00# else
bkgnd_ram_do when cpu_adr(13 downto 10) = 2#00_10# else
buttons & '0' & player_start & coin when cpu_adr(13 downto 10) = 2#11_00# else--buttons & '1'
not vblank & dip_switch(6 downto 0) when cpu_adr(13 downto 10) = 2#11_10# else
x"FF";
-- write enable to RAMs from cpu
frgnd_ram_we <= '1' when cpu_wr_n = '0' and cpu_adr(14 downto 10) = "10000" and adrsel = '0' else '0';
bkgnd_ram_we <= '1' when cpu_wr_n = '0' and cpu_adr(14 downto 10) = "10010" and adrsel = '0' else '0';
-- RAMs address mux cpu/video_generator, bank0 for player1, bank1 for player2
frgnd_ram_adr <= player2 & cpu_adr(9 downto 0) when adrsel ='0' else player2 & vert_cnt(7 downto 3) & frgnd_horz_cnt(7 downto 3);
bkgnd_ram_adr <= player2 & cpu_adr(9 downto 0) when adrsel ='0' else player2 & vert_cnt(7 downto 3) & bkgnd_horz_cnt(7 downto 3);
-- demux cpu data to registers : background scrolling, sound control,
-- player id (1/2), palette color set.
process (clk)
begin
if rising_edge(clk) then
if cpu_wr_n = '0' then
case cpu_adr(14 downto 10) is
when "10110" => bkgnd_offset <= cpu_do;
when "11000" => sound_b <= cpu_do;
when "11010" => sound_a <= cpu_do;
when "10100" => player2 <= cpu_do(0);
color_set <= cpu_do(1);
A11 <= cpu_do(3);
when others => null;
end case;
end if;
end if;
end process;
-- player2 and cocktail mode (flip horizontal/vertical)
pl2_cocktail <= player2 and dip_switch(7);
-- horizontal scan video RAMs address background and foreground
-- with flip and scroll offset
frgnd_horz_cnt <= hcnt(8 downto 1) when pl2_cocktail = '0' else not hcnt(8 downto 1);
bkgnd_horz_cnt <= frgnd_horz_cnt + bkgnd_offset;
-- vertical scan video RAMs address
vert_cnt <= vcnt(8 downto 1) when pl2_cocktail = '0' else not (vcnt(8 downto 1) + X"30");
-- get tile_ids from RAMs
frgnd_tile_id <= frgnd_ram_do;
bkgnd_tile_id <= bkgnd_ram_do;
-- address graphix ROMs with tile_ids and line counter
frgnd_graph_adr <= A11 & frgnd_tile_id & vert_cnt(2 downto 0);
bkgnd_graph_adr <= A11 & bkgnd_tile_id & vert_cnt(2 downto 0);
-- latch foreground/background next graphix byte, high bit and low bit
-- and palette_ids (fr_lin, bklin)
process (clk)
begin
if rising_edge(clk) then
if (pl2_cocktail = '0' and (frgnd_horz_cnt(2 downto 0) = "111")) or
(pl2_cocktail = '1' and (frgnd_horz_cnt(2 downto 0) = "000")) then
frgnd_bit0_graph_r <= frgnd_bit0_graph;
frgnd_bit1_graph_r <= frgnd_bit1_graph;
fr_lin <= frgnd_tile_id(7 downto 5);
end if;
if (pl2_cocktail = '0' and (bkgnd_horz_cnt(2 downto 0) = "111")) or
(pl2_cocktail = '1' and (bkgnd_horz_cnt(2 downto 0) = "000")) then
bkgnd_bit0_graph_r <= bkgnd_bit0_graph;
bkgnd_bit1_graph_r <= bkgnd_bit1_graph;
bk_lin <= bkgnd_tile_id(7 downto 5);
end if;
end if;
end process;
-- demux background and foreground pixel bits (0/1) from graphix byte with horizontal counter
-- and apply horizontal and vertical blanking
fr_bit0 <= frgnd_bit0_graph_r(to_integer(unsigned(frgnd_horz_cnt(2 downto 0)))) when (vblank or hblank_frgrd)= '0' else '0';
fr_bit1 <= frgnd_bit1_graph_r(to_integer(unsigned(frgnd_horz_cnt(2 downto 0)))) when (vblank or hblank_frgrd)= '0' else '0';
bk_bit0 <= bkgnd_bit0_graph_r(to_integer(unsigned(bkgnd_horz_cnt(2 downto 0)))) when (vblank or hblank_bkgrd)= '0' else '0';
bk_bit1 <= bkgnd_bit1_graph_r(to_integer(unsigned(bkgnd_horz_cnt(2 downto 0)))) when (vblank or hblank_bkgrd)= '0' else '0';
-- select pixel bits and palette_id with foreground priority
color_id <= (fr_bit0 or fr_bit1) & fr_bit1 & fr_bit0 & fr_lin when (fr_bit0 or fr_bit1) = '1' else
(fr_bit0 or fr_bit1) & bk_bit1 & bk_bit0 & bk_lin;
-- address palette with pixel bits color and color set
palette_adr <= color_set & color_id;
-- output video to top level
-- output video to top level
process(clk) begin
if rising_edge(clk) then
if ce_pix1='1' then
video_vblank <= vblank;
video_hblank_fg <= hblank_frgrd;
video_hblank_bg <= hblank_bkgrd;
if hcnt>=192 then
video_r <= rgb(4) & rgb(0);
video_g <= rgb(6) & rgb(2);
video_b <= rgb(5) & rgb(1);
else
video_r <= "00";
video_g <= "00";
video_b <= "00";
end if;
end if;
end if;
end process;
frgnd_bit0 : entity work.PROM_39
port map(
clk => clk,
addr => frgnd_graph_adr(10 downto 0),
data => frgnd_bit0_graph
);
frgnd_bit1 : entity work.PROM_40
port map(
clk => clk,
addr => frgnd_graph_adr(10 downto 0),
data => frgnd_bit1_graph
);
bkgnd_bit0 : entity work.PROM_23
port map(
clk => clk,
addr => bkgnd_graph_adr(10 downto 0),
data => bkgnd_bit0_graph
);
bkgnd_bit1 : entity work.PROM_24
port map(
clk => clk,
addr => bkgnd_graph_adr(10 downto 0),
data => bkgnd_bit1_graph
);
col_l : entity work.col_h
port map(
clk => clk,
addr => palette_adr,
data => rgb(3 downto 0)
);
col_h : entity work.col_l
port map(
clk => clk,
addr => palette_adr,
data => rgb(7 downto 4)
);
-- Program PROM
S_prog_rom_addr(C_prog_rom_addr_bits-1 downto 0) <= cpu_adr(C_prog_rom_addr_bits-1 downto 0);
prog : entity work.prog
port map(
clk => clk,
addr => S_prog_rom_addr,
data => prog_do
);
-- foreground RAM 0x4000-0x433F
-- cpu working area 0x4340-0x43FF
frgnd_ram : entity work.gen_ram
generic map( dWidth => 8, aWidth => 11)
port map(
clk => clk,
we => frgnd_ram_we,
addr => frgnd_ram_adr,
d => cpu_do,
q => frgnd_ram_do
);
-- background RAM 0x4800-0x4B3F
-- cpu working area 0x4B40-0x4BFF
-- stack pointer downward from 0x4BFF
bkgnd_ram : entity work.gen_ram
generic map( dWidth => 8, aWidth => 11)
port map(
clk => clk,
we => bkgnd_ram_we,
addr => bkgnd_ram_adr,
d => cpu_do,
q => bkgnd_ram_do
);
effect1: entity work.phoenix_effect1
port map
(
clk => clk,
reset => '0',
trigger => sound_a(4),
filter => sound_a(5),
divider => sound_a(3 downto 0),
snd => snd1
);
effect2 : entity work.phoenix_effect2
port map
(
clk => clk,
reset => '0',
trigger1 => sound_b(4),
trigger2 => sound_b(5),
divider => sound_b(3 downto 0),
snd => snd2
);
effect3 : entity work.phoenix_effect3
port map
(
clk => clk,
reset => '0',
trigger1 => sound_b(6),
trigger2 => sound_b(7),
snd => snd3
);
sound_burn <= sound_b(4);
sound_fire <= sound_b(6); -- '1' when fire sound
sound_explode <= sound_b(7); -- '1' when explode sound
sound_fireball <= sound_a(1) and not sound_a(0); -- ambiguity: mothership descend also triggers this
sound_ab <= sound_b & sound_a;
music: entity work.phoenix_music
port map
(
clk => clk,
reset => '0',
trigger => sound_a(7),
sel_song => sound_a(6),
snd => song
);
-- mix effects and music
mixed <= std_logic_vector
(
unsigned("00" & snd1 & "00") +
unsigned("0" & snd2 & "000000000") +
unsigned("00" & snd3 & "00") +
unsigned("00" & song & "00" )
);
-- select sound or/and effect
with audio_select select
audio <= "00" & snd1 & "00" when "100",
"0" & snd2 & "000000000" when "101",
"00" & snd3 & "00" when "110",
"00" & song & "00" when "111",
mixed when others;
end struct;

View File

@@ -1,309 +0,0 @@
---------------------------------------------------------------------------------
-- DE2-35 Top level for Phoenix by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
--
-- Main features
-- PS2 keyboard input
-- wm8731 sound output
-- NO board SRAM used
--
-- sw 0: on/off hdmi-audio
--
-- Board switch : ---- todo fixme switches note
-- 1 - 4 : dip switch
-- 0-1 : lives 3-6
-- 3-2 : bonus life 30K-60K
-- 4 : coin 1-2
-- 6-5 : unkonwn
-- 7 : upright-cocktail
-- 8 -10 : sound_select
-- 0XX : all mixed (normal)
-- 100 : sound1 only
-- 101 : sound2 only
-- 110 : sound3 only
-- 111 : melody only
-- Board key :
-- 0 : reset
--
---------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
entity phoenix_mist is
port
(
CLOCK_27 : in std_logic;
LED : out std_logic;
VGA_R : out std_logic_vector(5 downto 0);
VGA_G : out std_logic_vector(5 downto 0);
VGA_B : out std_logic_vector(5 downto 0);
VGA_HS : out std_logic;
VGA_VS : out std_logic;
SPI_SCK : in std_logic;
SPI_DI : in std_logic;
SPI_DO : out std_logic;
SPI_SS2 : in std_logic;
SPI_SS3 : in std_logic;
CONF_DATA0 : in std_logic;
AUDIO_L : out std_logic;
AUDIO_R : out std_logic
);
end;
architecture struct of phoenix_mist is
signal clk : std_logic;
signal clk_88m : std_logic;
signal reset : std_logic;
signal clock_stable : std_logic;
signal audio : std_logic_vector(11 downto 0);
signal video_r, video_g, video_b: std_logic_vector(1 downto 0);
signal vsync, hsync : std_logic;
signal dip_switch : std_logic_vector(7 downto 0);-- := (others => '0');
signal status : std_logic_vector(31 downto 0);
signal buttons : std_logic_vector(1 downto 0);
signal scandoubler_disable : std_logic;
signal ypbpr : std_logic;
signal ce_pix : std_logic;
signal scanlines : std_logic_vector(1 downto 0);
signal hq2x : std_logic;
signal coin : std_logic;
signal player_start : std_logic_vector(1 downto 0);
signal button_left, button_right, button_protect, button_fire: std_logic;
signal joy0 : std_logic_vector(7 downto 0);
signal joy1 : std_logic_vector(7 downto 0);
signal ps2Clk : std_logic;
signal ps2Data : std_logic;
signal kbd_joy : std_logic_vector(7 downto 0);
signal upjoyL : std_logic;
signal upjoyR : std_logic;
signal upjoyB : std_logic;
-- config string used by the io controller to fill the OSD
constant CONF_STR : string := "PHOENIX;;O4,Screen Direction,Upright,Normal;O67,Scandoubler Fx,None,HQ2x,CRT 25%,CRT 50%;T5,Reset;V,v1.1;";
function to_slv(s: string) return std_logic_vector is
constant ss: string(1 to s'length) := s;
variable rval: std_logic_vector(1 to 8 * s'length);
variable p: integer;
variable c: integer;
begin
for i in ss'range loop
p := 8 * i;
c := character'pos(ss(i));
rval(p - 7 to p) := std_logic_vector(to_unsigned(c,8));
end loop;
return rval;
end function;
component mist_io
generic ( STRLEN : integer := 0 );
port (
clk_sys :in std_logic;
SPI_SCK, CONF_DATA0, SPI_DI :in std_logic;
SPI_DO : out std_logic;
conf_str : in std_logic_vector(8*STRLEN-1 downto 0);
buttons : out std_logic_vector(1 downto 0);
joystick_0 : out std_logic_vector(7 downto 0);
joystick_1 : out std_logic_vector(7 downto 0);
status : out std_logic_vector(31 downto 0);
scandoubler_disable, ypbpr : out std_logic;
ps2_kbd_clk : out std_logic;
ps2_kbd_data : out std_logic
);
end component mist_io;
component video_mixer
generic ( LINE_LENGTH : integer := 352; HALF_DEPTH : integer := 1 );
port (
clk_sys, ce_pix, ce_pix_actual : in std_logic;
SPI_SCK, SPI_SS3, SPI_DI : in std_logic;
scanlines : in std_logic_vector(1 downto 0);
scandoubler_disable, hq2x, ypbpr, ypbpr_full : in std_logic;
rotate : in std_logic_vector(1 downto 0);
R, G, B : in std_logic_vector(2 downto 0);
HSync, VSync, line_start, mono : in std_logic;
VGA_R,VGA_G, VGA_B : out std_logic_vector(5 downto 0);
VGA_VS, VGA_HS : out std_logic
);
end component video_mixer;
component keyboard
PORT(
clk : in std_logic;
reset : in std_logic;
ps2_kbd_clk : in std_logic;
ps2_kbd_data : in std_logic;
joystick : out std_logic_vector (7 downto 0)
);
end component;
begin
-- SWITCH 1: SWITCH 2: NUMBER OF SPACESHIPS:
-- --------- --------- ---------------------
-- OFF OFF 6
-- ON OFF 5
-- OFF ON 4
-- ON ON 3
-- FIRST FREE SECOND FREE
-- SWITCH 3: SWITCH 4: SHIP SCORE: SHIP SCORE:
-- --------- --------- ----------- -----------
-- OFF OFF 6,000 60,000
-- ON OFF 5,000 50,000
-- OFF ON 4,000 40,000
-- ON ON 3,000 30,000
--Cocktail,Factory,Factory,Factory,Bonus2,Bonus1,Ships2,Ships1
dip_switch <= "00001111";
mist_io_inst : mist_io
generic map (STRLEN => CONF_STR'length)
port map (
clk_sys => clk,
SPI_SCK => SPI_SCK,
CONF_DATA0 => CONF_DATA0,
SPI_DI => SPI_DI,
SPI_DO => SPI_DO,
conf_str => to_slv(CONF_STR),
buttons => buttons,
scandoubler_disable => scandoubler_disable,
ypbpr => ypbpr,
joystick_1 => joy1,
joystick_0 => joy0,
status => status,
ps2_kbd_clk => ps2Clk,
ps2_kbd_data => ps2Data
);
--
-- Audio
--
u_dac1 : entity work.dac
port map(
clk_i => clk_88m,
res_n_i => not reset,
dac_i => audio,
dac_o => AUDIO_L
);
u_dac2 : entity work.dac
port map(
clk_i => clk_88m,
res_n_i => not reset,
dac_i => audio,
dac_o => AUDIO_R
);
pll: entity work.pll27
port map(
inclk0 => CLOCK_27,
c0 => clk_88m,
c1 => clk,
locked => clock_stable
);
reset <= status(0) or status(5) or buttons(1) or not clock_stable;
u_keyboard : keyboard
port map(
clk => clk,
reset => reset,
ps2_kbd_clk => ps2Clk,
ps2_kbd_data => ps2Data,
joystick => kbd_joy
);
process(clk_88m)
variable cnt: integer range 0 to 6000000 := 0;
begin
if rising_edge(clk_88m) then
if status(3 downto 1) /= "000" then
cnt := 0;
coin <= status(1);
player_start <= status(3 downto 2);
else
if cnt < 6000000 then
cnt := cnt + 1;
else
coin <= '0';
player_start <= "00";
end if;
end if;
end if;
end process;
upjoyB <= joy0(2) or joy1(2) when status(4) = '0' else joy0(0) or joy1(0);
upjoyL <= joy0(1) or joy1(1) or kbd_joy(6) when status(4) = '0' else joy0(2) or joy1(2) or kbd_joy(5);
upjoyR <= joy0(0) or joy1(0) or kbd_joy(7) when status(4) = '0' else joy0(3) or joy1(3) or kbd_joy(4);
phoenix : entity work.phoenix
port map
(
clk => clk,
reset => reset,
ce_pix => ce_pix,
dip_switch => dip_switch,
btn_coin => kbd_joy(3) or coin,--ESC
btn_player_start(0) => kbd_joy(1) or player_start(0),--1
btn_player_start(1) => kbd_joy(2) or player_start(1),--2
btn_left => upjoyL,
btn_right => upjoyR,
btn_barrier => upjoyB or kbd_joy(2),--TAB
btn_fire => joy0(4) or joy1(4) or kbd_joy(0),--space
video_r => video_r,
video_g => video_g,
video_b => video_b,
video_hs => hsync,
video_vs => vsync,
audio_select => "000",
audio => audio
);
scanlines(0) <= '1' when status(7 downto 6) = "10" else '0';
scanlines(1) <= '1' when status(7 downto 6) = "11" else '0';
hq2x <= '1' when status(7 downto 6) = "01" else '0';
vmixer : video_mixer
port map (
clk_sys => clk_88m,
ce_pix => ce_pix,
ce_pix_actual => ce_pix,
SPI_SCK => SPI_SCK,
SPI_SS3 => SPI_SS3,
SPI_DI => SPI_DI,
rotate => '1' & not status(4),
scanlines => scanlines,
scandoubler_disable => scandoubler_disable,
hq2x => hq2x,
ypbpr => ypbpr,
ypbpr_full => '1',
R => video_r & video_r(1),
G => video_g & video_g(1),
B => video_b & video_b(1),
HSync => hsync,
VSync => vsync,
line_start => '0',
mono => '0',
VGA_R => VGA_R,
VGA_G => VGA_G,
VGA_B => VGA_B,
VGA_VS => VGA_VS,
VGA_HS => VGA_HS
);
LED <= '1';
end struct;

View File

@@ -1,387 +0,0 @@
-- megafunction wizard: %ALTPLL%
-- GENERATION: STANDARD
-- VERSION: WM1.0
-- MODULE: altpll
-- ============================================================
-- File Name: pll.vhd
-- Megafunction Name(s):
-- altpll
--
-- Simulation Library Files(s):
-- altera_mf
-- ============================================================
-- ************************************************************
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
--
-- 13.1.4 Build 182 03/12/2014 SJ Web Edition
-- ************************************************************
--Copyright (C) 1991-2014 Altera Corporation
--Your use of Altera Corporation's design tools, logic functions
--and other software and tools, and its AMPP partner logic
--functions, and any output files from any of the foregoing
--(including device programming or simulation files), and any
--associated documentation or information are expressly subject
--to the terms and conditions of the Altera Program License
--Subscription Agreement, Altera MegaCore Function License
--Agreement, or other applicable license agreement, including,
--without limitation, that your use is for the sole purpose of
--programming logic devices manufactured by Altera and sold by
--Altera or its authorized distributors. Please refer to the
--applicable agreement for further details.
LIBRARY ieee;
USE ieee.std_logic_1164.all;
LIBRARY altera_mf;
USE altera_mf.all;
ENTITY pll IS
PORT
(
areset : IN STD_LOGIC := '0';
inclk0 : IN STD_LOGIC := '0';
c0 : OUT STD_LOGIC ;
c1 : OUT STD_LOGIC
);
END pll;
ARCHITECTURE SYN OF pll IS
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (4 DOWNTO 0);
SIGNAL sub_wire1 : STD_LOGIC ;
SIGNAL sub_wire2 : STD_LOGIC ;
SIGNAL sub_wire3 : STD_LOGIC ;
SIGNAL sub_wire4 : STD_LOGIC_VECTOR (1 DOWNTO 0);
SIGNAL sub_wire5_bv : BIT_VECTOR (0 DOWNTO 0);
SIGNAL sub_wire5 : STD_LOGIC_VECTOR (0 DOWNTO 0);
COMPONENT altpll
GENERIC (
bandwidth_type : STRING;
clk0_divide_by : NATURAL;
clk0_duty_cycle : NATURAL;
clk0_multiply_by : NATURAL;
clk0_phase_shift : STRING;
clk1_divide_by : NATURAL;
clk1_duty_cycle : NATURAL;
clk1_multiply_by : NATURAL;
clk1_phase_shift : STRING;
compensate_clock : STRING;
inclk0_input_frequency : NATURAL;
intended_device_family : STRING;
lpm_hint : STRING;
lpm_type : STRING;
operation_mode : STRING;
pll_type : STRING;
port_activeclock : STRING;
port_areset : STRING;
port_clkbad0 : STRING;
port_clkbad1 : STRING;
port_clkloss : STRING;
port_clkswitch : STRING;
port_configupdate : STRING;
port_fbin : STRING;
port_inclk0 : STRING;
port_inclk1 : STRING;
port_locked : STRING;
port_pfdena : STRING;
port_phasecounterselect : STRING;
port_phasedone : STRING;
port_phasestep : STRING;
port_phaseupdown : STRING;
port_pllena : STRING;
port_scanaclr : STRING;
port_scanclk : STRING;
port_scanclkena : STRING;
port_scandata : STRING;
port_scandataout : STRING;
port_scandone : STRING;
port_scanread : STRING;
port_scanwrite : STRING;
port_clk0 : STRING;
port_clk1 : STRING;
port_clk2 : STRING;
port_clk3 : STRING;
port_clk4 : STRING;
port_clk5 : STRING;
port_clkena0 : STRING;
port_clkena1 : STRING;
port_clkena2 : STRING;
port_clkena3 : STRING;
port_clkena4 : STRING;
port_clkena5 : STRING;
port_extclk0 : STRING;
port_extclk1 : STRING;
port_extclk2 : STRING;
port_extclk3 : STRING;
width_clock : NATURAL
);
PORT (
areset : IN STD_LOGIC ;
clk : OUT STD_LOGIC_VECTOR (4 DOWNTO 0);
inclk : IN STD_LOGIC_VECTOR (1 DOWNTO 0)
);
END COMPONENT;
BEGIN
sub_wire5_bv(0 DOWNTO 0) <= "0";
sub_wire5 <= To_stdlogicvector(sub_wire5_bv);
sub_wire2 <= sub_wire0(0);
sub_wire1 <= sub_wire0(1);
c1 <= sub_wire1;
c0 <= sub_wire2;
sub_wire3 <= inclk0;
sub_wire4 <= sub_wire5(0 DOWNTO 0) & sub_wire3;
altpll_component : altpll
GENERIC MAP (
bandwidth_type => "AUTO",
clk0_divide_by => 27,
clk0_duty_cycle => 50,
clk0_multiply_by => 11,
clk0_phase_shift => "0",
clk1_divide_by => 27,
clk1_duty_cycle => 50,
clk1_multiply_by => 22,
clk1_phase_shift => "0",
compensate_clock => "CLK0",
inclk0_input_frequency => 37037,
intended_device_family => "Cyclone III",
lpm_hint => "CBX_MODULE_PREFIX=pll",
lpm_type => "altpll",
operation_mode => "NORMAL",
pll_type => "AUTO",
port_activeclock => "PORT_UNUSED",
port_areset => "PORT_USED",
port_clkbad0 => "PORT_UNUSED",
port_clkbad1 => "PORT_UNUSED",
port_clkloss => "PORT_UNUSED",
port_clkswitch => "PORT_UNUSED",
port_configupdate => "PORT_UNUSED",
port_fbin => "PORT_UNUSED",
port_inclk0 => "PORT_USED",
port_inclk1 => "PORT_UNUSED",
port_locked => "PORT_UNUSED",
port_pfdena => "PORT_UNUSED",
port_phasecounterselect => "PORT_UNUSED",
port_phasedone => "PORT_UNUSED",
port_phasestep => "PORT_UNUSED",
port_phaseupdown => "PORT_UNUSED",
port_pllena => "PORT_UNUSED",
port_scanaclr => "PORT_UNUSED",
port_scanclk => "PORT_UNUSED",
port_scanclkena => "PORT_UNUSED",
port_scandata => "PORT_UNUSED",
port_scandataout => "PORT_UNUSED",
port_scandone => "PORT_UNUSED",
port_scanread => "PORT_UNUSED",
port_scanwrite => "PORT_UNUSED",
port_clk0 => "PORT_USED",
port_clk1 => "PORT_USED",
port_clk2 => "PORT_UNUSED",
port_clk3 => "PORT_UNUSED",
port_clk4 => "PORT_UNUSED",
port_clk5 => "PORT_UNUSED",
port_clkena0 => "PORT_UNUSED",
port_clkena1 => "PORT_UNUSED",
port_clkena2 => "PORT_UNUSED",
port_clkena3 => "PORT_UNUSED",
port_clkena4 => "PORT_UNUSED",
port_clkena5 => "PORT_UNUSED",
port_extclk0 => "PORT_UNUSED",
port_extclk1 => "PORT_UNUSED",
port_extclk2 => "PORT_UNUSED",
port_extclk3 => "PORT_UNUSED",
width_clock => 5
)
PORT MAP (
areset => areset,
inclk => sub_wire4,
clk => sub_wire0
);
END SYN;
-- ============================================================
-- CNX file retrieval info
-- ============================================================
-- Retrieval info: PRIVATE: ACTIVECLK_CHECK STRING "0"
-- Retrieval info: PRIVATE: BANDWIDTH STRING "1.000"
-- Retrieval info: PRIVATE: BANDWIDTH_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: BANDWIDTH_FREQ_UNIT STRING "MHz"
-- Retrieval info: PRIVATE: BANDWIDTH_PRESET STRING "Low"
-- Retrieval info: PRIVATE: BANDWIDTH_USE_AUTO STRING "1"
-- Retrieval info: PRIVATE: BANDWIDTH_USE_PRESET STRING "0"
-- Retrieval info: PRIVATE: CLKBAD_SWITCHOVER_CHECK STRING "0"
-- Retrieval info: PRIVATE: CLKLOSS_CHECK STRING "0"
-- Retrieval info: PRIVATE: CLKSWITCH_CHECK STRING "0"
-- Retrieval info: PRIVATE: CNX_NO_COMPENSATE_RADIO STRING "0"
-- Retrieval info: PRIVATE: CREATE_CLKBAD_CHECK STRING "0"
-- Retrieval info: PRIVATE: CREATE_INCLK1_CHECK STRING "0"
-- Retrieval info: PRIVATE: CUR_DEDICATED_CLK STRING "c0"
-- Retrieval info: PRIVATE: CUR_FBIN_CLK STRING "c0"
-- Retrieval info: PRIVATE: DEVICE_SPEED_GRADE STRING "8"
-- Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "27"
-- Retrieval info: PRIVATE: DIV_FACTOR1 NUMERIC "27"
-- Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
-- Retrieval info: PRIVATE: DUTY_CYCLE1 STRING "50.00000000"
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE0 STRING "11.000000"
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE1 STRING "22.000000"
-- Retrieval info: PRIVATE: EXPLICIT_SWITCHOVER_COUNTER STRING "0"
-- Retrieval info: PRIVATE: EXT_FEEDBACK_RADIO STRING "0"
-- Retrieval info: PRIVATE: GLOCKED_COUNTER_EDIT_CHANGED STRING "1"
-- Retrieval info: PRIVATE: GLOCKED_FEATURE_ENABLED STRING "0"
-- Retrieval info: PRIVATE: GLOCKED_MODE_CHECK STRING "0"
-- Retrieval info: PRIVATE: GLOCK_COUNTER_EDIT NUMERIC "1048575"
-- Retrieval info: PRIVATE: HAS_MANUAL_SWITCHOVER STRING "1"
-- Retrieval info: PRIVATE: INCLK0_FREQ_EDIT STRING "27.000"
-- Retrieval info: PRIVATE: INCLK0_FREQ_UNIT_COMBO STRING "MHz"
-- Retrieval info: PRIVATE: INCLK1_FREQ_EDIT STRING "100.000"
-- Retrieval info: PRIVATE: INCLK1_FREQ_EDIT_CHANGED STRING "1"
-- Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_CHANGED STRING "1"
-- Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_COMBO STRING "MHz"
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
-- Retrieval info: PRIVATE: INT_FEEDBACK__MODE_RADIO STRING "1"
-- Retrieval info: PRIVATE: LOCKED_OUTPUT_CHECK STRING "0"
-- Retrieval info: PRIVATE: LONG_SCAN_RADIO STRING "1"
-- Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE STRING "Not Available"
-- Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE_DIRTY NUMERIC "0"
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT0 STRING "deg"
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT1 STRING "ps"
-- Retrieval info: PRIVATE: MIG_DEVICE_SPEED_GRADE STRING "Any"
-- Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
-- Retrieval info: PRIVATE: MIRROR_CLK1 STRING "0"
-- Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "11"
-- Retrieval info: PRIVATE: MULT_FACTOR1 NUMERIC "44"
-- Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
-- Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "11.00000000"
-- Retrieval info: PRIVATE: OUTPUT_FREQ1 STRING "22.00000000"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "0"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE1 STRING "1"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 STRING "MHz"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT1 STRING "MHz"
-- Retrieval info: PRIVATE: PHASE_RECONFIG_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: PHASE_RECONFIG_INPUTS_CHECK STRING "0"
-- Retrieval info: PRIVATE: PHASE_SHIFT0 STRING "0.00000000"
-- Retrieval info: PRIVATE: PHASE_SHIFT1 STRING "0.00000000"
-- Retrieval info: PRIVATE: PHASE_SHIFT_STEP_ENABLED_CHECK STRING "0"
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 STRING "deg"
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT1 STRING "deg"
-- Retrieval info: PRIVATE: PLL_ADVANCED_PARAM_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "1"
-- Retrieval info: PRIVATE: PLL_AUTOPLL_CHECK NUMERIC "1"
-- Retrieval info: PRIVATE: PLL_ENHPLL_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PLL_FASTPLL_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PLL_FBMIMIC_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_LVDS_PLL_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PLL_PFDENA_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_TARGET_HARCOPY_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PRIMARY_CLK_COMBO STRING "inclk0"
-- Retrieval info: PRIVATE: RECONFIG_FILE STRING "pll.mif"
-- Retrieval info: PRIVATE: SACN_INPUTS_CHECK STRING "0"
-- Retrieval info: PRIVATE: SCAN_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: SELF_RESET_LOCK_LOSS STRING "0"
-- Retrieval info: PRIVATE: SHORT_SCAN_RADIO STRING "0"
-- Retrieval info: PRIVATE: SPREAD_FEATURE_ENABLED STRING "0"
-- Retrieval info: PRIVATE: SPREAD_FREQ STRING "50.000"
-- Retrieval info: PRIVATE: SPREAD_FREQ_UNIT STRING "KHz"
-- Retrieval info: PRIVATE: SPREAD_PERCENT STRING "0.500"
-- Retrieval info: PRIVATE: SPREAD_USE STRING "0"
-- Retrieval info: PRIVATE: SRC_SYNCH_COMP_RADIO STRING "0"
-- Retrieval info: PRIVATE: STICKY_CLK0 STRING "1"
-- Retrieval info: PRIVATE: STICKY_CLK1 STRING "1"
-- Retrieval info: PRIVATE: SWITCHOVER_COUNT_EDIT NUMERIC "1"
-- Retrieval info: PRIVATE: SWITCHOVER_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
-- Retrieval info: PRIVATE: USE_CLK0 STRING "1"
-- Retrieval info: PRIVATE: USE_CLK1 STRING "1"
-- Retrieval info: PRIVATE: USE_CLKENA0 STRING "0"
-- Retrieval info: PRIVATE: USE_CLKENA1 STRING "0"
-- Retrieval info: PRIVATE: USE_MIL_SPEED_GRADE NUMERIC "0"
-- Retrieval info: PRIVATE: ZERO_DELAY_RADIO STRING "0"
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-- Retrieval info: CONSTANT: BANDWIDTH_TYPE STRING "AUTO"
-- Retrieval info: CONSTANT: CLK0_DIVIDE_BY NUMERIC "27"
-- Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
-- Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "11"
-- Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
-- Retrieval info: CONSTANT: CLK1_DIVIDE_BY NUMERIC "27"
-- Retrieval info: CONSTANT: CLK1_DUTY_CYCLE NUMERIC "50"
-- Retrieval info: CONSTANT: CLK1_MULTIPLY_BY NUMERIC "22"
-- Retrieval info: CONSTANT: CLK1_PHASE_SHIFT STRING "0"
-- Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
-- Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "37037"
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altpll"
-- Retrieval info: CONSTANT: OPERATION_MODE STRING "NORMAL"
-- Retrieval info: CONSTANT: PLL_TYPE STRING "AUTO"
-- Retrieval info: CONSTANT: PORT_ACTIVECLOCK STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_ARESET STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_CLKBAD0 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKBAD1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKLOSS STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKSWITCH STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CONFIGUPDATE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_FBIN STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_INCLK0 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_INCLK1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_LOCKED STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PFDENA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASECOUNTERSELECT STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASEDONE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASESTEP STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASEUPDOWN STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PLLENA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANACLR STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANCLK STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANCLKENA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANDATA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANDATAOUT STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANDONE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANREAD STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANWRITE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk0 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_clk1 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_clk2 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk3 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk4 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk5 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena0 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena2 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena3 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena4 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena5 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk0 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk2 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk3 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: WIDTH_CLOCK NUMERIC "5"
-- Retrieval info: USED_PORT: @clk 0 0 5 0 OUTPUT_CLK_EXT VCC "@clk[4..0]"
-- Retrieval info: USED_PORT: @inclk 0 0 2 0 INPUT_CLK_EXT VCC "@inclk[1..0]"
-- Retrieval info: USED_PORT: areset 0 0 0 0 INPUT GND "areset"
-- Retrieval info: USED_PORT: c0 0 0 0 0 OUTPUT_CLK_EXT VCC "c0"
-- Retrieval info: USED_PORT: c1 0 0 0 0 OUTPUT_CLK_EXT VCC "c1"
-- Retrieval info: USED_PORT: inclk0 0 0 0 0 INPUT_CLK_EXT GND "inclk0"
-- Retrieval info: CONNECT: @areset 0 0 0 0 areset 0 0 0 0
-- Retrieval info: CONNECT: @inclk 0 0 1 1 GND 0 0 0 0
-- Retrieval info: CONNECT: @inclk 0 0 1 0 inclk0 0 0 0 0
-- Retrieval info: CONNECT: c0 0 0 0 0 @clk 0 0 1 0
-- Retrieval info: CONNECT: c1 0 0 0 0 @clk 0 0 1 1
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.vhd TRUE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.ppf TRUE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.inc FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.cmp FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.bsf FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_inst.vhd FALSE
-- Retrieval info: LIB_FILE: altera_mf
-- Retrieval info: CBX_MODULE_PREFIX: ON

View File

@@ -1,16 +0,0 @@
@echo off
del /s *.bak
del /s *.orig
del /s *.rej
rmdir /s /q db
rmdir /s /q incremental_db
rmdir /s /q output_files
rmdir /s /q simulation
rmdir /s /q greybox_tmp
del PLLJ_PLLSPE_INFO.txt
del /s /q build_id.v
del *.qws
del *.ppf
del *.qip
del *.ddb
pause

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity prom_ic23 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of prom_ic23 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"08",X"00",X"00",X"00",
X"00",X"00",X"20",X"00",X"00",X"00",X"00",X"00",X"00",X"04",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"10",X"00",X"00",X"00",X"02",X"00",X"00",X"00",X"20",X"00",X"00",
X"00",X"00",X"40",X"00",X"00",X"04",X"00",X"00",X"00",X"08",X"08",X"00",X"00",X"40",X"00",X"00",
X"00",X"00",X"20",X"00",X"0C",X"0C",X"00",X"00",X"00",X"20",X"70",X"20",X"00",X"00",X"00",X"00",
X"00",X"00",X"08",X"08",X"3E",X"08",X"08",X"00",X"10",X"10",X"10",X"FE",X"10",X"10",X"10",X"00",
X"00",X"44",X"00",X"00",X"20",X"00",X"02",X"00",X"10",X"00",X"40",X"08",X"02",X"80",X"04",X"00",
X"01",X"40",X"04",X"10",X"82",X"04",X"50",X"02",X"82",X"48",X"02",X"A0",X"08",X"45",X"20",X"02",
X"3C",X"7E",X"DF",X"AF",X"D7",X"AF",X"56",X"3C",X"3C",X"42",X"99",X"BD",X"BD",X"99",X"42",X"3C",
X"88",X"20",X"04",X"90",X"2A",X"56",X"0F",X"03",X"24",X"18",X"65",X"9A",X"1D",X"A0",X"56",X"28",
X"3C",X"5A",X"AB",X"AD",X"D5",X"D3",X"6A",X"3C",X"38",X"68",X"DC",X"FA",X"2E",X"3F",X"16",X"0C",
X"01",X"2A",X"54",X"2A",X"54",X"2A",X"54",X"80",X"3C",X"46",X"F9",X"8F",X"F3",X"9D",X"62",X"3C",
X"08",X"08",X"1C",X"7F",X"1C",X"08",X"08",X"00",X"1C",X"3A",X"6D",X"75",X"77",X"36",X"1C",X"00",
X"00",X"18",X"3C",X"7E",X"7E",X"3C",X"18",X"00",X"38",X"50",X"E8",X"F8",X"F0",X"D8",X"60",X"38",
X"08",X"2A",X"1C",X"7F",X"1C",X"2A",X"08",X"00",X"38",X"4C",X"9D",X"BD",X"BD",X"B9",X"32",X"1C",
X"62",X"91",X"09",X"3A",X"5C",X"90",X"89",X"46",X"3C",X"5E",X"EB",X"FF",X"DF",X"F7",X"7E",X"3C",
X"FE",X"FC",X"F8",X"C0",X"80",X"10",X"60",X"80",X"F0",X"1C",X"06",X"83",X"C3",X"E3",X"F7",X"FE",
X"FF",X"FF",X"BB",X"EE",X"EE",X"BC",X"F8",X"E0",X"E0",X"F8",X"FC",X"F6",X"BE",X"FF",X"6F",X"6B",
X"40",X"10",X"80",X"C0",X"00",X"00",X"00",X"00",X"21",X"88",X"22",X"10",X"84",X"21",X"88",X"54",
X"E5",X"D0",X"85",X"20",X"94",X"40",X"01",X"A0",X"40",X"10",X"44",X"90",X"02",X"A8",X"C5",X"E8",
X"C0",X"E8",X"60",X"14",X"48",X"04",X"2A",X"01",X"00",X"00",X"80",X"28",X"40",X"10",X"C0",X"D0",
X"FC",X"FC",X"F8",X"FC",X"F2",X"D9",X"0F",X"07",X"00",X"00",X"C0",X"C0",X"98",X"38",X"7C",X"FC",
X"BB",X"D6",X"77",X"E6",X"8E",X"3C",X"F8",X"E0",X"E0",X"F8",X"3C",X"8E",X"66",X"F7",X"F6",X"EB",
X"F8",X"F8",X"F0",X"E0",X"C0",X"00",X"00",X"00",X"03",X"05",X"0A",X"D4",X"E8",X"D0",X"B8",X"78",
X"7F",X"EF",X"C7",X"C3",X"41",X"60",X"30",X"0F",X"01",X"06",X"08",X"01",X"03",X"1F",X"3F",X"7F",
X"E7",X"E4",X"FC",X"7F",X"77",X"37",X"1E",X"07",X"07",X"1F",X"3D",X"7E",X"5E",X"FB",X"BE",X"BE",
X"19",X"16",X"28",X"76",X"7B",X"FC",X"F8",X"E0",X"00",X"00",X"00",X"00",X"02",X"02",X"0C",X"0A",
X"27",X"93",X"29",X"44",X"12",X"24",X"09",X"02",X"05",X"10",X"01",X"44",X"12",X"89",X"23",X"97",
X"03",X"0B",X"10",X"05",X"12",X"00",X"00",X"00",X"80",X"48",X"20",X"15",X"28",X"06",X"27",X"13",
X"39",X"33",X"07",X"0F",X"0F",X"03",X"00",X"00",X"E0",X"D0",X"CB",X"6F",X"3F",X"1F",X"3E",X"3C",
X"DF",X"CB",X"ED",X"67",X"71",X"3C",X"1F",X"07",X"07",X"1F",X"3C",X"71",X"67",X"ED",X"CF",X"DA",
X"1E",X"1D",X"0B",X"17",X"2B",X"50",X"A0",X"C0",X"00",X"00",X"00",X"03",X"07",X"0F",X"1F",X"1F",
X"20",X"70",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"FF",X"77",X"22",X"77",X"22",X"77",
X"77",X"22",X"77",X"22",X"F7",X"FF",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"70",X"20",
X"F0",X"07",X"FF",X"77",X"27",X"72",X"27",X"70",X"70",X"27",X"72",X"27",X"77",X"FF",X"07",X"F0",
X"0F",X"E0",X"FF",X"77",X"27",X"77",X"20",X"70",X"70",X"20",X"77",X"27",X"77",X"FF",X"E0",X"0F",
X"00",X"00",X"00",X"00",X"F0",X"F0",X"F0",X"F0",X"00",X"E0",X"F0",X"F0",X"FF",X"FF",X"FF",X"FF",
X"F0",X"FE",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"E7",X"E7",X"81",X"81",X"E7",X"E7",X"FF",
X"01",X"03",X"01",X"01",X"07",X"03",X"01",X"03",X"1F",X"03",X"1F",X"0F",X"07",X"1F",X"03",X"0F",
X"7F",X"0F",X"7F",X"3F",X"0F",X"7F",X"1F",X"3F",X"FF",X"3F",X"7F",X"FF",X"3F",X"FF",X"3F",X"7F",
X"C4",X"CE",X"C4",X"CE",X"C0",X"C0",X"C0",X"C0",X"00",X"FF",X"FF",X"CE",X"C4",X"CE",X"C4",X"CE",
X"CE",X"C4",X"CE",X"C4",X"CE",X"FF",X"FF",X"00",X"C0",X"C0",X"C0",X"C0",X"CE",X"C4",X"CE",X"C4",
X"F0",X"07",X"FF",X"CE",X"C4",X"CE",X"C4",X"CE",X"0E",X"04",X"0E",X"04",X"0E",X"FF",X"07",X"F0",
X"0F",X"E0",X"FF",X"CE",X"C4",X"CE",X"C4",X"CE",X"CE",X"C4",X"CE",X"C4",X"CE",X"FF",X"E0",X"0F",
X"F0",X"F0",X"F0",X"F0",X"00",X"00",X"00",X"00",X"FF",X"FF",X"FF",X"FF",X"F0",X"F0",X"E0",X"00",
X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FE",X"F0",X"FF",X"E7",X"E7",X"FF",X"FF",X"E7",X"E7",X"FF",
X"FF",X"FF",X"7E",X"3C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3C",X"7E",X"FF",X"FF",
X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"FF",X"C3",X"C3",X"FF",X"FF",X"C3",X"C3",X"FF",X"00",X"00",X"00",X"00",X"FF",X"C3",X"C3",X"FF",
X"FF",X"FF",X"FF",X"FF",X"FF",X"C3",X"C3",X"FF",X"2F",X"03",X"3F",X"4F",X"FF",X"C3",X"C3",X"FF",
X"FF",X"C3",X"C3",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"FF",X"FF",X"FF",X"FF",X"00",X"00",X"00",X"00",X"2F",X"03",X"3F",X"4F",X"00",X"00",X"00",X"00",
X"FF",X"C3",X"C3",X"FF",X"FF",X"FF",X"FF",X"FF",X"00",X"00",X"00",X"00",X"FF",X"FF",X"FF",X"FF",
X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"2F",X"03",X"3F",X"4F",X"FF",X"FF",X"FF",X"FF",
X"FF",X"C3",X"C3",X"FF",X"2F",X"03",X"3F",X"4F",X"00",X"00",X"00",X"00",X"2F",X"03",X"3F",X"4F",
X"FF",X"FF",X"FF",X"FF",X"2F",X"03",X"3F",X"4F",X"2F",X"03",X"3F",X"4F",X"2F",X"03",X"3F",X"4F",
X"9E",X"F2",X"F0",X"F0",X"F0",X"F0",X"60",X"00",X"00",X"60",X"F0",X"F0",X"F0",X"F0",X"F2",X"9E",
X"9C",X"96",X"F2",X"F0",X"F0",X"F0",X"60",X"00",X"00",X"60",X"F0",X"F0",X"F0",X"F2",X"96",X"9C",
X"F0",X"98",X"9C",X"F6",X"F2",X"F0",X"60",X"00",X"00",X"60",X"F0",X"F2",X"F6",X"9C",X"98",X"F0",
X"F0",X"98",X"9C",X"F6",X"F2",X"62",X"00",X"00",X"00",X"62",X"F2",X"F6",X"9C",X"90",X"F0",X"F0",
X"07",X"0C",X"38",X"60",X"C6",X"6C",X"38",X"00",X"00",X"38",X"6C",X"C6",X"60",X"38",X"0C",X"07",
X"07",X"1C",X"70",X"C0",X"80",X"D8",X"70",X"00",X"00",X"70",X"D8",X"80",X"C0",X"70",X"1C",X"07",
X"07",X"1C",X"70",X"C0",X"80",X"C0",X"60",X"00",X"00",X"60",X"C0",X"80",X"C0",X"70",X"1C",X"07",
X"07",X"3C",X"60",X"C0",X"80",X"80",X"80",X"00",X"FF",X"80",X"80",X"80",X"C0",X"60",X"3C",X"0F",
X"F8",X"FC",X"FC",X"FC",X"78",X"30",X"00",X"00",X"F8",X"7C",X"FE",X"FF",X"FF",X"FF",X"FE",X"F8",
X"00",X"00",X"60",X"F8",X"FC",X"FC",X"F8",X"F0",X"FF",X"FF",X"FF",X"FF",X"FF",X"7F",X"7E",X"3C",
X"78",X"FC",X"FE",X"FF",X"FF",X"FF",X"FF",X"FF",X"1E",X"3F",X"7F",X"7F",X"3D",X"18",X"00",X"00",
X"3F",X"7F",X"FF",X"FF",X"7F",X"3F",X"3F",X"1F",X"00",X"00",X"04",X"0E",X"1F",X"3F",X"3F",X"1F",
X"00",X"80",X"C0",X"E0",X"E0",X"C0",X"C0",X"00",X"FF",X"7E",X"7C",X"30",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"3C",X"7E",X"FE",X"00",X"03",X"07",X"0F",X"0F",X"0F",X"03",X"01",
X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",
X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",
X"00",X"00",X"00",X"38",X"6C",X"7C",X"6C",X"38",X"00",X"38",X"6C",X"7C",X"6C",X"38",X"00",X"00",
X"6C",X"7C",X"6C",X"38",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"38",
X"6C",X"38",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"38",X"6C",X"7C",
X"00",X"38",X"7C",X"E6",X"FE",X"E6",X"7C",X"38",X"7C",X"E6",X"FE",X"E6",X"7C",X"38",X"00",X"00",
X"FE",X"E6",X"7C",X"38",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"38",X"7C",X"E6",
X"7C",X"38",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"38",X"7C",X"E6",X"FE",X"E6",
X"3C",X"7E",X"E7",X"FF",X"FF",X"E7",X"7E",X"3C",X"E7",X"FF",X"FF",X"E7",X"7E",X"3C",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"3C",X"7E",X"FF",X"E7",X"7E",X"3C",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"3C",X"7E",X"E7",X"FF",X"7E",X"3C",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"3C",X"7E",X"E7",X"FF",X"FF",X"E7",X"FF",X"CF",X"CE",X"FE",X"FC",X"70",X"00",X"00",
X"00",X"00",X"00",X"70",X"FC",X"FE",X"CE",X"CF",X"07",X"07",X"03",X"03",X"01",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"01",X"03",X"03",X"07",X"FF",X"CF",X"CE",X"FE",X"FC",X"F8",X"F0",X"00",
X"00",X"00",X"F0",X"F8",X"FC",X"FE",X"CE",X"CF",X"0E",X"0F",X"07",X"1F",X"03",X"01",X"00",X"00",
X"00",X"00",X"00",X"01",X"03",X"1F",X"07",X"0F",X"7F",X"CE",X"CC",X"F8",X"F8",X"F8",X"F0",X"F0",
X"E0",X"F0",X"F0",X"F8",X"F8",X"F8",X"CC",X"CE",X"1E",X"0F",X"27",X"3F",X"03",X"03",X"01",X"00",
X"00",X"01",X"01",X"03",X"03",X"3F",X"27",X"0F",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",
X"0C",X"27",X"33",X"1F",X"03",X"01",X"03",X"01",X"03",X"03",X"01",X"07",X"03",X"3F",X"67",X"4F",
X"0C",X"67",X"73",X"1F",X"01",X"00",X"07",X"03",X"07",X"0F",X"01",X"03",X"00",X"1F",X"73",X"67",
X"4C",X"F8",X"F8",X"F0",X"F8",X"F0",X"E0",X"C0",X"F8",X"F0",X"F8",X"F8",X"4C",X"4E",X"7E",X"4E",
X"73",X"1F",X"71",X"01",X"07",X"03",X"1F",X"0F",X"01",X"03",X"71",X"1F",X"73",X"06",X"0C",X"06",
X"F8",X"F0",X"F8",X"F8",X"F0",X"E0",X"80",X"00",X"F8",X"F8",X"4C",X"4E",X"7F",X"4E",X"4C",X"F8",
X"00",X"00",X"80",X"E0",X"F0",X"F8",X"F8",X"F0",X"31",X"60",X"07",X"03",X"07",X"1F",X"7F",X"FE",
X"31",X"1F",X"32",X"64",X"08",X"64",X"32",X"1F",X"00",X"FE",X"7F",X"1F",X"07",X"1F",X"01",X"63",
X"F8",X"F0",X"F0",X"E0",X"80",X"00",X"00",X"00",X"4C",X"4E",X"7F",X"4E",X"4C",X"F8",X"F8",X"F0",
X"C0",X"E0",X"F0",X"F0",X"F8",X"F0",X"F8",X"F8",X"07",X"03",X"0F",X"07",X"1F",X"7E",X"F0",X"00",
X"73",X"06",X"0C",X"06",X"73",X"1F",X"71",X"00",X"1F",X"7F",X"07",X"0F",X"01",X"03",X"71",X"1F",
X"FE",X"9C",X"98",X"F0",X"F8",X"FC",X"FC",X"7E",X"3E",X"7E",X"FC",X"FC",X"F8",X"F0",X"98",X"9C",
X"30",X"18",X"0C",X"1F",X"F7",X"61",X"C0",X"00",X"00",X"00",X"C0",X"61",X"F7",X"1F",X"0C",X"18",
X"98",X"F0",X"F8",X"FC",X"FC",X"7E",X"3E",X"3E",X"FC",X"FC",X"F8",X"F0",X"98",X"9C",X"FE",X"9C",
X"0D",X"1F",X"FB",X"31",X"E0",X"00",X"00",X"00",X"E0",X"31",X"FB",X"1F",X"0D",X"19",X"31",X"19",
X"F8",X"FC",X"FC",X"7E",X"3E",X"7F",X"1F",X"3F",X"F8",X"F0",X"98",X"9C",X"FE",X"9C",X"98",X"F0",
X"3F",X"0F",X"1F",X"3F",X"3E",X"7E",X"FC",X"FC",X"3B",X"F1",X"20",X"E0",X"00",X"00",X"00",X"00",
X"3B",X"1F",X"0D",X"19",X"39",X"19",X"0D",X"1F",X"00",X"00",X"00",X"00",X"00",X"E0",X"20",X"F1",
X"FC",X"7E",X"3E",X"7F",X"1F",X"7F",X"1F",X"3F",X"98",X"9C",X"FE",X"9C",X"98",X"F0",X"F8",X"FC",
X"3F",X"1F",X"7E",X"7E",X"FC",X"FC",X"F8",X"F0",X"0D",X"19",X"31",X"19",X"0D",X"EF",X"3B",X"E1",
X"00",X"00",X"00",X"00",X"00",X"E1",X"3B",X"EF",X"7F",X"4E",X"CC",X"F8",X"F8",X"FC",X"FC",X"7C",
X"FC",X"FC",X"FC",X"7C",X"F8",X"F8",X"CC",X"4E",X"0C",X"06",X"63",X"3F",X"61",X"00",X"01",X"00",
X"01",X"00",X"01",X"00",X"61",X"3F",X"63",X"06",X"98",X"F0",X"F8",X"FC",X"FC",X"00",X"00",X"00",
X"F8",X"FC",X"FC",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FC",X"FC",X"FC",X"F8",
X"E0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",
X"07",X"0F",X"1F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"1F",X"0F",
X"0F",X"07",X"1F",X"7E",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"7E",X"0F",X"3F",
X"00",X"00",X"00",X"00",X"80",X"C0",X"E0",X"F0",X"3F",X"7E",X"F8",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"F8",X"7E",X"0F",X"3F",X"07",X"0F",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"7F",
X"1F",X"0F",X"1E",X"0E",X"1E",X"0C",X"1C",X"18",X"7E",X"3F",X"FF",X"1F",X"3F",X"0F",X"3F",X"0F",
X"3F",X"0F",X"07",X"1F",X"0F",X"3F",X"1F",X"7E",X"00",X"18",X"1C",X"0C",X"1E",X"0E",X"1E",X"0F",
X"1E",X"0E",X"3C",X"1C",X"18",X"30",X"00",X"00",X"70",X"38",X"3C",X"1C",X"3E",X"0E",X"3F",X"0F",
X"0E",X"1E",X"1C",X"38",X"30",X"00",X"00",X"00",X"0F",X"3F",X"0F",X"3F",X"0F",X"1F",X"0E",X"1E",
X"1F",X"0F",X"3F",X"0F",X"1F",X"0F",X"3F",X"0F",X"00",X"00",X"00",X"00",X"00",X"38",X"1C",X"0C",
X"0E",X"1C",X"38",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"38",X"1C",X"0C",X"1E",X"0E",
X"F0",X"F0",X"E0",X"C0",X"80",X"00",X"00",X"00",X"FE",X"3E",X"7E",X"3C",X"7C",X"FC",X"78",X"F8",
X"03",X"01",X"07",X"03",X"07",X"1E",X"00",X"00",X"F8",X"78",X"FC",X"7C",X"FC",X"3E",X"7E",X"3E",
X"00",X"00",X"00",X"00",X"80",X"C0",X"E0",X"F0",X"00",X"00",X"00",X"1F",X"07",X"03",X"07",X"01",
X"FC",X"F8",X"F8",X"F0",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",X"F0",X"F8",X"F8",
X"00",X"01",X"00",X"07",X"03",X"0F",X"1F",X"7C",X"00",X"7C",X"3F",X"0F",X"07",X"03",X"01",X"03",
X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity prom_ic24 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of prom_ic24 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"20",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"08",X"00",X"00",X"00",X"00",X"00",X"10",X"38",X"10",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",
X"00",X"00",X"44",X"10",X"10",X"40",X"00",X"00",X"00",X"00",X"00",X"08",X"40",X"00",X"90",X"94",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",
X"80",X"40",X"20",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",
X"00",X"80",X"C0",X"64",X"32",X"19",X"0F",X"07",X"07",X"0D",X"19",X"32",X"64",X"C0",X"80",X"00",
X"80",X"20",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"00",X"40",X"10",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"05",X"0A",X"14",X"28",X"40",X"80",X"00",
X"03",X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"01",X"03",
X"18",X"1B",X"03",X"00",X"08",X"08",X"01",X"00",X"00",X"00",X"02",X"01",X"21",X"04",X"41",X"41",
X"04",X"00",X"15",X"00",X"44",X"28",X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"01",
X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"04",X"02",X"01",
X"07",X"0D",X"18",X"30",X"60",X"C8",X"D0",X"E0",X"E0",X"D0",X"C8",X"60",X"30",X"18",X"0D",X"07",
X"00",X"01",X"00",X"02",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"02",X"00",X"05",
X"02",X"04",X"08",X"10",X"28",X"50",X"A0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"01",
X"00",X"70",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"77",X"00",X"77",X"00",X"77",
X"77",X"00",X"77",X"00",X"77",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"70",X"00",
X"0F",X"F8",X"00",X"77",X"07",X"70",X"07",X"70",X"70",X"07",X"70",X"07",X"77",X"00",X"F8",X"0F",
X"F0",X"1F",X"00",X"77",X"07",X"77",X"00",X"70",X"70",X"00",X"77",X"07",X"77",X"00",X"1F",X"F0",
X"20",X"20",X"20",X"20",X"F0",X"F0",X"F0",X"F0",X"02",X"02",X"02",X"02",X"0F",X"0F",X"0F",X"0F",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"18",X"7E",X"7E",X"18",X"18",X"00",
X"01",X"03",X"01",X"01",X"07",X"03",X"01",X"03",X"1F",X"03",X"1F",X"0F",X"07",X"1F",X"03",X"0F",
X"7F",X"0F",X"7F",X"3F",X"0F",X"7F",X"1F",X"3F",X"FF",X"3F",X"7F",X"FF",X"3F",X"FF",X"3F",X"7F",
X"00",X"0E",X"00",X"0E",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"0E",X"00",X"0E",X"00",X"0E",
X"0E",X"00",X"0E",X"00",X"0E",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"0E",X"00",X"0E",X"00",
X"0F",X"F8",X"00",X"0E",X"00",X"0E",X"00",X"0E",X"0E",X"00",X"0E",X"00",X"0E",X"00",X"F8",X"0F",
X"F0",X"1F",X"00",X"0E",X"00",X"0E",X"00",X"0E",X"0E",X"00",X"0E",X"00",X"0E",X"00",X"1F",X"F0",
X"F0",X"F0",X"F0",X"F0",X"20",X"20",X"20",X"20",X"0F",X"0F",X"0F",X"0F",X"02",X"02",X"02",X"02",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"18",X"00",X"00",X"18",X"18",X"00",
X"FF",X"FF",X"7E",X"3C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3C",X"7E",X"FF",X"FF",
X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",
X"60",X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",X"60",
X"00",X"60",X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",X"60",X"00",
X"00",X"60",X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",X"60",X"00",X"00",
X"07",X"0C",X"38",X"60",X"C6",X"6C",X"38",X"00",X"00",X"38",X"6C",X"C6",X"60",X"38",X"0C",X"07",
X"07",X"1C",X"70",X"C0",X"80",X"D8",X"70",X"00",X"00",X"70",X"D8",X"80",X"C0",X"70",X"1C",X"07",
X"07",X"1C",X"70",X"C0",X"80",X"C0",X"60",X"00",X"00",X"60",X"C0",X"80",X"C0",X"70",X"1C",X"07",
X"07",X"3C",X"60",X"C0",X"80",X"80",X"80",X"00",X"00",X"80",X"80",X"80",X"C0",X"60",X"3C",X"07",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"10",X"00",X"10",X"00",X"00",X"00",X"10",X"00",X"10",X"00",X"00",X"00",
X"10",X"00",X"10",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"10",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"00",
X"00",X"38",X"44",X"9A",X"82",X"9A",X"44",X"38",X"44",X"9A",X"82",X"9A",X"44",X"38",X"00",X"00",
X"82",X"9A",X"44",X"38",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"38",X"44",X"9A",
X"44",X"38",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"38",X"44",X"9A",X"82",X"9A",
X"3C",X"42",X"99",X"81",X"81",X"99",X"42",X"3C",X"99",X"81",X"81",X"99",X"42",X"3C",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"3C",X"42",X"81",X"99",X"42",X"3C",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"3C",X"42",X"99",X"81",X"42",X"3C",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"3C",X"42",X"99",X"81",X"81",X"99",X"01",X"31",X"32",X"02",X"8C",X"70",X"00",X"00",
X"00",X"00",X"00",X"70",X"8C",X"02",X"32",X"31",X"04",X"04",X"02",X"02",X"01",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"01",X"02",X"02",X"04",X"01",X"31",X"32",X"02",X"04",X"08",X"F0",X"00",
X"00",X"00",X"F0",X"08",X"04",X"02",X"32",X"31",X"08",X"08",X"04",X"1C",X"02",X"01",X"00",X"00",
X"00",X"00",X"00",X"01",X"02",X"1C",X"04",X"08",X"80",X"30",X"30",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"30",X"01",X"00",X"20",X"3C",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"3C",X"20",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"03",X"20",X"30",X"1E",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3C",X"70",X"60",
X"03",X"60",X"70",X"1E",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"1E",X"70",X"60",
X"B0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"B0",X"B0",X"80",X"B0",
X"70",X"1E",X"70",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"70",X"1E",X"70",X"01",X"03",X"01",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"B0",X"B0",X"80",X"B0",X"B0",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"60",X"00",X"00",X"00",X"00",X"00",X"00",
X"30",X"1E",X"31",X"63",X"07",X"33",X"31",X"1E",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"B0",X"B0",X"80",X"B0",X"B0",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"70",X"01",X"03",X"01",X"70",X"1E",X"70",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"70",X"1E",
X"00",X"60",X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",X"60",
X"0F",X"07",X"03",X"18",X"F0",X"60",X"C0",X"00",X"00",X"00",X"C0",X"60",X"F0",X"18",X"03",X"07",
X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",X"60",X"00",X"60",
X"02",X"18",X"F8",X"30",X"E0",X"00",X"00",X"00",X"E0",X"30",X"F8",X"18",X"02",X"06",X"0E",X"06",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",X"60",X"00",X"60",X"60",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"38",X"F0",X"20",X"E0",X"00",X"00",X"00",X"00",
X"38",X"18",X"02",X"06",X"06",X"06",X"02",X"18",X"00",X"00",X"00",X"00",X"00",X"E0",X"20",X"F0",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",X"60",X"00",X"60",X"60",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"02",X"06",X"0E",X"06",X"02",X"E8",X"38",X"E0",
X"00",X"00",X"00",X"00",X"00",X"E0",X"38",X"E8",X"80",X"B0",X"30",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"B0",X"03",X"01",X"60",X"3E",X"60",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"60",X"3E",X"60",X"01",X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity prom_ic39 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of prom_ic39 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"7C",X"12",X"12",X"12",X"7E",X"7C",X"00",
X"00",X"34",X"4A",X"4A",X"4A",X"7E",X"7E",X"00",X"00",X"24",X"42",X"42",X"42",X"7E",X"3C",X"00",
X"00",X"3C",X"42",X"42",X"42",X"7E",X"7E",X"00",X"00",X"42",X"4A",X"4A",X"4A",X"7E",X"7E",X"00",
X"00",X"02",X"0A",X"0A",X"0A",X"7E",X"7E",X"00",X"00",X"34",X"52",X"52",X"42",X"7E",X"3C",X"00",
X"00",X"7E",X"08",X"08",X"08",X"7E",X"7E",X"00",X"00",X"42",X"42",X"7E",X"7E",X"42",X"42",X"00",
X"00",X"7E",X"7E",X"7E",X"40",X"40",X"30",X"00",X"00",X"42",X"24",X"18",X"08",X"7E",X"7E",X"00",
X"00",X"40",X"40",X"40",X"40",X"7E",X"7E",X"00",X"00",X"7E",X"02",X"7C",X"02",X"7E",X"7E",X"00",
X"00",X"7E",X"20",X"18",X"04",X"7E",X"7E",X"00",X"00",X"3C",X"42",X"42",X"42",X"7E",X"3C",X"00",
X"00",X"0C",X"12",X"12",X"12",X"7E",X"7E",X"00",X"00",X"40",X"3C",X"62",X"42",X"7E",X"3C",X"00",
X"00",X"44",X"2A",X"1A",X"0A",X"7E",X"7E",X"00",X"00",X"34",X"72",X"4A",X"4A",X"4E",X"2C",X"00",
X"00",X"02",X"02",X"7E",X"7E",X"02",X"02",X"00",X"00",X"3E",X"40",X"40",X"40",X"7E",X"7E",X"00",
X"00",X"1E",X"20",X"40",X"20",X"3E",X"1E",X"00",X"00",X"3E",X"40",X"38",X"40",X"7E",X"3E",X"00",
X"00",X"42",X"26",X"1C",X"38",X"74",X"62",X"00",X"00",X"06",X"08",X"70",X"08",X"0E",X"06",X"00",
X"00",X"42",X"46",X"4E",X"5A",X"72",X"62",X"00",X"00",X"00",X"00",X"42",X"42",X"7E",X"00",X"00",
X"00",X"00",X"00",X"7E",X"42",X"42",X"00",X"00",X"00",X"00",X"42",X"66",X"3C",X"18",X"00",X"00",
X"00",X"00",X"00",X"18",X"3C",X"66",X"42",X"00",X"00",X"00",X"24",X"18",X"7E",X"18",X"24",X"00",
X"00",X"00",X"3C",X"46",X"4A",X"52",X"3C",X"00",X"00",X"00",X"40",X"40",X"7E",X"42",X"44",X"00",
X"00",X"00",X"64",X"4A",X"52",X"62",X"44",X"00",X"00",X"00",X"34",X"4A",X"4A",X"4A",X"42",X"00",
X"00",X"00",X"08",X"7E",X"08",X"08",X"0E",X"00",X"00",X"00",X"30",X"4A",X"4A",X"4A",X"4E",X"00",
X"00",X"00",X"30",X"4A",X"4A",X"4A",X"3C",X"00",X"00",X"00",X"06",X"1A",X"32",X"62",X"06",X"00",
X"00",X"00",X"34",X"4A",X"4A",X"4A",X"34",X"00",X"00",X"00",X"3C",X"52",X"52",X"52",X"0C",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",X"08",X"08",X"08",X"08",X"08",X"00",
X"3C",X"42",X"81",X"81",X"81",X"81",X"42",X"3C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"09",X"51",X"01",X"02",X"00",
X"FC",X"E0",X"70",X"38",X"1C",X"3E",X"00",X"00",X"00",X"3E",X"1C",X"38",X"70",X"E0",X"FC",X"9F",
X"E0",X"70",X"38",X"7C",X"00",X"00",X"00",X"00",X"00",X"7C",X"38",X"70",X"E0",X"FC",X"9F",X"FC",
X"70",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"70",X"E0",X"FC",X"9F",X"FC",X"E0",
X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"70",X"E0",X"FC",X"9F",X"FC",X"E0",X"70",
X"70",X"E0",X"FC",X"9F",X"FC",X"E0",X"70",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",
X"E0",X"FC",X"9F",X"FC",X"E0",X"70",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"70",
X"FC",X"9F",X"FC",X"E0",X"70",X"38",X"7C",X"00",X"00",X"00",X"00",X"00",X"7C",X"38",X"70",X"E0",
X"9F",X"FC",X"E0",X"70",X"38",X"1C",X"3E",X"00",X"00",X"00",X"3E",X"1C",X"38",X"70",X"E0",X"FC",
X"7F",X"C7",X"0E",X"1C",X"38",X"70",X"FC",X"00",X"FC",X"70",X"38",X"1C",X"0E",X"C7",X"7F",X"E3",
X"CE",X"1C",X"38",X"70",X"FC",X"00",X"00",X"00",X"FC",X"70",X"38",X"1C",X"CE",X"7F",X"E3",X"7F",
X"3C",X"78",X"FC",X"00",X"00",X"00",X"00",X"00",X"FC",X"78",X"3C",X"DE",X"7F",X"E3",X"7F",X"DE",
X"FC",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FC",X"78",X"FC",X"7F",X"E3",X"7F",X"FC",X"78",
X"78",X"FC",X"7F",X"E3",X"7F",X"FC",X"78",X"FC",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FC",
X"DE",X"7F",X"E3",X"7F",X"DE",X"3C",X"78",X"FC",X"00",X"00",X"00",X"00",X"00",X"FC",X"78",X"3C",
X"7F",X"E3",X"7F",X"CE",X"1C",X"38",X"70",X"FC",X"00",X"00",X"00",X"FC",X"70",X"38",X"1C",X"CE",
X"E3",X"7F",X"C7",X"0E",X"1C",X"38",X"70",X"FC",X"00",X"FC",X"70",X"38",X"1C",X"0E",X"C7",X"7F",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",
X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",
X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",
X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"0F",X"0F",X"00",X"00",X"00",X"00",X"0F",X"0F",X"00",X"00",
X"00",X"00",X"0F",X"0F",X"00",X"00",X"00",X"00",X"0F",X"0F",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"F0",X"F0",X"00",X"00",X"00",X"00",X"F0",X"F0",X"00",X"00",
X"00",X"00",X"F0",X"F0",X"00",X"00",X"00",X"00",X"F0",X"F0",X"00",X"00",X"00",X"00",X"00",X"00",
X"7E",X"CC",X"38",X"FE",X"38",X"CC",X"7E",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",
X"78",X"3E",X"78",X"9C",X"0E",X"FF",X"3E",X"00",X"00",X"00",X"00",X"00",X"3E",X"FF",X"0E",X"9C",
X"38",X"5C",X"4E",X"87",X"0F",X"3E",X"FC",X"00",X"FC",X"3E",X"0F",X"87",X"4E",X"5C",X"38",X"3E",
X"0E",X"FF",X"3E",X"00",X"00",X"00",X"00",X"00",X"3E",X"FF",X"0E",X"9C",X"78",X"3E",X"78",X"9C",
X"FF",X"1C",X"38",X"FE",X"38",X"1C",X"FF",X"00",X"82",X"92",X"D6",X"FE",X"FE",X"BA",X"92",X"92",
X"FF",X"38",X"1C",X"7F",X"1C",X"38",X"FF",X"00",X"92",X"92",X"BA",X"FE",X"FE",X"D6",X"92",X"82",
X"00",X"00",X"10",X"38",X"10",X"00",X"00",X"00",X"00",X"08",X"30",X"7C",X"30",X"08",X"00",X"00",
X"00",X"0C",X"38",X"FE",X"38",X"0C",X"00",X"00",X"1E",X"0C",X"38",X"FE",X"38",X"0C",X"1E",X"00",
X"3D",X"3E",X"5C",X"18",X"10",X"20",X"00",X"00",X"00",X"00",X"04",X"08",X"18",X"3A",X"74",X"B8",
X"7C",X"3A",X"18",X"08",X"04",X"00",X"00",X"00",X"00",X"20",X"10",X"18",X"5C",X"2E",X"1D",X"BC",
X"BC",X"1D",X"2E",X"5C",X"18",X"10",X"20",X"00",X"00",X"00",X"00",X"04",X"08",X"18",X"3A",X"7C",
X"74",X"3A",X"18",X"08",X"04",X"00",X"00",X"00",X"00",X"20",X"10",X"18",X"5C",X"3E",X"3D",X"B8",
X"18",X"F8",X"F0",X"E0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"38",X"38",X"18",
X"FE",X"BA",X"92",X"92",X"00",X"10",X"28",X"10",X"00",X"00",X"00",X"00",X"82",X"92",X"D6",X"FE",
X"18",X"1F",X"0F",X"07",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"1C",X"1C",X"18",
X"00",X"00",X"00",X"00",X"00",X"0A",X"0E",X"00",X"00",X"C3",X"66",X"BC",X"E7",X"BC",X"66",X"C3",
X"F0",X"F8",X"3C",X"0C",X"04",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"00",X"C0",
X"A0",X"C0",X"E0",X"F0",X"70",X"38",X"18",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"F8",X"DC",X"0C",X"0C",X"1C",X"18",X"10",X"00",X"00",X"00",X"00",X"00",X"80",X"E8",X"F0",X"78",
X"00",X"40",X"88",X"70",X"E0",X"C0",X"80",X"00",X"80",X"40",X"E0",X"F0",X"F8",X"C4",X"20",X"00",
X"00",X"40",X"88",X"F0",X"E0",X"C0",X"80",X"00",X"80",X"40",X"E0",X"F0",X"B8",X"44",X"20",X"00",
X"F0",X"C0",X"80",X"E0",X"80",X"C0",X"F0",X"00",X"F0",X"80",X"C2",X"F5",X"C2",X"80",X"F0",X"00",
X"FE",X"D6",X"92",X"82",X"00",X"00",X"00",X"00",X"10",X"28",X"10",X"00",X"92",X"92",X"BA",X"FE",
X"7C",X"E0",X"C0",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"C0",X"E0",X"7C",X"F0",
X"0F",X"0C",X"10",X"00",X"00",X"00",X"00",X"00",X"70",X"38",X"1C",X"1C",X"0E",X"0E",X"07",X"07",
X"07",X"03",X"01",X"03",X"03",X"04",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"1C",X"1F",
X"00",X"00",X"01",X"02",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"07",X"0F",X"1C",X"00",
X"02",X"04",X"0E",X"1F",X"3F",X"47",X"08",X"01",X"00",X"04",X"22",X"1D",X"0F",X"07",X"02",X"01",
X"02",X"04",X"0F",X"1F",X"3B",X"45",X"08",X"01",X"00",X"04",X"23",X"1F",X"0F",X"07",X"02",X"01",
X"0F",X"01",X"43",X"AF",X"43",X"01",X"0F",X"00",X"0F",X"03",X"01",X"07",X"01",X"03",X"0F",X"00",
X"78",X"FA",X"DC",X"9F",X"BF",X"33",X"43",X"1E",X"1E",X"47",X"33",X"BF",X"9F",X"DC",X"FA",X"78",
X"00",X"00",X"01",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"01",X"00",X"00",X"01",
X"C0",X"00",X"00",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"00",X"00",X"C0",X"00",
X"E8",X"F0",X"60",X"40",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"00",X"00",X"20",X"C0",X"C4",
X"C4",X"C0",X"20",X"00",X"00",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"E0",X"F0",X"C8",
X"C8",X"F0",X"E0",X"40",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"00",X"00",X"20",X"C0",X"C4",
X"C4",X"C0",X"20",X"00",X"00",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"60",X"F0",X"E8",
X"C0",X"00",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"04",X"0C",X"3C",X"F8",X"F0",
X"38",X"70",X"F0",X"E0",X"C0",X"A0",X"00",X"00",X"00",X"00",X"00",X"00",X"08",X"08",X"18",X"18",
X"78",X"F0",X"E8",X"80",X"00",X"00",X"00",X"00",X"00",X"10",X"18",X"18",X"0C",X"0C",X"DC",X"F8",
X"07",X"0E",X"1C",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"1C",X"0E",X"07",X"1F",
X"23",X"03",X"04",X"00",X"00",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"02",X"07",X"0F",X"13",
X"17",X"0F",X"06",X"02",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"00",X"00",X"04",X"03",X"23",
X"23",X"03",X"04",X"00",X"00",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"02",X"06",X"0F",X"17",
X"13",X"0F",X"07",X"02",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"00",X"00",X"04",X"03",X"23",
X"07",X"07",X"0E",X"0E",X"1C",X"1C",X"38",X"70",X"00",X"00",X"00",X"00",X"20",X"10",X"0C",X"0F",
X"04",X"03",X"03",X"01",X"03",X"07",X"1F",X"7C",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",
X"00",X"1C",X"0F",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"02",X"01",X"00",X"00",
X"00",X"60",X"60",X"00",X"08",X"00",X"00",X"00",X"40",X"00",X"08",X"1C",X"08",X"00",X"00",X"00",
X"18",X"7E",X"CF",X"BD",X"BD",X"F3",X"7F",X"3C",X"08",X"24",X"01",X"84",X"50",X"09",X"22",X"08",
X"FF",X"FF",X"FE",X"FE",X"FC",X"FC",X"F8",X"E0",X"A1",X"29",X"23",X"B3",X"77",X"77",X"FF",X"FF",
X"FF",X"FF",X"77",X"77",X"B3",X"23",X"A9",X"25",X"E0",X"F8",X"FC",X"FC",X"FE",X"FE",X"FF",X"FF",
X"8C",X"C2",X"C0",X"F0",X"3A",X"38",X"0C",X"46",X"C4",X"80",X"FC",X"FF",X"F0",X"82",X"F0",X"38",
X"05",X"1C",X"78",X"F2",X"F0",X"C4",X"98",X"72",X"E2",X"80",X"0C",X"1E",X"1A",X"8C",X"00",X"00",
X"F8",X"78",X"B0",X"60",X"F3",X"DB",X"D8",X"30",X"0C",X"1E",X"0C",X"80",X"C0",X"C0",X"64",X"B2",
X"00",X"00",X"08",X"1C",X"3E",X"36",X"22",X"00",X"00",X"00",X"0E",X"1C",X"38",X"1C",X"0E",X"00",
X"00",X"00",X"3E",X"3E",X"3E",X"3E",X"3E",X"00",X"60",X"70",X"78",X"7C",X"3C",X"1C",X"0C",X"04",
X"20",X"30",X"38",X"1C",X"0E",X"06",X"02",X"00",X"00",X"10",X"38",X"7C",X"FE",X"7C",X"38",X"10",
X"FF",X"FF",X"7F",X"7F",X"3F",X"3F",X"1F",X"07",X"A4",X"85",X"D4",X"C6",X"EE",X"EF",X"FF",X"FF",
X"FF",X"FF",X"EF",X"EE",X"C6",X"D4",X"84",X"A5",X"07",X"1F",X"3F",X"3F",X"7F",X"7F",X"FF",X"FF",
X"3F",X"3D",X"2D",X"66",X"26",X"43",X"12",X"20",X"3B",X"3B",X"75",X"EE",X"F5",X"3B",X"7B",X"9F",
X"20",X"09",X"2C",X"84",X"44",X"ED",X"6D",X"7F",X"77",X"27",X"03",X"20",X"00",X"08",X"1C",X"08",
X"EF",X"F9",X"77",X"37",X"7C",X"DF",X"EB",X"7D",X"20",X"41",X"04",X"31",X"7B",X"7E",X"33",X"6F",
X"00",X"00",X"22",X"36",X"3E",X"1C",X"08",X"00",X"00",X"38",X"1C",X"0E",X"1C",X"38",X"00",X"00",
X"00",X"60",X"78",X"3C",X"1E",X"0E",X"06",X"00",X"00",X"38",X"38",X"38",X"18",X"18",X"38",X"38",
X"00",X"00",X"07",X"7F",X"FE",X"E0",X"00",X"00",X"03",X"07",X"77",X"DD",X"FF",X"F6",X"3C",X"00",
X"9E",X"F8",X"E0",X"70",X"38",X"7C",X"00",X"00",X"00",X"00",X"00",X"7C",X"38",X"70",X"E0",X"F8",
X"79",X"3F",X"67",X"0E",X"1C",X"38",X"7C",X"00",X"00",X"00",X"7C",X"38",X"1C",X"0E",X"67",X"3F",
X"90",X"20",X"40",X"80",X"00",X"00",X"00",X"00",X"34",X"34",X"34",X"64",X"68",X"68",X"C8",X"D0",
X"D0",X"C8",X"68",X"68",X"64",X"34",X"34",X"34",X"00",X"00",X"00",X"00",X"80",X"40",X"20",X"90",
X"34",X"64",X"C8",X"90",X"20",X"C0",X"00",X"00",X"0D",X"0D",X"0D",X"0D",X"19",X"1A",X"1A",X"32",
X"32",X"1A",X"1A",X"19",X"0D",X"0D",X"0D",X"0D",X"00",X"00",X"C0",X"20",X"90",X"C8",X"64",X"34",
X"09",X"04",X"02",X"01",X"00",X"00",X"00",X"00",X"2C",X"2C",X"2C",X"26",X"16",X"16",X"13",X"0B",
X"0B",X"03",X"06",X"06",X"26",X"2C",X"2C",X"2C",X"00",X"00",X"00",X"00",X"01",X"02",X"04",X"09",
X"2C",X"26",X"13",X"09",X"04",X"03",X"00",X"00",X"B0",X"B0",X"B0",X"B0",X"98",X"58",X"58",X"4C",
X"4C",X"58",X"50",X"98",X"B0",X"B0",X"B0",X"B0",X"00",X"00",X"03",X"04",X"09",X"13",X"26",X"2C",
X"03",X"1F",X"FC",X"E1",X"0E",X"F0",X"00",X"00",X"C0",X"F8",X"3F",X"87",X"70",X"0F",X"00",X"00",
X"00",X"00",X"0F",X"70",X"87",X"3F",X"F8",X"C0",X"00",X"00",X"F0",X"0E",X"E1",X"FC",X"1F",X"03",
X"00",X"00",X"01",X"0F",X"FE",X"F0",X"07",X"F8",X"00",X"00",X"80",X"F0",X"7F",X"0F",X"E0",X"1F",
X"1F",X"E0",X"0F",X"7F",X"F0",X"80",X"00",X"00",X"F8",X"07",X"F0",X"FE",X"0F",X"01",X"00",X"00");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity prom_ic40 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of prom_ic40 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"24",X"18",X"7E",X"18",X"24",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"24",X"42",X"42",X"3C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"3E",X"00",X"00",X"00",X"3E",X"00",X"00",X"00",X"00",X"00",X"F0",
X"00",X"00",X"00",X"7C",X"00",X"00",X"00",X"00",X"00",X"7C",X"00",X"00",X"00",X"00",X"F0",X"00",
X"00",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"00",X"00",X"00",X"F0",X"00",X"00",
X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"00",X"00",X"00",X"F0",X"00",X"00",X"00",
X"00",X"00",X"00",X"F0",X"00",X"00",X"00",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",
X"00",X"00",X"F0",X"00",X"00",X"00",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"00",
X"00",X"F0",X"00",X"00",X"00",X"00",X"7C",X"00",X"00",X"00",X"00",X"00",X"7C",X"00",X"00",X"00",
X"F0",X"00",X"00",X"00",X"00",X"00",X"3E",X"00",X"00",X"00",X"3E",X"00",X"00",X"00",X"00",X"00",
X"00",X"C0",X"00",X"00",X"00",X"00",X"FC",X"00",X"FC",X"00",X"00",X"00",X"00",X"C0",X"00",X"DC",
X"C0",X"00",X"00",X"00",X"FC",X"00",X"00",X"00",X"FC",X"00",X"00",X"00",X"C0",X"00",X"DC",X"00",
X"00",X"00",X"FC",X"00",X"00",X"00",X"00",X"00",X"FC",X"00",X"00",X"C0",X"00",X"DC",X"00",X"C0",
X"FC",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FC",X"00",X"C0",X"00",X"DC",X"00",X"C0",X"00",
X"00",X"C0",X"00",X"DC",X"00",X"C0",X"00",X"FC",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FC",
X"C0",X"00",X"DC",X"00",X"C0",X"00",X"00",X"FC",X"00",X"00",X"00",X"00",X"00",X"FC",X"00",X"00",
X"00",X"DC",X"00",X"C0",X"00",X"00",X"00",X"FC",X"00",X"00",X"00",X"FC",X"00",X"00",X"00",X"C0",
X"DC",X"00",X"C0",X"00",X"00",X"00",X"00",X"FC",X"00",X"FC",X"00",X"00",X"00",X"00",X"C0",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",
X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",
X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",
X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"0F",X"0F",X"00",X"00",X"00",X"00",X"0F",X"0F",X"00",X"00",
X"00",X"00",X"0F",X"0F",X"00",X"00",X"00",X"00",X"0F",X"0F",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"F0",X"F0",X"00",X"00",X"00",X"00",X"F0",X"F0",X"00",X"00",
X"00",X"00",X"F0",X"F0",X"00",X"00",X"00",X"00",X"F0",X"F0",X"00",X"00",X"00",X"00",X"00",X"00",
X"7E",X"CC",X"01",X"00",X"01",X"CC",X"7E",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",
X"01",X"00",X"01",X"1C",X"0E",X"FF",X"3E",X"00",X"00",X"00",X"00",X"00",X"3E",X"FF",X"0E",X"1C",
X"01",X"1C",X"0E",X"07",X"0F",X"3E",X"FC",X"00",X"FC",X"3E",X"0F",X"07",X"0E",X"1C",X"01",X"00",
X"0E",X"FF",X"3E",X"00",X"00",X"00",X"00",X"00",X"3E",X"FF",X"0E",X"1C",X"01",X"00",X"01",X"1C",
X"FF",X"1C",X"01",X"00",X"01",X"1C",X"FF",X"00",X"AA",X"82",X"C6",X"C6",X"C6",X"82",X"82",X"82",
X"FF",X"38",X"80",X"00",X"80",X"38",X"FF",X"00",X"82",X"82",X"82",X"C6",X"C6",X"C6",X"82",X"AA",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"0C",X"00",X"00",X"00",X"0C",X"00",X"00",X"1E",X"0C",X"01",X"00",X"01",X"00",X"1E",X"00",
X"01",X"06",X"0C",X"18",X"10",X"20",X"00",X"00",X"00",X"00",X"04",X"08",X"1A",X"33",X"60",X"80",
X"60",X"30",X"18",X"08",X"04",X"00",X"00",X"00",X"00",X"20",X"10",X"58",X"CC",X"06",X"01",X"00",
X"80",X"01",X"06",X"CC",X"58",X"10",X"20",X"00",X"00",X"00",X"00",X"04",X"08",X"18",X"30",X"60",
X"60",X"33",X"1A",X"08",X"04",X"00",X"00",X"00",X"00",X"20",X"10",X"18",X"0C",X"06",X"01",X"00",
X"03",X"03",X"03",X"06",X"0E",X"1C",X"F8",X"E0",X"E0",X"F8",X"1C",X"0E",X"06",X"03",X"03",X"03",
X"C6",X"82",X"82",X"82",X"00",X"00",X"10",X"00",X"00",X"00",X"00",X"00",X"AA",X"82",X"C6",X"C6",
X"C0",X"C0",X"C0",X"60",X"70",X"38",X"1F",X"07",X"07",X"1F",X"38",X"70",X"60",X"C0",X"C0",X"C0",
X"00",X"00",X"00",X"00",X"0A",X"11",X"11",X"0E",X"00",X"00",X"00",X"80",X"3C",X"80",X"00",X"00",
X"F0",X"F8",X"3C",X"0C",X"04",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"00",X"C0",
X"90",X"00",X"20",X"70",X"70",X"38",X"18",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"20",
X"18",X"1C",X"0C",X"0C",X"1C",X"18",X"10",X"00",X"00",X"00",X"00",X"00",X"88",X"E4",X"C0",X"08",
X"40",X"20",X"08",X"30",X"60",X"C0",X"80",X"00",X"80",X"40",X"60",X"30",X"18",X"04",X"00",X"00",
X"00",X"00",X"08",X"30",X"60",X"C0",X"80",X"00",X"80",X"40",X"60",X"30",X"18",X"04",X"10",X"20",
X"F0",X"C0",X"10",X"00",X"10",X"C0",X"F0",X"00",X"F0",X"80",X"02",X"07",X"02",X"80",X"F0",X"00",
X"C6",X"C6",X"82",X"AA",X"00",X"00",X"00",X"00",X"10",X"38",X"10",X"00",X"82",X"82",X"82",X"C6",
X"00",X"C0",X"C0",X"F8",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"F8",X"C0",X"E0",X"00",X"00",
X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"70",X"38",X"1C",X"1C",X"0E",X"0E",X"04",X"00",
X"07",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"1C",X"1F",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"07",X"0F",X"1C",X"00",
X"02",X"04",X"0C",X"18",X"30",X"40",X"00",X"00",X"04",X"08",X"20",X"18",X"0C",X"06",X"02",X"01",
X"02",X"04",X"0C",X"18",X"30",X"40",X"10",X"09",X"00",X"00",X"20",X"18",X"0C",X"06",X"02",X"01",
X"0F",X"01",X"40",X"E0",X"40",X"01",X"0F",X"00",X"0F",X"03",X"08",X"00",X"08",X"03",X"0F",X"00",
X"7A",X"F9",X"D0",X"83",X"87",X"03",X"03",X"1E",X"1E",X"07",X"03",X"87",X"83",X"D0",X"F9",X"7A",
X"02",X"00",X"01",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"01",X"00",X"02",X"00",
X"00",X"00",X"00",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"00",X"00",X"00",X"00",
X"28",X"70",X"60",X"40",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"00",X"20",X"10",X"00",X"00",
X"04",X"00",X"00",X"00",X"00",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"E0",X"70",X"08",
X"08",X"70",X"E0",X"40",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"00",X"00",X"00",X"00",X"04",
X"04",X"00",X"10",X"20",X"00",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"60",X"70",X"28",
X"C0",X"00",X"40",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"04",X"0C",X"3C",X"F8",X"F0",
X"38",X"70",X"70",X"20",X"00",X"10",X"20",X"00",X"00",X"00",X"00",X"00",X"08",X"08",X"18",X"18",
X"08",X"C0",X"E4",X"88",X"00",X"00",X"00",X"00",X"00",X"10",X"18",X"18",X"0C",X"0C",X"1C",X"18",
X"20",X"0E",X"1C",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"3F",X"1C",X"0E",X"20",X"00",
X"20",X"00",X"00",X"00",X"00",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"02",X"07",X"0E",X"10",
X"14",X"0E",X"06",X"02",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"00",X"04",X"08",X"00",X"00",
X"20",X"00",X"08",X"04",X"00",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"02",X"06",X"0E",X"14",
X"10",X"0E",X"07",X"02",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"00",X"00",X"00",X"00",X"20",
X"00",X"04",X"0E",X"0E",X"1C",X"1C",X"38",X"70",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"01",
X"00",X"00",X"00",X"00",X"03",X"07",X"1F",X"7C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"1C",X"0F",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"04",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"02",X"08",X"1C",X"08",X"00",X"00",X"00",
X"00",X"10",X"78",X"62",X"46",X"0E",X"1C",X"00",X"00",X"04",X"10",X"80",X"00",X"08",X"02",X"00",
X"03",X"03",X"06",X"0E",X"3C",X"FC",X"F8",X"E0",X"00",X"08",X"00",X"01",X"00",X"01",X"01",X"01",
X"01",X"01",X"01",X"00",X"01",X"00",X"08",X"00",X"E0",X"F8",X"FC",X"3C",X"0E",X"06",X"03",X"03",
X"0C",X"80",X"40",X"20",X"10",X"08",X"00",X"42",X"C4",X"80",X"E0",X"FA",X"C0",X"80",X"60",X"10",
X"00",X"08",X"10",X"22",X"C0",X"80",X"88",X"20",X"00",X"00",X"00",X"0C",X"0C",X"00",X"00",X"00",
X"E0",X"E0",X"C0",X"80",X"C3",X"E0",X"E0",X"C0",X"00",X"0C",X"00",X"00",X"00",X"80",X"80",X"C2",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"C0",X"C0",X"60",X"70",X"3C",X"3F",X"1F",X"07",X"00",X"10",X"00",X"80",X"00",X"80",X"80",X"80",
X"80",X"80",X"80",X"00",X"80",X"00",X"10",X"00",X"07",X"1F",X"3F",X"3C",X"70",X"60",X"C0",X"C0",
X"1B",X"19",X"20",X"24",X"00",X"42",X"10",X"00",X"1F",X"1F",X"3F",X"FF",X"3F",X"3F",X"5F",X"0E",
X"00",X"00",X"24",X"80",X"44",X"45",X"2B",X"2F",X"03",X"00",X"00",X"20",X"00",X"00",X"08",X"00",
X"3F",X"3F",X"1F",X"1F",X"1F",X"3F",X"3F",X"03",X"00",X"40",X"04",X"00",X"00",X"19",X"1F",X"1F",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"60",X"78",X"3C",X"1E",X"0E",X"06",X"00",X"00",X"38",X"38",X"38",X"18",X"18",X"38",X"38",
X"00",X"00",X"07",X"7F",X"FE",X"E0",X"00",X"00",X"03",X"07",X"77",X"DD",X"FF",X"F6",X"3C",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"70",X"E0",X"C0",X"80",X"00",X"00",X"00",X"00",X"0C",X"0C",X"0C",X"1C",X"18",X"18",X"38",X"30",
X"30",X"38",X"18",X"18",X"1C",X"0C",X"0C",X"0C",X"00",X"00",X"00",X"00",X"80",X"C0",X"E0",X"70",
X"0C",X"1C",X"38",X"70",X"E0",X"C0",X"00",X"00",X"03",X"03",X"03",X"03",X"07",X"06",X"06",X"0E",
X"0E",X"06",X"06",X"07",X"03",X"03",X"03",X"03",X"00",X"00",X"C0",X"E0",X"70",X"38",X"1C",X"0C",
X"0E",X"07",X"03",X"01",X"00",X"00",X"00",X"00",X"30",X"30",X"30",X"38",X"18",X"18",X"1C",X"0C",
X"0C",X"1C",X"18",X"18",X"38",X"30",X"30",X"30",X"00",X"00",X"00",X"00",X"01",X"03",X"07",X"0E",
X"30",X"38",X"1C",X"0E",X"07",X"03",X"00",X"00",X"C0",X"C0",X"C0",X"C0",X"E0",X"60",X"60",X"70",
X"70",X"60",X"60",X"E0",X"C0",X"C0",X"C0",X"C0",X"00",X"00",X"03",X"07",X"0E",X"1C",X"38",X"30",
X"00",X"00",X"03",X"1F",X"FE",X"F0",X"00",X"00",X"00",X"00",X"C0",X"F8",X"7F",X"0F",X"00",X"00",
X"00",X"00",X"0F",X"7F",X"F8",X"C0",X"00",X"00",X"00",X"00",X"F0",X"FE",X"1F",X"03",X"00",X"00",
X"00",X"00",X"00",X"00",X"01",X"0F",X"FF",X"F8",X"00",X"00",X"00",X"00",X"80",X"F0",X"7F",X"1F",
X"1F",X"FF",X"F0",X"80",X"00",X"00",X"00",X"00",X"F8",X"FF",X"0F",X"01",X"00",X"00",X"00",X"00");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,30 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity prom_palette_ic40 is
port (
clk : in std_logic;
addr : in std_logic_vector(6 downto 0);
data : out std_logic_vector(2 downto 0)
);
end entity;
architecture prom of prom_palette_ic40 is
type rom is array(0 to 127) of std_logic_vector(2 downto 0);
signal rom_data: rom := (
"000","000","000","000","000","000","000","000","010","010","100","010","101","010","010","010",
"000","001","010","000","010","001","001","001","000","001","001","001","110","100","100","100",
"000","000","000","000","000","000","000","000","100","001","001","011","011","011","001","000",
"010","101","101","001","001","001","111","000","110","111","111","101","101","101","011","111",
"000","000","000","000","000","000","000","000","010","010","100","010","001","001","001","001",
"000","001","010","000","010","010","010","010","000","001","001","001","100","100","100","100",
"000","000","000","000","000","000","000","000","100","001","001","100","100","100","011","100",
"010","101","101","101","101","101","111","000","101","111","111","011","011","011","101","111");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,30 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity prom_palette_ic41 is
port (
clk : in std_logic;
addr : in std_logic_vector(6 downto 0);
data : out std_logic_vector(2 downto 0)
);
end entity;
architecture prom of prom_palette_ic41 is
type rom is array(0 to 127) of std_logic_vector(2 downto 0);
signal rom_data: rom := (
"000","000","000","000","000","000","000","000","010","110","101","011","101","110","110","110",
"001","011","011","110","010","011","011","011","111","101","101","011","111","101","101","101",
"000","000","000","000","000","000","000","000","110","001","001","011","011","011","001","100",
"110","101","101","111","111","111","111","011","110","111","111","101","101","101","011","111",
"000","000","000","000","000","000","000","000","010","010","101","011","011","011","011","011",
"001","011","011","110","110","110","110","110","101","101","101","011","101","101","101","101",
"000","000","000","000","000","000","000","000","110","001","001","100","100","100","011","100",
"110","101","101","101","101","101","111","011","101","111","111","111","111","111","101","111");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,35 +0,0 @@
# ================================================================================
#
# Build ID Verilog Module Script
# Jeff Wiencrot - 8/1/2011
#
# Generates a Verilog module that contains a timestamp,
# from the current build. These values are available from the build_date, build_time,
# physical_address, and host_name output ports of the build_id module in the build_id.v
# Verilog source file.
#
# ================================================================================
proc generateBuildID_Verilog {} {
# Get the timestamp (see: http://www.altera.com/support/examples/tcl/tcl-date-time-stamp.html)
set buildDate [ clock format [ clock seconds ] -format %y%m%d ]
set buildTime [ clock format [ clock seconds ] -format %H%M%S ]
# Create a Verilog file for output
set outputFileName "rtl/build_id.v"
set outputFile [open $outputFileName "w"]
# Output the Verilog source
puts $outputFile "`define BUILD_DATE \"$buildDate\""
puts $outputFile "`define BUILD_TIME \"$buildTime\""
close $outputFile
# Send confirmation message to the Messages window
post_message "Generated build identification Verilog module: [pwd]/$outputFileName"
post_message "Date: $buildDate"
post_message "Time: $buildTime"
}
# Comment out this line to prevent the process from automatically executing when the file is sourced:
generateBuildID_Verilog

View File

@@ -1,230 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix sound effect1 by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
-- this module generates sound how the birds fly
-- how they burn and the ship's barrier activation sound
-- it is most often heard module througut all levels of the game
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
use ieee.math_real.all;
entity phoenix_effect1 is
generic(
-- Command
Cmd_Fs: real := 11.0; -- MHz
Cmd_V: real := 12.0; -- V
Cmd_Vd: real := 0.46; -- V
Cmd_Vce: real := 0.2; -- V
Cmd_R1: real := 100.0; -- k
Cmd_R2: real := 33.0; -- k
Cmd_R3: real := 0.47; -- k
Cmd_C: real := 6.8; -- uF
Cmd_Div2n: integer := 8; -- bits divisor
Cmd_bits: integer := 16; -- bits counter
-- Oscillator
Osc_Fs: real := 11.0; -- MHz
Osc_Vb: real := 5.0; -- V
Osc_Vce: real := 0.2; -- V
Osc_R1: real := 47.0; -- k
Osc_R2: real := 47.0; -- k
Osc_C: real := 0.001; -- uF
Osc_Div2n: integer := 7; -- bits divisor
Osc_bits: integer := 6; -- bits counter
-- Filter
Filt_Fs: real := 11.0; -- MHz
Filt_V1: real := 5.0; -- V
Filt_V2: real := 0.0; -- V
Filt_R1: real := 100.0; -- k
Filt_R2: real := 10.0; -- k
Filt_C: real := 0.047; -- uF
Filt_Div2n: integer := 7; -- bits divisor
Filt_bits: integer := 8; -- bits counter
Vmax: real := 5.0; -- V
Vmax_bits: integer := 16 -- number of bits to represent vmax
);
port(
clk : in std_logic;
reset : in std_logic;
trigger : in std_logic;
filter : in std_logic;
divider : in std_logic_vector(3 downto 0);
snd : out std_logic_vector(7 downto 0)
);
end phoenix_effect1;
architecture struct of phoenix_effect1 is
-- integer representation of voltage, full range
constant IVmax: integer := integer(2**Vmax_bits)-1;
-- command --
constant Cmd_div: integer := integer(2**Cmd_Div2n);
-- command charge
constant Cmd_VFc: real := (Cmd_V*Cmd_R2 + Cmd_Vd*Cmd_R1)/(Cmd_R1 + Cmd_R2); -- V
constant Cmd_RCc: real := Cmd_R1*Cmd_R2/(Cmd_R1 + Cmd_R2)*Cmd_C/1000.0; -- s
constant Cmd_ikc: integer := integer(Cmd_Fs * 1.0E6 * Cmd_RCc / 2.0**Cmd_Div2n);
constant Cmd_iVFc: integer := integer(Cmd_VFc * real(IVmax)/Vmax);
-- command discharge
constant Cmd_VFd: real := (Cmd_V/Cmd_R1+Cmd_Vd/Cmd_R2+(Cmd_Vd+Cmd_Vce)/Cmd_R3)/(1.0/Cmd_R1+1.0/Cmd_R2+1.0/Cmd_R3); -- V
constant Cmd_RCd: real := 1.0/(1.0/Cmd_R1+1.0/Cmd_R2+1.0/Cmd_R3)*Cmd_C/1000.0; -- s
constant Cmd_ikd: integer := integer(Cmd_Fs * 1.0E6 * Cmd_RCd / 2.0**Cmd_Div2n);
constant Cmd_iVFd: integer := integer(Cmd_VFd * real(IVmax)/Vmax);
-- oscillator
constant Osc_div: integer := integer(2**Osc_Div2n);
-- oscillator charge
constant Osc_VFc: real := Osc_Vb; -- V
constant Osc_RCc: real := (Osc_R1+Osc_R2)*Osc_C/1000.0; -- s
constant Osc_ikc: integer := integer(Osc_Fs * 1.0E6 * Osc_RCc / 2.0**Osc_Div2n);
constant Osc_iVFc: integer := integer(Osc_VFc * real(IVmax)/Vmax);
-- oscillator discharge
constant Osc_VFd: real := Osc_Vce; -- V
constant Osc_RCd: real := Osc_R2*Osc_C/1000.0; -- s
constant Osc_ikd: integer := integer(Osc_Fs * 1.0E6 * Osc_RCd / 2.0**Osc_Div2n);
constant Osc_iVFd: integer := integer(Osc_VFd * real(IVmax)/Vmax);
-- filter
constant Filt_div: integer := integer(2**Filt_Div2n);
-- filter charge
constant Filt_VFc: real := Filt_V1; -- V
constant Filt_RCc: real := 1.0/(1.0/Filt_R1+1.0/Filt_R2)*Filt_C/1000.0; -- s
constant Filt_ikc: integer := integer(Filt_Fs * 1.0E6 * Filt_RCc / 2.0**Filt_Div2n);
constant Filt_iVFc: integer := integer(Filt_VFc * real(IVmax)/Vmax);
-- filter discharge
constant Filt_VFd: real := Filt_V2; -- V
constant Filt_RCd: real := Filt_RCc; -- s
constant Filt_ikd: integer := integer(Filt_Fs * 1.0E6 * Filt_RCd / 2.0**Filt_Div2n);
constant Filt_iVFd: integer := integer(Filt_VFd * real(IVmax)/Vmax);
function imax(x,y: integer) return integer is begin
if x > y then
return x;
else
return y;
end if;
end imax;
signal u_c1 : unsigned(15 downto 0) := (others => '0');
signal u_c2 : unsigned(15 downto 0) := (others => '0');
signal flip : std_logic := '0';
signal u_cf : unsigned(15 downto 0) := (others => '0');
signal sound : std_logic := '0';
begin
-- Commande
-- R1 = 100k, R2 = 33k, R3 = 0.47k C=6.8e-6 SR=10MHz
-- Charge : VF1 = 43559, k1 = 6591 (R1//R2)
-- Decharge : VF2 = 9300, k2 = 123 (R1//R2//R3)
-- Div = 2^8
process (clk)
variable cnt: integer range 0 to imax(Cmd_ikc,Cmd_ikd) := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c1 <= (others => '0');
else
cnt := cnt + 1;
if trigger = '1' then
if cnt = Cmd_ikc then
cnt := 0;
u_c1 <= u_c1 + (Cmd_iVFc - u_c1)/Cmd_div;
end if;
else
if cnt = Cmd_ikd then
cnt := 0;
u_c1 <= u_c1 - (u_c1 - Cmd_iVFd)/Cmd_div;
end if;
end if;
end if;
end if;
end process;
-- Oscillateur
-- R1 = 47k, R2 = 47k, C=0.001e-6 SR=50MHz
-- Charge : VF1 = 65535, k1 = 37 (R1+R2)
-- Decharge : VF2 = 2621, k2 = 18 (R2)
-- Div = 2^7
-- Diviseur
-- LS163 : Count up, Sync load when 0xF (no toggle sound if divider = 0xF)
-- LS74 : Divide by 2
process (clk)
variable cnt: integer range 0 to imax(Osc_ikc,Osc_ikd) := 0;
variable cnt2: unsigned(3 downto 0) := (others => '0');
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c2 <= (others => '0');
flip <= '0';
else
if u_c2 > u_c1 then flip <= '0'; end if;
if u_c2 < u_c1/2 then
flip <= '1';
if flip = '0' then
cnt2 := cnt2 + 1;
if cnt2 = "0000" then
cnt2 := unsigned(divider);
if divider /= "1111" then sound <= not sound; end if;
end if;
end if;
end if;
cnt := cnt + 1;
if flip = '1' then
if cnt = Osc_ikc then
cnt := 0;
u_c2 <= u_c2 + (Osc_iVFc - u_c2)/Osc_div;
end if;
else
if cnt = Osc_ikd then
cnt := 0;
u_c2 <= u_c2 - (u_c2 - Osc_iVFd)/Osc_div;
end if;
end if;
end if;
end if;
end process;
-- filter
-- R1 = 10k, R2 = 100k, C=0.047e-6, SR=10MHz
-- Charge : VF1= 65535, k1 = 33 (R1//R2)
-- Decharge : VF2= 0 , k2 = 33 (R1//R2)
-- Div = 2^7
process (clk)
variable cnt: integer range 0 to imax(Filt_ikc,Filt_ikd) := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_cf <= (others => '0');
else
cnt := cnt + 1;
if sound = '1' then
if cnt = Filt_ikc then
cnt := 0;
u_cf <= u_cf + (Filt_iVFc - u_cf)/Filt_div;
end if;
else
if cnt = Filt_ikd then
cnt := 0;
u_cf <= u_cf - (u_cf - Filt_iVFd)/Filt_div;
end if;
end if;
end if;
end if;
end process;
with filter select snd <= std_logic_vector(u_cf(15 downto 8)) when '1', sound&"0000000" when others;
end struct;

View File

@@ -1,387 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix sound effect2 by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
-- this module outputs sound of mothership's descend
-- it could be heard at beginning of level 5
-- the prrrrr...vioooouuuuu sound
-- fixme:
-- the VCO control levels are too coarse (quantized)
-- frequency transitions are heard in large steps
-- instead of continous sweep
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
use ieee.math_real.all;
entity phoenix_effect2 is
generic(
-- Oscillator 1
Osc1_Fs: real := 11.0; -- MHz
Osc1_Vb: real := 5.0; -- V
Osc1_Vce: real := 0.2; -- V
Osc1_R1: real := 47.0; -- k
Osc1_R2: real := 100.0; -- k
Osc1_C1: real := 0.01; -- uF
Osc1_C2: real := 0.47; -- uF
Osc1_C3: real := 1.0; -- uF
Osc1_Div2n: integer := 8; -- bits divisor
Osc1_bits: integer := 16; -- bits counter
-- Oscillator 2
Osc2_Fs: real := 11.0; -- MHz
Osc2_Vb: real := 5.0; -- V
Osc2_Vce: real := 0.2; -- V
Osc2_R1: real := 510.0; -- k
Osc2_R2: real := 510.0; -- k
Osc2_C: real := 1.0; -- uF
Osc2_Div2n: integer := 8; -- bits divisor
Osc2_bits: integer := 17; -- bits counter
-- Filter 2
Filt2_Fs: real := 11.0; -- MHz
Filt2_V: real := 5.0; -- V
Filt2_R1: real := 10.0; -- k
Filt2_R2: real := 5.1; -- k
Filt2_R3: real := 5.1; -- k
Filt2_R4: real := 5.0; -- k
Filt2_R5: real := 10.0; -- k
Filt2_C: real := 100.0; -- uF
Filt2_Div2n: integer := 8; -- bits divisor
Filt2_bits: integer := 16; -- bits counter
-- Oscillator 3
Osc3_Fs: real := 11.0; -- MHz
Osc3_Vb: real := 5.0; -- V
Osc3_Vce: real := 0.2; -- V
Osc3_R1: real := 20.0; -- k
Osc3_R2: real := 20.0; -- k
Osc3_C: real := 0.001; -- uF
Osc3_Div2n: integer := 6; -- bits divisor
Osc3_bits: integer := 6; -- bits counter
C_flip1_0: integer := 22020;
C_flip1_1: integer := 33063;
C_flip1_scale: integer := 84; -- ??
Vmax: real := 5.0; -- V
Vmax_bits: integer := 16 -- number of bits to represent Vmax
);
port(
clk : in std_logic;
reset : in std_logic;
trigger1 : in std_logic;
trigger2 : in std_logic;
divider : in std_logic_vector(3 downto 0);
snd : out std_logic_vector(1 downto 0)
);
end phoenix_effect2;
architecture struct of phoenix_effect2 is
function imax(x,y: integer) return integer is begin
if x > y then
return x;
else
return y;
end if;
end imax;
-- integer representation of voltage, full range
constant IVmax: integer := integer(2**Vmax_bits)-1;
-- Oscillator1 --
constant Osc1_div: integer := integer(2**Osc1_Div2n);
-- Oscillator1 charge/discharge voltages
constant Osc1_VFc: real := Osc1_Vb; -- V
constant Osc1_iVFc: integer := integer(Osc1_VFc * real(IVmax)/Vmax);
constant Osc1_VFd: real := Osc1_Vce; -- V
constant Osc1_iVFd: integer := integer(Osc1_VFd * real(IVmax)/Vmax);
-- Oscillator1 charge/discharge time constants
constant Osc1_T0_RCc: real := (Osc1_R1+Osc1_R2)*Osc1_C1/1000.0; -- s
constant Osc1_T0_ikc: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T0_RCc / 2.0**Osc1_Div2n);
constant Osc1_T0_RCd: real := Osc1_R2*Osc1_C1/1000.0; -- s
constant Osc1_T0_ikd: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T0_RCd / 2.0**Osc1_Div2n);
constant Osc1_T1_RCc: real := (Osc1_R1+Osc1_R2)*(Osc1_C1+Osc1_C2)/1000.0; -- s
constant Osc1_T1_ikc: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T1_RCc / 2.0**Osc1_Div2n);
constant Osc1_T1_RCd: real := Osc1_R2*(Osc1_C1+Osc1_C2)/1000.0; -- s
constant Osc1_T1_ikd: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T1_RCd / 2.0**Osc1_Div2n);
constant Osc1_T2_RCc: real := (Osc1_R1+Osc1_R2)*(Osc1_C1+Osc1_C3)/1000.0; -- s
constant Osc1_T2_ikc: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T2_RCc / 2.0**Osc1_Div2n);
constant Osc1_T2_RCd: real := Osc1_R2*(Osc1_C1+Osc1_C3)/1000.0; -- s
constant Osc1_T2_ikd: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T2_RCd / 2.0**Osc1_Div2n);
constant Osc1_T3_RCc: real := (Osc1_R1+Osc1_R2)*(Osc1_C1+Osc1_C2+Osc1_C3)/1000.0; -- s
constant Osc1_T3_ikc: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T3_RCc / 2.0**Osc1_Div2n);
constant Osc1_T3_RCd: real := Osc1_R2*(Osc1_C1+Osc1_C2+Osc1_C3)/1000.0; -- s
constant Osc1_T3_ikd: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T3_RCd / 2.0**Osc1_Div2n);
constant Osc1_ik_max: integer := imax( imax(Osc1_T1_ikc,Osc1_T1_ikd), imax(Osc1_T3_ikc,Osc1_T3_ikd));
-- Oscillator2 --
constant Osc2_div: integer := integer(2**Osc2_Div2n);
-- Oscillator2 charge/discharge voltages
constant Osc2_VFc: real := Osc2_Vb; -- V
constant Osc2_iVFc: integer := integer(Osc2_VFc * real(IVmax)/Vmax);
constant Osc2_VFd: real := Osc2_Vce; -- V
constant Osc2_iVFd: integer := integer(Osc2_VFd * real(IVmax)/Vmax);
-- Oscillator2 charge/discharge time constants
constant Osc2_RCc: real := (Osc2_R1+Osc2_R2)*Osc2_C/1000.0; -- s
constant Osc2_ikc: integer := integer(Osc2_Fs * 1.0E6 * Osc2_RCc / 2.0**Osc2_Div2n);
constant Osc2_RCd: real := Osc2_R2*Osc2_C/1000.0; -- s
constant Osc2_ikd: integer := integer(Osc2_Fs * 1.0E6 * Osc2_RCd / 2.0**Osc2_Div2n);
-- Filter2 --
constant Filt2_div: integer := integer(2**Filt2_Div2n);
constant Filt2_R4p: real := 1.0/(1.0/Filt2_R1+1.0/Filt2_R4); -- k
constant Filt2_R5p: real := 1.0/(1.0/Filt2_R1+1.0/Filt2_R5); -- k
constant Filt2_Rp: real := 1.0/(1.0/Filt2_R3+1.0/Filt2_R4+1.0/Filt2_R5p); -- k
constant Filt2_Rs: real := 1.0/(1.0/Filt2_R2+1.0/Filt2_R3-Filt2_Rp/(Filt2_R3**2)); -- k
constant Filt2_RC: real := Filt2_Rs*Filt2_C/1000.0; -- s
constant Filt2_ik: integer := integer(Filt2_Fs*1.0E6*Filt2_RC / 2.0**Filt2_Div2n);
-- Filter2 voltages
constant Filt2_V0: real := Filt2_V*Filt2_Rp*Filt2_Rs/(Filt2_R3*Filt2_R4); -- V
constant Filt2_iV0: integer := integer(Filt2_V0 * real(IVmax)/Vmax);
constant Filt2_V1: real := Filt2_V*Filt2_Rp*Filt2_Rs/(Filt2_R4p*Filt2_R3); -- V
constant Filt2_iV1: integer := integer(Filt2_V1 * real(IVmax)/Vmax);
constant Filt2_V2: real := Filt2_V*Filt2_Rp*Filt2_Rs/(Filt2_R3*Filt2_R4)+Filt2_V*Filt2_Rs/Filt2_R2; -- V
constant Filt2_iV2: integer := integer(Filt2_V2 * real(IVmax)/Vmax);
constant Filt2_V3: real := Filt2_V*Filt2_Rp*Filt2_Rs/(Filt2_R3*Filt2_R4p)+Filt2_V*Filt2_Rs/Filt2_R2; -- V
constant Filt2_iV3: integer := integer(Filt2_V3 * real(IVmax)/Vmax);
-- Oscillator3 --
constant Osc3_div: integer := integer(2**Osc3_Div2n);
-- Oscillator3 charge/discharge voltages
constant Osc3_VFc: real := Osc3_Vb; -- V
constant Osc3_iVFc: integer := integer(Osc3_VFc * real(IVmax)/Vmax);
constant Osc3_VFd: real := Osc3_Vce; -- V
constant Osc3_iVFd: integer := integer(Osc3_VFd * real(IVmax)/Vmax);
-- Oscillator3 charge/discharge time constants
constant Osc3_RCc: real := (Osc3_R1+Osc3_R2)*Osc3_C/1000.0; -- s
constant Osc3_ikc: integer := integer(Osc3_Fs * 1.0E6 * Osc3_RCc / 2.0**Osc3_Div2n);
constant Osc3_RCd: real := Osc3_R2*Osc3_C/1000.0; -- s
constant Osc3_ikd: integer := integer(Osc3_Fs * 1.0E6 * Osc3_RCd / 2.0**Osc3_Div2n);
signal u_c1 : unsigned(15 downto 0) := (others => '0');
signal u_c2 : unsigned(15 downto 0) := (others => '0');
signal u_c3 : unsigned(16 downto 0) := (others => '0');
signal flip1 : std_logic := '0';
signal flip2 : std_logic := '0';
signal flip3 : std_logic := '0';
signal triggers : std_logic_vector(1 downto 0) := "00";
--signal kc : unsigned(15 downto 0) := (others =>'0');
--signal kd : unsigned(15 downto 0) := (others =>'0');
signal kc : integer range 0 to Osc1_ik_max;
signal kd : integer range 0 to Osc1_ik_max;
signal u_cf : unsigned(15 downto 0) := (others => '0');
signal flips : std_logic_vector(1 downto 0) := "00";
signal vf : unsigned(15 downto 0) := (others =>'0');
signal u_cf_scaled : unsigned(23 downto 0) := (others => '0');
signal u_ctrl : unsigned(15 downto 0) := (others => '0');
signal sound: std_logic := '0';
begin
-- Oscillateur1
-- R1 = 47k, R2 = 100k, C1=0.01e-6, C2=0.047e-6, C3=1.000e-6 SR=10MHz
-- Div = 2^8
-- trigger = 00
-- Charge : VF1 = 65535, k1 = 57 (R1+R2, C1)
-- Decharge : VF2 = 2621, k2 = 39 (R2, C1)
-- trigger = 01
-- Charge : VF1 = 65535, k1 = 2756 (R1+R2, C1+C2)
-- Decharge : VF2 = 2621, k2 = 1875 (R2, C1+C2)
-- trigger = 10
-- Charge : VF1 = 65535, k1 = 5800 (R1+R2, C1+C3)
-- Decharge : VF2 = 2621, k2 = 3945 (R2, C1+C3)
-- trigger = 11
-- Charge : VF1 = 65535, k1 = 8498 (R1+R2, C1+C2+C3)
-- Decharge : VF2 = 2621, k2 = 5781 (R2, C1+C2+C3)
triggers <= trigger2 & trigger1;
with triggers select
kc <= Osc1_T0_ikc when "00",
Osc1_T1_ikc when "01",
Osc1_T2_ikc when "10",
Osc1_T3_ikc when others;
with triggers select
kd <= Osc1_T0_ikd when "00",
Osc1_T1_ikd when "01",
Osc1_T2_ikd when "10",
Osc1_T3_ikd when others;
process (clk)
variable cnt: integer range 0 to Osc1_ik_max := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c1 <= (others => '0');
else
if u_c1 > X"AAAA" then flip1 <= '0'; end if;
if u_c1 < X"5555" then flip1 <= '1'; end if;
cnt := cnt + 1;
if flip1 = '1' then
if cnt = kc then
cnt := 0;
u_c1 <= u_c1 + (Osc1_iVFc - u_c1)/Osc1_div;
end if;
else
if cnt = kd then
cnt := 0;
u_c1 <= u_c1 - (u_c1 - Osc1_iVFd)/Osc1_div;
end if;
end if;
end if;
end if;
end process;
-- Oscillateur2
-- R1 = 510k, R2 = 510k, C=1.000e-6, SR=10MHz
-- Charge : VF1 = 65535, k1 = 39844 (R1+R2, C)
-- Decharge : VF2 = 2621, k2 = 19922 (R2, C)
-- Div = 2^8
process (clk)
variable cnt: integer range 0 to imax(Osc2_ikc,Osc2_ikd) := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c2 <= (others => '0');
else
if u_c2 > X"AAAA" then flip2 <= '0'; end if;
if u_c2 < X"5555" then flip2 <= '1'; end if;
cnt := cnt + 1;
if flip2 = '1' then
if cnt = Osc2_ikc then
cnt := 0;
u_c2 <= u_c2 + (Osc2_iVFc - u_c2)/Osc2_div;
end if;
else
if cnt = Osc2_ikd then
cnt := 0;
u_c2 <= u_c2 - (u_c2 - Osc2_iVFd)/Osc2_div;
end if;
end if;
end if;
end if;
end process;
-- Filtre
-- V1 = 5V
-- R1 = 10k, R2 = 5.1k, R3 = 5.1k, R4 = 5k, R5 = 10k, C=100.0e-6, SR=10MHz
-- Rp = R3//R4//R4//R1 = 1.68k
-- Rs = 1/(1/R2 + 1/R3 - Rp/(R3*R3)) = 3.05k
-- k = 11922 (Rs*C)
-- Div = 2^8
-- VF00 = 13159 (V*Rp*Rs)/(R4*R3)
-- VF01 = 19738 (V*Rp*Rs)/(R4p*R3)
-- VF10 = 52377 (V*Rp*Rs)/(R4*R3) + V*Rs/R2
-- VF11 = 58957 (V*Rp*Rs)/(R4p*R3) + V*Rs/R2
flips <= flip2 & flip1;
with flips select
vf <= to_unsigned(Filt2_iV0,16) when "00",
to_unsigned(Filt2_iV1,16) when "01",
to_unsigned(Filt2_iV2,16) when "10",
to_unsigned(Filt2_iV3,16) when others;
process (clk)
variable cnt: integer range 0 to Filt2_ik := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_cf <= (others => '0');
else
cnt := cnt + 1;
if vf > u_cf then
if cnt = Filt2_ik then
cnt := 0;
u_cf <= u_cf + (vf - u_cf)/Filt2_div;
end if;
else
if cnt = Filt2_ik then
cnt := 0;
u_cf <= u_cf - (u_cf - vf)/Filt2_div;
end if;
end if;
end if;
end if;
end process;
-- U_CTRL
-- flip1 = 0 u_ctrl = 5V*Rp/R4 + u_cf*Rp/R3 # 22020 + u_cf*84/256
-- flip1 = 1 u_ctrl = 5V*Rp/R4p + u_cf*Rp/R3 # 33063 + u_cf*84/256
u_cf_scaled <= u_cf*to_unsigned(C_flip1_scale,8);
with flip1 select
u_ctrl <= to_unsigned(C_flip1_0,16)+u_cf_scaled(23 downto 8) when '0',
to_unsigned(C_flip1_1,16)+u_cf_scaled(23 downto 8) when others;
-- Oscillateur3
-- R1 = 20k, R2 = 20k, C=0.001e-6 SR=50MHz
-- Charge : VF1 = 65535, k1 = 31 (R1+R2)
-- Decharge : VF2 = 2621, k2 = 16 (R2)
-- Div = 2^6
-- Diviseur
-- LS163 : Count up, Sync load when 0xF (no toggle sound if divider = 0xF)
-- LS74 : Divide by 2
process (clk)
variable cnt: integer range 0 to imax(Osc3_ikc,Osc3_ikd) := 0;
variable cnt2: unsigned(3 downto 0) := (others => '0');
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c3 <= (others => '0');
flip3 <= '0';
else
if u_c3 > u_ctrl then flip3 <= '0'; end if;
if u_c3 < u_ctrl/2 then
flip3 <= '1';
if flip3 = '0' then
cnt2 := cnt2 + 1;
if cnt2 = "0000" then
cnt2 := unsigned(divider);
if divider /= "1111" then sound <= not sound; end if;
end if;
end if;
end if;
cnt := cnt + 1;
if flip3 = '1' then
if cnt = Osc3_ikc then
cnt := 0;
u_c3 <= u_c3 + (Osc3_iVFc - u_c3)/Osc3_div;
end if;
else
if cnt = Osc3_ikd then
cnt := 0;
u_c3 <= u_c3 - (u_c3 - Osc3_iVFd)/Osc3_div;
end if;
end if;
end if;
end if;
end process;
with trigger2 select snd <= '0'&sound when '1', sound&'0' when others;
end struct;

View File

@@ -1,290 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix sound effect3 (noise) by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
-- this module generates noisy sound of ship missile shooting
-- ship explosions and enemy mothership explosion
-- it is often head throught all the levels of the game
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
entity phoenix_effect3 is
generic(
-- Command 1
Cmd1_Fs: real := 11.0; -- MHz
Cmd1_V: real := 5.0; -- V
Cmd1_Vd: real := 0.46; -- V
Cmd1_Vce: real := 0.2; -- V
Cmd1_R1: real := 1.0; -- k
Cmd1_R2: real := 0.33; -- k
Cmd1_R3: real := 20.0; -- k
Cmd1_C: real := 6.8; -- uF
Cmd1_Div2n: integer := 8; -- bits divisor
--Cmd1_bits: integer := 16; -- bits counter
-- Command 2
Cmd2_Fs: real := 11.0; -- MHz
Cmd2_V: real := 5.0; -- V
Cmd2_Vd: real := 0.46; -- V
Cmd2_Vce: real := 0.2; -- V
Cmd2_R1: real := 1.0; -- k
Cmd2_R2: real := 0.33; -- k
Cmd2_R3: real := 47.0; -- k
Cmd2_C: real := 6.8; -- uF
Cmd2_Div2n: integer := 8; -- bits divisor
--Cmd2_bits: integer := 16; -- bits counter
-- Oscillator
Osc_Fs: real := 11.0; -- MHz
Osc_Vb: real := 5.0; -- V
Osc_Vce: real := 0.2; -- V
Oscmin_R1a: real := 47.0; -- k
Oscmin_R2: real := 0.33; -- k
Oscmin_C: real := 0.05; -- uF
Oscmin_bits: integer := 16; -- bits counter
Oscmax_R1a: real := 2.553; -- k
Oscmax_R2: real := 1.0; -- k
Oscmax_C: real := 0.05; -- uF
Osc_Div2n: integer := 7; -- bits divisor
--Osc_bits: integer := 16; -- bits counter
C_commande2_chop_k: integer := 62500;
Vmax: real := 5.0; -- V
Vmax_bits: integer := 16 -- number of bits to represent Vmax
);
port(
clk : in std_logic;
reset : in std_logic;
trigger1 : in std_logic;
trigger2 : in std_logic;
snd : out std_logic_vector(7 downto 0)
);
end phoenix_effect3;
architecture struct of phoenix_effect3 is
-- integer representation of voltage, full range
constant IVmax: integer := integer(2**Vmax_bits)-1;
-- Command1 --
constant Cmd1_div: integer := integer(2**Cmd1_Div2n);
-- Command1 charge/discharge voltages
constant Cmd1_VFc: real := Cmd1_V-Cmd1_Vd; -- V
constant Cmd1_iVFc: integer := integer(Cmd1_VFc * real(IVmax)/Vmax);
constant Cmd1_VFd: real := Cmd1_Vce+Cmd1_Vd; -- V
constant Cmd1_iVFd: integer := integer(Cmd1_VFd * real(IVmax)/Vmax);
-- Command1 charge/discharge time constants
constant Cmd1_RCc: real := (Cmd1_R1+Cmd1_R2+Cmd1_R3)*Cmd1_C/1000.0; -- s
constant Cmd1_ikc: integer := integer(Cmd1_Fs * 1.0E6 * Cmd1_RCc / 2.0**Cmd1_Div2n);
constant Cmd1_RCd: real := Cmd1_R2*Cmd1_C/1000.0; -- s
constant Cmd1_ikd: integer := integer(Cmd1_Fs * 1.0E6 * Cmd1_RCd / 2.0**Cmd1_Div2n);
-- Command2 --
constant Cmd2_div: integer := integer(2**Cmd2_Div2n);
-- Command2 charge/discharge voltages
constant Cmd2_VFc: real := (Cmd2_V-Cmd2_Vd)*Cmd2_R3/(Cmd2_R1+Cmd2_R2+Cmd2_R3); -- V
constant Cmd2_iVFc: integer := integer(Cmd2_VFc * real(IVmax)/Vmax);
constant Cmd2_VFd: real := 0.0; -- V
constant Cmd2_iVFd: integer := integer(Cmd2_VFd * real(IVmax)/Vmax);
-- Command2 charge/discharge time constants
constant Cmd2_RCc: real := (Cmd2_R1+Cmd2_R2)*Cmd2_R3/(Cmd2_R1+Cmd2_R2+Cmd2_R3)*Cmd2_C/1000.0; -- s
constant Cmd2_ikc: integer := integer(Cmd2_Fs * 1.0E6 * Cmd2_RCc / 2.0**Cmd2_Div2n);
constant Cmd2_RCd: real := Cmd2_R3*Cmd2_C/1000.0; -- s
constant Cmd2_ikd: integer := integer(Cmd2_Fs * 1.0E6 * Cmd2_RCd / 2.0**Cmd2_Div2n);
-- Oscillator --
constant Osc_div: integer := integer(2**Osc_Div2n);
-- Oscillator charge/discharge voltages
constant Osc_VFc: real := Osc_Vb; -- V
constant Osc_iVFc: integer := integer(Osc_VFc * real(IVmax)/Vmax);
constant Osc_VFd: real := Osc_Vce; -- V
constant Osc_iVFd: integer := integer(Osc_VFd * real(IVmax)/Vmax);
-- Oscillator min charge/discharge time constants
constant Oscmin_RCc: real := (Oscmin_R1a+Oscmin_R2)*Oscmin_C/1000.0; -- s
constant Oscmin_ikc: integer := integer(Osc_Fs * 1.0E6 * Oscmin_RCc / 2.0**Osc_Div2n);
constant Oscmin_RCd: real := Oscmin_R2*Oscmin_C/1000.0; -- s
constant Oscmin_ikd: integer := integer(Osc_Fs * 1.0E6 * Oscmin_RCd / 2.0**Osc_Div2n);
-- Oscillator max charge/discharge time constants
constant Oscmax_RCc: real := (Oscmax_R1a+Oscmax_R2)*Oscmax_C/1000.0; -- s
constant Oscmax_ikc: integer := integer(Osc_Fs * 1.0E6 * Oscmax_RCc / 2.0**Osc_Div2n);
constant Oscmax_RCd: real := Oscmax_R2*Oscmax_C/1000.0; -- s
constant Oscmax_ikd: integer := integer(Osc_Fs * 1.0E6 * Oscmax_RCd / 2.0**Osc_Div2n);
function imax(x,y: integer) return integer is begin
if x > y then
return x;
else
return y;
end if;
end imax;
signal u_c1 : unsigned(15 downto 0) := (others => '0');
signal u_c2 : unsigned(15 downto 0) := (others => '0');
signal u_c3 : unsigned(15 downto 0) := (others => '0');
signal flip3 : std_logic := '0';
signal k_ch : unsigned(25 downto 0) := (others =>'0');
signal u_ctrl1 : unsigned(15 downto 0) := (others => '0');
signal u_ctrl2 : unsigned(15 downto 0) := (others => '0');
signal u_ctrl1_f : unsigned( 7 downto 0) := (others => '0');
signal u_ctrl2_f : unsigned( 7 downto 0) := (others => '0');
signal sound : unsigned( 7 downto 0) := (others => '0');
signal shift_reg : std_logic_vector(17 downto 0) := (others => '0');
begin
-- Commande1
-- R1 = 1k, R2 = 0.33k, R3 = 20k C=6.8e-6 SR=10MHz
-- Charge : VF1 = 59507, k1 = 5666 (R1+R2+R3)
-- Decharge : VF2 = 8651, k2 = 88 (R2)
-- Div = 2^8
process (clk)
-- variable cnt : unsigned(15 downto 0) := (others => '0');
variable cnt: integer range 0 to imax(Cmd1_ikc,Cmd1_ikd)*2 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c1 <= (others => '0');
else
cnt := cnt + 1;
if trigger1 = '1' then
-- if cnt > C_commande1_k1 then
if cnt > Cmd1_ikc then
cnt := 0;
-- u_c1 <= u_c1 + (C_commande1_VF1 - u_c1)/256;
u_c1 <= u_c1 + (Cmd1_iVFc - u_c1)/Cmd1_div;
end if;
else
-- if cnt > C_commande1_k2 then
if cnt > Cmd1_ikd then
cnt := 0;
-- u_c1 <= u_c1 - (u_c1 - C_commande1_VF2)/256;
u_c1 <= u_c1 - (u_c1 - Cmd1_iVFd)/Cmd1_div;
end if;
end if;
end if;
end if;
end process;
-- Commande2
-- R1 = 1k, R2 = 0.33k, R3 = 47k C=6.8e-6 SR=10MHz
-- Charge : VF1 = 57869, k1 = 344 (R1+R2)//R3
-- Decharge : VF2 = 0, k2 = 12484 (R3)
-- Div = 2^8
process (clk)
-- variable cnt : unsigned(15 downto 0) := (others => '0');
variable cnt: integer range 0 to imax(Cmd2_ikc,Cmd2_ikd)*2 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
-- cnt := (others => '0');
cnt := 0;
u_c2 <= (others => '0');
else
cnt := cnt + 1;
if trigger2 = '1' then
-- if cnt > C_commande2_k1 then
if cnt > Cmd2_ikc then
-- cnt := (others => '0');
cnt := 0;
-- u_c2 <= u_c2 + (C_commande2_VF1 - u_c2)/256;
u_c2 <= u_c2 + (Cmd2_iVFc - u_c2)/Cmd2_div;
end if;
else
-- if cnt > C_commande2_k2 then
if cnt > Cmd2_ikd then
-- cnt := (others => '0');
cnt := 0;
-- u_c2 <= u_c2 - (u_c2 - C_commande2_VF2)/256;
u_c2 <= u_c2 - (u_c2 - Cmd2_iVFd)/Cmd2_div;
end if;
end if;
end if;
end if;
end process;
-- control voltage from command1 is R3 voltage (not u_c1 voltage)
with trigger1 select
-- u_ctrl1 <= (to_unsigned(C_commande1_VF1,16) - u_c1) when '1', (others=>'0') when others;
u_ctrl1 <= (to_unsigned(Cmd1_iVFc,16) - u_c1) when '1', (others=>'0') when others;
-- control voltage from command2 is u_c2 voltage
u_ctrl2 <= u_c2;
-- sum up and scaled both control voltages to vary R1 resistor of oscillator
-- k_ch <= shift_right(((u_ctrl1/2 + u_ctrl2/2) * to_unsigned(C_oscillateur_min_k1-C_oscillateur_max_k1,10)),15) + C_oscillateur_max_k1;
k_ch <= shift_right(((u_ctrl1/2 + u_ctrl2/2) * to_unsigned(Oscmin_ikc-Oscmax_ikc,10)),15) + Oscmax_ikc;
-- Oscillateur
-- R1 = 47k..2.533k, R2 = 1k, C=0.05e-6, SR=50MHz
-- Charge : VF1 = 65536, k_ch = 938..69 (R1+R2, C)
-- Decharge : VF2 = 2621, k2 = 20 (R2, C)
-- Div = 2^7
-- noise generator triggered by oscillator output
process (clk)
variable cnt: integer range 0 to imax(imax(Oscmin_ikc,Oscmin_ikd), imax(Oscmax_ikc,Oscmax_ikd))+256 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c3 <= (others => '0');
else
if u_c3 > X"AAAA" then flip3 <= '0'; end if;
if u_c3 < X"5555" then
flip3 <= '1';
if flip3 = '0' then
shift_reg <= shift_reg(16 downto 0) & not(shift_reg(17) xor shift_reg(16));
end if;
end if;
cnt := cnt + 1;
if flip3 = '1' then
if cnt > k_ch then
cnt := 0;
u_c3 <= u_c3 + (Osc_iVFc - u_c3)/Osc_div;
end if;
else
if cnt > Oscmax_ikd then
cnt := 0;
u_c3 <= u_c3 - (u_c3 - Osc_iVFd)/Osc_div;
end if;
end if;
end if;
end if;
end process;
-- modulated (chop) command1 voltage with noise generator output
with shift_reg(17) xor shift_reg(16) select
u_ctrl1_f <= u_ctrl1(15 downto 8)/2 when '0', (others => '0') when others;
-- modulated (chop) command2 voltage with noise generator output
-- and add 400Hz filter (raw sub-sampling)
-- f=10 MHz, k = 25000
process (clk)
variable cnt : unsigned(15 downto 0) := (others => '0');
begin
if rising_edge(clk) then
cnt := cnt + 1;
if cnt > C_commande2_chop_k then
cnt := (others => '0');
if (shift_reg(17) xor shift_reg(16)) = '0' then
u_ctrl2_f <= u_ctrl2(15 downto 8)/2;
else
u_ctrl2_f <= (others => '0');
end if;
end if;
end if;
end process;
-- mix modulated noises 1 and 2
sound <= u_ctrl1_f + u_ctrl2_f;
snd <= std_logic_vector(sound);
end struct;

View File

@@ -1,309 +0,0 @@
---------------------------------------------------------------------------------
-- DE2-35 Top level for Phoenix by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
--
-- Main features
-- PS2 keyboard input
-- wm8731 sound output
-- NO board SRAM used
--
-- sw 0: on/off hdmi-audio
--
-- Board switch : ---- todo fixme switches note
-- 1 - 4 : dip switch
-- 0-1 : lives 3-6
-- 3-2 : bonus life 30K-60K
-- 4 : coin 1-2
-- 6-5 : unkonwn
-- 7 : upright-cocktail
-- 8 -10 : sound_select
-- 0XX : all mixed (normal)
-- 100 : sound1 only
-- 101 : sound2 only
-- 110 : sound3 only
-- 111 : melody only
-- Board key :
-- 0 : reset
--
---------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
entity phoenix_mist is
port
(
CLOCK_27 : in std_logic;
LED : out std_logic;
VGA_R : out std_logic_vector(5 downto 0);
VGA_G : out std_logic_vector(5 downto 0);
VGA_B : out std_logic_vector(5 downto 0);
VGA_HS : out std_logic;
VGA_VS : out std_logic;
SPI_SCK : in std_logic;
SPI_DI : in std_logic;
SPI_DO : out std_logic;
SPI_SS2 : in std_logic;
SPI_SS3 : in std_logic;
CONF_DATA0 : in std_logic;
AUDIO_L : out std_logic;
AUDIO_R : out std_logic
);
end;
architecture struct of phoenix_mist is
signal clk : std_logic;
signal clk_88m : std_logic;
signal reset : std_logic;
signal clock_stable : std_logic;
signal audio : std_logic_vector(11 downto 0);
signal video_r, video_g, video_b: std_logic_vector(1 downto 0);
signal vsync, hsync : std_logic;
signal dip_switch : std_logic_vector(7 downto 0);-- := (others => '0');
signal status : std_logic_vector(31 downto 0);
signal buttons : std_logic_vector(1 downto 0);
signal scandoubler_disable : std_logic;
signal ypbpr : std_logic;
signal ce_pix : std_logic;
signal scanlines : std_logic_vector(1 downto 0);
signal hq2x : std_logic;
signal coin : std_logic;
signal player_start : std_logic_vector(1 downto 0);
signal button_left, button_right, button_protect, button_fire: std_logic;
signal joy0 : std_logic_vector(7 downto 0);
signal joy1 : std_logic_vector(7 downto 0);
signal ps2Clk : std_logic;
signal ps2Data : std_logic;
signal kbd_joy : std_logic_vector(7 downto 0);
signal upjoyL : std_logic;
signal upjoyR : std_logic;
signal upjoyB : std_logic;
-- config string used by the io controller to fill the OSD
constant CONF_STR : string := "PHOENIX;;O4,Screen Direction,Upright,Normal;O67,Scandoubler Fx,None,HQ2x,CRT 25%,CRT 50%;T5,Reset;V,v1.1;";
function to_slv(s: string) return std_logic_vector is
constant ss: string(1 to s'length) := s;
variable rval: std_logic_vector(1 to 8 * s'length);
variable p: integer;
variable c: integer;
begin
for i in ss'range loop
p := 8 * i;
c := character'pos(ss(i));
rval(p - 7 to p) := std_logic_vector(to_unsigned(c,8));
end loop;
return rval;
end function;
component mist_io
generic ( STRLEN : integer := 0 );
port (
clk_sys :in std_logic;
SPI_SCK, CONF_DATA0, SPI_DI :in std_logic;
SPI_DO : out std_logic;
conf_str : in std_logic_vector(8*STRLEN-1 downto 0);
buttons : out std_logic_vector(1 downto 0);
joystick_0 : out std_logic_vector(7 downto 0);
joystick_1 : out std_logic_vector(7 downto 0);
status : out std_logic_vector(31 downto 0);
scandoubler_disable, ypbpr : out std_logic;
ps2_kbd_clk : out std_logic;
ps2_kbd_data : out std_logic
);
end component mist_io;
component video_mixer
generic ( LINE_LENGTH : integer := 352; HALF_DEPTH : integer := 1 );
port (
clk_sys, ce_pix, ce_pix_actual : in std_logic;
SPI_SCK, SPI_SS3, SPI_DI : in std_logic;
scanlines : in std_logic_vector(1 downto 0);
scandoubler_disable, hq2x, ypbpr, ypbpr_full : in std_logic;
rotate : in std_logic_vector(1 downto 0);
R, G, B : in std_logic_vector(2 downto 0);
HSync, VSync, line_start, mono : in std_logic;
VGA_R,VGA_G, VGA_B : out std_logic_vector(5 downto 0);
VGA_VS, VGA_HS : out std_logic
);
end component video_mixer;
component keyboard
PORT(
clk : in std_logic;
reset : in std_logic;
ps2_kbd_clk : in std_logic;
ps2_kbd_data : in std_logic;
joystick : out std_logic_vector (7 downto 0)
);
end component;
begin
-- SWITCH 1: SWITCH 2: NUMBER OF SPACESHIPS:
-- --------- --------- ---------------------
-- OFF OFF 6
-- ON OFF 5
-- OFF ON 4
-- ON ON 3
-- FIRST FREE SECOND FREE
-- SWITCH 3: SWITCH 4: SHIP SCORE: SHIP SCORE:
-- --------- --------- ----------- -----------
-- OFF OFF 6,000 60,000
-- ON OFF 5,000 50,000
-- OFF ON 4,000 40,000
-- ON ON 3,000 30,000
--Cocktail,Factory,Factory,Factory,Bonus2,Bonus1,Ships2,Ships1
dip_switch <= "00001111";
mist_io_inst : mist_io
generic map (STRLEN => CONF_STR'length)
port map (
clk_sys => clk,
SPI_SCK => SPI_SCK,
CONF_DATA0 => CONF_DATA0,
SPI_DI => SPI_DI,
SPI_DO => SPI_DO,
conf_str => to_slv(CONF_STR),
buttons => buttons,
scandoubler_disable => scandoubler_disable,
ypbpr => ypbpr,
joystick_1 => joy1,
joystick_0 => joy0,
status => status,
ps2_kbd_clk => ps2Clk,
ps2_kbd_data => ps2Data
);
--
-- Audio
--
u_dac1 : entity work.dac
port map(
clk_i => clk_88m,
res_n_i => not reset,
dac_i => audio,
dac_o => AUDIO_L
);
u_dac2 : entity work.dac
port map(
clk_i => clk_88m,
res_n_i => not reset,
dac_i => audio,
dac_o => AUDIO_R
);
pll: entity work.pll27
port map(
inclk0 => CLOCK_27,
c0 => clk_88m,
c1 => clk,
locked => clock_stable
);
reset <= status(0) or status(5) or buttons(1) or not clock_stable;
u_keyboard : keyboard
port map(
clk => clk,
reset => reset,
ps2_kbd_clk => ps2Clk,
ps2_kbd_data => ps2Data,
joystick => kbd_joy
);
process(clk_88m)
variable cnt: integer range 0 to 6000000 := 0;
begin
if rising_edge(clk_88m) then
if status(3 downto 1) /= "000" then
cnt := 0;
coin <= status(1);
player_start <= status(3 downto 2);
else
if cnt < 6000000 then
cnt := cnt + 1;
else
coin <= '0';
player_start <= "00";
end if;
end if;
end if;
end process;
upjoyB <= joy0(2) or joy1(2) when status(4) = '0' else joy0(0) or joy1(0);
upjoyL <= joy0(1) or joy1(1) or kbd_joy(6) when status(4) = '0' else joy0(2) or joy1(2) or kbd_joy(5);
upjoyR <= joy0(0) or joy1(0) or kbd_joy(7) when status(4) = '0' else joy0(3) or joy1(3) or kbd_joy(4);
phoenix : entity work.phoenix
port map
(
clk => clk,
reset => reset,
ce_pix => ce_pix,
dip_switch => dip_switch,
btn_coin => kbd_joy(3) or coin,--ESC
btn_player_start(0) => kbd_joy(1) or player_start(0),--1
btn_player_start(1) => kbd_joy(2) or player_start(1),--2
btn_left => upjoyL,
btn_right => upjoyR,
btn_barrier => upjoyB or kbd_joy(2),--TAB
btn_fire => joy0(4) or joy1(4) or kbd_joy(0),--space
video_r => video_r,
video_g => video_g,
video_b => video_b,
video_hs => hsync,
video_vs => vsync,
audio_select => "000",
audio => audio
);
scanlines(0) <= '1' when status(7 downto 6) = "10" else '0';
scanlines(1) <= '1' when status(7 downto 6) = "11" else '0';
hq2x <= '1' when status(7 downto 6) = "01" else '0';
vmixer : video_mixer
port map (
clk_sys => clk_88m,
ce_pix => ce_pix,
ce_pix_actual => ce_pix,
SPI_SCK => SPI_SCK,
SPI_SS3 => SPI_SS3,
SPI_DI => SPI_DI,
rotate => '1' & not status(4),
scanlines => scanlines,
scandoubler_disable => scandoubler_disable,
hq2x => hq2x,
ypbpr => ypbpr,
ypbpr_full => '1',
R => video_r & video_r(1),
G => video_g & video_g(1),
B => video_b & video_b(1),
HSync => hsync,
VSync => vsync,
line_start => '0',
mono => '0',
VGA_R => VGA_R,
VGA_G => VGA_G,
VGA_B => VGA_B,
VGA_VS => VGA_VS,
VGA_HS => VGA_HS
);
LED <= '1';
end struct;

View File

@@ -1,241 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix music by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
use ieee.math_real.all;
entity phoenix_music is
generic(
C_clk_freq: real := 11.0 -- MHz
);
port(
clk : in std_logic;
reset : in std_logic;
trigger : in std_logic;
sel_song : in std_logic;
snd : out std_logic_vector(7 downto 0)
);
end phoenix_music;
architecture struct of phoenix_music is
constant C_voice_attack: integer := integer(230.0 * C_clk_freq); -- larger value is faster
constant C_song0_tempo: integer := integer(2200.0 * C_clk_freq); -- larger value is faster
constant C_song1_tempo: integer := integer(1700.0 * C_clk_freq); -- larger value is faster
constant C_voice_down_rate: integer := integer(4000.0 / C_clk_freq); -- larger value is slower
type voice_array is array (0 to 94) of integer range 0 to 127;
-- main voice1 (Jeux Interdits)
constant voice1 : voice_array := (
32,96,32,96,32,96,32,96,26,90,24,88,24,88,23,87,21,85,21,85,24,88,32,96,37,101,101,101,101,101,37,101,35,99,33,97,33,97,32,96,26,90,26,90,32,96,33,97,32,96,33,97,32,96,36,100,33,97,32,96,32,96,26,90,24,88,24,88,23,87,21,85,23,87,23,87,23,87,23,87,24,88,23,87,21,85,24,88,32,96,37,101,101,101,101);
-- accompagnement voice1
constant voice2 : voice_array := (
5,69,69,69,69,69,16,80,80,80,80,80,8,72,8,72,8,72,16,80,80,80,80,80,5,69,5,8,16,21,5,69,69,69,69,69,17,81,81,81,81,81,10,74,74,74,74,74,16,80,80,80,80,80,16,80,80,80,80,80,8,72,72,72,72,72,5,69,69,69,69,69,7,71,71,71,71,71,17,81,81,81,8,72,5,69,16,80,8,72,5,69,69,69,69);
-- voice1, voice2 and voice3 value description
-- bit3-bit0 : tone from 0(La/A) to 11(Sol/G#)
-- bit5-bit4 : octave from 0(220Hz)to 2(880Hz)
-- bit6 : 0 = strike (restart) the tone, 1 = don't strike (hold) the tone
type voice_array2 is array (0 to 45) of integer range 0 to 127;
-- main voice3 (La lettre a Elise)
constant voice3 : voice_array2 := (
37,36,37,36,37,32,35,33,26,5,10,17,21,26,32,5,16,21,25,32,33,5,10,17,37,36,37,36,37,32,35,33,26,5,10,17,21,26,32,5,16,21,33,32,26,90);
type period_array is array (0 to 11) of integer range 0 to 65535;
-- Octave 220Hz @ 10MHz
constant tone_period : period_array := (
45455, -- ton 0 La (A )
42903, -- ton 1 La# (A#)
40495, -- ton 2 Si (B )
38223, -- ton 3 Do (C )
36077, -- ton 4 Do# (C#)
34052, -- ton 5 Re (D )
32141, -- ton 6 Re# (D#)
30337, -- ton 7 Mi (E )
28635, -- ton 8 Fa (F )
27027, -- ton 9 Fa# (F#)
25511, -- ton 10 Sol (G )
24079 -- ton 11 Sol# (G#)
);
signal tempo_period : integer range 0 to C_song0_tempo := C_song1_tempo; --0.19s @ 100kHz
signal voice1_tone : integer range 0 to 65535 := 0;
signal voice1_tone_div : integer range 0 to 65535 := 0;
signal voice1_code : unsigned(6 downto 0) := "0000000";
signal voice1_vol : unsigned(7 downto 0) := "00000000";
signal voice1_snd : std_logic := '0';
signal voice2_tone : integer range 0 to 65535 := 0;
signal voice2_tone_div : integer range 0 to 65535 := 0;
signal voice2_code : unsigned(6 downto 0) := "0000000";
signal voice2_vol : unsigned(7 downto 0) := "00000000";
signal voice2_snd : std_logic := '0';
signal snd1 : unsigned(7 downto 0) := "00000000";
signal snd2 : unsigned(7 downto 0) := "00000000";
signal trigger_r : std_logic := '0';
signal max_step : integer range 0 to 94 := 94;
signal sel_song_r: std_logic := '1';
begin
process (clk)
variable cnt : integer range 0 to 127 := 0;
variable step : integer range 0 to 94 := 94;
variable tempo : integer range 0 to C_song0_tempo := 0;
variable voice1_code_v : unsigned(6 downto 0) := "0000000";
variable voice2_code_v : unsigned(6 downto 0) := "0000000";
variable voice1_down_rate : integer range 0 to C_voice_down_rate := 0;
variable voice2_down_rate : integer range 0 to C_voice_down_rate := 0;
begin
if rising_edge(clk) then
trigger_r <= trigger;
if reset = '1' then
cnt := 0;
step := 94;
voice1_vol <= X"00";
voice2_vol <= X"00";
elsif trigger ='1' and trigger_r ='0' and step = 94 then -- restart music on edge trigger if not already playing
cnt := 0;
step := 0;
voice1_vol <= X"00";
voice2_vol <= X"00";
sel_song_r <= sel_song;
if sel_song = '1' then
max_step <= 94;
tempo_period <= C_song1_tempo;
else
max_step <= 46;
tempo_period <= C_song0_tempo;
end if;
else
cnt := cnt +1;
if cnt >= 100 then
cnt := 0;
tempo := tempo +1;
if tempo >= tempo_period then -- next beat
tempo := 0;
if step < max_step then -- if not end of music get next note
if sel_song_r = '1' then
voice1_code_v := to_unsigned(voice1(step),7);
voice2_code_v := to_unsigned(voice2(step),7);
else
voice1_code_v := to_unsigned(voice3(step),7);
voice2_code_v := to_unsigned(voice3(step),7);
end if;
voice1_code <= voice1_code_v;
voice2_code <= voice2_code_v;
step := step + 1;
else -- if end cut-off volume
voice1_vol <= X"00";
voice2_vol <= X"00";
step := 94;
end if;
end if;
if (step < 94) then -- if not end of music
-- manage voice1 volume
-- ramp up fast to xF0 at begining of beat when new strike
if (tempo < C_voice_attack) and (voice1_code_v(6)='0') then
if voice1_vol < X"F0" then voice1_vol <= voice1_vol + X"01"; end if;
voice1_down_rate := 0;
-- ramp down slowly after a while, down to x80
else
if voice1_vol > X"80" then
voice1_down_rate := voice1_down_rate+1;
if voice1_down_rate >= C_voice_down_rate then
voice1_down_rate := 0;
voice1_vol <= voice1_vol - X"01";
end if;
end if;
end if;
-- manage voice2 volume
if (tempo < C_voice_attack) and (voice2_code_v(6)='0') then
if voice2_vol < X"F0" then voice2_vol <= voice2_vol + X"01"; end if;
voice2_down_rate := 0;
else
if voice2_vol > X"80" then
voice2_down_rate := voice2_down_rate+1;
if voice2_down_rate >= C_voice_down_rate then
voice2_down_rate := 0;
voice2_vol <= voice2_vol - X"01";
end if;
end if;
end if;
end if;
end if;
end if;
end if;
end process;
-- get voice1 raw tone
voice1_tone <= tone_period(to_integer(voice1_code(3 downto 0)));
-- get voice1 tone w.r.t octave
with voice1_code(5 downto 4) select
voice1_tone_div <= voice1_tone when "00",
voice1_tone/2 when "01",
voice1_tone/4 when others;
-- generate voice1 frequency
voice1_frequency: process (clk)
variable cnt : integer range 0 to 65535 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
else
cnt := cnt+1;
if cnt >= voice1_tone_div then
cnt := 0;
voice1_snd <= not voice1_snd;
end if;
end if;
end if;
end process;
-- get voice2 raw tone
voice2_tone <= tone_period(to_integer(voice2_code(3 downto 0)));
-- get voice2 tone w.r.t octave
with voice2_code(5 downto 4) select
voice2_tone_div <= voice2_tone when "00",
voice2_tone/2 when "01",
voice2_tone/4 when others;
-- generate voice2 frequency
voice2_frequency: process (clk)
variable cnt : integer range 0 to 65535 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
else
cnt := cnt+1;
if cnt >= voice2_tone_div then
cnt := 0;
voice2_snd <= not voice2_snd;
end if;
end if;
end if;
end process;
-- modulate voice1 volume with voice1 frequency
with voice1_snd select snd1 <= voice1_vol when '1', X"00" when others;
-- modulate voice2 volume with voice2 frequency
with voice2_snd select snd2 <= voice2_vol when '1', X"00" when others;
-- mix voice1 and voice 2
snd <= std_logic_vector(('0'&snd1(7 downto 1)) + ('0'&snd2(7 downto 1)));
end struct;

File diff suppressed because it is too large Load Diff

View File

@@ -1,160 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix video generator by Dar (darfpga@aol.fr)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
entity phoenix_video is
port(
clk11 : in std_logic;
reset : in std_logic;
ce_pix : out std_logic;
hcnt : out std_logic_vector(9 downto 1);
vcnt : out std_logic_vector(8 downto 1);
sync_hs : out std_logic;
sync_vs : out std_logic;
adrsel : out std_logic;
rdy : out std_logic;
vblank : out std_logic;
hblank_frgrd : out std_logic;
hblank_bkgrd : out std_logic
);
end phoenix_video;
architecture struct of phoenix_video is
signal hclk_i : std_logic := '0';
signal hstb_i : std_logic := '0';
signal hcnt_i : unsigned(9 downto 1) := (others=>'0');
signal vcnt_i : unsigned(9 downto 1) := (others=>'0');
signal vcnt2 : std_logic_vector(8 downto 1) := (others=>'0');
signal vblank_n : std_logic := '0';
signal rdy1_i : std_logic;
signal rdy2_i : std_logic;
signal j1 : std_logic;
signal k1 : std_logic;
signal q1 : std_logic;
signal j2 : std_logic;
signal k2 : std_logic;
signal q2 : std_logic;
begin
-- horizontal counter clock (pixel clock)
process(clk11) begin
if falling_edge(clk11) then
hclk_i <= not hclk_i;
end if;
end process;
-- horizontal counter from 0x0A0 to 0x1FF : 352 pixels
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if reset = '1' then
hcnt_i <= (others=>'0');
vcnt_i <= (others=>'0');
else
hcnt_i <= hcnt_i +1;
if hcnt_i = 511 then
hcnt_i <= to_unsigned(160,9);
vcnt_i <= vcnt_i +1;
if vcnt_i = 261 then
vcnt_i <= to_unsigned(0,9);
end if;
end if;
end if;
end if;
end if;
end process;
-- vertical counter clock (line clock) = hblank
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if (hcnt_i(3) and hcnt_i(2) and hcnt_i(1)) = '1' then hstb_i <= not hcnt_i(9); end if;
end if;
end if;
end process;
-- vertical blanking
vblank_n <=
not(vcnt2(8) and vcnt2(7))
or
( not
( not (vcnt2(8) and vcnt2(7) and not vcnt2(6) and not vcnt2(5) and not vcnt2(4))
and
not (vcnt2(8) and vcnt2(7) and not vcnt2(6) and not vcnt2(5) and vcnt2(4))
)
);
-- ready signal for microprocessor
rdy1_i <= not( not(hcnt_i(9)) and not hcnt_i(7) and hcnt_i(6) and not hcnt_i(5));
rdy2_i <= not( not(hcnt_i(9)) and hcnt_i(7) and hcnt_i(6) and hcnt_i(5));
-- background horizontal blanking
j1 <= hcnt_i(6) and hcnt_i(4);
k1 <= hstb_i;
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if (j1 xor k1) = '1' then
q1 <= j1;
elsif j1 = '1' then
q1 <= not q1;
else
q1 <= q1;
end if;
end if;
end if;
end process;
j2 <= not hcnt_i(6) and hcnt_i(5);
k2 <= hcnt_i(8) and hcnt_i(7) and hcnt_i(6) and hcnt_i(4);
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if (j2 xor k2) = '1' then
q2 <= j2;
elsif j2 = '1' then
q2 <= not q2;
else
q2 <= q2;
end if;
end if;
end if;
end process;
-- output
ce_pix <= hclk_i;
hcnt <= std_logic_vector(hcnt_i);
vcnt2 <= std_logic_vector(vcnt_i(8 downto 1)) when vcnt_i < 255 else "11111111";
vcnt <= vcnt2;
--sync <= not(sync1_i xor sync2_i) ; original syncs
rdy <= not(vblank_n and (not (rdy1_i and rdy2_i and not hcnt_i(9))));
adrsel <= vblank_n and hcnt_i(9);
vblank <= not vblank_n;
hblank_frgrd <= hstb_i;
hblank_bkgrd <= not(hcnt_i(9) and q1) and not(hcnt_i(9) and (q2));
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if hcnt_i = 191 then
sync_hs <= '1';
if vcnt_i = 230 then sync_vs <= '1'; end if;
if vcnt_i = 237 then sync_vs <= '0'; end if;
end if;
if hcnt_i = 217 then sync_hs <= '0'; end if;
end if;
end if;
end process;
end struct;

View File

@@ -1,4 +0,0 @@
set_global_assignment -name IP_TOOL_NAME "ALTPLL"
set_global_assignment -name IP_TOOL_VERSION "13.1"
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "pll.vhd"]
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll.ppf"]

View File

@@ -1,30 +0,0 @@
# -------------------------------------------------------------------------- #
#
# Copyright (C) 1991-2013 Altera Corporation
# Your use of Altera Corporation's design tools, logic functions
# and other software and tools, and its AMPP partner logic
# functions, and any output files from any of the foregoing
# (including device programming or simulation files), and any
# associated documentation or information are expressly subject
# to the terms and conditions of the Altera Program License
# Subscription Agreement, Altera MegaCore Function License
# Agreement, or other applicable license agreement, including,
# without limitation, that your use is for the sole purpose of
# programming logic devices manufactured by Altera and sold by
# Altera or its authorized distributors. Please refer to the
# applicable agreement for further details.
#
# -------------------------------------------------------------------------- #
#
# Quartus II 64-Bit
# Version 13.1.0 Build 162 10/23/2013 SJ Web Edition
# Date created = 02:40:30 January 25, 2017
#
# -------------------------------------------------------------------------- #
QUARTUS_VERSION = "13.1"
DATE = "02:40:30 January 25, 2017"
# Revisions
PROJECT_REVISION = "Pleiads_mist"

View File

@@ -1,419 +0,0 @@
# -------------------------------------------------------------------------- #
#
# Copyright (C) 1991-2014 Altera Corporation
# Your use of Altera Corporation's design tools, logic functions
# and other software and tools, and its AMPP partner logic
# functions, and any output files from any of the foregoing
# (including device programming or simulation files), and any
# associated documentation or information are expressly subject
# to the terms and conditions of the Altera Program License
# Subscription Agreement, Altera MegaCore Function License
# Agreement, or other applicable license agreement, including,
# without limitation, that your use is for the sole purpose of
# programming logic devices manufactured by Altera and sold by
# Altera or its authorized distributors. Please refer to the
# applicable agreement for further details.
#
# -------------------------------------------------------------------------- #
#
# Quartus II 64-Bit
# Version 13.1.4 Build 182 03/12/2014 SJ Web Edition
# Date created = 16:54:40 June 25, 2019
#
# -------------------------------------------------------------------------- #
#
# Notes:
#
# 1) The default values for assignments are stored in the file:
# Pleiads_mist_assignment_defaults.qdf
# If this file doesn't exist, see file:
# assignment_defaults.qdf
#
# 2) Altera recommends that you do not modify this file. This
# file is updated automatically by the Quartus II software
# and any changes you make may be lost or overwritten.
#
# -------------------------------------------------------------------------- #
# Project-Wide Assignments
# ========================
set_global_assignment -name ORIGINAL_QUARTUS_VERSION 13.1
set_global_assignment -name PROJECT_CREATION_TIME_DATE "21:40:24 MAY 17, 2014"
set_global_assignment -name LAST_QUARTUS_VERSION 13.1
set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
set_global_assignment -name NUM_PARALLEL_PROCESSORS ALL
set_global_assignment -name SMART_RECOMPILE ON
set_global_assignment -name FLOW_ENABLE_IO_ASSIGNMENT_ANALYSIS ON
set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:rtl/build_id.tcl"
# Pin & Location Assignments
# ==========================
set_location_assignment PIN_7 -to LED
set_location_assignment PIN_54 -to CLOCK_27
set_location_assignment PIN_144 -to VGA_R[5]
set_location_assignment PIN_143 -to VGA_R[4]
set_location_assignment PIN_142 -to VGA_R[3]
set_location_assignment PIN_141 -to VGA_R[2]
set_location_assignment PIN_137 -to VGA_R[1]
set_location_assignment PIN_135 -to VGA_R[0]
set_location_assignment PIN_133 -to VGA_B[5]
set_location_assignment PIN_132 -to VGA_B[4]
set_location_assignment PIN_125 -to VGA_B[3]
set_location_assignment PIN_121 -to VGA_B[2]
set_location_assignment PIN_120 -to VGA_B[1]
set_location_assignment PIN_115 -to VGA_B[0]
set_location_assignment PIN_114 -to VGA_G[5]
set_location_assignment PIN_113 -to VGA_G[4]
set_location_assignment PIN_112 -to VGA_G[3]
set_location_assignment PIN_111 -to VGA_G[2]
set_location_assignment PIN_110 -to VGA_G[1]
set_location_assignment PIN_106 -to VGA_G[0]
set_location_assignment PIN_136 -to VGA_VS
set_location_assignment PIN_119 -to VGA_HS
set_location_assignment PIN_65 -to AUDIO_L
set_location_assignment PIN_80 -to AUDIO_R
set_location_assignment PIN_105 -to SPI_DO
set_location_assignment PIN_88 -to SPI_DI
set_location_assignment PIN_126 -to SPI_SCK
set_location_assignment PIN_127 -to SPI_SS2
set_location_assignment PIN_91 -to SPI_SS3
set_location_assignment PIN_13 -to CONF_DATA0
set_location_assignment PIN_49 -to SDRAM_A[0]
set_location_assignment PIN_44 -to SDRAM_A[1]
set_location_assignment PIN_42 -to SDRAM_A[2]
set_location_assignment PIN_39 -to SDRAM_A[3]
set_location_assignment PIN_4 -to SDRAM_A[4]
set_location_assignment PIN_6 -to SDRAM_A[5]
set_location_assignment PIN_8 -to SDRAM_A[6]
set_location_assignment PIN_10 -to SDRAM_A[7]
set_location_assignment PIN_11 -to SDRAM_A[8]
set_location_assignment PIN_28 -to SDRAM_A[9]
set_location_assignment PIN_50 -to SDRAM_A[10]
set_location_assignment PIN_30 -to SDRAM_A[11]
set_location_assignment PIN_32 -to SDRAM_A[12]
set_location_assignment PIN_83 -to SDRAM_DQ[0]
set_location_assignment PIN_79 -to SDRAM_DQ[1]
set_location_assignment PIN_77 -to SDRAM_DQ[2]
set_location_assignment PIN_76 -to SDRAM_DQ[3]
set_location_assignment PIN_72 -to SDRAM_DQ[4]
set_location_assignment PIN_71 -to SDRAM_DQ[5]
set_location_assignment PIN_69 -to SDRAM_DQ[6]
set_location_assignment PIN_68 -to SDRAM_DQ[7]
set_location_assignment PIN_86 -to SDRAM_DQ[8]
set_location_assignment PIN_87 -to SDRAM_DQ[9]
set_location_assignment PIN_98 -to SDRAM_DQ[10]
set_location_assignment PIN_99 -to SDRAM_DQ[11]
set_location_assignment PIN_100 -to SDRAM_DQ[12]
set_location_assignment PIN_101 -to SDRAM_DQ[13]
set_location_assignment PIN_103 -to SDRAM_DQ[14]
set_location_assignment PIN_104 -to SDRAM_DQ[15]
set_location_assignment PIN_58 -to SDRAM_BA[0]
set_location_assignment PIN_51 -to SDRAM_BA[1]
set_location_assignment PIN_85 -to SDRAM_DQMH
set_location_assignment PIN_67 -to SDRAM_DQML
set_location_assignment PIN_60 -to SDRAM_nRAS
set_location_assignment PIN_64 -to SDRAM_nCAS
set_location_assignment PIN_66 -to SDRAM_nWE
set_location_assignment PIN_59 -to SDRAM_nCS
set_location_assignment PIN_33 -to SDRAM_CKE
set_location_assignment PIN_43 -to SDRAM_CLK
set_location_assignment PLL_1 -to "pll27:pll|altpll:altpll_component"
# Classic Timing Assignments
# ==========================
set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
# Analysis & Synthesis Assignments
# ================================
set_global_assignment -name CYCLONEII_OPTIMIZATION_TECHNIQUE SPEED
set_global_assignment -name FAMILY "Cyclone III"
set_global_assignment -name TOP_LEVEL_ENTITY Pleiads_MiST
set_global_assignment -name DEVICE_FILTER_PACKAGE TQFP
set_global_assignment -name DEVICE_FILTER_PIN_COUNT 144
set_global_assignment -name ALLOW_POWER_UP_DONT_CARE ON
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS ON
set_global_assignment -name SAVE_DISK_SPACE OFF
set_global_assignment -name DEVICE_FILTER_SPEED_GRADE 8
# Fitter Assignments
# ==================
set_global_assignment -name FITTER_EARLY_TIMING_ESTIMATE_MODE OPTIMISTIC
set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC ON
set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_RETIMING ON
set_global_assignment -name PHYSICAL_SYNTHESIS_ASYNCHRONOUS_SIGNAL_PIPELINING ON
set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION ON
set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC_FOR_AREA ON
set_global_assignment -name PHYSICAL_SYNTHESIS_MAP_LOGIC_TO_MEMORY_FOR_AREA ON
set_global_assignment -name PHYSICAL_SYNTHESIS_EFFORT EXTRA
set_global_assignment -name DEVICE EP3C25E144C8
set_global_assignment -name CYCLONEIII_CONFIGURATION_SCHEME "PASSIVE SERIAL"
set_global_assignment -name FORCE_CONFIGURATION_VCCIO ON
set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "3.3-V LVTTL"
set_global_assignment -name CRC_ERROR_OPEN_DRAIN OFF
set_global_assignment -name RESERVE_DATA0_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name RESERVE_DATA1_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name RESERVE_FLASH_NCE_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name RESERVE_DCLK_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name CYCLONEII_RESERVE_NCEO_AFTER_CONFIGURATION "USE AS REGULAR IO"
set_global_assignment -name OPTIMIZE_HOLD_TIMING "ALL PATHS"
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING ON
set_global_assignment -name FITTER_EFFORT "STANDARD FIT"
# Assembler Assignments
# =====================
set_global_assignment -name GENERATE_RBF_FILE ON
set_global_assignment -name USE_CONFIGURATION_DEVICE OFF
# SignalTap II Assignments
# ========================
set_global_assignment -name ENABLE_SIGNALTAP OFF
set_global_assignment -name USE_SIGNALTAP_FILE stp1.stp
# Power Estimation Assignments
# ============================
set_global_assignment -name POWER_PRESET_COOLING_SOLUTION "23 MM HEAT SINK WITH 200 LFPM AIRFLOW"
set_global_assignment -name POWER_BOARD_THERMAL_MODEL "NONE (CONSERVATIVE)"
# Advanced I/O Timing Assignments
# ===============================
set_global_assignment -name OUTPUT_IO_TIMING_NEAR_END_VMEAS "HALF VCCIO" -rise
set_global_assignment -name OUTPUT_IO_TIMING_NEAR_END_VMEAS "HALF VCCIO" -fall
set_global_assignment -name OUTPUT_IO_TIMING_FAR_END_VMEAS "HALF SIGNAL SWING" -rise
set_global_assignment -name OUTPUT_IO_TIMING_FAR_END_VMEAS "HALF SIGNAL SWING" -fall
# ---------------------------
# start ENTITY(Pleiades_MiST)
# Pin & Location Assignments
# ==========================
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[0]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[1]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[2]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[3]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[4]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[5]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[6]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[7]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[8]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[9]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[10]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[11]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[12]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[13]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[14]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQ[15]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[0]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[1]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[2]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[3]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[4]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[5]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[6]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[7]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[8]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[9]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[10]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[11]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_A[12]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_BA[0]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_BA[1]
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQMH
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_DQML
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_nRAS
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_nCAS
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_nWE
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to SDRAM_nCS
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[0]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[1]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[2]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[3]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[4]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[5]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[6]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[7]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[8]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[9]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[10]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[11]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[12]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[13]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[14]
set_instance_assignment -name FAST_OUTPUT_ENABLE_REGISTER ON -to SDRAM_DQ[15]
# Fitter Assignments
# ==================
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[6]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[7]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[8]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[9]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[10]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[11]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_A[12]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[6]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[7]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[8]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[9]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[10]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[11]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[12]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[13]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[14]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQ[15]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_BA[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_BA[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQML
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_DQMH
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_nRAS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_nCAS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_nWE
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_nCS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_CKE
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SDRAM_CLK
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_R[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_G[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[5]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[4]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[3]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[2]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[1]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_B[0]
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_HS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to VGA_VS
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to LED
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to AUDIO_L
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to AUDIO_R
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_DO
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to CONF_DATA0
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to AUDIO_L
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to AUDIO_R
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CLOCK_27
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CONF_DATA0
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to LED
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_DI
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_DO
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_SCK
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_SS2
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SPI_SS3
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_B[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_G[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_HS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_R[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to VGA_VS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[6]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[7]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[8]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[9]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[10]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[11]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_A[12]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[6]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[7]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[8]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[9]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[10]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[11]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[12]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[13]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[14]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQ[15]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_BA[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_BA[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQMH
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_DQML
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_nRAS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_nCAS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_nWE
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_nCS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_CKE
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDRAM_CLK
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to CLOCK_27
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_DI
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_SCK
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_SS2
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to SPI_SS3
# start DESIGN_PARTITION(Top)
# ---------------------------
# Incremental Compilation Assignments
# ===================================
set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
# end DESIGN_PARTITION(Top)
# -------------------------
# end ENTITY(Pleiades_MiST)
# -------------------------
set_global_assignment -name SYSTEMVERILOG_FILE rtl/Pleiads_MiST.sv
set_global_assignment -name VHDL_FILE rtl/phoenix.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_effect3.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_effect2.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_effect1.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_video.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_music.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/prog.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/ic40.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/ic39.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/ic24.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/ic23.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/col_l.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/col_h.vhd
set_global_assignment -name VHDL_FILE rtl/gen_ram.vhd
set_global_assignment -name VHDL_FILE rtl/pll.vhd
set_global_assignment -name QIP_FILE ../../../common/mist/mist.qip
set_global_assignment -name QIP_FILE ../../../common/CPU/T80/T80.qip
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top

View File

@@ -1,42 +0,0 @@
#************************************************************
# THIS IS A WIZARD-GENERATED FILE.
#
# Version 13.1.4 Build 182 03/12/2014 SJ Full Version
#
#************************************************************
# Copyright (C) 1991-2014 Altera Corporation
# Your use of Altera Corporation's design tools, logic functions
# and other software and tools, and its AMPP partner logic
# functions, and any output files from any of the foregoing
# (including device programming or simulation files), and any
# associated documentation or information are expressly subject
# to the terms and conditions of the Altera Program License
# Subscription Agreement, Altera MegaCore Function License
# Agreement, or other applicable license agreement, including,
# without limitation, that your use is for the sole purpose of
# programming logic devices manufactured by Altera and sold by
# Altera or its authorized distributors. Please refer to the
# applicable agreement for further details.
# Clock constraints
create_clock -name {SPI_SCK} -period 41.666 -waveform { 20.8 41.666 } [get_ports {SPI_SCK}]
# Automatically constrain PLL and other generated clocks
derive_pll_clocks -create_base_clocks
# Automatically calculate clock uncertainty to jitter and other effects.
derive_clock_uncertainty
set_clock_groups -asynchronous -group [get_clocks {SPI_SCK}] -group [get_clocks {pll|altpll_component|auto_generated|pll1|clk[*]}]
set_output_delay -add_delay -clock_fall -clock [get_clocks {pll|altpll_component|auto_generated|pll1|clk[0]}] 1.000 [get_ports {AUDIO_L}]
set_output_delay -add_delay -clock_fall -clock [get_clocks {pll|altpll_component|auto_generated|pll1|clk[0]}] 1.000 [get_ports {AUDIO_R}]
set_output_delay -add_delay -clock_fall -clock [get_clocks {pll|altpll_component|auto_generated|pll1|clk[0]}] 1.000 [get_ports {LED}]
set_output_delay -add_delay -clock_fall -clock [get_clocks {pll|altpll_component|auto_generated|pll1|clk[0]}] 1.000 [get_ports {VGA_*}]
set_multicycle_path -to {VGA_*[*]} -setup 2
set_multicycle_path -to {VGA_*[*]} -hold 1

View File

@@ -1,24 +0,0 @@
---------------------------------------------------------------------------------
--
-- Arcade: Pleiads for MiST by Gehstock
-- 25 June 2019
--
---------------------------------------------------------------------------------
-- Copyright (c) DAR - Feb 2016
-- https://sourceforge.net/projects/darfpga/files/Software%20VHDL/phoenix/
---------------------------------------------------------------------------------
--
-- Only controls and OSD are rotated on VGA output.
--
--
-- Keyboard inputs :
--
-- ESC : Coin
-- F1 : Start 1 player
-- F2 : Start 2 players
-- SPACE : Fire
-- ARROW KEYS : Movement/Shield
--
-- Joystick support.
--
---------------------------------------------------------------------------------

View File

@@ -1,16 +0,0 @@
@echo off
del /s *.bak
del /s *.orig
del /s *.rej
rmdir /s /q db
rmdir /s /q incremental_db
rmdir /s /q output_files
rmdir /s /q simulation
rmdir /s /q greybox_tmp
del PLLJ_PLLSPE_INFO.txt
del /s /q build_id.v
del *.qws
del *.ppf
del *.qip
del *.ddb
pause

View File

@@ -1,169 +0,0 @@
//============================================================================
// Arcade: Pleiads
//
//-------------------------------------------------------------------------------
// DE2-35 Top level for Phoenix by Dar (darfpga@aol.fr) (April 2016)
// http://darfpga.blogspot.fr
//
//
//-------------------------------------------------------------------------------
module Pleiads_MiST
(
output LED,
output [5:0] VGA_R,
output [5:0] VGA_G,
output [5:0] VGA_B,
output VGA_HS,
output VGA_VS,
output AUDIO_L,
output AUDIO_R,
input SPI_SCK,
output SPI_DO,
input SPI_DI,
input SPI_SS2,
input SPI_SS3,
input CONF_DATA0,
input CLOCK_27
);
`include "rtl\build_id.v"
localparam CONF_STR = {
"Pleiads;;",
"O2,Rotate Controls,Off,On;",
"O34,Scanlines,Off,25%,50%,75%;",
"O5,Blend,Off,On;",
"T0,Reset;",
"V,v1.21.",`BUILD_DATE
};
wire rotate = status[2];
wire [1:0] scanlines = status[4:3];
wire blend = status[5];
assign LED = 1;
assign AUDIO_R = AUDIO_L;
wire clk_sys, clk_22;
wire pll_locked;
pll pll(
.inclk0(CLOCK_27),
.areset(0),
.c0(clk_sys),
.c1(clk_22)
);
wire [31:0] status;
wire [1:0] buttons;
wire [1:0] switches;
wire [7:0] joystick_0;
wire [7:0] joystick_1;
wire scandoublerD;
wire ypbpr;
wire [11:0] audio;
wire hb1, hb2, vb;
wire blankn = ~((hb1 & hb2) | vb);
wire hs, vs;
wire [1:0] r,g,b;
wire key_pressed;
wire [7:0] key_code;
wire key_strobe;
phoenix phoenix(
.clk(clk_sys),
.reset(status[0] | buttons[1]),
.dip_switch(8'b00001111),
.btn_coin(m_coin1 | m_coin2),
.btn_player_start({m_two_players,m_one_player}),
.btn_left(m_left),
.btn_right(m_right),
.btn_barrier(m_fireB),
.btn_fire(m_fireA),
.video_r(r),
.video_g(g),
.video_b(b),
.video_hs(hs),
.video_vs(vs),
.video_vblank(vb),
.video_hblank_bg(hb1),
.video_hblank_fg(hb2),
.audio_select("000"),
.audio(audio)
);
mist_video #(.COLOR_DEPTH(2), .SD_HCNT_WIDTH(10)) mist_video(
.clk_sys(clk_22),
.SPI_SCK(SPI_SCK),
.SPI_SS3(SPI_SS3),
.SPI_DI(SPI_DI),
.R(blankn ? r : 0),
.G(blankn ? g : 0),
.B(blankn ? b : 0),
.HSync(~hs),
.VSync(~vs),
.VGA_R(VGA_R),
.VGA_G(VGA_G),
.VGA_B(VGA_B),
.VGA_VS(VGA_VS),
.VGA_HS(VGA_HS),
.ce_divider(1'b1),
.blend(blend),
.rotate({1'b1,rotate}),
.scandoubler_disable(scandoublerD),
.scanlines(scanlines),
.ypbpr(ypbpr)
);
user_io #(
.STRLEN(($size(CONF_STR)>>3)))
user_io(
.clk_sys (clk_sys ),
.conf_str (CONF_STR ),
.SPI_CLK (SPI_SCK ),
.SPI_SS_IO (CONF_DATA0 ),
.SPI_MISO (SPI_DO ),
.SPI_MOSI (SPI_DI ),
.buttons (buttons ),
.switches (switches ),
.scandoubler_disable (scandoublerD ),
.ypbpr (ypbpr ),
.key_strobe (key_strobe ),
.key_pressed (key_pressed ),
.key_code (key_code ),
.joystick_0 (joystick_0 ),
.joystick_1 (joystick_1 ),
.status (status )
);
dac #(
.C_bits(15))
dac(
.clk_i(clk_sys),
.res_n_i(1),
.dac_i({audio, 3'b000}),
.dac_o(AUDIO_L)
);
wire m_up, m_down, m_left, m_right, m_fireA, m_fireB, m_fireC, m_fireD, m_fireE, m_fireF;
wire m_up2, m_down2, m_left2, m_right2, m_fire2A, m_fire2B, m_fire2C, m_fire2D, m_fire2E, m_fire2F;
wire m_tilt, m_coin1, m_coin2, m_coin3, m_coin4, m_one_player, m_two_players, m_three_players, m_four_players;
arcade_inputs inputs (
.clk ( clk_sys ),
.key_strobe ( key_strobe ),
.key_pressed ( key_pressed ),
.key_code ( key_code ),
.joystick_0 ( joystick_0 ),
.joystick_1 ( joystick_1 ),
.rotate ( rotate ),
.orientation ( 2'b11 ),
.joyswap ( 1'b0 ),
.oneplayer ( 1'b1 ),
.controls ( {m_tilt, m_coin4, m_coin3, m_coin2, m_coin1, m_four_players, m_three_players, m_two_players, m_one_player} ),
.player1 ( {m_fireF, m_fireE, m_fireD, m_fireC, m_fireB, m_fireA, m_up, m_down, m_left, m_right} ),
.player2 ( {m_fire2F, m_fire2E, m_fire2D, m_fire2C, m_fire2B, m_fire2A, m_up2, m_down2, m_left2, m_right2} )
);
endmodule

View File

@@ -1,38 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity col_h is
port (
clk : in std_logic;
addr : in std_logic_vector(7 downto 0);
data : out std_logic_vector(3 downto 0)
);
end entity;
architecture prom of col_h is
type rom is array(0 to 255) of std_logic_vector(3 downto 0);
signal rom_data: rom := (
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0100","0100","0110","0100","0100","0100","0100",
"0001","0001","0010","0010","0011","0011","0011","0011","0110","0110","0011","0001","0001","0001","0001","0001",
"0000","0000","0000","0000","0000","0000","0000","0000","0100","0001","0001","0000","0000","0100","0011","0011",
"0010","0101","0101","0100","0100","0011","0111","0111","0110","0111","0111","0101","0101","0101","0101","0101",
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0010","0100","0110","0011","0011","0011","0011",
"0001","0101","0010","0101","0101","0101","0101","0101","0110","0101","0011","0001","0100","0100","0100","0100",
"0000","0000","0000","0000","0000","0000","0000","0000","0100","0001","0001","0010","0010","0100","0011","0011",
"0010","0101","0101","0001","0001","0011","0111","0111","0110","0111","0111","0111","0111","0101","0101","0101",
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0010","0010","0010","0101","0101","0101","0101",
"0000","0001","0010","0010","0000","0000","0000","0000","0000","0010","0011","0101","0010","0010","0010","0010",
"0000","0000","0000","0000","0000","0000","0000","0000","0100","0001","0001","0000","0000","0001","0011","0011",
"0010","0101","0101","0011","0011","0100","0111","0111","0110","0111","0111","0111","0111","0010","0101","0101",
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0100","0100","0100","0001","0001","0001","0001",
"0001","0110","0010","0101","0110","0110","0110","0110","0110","0011","0011","0001","0111","0111","0111","0111",
"0000","0000","0000","0000","0000","0000","0000","0000","0100","0001","0001","0001","0001","0001","0011","0011",
"0010","0101","0101","0100","0100","0100","0111","0111","0110","0111","0111","0101","0101","0010","0101","0101");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,38 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity col_l is
port (
clk : in std_logic;
addr : in std_logic_vector(7 downto 0);
data : out std_logic_vector(3 downto 0)
);
end entity;
architecture prom of col_l is
type rom is array(0 to 255) of std_logic_vector(3 downto 0);
signal rom_data: rom := (
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0100","0101","0110","0100","0100","0100","0100",
"0001","0001","0110","0010","0011","0011","0011","0011","0110","0110","0011","0001","0001","0001","0001","0001",
"0000","0000","0000","0000","0000","0000","0000","0000","0110","0001","0001","0000","0000","0100","0011","0011",
"0110","0101","0101","0100","0100","0011","0111","0111","0110","0111","0111","0101","0101","0101","0101","0101",
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0010","0101","0110","0011","0011","0011","0011",
"0001","0101","0110","0101","0101","0101","0101","0101","0110","0101","0011","0011","0100","0100","0100","0100",
"0000","0000","0000","0000","0000","0000","0000","0000","0110","0001","0001","0110","0110","0100","0011","0011",
"0110","0101","0101","0001","0001","0011","0111","0111","0110","0111","0111","0111","0111","0101","0101","0101",
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0010","0010","0010","0101","0101","0101","0101",
"0001","0001","0010","0010","0000","0000","0000","0000","0110","0010","0011","0101","0010","0010","0010","0010",
"0000","0000","0000","0000","0000","0000","0000","0000","0110","0001","0001","0000","0000","0001","0011","0011",
"0110","0101","0101","0011","0011","0100","0111","0111","0110","0111","0111","0111","0111","0010","0101","0101",
"0000","0000","0000","0000","0000","0000","0000","0000","0010","0100","0101","0111","0001","0001","0001","0001",
"0001","0110","0110","0101","0110","0110","0110","0110","0110","0011","0011","0011","0111","0111","0111","0111",
"0000","0000","0000","0000","0000","0000","0000","0000","0110","0001","0001","0011","0011","0001","0011","0011",
"0110","0101","0101","0100","0100","0100","0111","0111","0110","0111","0111","0101","0101","0010","0101","0101");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity ic23 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of ic23 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"7E",X"58",X"14",X"6D",X"FA",X"F0",X"E0",X"90",
X"0B",X"31",X"99",X"09",X"EB",X"FA",X"58",X"3F",X"10",X"10",X"90",X"70",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"0F",X"08",X"08",X"04",X"FF",X"FF",X"FF",X"7E",X"3F",X"1C",X"88",X"E4",
X"E0",X"F8",X"FC",X"FE",X"FE",X"FF",X"FF",X"FF",X"02",X"01",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"4A",X"0F",X"1F",X"3E",X"F4",X"D2",X"80",X"00",X"83",X"2B",X"3F",X"7E",X"F4",X"90",X"02",
X"06",X"07",X"37",X"53",X"B8",X"D8",X"24",X"D0",X"21",X"5C",X"39",X"2A",X"7C",X"EC",X"E2",X"40",
X"00",X"8A",X"AD",X"FF",X"FF",X"66",X"29",X"04",X"90",X"40",X"91",X"7F",X"FF",X"EA",X"10",X"40",
X"9A",X"7C",X"3D",X"98",X"32",X"38",X"1C",X"18",X"24",X"1C",X"38",X"10",X"39",X"5C",X"BA",X"10",
X"3E",X"99",X"FE",X"E0",X"16",X"C0",X"20",X"00",X"06",X"0F",X"1F",X"3E",X"7D",X"FB",X"F0",X"47",
X"02",X"30",X"0C",X"8E",X"1F",X"E1",X"BC",X"78",X"76",X"ED",X"BD",X"7F",X"D7",X"C9",X"E4",X"71",
X"09",X"03",X"66",X"1F",X"BA",X"64",X"58",X"30",X"E3",X"F1",X"F8",X"7C",X"7E",X"3F",X"1F",X"07",
X"17",X"1F",X"FF",X"7F",X"3F",X"9F",X"8F",X"C7",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"20",
X"80",X"E2",X"F4",X"5D",X"1E",X"0A",X"2A",X"10",X"08",X"62",X"78",X"BE",X"5F",X"0B",X"41",X"00",
X"24",X"4E",X"BC",X"72",X"3E",X"77",X"65",X"20",X"40",X"12",X"38",X"3C",X"9C",X"18",X"21",X"00",
X"02",X"10",X"44",X"18",X"31",X"80",X"08",X"40",X"20",X"04",X"50",X"12",X"08",X"24",X"01",X"10",
X"00",X"09",X"00",X"40",X"00",X"02",X"20",X"00",X"00",X"20",X"00",X"00",X"00",X"00",X"00",X"00",
X"C0",X"E0",X"FC",X"FF",X"F8",X"E0",X"C0",X"80",X"C0",X"E0",X"C0",X"80",X"C0",X"E0",X"E0",X"C0",
X"C0",X"C0",X"E0",X"F0",X"F0",X"E0",X"C0",X"80",X"80",X"80",X"80",X"80",X"80",X"80",X"80",X"80",
X"E0",X"C0",X"C0",X"C0",X"80",X"80",X"80",X"80",X"E0",X"E0",X"F0",X"F0",X"F0",X"F0",X"E0",X"E0",
X"F0",X"F0",X"F8",X"F8",X"F8",X"F8",X"F0",X"F0",X"80",X"80",X"80",X"C0",X"C0",X"C0",X"E0",X"E0",
X"00",X"00",X"00",X"08",X"00",X"00",X"00",X"00",X"00",X"00",X"08",X"1C",X"08",X"00",X"00",X"00",
X"00",X"08",X"08",X"3E",X"08",X"08",X"00",X"00",X"08",X"08",X"1C",X"7F",X"1C",X"08",X"08",X"00",
X"44",X"AA",X"AA",X"01",X"01",X"AA",X"AA",X"44",X"44",X"AA",X"82",X"01",X"01",X"82",X"AA",X"44",
X"44",X"82",X"82",X"01",X"01",X"82",X"82",X"44",X"40",X"80",X"80",X"00",X"00",X"80",X"80",X"00",
X"3C",X"6E",X"EF",X"EF",X"EF",X"EF",X"6E",X"3C",X"3C",X"66",X"E7",X"E7",X"E7",X"E7",X"66",X"3C",
X"3C",X"66",X"C3",X"C3",X"C3",X"C3",X"66",X"3C",X"E8",X"D0",X"F0",X"5E",X"70",X"30",X"30",X"10",
X"E8",X"C8",X"E4",X"C3",X"E3",X"C4",X"E8",X"C8",X"10",X"30",X"30",X"70",X"7E",X"D0",X"F0",X"C8",
X"73",X"06",X"04",X"0C",X"1E",X"30",X"7C",X"C0",X"18",X"18",X"70",X"00",X"00",X"70",X"18",X"18",
X"C0",X"7C",X"30",X"1E",X"0C",X"04",X"06",X"73",X"E0",X"E0",X"E0",X"E0",X"C0",X"C0",X"C0",X"C0",
X"C5",X"AB",X"AD",X"9D",X"9C",X"B4",X"B4",X"F0",X"F0",X"B4",X"B4",X"9C",X"9D",X"AD",X"AB",X"C5",
X"C0",X"C0",X"C0",X"C0",X"E0",X"E0",X"E0",X"E0",X"80",X"84",X"48",X"30",X"1F",X"30",X"48",X"84",
X"18",X"24",X"24",X"24",X"24",X"24",X"24",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"90",X"F0",X"F8",X"3F",X"00",X"00",X"00",X"00",X"00",X"02",X"3C",X"CC",X"14",X"24",X"48",X"88",
X"FF",X"FF",X"C1",X"80",X"80",X"00",X"00",X"00",X"08",X"08",X"08",X"0C",X"8F",X"8E",X"C6",X"FF",
X"08",X"08",X"D0",X"E0",X"78",X"1E",X"00",X"00",X"C0",X"80",X"80",X"E0",X"1B",X"0C",X"34",X"C4",
X"FF",X"FF",X"C3",X"81",X"80",X"00",X"00",X"00",X"00",X"01",X"01",X"03",X"83",X"83",X"C7",X"FF",
X"FF",X"08",X"10",X"20",X"C0",X"C0",X"60",X"30",X"00",X"30",X"60",X"C0",X"C0",X"A0",X"10",X"08",
X"FF",X"FF",X"C7",X"83",X"81",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"81",X"83",X"C7",X"FF",
X"C0",X"00",X"00",X"78",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"78",X"00",X"00",X"C0",X"FF",
X"1F",X"7E",X"3C",X"78",X"F0",X"FC",X"00",X"00",X"00",X"FC",X"F0",X"78",X"3C",X"FE",X"1F",X"FF",
X"1C",X"3E",X"7F",X"1F",X"7F",X"3E",X"1C",X"00",X"00",X"60",X"70",X"FF",X"70",X"60",X"00",X"00",
X"00",X"00",X"7E",X"07",X"7E",X"00",X"00",X"00",X"00",X"E0",X"F0",X"A0",X"00",X"00",X"00",X"00",
X"A0",X"00",X"40",X"00",X"00",X"00",X"00",X"00",X"F8",X"F4",X"E0",X"40",X"00",X"00",X"00",X"00",
X"00",X"00",X"60",X"80",X"10",X"00",X"00",X"00",X"0C",X"0E",X"5F",X"FB",X"B9",X"C8",X"E4",X"60",
X"00",X"0C",X"0E",X"2F",X"7F",X"7E",X"F2",X"FF",X"D0",X"A0",X"08",X"00",X"00",X"00",X"00",X"00",
X"FB",X"F0",X"D0",X"40",X"20",X"00",X"00",X"00",X"30",X"78",X"68",X"C0",X"40",X"00",X"00",X"00",
X"1E",X"3E",X"7F",X"FF",X"F5",X"F2",X"6A",X"B0",X"00",X"1C",X"3E",X"7F",X"7F",X"7A",X"FA",X"F0",
X"00",X"00",X"00",X"00",X"2A",X"00",X"00",X"00",X"00",X"00",X"00",X"2A",X"2A",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"E8",X"00",X"00",X"00",X"00",X"00",X"00",X"08",X"DC",X"08",X"00",X"00",
X"00",X"00",X"00",X"1C",X"DC",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",
X"57",X"07",X"57",X"07",X"57",X"07",X"56",X"FC",X"55",X"00",X"55",X"00",X"55",X"00",X"55",X"FF",
X"01",X"03",X"FF",X"FF",X"57",X"07",X"57",X"07",X"00",X"00",X"FF",X"FF",X"55",X"00",X"55",X"00",
X"00",X"00",X"FC",X"FF",X"FF",X"FC",X"00",X"00",X"00",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"00",
X"00",X"00",X"FF",X"00",X"AA",X"00",X"00",X"00",X"00",X"FF",X"00",X"2A",X"00",X"54",X"00",X"00",
X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"00",X"00",X"00",X"2A",X"00",X"00",X"00",X"00",
X"00",X"FF",X"FF",X"FF",X"FF",X"FF",X"00",X"00",X"04",X"04",X"06",X"06",X"07",X"07",X"00",X"00",
X"FF",X"FC",X"E0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"E0",X"FC",
X"FF",X"6F",X"C7",X"07",X"0F",X"1F",X"3E",X"00",X"00",X"00",X"3E",X"1F",X"0F",X"07",X"C7",X"6F",
X"E0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"79",X"00",X"F0",X"00",X"00",X"00",X"00",X"F8",X"00",X"F8",X"00",X"00",X"00",X"00",X"F0",X"00",
X"00",X"80",X"80",X"C0",X"E0",X"C0",X"80",X"80",X"00",X"80",X"80",X"C4",X"EE",X"C4",X"80",X"80",
X"00",X"80",X"80",X"CE",X"EE",X"CE",X"80",X"80",X"00",X"80",X"8E",X"DF",X"FF",X"DF",X"8E",X"80",
X"FE",X"88",X"88",X"90",X"E0",X"80",X"80",X"00",X"00",X"00",X"80",X"80",X"E0",X"90",X"88",X"88",
X"3F",X"08",X"08",X"04",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"04",X"08",X"08",
X"01",X"02",X"04",X"08",X"10",X"20",X"40",X"80",X"01",X"02",X"04",X"08",X"10",X"20",X"40",X"80",
X"03",X"0C",X"30",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"0C",X"30",X"C0",
X"0F",X"F0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0F",X"F0",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"0F",X"F0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0F",X"F0",
X"80",X"40",X"20",X"10",X"08",X"04",X"02",X"01",X"80",X"40",X"20",X"10",X"08",X"04",X"02",X"01",
X"00",X"00",X"00",X"00",X"C0",X"30",X"0C",X"03",X"C0",X"30",X"0C",X"03",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"F0",X"0F",X"00",X"00",X"00",X"00",X"F0",X"0F",X"00",X"00",
X"00",X"00",X"F0",X"0F",X"00",X"00",X"00",X"00",X"F0",X"0F",X"00",X"00",X"00",X"00",X"00",X"00",
X"80",X"C0",X"E0",X"C0",X"80",X"80",X"80",X"00",X"E0",X"C0",X"80",X"80",X"80",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"C0",X"00",X"00",X"80",X"80",X"80",X"C0",X"E0",X"C0",
X"80",X"80",X"80",X"C0",X"E0",X"C0",X"80",X"80",X"A0",X"F0",X"60",X"C0",X"80",X"80",X"80",X"00",
X"00",X"00",X"80",X"80",X"80",X"C0",X"60",X"F0",X"60",X"C0",X"80",X"80",X"80",X"00",X"00",X"00",
X"80",X"80",X"80",X"C0",X"60",X"F0",X"A0",X"F0",X"80",X"C0",X"60",X"F0",X"A0",X"F0",X"60",X"C0",
X"60",X"F0",X"A0",X"F0",X"60",X"C0",X"80",X"80",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"C0",
X"E0",X"70",X"78",X"EE",X"B8",X"EE",X"78",X"70",X"78",X"EE",X"B8",X"EE",X"78",X"70",X"E0",X"C0",
X"80",X"80",X"80",X"80",X"C0",X"C0",X"E0",X"70",X"B8",X"EE",X"78",X"70",X"E0",X"C0",X"C0",X"80",
X"80",X"80",X"C0",X"C0",X"E0",X"70",X"78",X"EE",X"78",X"70",X"E0",X"C0",X"C0",X"80",X"80",X"80",
X"C0",X"C0",X"E0",X"70",X"78",X"EE",X"B8",X"EE",X"70",X"5E",X"E0",X"E0",X"C0",X"C0",X"80",X"80",
X"00",X"80",X"80",X"C0",X"C0",X"E0",X"F0",X"5E",X"03",X"07",X"03",X"01",X"03",X"01",X"03",X"03",
X"03",X"03",X"03",X"01",X"03",X"01",X"03",X"07",X"7F",X"70",X"7F",X"D0",X"F8",X"E0",X"C0",X"80",
X"00",X"00",X"00",X"80",X"C0",X"E0",X"F8",X"D0",X"1E",X"0F",X"1E",X"0C",X"07",X"03",X"0F",X"07",
X"0E",X"07",X"0F",X"07",X"0F",X"03",X"07",X"0C",X"18",X"0C",X"18",X"0C",X"07",X"03",X"0F",X"07",
X"F0",X"FF",X"D0",X"F8",X"E0",X"C0",X"80",X"80",X"00",X"00",X"00",X"00",X"80",X"F0",X"A0",X"FE",
X"3C",X"1E",X"3C",X"1D",X"0F",X"07",X"0F",X"03",X"18",X"3C",X"1C",X"3E",X"1F",X"3F",X"0F",X"19",
X"F0",X"FE",X"A0",X"F0",X"80",X"00",X"00",X"00",X"80",X"80",X"80",X"C0",X"E0",X"F8",X"D0",X"FF",
X"3C",X"19",X"0F",X"3F",X"1F",X"3E",X"1C",X"3C",X"07",X"03",X"0F",X"07",X"0F",X"1D",X"3C",X"1E",
X"D0",X"F8",X"E0",X"C0",X"80",X"80",X"80",X"80",X"00",X"00",X"80",X"F0",X"A0",X"FE",X"F0",X"FF",
X"3C",X"1D",X"0F",X"07",X"0F",X"03",X"07",X"03",X"1C",X"3E",X"1F",X"3F",X"0F",X"19",X"3C",X"1E",
X"A0",X"F0",X"80",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"E0",X"F8",X"D0",X"FF",X"F0",X"FE",
X"0F",X"3F",X"1F",X"3E",X"1C",X"3C",X"18",X"38",X"0F",X"07",X"0F",X"1D",X"3C",X"1E",X"3C",X"19",
X"80",X"F0",X"A0",X"FE",X"F0",X"FF",X"D0",X"F8",X"0F",X"07",X"0F",X"03",X"07",X"03",X"07",X"03",
X"1F",X"3F",X"0F",X"19",X"3C",X"1E",X"3C",X"1D",X"E0",X"F8",X"D0",X"FF",X"F0",X"FE",X"A0",X"F0",
X"1F",X"3E",X"1C",X"3C",X"18",X"38",X"30",X"70",X"0F",X"1D",X"3C",X"1E",X"3C",X"19",X"0F",X"3F",
X"A0",X"FE",X"F0",X"FF",X"D0",X"F8",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"F0",
X"0F",X"19",X"3C",X"1E",X"3C",X"1D",X"0F",X"07",X"30",X"38",X"18",X"3C",X"1C",X"3E",X"1F",X"3F",
X"D0",X"FF",X"F0",X"FE",X"A0",X"F0",X"80",X"00",X"80",X"80",X"80",X"80",X"80",X"C0",X"E0",X"F8",
X"3C",X"1E",X"3C",X"19",X"0F",X"3F",X"1F",X"3E",X"07",X"03",X"07",X"03",X"0F",X"07",X"0F",X"1D",
X"30",X"B0",X"E0",X"E0",X"C0",X"E0",X"F8",X"D0",X"90",X"A0",X"F0",X"E0",X"E0",X"E0",X"F8",X"D0",
X"A4",X"EC",X"C8",X"90",X"AC",X"08",X"98",X"50",X"C4",X"8C",X"A8",X"14",X"3C",X"64",X"5C",X"98",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"02",X"06",X"06",X"0A",X"0A",X"12",X"34",X"08",X"0A",X"0F",X"0F",X"0E",X"0E",X"0E",X"06",
X"03",X"07",X"0D",X"2A",X"3A",X"3A",X"76",X"D6",X"08",X"09",X"0E",X"0F",X"0F",X"0E",X"0C",X"06",
X"48",X"6C",X"3C",X"1C",X"1E",X"0E",X"06",X"02",X"00",X"80",X"80",X"60",X"30",X"98",X"90",X"D8",
X"8E",X"C6",X"44",X"56",X"72",X"2B",X"0B",X"06",X"00",X"80",X"E0",X"A0",X"B8",X"1C",X"1C",X"08",
X"0A",X"01",X"0C",X"04",X"0E",X"0E",X"0D",X"0C",X"0E",X"07",X"09",X"00",X"08",X"0C",X"0D",X"0F",
X"03",X"03",X"03",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"02",X"03",X"03",
X"0C",X"08",X"08",X"08",X"08",X"08",X"08",X"08",X"0F",X"07",X"0E",X"06",X"0E",X"0C",X"0C",X"0C",
X"08",X"08",X"0C",X"0C",X"0C",X"0C",X"0E",X"06",X"80",X"C0",X"C0",X"C0",X"60",X"60",X"60",X"70",
X"03",X"03",X"03",X"01",X"01",X"01",X"01",X"01",X"07",X"03",X"07",X"03",X"03",X"03",X"03",X"03",
X"C0",X"C0",X"60",X"60",X"60",X"70",X"30",X"38",X"C0",X"C0",X"80",X"80",X"80",X"00",X"00",X"00",
X"18",X"38",X"30",X"70",X"60",X"60",X"60",X"C0",X"03",X"03",X"03",X"03",X"03",X"03",X"07",X"03",
X"00",X"01",X"01",X"01",X"01",X"01",X"03",X"03",X"03",X"01",X"01",X"01",X"01",X"01",X"00",X"00",
X"60",X"60",X"60",X"70",X"30",X"38",X"18",X"3C",X"30",X"70",X"60",X"60",X"60",X"C0",X"C0",X"C0",
X"03",X"03",X"03",X"03",X"07",X"03",X"07",X"03",X"01",X"01",X"01",X"01",X"03",X"03",X"03",X"03",
X"03",X"03",X"03",X"03",X"03",X"01",X"01",X"01",X"60",X"70",X"30",X"38",X"18",X"3C",X"1C",X"3E",
X"80",X"80",X"80",X"C0",X"C0",X"C0",X"60",X"60",X"60",X"60",X"60",X"C0",X"C0",X"C0",X"80",X"80",
X"03",X"03",X"07",X"03",X"07",X"03",X"0F",X"07",X"01",X"01",X"03",X"03",X"03",X"03",X"03",X"03",
X"03",X"03",X"03",X"01",X"01",X"01",X"01",X"01",X"0F",X"03",X"07",X"03",X"07",X"03",X"03",X"03",
X"00",X"00",X"00",X"08",X"08",X"08",X"08",X"08",X"1C",X"3C",X"18",X"38",X"30",X"70",X"60",X"60",
X"00",X"00",X"00",X"01",X"01",X"01",X"01",X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"00",X"00",X"00",X"00",X"00",
X"80",X"80",X"80",X"80",X"80",X"00",X"00",X"00",X"E0",X"C0",X"C0",X"80",X"80",X"80",X"80",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",
X"00",X"00",X"80",X"80",X"80",X"80",X"C0",X"C0",X"03",X"03",X"03",X"03",X"03",X"03",X"03",X"03");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity ic24 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of ic24 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"88",X"B1",X"E0",X"A0",X"88",X"60",X"84",X"00",
X"00",X"01",X"08",X"01",X"88",X"44",X"F4",X"C8",X"18",X"1C",X"9C",X"FE",X"FE",X"7E",X"1E",X"00",
X"00",X"78",X"7E",X"7F",X"7F",X"38",X"38",X"1C",X"20",X"10",X"88",X"C1",X"E1",X"70",X"38",X"1C",
X"00",X"00",X"20",X"90",X"48",X"24",X"90",X"48",X"0E",X"07",X"03",X"01",X"00",X"00",X"00",X"00",
X"00",X"00",X"02",X"0C",X"18",X"20",X"00",X"00",X"00",X"00",X"00",X"0E",X"24",X"00",X"00",X"00",
X"00",X"02",X"02",X"00",X"10",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"28",X"60",X"C0",X"00",
X"00",X"00",X"00",X"46",X"23",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"68",X"00",X"00",X"00",
X"00",X"00",X"08",X"08",X"10",X"08",X"08",X"00",X"00",X"08",X"08",X"00",X"10",X"08",X"00",X"00",
X"C8",X"F0",X"44",X"00",X"00",X"80",X"00",X"00",X"5F",X"7F",X"FF",X"FF",X"FE",X"FD",X"FF",X"FC",
X"00",X"00",X"00",X"04",X"02",X"0E",X"13",X"27",X"08",X"56",X"13",X"00",X"40",X"00",X"40",X"00",
X"00",X"00",X"01",X"08",X"11",X"03",X"07",X"1D",X"0E",X"07",X"13",X"09",X"04",X"02",X"00",X"00",
X"10",X"00",X"80",X"C4",X"E2",X"71",X"38",X"1C",X"00",X"00",X"00",X"00",X"80",X"C0",X"60",X"30",
X"00",X"40",X"40",X"14",X"08",X"00",X"00",X"00",X"00",X"00",X"20",X"18",X"02",X"00",X"00",X"00",
X"00",X"04",X"00",X"3C",X"14",X"20",X"00",X"00",X"00",X"00",X"10",X"08",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"02",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"08",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"60",X"3C",X"0F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"08",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"08",X"00",X"00",X"00",X"00",
X"00",X"00",X"08",X"1C",X"08",X"00",X"00",X"00",X"00",X"00",X"1C",X"1C",X"1C",X"00",X"00",X"00",
X"BB",X"55",X"55",X"E6",X"E6",X"55",X"55",X"BB",X"BB",X"55",X"65",X"C2",X"C2",X"65",X"55",X"BB",
X"BB",X"65",X"41",X"80",X"80",X"41",X"65",X"BB",X"83",X"01",X"00",X"80",X"80",X"00",X"01",X"83",
X"3C",X"42",X"91",X"91",X"91",X"91",X"42",X"3C",X"3C",X"42",X"99",X"99",X"99",X"99",X"42",X"3C",
X"3C",X"42",X"99",X"BD",X"BD",X"99",X"42",X"3C",X"98",X"90",X"D0",X"51",X"70",X"30",X"30",X"10",
X"18",X"18",X"1C",X"1F",X"1F",X"1C",X"18",X"18",X"10",X"30",X"30",X"70",X"51",X"D0",X"90",X"98",
X"8F",X"FE",X"FC",X"FC",X"F8",X"F0",X"E0",X"C0",X"87",X"87",X"8F",X"FC",X"FF",X"8C",X"87",X"87",
X"C0",X"E0",X"F0",X"F8",X"FC",X"FC",X"FE",X"8F",X"E0",X"E0",X"E0",X"E0",X"C0",X"C0",X"C0",X"C0",
X"BB",X"D6",X"D4",X"E8",X"F8",X"D0",X"F0",X"B0",X"B0",X"F0",X"D0",X"F8",X"E8",X"D4",X"D6",X"BB",
X"C0",X"C0",X"C0",X"C0",X"E0",X"E0",X"E0",X"E0",X"80",X"84",X"C8",X"F0",X"F0",X"F0",X"C8",X"84",
X"18",X"3C",X"3C",X"3C",X"3C",X"3C",X"3C",X"18",X"80",X"80",X"80",X"80",X"80",X"80",X"80",X"80",
X"EC",X"EE",X"FF",X"3F",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"00",X"E0",X"D0",X"B0",X"74",
X"07",X"03",X"01",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"0F",X"0F",X"0C",X"0F",X"07",X"07",
X"F0",X"F4",X"EC",X"FE",X"7E",X"1E",X"00",X"00",X"C0",X"C0",X"E0",X"00",X"E0",X"F0",X"C8",X"38",
X"07",X"07",X"03",X"01",X"00",X"00",X"00",X"00",X"00",X"01",X"01",X"03",X"03",X"03",X"07",X"07",
X"00",X"F0",X"E8",X"D8",X"B0",X"F0",X"70",X"30",X"00",X"30",X"70",X"F0",X"B8",X"D8",X"E8",X"F0",
X"07",X"07",X"07",X"03",X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"01",X"03",X"07",X"07",
X"0C",X"18",X"31",X"79",X"01",X"01",X"FF",X"FF",X"00",X"00",X"00",X"78",X"30",X"18",X"0C",X"00",
X"00",X"F8",X"00",X"00",X"00",X"FC",X"FF",X"FF",X"00",X"FC",X"00",X"00",X"00",X"F8",X"00",X"FC",
X"DC",X"3E",X"7F",X"FF",X"7F",X"3E",X"DC",X"00",X"00",X"60",X"70",X"00",X"70",X"60",X"00",X"00",
X"E0",X"78",X"00",X"F8",X"00",X"78",X"E0",X"00",X"0E",X"5E",X"0C",X"58",X"F8",X"F0",X"B0",X"80",
X"FE",X"F8",X"FC",X"FE",X"7E",X"3C",X"30",X"00",X"6F",X"DF",X"FE",X"FE",X"EE",X"CC",X"00",X"00",
X"37",X"7F",X"9E",X"78",X"FC",X"FC",X"B8",X"90",X"00",X"00",X"00",X"04",X"26",X"37",X"9F",X"FF",
X"00",X"00",X"00",X"02",X"04",X"29",X"0D",X"12",X"EF",X"7E",X"FE",X"FC",X"7C",X"30",X"00",X"00",
X"2E",X"7F",X"EF",X"FE",X"FA",X"78",X"30",X"00",X"02",X"07",X"17",X"3E",X"B8",X"FC",X"EC",X"40",
X"00",X"18",X"00",X"0C",X"2A",X"9D",X"95",X"EF",X"00",X"00",X"14",X"00",X"28",X"05",X"0F",X"3F",
X"00",X"00",X"00",X"FF",X"FF",X"FF",X"00",X"00",X"00",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"00",
X"00",X"00",X"00",X"1C",X"1C",X"1C",X"00",X"00",X"00",X"00",X"08",X"1C",X"3E",X"1C",X"08",X"00",
X"00",X"00",X"1C",X"3E",X"3E",X"3E",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"F8",X"F8",X"F8",X"F8",X"F8",X"F8",X"F8",X"00",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",X"00",
X"FE",X"FC",X"00",X"00",X"F8",X"F8",X"F8",X"F8",X"FF",X"FF",X"00",X"00",X"FF",X"FF",X"FF",X"FF",
X"00",X"00",X"00",X"50",X"50",X"03",X"FC",X"00",X"00",X"00",X"00",X"54",X"54",X"00",X"00",X"FF",
X"00",X"00",X"00",X"FF",X"FF",X"FF",X"FF",X"00",X"00",X"00",X"FF",X"FF",X"FF",X"FF",X"FF",X"FF",
X"00",X"00",X"54",X"54",X"00",X"54",X"54",X"00",X"FF",X"00",X"FF",X"FF",X"FF",X"00",X"00",X"00",
X"FF",X"00",X"00",X"00",X"2A",X"00",X"00",X"FF",X"04",X"04",X"06",X"06",X"07",X"07",X"FF",X"00",
X"F0",X"00",X"00",X"30",X"00",X"C0",X"00",X"00",X"00",X"00",X"00",X"C0",X"00",X"30",X"00",X"00",
X"00",X"00",X"00",X"01",X"00",X"00",X"00",X"3F",X"00",X"3F",X"00",X"00",X"00",X"01",X"00",X"00",
X"1F",X"F0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"F0",
X"7E",X"3F",X"FF",X"7F",X"7C",X"70",X"60",X"00",X"00",X"00",X"60",X"70",X"7C",X"7F",X"FF",X"3F",
X"00",X"00",X"0E",X"1F",X"1F",X"1F",X"0E",X"00",X"00",X"00",X"0E",X"1F",X"1F",X"1F",X"0E",X"00",
X"00",X"00",X"0E",X"1F",X"1F",X"1F",X"0E",X"00",X"00",X"00",X"0E",X"1F",X"1F",X"1F",X"0E",X"00",
X"F7",X"81",X"81",X"82",X"02",X"84",X"A8",X"E0",X"00",X"E0",X"98",X"84",X"02",X"82",X"81",X"81",
X"77",X"40",X"40",X"20",X"20",X"10",X"0C",X"03",X"00",X"03",X"0C",X"10",X"20",X"20",X"40",X"40",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"00",X"80",X"80",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"00",X"80",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"80",X"80",X"80",X"80",X"80",X"80",
X"00",X"00",X"00",X"20",X"00",X"00",X"00",X"00",X"20",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"20",X"00",
X"00",X"00",X"00",X"00",X"20",X"00",X"00",X"00",X"00",X"40",X"10",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"10",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"10",X"40",X"10",X"00",X"00",X"00",X"10",X"40",X"10",X"00",X"00",
X"00",X"10",X"40",X"10",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"16",X"40",X"16",X"00",X"00",X"00",X"16",X"40",X"16",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"40",X"16",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"80",X"00",X"00",X"96",X"00",X"00",X"80",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"80",X"00",X"00",X"96",X"40",X"96",X"80",X"AE",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"AE",X"00",X"04",X"00",X"00",X"02",X"00",X"02",X"00",
X"00",X"00",X"02",X"00",X"02",X"00",X"00",X"04",X"8F",X"80",X"8F",X"20",X"18",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"20",X"19",X"00",X"19",X"03",X"00",X"00",X"0C",X"00",
X"0C",X"00",X"0C",X"00",X"0C",X"00",X"00",X"03",X"17",X"03",X"17",X"03",X"00",X"00",X"0C",X"00",
X"00",X"0F",X"20",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"40",X"1E",
X"33",X"01",X"33",X"02",X"00",X"00",X"0C",X"00",X"00",X"30",X"00",X"30",X"00",X"30",X"00",X"06",
X"00",X"1E",X"40",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"20",X"0F",
X"33",X"06",X"00",X"30",X"00",X"30",X"00",X"30",X"06",X"00",X"0C",X"00",X"00",X"02",X"33",X"01",
X"20",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"40",X"1E",X"00",X"0F",
X"33",X"02",X"00",X"00",X"0C",X"00",X"06",X"00",X"00",X"30",X"00",X"30",X"00",X"06",X"33",X"01",
X"40",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"20",X"0F",X"00",X"1E",
X"00",X"30",X"00",X"30",X"00",X"30",X"00",X"00",X"0C",X"00",X"00",X"02",X"33",X"01",X"33",X"06",
X"00",X"30",X"40",X"1E",X"00",X"0F",X"20",X"18",X"00",X"00",X"0C",X"00",X"06",X"00",X"06",X"00",
X"00",X"30",X"00",X"06",X"33",X"01",X"33",X"02",X"00",X"18",X"20",X"0F",X"00",X"1E",X"40",X"30",
X"00",X"30",X"00",X"30",X"00",X"00",X"00",X"00",X"00",X"02",X"33",X"01",X"33",X"06",X"00",X"30",
X"40",X"1E",X"00",X"0F",X"20",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",
X"00",X"06",X"33",X"01",X"33",X"02",X"00",X"00",X"00",X"00",X"00",X"30",X"00",X"30",X"00",X"30",
X"20",X"0F",X"00",X"1E",X"40",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",
X"33",X"01",X"33",X"06",X"00",X"30",X"00",X"30",X"06",X"00",X"06",X"00",X"0C",X"00",X"00",X"02",
X"F0",X"F0",X"E0",X"E0",X"00",X"00",X"18",X"20",X"F0",X"E0",X"F0",X"60",X"60",X"00",X"18",X"20",
X"BC",X"FC",X"F8",X"F2",X"EC",X"F8",X"F8",X"F0",X"FC",X"FC",X"FC",X"F4",X"FC",X"FC",X"FC",X"F8",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"02",X"16",X"06",X"0E",X"0E",X"1E",X"3C",X"00",X"02",X"03",X"03",X"03",X"03",X"01",X"01",
X"03",X"07",X"4F",X"2E",X"3E",X"3E",X"7E",X"FE",X"00",X"01",X"03",X"03",X"03",X"03",X"03",X"01",
X"78",X"7C",X"3C",X"1C",X"1E",X"0E",X"26",X"02",X"00",X"80",X"80",X"E0",X"F0",X"F8",X"F4",X"F8",
X"FE",X"FE",X"73",X"7E",X"7E",X"AF",X"0F",X"06",X"00",X"80",X"E4",X"E0",X"F8",X"FC",X"FC",X"F8",
X"02",X"07",X"07",X"07",X"03",X"03",X"01",X"00",X"02",X"03",X"07",X"07",X"07",X"07",X"07",X"03",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"00",X"0C",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"00",X"06",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"06",X"00",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"00",X"30",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"06",X"00",X"06",X"00",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"00",X"06",X"00",X"06",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity ic39 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of ic39 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"7C",X"12",X"12",X"12",X"7E",X"7C",X"00",
X"00",X"34",X"4A",X"4A",X"4A",X"7E",X"7E",X"00",X"00",X"24",X"42",X"42",X"42",X"7E",X"3C",X"00",
X"00",X"3C",X"42",X"42",X"42",X"7E",X"7E",X"00",X"00",X"42",X"4A",X"4A",X"4A",X"7E",X"7E",X"00",
X"00",X"02",X"0A",X"0A",X"0A",X"7E",X"7E",X"00",X"00",X"34",X"52",X"52",X"42",X"7E",X"3C",X"00",
X"00",X"7E",X"08",X"08",X"08",X"7E",X"7E",X"00",X"00",X"42",X"42",X"7E",X"7E",X"42",X"42",X"00",
X"00",X"7E",X"7E",X"7E",X"40",X"40",X"30",X"00",X"00",X"42",X"24",X"18",X"08",X"7E",X"7E",X"00",
X"00",X"40",X"40",X"40",X"40",X"7E",X"7E",X"00",X"00",X"7E",X"02",X"7C",X"02",X"7E",X"7E",X"00",
X"00",X"7E",X"20",X"18",X"04",X"7E",X"7E",X"00",X"00",X"3C",X"42",X"42",X"42",X"7E",X"3C",X"00",
X"00",X"0C",X"12",X"12",X"12",X"7E",X"7E",X"00",X"00",X"40",X"3C",X"62",X"42",X"7E",X"3C",X"00",
X"00",X"44",X"2A",X"1A",X"0A",X"7E",X"7E",X"00",X"00",X"34",X"72",X"4A",X"4A",X"4E",X"2C",X"00",
X"00",X"02",X"02",X"7E",X"7E",X"02",X"02",X"00",X"00",X"3E",X"40",X"40",X"40",X"7E",X"7E",X"00",
X"00",X"1E",X"20",X"40",X"20",X"3E",X"1E",X"00",X"00",X"3E",X"40",X"38",X"40",X"7E",X"3E",X"00",
X"00",X"42",X"26",X"1C",X"38",X"74",X"62",X"00",X"00",X"06",X"08",X"70",X"08",X"0E",X"06",X"00",
X"00",X"42",X"46",X"4E",X"5A",X"72",X"62",X"00",X"00",X"00",X"00",X"18",X"18",X"00",X"00",X"00",
X"00",X"00",X"18",X"24",X"24",X"18",X"00",X"00",X"00",X"00",X"42",X"66",X"3C",X"18",X"00",X"00",
X"00",X"00",X"00",X"18",X"3C",X"66",X"42",X"00",X"00",X"00",X"24",X"18",X"7E",X"18",X"24",X"00",
X"00",X"00",X"3C",X"46",X"4A",X"52",X"3C",X"00",X"00",X"00",X"40",X"40",X"7E",X"42",X"44",X"00",
X"00",X"00",X"64",X"4A",X"52",X"62",X"44",X"00",X"00",X"00",X"34",X"4A",X"4A",X"4A",X"42",X"00",
X"00",X"00",X"08",X"7E",X"08",X"08",X"0E",X"00",X"00",X"00",X"30",X"4A",X"4A",X"4A",X"4E",X"00",
X"00",X"00",X"30",X"4A",X"4A",X"4A",X"3C",X"00",X"00",X"00",X"06",X"1A",X"32",X"62",X"06",X"00",
X"00",X"00",X"34",X"4A",X"4A",X"4A",X"34",X"00",X"00",X"00",X"3C",X"52",X"52",X"52",X"0C",X"00",
X"00",X"00",X"60",X"F8",X"FF",X"F8",X"60",X"00",X"00",X"00",X"08",X"08",X"08",X"08",X"08",X"00",
X"3C",X"42",X"81",X"81",X"81",X"81",X"42",X"3C",X"00",X"18",X"3C",X"66",X"66",X"3C",X"18",X"00",
X"00",X"3C",X"42",X"5A",X"5A",X"42",X"3C",X"00",X"00",X"00",X"06",X"09",X"51",X"01",X"02",X"00",
X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"FF",
X"00",X"40",X"12",X"4B",X"A7",X"14",X"40",X"80",X"00",X"00",X"00",X"00",X"00",X"C0",X"FF",X"C0",
X"80",X"50",X"2C",X"54",X"A3",X"04",X"10",X"40",X"00",X"00",X"00",X"00",X"C0",X"FF",X"C0",X"00",
X"AB",X"55",X"23",X"0C",X"04",X"10",X"00",X"00",X"00",X"00",X"00",X"C0",X"FF",X"C0",X"00",X"00",
X"00",X"00",X"C0",X"FF",X"C0",X"00",X"00",X"00",X"00",X"00",X"10",X"04",X"0C",X"02",X"AA",X"5D",
X"00",X"C0",X"FF",X"C0",X"00",X"00",X"00",X"00",X"1D",X"23",X"48",X"0C",X"00",X"00",X"00",X"00",
X"C0",X"FF",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"08",X"80",X"11",X"2B",
X"FF",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",
X"FF",X"7F",X"7C",X"78",X"78",X"00",X"00",X"00",X"00",X"00",X"78",X"78",X"7C",X"7F",X"FF",X"FF",
X"7F",X"7C",X"78",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"78",X"7C",X"7F",X"FF",X"FF",X"FF",
X"7C",X"78",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"78",X"7C",X"7F",X"FF",X"FF",X"FF",X"7F",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"78",X"7E",X"FF",X"FF",X"FF",X"7E",X"78",
X"78",X"7E",X"FF",X"FF",X"FF",X"7E",X"78",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"7F",X"FF",X"FF",X"FF",X"7F",X"7C",X"78",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"78",X"7C",
X"FF",X"FF",X"FF",X"7F",X"7C",X"78",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"78",X"7C",X"7F",
X"FF",X"FF",X"7F",X"7C",X"78",X"78",X"00",X"00",X"00",X"00",X"00",X"78",X"78",X"7C",X"7F",X"FF",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",
X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",
X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",
X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"0E",X"00",X"00",X"00",X"00",X"00",X"03",X"0E",X"03",X"00",
X"00",X"00",X"00",X"0E",X"00",X"00",X"00",X"00",X"03",X"0E",X"03",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"E0",X"00",X"00",X"00",X"00",X"00",X"30",X"E0",X"30",X"00",
X"00",X"00",X"00",X"E0",X"00",X"00",X"00",X"00",X"30",X"E0",X"30",X"00",X"00",X"00",X"00",X"00",
X"03",X"03",X"FF",X"FF",X"03",X"03",X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",
X"FF",X"FF",X"03",X"03",X"07",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"03",X"03",
X"03",X"03",X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"03",X"03",X"FF",X"FF",
X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"03",X"03",X"FF",X"FF",X"03",X"03",
X"0C",X"0C",X"FC",X"FC",X"0C",X"0C",X"38",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"38",
X"FC",X"FC",X"0C",X"0C",X"38",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"38",X"0C",X"0C",
X"0C",X"0C",X"38",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"38",X"0C",X"0C",X"FC",X"FC",
X"38",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"38",X"0C",X"0C",X"FC",X"FC",X"0C",X"0C",
X"06",X"0F",X"1F",X"1F",X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"1C",
X"1F",X"1F",X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"0F",
X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"0F",X"1F",X"1F",
X"07",X"05",X"02",X"02",X"02",X"07",X"00",X"00",X"00",X"00",X"06",X"0F",X"1F",X"1F",X"0F",X"06",
X"00",X"18",X"3F",X"3F",X"18",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"03",X"03",
X"3F",X"3F",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",
X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"3F",X"3F",
X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",X"00",X"18",X"3F",X"3F",X"18",X"00",
X"30",X"30",X"F0",X"F0",X"30",X"30",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",
X"F0",X"F0",X"30",X"30",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"30",
X"30",X"30",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"30",X"F0",X"F0",
X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"30",X"F0",X"F0",X"30",X"30",
X"C0",X"C0",X"C0",X"C0",X"C0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",
X"C0",X"C0",X"C0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",
X"C0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",X"C0",X"C0",
X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",X"C0",X"C0",X"C0",X"C0",
X"00",X"00",X"7F",X"7F",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"7B",X"87",
X"7F",X"7F",X"00",X"00",X"00",X"00",X"00",X"00",X"0E",X"09",X"01",X"01",X"09",X"0E",X"00",X"00",
X"22",X"22",X"03",X"03",X"22",X"22",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"7F",X"7F",
X"04",X"08",X"0F",X"0F",X"08",X"84",X"87",X"7B",X"00",X"00",X"00",X"00",X"7F",X"7F",X"00",X"00",
X"00",X"00",X"FF",X"FF",X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",
X"FF",X"FF",X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",
X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"FF",X"FF",
X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"FF",X"FF",X"00",X"00",
X"78",X"7C",X"7C",X"7C",X"7C",X"78",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",
X"7C",X"7C",X"7C",X"78",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"78",X"7C",
X"7C",X"78",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"78",X"7C",X"7C",X"7C",
X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"78",X"7C",X"7C",X"7C",X"7C",X"78",
X"E0",X"F0",X"F0",X"F0",X"F0",X"E0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",
X"C0",X"C0",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",
X"F0",X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"F0",X"F0",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",X"C0",X"C0",X"80",
X"1E",X"1F",X"1F",X"1F",X"1F",X"1E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",
X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"C0",X"C0",
X"07",X"07",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"07",X"07",X"07",X"07",
X"00",X"00",X"08",X"04",X"08",X"14",X"08",X"00",X"00",X"00",X"08",X"26",X"10",X"26",X"0C",X"00",
X"01",X"01",X"01",X"01",X"01",X"01",X"00",X"00",X"00",X"00",X"2C",X"00",X"4D",X"20",X"14",X"00",
X"07",X"07",X"07",X"07",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"07",X"07",
X"01",X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"01",X"01",X"01",X"01",
X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"07",X"07",X"07",X"07",X"07",X"07",
X"0F",X"0F",X"0F",X"0F",X"0F",X"0F",X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",
X"0F",X"0F",X"0F",X"0F",X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"0F",X"0F",
X"1F",X"1F",X"1E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"1E",X"1F",X"1F",X"1F",X"1F",
X"0E",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0E",X"0F",X"0F",X"0F",X"0F",X"0F",X"0F",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"14",X"20",X"05",X"2A",X"00",X"32",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"8C",X"C2",X"C0",X"F0",X"3A",X"38",X"0C",X"46",X"0C",X"80",X"FC",X"FF",X"F0",X"82",X"F0",X"38",
X"05",X"1C",X"78",X"F2",X"F0",X"C4",X"98",X"72",X"3F",X"3D",X"2D",X"66",X"26",X"43",X"12",X"20",
X"3B",X"3B",X"75",X"EE",X"F5",X"3B",X"7B",X"9F",X"20",X"09",X"2C",X"84",X"44",X"ED",X"6D",X"7F",
X"E2",X"80",X"0C",X"1E",X"1E",X"8C",X"00",X"00",X"F8",X"78",X"B0",X"60",X"F3",X"DB",X"D8",X"30",
X"0C",X"1E",X"0C",X"80",X"C0",X"C0",X"64",X"B2",X"77",X"27",X"03",X"20",X"00",X"08",X"1C",X"08",
X"EF",X"F9",X"77",X"37",X"7C",X"DF",X"EB",X"7D",X"20",X"41",X"04",X"31",X"7B",X"71",X"33",X"6F",
X"00",X"00",X"04",X"00",X"24",X"0E",X"04",X"00",X"00",X"06",X"16",X"00",X"02",X"00",X"00",X"00",
X"00",X"00",X"40",X"00",X"00",X"68",X"00",X"00",X"00",X"60",X"F4",X"60",X"00",X"20",X"00",X"00",
X"B8",X"FC",X"4C",X"F8",X"F0",X"C8",X"C0",X"80",X"FC",X"3E",X"D6",X"DB",X"FB",X"F7",X"FE",X"DC",
X"C0",X"E8",X"E0",X"70",X"F8",X"F4",X"2C",X"F8",X"9F",X"BF",X"77",X"F7",X"E6",X"FC",X"F0",X"E2",
X"C0",X"E2",X"B8",X"9E",X"E7",X"97",X"D7",X"DF",X"E3",X"F3",X"7E",X"1E",X"0C",X"00",X"30",X"30",
X"00",X"C2",X"C0",X"18",X"3C",X"3E",X"62",X"C3",X"EB",X"FF",X"5F",X"DD",X"C3",X"B2",X"BE",X"1C",
X"1C",X"BD",X"E7",X"E3",X"D9",X"FD",X"FF",X"CF",X"30",X"FC",X"BE",X"3E",X"6E",X"DC",X"70",X"E0",
X"7E",X"77",X"B7",X"B7",X"77",X"EF",X"BE",X"BC",X"B0",X"E8",X"3C",X"9E",X"EE",X"EC",X"E8",X"FC",
X"7C",X"CF",X"F7",X"FE",X"6E",X"0F",X"0F",X"06",X"1F",X"7D",X"FB",X"B7",X"F3",X"D9",X"6F",X"3F",
X"0F",X"07",X"1C",X"7D",X"6B",X"3F",X"7F",X"3F",X"00",X"00",X"00",X"02",X"10",X"00",X"2E",X"0F",
X"6F",X"37",X"1F",X"14",X"0F",X"2F",X"07",X"03",X"37",X"7E",X"DF",X"DB",X"DB",X"69",X"3C",X"6F",
X"03",X"03",X"2B",X"1E",X"1E",X"25",X"3F",X"3B",X"F3",X"F3",X"F9",X"DF",X"6F",X"27",X"9F",X"0F",
X"0F",X"1F",X"3F",X"67",X"ED",X"D9",X"DB",X"FB",X"03",X"6E",X"F3",X"E7",X"F1",X"FE",X"1F",X"03",
X"B1",X"59",X"0C",X"24",X"02",X"00",X"00",X"00",X"77",X"CF",X"BB",X"80",X"EF",X"77",X"FA",X"3E",
X"01",X"00",X"02",X"04",X"7D",X"59",X"B7",X"FE",X"CB",X"F7",X"FF",X"FF",X"6C",X"9F",X"F3",X"7C",
X"6E",X"7F",X"07",X"FB",X"FD",X"BD",X"9F",X"DF",X"FF",X"FF",X"FE",X"63",X"CB",X"9D",X"FF",X"F3",
X"3C",X"FE",X"CF",X"BD",X"BD",X"F3",X"7E",X"18",X"19",X"3C",X"7E",X"5E",X"66",X"7E",X"9C",X"00",
X"06",X"00",X"78",X"7C",X"65",X"3C",X"00",X"02",X"00",X"01",X"18",X"3C",X"3C",X"18",X"02",X"40");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,150 +0,0 @@
library ieee;
use ieee.std_logic_1164.all,ieee.numeric_std.all;
entity ic40 is
port (
clk : in std_logic;
addr : in std_logic_vector(10 downto 0);
data : out std_logic_vector(7 downto 0)
);
end entity;
architecture prom of ic40 is
type rom is array(0 to 2047) of std_logic_vector(7 downto 0);
signal rom_data: rom := (
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"18",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"24",X"18",X"7E",X"18",X"24",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"F0",X"00",X"00",X"1F",X"00",X"00",X"F0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"24",X"42",X"42",X"3C",X"00",X"00",X"00",X"00",X"00",X"18",X"18",X"00",X"00",X"00",
X"00",X"00",X"3C",X"3C",X"3C",X"3C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",
X"00",X"00",X"26",X"05",X"2A",X"A4",X"50",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",
X"00",X"40",X"B4",X"19",X"85",X"52",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",
X"8D",X"17",X"00",X"44",X"08",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",
X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"08",X"04",X"40",X"0B",X"06",
X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"57",X"A2",X"4C",X"04",X"10",X"00",X"00",X"00",
X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"04",X"0C",X"02",X"52",X"BD",
X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"C3",
X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"C3",X"00",
X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"C3",X"00",X"00",
X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"C3",X"00",X"00",X"00",
X"00",X"00",X"00",X"C3",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",
X"00",X"00",X"C3",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",
X"00",X"C3",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",
X"C3",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",
X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",
X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",
X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"FF",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"03",X"0E",X"03",X"00",X"00",X"00",X"00",X"00",X"0E",X"00",X"00",
X"00",X"00",X"03",X"0E",X"03",X"00",X"00",X"00",X"00",X"0E",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"30",X"E0",X"30",X"00",X"00",X"00",X"00",X"00",X"E0",X"00",X"00",
X"00",X"00",X"30",X"E0",X"30",X"00",X"00",X"00",X"00",X"E0",X"00",X"00",X"00",X"00",X"00",X"00",
X"0C",X"0C",X"80",X"80",X"0C",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"80",X"80",X"0C",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0C",
X"0C",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0C",X"80",X"80",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"0C",X"0C",X"80",X"80",X"0C",X"0C",
X"30",X"30",X"00",X"00",X"30",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"30",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"30",
X"30",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"30",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"30",X"00",X"00",X"30",X"30",
X"06",X"0F",X"1F",X"1F",X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"1C",
X"1F",X"1F",X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"0F",
X"0F",X"06",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"06",X"0F",X"1F",X"1F",
X"07",X"05",X"02",X"02",X"05",X"07",X"00",X"00",X"00",X"00",X"06",X"0F",X"1F",X"1F",X"0F",X"06",
X"00",X"18",X"3C",X"3C",X"18",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"03",X"03",X"00",X"00",
X"3C",X"3C",X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",
X"18",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"18",X"3C",X"3C",
X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",X"00",X"18",X"3C",X"3C",X"18",X"00",
X"C0",X"C0",X"00",X"00",X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",
X"C0",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"C0",X"C0",X"00",X"00",X"C0",X"C0",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"60",X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"78",X"84",
X"60",X"60",X"00",X"00",X"00",X"00",X"00",X"00",X"0E",X"09",X"01",X"01",X"09",X"0E",X"00",X"00",
X"22",X"22",X"02",X"02",X"22",X"22",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"60",X"60",
X"07",X"0B",X"08",X"08",X"0B",X"87",X"84",X"78",X"00",X"00",X"00",X"00",X"60",X"60",X"00",X"00",
X"03",X"03",X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"00",X"00",X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",
X"03",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"03",X"00",X"00",X"03",X"03",
X"00",X"30",X"00",X"00",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"82",X"82",X"B2",X"84",X"48",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"48",X"84",X"B2",
X"B3",X"86",X"CC",X"78",X"30",X"00",X"00",X"00",X"00",X"30",X"78",X"CC",X"86",X"B3",X"83",X"83",
X"48",X"30",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"48",X"84",X"82",X"82",X"82",X"82",X"84",
X"00",X"C0",X"00",X"00",X"C0",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"20",X"20",X"20",X"40",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"20",
X"CC",X"18",X"30",X"E0",X"C0",X"00",X"00",X"00",X"00",X"C0",X"E0",X"30",X"18",X"CC",X"0C",X"0C",
X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"40",X"20",X"20",X"20",X"20",X"40",
X"00",X"0C",X"00",X"00",X"0C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"30",X"60",X"C0",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"C0",X"60",X"30",X"30",X"30",
X"0B",X"08",X"0C",X"07",X"03",X"00",X"00",X"00",X"00",X"03",X"07",X"0C",X"08",X"0B",X"08",X"08",
X"00",X"00",X"08",X"10",X"22",X"14",X"00",X"00",X"00",X"00",X"1C",X"22",X"2A",X"02",X"14",X"00",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"10",X"08",X"12",X"69",X"2A",X"04",X"08",
X"08",X"08",X"0B",X"08",X"04",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"04",X"08",X"0B",
X"06",X"06",X"03",X"01",X"00",X"00",X"00",X"00",X"00",X"00",X"01",X"03",X"06",X"06",X"06",X"06",
X"04",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"04",X"08",X"0B",X"08",X"08",X"0B",X"08",
X"8C",X"6C",X"10",X"10",X"6C",X"8C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",
X"10",X"10",X"2C",X"4C",X"80",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"8C",X"6C",
X"4C",X"8C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"8C",X"4C",X"20",X"20",
X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"80",X"4C",X"2C",X"10",X"10",X"6C",X"8C",
X"E3",X"00",X"00",X"00",X"00",X"E3",X"1C",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"1C",
X"E0",X"00",X"10",X"10",X"08",X"07",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"1C",
X"CC",X"03",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"00",X"03",X"CC",X"30",X"30",
X"00",X"10",X"0A",X"55",X"02",X"55",X"22",X"08",X"07",X"08",X"10",X"10",X"00",X"E0",X"1C",X"03",
X"00",X"80",X"40",X"20",X"10",X"08",X"44",X"00",X"04",X"00",X"80",X"EA",X"80",X"01",X"A0",X"10",
X"44",X"00",X"10",X"62",X"C0",X"80",X"08",X"20",X"12",X"09",X"20",X"04",X"80",X"42",X"00",X"20",
X"97",X"15",X"0A",X"51",X"1B",X"24",X"0E",X"0B",X"24",X"80",X"28",X"80",X"04",X"04",X"01",X"2A",
X"00",X"10",X"00",X"4C",X"0C",X"00",X"00",X"20",X"80",X"C0",X"42",X"80",X"21",X"62",X"E0",X"C0",
X"00",X"4C",X"01",X"00",X"08",X"00",X"84",X"C0",X"00",X"00",X"00",X"20",X"02",X"40",X"08",X"00",
X"06",X"0E",X"18",X"98",X"03",X"20",X"14",X"02",X"08",X"40",X"04",X"00",X"00",X"09",X"1C",X"30",
X"00",X"00",X"04",X"00",X"04",X"0E",X"14",X"00",X"00",X"10",X"00",X"02",X"00",X"00",X"00",X"00",
X"00",X"00",X"40",X"10",X"00",X"68",X"60",X"00",X"04",X"00",X"00",X"08",X"80",X"00",X"00",X"00",
X"48",X"18",X"30",X"00",X"00",X"10",X"40",X"00",X"00",X"C0",X"E8",X"2C",X"0C",X"18",X"00",X"00",
X"00",X"20",X"80",X"C0",X"00",X"DA",X"D0",X"80",X"20",X"C0",X"88",X"18",X"38",X"30",X"00",X"00",
X"00",X"00",X"40",X"70",X"18",X"68",X"28",X"20",X"00",X"00",X"00",X"00",X"00",X"00",X"30",X"30",
X"00",X"C0",X"40",X"00",X"00",X"00",X"00",X"18",X"14",X"A0",X"B0",X"3A",X"3C",X"1C",X"00",X"00",
X"00",X"00",X"18",X"3C",X"36",X"62",X"00",X"00",X"20",X"60",X"60",X"E0",X"D0",X"20",X"80",X"00",
X"80",X"8C",X"4C",X"4C",X"8C",X"18",X"40",X"40",X"00",X"80",X"E0",X"60",X"30",X"30",X"10",X"00",
X"33",X"3C",X"0C",X"01",X"01",X"00",X"20",X"80",X"00",X"02",X"06",X"4C",X"0E",X"27",X"10",X"00",
X"40",X"00",X"83",X"03",X"16",X"24",X"00",X"00",X"00",X"68",X"60",X"02",X"10",X"00",X"00",X"00",
X"1C",X"1E",X"00",X"03",X"00",X"00",X"10",X"00",X"08",X"00",X"24",X"26",X"26",X"17",X"03",X"00",
X"00",X"02",X"00",X"01",X"01",X"1A",X"10",X"04",X"0C",X"0E",X"27",X"20",X"30",X"18",X"80",X"40",
X"00",X"40",X"00",X"18",X"1A",X"26",X"2C",X"0C",X"01",X"1E",X"3F",X"3E",X"1F",X"0F",X"02",X"01",
X"20",X"10",X"08",X"24",X"00",X"41",X"00",X"00",X"0E",X"39",X"FC",X"FF",X"3B",X"28",X"98",X"22",
X"01",X"00",X"02",X"00",X"08",X"40",X"31",X"CE",X"76",X"3C",X"08",X"00",X"93",X"60",X"0C",X"03",
X"11",X"00",X"38",X"04",X"02",X"40",X"E0",X"60",X"00",X"18",X"21",X"9C",X"34",X"62",X"00",X"0C",
X"00",X"00",X"30",X"46",X"4E",X"1C",X"00",X"00",X"00",X"00",X"00",X"30",X"1C",X"00",X"81",X"00",
X"20",X"00",X"00",X"30",X"19",X"00",X"40",X"00",X"00",X"01",X"00",X"98",X"18",X"00",X"00",X"00");
begin
process(clk)
begin
if rising_edge(clk) then
data <= rom_data(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

File diff suppressed because it is too large Load Diff

View File

@@ -1,35 +0,0 @@
# ================================================================================
#
# Build ID Verilog Module Script
# Jeff Wiencrot - 8/1/2011
#
# Generates a Verilog module that contains a timestamp,
# from the current build. These values are available from the build_date, build_time,
# physical_address, and host_name output ports of the build_id module in the build_id.v
# Verilog source file.
#
# ================================================================================
proc generateBuildID_Verilog {} {
# Get the timestamp (see: http://www.altera.com/support/examples/tcl/tcl-date-time-stamp.html)
set buildDate [ clock format [ clock seconds ] -format %y%m%d ]
set buildTime [ clock format [ clock seconds ] -format %H%M%S ]
# Create a Verilog file for output
set outputFileName "rtl/build_id.v"
set outputFile [open $outputFileName "w"]
# Output the Verilog source
puts $outputFile "`define BUILD_DATE \"$buildDate\""
puts $outputFile "`define BUILD_TIME \"$buildTime\""
close $outputFile
# Send confirmation message to the Messages window
post_message "Generated build identification Verilog module: [pwd]/$outputFileName"
post_message "Date: $buildDate"
post_message "Time: $buildTime"
}
# Comment out this line to prevent the process from automatically executing when the file is sourced:
generateBuildID_Verilog

View File

@@ -1,82 +0,0 @@
-- -----------------------------------------------------------------------
--
-- Syntiac's generic VHDL support files.
--
-- -----------------------------------------------------------------------
-- Copyright 2005-2008 by Peter Wendrich (pwsoft@syntiac.com)
-- http://www.syntiac.com/fpga64.html
--
-- Modified April 2016 by Dar (darfpga@aol.fr)
-- http://darfpga.blogspot.fr
-- Remove address register when writing
--
-- -----------------------------------------------------------------------
--
-- gen_rwram.vhd
--
-- -----------------------------------------------------------------------
--
-- generic ram.
--
-- -----------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
-- -----------------------------------------------------------------------
entity gen_ram is
generic (
dWidth : integer := 8;
aWidth : integer := 10
);
port (
clk : in std_logic;
we : in std_logic;
addr : in std_logic_vector((aWidth-1) downto 0);
d : in std_logic_vector((dWidth-1) downto 0);
q : out std_logic_vector((dWidth-1) downto 0)
);
end entity;
-- -----------------------------------------------------------------------
architecture rtl of gen_ram is
subtype addressRange is integer range 0 to ((2**aWidth)-1);
type ramDef is array(addressRange) of std_logic_vector((dWidth-1) downto 0);
signal ram: ramDef;
signal rAddrReg : std_logic_vector((aWidth-1) downto 0);
signal qReg : std_logic_vector((dWidth-1) downto 0);
begin
-- -----------------------------------------------------------------------
-- Signals to entity interface
-- -----------------------------------------------------------------------
q <= qReg;
-- -----------------------------------------------------------------------
-- Memory write
-- -----------------------------------------------------------------------
process(clk)
begin
if rising_edge(clk) then
if we = '1' then
ram(to_integer(unsigned(addr))) <= d;
end if;
end if;
end process;
-- -----------------------------------------------------------------------
-- Memory read
-- -----------------------------------------------------------------------
process(clk)
begin
if rising_edge(clk) then
-- qReg <= ram(to_integer(unsigned(rAddrReg)));
-- rAddrReg <= addr;
qReg <= ram(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -1,463 +0,0 @@
---------------------------------------------------------------------------------
-- DE2-35 Top level for Phoenix by Dar (darfpga@aol.fr)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
entity phoenix is
generic (
C_test_picture: boolean := false;
C_tile_rom: boolean := true; -- false: disable tile ROM to try game logic on small FPGA
-- reduce ROMs: 14 is normal game, 13 will draw initial screen, 12 will repeatedly blink 1 line of garbage
C_autofire: boolean := true;
-- C_audio: boolean := true;
C_prog_rom_addr_bits: integer range 12 to 14 := 14
);
port(
clk : in std_logic; -- 11 MHz for TV, 25 MHz for VGA
reset : in std_logic;
ce_pix : out std_logic;
dip_switch : in std_logic_vector(7 downto 0);
-- game controls, normal logic '1':pressed, '0':released
btn_coin: in std_logic;
btn_player_start: in std_logic_vector(1 downto 0);
btn_fire, btn_left, btn_right, btn_barrier: in std_logic;
video_r : out std_logic_vector(1 downto 0);
video_g : out std_logic_vector(1 downto 0);
video_b : out std_logic_vector(1 downto 0);
video_vblank, video_hblank_bg, video_hblank_fg: out std_logic;
video_hs : out std_logic;
video_vs : out std_logic;
sound_fire : out std_logic; -- '1' when missile fires
sound_explode: out std_logic; -- '1' when ship explodes
sound_burn : out std_logic; -- bird burns
sound_fireball: out std_logic; -- bird explodes in 2 fireballs
sound_ab : out std_logic_vector(15 downto 0);
audio_select : in std_logic_vector(2 downto 0) := (others => '0');
audio : out std_logic_vector(11 downto 0)
);
end phoenix;
architecture struct of phoenix is
signal reset_n: std_logic;
signal hcnt : std_logic_vector(9 downto 1);
signal vcnt : std_logic_vector(8 downto 1);
signal sync : std_logic;
signal adrsel : std_logic;
signal rdy : std_logic := '1';
signal vblank : std_logic;
signal hblank_bkgrd : std_logic;
signal hblank_frgrd : std_logic;
signal ce_pix1 : std_logic;
signal cpu_ce : std_logic;
signal cpu_adr : std_logic_vector(15 downto 0);
signal cpu_di : std_logic_vector( 7 downto 0);
signal cpu_do : std_logic_vector( 7 downto 0);
signal cpu_wr_n : std_logic;
signal prog_do : std_logic_vector( 7 downto 0);
signal S_prog_rom_addr : std_logic_vector(13 downto 0);
signal frgnd_horz_cnt : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_horz_cnt : std_logic_vector(7 downto 0) := (others =>'0');
signal vert_cnt : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_ram_adr: std_logic_vector(10 downto 0) := (others =>'0');
signal bkgnd_ram_adr: std_logic_vector(10 downto 0) := (others =>'0');
signal frgnd_ram_do : std_logic_vector( 7 downto 0) := (others =>'0');
signal bkgnd_ram_do : std_logic_vector( 7 downto 0) := (others =>'0');
signal frgnd_ram_we : std_logic := '0';
signal bkgnd_ram_we : std_logic := '0';
signal frgnd_graph_adr : std_logic_vector(11 downto 0) := (others =>'0');
signal bkgnd_graph_adr : std_logic_vector(11 downto 0) := (others =>'0');
signal palette_adr : std_logic_vector( 7 downto 0) := (others =>'0');
signal A11 : std_logic;
signal frgnd_clk : std_logic;
signal bkgnd_clk : std_logic;
signal frgnd_tile_id : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_tile_id : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_bit0_graph : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_bit1_graph : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_bit0_graph : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_bit1_graph : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_bit0_graph_r : std_logic_vector(7 downto 0) := (others =>'0');
signal frgnd_bit1_graph_r : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_bit0_graph_r : std_logic_vector(7 downto 0) := (others =>'0');
signal bkgnd_bit1_graph_r : std_logic_vector(7 downto 0) := (others =>'0');
signal fr_bit0 : std_logic;
signal fr_bit1 : std_logic;
signal bk_bit0 : std_logic;
signal bk_bit1 : std_logic;
signal fr_lin : std_logic_vector(2 downto 0);
signal bk_lin : std_logic_vector(2 downto 0);
signal color_set : std_logic_vector(1 downto 0);
signal color_id : std_logic_vector(5 downto 0);
signal rgb : std_logic_vector(7 downto 0);
signal player2 : std_logic := '0';
signal pl2_cocktail : std_logic := '0';
signal bkgnd_offset : std_logic_vector(7 downto 0) := (others =>'0');
signal sound_a : std_logic_vector(7 downto 0) := (others =>'0');
signal sound_b : std_logic_vector(7 downto 0) := (others =>'0');
signal clk10 : std_logic;
signal snd1 : std_logic_vector( 7 downto 0) := (others =>'0');
signal snd2 : std_logic_vector( 1 downto 0) := (others =>'0');
signal snd3 : std_logic_vector( 7 downto 0) := (others =>'0');
signal song : std_logic_vector( 7 downto 0) := (others =>'0');
signal mixed : std_logic_vector(11 downto 0) := (others =>'0');
signal sound_string : std_logic_vector(31 downto 0);
signal coin : std_logic;
signal player_start : std_logic_vector(1 downto 0);
signal buttons : std_logic_vector(3 downto 0);
signal R_autofire : std_logic_vector(21 downto 0);
begin
-- game core uses inverted control logic
coin <= not btn_coin; -- insert coin
player_start <= not btn_player_start; -- select 1 or 2 players
buttons(1) <= not btn_right; -- Right
buttons(2) <= not btn_left; -- Left
buttons(3) <= not btn_barrier; -- Protection
G_not_autofire: if not C_autofire generate
buttons(0) <= not btn_fire; -- Fire
end generate;
G_yes_autofire: if C_autofire generate
process(clk)
begin
if rising_edge(clk) then
if btn_fire='1' then
R_autofire <= R_autofire-1;
else
R_autofire <= (others => '0');
end if;
end if;
end process;
buttons(0) <= not R_autofire(R_autofire'high);
end generate;
video: entity work.phoenix_video
port map
(
clk11 => clk,
ce_pix => ce_pix1,
hcnt => hcnt,
vcnt => vcnt,
sync_hs => video_hs,
sync_vs => video_vs,
adrsel => adrsel, -- RAM address selector ('0')cpu / ('1')video_generator
rdy => rdy, -- Ready ('1')cpu can access RAMs read/write
vblank => vblank,
hblank_frgrd => hblank_frgrd,
hblank_bkgrd => hblank_bkgrd,
reset => reset
);
reset_n <= not reset;
ce_pix <= ce_pix1;
process(clk)
begin
if rising_edge(clk) then
cpu_ce <= not cpu_ce;
end if;
end process;
-- microprocessor 8085
cpu8085 : entity work.T8080se
generic map
(
Mode => 2,
T2Write => 0
)
port map(
RESET_n => reset_n,
CLK => clk,
CLKEN => cpu_ce, -- fixme: use it to make 5.5 MHz clock average
READY => rdy,
HOLD => '1',
INT => '1',
INTE => open,
DBIN => open,
SYNC => open,
VAIT => open,
HLDA => open,
WR_n => cpu_wr_n,
A => cpu_adr,
DI => cpu_di,
DO => cpu_do
);
-- mux prog, ram, vblank, switch... to processor data bus in
cpu_di <= prog_do when cpu_adr(15 downto 14) = "00" else
frgnd_ram_do when cpu_adr(13 downto 10) = 2#00_00# else
bkgnd_ram_do when cpu_adr(13 downto 10) = 2#00_10# else
buttons & '0' & player_start & coin when cpu_adr(13 downto 10) = 2#11_00# else--buttons & '1'
not vblank & dip_switch(6 downto 0) when cpu_adr(13 downto 10) = 2#11_10# else
x"FF";
-- write enable to RAMs from cpu
frgnd_ram_we <= '1' when cpu_wr_n = '0' and cpu_adr(14 downto 10) = "10000" and adrsel = '0' else '0';
bkgnd_ram_we <= '1' when cpu_wr_n = '0' and cpu_adr(14 downto 10) = "10010" and adrsel = '0' else '0';
-- RAMs address mux cpu/video_generator, bank0 for player1, bank1 for player2
frgnd_ram_adr <= player2 & cpu_adr(9 downto 0) when adrsel ='0' else player2 & vert_cnt(7 downto 3) & frgnd_horz_cnt(7 downto 3);
bkgnd_ram_adr <= player2 & cpu_adr(9 downto 0) when adrsel ='0' else player2 & vert_cnt(7 downto 3) & bkgnd_horz_cnt(7 downto 3);
-- demux cpu data to registers : background scrolling, sound control,
-- player id (1/2), palette color set.
process (clk)
begin
if rising_edge(clk) then
if cpu_wr_n = '0' then
case cpu_adr(14 downto 10) is
when "10110" => bkgnd_offset <= cpu_do;
when "11000" => sound_b <= cpu_do;
when "11010" => sound_a <= cpu_do;
when "10100" => player2 <= cpu_do(0);
color_set <= cpu_do(2 downto 1);
A11 <= cpu_do(3);
when others => null;
end case;
end if;
end if;
end process;
-- player2 and cocktail mode (flip horizontal/vertical)
pl2_cocktail <= player2 and dip_switch(7);
-- horizontal scan video RAMs address background and foreground
-- with flip and scroll offset
frgnd_horz_cnt <= hcnt(8 downto 1) when pl2_cocktail = '0' else not hcnt(8 downto 1);
bkgnd_horz_cnt <= frgnd_horz_cnt + bkgnd_offset;
-- vertical scan video RAMs address
vert_cnt <= vcnt(8 downto 1) when pl2_cocktail = '0' else not (vcnt(8 downto 1) + X"30");
-- get tile_ids from RAMs
frgnd_tile_id <= frgnd_ram_do;
bkgnd_tile_id <= bkgnd_ram_do;
-- address graphix ROMs with tile_ids and line counter
frgnd_graph_adr <= A11 & frgnd_tile_id & vert_cnt(2 downto 0);
bkgnd_graph_adr <= A11 & bkgnd_tile_id & vert_cnt(2 downto 0);
-- latch foreground/background next graphix byte, high bit and low bit
-- and palette_ids (fr_lin, bklin)
process (clk)
begin
if rising_edge(clk) then
if (pl2_cocktail = '0' and (frgnd_horz_cnt(2 downto 0) = "111")) or
(pl2_cocktail = '1' and (frgnd_horz_cnt(2 downto 0) = "000")) then
frgnd_bit0_graph_r <= frgnd_bit0_graph;
frgnd_bit1_graph_r <= frgnd_bit1_graph;
fr_lin <= frgnd_tile_id(7 downto 5);
end if;
if (pl2_cocktail = '0' and (bkgnd_horz_cnt(2 downto 0) = "111")) or
(pl2_cocktail = '1' and (bkgnd_horz_cnt(2 downto 0) = "000")) then
bkgnd_bit0_graph_r <= bkgnd_bit0_graph;
bkgnd_bit1_graph_r <= bkgnd_bit1_graph;
bk_lin <= bkgnd_tile_id(7 downto 5);
end if;
end if;
end process;
-- demux background and foreground pixel bits (0/1) from graphix byte with horizontal counter
-- and apply horizontal and vertical blanking
fr_bit0 <= frgnd_bit0_graph_r(to_integer(unsigned(frgnd_horz_cnt(2 downto 0)))) when (vblank or hblank_frgrd)= '0' else '0';
fr_bit1 <= frgnd_bit1_graph_r(to_integer(unsigned(frgnd_horz_cnt(2 downto 0)))) when (vblank or hblank_frgrd)= '0' else '0';
bk_bit0 <= bkgnd_bit0_graph_r(to_integer(unsigned(bkgnd_horz_cnt(2 downto 0)))) when (vblank or hblank_bkgrd)= '0' else '0';
bk_bit1 <= bkgnd_bit1_graph_r(to_integer(unsigned(bkgnd_horz_cnt(2 downto 0)))) when (vblank or hblank_bkgrd)= '0' else '0';
-- select pixel bits and palette_id with foreground priority
color_id <= (fr_bit0 or fr_bit1) & fr_bit1 & fr_bit0 & fr_lin when (fr_bit0 or fr_bit1) = '1' else
(fr_bit0 or fr_bit1) & bk_bit1 & bk_bit0 & bk_lin;
-- address palette with pixel bits color and color set
palette_adr <= color_set & color_id;
-- output video to top level
process(clk) begin
if rising_edge(clk) then
if ce_pix1='1' then
video_vblank <= vblank;
video_hblank_fg <= hblank_frgrd;
video_hblank_bg <= hblank_bkgrd;
if hcnt>=192 then
video_r <= rgb(4) & rgb(0);
video_g <= rgb(6) & rgb(2);
video_b <= rgb(5) & rgb(1);
else
video_r <= "00";
video_g <= "00";
video_b <= "00";
end if;
end if;
end if;
end process;
frgnd_bit0 : entity work.ic39
port map(
clk => clk,
addr => frgnd_graph_adr(10 downto 0),
data => frgnd_bit0_graph
);
frgnd_bit1 : entity work.ic40
port map(
clk => clk,
addr => frgnd_graph_adr(10 downto 0),
data => frgnd_bit1_graph
);
bkgnd_bit0 : entity work.ic23
port map(
clk => clk,
addr => bkgnd_graph_adr(10 downto 0),
data => bkgnd_bit0_graph
);
bkgnd_bit1 : entity work.ic24
port map(
clk => clk,
addr => bkgnd_graph_adr(10 downto 0),
data => bkgnd_bit1_graph
);
col_l : entity work.col_l
port map(
clk => clk,
addr => palette_adr(7 downto 0),
data => rgb(7 downto 4)
);
col_h : entity work.col_h
port map(
clk => clk,
addr => palette_adr(7 downto 0),
data => rgb(3 downto 0)
);
-- Program PROM
S_prog_rom_addr(C_prog_rom_addr_bits-1 downto 0) <= cpu_adr(C_prog_rom_addr_bits-1 downto 0);
prog : entity work.prog
port map(
clk => clk,
addr => S_prog_rom_addr,
data => prog_do
);
-- foreground RAM 0x4000-0x433F
-- cpu working area 0x4340-0x43FF
frgnd_ram : entity work.gen_ram
generic map( dWidth => 8, aWidth => 11)
port map(
clk => clk,
we => frgnd_ram_we,
addr => frgnd_ram_adr,
d => cpu_do,
q => frgnd_ram_do
);
-- background RAM 0x4800-0x4B3F
-- cpu working area 0x4B40-0x4BFF
-- stack pointer downward from 0x4BFF
bkgnd_ram : entity work.gen_ram
generic map( dWidth => 8, aWidth => 11)
port map(
clk => clk,
we => bkgnd_ram_we,
addr => bkgnd_ram_adr,
d => cpu_do,
q => bkgnd_ram_do
);
effect1: entity work.phoenix_effect1
port map
(
clk => clk,
reset => '0',
trigger => sound_a(4),
filter => sound_a(5),
divider => sound_a(3 downto 0),
snd => snd1
);
effect2 : entity work.phoenix_effect2
port map
(
clk => clk,
reset => '0',
trigger1 => sound_b(4),
trigger2 => sound_b(5),
divider => sound_b(3 downto 0),
snd => snd2
);
effect3 : entity work.phoenix_effect3
port map
(
clk => clk,
reset => '0',
trigger1 => sound_b(6),
trigger2 => sound_b(7),
snd => snd3
);
sound_burn <= sound_b(4);
sound_fire <= sound_b(6); -- '1' when fire sound
sound_explode <= sound_b(7); -- '1' when explode sound
sound_fireball <= sound_a(1) and not sound_a(0); -- ambiguity: mothership descend also triggers this
sound_ab <= sound_b & sound_a;
music: entity work.phoenix_music
port map
(
clk => clk,
reset => '0',
trigger => sound_a(7),
sel_song => sound_a(6),
snd => song
);
-- mix effects and music
mixed <= std_logic_vector
(
unsigned("00" & snd1 & "00") +
unsigned("0" & snd2 & "000000000") +
unsigned("00" & snd3 & "00") +
unsigned("00" & song & "00" )
);
-- select sound or/and effect
with audio_select select
audio <= "00" & snd1 & "00" when "100",
"0" & snd2 & "000000000" when "101",
"00" & snd3 & "00" when "110",
"00" & song & "00" when "111",
mixed when others;
end struct;

View File

@@ -1,230 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix sound effect1 by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
-- this module generates sound how the birds fly
-- how they burn and the ship's barrier activation sound
-- it is most often heard module througut all levels of the game
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
use ieee.math_real.all;
entity phoenix_effect1 is
generic(
-- Command
Cmd_Fs: real := 11.0; -- MHz
Cmd_V: real := 12.0; -- V
Cmd_Vd: real := 0.46; -- V
Cmd_Vce: real := 0.2; -- V
Cmd_R1: real := 100.0; -- k
Cmd_R2: real := 33.0; -- k
Cmd_R3: real := 0.47; -- k
Cmd_C: real := 6.8; -- uF
Cmd_Div2n: integer := 8; -- bits divisor
Cmd_bits: integer := 16; -- bits counter
-- Oscillator
Osc_Fs: real := 11.0; -- MHz
Osc_Vb: real := 5.0; -- V
Osc_Vce: real := 0.2; -- V
Osc_R1: real := 47.0; -- k
Osc_R2: real := 47.0; -- k
Osc_C: real := 0.001; -- uF
Osc_Div2n: integer := 7; -- bits divisor
Osc_bits: integer := 6; -- bits counter
-- Filter
Filt_Fs: real := 11.0; -- MHz
Filt_V1: real := 5.0; -- V
Filt_V2: real := 0.0; -- V
Filt_R1: real := 100.0; -- k
Filt_R2: real := 10.0; -- k
Filt_C: real := 0.047; -- uF
Filt_Div2n: integer := 7; -- bits divisor
Filt_bits: integer := 8; -- bits counter
Vmax: real := 5.0; -- V
Vmax_bits: integer := 16 -- number of bits to represent vmax
);
port(
clk : in std_logic;
reset : in std_logic;
trigger : in std_logic;
filter : in std_logic;
divider : in std_logic_vector(3 downto 0);
snd : out std_logic_vector(7 downto 0)
);
end phoenix_effect1;
architecture struct of phoenix_effect1 is
-- integer representation of voltage, full range
constant IVmax: integer := integer(2**Vmax_bits)-1;
-- command --
constant Cmd_div: integer := integer(2**Cmd_Div2n);
-- command charge
constant Cmd_VFc: real := (Cmd_V*Cmd_R2 + Cmd_Vd*Cmd_R1)/(Cmd_R1 + Cmd_R2); -- V
constant Cmd_RCc: real := Cmd_R1*Cmd_R2/(Cmd_R1 + Cmd_R2)*Cmd_C/1000.0; -- s
constant Cmd_ikc: integer := integer(Cmd_Fs * 1.0E6 * Cmd_RCc / 2.0**Cmd_Div2n);
constant Cmd_iVFc: integer := integer(Cmd_VFc * real(IVmax)/Vmax);
-- command discharge
constant Cmd_VFd: real := (Cmd_V/Cmd_R1+Cmd_Vd/Cmd_R2+(Cmd_Vd+Cmd_Vce)/Cmd_R3)/(1.0/Cmd_R1+1.0/Cmd_R2+1.0/Cmd_R3); -- V
constant Cmd_RCd: real := 1.0/(1.0/Cmd_R1+1.0/Cmd_R2+1.0/Cmd_R3)*Cmd_C/1000.0; -- s
constant Cmd_ikd: integer := integer(Cmd_Fs * 1.0E6 * Cmd_RCd / 2.0**Cmd_Div2n);
constant Cmd_iVFd: integer := integer(Cmd_VFd * real(IVmax)/Vmax);
-- oscillator
constant Osc_div: integer := integer(2**Osc_Div2n);
-- oscillator charge
constant Osc_VFc: real := Osc_Vb; -- V
constant Osc_RCc: real := (Osc_R1+Osc_R2)*Osc_C/1000.0; -- s
constant Osc_ikc: integer := integer(Osc_Fs * 1.0E6 * Osc_RCc / 2.0**Osc_Div2n);
constant Osc_iVFc: integer := integer(Osc_VFc * real(IVmax)/Vmax);
-- oscillator discharge
constant Osc_VFd: real := Osc_Vce; -- V
constant Osc_RCd: real := Osc_R2*Osc_C/1000.0; -- s
constant Osc_ikd: integer := integer(Osc_Fs * 1.0E6 * Osc_RCd / 2.0**Osc_Div2n);
constant Osc_iVFd: integer := integer(Osc_VFd * real(IVmax)/Vmax);
-- filter
constant Filt_div: integer := integer(2**Filt_Div2n);
-- filter charge
constant Filt_VFc: real := Filt_V1; -- V
constant Filt_RCc: real := 1.0/(1.0/Filt_R1+1.0/Filt_R2)*Filt_C/1000.0; -- s
constant Filt_ikc: integer := integer(Filt_Fs * 1.0E6 * Filt_RCc / 2.0**Filt_Div2n);
constant Filt_iVFc: integer := integer(Filt_VFc * real(IVmax)/Vmax);
-- filter discharge
constant Filt_VFd: real := Filt_V2; -- V
constant Filt_RCd: real := Filt_RCc; -- s
constant Filt_ikd: integer := integer(Filt_Fs * 1.0E6 * Filt_RCd / 2.0**Filt_Div2n);
constant Filt_iVFd: integer := integer(Filt_VFd * real(IVmax)/Vmax);
function imax(x,y: integer) return integer is begin
if x > y then
return x;
else
return y;
end if;
end imax;
signal u_c1 : unsigned(15 downto 0) := (others => '0');
signal u_c2 : unsigned(15 downto 0) := (others => '0');
signal flip : std_logic := '0';
signal u_cf : unsigned(15 downto 0) := (others => '0');
signal sound : std_logic := '0';
begin
-- Commande
-- R1 = 100k, R2 = 33k, R3 = 0.47k C=6.8e-6 SR=10MHz
-- Charge : VF1 = 43559, k1 = 6591 (R1//R2)
-- Decharge : VF2 = 9300, k2 = 123 (R1//R2//R3)
-- Div = 2^8
process (clk)
variable cnt: integer range 0 to imax(Cmd_ikc,Cmd_ikd) := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c1 <= (others => '0');
else
cnt := cnt + 1;
if trigger = '1' then
if cnt = Cmd_ikc then
cnt := 0;
u_c1 <= u_c1 + (Cmd_iVFc - u_c1)/Cmd_div;
end if;
else
if cnt = Cmd_ikd then
cnt := 0;
u_c1 <= u_c1 - (u_c1 - Cmd_iVFd)/Cmd_div;
end if;
end if;
end if;
end if;
end process;
-- Oscillateur
-- R1 = 47k, R2 = 47k, C=0.001e-6 SR=50MHz
-- Charge : VF1 = 65535, k1 = 37 (R1+R2)
-- Decharge : VF2 = 2621, k2 = 18 (R2)
-- Div = 2^7
-- Diviseur
-- LS163 : Count up, Sync load when 0xF (no toggle sound if divider = 0xF)
-- LS74 : Divide by 2
process (clk)
variable cnt: integer range 0 to imax(Osc_ikc,Osc_ikd) := 0;
variable cnt2: unsigned(3 downto 0) := (others => '0');
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c2 <= (others => '0');
flip <= '0';
else
if u_c2 > u_c1 then flip <= '0'; end if;
if u_c2 < u_c1/2 then
flip <= '1';
if flip = '0' then
cnt2 := cnt2 + 1;
if cnt2 = "0000" then
cnt2 := unsigned(divider);
if divider /= "1111" then sound <= not sound; end if;
end if;
end if;
end if;
cnt := cnt + 1;
if flip = '1' then
if cnt = Osc_ikc then
cnt := 0;
u_c2 <= u_c2 + (Osc_iVFc - u_c2)/Osc_div;
end if;
else
if cnt = Osc_ikd then
cnt := 0;
u_c2 <= u_c2 - (u_c2 - Osc_iVFd)/Osc_div;
end if;
end if;
end if;
end if;
end process;
-- filter
-- R1 = 10k, R2 = 100k, C=0.047e-6, SR=10MHz
-- Charge : VF1= 65535, k1 = 33 (R1//R2)
-- Decharge : VF2= 0 , k2 = 33 (R1//R2)
-- Div = 2^7
process (clk)
variable cnt: integer range 0 to imax(Filt_ikc,Filt_ikd) := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_cf <= (others => '0');
else
cnt := cnt + 1;
if sound = '1' then
if cnt = Filt_ikc then
cnt := 0;
u_cf <= u_cf + (Filt_iVFc - u_cf)/Filt_div;
end if;
else
if cnt = Filt_ikd then
cnt := 0;
u_cf <= u_cf - (u_cf - Filt_iVFd)/Filt_div;
end if;
end if;
end if;
end if;
end process;
with filter select snd <= std_logic_vector(u_cf(15 downto 8)) when '1', sound&"0000000" when others;
end struct;

View File

@@ -1,387 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix sound effect2 by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
-- this module outputs sound of mothership's descend
-- it could be heard at beginning of level 5
-- the prrrrr...vioooouuuuu sound
-- fixme:
-- the VCO control levels are too coarse (quantized)
-- frequency transitions are heard in large steps
-- instead of continous sweep
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
use ieee.math_real.all;
entity phoenix_effect2 is
generic(
-- Oscillator 1
Osc1_Fs: real := 11.0; -- MHz
Osc1_Vb: real := 5.0; -- V
Osc1_Vce: real := 0.2; -- V
Osc1_R1: real := 47.0; -- k
Osc1_R2: real := 100.0; -- k
Osc1_C1: real := 0.01; -- uF
Osc1_C2: real := 0.47; -- uF
Osc1_C3: real := 1.0; -- uF
Osc1_Div2n: integer := 8; -- bits divisor
Osc1_bits: integer := 16; -- bits counter
-- Oscillator 2
Osc2_Fs: real := 11.0; -- MHz
Osc2_Vb: real := 5.0; -- V
Osc2_Vce: real := 0.2; -- V
Osc2_R1: real := 510.0; -- k
Osc2_R2: real := 510.0; -- k
Osc2_C: real := 1.0; -- uF
Osc2_Div2n: integer := 8; -- bits divisor
Osc2_bits: integer := 17; -- bits counter
-- Filter 2
Filt2_Fs: real := 11.0; -- MHz
Filt2_V: real := 5.0; -- V
Filt2_R1: real := 10.0; -- k
Filt2_R2: real := 5.1; -- k
Filt2_R3: real := 5.1; -- k
Filt2_R4: real := 5.0; -- k
Filt2_R5: real := 10.0; -- k
Filt2_C: real := 100.0; -- uF
Filt2_Div2n: integer := 8; -- bits divisor
Filt2_bits: integer := 16; -- bits counter
-- Oscillator 3
Osc3_Fs: real := 11.0; -- MHz
Osc3_Vb: real := 5.0; -- V
Osc3_Vce: real := 0.2; -- V
Osc3_R1: real := 20.0; -- k
Osc3_R2: real := 20.0; -- k
Osc3_C: real := 0.001; -- uF
Osc3_Div2n: integer := 6; -- bits divisor
Osc3_bits: integer := 6; -- bits counter
C_flip1_0: integer := 22020;
C_flip1_1: integer := 33063;
C_flip1_scale: integer := 84; -- ??
Vmax: real := 5.0; -- V
Vmax_bits: integer := 16 -- number of bits to represent Vmax
);
port(
clk : in std_logic;
reset : in std_logic;
trigger1 : in std_logic;
trigger2 : in std_logic;
divider : in std_logic_vector(3 downto 0);
snd : out std_logic_vector(1 downto 0)
);
end phoenix_effect2;
architecture struct of phoenix_effect2 is
function imax(x,y: integer) return integer is begin
if x > y then
return x;
else
return y;
end if;
end imax;
-- integer representation of voltage, full range
constant IVmax: integer := integer(2**Vmax_bits)-1;
-- Oscillator1 --
constant Osc1_div: integer := integer(2**Osc1_Div2n);
-- Oscillator1 charge/discharge voltages
constant Osc1_VFc: real := Osc1_Vb; -- V
constant Osc1_iVFc: integer := integer(Osc1_VFc * real(IVmax)/Vmax);
constant Osc1_VFd: real := Osc1_Vce; -- V
constant Osc1_iVFd: integer := integer(Osc1_VFd * real(IVmax)/Vmax);
-- Oscillator1 charge/discharge time constants
constant Osc1_T0_RCc: real := (Osc1_R1+Osc1_R2)*Osc1_C1/1000.0; -- s
constant Osc1_T0_ikc: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T0_RCc / 2.0**Osc1_Div2n);
constant Osc1_T0_RCd: real := Osc1_R2*Osc1_C1/1000.0; -- s
constant Osc1_T0_ikd: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T0_RCd / 2.0**Osc1_Div2n);
constant Osc1_T1_RCc: real := (Osc1_R1+Osc1_R2)*(Osc1_C1+Osc1_C2)/1000.0; -- s
constant Osc1_T1_ikc: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T1_RCc / 2.0**Osc1_Div2n);
constant Osc1_T1_RCd: real := Osc1_R2*(Osc1_C1+Osc1_C2)/1000.0; -- s
constant Osc1_T1_ikd: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T1_RCd / 2.0**Osc1_Div2n);
constant Osc1_T2_RCc: real := (Osc1_R1+Osc1_R2)*(Osc1_C1+Osc1_C3)/1000.0; -- s
constant Osc1_T2_ikc: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T2_RCc / 2.0**Osc1_Div2n);
constant Osc1_T2_RCd: real := Osc1_R2*(Osc1_C1+Osc1_C3)/1000.0; -- s
constant Osc1_T2_ikd: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T2_RCd / 2.0**Osc1_Div2n);
constant Osc1_T3_RCc: real := (Osc1_R1+Osc1_R2)*(Osc1_C1+Osc1_C2+Osc1_C3)/1000.0; -- s
constant Osc1_T3_ikc: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T3_RCc / 2.0**Osc1_Div2n);
constant Osc1_T3_RCd: real := Osc1_R2*(Osc1_C1+Osc1_C2+Osc1_C3)/1000.0; -- s
constant Osc1_T3_ikd: integer := integer(Osc1_Fs * 1.0E6 * Osc1_T3_RCd / 2.0**Osc1_Div2n);
constant Osc1_ik_max: integer := imax( imax(Osc1_T1_ikc,Osc1_T1_ikd), imax(Osc1_T3_ikc,Osc1_T3_ikd));
-- Oscillator2 --
constant Osc2_div: integer := integer(2**Osc2_Div2n);
-- Oscillator2 charge/discharge voltages
constant Osc2_VFc: real := Osc2_Vb; -- V
constant Osc2_iVFc: integer := integer(Osc2_VFc * real(IVmax)/Vmax);
constant Osc2_VFd: real := Osc2_Vce; -- V
constant Osc2_iVFd: integer := integer(Osc2_VFd * real(IVmax)/Vmax);
-- Oscillator2 charge/discharge time constants
constant Osc2_RCc: real := (Osc2_R1+Osc2_R2)*Osc2_C/1000.0; -- s
constant Osc2_ikc: integer := integer(Osc2_Fs * 1.0E6 * Osc2_RCc / 2.0**Osc2_Div2n);
constant Osc2_RCd: real := Osc2_R2*Osc2_C/1000.0; -- s
constant Osc2_ikd: integer := integer(Osc2_Fs * 1.0E6 * Osc2_RCd / 2.0**Osc2_Div2n);
-- Filter2 --
constant Filt2_div: integer := integer(2**Filt2_Div2n);
constant Filt2_R4p: real := 1.0/(1.0/Filt2_R1+1.0/Filt2_R4); -- k
constant Filt2_R5p: real := 1.0/(1.0/Filt2_R1+1.0/Filt2_R5); -- k
constant Filt2_Rp: real := 1.0/(1.0/Filt2_R3+1.0/Filt2_R4+1.0/Filt2_R5p); -- k
constant Filt2_Rs: real := 1.0/(1.0/Filt2_R2+1.0/Filt2_R3-Filt2_Rp/(Filt2_R3**2)); -- k
constant Filt2_RC: real := Filt2_Rs*Filt2_C/1000.0; -- s
constant Filt2_ik: integer := integer(Filt2_Fs*1.0E6*Filt2_RC / 2.0**Filt2_Div2n);
-- Filter2 voltages
constant Filt2_V0: real := Filt2_V*Filt2_Rp*Filt2_Rs/(Filt2_R3*Filt2_R4); -- V
constant Filt2_iV0: integer := integer(Filt2_V0 * real(IVmax)/Vmax);
constant Filt2_V1: real := Filt2_V*Filt2_Rp*Filt2_Rs/(Filt2_R4p*Filt2_R3); -- V
constant Filt2_iV1: integer := integer(Filt2_V1 * real(IVmax)/Vmax);
constant Filt2_V2: real := Filt2_V*Filt2_Rp*Filt2_Rs/(Filt2_R3*Filt2_R4)+Filt2_V*Filt2_Rs/Filt2_R2; -- V
constant Filt2_iV2: integer := integer(Filt2_V2 * real(IVmax)/Vmax);
constant Filt2_V3: real := Filt2_V*Filt2_Rp*Filt2_Rs/(Filt2_R3*Filt2_R4p)+Filt2_V*Filt2_Rs/Filt2_R2; -- V
constant Filt2_iV3: integer := integer(Filt2_V3 * real(IVmax)/Vmax);
-- Oscillator3 --
constant Osc3_div: integer := integer(2**Osc3_Div2n);
-- Oscillator3 charge/discharge voltages
constant Osc3_VFc: real := Osc3_Vb; -- V
constant Osc3_iVFc: integer := integer(Osc3_VFc * real(IVmax)/Vmax);
constant Osc3_VFd: real := Osc3_Vce; -- V
constant Osc3_iVFd: integer := integer(Osc3_VFd * real(IVmax)/Vmax);
-- Oscillator3 charge/discharge time constants
constant Osc3_RCc: real := (Osc3_R1+Osc3_R2)*Osc3_C/1000.0; -- s
constant Osc3_ikc: integer := integer(Osc3_Fs * 1.0E6 * Osc3_RCc / 2.0**Osc3_Div2n);
constant Osc3_RCd: real := Osc3_R2*Osc3_C/1000.0; -- s
constant Osc3_ikd: integer := integer(Osc3_Fs * 1.0E6 * Osc3_RCd / 2.0**Osc3_Div2n);
signal u_c1 : unsigned(15 downto 0) := (others => '0');
signal u_c2 : unsigned(15 downto 0) := (others => '0');
signal u_c3 : unsigned(16 downto 0) := (others => '0');
signal flip1 : std_logic := '0';
signal flip2 : std_logic := '0';
signal flip3 : std_logic := '0';
signal triggers : std_logic_vector(1 downto 0) := "00";
--signal kc : unsigned(15 downto 0) := (others =>'0');
--signal kd : unsigned(15 downto 0) := (others =>'0');
signal kc : integer range 0 to Osc1_ik_max;
signal kd : integer range 0 to Osc1_ik_max;
signal u_cf : unsigned(15 downto 0) := (others => '0');
signal flips : std_logic_vector(1 downto 0) := "00";
signal vf : unsigned(15 downto 0) := (others =>'0');
signal u_cf_scaled : unsigned(23 downto 0) := (others => '0');
signal u_ctrl : unsigned(15 downto 0) := (others => '0');
signal sound: std_logic := '0';
begin
-- Oscillateur1
-- R1 = 47k, R2 = 100k, C1=0.01e-6, C2=0.047e-6, C3=1.000e-6 SR=10MHz
-- Div = 2^8
-- trigger = 00
-- Charge : VF1 = 65535, k1 = 57 (R1+R2, C1)
-- Decharge : VF2 = 2621, k2 = 39 (R2, C1)
-- trigger = 01
-- Charge : VF1 = 65535, k1 = 2756 (R1+R2, C1+C2)
-- Decharge : VF2 = 2621, k2 = 1875 (R2, C1+C2)
-- trigger = 10
-- Charge : VF1 = 65535, k1 = 5800 (R1+R2, C1+C3)
-- Decharge : VF2 = 2621, k2 = 3945 (R2, C1+C3)
-- trigger = 11
-- Charge : VF1 = 65535, k1 = 8498 (R1+R2, C1+C2+C3)
-- Decharge : VF2 = 2621, k2 = 5781 (R2, C1+C2+C3)
triggers <= trigger2 & trigger1;
with triggers select
kc <= Osc1_T0_ikc when "00",
Osc1_T1_ikc when "01",
Osc1_T2_ikc when "10",
Osc1_T3_ikc when others;
with triggers select
kd <= Osc1_T0_ikd when "00",
Osc1_T1_ikd when "01",
Osc1_T2_ikd when "10",
Osc1_T3_ikd when others;
process (clk)
variable cnt: integer range 0 to Osc1_ik_max := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c1 <= (others => '0');
else
if u_c1 > X"AAAA" then flip1 <= '0'; end if;
if u_c1 < X"5555" then flip1 <= '1'; end if;
cnt := cnt + 1;
if flip1 = '1' then
if cnt = kc then
cnt := 0;
u_c1 <= u_c1 + (Osc1_iVFc - u_c1)/Osc1_div;
end if;
else
if cnt = kd then
cnt := 0;
u_c1 <= u_c1 - (u_c1 - Osc1_iVFd)/Osc1_div;
end if;
end if;
end if;
end if;
end process;
-- Oscillateur2
-- R1 = 510k, R2 = 510k, C=1.000e-6, SR=10MHz
-- Charge : VF1 = 65535, k1 = 39844 (R1+R2, C)
-- Decharge : VF2 = 2621, k2 = 19922 (R2, C)
-- Div = 2^8
process (clk)
variable cnt: integer range 0 to imax(Osc2_ikc,Osc2_ikd) := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c2 <= (others => '0');
else
if u_c2 > X"AAAA" then flip2 <= '0'; end if;
if u_c2 < X"5555" then flip2 <= '1'; end if;
cnt := cnt + 1;
if flip2 = '1' then
if cnt = Osc2_ikc then
cnt := 0;
u_c2 <= u_c2 + (Osc2_iVFc - u_c2)/Osc2_div;
end if;
else
if cnt = Osc2_ikd then
cnt := 0;
u_c2 <= u_c2 - (u_c2 - Osc2_iVFd)/Osc2_div;
end if;
end if;
end if;
end if;
end process;
-- Filtre
-- V1 = 5V
-- R1 = 10k, R2 = 5.1k, R3 = 5.1k, R4 = 5k, R5 = 10k, C=100.0e-6, SR=10MHz
-- Rp = R3//R4//R4//R1 = 1.68k
-- Rs = 1/(1/R2 + 1/R3 - Rp/(R3*R3)) = 3.05k
-- k = 11922 (Rs*C)
-- Div = 2^8
-- VF00 = 13159 (V*Rp*Rs)/(R4*R3)
-- VF01 = 19738 (V*Rp*Rs)/(R4p*R3)
-- VF10 = 52377 (V*Rp*Rs)/(R4*R3) + V*Rs/R2
-- VF11 = 58957 (V*Rp*Rs)/(R4p*R3) + V*Rs/R2
flips <= flip2 & flip1;
with flips select
vf <= to_unsigned(Filt2_iV0,16) when "00",
to_unsigned(Filt2_iV1,16) when "01",
to_unsigned(Filt2_iV2,16) when "10",
to_unsigned(Filt2_iV3,16) when others;
process (clk)
variable cnt: integer range 0 to Filt2_ik := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_cf <= (others => '0');
else
cnt := cnt + 1;
if vf > u_cf then
if cnt = Filt2_ik then
cnt := 0;
u_cf <= u_cf + (vf - u_cf)/Filt2_div;
end if;
else
if cnt = Filt2_ik then
cnt := 0;
u_cf <= u_cf - (u_cf - vf)/Filt2_div;
end if;
end if;
end if;
end if;
end process;
-- U_CTRL
-- flip1 = 0 u_ctrl = 5V*Rp/R4 + u_cf*Rp/R3 # 22020 + u_cf*84/256
-- flip1 = 1 u_ctrl = 5V*Rp/R4p + u_cf*Rp/R3 # 33063 + u_cf*84/256
u_cf_scaled <= u_cf*to_unsigned(C_flip1_scale,8);
with flip1 select
u_ctrl <= to_unsigned(C_flip1_0,16)+u_cf_scaled(23 downto 8) when '0',
to_unsigned(C_flip1_1,16)+u_cf_scaled(23 downto 8) when others;
-- Oscillateur3
-- R1 = 20k, R2 = 20k, C=0.001e-6 SR=50MHz
-- Charge : VF1 = 65535, k1 = 31 (R1+R2)
-- Decharge : VF2 = 2621, k2 = 16 (R2)
-- Div = 2^6
-- Diviseur
-- LS163 : Count up, Sync load when 0xF (no toggle sound if divider = 0xF)
-- LS74 : Divide by 2
process (clk)
variable cnt: integer range 0 to imax(Osc3_ikc,Osc3_ikd) := 0;
variable cnt2: unsigned(3 downto 0) := (others => '0');
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c3 <= (others => '0');
flip3 <= '0';
else
if u_c3 > u_ctrl then flip3 <= '0'; end if;
if u_c3 < u_ctrl/2 then
flip3 <= '1';
if flip3 = '0' then
cnt2 := cnt2 + 1;
if cnt2 = "0000" then
cnt2 := unsigned(divider);
if divider /= "1111" then sound <= not sound; end if;
end if;
end if;
end if;
cnt := cnt + 1;
if flip3 = '1' then
if cnt = Osc3_ikc then
cnt := 0;
u_c3 <= u_c3 + (Osc3_iVFc - u_c3)/Osc3_div;
end if;
else
if cnt = Osc3_ikd then
cnt := 0;
u_c3 <= u_c3 - (u_c3 - Osc3_iVFd)/Osc3_div;
end if;
end if;
end if;
end if;
end process;
with trigger2 select snd <= '0'&sound when '1', sound&'0' when others;
end struct;

View File

@@ -1,290 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix sound effect3 (noise) by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
-- this module generates noisy sound of ship missile shooting
-- ship explosions and enemy mothership explosion
-- it is often head throught all the levels of the game
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
entity phoenix_effect3 is
generic(
-- Command 1
Cmd1_Fs: real := 11.0; -- MHz
Cmd1_V: real := 5.0; -- V
Cmd1_Vd: real := 0.46; -- V
Cmd1_Vce: real := 0.2; -- V
Cmd1_R1: real := 1.0; -- k
Cmd1_R2: real := 0.33; -- k
Cmd1_R3: real := 20.0; -- k
Cmd1_C: real := 6.8; -- uF
Cmd1_Div2n: integer := 8; -- bits divisor
--Cmd1_bits: integer := 16; -- bits counter
-- Command 2
Cmd2_Fs: real := 11.0; -- MHz
Cmd2_V: real := 5.0; -- V
Cmd2_Vd: real := 0.46; -- V
Cmd2_Vce: real := 0.2; -- V
Cmd2_R1: real := 1.0; -- k
Cmd2_R2: real := 0.33; -- k
Cmd2_R3: real := 47.0; -- k
Cmd2_C: real := 6.8; -- uF
Cmd2_Div2n: integer := 8; -- bits divisor
--Cmd2_bits: integer := 16; -- bits counter
-- Oscillator
Osc_Fs: real := 11.0; -- MHz
Osc_Vb: real := 5.0; -- V
Osc_Vce: real := 0.2; -- V
Oscmin_R1a: real := 47.0; -- k
Oscmin_R2: real := 0.33; -- k
Oscmin_C: real := 0.05; -- uF
Oscmin_bits: integer := 16; -- bits counter
Oscmax_R1a: real := 2.553; -- k
Oscmax_R2: real := 1.0; -- k
Oscmax_C: real := 0.05; -- uF
Osc_Div2n: integer := 7; -- bits divisor
--Osc_bits: integer := 16; -- bits counter
C_commande2_chop_k: integer := 62500;
Vmax: real := 5.0; -- V
Vmax_bits: integer := 16 -- number of bits to represent Vmax
);
port(
clk : in std_logic;
reset : in std_logic;
trigger1 : in std_logic;
trigger2 : in std_logic;
snd : out std_logic_vector(7 downto 0)
);
end phoenix_effect3;
architecture struct of phoenix_effect3 is
-- integer representation of voltage, full range
constant IVmax: integer := integer(2**Vmax_bits)-1;
-- Command1 --
constant Cmd1_div: integer := integer(2**Cmd1_Div2n);
-- Command1 charge/discharge voltages
constant Cmd1_VFc: real := Cmd1_V-Cmd1_Vd; -- V
constant Cmd1_iVFc: integer := integer(Cmd1_VFc * real(IVmax)/Vmax);
constant Cmd1_VFd: real := Cmd1_Vce+Cmd1_Vd; -- V
constant Cmd1_iVFd: integer := integer(Cmd1_VFd * real(IVmax)/Vmax);
-- Command1 charge/discharge time constants
constant Cmd1_RCc: real := (Cmd1_R1+Cmd1_R2+Cmd1_R3)*Cmd1_C/1000.0; -- s
constant Cmd1_ikc: integer := integer(Cmd1_Fs * 1.0E6 * Cmd1_RCc / 2.0**Cmd1_Div2n);
constant Cmd1_RCd: real := Cmd1_R2*Cmd1_C/1000.0; -- s
constant Cmd1_ikd: integer := integer(Cmd1_Fs * 1.0E6 * Cmd1_RCd / 2.0**Cmd1_Div2n);
-- Command2 --
constant Cmd2_div: integer := integer(2**Cmd2_Div2n);
-- Command2 charge/discharge voltages
constant Cmd2_VFc: real := (Cmd2_V-Cmd2_Vd)*Cmd2_R3/(Cmd2_R1+Cmd2_R2+Cmd2_R3); -- V
constant Cmd2_iVFc: integer := integer(Cmd2_VFc * real(IVmax)/Vmax);
constant Cmd2_VFd: real := 0.0; -- V
constant Cmd2_iVFd: integer := integer(Cmd2_VFd * real(IVmax)/Vmax);
-- Command2 charge/discharge time constants
constant Cmd2_RCc: real := (Cmd2_R1+Cmd2_R2)*Cmd2_R3/(Cmd2_R1+Cmd2_R2+Cmd2_R3)*Cmd2_C/1000.0; -- s
constant Cmd2_ikc: integer := integer(Cmd2_Fs * 1.0E6 * Cmd2_RCc / 2.0**Cmd2_Div2n);
constant Cmd2_RCd: real := Cmd2_R3*Cmd2_C/1000.0; -- s
constant Cmd2_ikd: integer := integer(Cmd2_Fs * 1.0E6 * Cmd2_RCd / 2.0**Cmd2_Div2n);
-- Oscillator --
constant Osc_div: integer := integer(2**Osc_Div2n);
-- Oscillator charge/discharge voltages
constant Osc_VFc: real := Osc_Vb; -- V
constant Osc_iVFc: integer := integer(Osc_VFc * real(IVmax)/Vmax);
constant Osc_VFd: real := Osc_Vce; -- V
constant Osc_iVFd: integer := integer(Osc_VFd * real(IVmax)/Vmax);
-- Oscillator min charge/discharge time constants
constant Oscmin_RCc: real := (Oscmin_R1a+Oscmin_R2)*Oscmin_C/1000.0; -- s
constant Oscmin_ikc: integer := integer(Osc_Fs * 1.0E6 * Oscmin_RCc / 2.0**Osc_Div2n);
constant Oscmin_RCd: real := Oscmin_R2*Oscmin_C/1000.0; -- s
constant Oscmin_ikd: integer := integer(Osc_Fs * 1.0E6 * Oscmin_RCd / 2.0**Osc_Div2n);
-- Oscillator max charge/discharge time constants
constant Oscmax_RCc: real := (Oscmax_R1a+Oscmax_R2)*Oscmax_C/1000.0; -- s
constant Oscmax_ikc: integer := integer(Osc_Fs * 1.0E6 * Oscmax_RCc / 2.0**Osc_Div2n);
constant Oscmax_RCd: real := Oscmax_R2*Oscmax_C/1000.0; -- s
constant Oscmax_ikd: integer := integer(Osc_Fs * 1.0E6 * Oscmax_RCd / 2.0**Osc_Div2n);
function imax(x,y: integer) return integer is begin
if x > y then
return x;
else
return y;
end if;
end imax;
signal u_c1 : unsigned(15 downto 0) := (others => '0');
signal u_c2 : unsigned(15 downto 0) := (others => '0');
signal u_c3 : unsigned(15 downto 0) := (others => '0');
signal flip3 : std_logic := '0';
signal k_ch : unsigned(25 downto 0) := (others =>'0');
signal u_ctrl1 : unsigned(15 downto 0) := (others => '0');
signal u_ctrl2 : unsigned(15 downto 0) := (others => '0');
signal u_ctrl1_f : unsigned( 7 downto 0) := (others => '0');
signal u_ctrl2_f : unsigned( 7 downto 0) := (others => '0');
signal sound : unsigned( 7 downto 0) := (others => '0');
signal shift_reg : std_logic_vector(17 downto 0) := (others => '0');
begin
-- Commande1
-- R1 = 1k, R2 = 0.33k, R3 = 20k C=6.8e-6 SR=10MHz
-- Charge : VF1 = 59507, k1 = 5666 (R1+R2+R3)
-- Decharge : VF2 = 8651, k2 = 88 (R2)
-- Div = 2^8
process (clk)
-- variable cnt : unsigned(15 downto 0) := (others => '0');
variable cnt: integer range 0 to imax(Cmd1_ikc,Cmd1_ikd)*2 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c1 <= (others => '0');
else
cnt := cnt + 1;
if trigger1 = '1' then
-- if cnt > C_commande1_k1 then
if cnt > Cmd1_ikc then
cnt := 0;
-- u_c1 <= u_c1 + (C_commande1_VF1 - u_c1)/256;
u_c1 <= u_c1 + (Cmd1_iVFc - u_c1)/Cmd1_div;
end if;
else
-- if cnt > C_commande1_k2 then
if cnt > Cmd1_ikd then
cnt := 0;
-- u_c1 <= u_c1 - (u_c1 - C_commande1_VF2)/256;
u_c1 <= u_c1 - (u_c1 - Cmd1_iVFd)/Cmd1_div;
end if;
end if;
end if;
end if;
end process;
-- Commande2
-- R1 = 1k, R2 = 0.33k, R3 = 47k C=6.8e-6 SR=10MHz
-- Charge : VF1 = 57869, k1 = 344 (R1+R2)//R3
-- Decharge : VF2 = 0, k2 = 12484 (R3)
-- Div = 2^8
process (clk)
-- variable cnt : unsigned(15 downto 0) := (others => '0');
variable cnt: integer range 0 to imax(Cmd2_ikc,Cmd2_ikd)*2 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
-- cnt := (others => '0');
cnt := 0;
u_c2 <= (others => '0');
else
cnt := cnt + 1;
if trigger2 = '1' then
-- if cnt > C_commande2_k1 then
if cnt > Cmd2_ikc then
-- cnt := (others => '0');
cnt := 0;
-- u_c2 <= u_c2 + (C_commande2_VF1 - u_c2)/256;
u_c2 <= u_c2 + (Cmd2_iVFc - u_c2)/Cmd2_div;
end if;
else
-- if cnt > C_commande2_k2 then
if cnt > Cmd2_ikd then
-- cnt := (others => '0');
cnt := 0;
-- u_c2 <= u_c2 - (u_c2 - C_commande2_VF2)/256;
u_c2 <= u_c2 - (u_c2 - Cmd2_iVFd)/Cmd2_div;
end if;
end if;
end if;
end if;
end process;
-- control voltage from command1 is R3 voltage (not u_c1 voltage)
with trigger1 select
-- u_ctrl1 <= (to_unsigned(C_commande1_VF1,16) - u_c1) when '1', (others=>'0') when others;
u_ctrl1 <= (to_unsigned(Cmd1_iVFc,16) - u_c1) when '1', (others=>'0') when others;
-- control voltage from command2 is u_c2 voltage
u_ctrl2 <= u_c2;
-- sum up and scaled both control voltages to vary R1 resistor of oscillator
-- k_ch <= shift_right(((u_ctrl1/2 + u_ctrl2/2) * to_unsigned(C_oscillateur_min_k1-C_oscillateur_max_k1,10)),15) + C_oscillateur_max_k1;
k_ch <= shift_right(((u_ctrl1/2 + u_ctrl2/2) * to_unsigned(Oscmin_ikc-Oscmax_ikc,10)),15) + Oscmax_ikc;
-- Oscillateur
-- R1 = 47k..2.533k, R2 = 1k, C=0.05e-6, SR=50MHz
-- Charge : VF1 = 65536, k_ch = 938..69 (R1+R2, C)
-- Decharge : VF2 = 2621, k2 = 20 (R2, C)
-- Div = 2^7
-- noise generator triggered by oscillator output
process (clk)
variable cnt: integer range 0 to imax(imax(Oscmin_ikc,Oscmin_ikd), imax(Oscmax_ikc,Oscmax_ikd))+256 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
u_c3 <= (others => '0');
else
if u_c3 > X"AAAA" then flip3 <= '0'; end if;
if u_c3 < X"5555" then
flip3 <= '1';
if flip3 = '0' then
shift_reg <= shift_reg(16 downto 0) & not(shift_reg(17) xor shift_reg(16));
end if;
end if;
cnt := cnt + 1;
if flip3 = '1' then
if cnt > k_ch then
cnt := 0;
u_c3 <= u_c3 + (Osc_iVFc - u_c3)/Osc_div;
end if;
else
if cnt > Oscmax_ikd then
cnt := 0;
u_c3 <= u_c3 - (u_c3 - Osc_iVFd)/Osc_div;
end if;
end if;
end if;
end if;
end process;
-- modulated (chop) command1 voltage with noise generator output
with shift_reg(17) xor shift_reg(16) select
u_ctrl1_f <= u_ctrl1(15 downto 8)/2 when '0', (others => '0') when others;
-- modulated (chop) command2 voltage with noise generator output
-- and add 400Hz filter (raw sub-sampling)
-- f=10 MHz, k = 25000
process (clk)
variable cnt : unsigned(15 downto 0) := (others => '0');
begin
if rising_edge(clk) then
cnt := cnt + 1;
if cnt > C_commande2_chop_k then
cnt := (others => '0');
if (shift_reg(17) xor shift_reg(16)) = '0' then
u_ctrl2_f <= u_ctrl2(15 downto 8)/2;
else
u_ctrl2_f <= (others => '0');
end if;
end if;
end if;
end process;
-- mix modulated noises 1 and 2
sound <= u_ctrl1_f + u_ctrl2_f;
snd <= std_logic_vector(sound);
end struct;

View File

@@ -1,309 +0,0 @@
---------------------------------------------------------------------------------
-- DE2-35 Top level for Phoenix by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
--
-- Main features
-- PS2 keyboard input
-- wm8731 sound output
-- NO board SRAM used
--
-- sw 0: on/off hdmi-audio
--
-- Board switch : ---- todo fixme switches note
-- 1 - 4 : dip switch
-- 0-1 : lives 3-6
-- 3-2 : bonus life 30K-60K
-- 4 : coin 1-2
-- 6-5 : unkonwn
-- 7 : upright-cocktail
-- 8 -10 : sound_select
-- 0XX : all mixed (normal)
-- 100 : sound1 only
-- 101 : sound2 only
-- 110 : sound3 only
-- 111 : melody only
-- Board key :
-- 0 : reset
--
---------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
entity phoenix_mist is
port
(
CLOCK_27 : in std_logic;
LED : out std_logic;
VGA_R : out std_logic_vector(5 downto 0);
VGA_G : out std_logic_vector(5 downto 0);
VGA_B : out std_logic_vector(5 downto 0);
VGA_HS : out std_logic;
VGA_VS : out std_logic;
SPI_SCK : in std_logic;
SPI_DI : in std_logic;
SPI_DO : out std_logic;
SPI_SS2 : in std_logic;
SPI_SS3 : in std_logic;
CONF_DATA0 : in std_logic;
AUDIO_L : out std_logic;
AUDIO_R : out std_logic
);
end;
architecture struct of phoenix_mist is
signal clk : std_logic;
signal clk_88m : std_logic;
signal reset : std_logic;
signal clock_stable : std_logic;
signal audio : std_logic_vector(11 downto 0);
signal video_r, video_g, video_b: std_logic_vector(1 downto 0);
signal vsync, hsync : std_logic;
signal dip_switch : std_logic_vector(7 downto 0);-- := (others => '0');
signal status : std_logic_vector(31 downto 0);
signal buttons : std_logic_vector(1 downto 0);
signal scandoubler_disable : std_logic;
signal ypbpr : std_logic;
signal ce_pix : std_logic;
signal scanlines : std_logic_vector(1 downto 0);
signal hq2x : std_logic;
signal coin : std_logic;
signal player_start : std_logic_vector(1 downto 0);
signal button_left, button_right, button_protect, button_fire: std_logic;
signal joy0 : std_logic_vector(7 downto 0);
signal joy1 : std_logic_vector(7 downto 0);
signal ps2Clk : std_logic;
signal ps2Data : std_logic;
signal kbd_joy : std_logic_vector(7 downto 0);
signal upjoyL : std_logic;
signal upjoyR : std_logic;
signal upjoyB : std_logic;
-- config string used by the io controller to fill the OSD
constant CONF_STR : string := "PHOENIX;;O4,Screen Direction,Upright,Normal;O67,Scandoubler Fx,None,HQ2x,CRT 25%,CRT 50%;T5,Reset;V,v1.1;";
function to_slv(s: string) return std_logic_vector is
constant ss: string(1 to s'length) := s;
variable rval: std_logic_vector(1 to 8 * s'length);
variable p: integer;
variable c: integer;
begin
for i in ss'range loop
p := 8 * i;
c := character'pos(ss(i));
rval(p - 7 to p) := std_logic_vector(to_unsigned(c,8));
end loop;
return rval;
end function;
component mist_io
generic ( STRLEN : integer := 0 );
port (
clk_sys :in std_logic;
SPI_SCK, CONF_DATA0, SPI_DI :in std_logic;
SPI_DO : out std_logic;
conf_str : in std_logic_vector(8*STRLEN-1 downto 0);
buttons : out std_logic_vector(1 downto 0);
joystick_0 : out std_logic_vector(7 downto 0);
joystick_1 : out std_logic_vector(7 downto 0);
status : out std_logic_vector(31 downto 0);
scandoubler_disable, ypbpr : out std_logic;
ps2_kbd_clk : out std_logic;
ps2_kbd_data : out std_logic
);
end component mist_io;
component video_mixer
generic ( LINE_LENGTH : integer := 352; HALF_DEPTH : integer := 1 );
port (
clk_sys, ce_pix, ce_pix_actual : in std_logic;
SPI_SCK, SPI_SS3, SPI_DI : in std_logic;
scanlines : in std_logic_vector(1 downto 0);
scandoubler_disable, hq2x, ypbpr, ypbpr_full : in std_logic;
rotate : in std_logic_vector(1 downto 0);
R, G, B : in std_logic_vector(2 downto 0);
HSync, VSync, line_start, mono : in std_logic;
VGA_R,VGA_G, VGA_B : out std_logic_vector(5 downto 0);
VGA_VS, VGA_HS : out std_logic
);
end component video_mixer;
component keyboard
PORT(
clk : in std_logic;
reset : in std_logic;
ps2_kbd_clk : in std_logic;
ps2_kbd_data : in std_logic;
joystick : out std_logic_vector (7 downto 0)
);
end component;
begin
-- SWITCH 1: SWITCH 2: NUMBER OF SPACESHIPS:
-- --------- --------- ---------------------
-- OFF OFF 6
-- ON OFF 5
-- OFF ON 4
-- ON ON 3
-- FIRST FREE SECOND FREE
-- SWITCH 3: SWITCH 4: SHIP SCORE: SHIP SCORE:
-- --------- --------- ----------- -----------
-- OFF OFF 6,000 60,000
-- ON OFF 5,000 50,000
-- OFF ON 4,000 40,000
-- ON ON 3,000 30,000
--Cocktail,Factory,Factory,Factory,Bonus2,Bonus1,Ships2,Ships1
dip_switch <= "00001111";
mist_io_inst : mist_io
generic map (STRLEN => CONF_STR'length)
port map (
clk_sys => clk,
SPI_SCK => SPI_SCK,
CONF_DATA0 => CONF_DATA0,
SPI_DI => SPI_DI,
SPI_DO => SPI_DO,
conf_str => to_slv(CONF_STR),
buttons => buttons,
scandoubler_disable => scandoubler_disable,
ypbpr => ypbpr,
joystick_1 => joy1,
joystick_0 => joy0,
status => status,
ps2_kbd_clk => ps2Clk,
ps2_kbd_data => ps2Data
);
--
-- Audio
--
u_dac1 : entity work.dac
port map(
clk_i => clk_88m,
res_n_i => not reset,
dac_i => audio,
dac_o => AUDIO_L
);
u_dac2 : entity work.dac
port map(
clk_i => clk_88m,
res_n_i => not reset,
dac_i => audio,
dac_o => AUDIO_R
);
pll: entity work.pll27
port map(
inclk0 => CLOCK_27,
c0 => clk_88m,
c1 => clk,
locked => clock_stable
);
reset <= status(0) or status(5) or buttons(1) or not clock_stable;
u_keyboard : keyboard
port map(
clk => clk,
reset => reset,
ps2_kbd_clk => ps2Clk,
ps2_kbd_data => ps2Data,
joystick => kbd_joy
);
process(clk_88m)
variable cnt: integer range 0 to 6000000 := 0;
begin
if rising_edge(clk_88m) then
if status(3 downto 1) /= "000" then
cnt := 0;
coin <= status(1);
player_start <= status(3 downto 2);
else
if cnt < 6000000 then
cnt := cnt + 1;
else
coin <= '0';
player_start <= "00";
end if;
end if;
end if;
end process;
upjoyB <= joy0(2) or joy1(2) when status(4) = '0' else joy0(0) or joy1(0);
upjoyL <= joy0(1) or joy1(1) or kbd_joy(6) when status(4) = '0' else joy0(2) or joy1(2) or kbd_joy(5);
upjoyR <= joy0(0) or joy1(0) or kbd_joy(7) when status(4) = '0' else joy0(3) or joy1(3) or kbd_joy(4);
phoenix : entity work.phoenix
port map
(
clk => clk,
reset => reset,
ce_pix => ce_pix,
dip_switch => dip_switch,
btn_coin => kbd_joy(3) or coin,--ESC
btn_player_start(0) => kbd_joy(1) or player_start(0),--1
btn_player_start(1) => kbd_joy(2) or player_start(1),--2
btn_left => upjoyL,
btn_right => upjoyR,
btn_barrier => upjoyB or kbd_joy(2),--TAB
btn_fire => joy0(4) or joy1(4) or kbd_joy(0),--space
video_r => video_r,
video_g => video_g,
video_b => video_b,
video_hs => hsync,
video_vs => vsync,
audio_select => "000",
audio => audio
);
scanlines(0) <= '1' when status(7 downto 6) = "10" else '0';
scanlines(1) <= '1' when status(7 downto 6) = "11" else '0';
hq2x <= '1' when status(7 downto 6) = "01" else '0';
vmixer : video_mixer
port map (
clk_sys => clk_88m,
ce_pix => ce_pix,
ce_pix_actual => ce_pix,
SPI_SCK => SPI_SCK,
SPI_SS3 => SPI_SS3,
SPI_DI => SPI_DI,
rotate => '1' & not status(4),
scanlines => scanlines,
scandoubler_disable => scandoubler_disable,
hq2x => hq2x,
ypbpr => ypbpr,
ypbpr_full => '1',
R => video_r & video_r(1),
G => video_g & video_g(1),
B => video_b & video_b(1),
HSync => hsync,
VSync => vsync,
line_start => '0',
mono => '0',
VGA_R => VGA_R,
VGA_G => VGA_G,
VGA_B => VGA_B,
VGA_VS => VGA_VS,
VGA_HS => VGA_HS
);
LED <= '1';
end struct;

View File

@@ -1,241 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix music by Dar (darfpga@aol.fr) (April 2016)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
use ieee.math_real.all;
entity phoenix_music is
generic(
C_clk_freq: real := 11.0 -- MHz
);
port(
clk : in std_logic;
reset : in std_logic;
trigger : in std_logic;
sel_song : in std_logic;
snd : out std_logic_vector(7 downto 0)
);
end phoenix_music;
architecture struct of phoenix_music is
constant C_voice_attack: integer := integer(230.0 * C_clk_freq); -- larger value is faster
constant C_song0_tempo: integer := integer(2200.0 * C_clk_freq); -- larger value is faster
constant C_song1_tempo: integer := integer(1700.0 * C_clk_freq); -- larger value is faster
constant C_voice_down_rate: integer := integer(4000.0 / C_clk_freq); -- larger value is slower
type voice_array is array (0 to 94) of integer range 0 to 127;
-- main voice1 (Jeux Interdits)
constant voice1 : voice_array := (
32,96,32,96,32,96,32,96,26,90,24,88,24,88,23,87,21,85,21,85,24,88,32,96,37,101,101,101,101,101,37,101,35,99,33,97,33,97,32,96,26,90,26,90,32,96,33,97,32,96,33,97,32,96,36,100,33,97,32,96,32,96,26,90,24,88,24,88,23,87,21,85,23,87,23,87,23,87,23,87,24,88,23,87,21,85,24,88,32,96,37,101,101,101,101);
-- accompagnement voice1
constant voice2 : voice_array := (
5,69,69,69,69,69,16,80,80,80,80,80,8,72,8,72,8,72,16,80,80,80,80,80,5,69,5,8,16,21,5,69,69,69,69,69,17,81,81,81,81,81,10,74,74,74,74,74,16,80,80,80,80,80,16,80,80,80,80,80,8,72,72,72,72,72,5,69,69,69,69,69,7,71,71,71,71,71,17,81,81,81,8,72,5,69,16,80,8,72,5,69,69,69,69);
-- voice1, voice2 and voice3 value description
-- bit3-bit0 : tone from 0(La/A) to 11(Sol/G#)
-- bit5-bit4 : octave from 0(220Hz)to 2(880Hz)
-- bit6 : 0 = strike (restart) the tone, 1 = don't strike (hold) the tone
type voice_array2 is array (0 to 45) of integer range 0 to 127;
-- main voice3 (La lettre a Elise)
constant voice3 : voice_array2 := (
37,36,37,36,37,32,35,33,26,5,10,17,21,26,32,5,16,21,25,32,33,5,10,17,37,36,37,36,37,32,35,33,26,5,10,17,21,26,32,5,16,21,33,32,26,90);
type period_array is array (0 to 11) of integer range 0 to 65535;
-- Octave 220Hz @ 10MHz
constant tone_period : period_array := (
45455, -- ton 0 La (A )
42903, -- ton 1 La# (A#)
40495, -- ton 2 Si (B )
38223, -- ton 3 Do (C )
36077, -- ton 4 Do# (C#)
34052, -- ton 5 Re (D )
32141, -- ton 6 Re# (D#)
30337, -- ton 7 Mi (E )
28635, -- ton 8 Fa (F )
27027, -- ton 9 Fa# (F#)
25511, -- ton 10 Sol (G )
24079 -- ton 11 Sol# (G#)
);
signal tempo_period : integer range 0 to C_song0_tempo := C_song1_tempo; --0.19s @ 100kHz
signal voice1_tone : integer range 0 to 65535 := 0;
signal voice1_tone_div : integer range 0 to 65535 := 0;
signal voice1_code : unsigned(6 downto 0) := "0000000";
signal voice1_vol : unsigned(7 downto 0) := "00000000";
signal voice1_snd : std_logic := '0';
signal voice2_tone : integer range 0 to 65535 := 0;
signal voice2_tone_div : integer range 0 to 65535 := 0;
signal voice2_code : unsigned(6 downto 0) := "0000000";
signal voice2_vol : unsigned(7 downto 0) := "00000000";
signal voice2_snd : std_logic := '0';
signal snd1 : unsigned(7 downto 0) := "00000000";
signal snd2 : unsigned(7 downto 0) := "00000000";
signal trigger_r : std_logic := '0';
signal max_step : integer range 0 to 94 := 94;
signal sel_song_r: std_logic := '1';
begin
process (clk)
variable cnt : integer range 0 to 127 := 0;
variable step : integer range 0 to 94 := 94;
variable tempo : integer range 0 to C_song0_tempo := 0;
variable voice1_code_v : unsigned(6 downto 0) := "0000000";
variable voice2_code_v : unsigned(6 downto 0) := "0000000";
variable voice1_down_rate : integer range 0 to C_voice_down_rate := 0;
variable voice2_down_rate : integer range 0 to C_voice_down_rate := 0;
begin
if rising_edge(clk) then
trigger_r <= trigger;
if reset = '1' then
cnt := 0;
step := 94;
voice1_vol <= X"00";
voice2_vol <= X"00";
elsif trigger ='1' and trigger_r ='0' and step = 94 then -- restart music on edge trigger if not already playing
cnt := 0;
step := 0;
voice1_vol <= X"00";
voice2_vol <= X"00";
sel_song_r <= sel_song;
if sel_song = '1' then
max_step <= 94;
tempo_period <= C_song1_tempo;
else
max_step <= 46;
tempo_period <= C_song0_tempo;
end if;
else
cnt := cnt +1;
if cnt >= 100 then
cnt := 0;
tempo := tempo +1;
if tempo >= tempo_period then -- next beat
tempo := 0;
if step < max_step then -- if not end of music get next note
if sel_song_r = '1' then
voice1_code_v := to_unsigned(voice1(step),7);
voice2_code_v := to_unsigned(voice2(step),7);
else
voice1_code_v := to_unsigned(voice3(step),7);
voice2_code_v := to_unsigned(voice3(step),7);
end if;
voice1_code <= voice1_code_v;
voice2_code <= voice2_code_v;
step := step + 1;
else -- if end cut-off volume
voice1_vol <= X"00";
voice2_vol <= X"00";
step := 94;
end if;
end if;
if (step < 94) then -- if not end of music
-- manage voice1 volume
-- ramp up fast to xF0 at begining of beat when new strike
if (tempo < C_voice_attack) and (voice1_code_v(6)='0') then
if voice1_vol < X"F0" then voice1_vol <= voice1_vol + X"01"; end if;
voice1_down_rate := 0;
-- ramp down slowly after a while, down to x80
else
if voice1_vol > X"80" then
voice1_down_rate := voice1_down_rate+1;
if voice1_down_rate >= C_voice_down_rate then
voice1_down_rate := 0;
voice1_vol <= voice1_vol - X"01";
end if;
end if;
end if;
-- manage voice2 volume
if (tempo < C_voice_attack) and (voice2_code_v(6)='0') then
if voice2_vol < X"F0" then voice2_vol <= voice2_vol + X"01"; end if;
voice2_down_rate := 0;
else
if voice2_vol > X"80" then
voice2_down_rate := voice2_down_rate+1;
if voice2_down_rate >= C_voice_down_rate then
voice2_down_rate := 0;
voice2_vol <= voice2_vol - X"01";
end if;
end if;
end if;
end if;
end if;
end if;
end if;
end process;
-- get voice1 raw tone
voice1_tone <= tone_period(to_integer(voice1_code(3 downto 0)));
-- get voice1 tone w.r.t octave
with voice1_code(5 downto 4) select
voice1_tone_div <= voice1_tone when "00",
voice1_tone/2 when "01",
voice1_tone/4 when others;
-- generate voice1 frequency
voice1_frequency: process (clk)
variable cnt : integer range 0 to 65535 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
else
cnt := cnt+1;
if cnt >= voice1_tone_div then
cnt := 0;
voice1_snd <= not voice1_snd;
end if;
end if;
end if;
end process;
-- get voice2 raw tone
voice2_tone <= tone_period(to_integer(voice2_code(3 downto 0)));
-- get voice2 tone w.r.t octave
with voice2_code(5 downto 4) select
voice2_tone_div <= voice2_tone when "00",
voice2_tone/2 when "01",
voice2_tone/4 when others;
-- generate voice2 frequency
voice2_frequency: process (clk)
variable cnt : integer range 0 to 65535 := 0;
begin
if rising_edge(clk) then
if reset = '1' then
cnt := 0;
else
cnt := cnt+1;
if cnt >= voice2_tone_div then
cnt := 0;
voice2_snd <= not voice2_snd;
end if;
end if;
end if;
end process;
-- modulate voice1 volume with voice1 frequency
with voice1_snd select snd1 <= voice1_vol when '1', X"00" when others;
-- modulate voice2 volume with voice2 frequency
with voice2_snd select snd2 <= voice2_vol when '1', X"00" when others;
-- mix voice1 and voice 2
snd <= std_logic_vector(('0'&snd1(7 downto 1)) + ('0'&snd2(7 downto 1)));
end struct;

View File

@@ -1,160 +0,0 @@
---------------------------------------------------------------------------------
-- Phoenix video generator by Dar (darfpga@aol.fr)
-- http://darfpga.blogspot.fr
---------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.ALL;
use ieee.numeric_std.all;
entity phoenix_video is
port(
clk11 : in std_logic;
reset : in std_logic;
ce_pix : out std_logic;
hcnt : out std_logic_vector(9 downto 1);
vcnt : out std_logic_vector(8 downto 1);
sync_hs : out std_logic;
sync_vs : out std_logic;
adrsel : out std_logic;
rdy : out std_logic;
vblank : out std_logic;
hblank_frgrd : out std_logic;
hblank_bkgrd : out std_logic
);
end phoenix_video;
architecture struct of phoenix_video is
signal hclk_i : std_logic := '0';
signal hstb_i : std_logic := '0';
signal hcnt_i : unsigned(9 downto 1) := (others=>'0');
signal vcnt_i : unsigned(9 downto 1) := (others=>'0');
signal vcnt2 : std_logic_vector(8 downto 1) := (others=>'0');
signal vblank_n : std_logic := '0';
signal rdy1_i : std_logic;
signal rdy2_i : std_logic;
signal j1 : std_logic;
signal k1 : std_logic;
signal q1 : std_logic;
signal j2 : std_logic;
signal k2 : std_logic;
signal q2 : std_logic;
begin
-- horizontal counter clock (pixel clock)
process(clk11) begin
if falling_edge(clk11) then
hclk_i <= not hclk_i;
end if;
end process;
-- horizontal counter from 0x0A0 to 0x1FF : 352 pixels
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if reset = '1' then
hcnt_i <= (others=>'0');
vcnt_i <= (others=>'0');
else
hcnt_i <= hcnt_i +1;
if hcnt_i = 511 then
hcnt_i <= to_unsigned(160,9);
vcnt_i <= vcnt_i +1;
if vcnt_i = 261 then
vcnt_i <= to_unsigned(0,9);
end if;
end if;
end if;
end if;
end if;
end process;
-- vertical counter clock (line clock) = hblank
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if (hcnt_i(3) and hcnt_i(2) and hcnt_i(1)) = '1' then hstb_i <= not hcnt_i(9); end if;
end if;
end if;
end process;
-- vertical blanking
vblank_n <=
not(vcnt2(8) and vcnt2(7))
or
( not
( not (vcnt2(8) and vcnt2(7) and not vcnt2(6) and not vcnt2(5) and not vcnt2(4))
and
not (vcnt2(8) and vcnt2(7) and not vcnt2(6) and not vcnt2(5) and vcnt2(4))
)
);
-- ready signal for microprocessor
rdy1_i <= not( not(hcnt_i(9)) and not hcnt_i(7) and hcnt_i(6) and not hcnt_i(5));
rdy2_i <= not( not(hcnt_i(9)) and hcnt_i(7) and hcnt_i(6) and hcnt_i(5));
-- background horizontal blanking
j1 <= hcnt_i(6) and hcnt_i(4);
k1 <= hstb_i;
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if (j1 xor k1) = '1' then
q1 <= j1;
elsif j1 = '1' then
q1 <= not q1;
else
q1 <= q1;
end if;
end if;
end if;
end process;
j2 <= not hcnt_i(6) and hcnt_i(5);
k2 <= hcnt_i(8) and hcnt_i(7) and hcnt_i(6) and hcnt_i(4);
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if (j2 xor k2) = '1' then
q2 <= j2;
elsif j2 = '1' then
q2 <= not q2;
else
q2 <= q2;
end if;
end if;
end if;
end process;
-- output
ce_pix <= hclk_i;
hcnt <= std_logic_vector(hcnt_i);
vcnt2 <= std_logic_vector(vcnt_i(8 downto 1)) when vcnt_i < 255 else "11111111";
vcnt <= vcnt2;
--sync <= not(sync1_i xor sync2_i) ; original syncs
rdy <= not(vblank_n and (not (rdy1_i and rdy2_i and not hcnt_i(9))));
adrsel <= vblank_n and hcnt_i(9);
vblank <= not vblank_n;
hblank_frgrd <= hstb_i;
hblank_bkgrd <= not(hcnt_i(9) and q1) and not(hcnt_i(9) and (q2));
process(clk11) begin
if rising_edge(clk11) then
if hclk_i = '1' then
if hcnt_i = 191 then
sync_hs <= '1';
if vcnt_i = 230 then sync_vs <= '1'; end if;
if vcnt_i = 237 then sync_vs <= '0'; end if;
end if;
if hcnt_i = 217 then sync_hs <= '0'; end if;
end if;
end if;
end process;
end struct;

View File

@@ -1,4 +0,0 @@
set_global_assignment -name IP_TOOL_NAME "ALTPLL"
set_global_assignment -name IP_TOOL_VERSION "13.1"
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "pll.vhd"]
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll.ppf"]

View File

@@ -1,387 +0,0 @@
-- megafunction wizard: %ALTPLL%
-- GENERATION: STANDARD
-- VERSION: WM1.0
-- MODULE: altpll
-- ============================================================
-- File Name: pll.vhd
-- Megafunction Name(s):
-- altpll
--
-- Simulation Library Files(s):
-- altera_mf
-- ============================================================
-- ************************************************************
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
--
-- 13.1.0 Build 162 10/23/2013 SJ Web Edition
-- ************************************************************
--Copyright (C) 1991-2013 Altera Corporation
--Your use of Altera Corporation's design tools, logic functions
--and other software and tools, and its AMPP partner logic
--functions, and any output files from any of the foregoing
--(including device programming or simulation files), and any
--associated documentation or information are expressly subject
--to the terms and conditions of the Altera Program License
--Subscription Agreement, Altera MegaCore Function License
--Agreement, or other applicable license agreement, including,
--without limitation, that your use is for the sole purpose of
--programming logic devices manufactured by Altera and sold by
--Altera or its authorized distributors. Please refer to the
--applicable agreement for further details.
LIBRARY ieee;
USE ieee.std_logic_1164.all;
LIBRARY altera_mf;
USE altera_mf.all;
ENTITY pll IS
PORT
(
areset : IN STD_LOGIC := '0';
inclk0 : IN STD_LOGIC := '0';
c0 : OUT STD_LOGIC ;
c1 : OUT STD_LOGIC
);
END pll;
ARCHITECTURE SYN OF pll IS
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (4 DOWNTO 0);
SIGNAL sub_wire1 : STD_LOGIC ;
SIGNAL sub_wire2 : STD_LOGIC ;
SIGNAL sub_wire3 : STD_LOGIC ;
SIGNAL sub_wire4 : STD_LOGIC_VECTOR (1 DOWNTO 0);
SIGNAL sub_wire5_bv : BIT_VECTOR (0 DOWNTO 0);
SIGNAL sub_wire5 : STD_LOGIC_VECTOR (0 DOWNTO 0);
COMPONENT altpll
GENERIC (
bandwidth_type : STRING;
clk0_divide_by : NATURAL;
clk0_duty_cycle : NATURAL;
clk0_multiply_by : NATURAL;
clk0_phase_shift : STRING;
clk1_divide_by : NATURAL;
clk1_duty_cycle : NATURAL;
clk1_multiply_by : NATURAL;
clk1_phase_shift : STRING;
compensate_clock : STRING;
inclk0_input_frequency : NATURAL;
intended_device_family : STRING;
lpm_hint : STRING;
lpm_type : STRING;
operation_mode : STRING;
pll_type : STRING;
port_activeclock : STRING;
port_areset : STRING;
port_clkbad0 : STRING;
port_clkbad1 : STRING;
port_clkloss : STRING;
port_clkswitch : STRING;
port_configupdate : STRING;
port_fbin : STRING;
port_inclk0 : STRING;
port_inclk1 : STRING;
port_locked : STRING;
port_pfdena : STRING;
port_phasecounterselect : STRING;
port_phasedone : STRING;
port_phasestep : STRING;
port_phaseupdown : STRING;
port_pllena : STRING;
port_scanaclr : STRING;
port_scanclk : STRING;
port_scanclkena : STRING;
port_scandata : STRING;
port_scandataout : STRING;
port_scandone : STRING;
port_scanread : STRING;
port_scanwrite : STRING;
port_clk0 : STRING;
port_clk1 : STRING;
port_clk2 : STRING;
port_clk3 : STRING;
port_clk4 : STRING;
port_clk5 : STRING;
port_clkena0 : STRING;
port_clkena1 : STRING;
port_clkena2 : STRING;
port_clkena3 : STRING;
port_clkena4 : STRING;
port_clkena5 : STRING;
port_extclk0 : STRING;
port_extclk1 : STRING;
port_extclk2 : STRING;
port_extclk3 : STRING;
width_clock : NATURAL
);
PORT (
areset : IN STD_LOGIC ;
clk : OUT STD_LOGIC_VECTOR (4 DOWNTO 0);
inclk : IN STD_LOGIC_VECTOR (1 DOWNTO 0)
);
END COMPONENT;
BEGIN
sub_wire5_bv(0 DOWNTO 0) <= "0";
sub_wire5 <= To_stdlogicvector(sub_wire5_bv);
sub_wire2 <= sub_wire0(0);
sub_wire1 <= sub_wire0(1);
c1 <= sub_wire1;
c0 <= sub_wire2;
sub_wire3 <= inclk0;
sub_wire4 <= sub_wire5(0 DOWNTO 0) & sub_wire3;
altpll_component : altpll
GENERIC MAP (
bandwidth_type => "AUTO",
clk0_divide_by => 140,
clk0_duty_cycle => 50,
clk0_multiply_by => 57,
clk0_phase_shift => "0",
clk1_divide_by => 70,
clk1_duty_cycle => 50,
clk1_multiply_by => 57,
clk1_phase_shift => "0",
compensate_clock => "CLK0",
inclk0_input_frequency => 37037,
intended_device_family => "Cyclone III",
lpm_hint => "CBX_MODULE_PREFIX=pll",
lpm_type => "altpll",
operation_mode => "NORMAL",
pll_type => "AUTO",
port_activeclock => "PORT_UNUSED",
port_areset => "PORT_USED",
port_clkbad0 => "PORT_UNUSED",
port_clkbad1 => "PORT_UNUSED",
port_clkloss => "PORT_UNUSED",
port_clkswitch => "PORT_UNUSED",
port_configupdate => "PORT_UNUSED",
port_fbin => "PORT_UNUSED",
port_inclk0 => "PORT_USED",
port_inclk1 => "PORT_UNUSED",
port_locked => "PORT_UNUSED",
port_pfdena => "PORT_UNUSED",
port_phasecounterselect => "PORT_UNUSED",
port_phasedone => "PORT_UNUSED",
port_phasestep => "PORT_UNUSED",
port_phaseupdown => "PORT_UNUSED",
port_pllena => "PORT_UNUSED",
port_scanaclr => "PORT_UNUSED",
port_scanclk => "PORT_UNUSED",
port_scanclkena => "PORT_UNUSED",
port_scandata => "PORT_UNUSED",
port_scandataout => "PORT_UNUSED",
port_scandone => "PORT_UNUSED",
port_scanread => "PORT_UNUSED",
port_scanwrite => "PORT_UNUSED",
port_clk0 => "PORT_USED",
port_clk1 => "PORT_USED",
port_clk2 => "PORT_UNUSED",
port_clk3 => "PORT_UNUSED",
port_clk4 => "PORT_UNUSED",
port_clk5 => "PORT_UNUSED",
port_clkena0 => "PORT_UNUSED",
port_clkena1 => "PORT_UNUSED",
port_clkena2 => "PORT_UNUSED",
port_clkena3 => "PORT_UNUSED",
port_clkena4 => "PORT_UNUSED",
port_clkena5 => "PORT_UNUSED",
port_extclk0 => "PORT_UNUSED",
port_extclk1 => "PORT_UNUSED",
port_extclk2 => "PORT_UNUSED",
port_extclk3 => "PORT_UNUSED",
width_clock => 5
)
PORT MAP (
areset => areset,
inclk => sub_wire4,
clk => sub_wire0
);
END SYN;
-- ============================================================
-- CNX file retrieval info
-- ============================================================
-- Retrieval info: PRIVATE: ACTIVECLK_CHECK STRING "0"
-- Retrieval info: PRIVATE: BANDWIDTH STRING "1.000"
-- Retrieval info: PRIVATE: BANDWIDTH_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: BANDWIDTH_FREQ_UNIT STRING "MHz"
-- Retrieval info: PRIVATE: BANDWIDTH_PRESET STRING "Low"
-- Retrieval info: PRIVATE: BANDWIDTH_USE_AUTO STRING "1"
-- Retrieval info: PRIVATE: BANDWIDTH_USE_PRESET STRING "0"
-- Retrieval info: PRIVATE: CLKBAD_SWITCHOVER_CHECK STRING "0"
-- Retrieval info: PRIVATE: CLKLOSS_CHECK STRING "0"
-- Retrieval info: PRIVATE: CLKSWITCH_CHECK STRING "0"
-- Retrieval info: PRIVATE: CNX_NO_COMPENSATE_RADIO STRING "0"
-- Retrieval info: PRIVATE: CREATE_CLKBAD_CHECK STRING "0"
-- Retrieval info: PRIVATE: CREATE_INCLK1_CHECK STRING "0"
-- Retrieval info: PRIVATE: CUR_DEDICATED_CLK STRING "c0"
-- Retrieval info: PRIVATE: CUR_FBIN_CLK STRING "c0"
-- Retrieval info: PRIVATE: DEVICE_SPEED_GRADE STRING "8"
-- Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "140"
-- Retrieval info: PRIVATE: DIV_FACTOR1 NUMERIC "70"
-- Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
-- Retrieval info: PRIVATE: DUTY_CYCLE1 STRING "50.00000000"
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE0 STRING "10.992857"
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE1 STRING "21.985714"
-- Retrieval info: PRIVATE: EXPLICIT_SWITCHOVER_COUNTER STRING "0"
-- Retrieval info: PRIVATE: EXT_FEEDBACK_RADIO STRING "0"
-- Retrieval info: PRIVATE: GLOCKED_COUNTER_EDIT_CHANGED STRING "1"
-- Retrieval info: PRIVATE: GLOCKED_FEATURE_ENABLED STRING "0"
-- Retrieval info: PRIVATE: GLOCKED_MODE_CHECK STRING "0"
-- Retrieval info: PRIVATE: GLOCK_COUNTER_EDIT NUMERIC "1048575"
-- Retrieval info: PRIVATE: HAS_MANUAL_SWITCHOVER STRING "1"
-- Retrieval info: PRIVATE: INCLK0_FREQ_EDIT STRING "27.000"
-- Retrieval info: PRIVATE: INCLK0_FREQ_UNIT_COMBO STRING "MHz"
-- Retrieval info: PRIVATE: INCLK1_FREQ_EDIT STRING "100.000"
-- Retrieval info: PRIVATE: INCLK1_FREQ_EDIT_CHANGED STRING "1"
-- Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_CHANGED STRING "1"
-- Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_COMBO STRING "MHz"
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
-- Retrieval info: PRIVATE: INT_FEEDBACK__MODE_RADIO STRING "1"
-- Retrieval info: PRIVATE: LOCKED_OUTPUT_CHECK STRING "0"
-- Retrieval info: PRIVATE: LONG_SCAN_RADIO STRING "1"
-- Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE STRING "Not Available"
-- Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE_DIRTY NUMERIC "0"
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT0 STRING "deg"
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT1 STRING "ps"
-- Retrieval info: PRIVATE: MIG_DEVICE_SPEED_GRADE STRING "Any"
-- Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
-- Retrieval info: PRIVATE: MIRROR_CLK1 STRING "0"
-- Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "57"
-- Retrieval info: PRIVATE: MULT_FACTOR1 NUMERIC "57"
-- Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
-- Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "11.00000000"
-- Retrieval info: PRIVATE: OUTPUT_FREQ1 STRING "22.00000000"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "0"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE1 STRING "0"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 STRING "MHz"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT1 STRING "MHz"
-- Retrieval info: PRIVATE: PHASE_RECONFIG_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: PHASE_RECONFIG_INPUTS_CHECK STRING "0"
-- Retrieval info: PRIVATE: PHASE_SHIFT0 STRING "0.00000000"
-- Retrieval info: PRIVATE: PHASE_SHIFT1 STRING "0.00000000"
-- Retrieval info: PRIVATE: PHASE_SHIFT_STEP_ENABLED_CHECK STRING "0"
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 STRING "deg"
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT1 STRING "deg"
-- Retrieval info: PRIVATE: PLL_ADVANCED_PARAM_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "1"
-- Retrieval info: PRIVATE: PLL_AUTOPLL_CHECK NUMERIC "1"
-- Retrieval info: PRIVATE: PLL_ENHPLL_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PLL_FASTPLL_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PLL_FBMIMIC_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_LVDS_PLL_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PLL_PFDENA_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_TARGET_HARCOPY_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PRIMARY_CLK_COMBO STRING "inclk0"
-- Retrieval info: PRIVATE: RECONFIG_FILE STRING "pll.mif"
-- Retrieval info: PRIVATE: SACN_INPUTS_CHECK STRING "0"
-- Retrieval info: PRIVATE: SCAN_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: SELF_RESET_LOCK_LOSS STRING "0"
-- Retrieval info: PRIVATE: SHORT_SCAN_RADIO STRING "0"
-- Retrieval info: PRIVATE: SPREAD_FEATURE_ENABLED STRING "0"
-- Retrieval info: PRIVATE: SPREAD_FREQ STRING "50.000"
-- Retrieval info: PRIVATE: SPREAD_FREQ_UNIT STRING "KHz"
-- Retrieval info: PRIVATE: SPREAD_PERCENT STRING "0.500"
-- Retrieval info: PRIVATE: SPREAD_USE STRING "0"
-- Retrieval info: PRIVATE: SRC_SYNCH_COMP_RADIO STRING "0"
-- Retrieval info: PRIVATE: STICKY_CLK0 STRING "1"
-- Retrieval info: PRIVATE: STICKY_CLK1 STRING "1"
-- Retrieval info: PRIVATE: SWITCHOVER_COUNT_EDIT NUMERIC "1"
-- Retrieval info: PRIVATE: SWITCHOVER_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
-- Retrieval info: PRIVATE: USE_CLK0 STRING "1"
-- Retrieval info: PRIVATE: USE_CLK1 STRING "1"
-- Retrieval info: PRIVATE: USE_CLKENA0 STRING "0"
-- Retrieval info: PRIVATE: USE_CLKENA1 STRING "0"
-- Retrieval info: PRIVATE: USE_MIL_SPEED_GRADE NUMERIC "0"
-- Retrieval info: PRIVATE: ZERO_DELAY_RADIO STRING "0"
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-- Retrieval info: CONSTANT: BANDWIDTH_TYPE STRING "AUTO"
-- Retrieval info: CONSTANT: CLK0_DIVIDE_BY NUMERIC "140"
-- Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
-- Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "57"
-- Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
-- Retrieval info: CONSTANT: CLK1_DIVIDE_BY NUMERIC "70"
-- Retrieval info: CONSTANT: CLK1_DUTY_CYCLE NUMERIC "50"
-- Retrieval info: CONSTANT: CLK1_MULTIPLY_BY NUMERIC "57"
-- Retrieval info: CONSTANT: CLK1_PHASE_SHIFT STRING "0"
-- Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
-- Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "37037"
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altpll"
-- Retrieval info: CONSTANT: OPERATION_MODE STRING "NORMAL"
-- Retrieval info: CONSTANT: PLL_TYPE STRING "AUTO"
-- Retrieval info: CONSTANT: PORT_ACTIVECLOCK STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_ARESET STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_CLKBAD0 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKBAD1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKLOSS STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKSWITCH STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CONFIGUPDATE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_FBIN STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_INCLK0 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_INCLK1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_LOCKED STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PFDENA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASECOUNTERSELECT STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASEDONE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASESTEP STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASEUPDOWN STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PLLENA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANACLR STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANCLK STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANCLKENA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANDATA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANDATAOUT STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANDONE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANREAD STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANWRITE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk0 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_clk1 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_clk2 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk3 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk4 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk5 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena0 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena2 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena3 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena4 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena5 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk0 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk2 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk3 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: WIDTH_CLOCK NUMERIC "5"
-- Retrieval info: USED_PORT: @clk 0 0 5 0 OUTPUT_CLK_EXT VCC "@clk[4..0]"
-- Retrieval info: USED_PORT: @inclk 0 0 2 0 INPUT_CLK_EXT VCC "@inclk[1..0]"
-- Retrieval info: USED_PORT: areset 0 0 0 0 INPUT GND "areset"
-- Retrieval info: USED_PORT: c0 0 0 0 0 OUTPUT_CLK_EXT VCC "c0"
-- Retrieval info: USED_PORT: c1 0 0 0 0 OUTPUT_CLK_EXT VCC "c1"
-- Retrieval info: USED_PORT: inclk0 0 0 0 0 INPUT_CLK_EXT GND "inclk0"
-- Retrieval info: CONNECT: @areset 0 0 0 0 areset 0 0 0 0
-- Retrieval info: CONNECT: @inclk 0 0 1 1 GND 0 0 0 0
-- Retrieval info: CONNECT: @inclk 0 0 1 0 inclk0 0 0 0 0
-- Retrieval info: CONNECT: c0 0 0 0 0 @clk 0 0 1 0
-- Retrieval info: CONNECT: c1 0 0 0 0 @clk 0 0 1 1
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.vhd TRUE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.ppf TRUE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.inc FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.cmp FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll.bsf FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_inst.vhd FALSE
-- Retrieval info: LIB_FILE: altera_mf
-- Retrieval info: CBX_MODULE_PREFIX: ON

View File

@@ -0,0 +1,62 @@
<misterromdescription>
<name>Capitol</name>
<mameversion>0220</mameversion>
<setname>capitol</setname>
<mratimestamp>20200430150001</mratimestamp>
<year>1981</year>
<manufacturer>Universal Video Spiel</manufacturer>
<category>Space / Shooter</category>
<rbf>phoenix</rbf>
<switches default="0" base="8">
<dip bits="0,1" ids="3,4,5,6" name="Lives"></dip>
<dip bits="2,3" ids="3K 30K,4K 40K,5K 50K,6K 60K" name="Bonus Life"></dip>
<dip bits="4" ids="Off,On" name="Demo Sounds"></dip>
</switches>
<rom index="1"><part>01</part></rom>
<rom index="0" zip="pleiads.zip" md5="cf0f64ab851151c6c50309f6b56e2ed2">
<part crc="0922905b" name="cp1.45"/>
<part crc="4f168f45" name="cp2.46"/>
<part crc="3975e0b0" name="cp3.47"/>
<part crc="da49caa8" name="cp4.48"/>
<part crc="38e4362b" name="cp5.49"/>
<part crc="aaf798eb" name="cp6.50"/>
<part crc="eaadf14c" name="cp7.51"/>
<part crc="d3fe2af4" name="cp8.52"/>
<part crc="9b0bbb8d" name="cp11.23"/>
<part crc="39949e66" name="cp12.24"/>
<part crc="04f7d19a" name="cp9.39"/>
<part crc="4807408f" name="cp10.40"/>
<part crc="e176b768" name="ic41.prm"/>
<part crc="79350b25" name="ic40.prm"/>
</rom>
<rom index="3" md5="none">
<part>
00 00 00 00 00 FF 00 02 00 02 00 01 00 FF 00 00
00 00 43 89 00 03 00 00
00 00 41 E1 00 01 20 20
00 00 41 C1 00 01 20 20
00 00 41 A1 00 01 20 20
00 00 41 81 00 01 20 20
00 00 41 61 00 01 20 20
00 00 41 41 00 01 20 20
00 00 43 81 00 03 00 00
00 00 43 01 00 01 20 20
00 00 42 E1 00 01 20 20
00 00 42 C1 00 01 20 20
00 00 42 A1 00 01 20 20
00 00 42 81 00 01 20 20
00 00 42 61 00 01 20 20
00 00 43 85 00 03 00 00
00 00 40 C1 00 01 20 20
00 00 40 A1 00 01 20 20
00 00 40 81 00 01 20 20
00 00 40 61 00 01 20 20
00 00 40 41 00 01 20 20
00 00 40 21 00 01 20 20
</part>
</rom>
<nvram index="4" size="27"/>
</misterromdescription>

View File

@@ -0,0 +1,94 @@
<misterromdescription>
<name>Phoenix</name>
<region></region>
<homebrew>no</homebrew>
<bootleg>no</bootleg>
<version>Amstar, Set 1</version>
<alternative></alternative>
<platform></platform>
<series></series>
<year>1980</year>
<manufacturer>Amstar</manufacturer>
<category>Shooter - Gallery</category>
<setname>phoenix</setname>
<parent>phoenix</parent>
<mameversion>0220</mameversion>
<rbf>phoenix</rbf>
<about></about>
<resolution>15kHz</resolution>
<rotation>vertical (cw)</rotation>
<flip>yes</flip>
<players>2 (alternating)</players>
<joystick>2-way horizontal</joystick>
<special_controls></special_controls>
<num_buttons>2</num_buttons>
<button_names></button_names>
<switches default="0" base="8">
<dip bits="0,1" ids="3,4,5,6" name="Lives"></dip>
<dip bits="2,3" ids="3K 30K,4K 40K,5K 50K,6K 60K" name="Bonus Life"></dip>
<dip bits="4" ids="1C_1C,2C_1C" name="Coinage"></dip>
</switches>
<rom index="1"><part>00</part></rom>
<rom index="0" md5="aebeef2fb155d5481cb827520f7d26d8" zip="phoenix.zip">
<!-- CPU 16k -->
<part crc="9f68086b" name="ic45"></part>
<part crc="273a4a82" name="ic46"></part>
<part crc="3d4284b9" name="ic47"></part>
<part crc="cb5d9915" name="ic48"></part>
<part crc="a105e4e7" name="h5-ic49.5a"></part>
<part crc="ac5e9ec1" name="h6-ic50.6a"></part>
<part crc="2eab35b4" name="h7-ic51.7a"></part>
<part crc="aff8e9c5" name="h8-ic52.8a"></part>
<!-- bg 4k -->
<part crc="3c7e623f" name="ic23.3d"></part>
<part crc="59916d3b" name="ic24.4d"></part>
<!-- fg 4k -->
<part crc="53413e8f" name="b1-ic39.3b"></part>
<part crc="0be2ba91" name="b2-ic40.4b"></part>
<!-- proms 2x256 -->
<part crc="79350b25" name="mmi6301.ic40"/>
<part crc="e176b768" name="mmi6301.ic41"/>
</rom>
<rom index="2"></rom>
<rom index="3" md5="none">
<part>
00 00 00 00 00 FF 00 02 00 02 00 01 00 FF 00 00
00 00 43 89 00 03 00 00
00 00 41 E1 00 01 20 20
00 00 41 C1 00 01 20 20
00 00 41 A1 00 01 20 20
00 00 41 81 00 01 20 20
00 00 41 61 00 01 20 20
00 00 41 41 00 01 20 20
00 00 43 81 00 03 00 00
00 00 43 01 00 01 20 20
00 00 42 E1 00 01 20 20
00 00 42 C1 00 01 20 20
00 00 42 A1 00 01 20 20
00 00 42 81 00 01 20 20
00 00 42 61 00 01 20 20
00 00 43 85 00 03 00 00
00 00 40 C1 00 01 20 20
00 00 40 A1 00 01 20 20
00 00 40 81 00 01 20 20
00 00 40 61 00 01 20 20
00 00 40 41 00 01 20 20
00 00 40 21 00 01 20 20
</part>
</rom>
<rom index="4"></rom>
<nvram index="4" size="27"></nvram>
<remark></remark>
<mratimestamp>20210430005030</mratimestamp>
</misterromdescription>

View File

@@ -0,0 +1,62 @@
<misterromdescription>
<name>Pleiads (Tehkan)</name>
<mameversion>0220</mameversion>
<setname>pleiads</setname>
<mratimestamp>20200430150001</mratimestamp>
<year>1981</year>
<manufacturer>Tehkan</manufacturer>
<category>Space / Shooter</category>
<rbf>phoenix</rbf>
<switches default="0" base="8">
<dip bits="0,1" ids="3,4,5,6" name="Lives"></dip>
<dip bits="2,3" ids="3K 30K,4K 40K,5K 50K,6K 60K" name="Bonus Life"></dip>
<dip bits="4" ids="Off,On" name="Demo Sounds"></dip>
</switches>
<rom index="1"><part>01</part></rom>
<rom index="0" zip="pleiads.zip" md5="7ef2e34b4f4c55dbfb991b4728f4d798">
<part crc="960212c8" name="ic47.r1"/>
<part crc="b254217c" name="ic48.r2"/>
<part crc="87e700bb" name="ic47.bin"/>
<part crc="2d5198d0" name="ic48.bin"/>
<part crc="49c629bc" name="ic51.r5"/>
<part crc="f1a8a00d" name="ic50.bin"/>
<part crc="b5f07fbc" name="ic53.r7"/>
<part crc="b1b5a8a6" name="ic52.bin"/>
<part crc="4e30f9e7" name="ic23.bin"/>
<part crc="5188fc29" name="ic24.bin"/>
<part crc="85866607" name="ic39.bin"/>
<part crc="a841d511" name="ic40.bin"/>
<part crc="e38eeb83" name="7611-5.33"/>
<part crc="7a1bcb1e" name="7611-5.26"/>
</rom>
<rom index="3" md5="none">
<part>
00 00 00 00 00 FF 00 02 00 02 00 01 00 FF 00 00
00 00 43 89 00 03 00 00
00 00 41 E1 00 01 20 20
00 00 41 C1 00 01 20 20
00 00 41 A1 00 01 20 20
00 00 41 81 00 01 20 20
00 00 41 61 00 01 20 20
00 00 41 41 00 01 20 20
00 00 43 81 00 03 00 00
00 00 43 01 00 01 20 20
00 00 42 E1 00 01 20 20
00 00 42 C1 00 01 20 20
00 00 42 A1 00 01 20 20
00 00 42 81 00 01 20 20
00 00 42 61 00 01 20 20
00 00 43 85 00 03 00 00
00 00 40 C1 00 01 20 20
00 00 40 A1 00 01 20 20
00 00 40 81 00 01 20 20
00 00 40 61 00 01 20 20
00 00 40 41 00 01 20 20
00 00 40 21 00 01 20 20
</part>
</rom>
<nvram index="4" size="27"/>
</misterromdescription>

View File

@@ -400,20 +400,14 @@ set_global_assignment -name OUTPUT_IO_TIMING_FAR_END_VMEAS "HALF SIGNAL SWING" -
# ------------------------
set_global_assignment -name SYSTEMVERILOG_FILE rtl/Phoenix_MiST.sv
set_global_assignment -name VHDL_FILE rtl/phoenix.vhd
set_global_assignment -name VHDL_FILE rtl/dpram.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_effect3.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_effect2.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_effect1.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_video.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_prog.vhd
set_global_assignment -name VHDL_FILE rtl/phoenix_music.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/prom_palette_ic41.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/prom_palette_ic40.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/prom_ic40.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/prom_ic39.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/prom_ic24.vhd
set_global_assignment -name VHDL_FILE rtl/ROM/prom_ic23.vhd
set_global_assignment -name VHDL_FILE rtl/gen_ram.vhd
set_global_assignment -name VHDL_FILE rtl/pll.vhd
set_global_assignment -name QIP_FILE ../../../common/mist/mist.qip
set_global_assignment -name QIP_FILE ../../../common/CPU/T80/T80.qip
set_global_assignment -name QIP_FILE ../../common/mist/mist.qip
set_global_assignment -name QIP_FILE ../../common/CPU/T80/T80.qip
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top

View File

@@ -30,19 +30,21 @@ module Phoenix_MiST
`include "rtl\build_id.v"
localparam CONF_STR = {
"Phoenix;;",
"PHOENIX;;",
"O2,Rotate Controls,Off,On;",
"O34,Scanlines,Off,25%,50%,75%;",
"O5,Blend,Off,On;",
"DIP;",
"T0,Reset;",
"V,v1.21.",`BUILD_DATE
"V,v2,",`BUILD_DATE
};
wire rotate = status[2];
wire [1:0] scanlines = status[4:3];
wire blend = status[5];
wire [7:0] dsw = status[15:8];
assign LED = 1;
assign LED = ~ioctl_downl;
assign AUDIO_R = AUDIO_L;
wire clk_sys, clk_22;
@@ -54,6 +56,7 @@ pll pll(
.c1(clk_22)
);
wire [6:0] core_mod;
wire [31:0] status;
wire [1:0] buttons;
wire [1:0] switches;
@@ -61,20 +64,31 @@ wire [7:0] joystick_0;
wire [7:0] joystick_1;
wire scandoublerD;
wire ypbpr;
wire no_csync;
wire key_pressed;
wire [7:0] key_code;
wire key_strobe;
wire ioctl_downl;
wire [7:0] ioctl_index;
wire ioctl_wr;
wire [24:0] ioctl_addr;
wire [7:0] ioctl_dout;
reg [11:0] audio;
wire hb1, hb2, vb;
wire blankn = ~((hb1 & hb2) | vb);
wire hs, vs;
wire [1:0] r,g,b;
wire key_pressed;
wire [7:0] key_code;
wire key_strobe;
reg reset = 1;
always @(posedge clk_sys) reset <= status[0] | buttons[1] | ioctl_downl;
phoenix phoenix(
.clk(clk_sys),
.reset(status[0] | buttons[1]),
.dip_switch(8'b00001111),
.reset(reset),
.mod_pleiads(core_mod[0]),
.mod_survival(core_mod[1]),
.dip_switch(dsw),
.btn_coin(m_coin1 | m_coin2),
.btn_player_start({m_two_players,m_one_player}),
.btn_left(m_left),
@@ -90,9 +104,13 @@ phoenix phoenix(
.video_hblank_bg(hb1),
.video_hblank_fg(hb2),
.audio_select("000"),
.audio(audio)
.audio(audio),
.dl_addr(ioctl_addr[15:0]),
.dl_wr(ioctl_index == 0 && ioctl_wr && ioctl_downl),
.dl_data(ioctl_dout)
);
mist_video #(.COLOR_DEPTH(2), .SD_HCNT_WIDTH(10)) mist_video(
.clk_sys(clk_22),
.SPI_SCK(SPI_SCK),
@@ -113,7 +131,8 @@ mist_video #(.COLOR_DEPTH(2), .SD_HCNT_WIDTH(10)) mist_video(
.rotate({1'b1,rotate}),
.scandoubler_disable(scandoublerD),
.scanlines(scanlines),
.ypbpr(ypbpr)
.ypbpr(ypbpr),
.no_csync(no_csync)
);
user_io #(
@@ -129,6 +148,8 @@ user_io(
.switches (switches ),
.scandoubler_disable (scandoublerD ),
.ypbpr (ypbpr ),
.no_csync (no_csync ),
.core_mod (core_mod ),
.key_strobe (key_strobe ),
.key_pressed (key_pressed ),
.key_code (key_code ),
@@ -136,6 +157,18 @@ user_io(
.joystick_1 (joystick_1 ),
.status (status )
);
data_io data_io(
.clk_sys ( clk_sys ),
.SPI_SCK ( SPI_SCK ),
.SPI_SS2 ( SPI_SS2 ),
.SPI_DI ( SPI_DI ),
.ioctl_download( ioctl_downl ),
.ioctl_index ( ioctl_index ),
.ioctl_wr ( ioctl_wr ),
.ioctl_addr ( ioctl_addr ),
.ioctl_dout ( ioctl_dout )
);
dac #(
.C_bits(16))

View File

@@ -12,7 +12,7 @@
--
-- -----------------------------------------------------------------------
--
-- gen_rwram.vhd
-- dpram.vhd
--
-- -----------------------------------------------------------------------
--
@@ -26,57 +26,56 @@ use IEEE.numeric_std.ALL;
-- -----------------------------------------------------------------------
entity gen_ram is
entity dpram is
generic (
dWidth : integer := 8;
aWidth : integer := 10
);
port (
clk : in std_logic;
we : in std_logic;
addr : in std_logic_vector((aWidth-1) downto 0);
d : in std_logic_vector((dWidth-1) downto 0);
q : out std_logic_vector((dWidth-1) downto 0)
clk_a : in std_logic;
we_a : in std_logic := '0';
addr_a : in std_logic_vector((aWidth-1) downto 0);
d_a : in std_logic_vector((dWidth-1) downto 0) := (others => '0');
q_a : out std_logic_vector((dWidth-1) downto 0);
clk_b : in std_logic;
we_b : in std_logic := '0';
addr_b : in std_logic_vector((aWidth-1) downto 0);
d_b : in std_logic_vector((dWidth-1) downto 0) := (others => '0');
q_b : out std_logic_vector((dWidth-1) downto 0)
);
end entity;
-- -----------------------------------------------------------------------
architecture rtl of gen_ram is
architecture rtl of dpram is
subtype addressRange is integer range 0 to ((2**aWidth)-1);
type ramDef is array(addressRange) of std_logic_vector((dWidth-1) downto 0);
signal ram: ramDef;
signal rAddrReg : std_logic_vector((aWidth-1) downto 0);
signal qReg : std_logic_vector((dWidth-1) downto 0);
signal addr_a_reg: std_logic_vector((aWidth-1) downto 0);
signal addr_b_reg: std_logic_vector((aWidth-1) downto 0);
begin
-- -----------------------------------------------------------------------
-- Signals to entity interface
-- -----------------------------------------------------------------------
q <= qReg;
-- -----------------------------------------------------------------------
-- Memory write
-- -----------------------------------------------------------------------
process(clk)
process(clk_a)
begin
if rising_edge(clk) then
if we = '1' then
ram(to_integer(unsigned(addr))) <= d;
if rising_edge(clk_a) then
if we_a = '1' then
ram(to_integer(unsigned(addr_a))) <= d_a;
end if;
q_a <= ram(to_integer(unsigned(addr_a)));
end if;
end process;
process(clk_b)
begin
if rising_edge(clk_b) then
if we_b = '1' then
ram(to_integer(unsigned(addr_b))) <= d_b;
end if;
q_b <= ram(to_integer(unsigned(addr_b)));
end if;
end process;
-- -----------------------------------------------------------------------
-- Memory read
-- -----------------------------------------------------------------------
process(clk)
begin
if rising_edge(clk) then
-- qReg <= ram(to_integer(unsigned(rAddrReg)));
-- rAddrReg <= addr;
qReg <= ram(to_integer(unsigned(addr)));
end if;
end process;
end architecture;

View File

@@ -21,7 +21,9 @@ port(
clk : in std_logic; -- 11 MHz for TV, 25 MHz for VGA
reset : in std_logic;
ce_pix : out std_logic;
mod_pleiads : in std_logic;
mod_survival : in std_logic;
dip_switch : in std_logic_vector(7 downto 0);
-- game controls, normal logic '1':pressed, '0':released
@@ -42,7 +44,11 @@ port(
sound_fireball: out std_logic; -- bird explodes in 2 fireballs
sound_ab : out std_logic_vector(15 downto 0);
audio_select : in std_logic_vector(2 downto 0) := (others => '0');
audio : out std_logic_vector(11 downto 0)
audio : out std_logic_vector(11 downto 0);
dl_addr : in std_logic_vector(15 downto 0);
dl_wr : in std_logic;
dl_data : in std_logic_vector(7 downto 0)
);
end phoenix;
@@ -106,7 +112,7 @@ architecture struct of phoenix is
signal fr_lin : std_logic_vector(2 downto 0);
signal bk_lin : std_logic_vector(2 downto 0);
signal color_set : std_logic;
signal color_set : std_logic_vector(1 downto 0);
signal color_id : std_logic_vector(5 downto 0);
signal rgb_0 : std_logic_vector(2 downto 0);
signal rgb_1 : std_logic_vector(2 downto 0);
@@ -129,6 +135,14 @@ architecture struct of phoenix is
signal player_start : std_logic_vector(1 downto 0);
signal buttons : std_logic_vector(3 downto 0);
signal R_autofire : std_logic_vector(21 downto 0);
signal prog_we : std_logic;
signal frgnd_bit0_we : std_logic;
signal frgnd_bit1_we : std_logic;
signal bkgnd_bit0_we : std_logic;
signal bkgnd_bit1_we : std_logic;
signal palette_0_we : std_logic;
signal palette_1_we : std_logic;
begin
-- game core uses inverted control logic
@@ -234,7 +248,7 @@ begin
when "11000" => sound_b <= cpu_do;
when "11010" => sound_a <= cpu_do;
when "10100" => player2 <= cpu_do(0);
color_set <= cpu_do(1);
color_set <= cpu_do(2 downto 1);
when others => null;
end case;
end if;
@@ -292,7 +306,7 @@ color_id <= (fr_bit0 or fr_bit1) & fr_bit1 & fr_bit0 & fr_lin when (fr_bit0 o
(fr_bit0 or fr_bit1) & bk_bit1 & bk_bit0 & bk_lin;
-- address palette with pixel bits color and color set
palette_adr <= '0' & color_set & color_id;
palette_adr <= (mod_pleiads and color_set(1)) & color_set(0) & color_id;
-- output video to top level
process(clk) begin
@@ -315,52 +329,130 @@ process(clk) begin
end process;
G_yes_tile_rom: if C_tile_rom generate
-- foreground graphix ROM bit0
frgnd_bit0 : entity work.prom_ic39
-- foreground graphix ROM bit0 - ic39
frgnd_bit0_we <= '1' when dl_wr = '1' and dl_addr(15 downto 11) = "01010" else '0';
frgnd_bit0: entity work.dpram
generic map(
aWidth => 11
)
port map(
clk => clk,
addr => frgnd_graph_adr,
data => frgnd_bit0_graph
clk_a => clk,
we_a => '0',
addr_a => frgnd_graph_adr,
q_a => frgnd_bit0_graph,
clk_b => clk,
addr_b => dl_addr(10 downto 0),
we_b => frgnd_bit0_we,
d_b => dl_data
);
-- foreground graphix ROM bit1
frgnd_bit1 : entity work.prom_ic40
-- foreground graphix ROM bit1 - ic40
frgnd_bit1_we <= '1' when dl_wr = '1' and dl_addr(15 downto 11) = "01011" else '0';
frgnd_bit1: entity work.dpram
generic map(
aWidth => 11
)
port map(
clk => clk,
addr => frgnd_graph_adr,
data => frgnd_bit1_graph
clk_a => clk,
we_a => '0',
addr_a => frgnd_graph_adr,
q_a => frgnd_bit1_graph,
clk_b => clk,
addr_b => dl_addr(10 downto 0),
we_b => frgnd_bit1_we,
d_b => dl_data
);
-- background graphix ROM bit0
bkgnd_bit0 : entity work.prom_ic23
-- background graphix ROM bit0 - ic23
bkgnd_bit0_we <= '1' when dl_wr = '1' and dl_addr(15 downto 11) = "01000" else '0';
bkgdn_bit0: entity work.dpram
generic map(
aWidth => 11
)
port map(
clk => clk,
addr => bkgnd_graph_adr,
data => bkgnd_bit0_graph
clk_a => clk,
we_a => '0',
addr_a => bkgnd_graph_adr,
q_a => bkgnd_bit0_graph,
clk_b => clk,
addr_b => dl_addr(10 downto 0),
we_b => bkgnd_bit0_we,
d_b => dl_data
);
-- background graphix ROM bit1
bkgnd_bit1 : entity work.prom_ic24
-- background graphix ROM bit1 - ic24
bkgnd_bit1_we <= '1' when dl_wr = '1' and dl_addr(15 downto 11) = "01001" else '0';
bkgdn_bit1: entity work.dpram
generic map(
aWidth => 11
)
port map(
clk => clk,
addr => bkgnd_graph_adr,
data => bkgnd_bit1_graph
clk_a => clk,
we_a => '0',
addr_a => bkgnd_graph_adr,
q_a => bkgnd_bit1_graph,
clk_b => clk,
addr_b => dl_addr(10 downto 0),
we_b => bkgnd_bit1_we,
d_b => dl_data
);
-- color palette ROM RBG low intensity
palette_0 : entity work.prom_palette_ic40
--palette_0 : entity work.prom_palette_ic40
--port map(
-- clk => clk,
-- addr => palette_adr(6 downto 0),
-- data => rgb_0
--);
palette_0_we <= '1' when dl_wr = '1' and dl_addr(15 downto 8) = "01100000" else '0';
palette_0: entity work.dpram
generic map(
aWidth => 8
)
port map(
clk => clk,
addr => palette_adr(6 downto 0),
data => rgb_0
clk_a => clk,
we_a => '0',
addr_a => palette_adr,
q_a(2 downto 0) => rgb_0,
clk_b => clk,
addr_b => dl_addr(7 downto 0),
we_b => palette_0_we,
d_b => dl_data
);
-- color palette ROM RBG high intensity
palette_1 : entity work.prom_palette_ic41
--palette_1 : entity work.prom_palette_ic41
--port map(
-- clk => clk,
-- addr => palette_adr(6 downto 0),
-- data => rgb_1
--);
palette_1_we <= '1' when dl_wr = '1' and dl_addr(15 downto 8) = "01100001" else '0';
palette_1: entity work.dpram
generic map(
aWidth => 8
)
port map(
clk => clk,
addr => palette_adr(6 downto 0),
data => rgb_1
clk_a => clk,
we_a => '0',
addr_a => palette_adr,
q_a(2 downto 0) => rgb_1,
clk_b => clk,
addr_b => dl_addr(7 downto 0),
we_b => palette_1_we,
d_b => dl_data
);
end generate;
@@ -376,11 +468,22 @@ end generate;
-- Program PROM
S_prog_rom_addr(C_prog_rom_addr_bits-1 downto 0) <= cpu_adr(C_prog_rom_addr_bits-1 downto 0);
prog : entity work.phoenix_prog
prog_we <= '1' when dl_wr = '1' and dl_addr(15 downto C_prog_rom_addr_bits) = 0 else '0';
prog: entity work.dpram
generic map(
aWidth => C_prog_rom_addr_bits
)
port map(
clk => clk,
addr => S_prog_rom_addr,
data => prog_do
clk_a => clk,
we_a => '0',
addr_a => S_prog_rom_addr,
q_a => prog_do,
clk_b => clk,
addr_b => dl_addr(C_prog_rom_addr_bits-1 downto 0),
we_b => prog_we,
d_b => dl_data
);
-- foreground RAM 0x4000-0x433F