Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e58c44e93c | ||
|
|
e433c8d2c3 |
No files matched your search
@@ -10,4 +10,3 @@ jtag.cdf
|
||||
greybox_tmp/cbx_args.txt
|
||||
*/greybox_tmp/cbx_args.txt
|
||||
changes.txt
|
||||
rtl/config_inc.sv
|
||||
Binary file not shown.
@@ -9,9 +9,9 @@
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
set_global_assignment -name TOP_LEVEL_ENTITY sys_top
|
||||
#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
|
||||
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
|
||||
|
||||
set_global_assignment -name LAST_QUARTUS_VERSION "17.0.2 Lite Edition"
|
||||
|
||||
@@ -73,9 +73,9 @@ set_location_assignment PIN_U9 -to ADC_CONVST
|
||||
set_location_assignment PIN_V10 -to ADC_SCK
|
||||
set_location_assignment PIN_AC4 -to ADC_SDI
|
||||
set_location_assignment PIN_AD4 -to ADC_SDO
|
||||
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ARDUINO_IO[*]
|
||||
#set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to ARDUINO_IO[*]
|
||||
#set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to ARDUINO_IO[*]
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ARDUINO_IO[*]
|
||||
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to ARDUINO_IO[*]
|
||||
set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to ARDUINO_IO[*]
|
||||
set_location_assignment PIN_U14 -to IO_SCL
|
||||
set_location_assignment PIN_AG9 -to IO_SDA
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to IO_S*
|
||||
@@ -163,7 +163,7 @@ set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to HDMI_TX_D[*]
|
||||
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to HDMI_TX_DE
|
||||
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to HDMI_TX_HS
|
||||
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to HDMI_TX_VS
|
||||
#set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to HDMI_TX_CLK
|
||||
set_instance_assignment -name FAST_OUTPUT_REGISTER ON -to HDMI_TX_CLK
|
||||
set_location_assignment PIN_U10 -to HDMI_I2C_SCL
|
||||
set_location_assignment PIN_AA4 -to HDMI_I2C_SDA
|
||||
set_location_assignment PIN_T13 -to HDMI_I2S
|
||||
@@ -231,6 +231,8 @@ set_hps_location_assignment HPSINTERFACEPERIPHERALSPIMASTER_X52_Y72_N111 -to spi
|
||||
set_hps_location_assignment HPSINTERFACEPERIPHERALUART_X52_Y67_N111 -to uart
|
||||
set_hps_location_assignment HPSINTERFACEPERIPHERALI2C_X52_Y60_N111 -to hdmi_i2c
|
||||
set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:sys/build_id.tcl"
|
||||
set_global_assignment -name CDF_FILE jtag.cdf
|
||||
set_global_assignment -name QIP_FILE sys/sys.qip
|
||||
source sys/sys_analog.tcl
|
||||
set_location_assignment PIN_AF25 -to SDIO_DAT[0]
|
||||
set_location_assignment PIN_AF23 -to SDIO_DAT[1]
|
||||
@@ -281,22 +283,6 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to LED_*
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to BTN_*
|
||||
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to BTN_*
|
||||
source files.qip
|
||||
|
||||
set_global_assignment -name ENABLE_SIGNALTAP OFF
|
||||
set_global_assignment -name OPTIMIZATION_MODE "AGGRESSIVE PERFORMANCE"
|
||||
set_global_assignment -name USE_SIGNALTAP_FILE Video_Explorer2.stp
|
||||
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to USER_IO[2]
|
||||
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
|
||||
set_global_assignment -name CDF_FILE jtag.cdf
|
||||
set_global_assignment -name QIP_FILE sys/sys.qip
|
||||
set_global_assignment -name VERILOG_FILE rtl/Mister_Video_GIMEX.v
|
||||
set_global_assignment -name VERILOG_FILE rtl/pll.v -library pll
|
||||
set_global_assignment -name VERILOG_FILE rtl/pll/pll_0002.v -library pll
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/Cassette_Write.sv
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/config.sv
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/Auto_Run.sv
|
||||
set_global_assignment -name VHDL_FILE rtl/sram/coco_ram.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/rom/coco_rom_cart.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/rom/coco3_char_rom.vhd
|
||||
@@ -314,6 +300,7 @@ set_global_assignment -name VERILOG_FILE rtl/cassette.v
|
||||
set_global_assignment -name VERILOG_FILE rtl/rtc.sv
|
||||
set_global_assignment -name VERILOG_FILE rtl/AMW.v
|
||||
set_global_assignment -name VERILOG_FILE rtl/square_gen.v
|
||||
set_global_assignment -name VERILOG_FILE rtl/config.v
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/fdc.sv
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/sdc.sv
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/sdc_top.sv
|
||||
@@ -328,5 +315,135 @@ set_global_assignment -name VHDL_FILE rtl/rom/coco_rom_32K.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/rom/coco_rom_8K.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/rom/coco_rom_16.vhd
|
||||
set_global_assignment -name SDC_FILE rtl/CoCo3FPGA.sdc
|
||||
|
||||
set_global_assignment -name SIGNALTAP_FILE Video_Explorer.stp
|
||||
set_global_assignment -name SIGNALTAP_FILE rom_Exploror.stp1
|
||||
set_global_assignment -name SOURCE_FILE rom_Exploror.stp1
|
||||
set_global_assignment -name SIGNALTAP_FILE Serial.stp
|
||||
set_global_assignment -name SIGNALTAP_FILE AMW.stp
|
||||
set_global_assignment -name SIGNALTAP_FILE HD.stp
|
||||
set_global_assignment -name SIGNALTAP_FILE reset.stp
|
||||
set_global_assignment -name SIGNALTAP_FILE Vsync.stp
|
||||
set_global_assignment -name ENABLE_SIGNALTAP ON
|
||||
set_global_assignment -name OPTIMIZATION_MODE "HIGH PERFORMANCE EFFORT"
|
||||
set_global_assignment -name USE_SIGNALTAP_FILE Video_Explorer2.stp
|
||||
set_global_assignment -name VERILOG_FILE rtl/mc6809glb/mc6809glb.v
|
||||
set_global_assignment -name SIGNALTAP_FILE Video_Explorer2.stp
|
||||
set_global_assignment -name SLD_NODE_CREATOR_ID 110 -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_ENTITY_NAME sld_signaltap -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_RAM_BLOCK_TYPE=AUTO" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_NODE_INFO=805334528" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_POWER_UP_TRIGGER=0" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_STORAGE_QUALIFIER_INVERSION_MASK_LENGTH=0" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_ATTRIBUTE_MEM_MODE=OFF" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_STATE_FLOW_USE_GENERATED=0" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_STATE_BITS=11" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_BUFFER_FULL_STOP=1" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_CURRENT_RESOURCE_WIDTH=1" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_INCREMENTAL_ROUTING=1" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[0] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[3] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[5] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[16] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[28] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[31] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_LEVEL=3" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_IN_ENABLED=0" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_PIPELINE=0" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_COUNTER_PIPELINE=0" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_ADVANCED_TRIGGER_ENTITY=basic,1,basic,1,basic,1," -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_LEVEL_PIPELINE=1" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_ENABLE_ADVANCED_TRIGGER=0" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[2] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[21] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[22] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[30] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_clk -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|clk_sample" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[0] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[0] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[6] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[12] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[17] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[18] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_RAM_PIPELINE=1" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_SEGMENT_SIZE=2048" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[13] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[19] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_SAMPLE_DEPTH=2048" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[8] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[25] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[1] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[2] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[3] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[4] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[5] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[6] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[7] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[8] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[9] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[10] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[11] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[12] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[13] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[14] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[15] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[16] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[17] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[18] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[19] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[20] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[21] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[22] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[23] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[24] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[25] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[26] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[27] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[1] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[2] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[3] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[4] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[5] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[6] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[7] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[8] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[9] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[10] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[11] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[12] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[13] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[14] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[15] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[16] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[17] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[18] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[19] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[20] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[21] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[22] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[23] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[24] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[25] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[26] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[27] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_DATA_BITS=28" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_BITS=28" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_STORAGE_QUALIFIER_BITS=28" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_INVERSION_MASK=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_INVERSION_MASK_LENGTH=277" -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[1] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[4] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[7] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[9] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[10] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[11] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[14] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[15] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[20] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[23] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[24] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[26] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[27] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[29] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
|
||||
set_global_assignment -name SLD_FILE db/Video_Explorer2_auto_stripped.stp
|
||||
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
|
||||
@@ -1,6 +1,6 @@
|
||||
//============================================================================
|
||||
// CoCo3 port to MiSTer
|
||||
// Copyright (c) 2019 Alan Steremberg - alanswx, Stan Hodge - MasterS3263827
|
||||
// Copyright (c) 2019 Alan Steremberg - alanswx
|
||||
//
|
||||
//
|
||||
//============================================================================
|
||||
@@ -43,8 +43,6 @@ module emu
|
||||
input [11:0] HDMI_WIDTH,
|
||||
input [11:0] HDMI_HEIGHT,
|
||||
output HDMI_FREEZE,
|
||||
output HDMI_BLACKOUT,
|
||||
output HDMI_BOB_DEINT,
|
||||
|
||||
`ifdef MISTER_FB
|
||||
// Use framebuffer in DDRAM
|
||||
@@ -182,8 +180,6 @@ assign LED_POWER = 0;
|
||||
|
||||
assign VGA_SCALER = 0;
|
||||
assign HDMI_FREEZE = 0;
|
||||
assign HDMI_BLACKOUT = 0;
|
||||
assign HDMI_BOB_DEINT = 0;
|
||||
|
||||
wire [1:0] ar = status[9:8];
|
||||
|
||||
@@ -193,8 +189,6 @@ assign VIDEO_ARY = (!ar) ? 12'd3 : 12'd0;
|
||||
|
||||
|
||||
`include "build_id.v"
|
||||
`include "build_id_num.v"
|
||||
|
||||
localparam CONF_STR = {
|
||||
"COCO3;UART19200:9600:4800:2400:1200:300;",
|
||||
"-;",
|
||||
@@ -258,7 +252,7 @@ localparam CONF_STR = {
|
||||
"J,Button1,Button2;",
|
||||
"jn,A,B;",
|
||||
"v,51;",
|
||||
"V,v",{`BUILD_DATE,"-",`BUILD_NUMBER}
|
||||
"V,v",`BUILD_DATE
|
||||
};
|
||||
|
||||
// Status bits Directory
|
||||
@@ -283,7 +277,7 @@ assign clk_sys=CLK_57;
|
||||
wire pll_locked, pll2_locked;
|
||||
wire CLK_114, CLK_57, CLK_28, CLK_14;
|
||||
|
||||
assign VGA_DISABLE = 1'b0;
|
||||
|
||||
|
||||
pll pll
|
||||
(
|
||||
@@ -323,7 +317,6 @@ wire [21:0] gamma_bus;
|
||||
assign CLK_VIDEO = clk_sys;
|
||||
|
||||
wire [64:0] RTC;
|
||||
wire [15:0] sdram_sz;
|
||||
|
||||
// SD - 7 drives [4 fdc, 2 sdc and 1 cass_wr] 512 size blocks [the wd1793 translates to a 256 byte sector size]
|
||||
hps_io #(.CONF_STR(CONF_STR),.PS2DIV(2400), .VDNUM(7), .BLKSZ(2)) hps_io
|
||||
@@ -349,8 +342,6 @@ hps_io #(.CONF_STR(CONF_STR),.PS2DIV(2400), .VDNUM(7), .BLKSZ(2)) hps_io
|
||||
.ioctl_dout(ioctl_data),
|
||||
.ioctl_index(ioctl_index),
|
||||
|
||||
.sdram_sz(sdram_sz),
|
||||
|
||||
// SD block level interface
|
||||
|
||||
.img_mounted(img_mounted), // signaling that new image has been mounted
|
||||
@@ -464,9 +455,7 @@ wire Programmed_EE;
|
||||
|
||||
EE_Cold_Bt COCO3_EE_Cold_Bt (
|
||||
.CLK(CLK_14),
|
||||
.RESET(1'b0),
|
||||
|
||||
// .Display_EE(1'b0), // from MISTer subsystem
|
||||
.Display_EE(easter_egg), // from MISTer subsystem
|
||||
.Cold_Boot(AMW_ACK), // from AMW system
|
||||
|
||||
@@ -485,15 +474,11 @@ wire [7:0] r;
|
||||
wire [7:0] g;
|
||||
wire [7:0] b;
|
||||
|
||||
wire easter_egg = status[10];
|
||||
wire easter_egg = ~status[10];
|
||||
wire [31:0] probe;
|
||||
|
||||
assign USER_OUT[6:0] = probe[6:0];
|
||||
|
||||
wire [71:0] Config_Data;
|
||||
|
||||
assign Config_Data = {`BUILD_DATE, `BUILD_NUMBER};
|
||||
|
||||
coco3fpga coco3 (
|
||||
// CLOCKS
|
||||
|
||||
@@ -537,7 +522,7 @@ coco3fpga coco3 (
|
||||
// R1, L2, R2, L1
|
||||
.P_SWITCH(~{coco_joy2[4],coco_joy1[5],coco_joy2[5],coco_joy1[4]}),
|
||||
.SWITCH(switch),
|
||||
// .SOUND_OUT(cocosound),
|
||||
.SOUND_OUT(cocosound),
|
||||
.SOUND_LEFT(audio_left),
|
||||
.SOUND_RIGHT(AUDIO_R),
|
||||
|
||||
@@ -548,9 +533,6 @@ coco3fpga coco3 (
|
||||
.ioctl_index(ioctl_index),
|
||||
.ioctl_wr(ioctl_wr),
|
||||
|
||||
// SDRAM Info
|
||||
.sdram_sz(sdram_sz),
|
||||
|
||||
// SD block level interface
|
||||
|
||||
.img_mounted(img_mounted), // signaling that new image has been mounted
|
||||
@@ -598,7 +580,6 @@ coco3fpga coco3 (
|
||||
.RTC(RTC),
|
||||
|
||||
.AMW_Trigger(coldboot | mpi_reset | mem_reset),
|
||||
// .AMW_Trigger(coldboot),
|
||||
.AMW_ACK(AMW_ACK),
|
||||
|
||||
.F_Turbo(F_Turbo),
|
||||
@@ -607,8 +588,6 @@ coco3fpga coco3 (
|
||||
|
||||
.AUTO_MODE(Auto_Mode),
|
||||
|
||||
.Config_Data(Config_Data),
|
||||
|
||||
.UART_TXD(UART_TXD),
|
||||
.UART_RXD(UART_RXD),
|
||||
.UART_RTS(UART_RTS),
|
||||
@@ -619,7 +598,7 @@ coco3fpga coco3 (
|
||||
|
||||
assign status_set = 1'b0;
|
||||
|
||||
//wire [5:0] cocosound;
|
||||
wire [5:0] cocosound;
|
||||
|
||||
wire [2:0] turbo_speed = status[34:32];
|
||||
wire [2:0] assigned_turbo_speed;
|
||||
@@ -762,7 +741,7 @@ cassette cassette(
|
||||
|
||||
.sdram_addr(ram_addr),
|
||||
.sdram_data(ram_data_o),
|
||||
// .sdram_rd(ram_rd), // Not connected for sram
|
||||
.sdram_rd(ram_rd), // Not connected for sram
|
||||
|
||||
.data(casdout)
|
||||
);
|
||||
|
||||
+1
-1
@@ -277,7 +277,7 @@ trigger;]]>
|
||||
</storage_qualifier_level>
|
||||
</storage_qualifier_events>
|
||||
<log>
|
||||
<data global_temp="1" name="log: Trig @ 2024/03/24 16:48:19 (0:0:12.7 elapsed)" power_up_mode="false" sample_depth="2048" trigger_position="256">11100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000101101001101010101111000000010110100110101010111100000001011010011010101011110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000111000000001110100100111100011100000000111010010011110001110000000011101001001111000Line truncated
|
||||
<data global_temp="1" name="log: Trig @ 2024/03/24 15:50:41 (0:0:14.0 elapsed)" power_up_mode="false" sample_depth="2048" trigger_position="256">11100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000Line truncated
|
||||
<extradata>1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111T111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111</extradata>
|
||||
</log>
|
||||
</trigger>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
`define BUILD_NUMBER "004"
|
||||
-36
@@ -1,39 +1,3 @@
|
||||
1. Added support for cassette save. To use: A) You have to have a file [anyname.cas]
|
||||
which is larger than needed. B) Select the file through the UI Menu 'Save
|
||||
Cassette'. C)Set 'Cass Rwd=0 / Rec=1' to 1. D) Issue your 'CSAVE "NAME"'
|
||||
E) When done, set 'Cass Rwd=0 / Rec=1' to 0 to complete the write. The file can
|
||||
now be loaded or copied. Note a dummy file of a specific size can be created in
|
||||
the MiSTer SSH shell in the /media/fat/games/coco3 with the command:
|
||||
'truncate -s 65536 tapefileame.cas'. [Note do NOT use over 65536 file length]
|
||||
2. Fixed serial interrupt [6551] to not be functional on slot 3 [carts].
|
||||
3. Modification of sys_top.v to override use of USER_IO for HDMI - so it can be used
|
||||
for logic analyzer debug. This will only occur when `define Config_Debug is
|
||||
enabled in config.v.
|
||||
4. Fixed MUGS of powerup issue occurring on some MiSTer units.
|
||||
5. Fixed incorrect application of GIME_IRQ on legacy interrupts. Fixed race condition
|
||||
on reading IRQ status vs clearing the interrupt.
|
||||
6. Improved Castle of Tharoggad. App now loads but locks as the graphics animate. This
|
||||
change improved mmu usage through to CARTS.
|
||||
7. Builds now keep track of multiple builds in the same date. It shows as V240512-001 in
|
||||
the menus. Its also exposed to BASIC and a boot.vhd which can be enabled to autorun is
|
||||
supplied in the archive to show how it works.
|
||||
8. Additionally, on the boot.vhd disk, is a program which demonstrated how to load a font -
|
||||
IBMFONT.BAS. Run it and it maps a font much like the IBM font to the 80 column format.
|
||||
Also, a file called TESTRTC.BAS pulls the MiSTer RTC values exposed in BASIC to display
|
||||
a clock.
|
||||
9. Large improvement in the Timer function. Code closer emulates COCO3 Timer. Fixes
|
||||
Sliphead cart.
|
||||
10. In the 20231023 release the wd1773 instances were reduced to 1 for the FDC and one for
|
||||
the FDC. This saved space but introduced a bug when using multiple drives at the same
|
||||
time - like a copy command. This change was removed and the copy command works again.
|
||||
|
||||
To Do...
|
||||
1. Add Speech / Music cart
|
||||
2. Fix Castle of Tharoggad
|
||||
|
||||
|
||||
|
||||
|
||||
1. Changed PIA 2 addressing to align with real CoCo3 hardware and end at FF2F.
|
||||
2. Re-arranged MiSTer drive LUNs to support future auto-boot from SDC drive 0.
|
||||
3. Added 'Auto Run' feature. You must use slot 2 [SDC]. Take your floppy or HD
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -21,7 +21,7 @@ set_global_assignment -name SYSTEMVERILOG_FILE rtl/Cassette_Write.sv
|
||||
set_global_assignment -name VERILOG_FILE rtl/rtc.sv
|
||||
set_global_assignment -name VERILOG_FILE rtl/AMW.v
|
||||
set_global_assignment -name VERILOG_FILE rtl/square_gen.v
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/config.sv
|
||||
set_global_assignment -name VERILOG_FILE rtl/config.v
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/fdc.sv
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/sdc.sv
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE rtl/sdc_top.sv
|
||||
|
||||
Binary file not shown.
+56
-51
@@ -82,6 +82,8 @@ module Cassette_Write(
|
||||
|
||||
);
|
||||
|
||||
assign sd_blk_cnt = 6'd0;
|
||||
|
||||
|
||||
// Create 16x sample clock for the 2400 Baud rate...
|
||||
// ~26us based on 1.78Mhz [562 ns]- divide by 46....
|
||||
@@ -113,38 +115,35 @@ begin
|
||||
end
|
||||
end
|
||||
|
||||
// Mounted SD Image [for the cass]
|
||||
// This is not used and only here for completeness
|
||||
// Mounted SD Image [for the cass]
|
||||
|
||||
//reg drive_wp;
|
||||
//reg [31:0] drive_size;
|
||||
reg drive_wp;
|
||||
reg [31:0] drive_size;
|
||||
|
||||
//always @(negedge img_mounted)
|
||||
//begin
|
||||
// drive_wp <= img_readonly;
|
||||
// drive_size <= img_size[31:0]; //Size / 256 on [31:8]
|
||||
//end
|
||||
|
||||
// Set to 1 512 byte block per r/w
|
||||
assign sd_blk_cnt = 6'd0;
|
||||
always @(negedge img_mounted)
|
||||
begin
|
||||
drive_wp <= img_readonly;
|
||||
drive_size <= img_size[31:0]; //Size / 256 on [31:8]
|
||||
end
|
||||
|
||||
|
||||
// Byte Receiver
|
||||
|
||||
reg [15:0] incomming_reg;
|
||||
reg [15:0] incomming_reg;
|
||||
|
||||
reg [5:0] bit_time;
|
||||
reg [2:0] bit_count;
|
||||
reg wave_negative;
|
||||
reg [5:0] bit_time;
|
||||
reg [2:0] bit_count;
|
||||
reg wave_negative;
|
||||
|
||||
localparam time_out = 6'h3f;
|
||||
localparam wave_zero_level = 6'd32;
|
||||
localparam bit_time_1 = 6'd22;
|
||||
localparam sync = 15'b0111_1000_1010_101; // Pre shift $553C [L -> R]
|
||||
localparam sync_proper = 8'h3C;
|
||||
localparam leader = 8'h55;
|
||||
localparam pre_rollover = 9'h1FF;
|
||||
localparam rollover = 9'h000;
|
||||
localparam time_out = 6'h3f;
|
||||
localparam wave_zero_level = 6'd32;
|
||||
localparam bit_time_1 = 6'd22;
|
||||
//localparam sync = 15'b010_1010_1001_1110; // Pre shift $553C
|
||||
localparam sync = 15'b0111_1000_1010_101; // Pre shift $553C [L -> R]
|
||||
localparam sync_proper = 8'h3C;
|
||||
localparam leader = 8'h55;
|
||||
localparam pre_rollover = 9'h1FF;
|
||||
localparam rollover = 9'h000;
|
||||
|
||||
reg byte_clk;
|
||||
reg look_for_sync;
|
||||
@@ -152,37 +151,36 @@ reg flush_end, flush_end_que;
|
||||
reg sd_hold;
|
||||
reg pre_roll;
|
||||
reg [7:0] blk_type;
|
||||
reg [7:0] protocol_data_count;
|
||||
reg gap;
|
||||
|
||||
// Buffer interface
|
||||
wire [8:0] buf_address;
|
||||
wire [7:0] buf_data_in;
|
||||
wire [7:0] buf_data_out;
|
||||
wire buf_write;
|
||||
|
||||
// State Mach states
|
||||
localparam st_beg0 = 4'd0;
|
||||
localparam st_start = 4'd1;
|
||||
localparam st_st1 = 4'd2;
|
||||
localparam st_st2 = 4'd3;
|
||||
localparam st_wr = 4'd4;
|
||||
localparam st_wr1 = 4'd5;
|
||||
reg [7:0] protocol_data_count;
|
||||
|
||||
localparam st_beg0 = 4'd0;
|
||||
localparam st_start = 4'd1;
|
||||
localparam st_st1 = 4'd2;
|
||||
localparam st_st2 = 4'd3;
|
||||
localparam st_st3 = 4'd4;
|
||||
localparam st_wr = 4'd5;
|
||||
localparam st_wr1 = 4'd6;
|
||||
|
||||
reg [3:0] st_state;
|
||||
reg [3:0] state_stack;
|
||||
|
||||
localparam p_sync = 3'd0;
|
||||
localparam p_blk_type = 3'd1;
|
||||
localparam p_len = 3'd2;
|
||||
localparam p_dta = 3'd3;
|
||||
localparam p_cksum = 3'd4;
|
||||
localparam p_sync = 3'd0;
|
||||
localparam p_blk_type = 3'd1;
|
||||
localparam p_len = 3'd2;
|
||||
localparam p_dta = 3'd3;
|
||||
localparam p_cksum = 3'd4;
|
||||
|
||||
reg [2:0] p_state;
|
||||
|
||||
localparam sd_wr_st = 2'd0;
|
||||
localparam sd_wr_st1 = 2'd1;
|
||||
localparam sd_wr_st2 = 2'd2;
|
||||
localparam sd_wr_st = 2'd0;
|
||||
localparam sd_wr_st1 = 2'd1;
|
||||
localparam sd_wr_st2 = 2'd2;
|
||||
|
||||
reg [1:0] sd_wr_state;
|
||||
|
||||
@@ -212,7 +210,6 @@ begin
|
||||
sd_wr_state <= sd_wr_st;
|
||||
sd_hold <= 1'b0;
|
||||
pre_roll <= 1'b0;
|
||||
gap <= 1'b0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
@@ -251,7 +248,6 @@ begin
|
||||
sd_wr_state <= sd_wr_st;
|
||||
sd_hold <= 1'b0;
|
||||
pre_roll <= 1'b0;
|
||||
gap <= 1'b0;
|
||||
end
|
||||
|
||||
byte_clk <= 1'b0;
|
||||
@@ -269,7 +265,7 @@ begin
|
||||
if ((DTOA_CODE >= wave_zero_level) && wave_negative)
|
||||
begin
|
||||
// Initially we are not collecting the leader bytes just collecting them and
|
||||
// waiting for the sync $3C55. The write to file stage will automatically
|
||||
// waiting for the sync $$553C. The write to file stage will automatically
|
||||
// write the 128 leader bytes befor we start transfering data.
|
||||
if (!look_for_sync)
|
||||
begin
|
||||
@@ -305,7 +301,7 @@ begin
|
||||
begin
|
||||
buf_address <= 9'b000000000;
|
||||
buf_data_in <= leader;
|
||||
protocol_data_count <= 8'h80; // We will use this to count the 128 bytes
|
||||
protocol_data_count <= 8'h7f; // We will use this to count the 128 bytes
|
||||
|
||||
st_state <= st_start;
|
||||
end
|
||||
@@ -367,8 +363,6 @@ begin
|
||||
state_stack <= st_st1; // We come back here
|
||||
st_state <= st_wr; // Write a byte
|
||||
p_state <= p_dta;
|
||||
if ((blk_type == 8'h00) & (protocol_data_count == 8'h05) & (incomming_reg[15:8] == 8'hff))
|
||||
gap <= 1'b1;
|
||||
if (protocol_data_count == 8'h01)
|
||||
p_state <= p_cksum;
|
||||
end
|
||||
@@ -396,13 +390,24 @@ begin
|
||||
st_st2:
|
||||
begin
|
||||
buf_data_in <= leader;
|
||||
if ((blk_type == 8'h00) || gap)
|
||||
protocol_data_count <= 8'h80; // We will use this to count the 128 bytes
|
||||
if (blk_type == 8'h00)
|
||||
protocol_data_count <= 8'h7f; // We will use this to count the 128 bytes
|
||||
else
|
||||
protocol_data_count <= 8'h02; // We will use this to count the 2 bytes
|
||||
protocol_data_count <= 8'h01; // We will use this to count the 128 bytes
|
||||
st_state <= st_start; // No, don't write any more - were done
|
||||
end
|
||||
|
||||
st_st3:
|
||||
begin
|
||||
state_stack <= st_st3; // We come back here
|
||||
st_state <= st_wr; // Write a byte
|
||||
protocol_data_count <= protocol_data_count - 1'b1;
|
||||
if (protocol_data_count == 8'h00) // 128 bytes
|
||||
begin
|
||||
st_state <= st_st1; // No, don't write any more - were done
|
||||
end
|
||||
end
|
||||
|
||||
// Perform the byte writes to the buffer
|
||||
// This acts like a sub routine....
|
||||
st_wr:
|
||||
|
||||
@@ -5,7 +5,6 @@ create_clock -period 1000.000 -name img_mounted[2] [get_nodes emu:emu|hps_io:hps
|
||||
create_clock -period 1000.000 -name img_mounted[1] [get_nodes emu:emu|hps_io:hps_io|img_mounted[1]]
|
||||
create_clock -period 1000.000 -name img_mounted[0] [get_nodes emu:emu|hps_io:hps_io|img_mounted[0]]
|
||||
create_clock -period 1000.000 -name RESET_N [get_nodes emu:emu|coco3fpga:coco3|RESET_N]
|
||||
create_clock -period 1000.000 -name NMISample2 [get_nodes emu:emu|coco3fpga:coco3|mc6809x:GLBCPU09|NMISample2]
|
||||
#set_false_path -from [get_nodes sysmem_lite:sysmem|sysmem_HPS_fpga_interfaces:fpga_interfaces|clocks_resets~FF_4365]
|
||||
#create_clock -period 17.46 -name PH_2 [get_nodes emu:emu|coco3fpga:coco3|PH_2_RAW]
|
||||
#create_clock -period 1000.000 -name CLK_6551[4] [get_nodes emu:emu|coco3fpga:coco3|CLK_6551[4]]
|
||||
|
||||
+94
-107
@@ -55,7 +55,6 @@
|
||||
|
||||
module EE_Cold_Bt(
|
||||
input CLK,
|
||||
input RESET,
|
||||
|
||||
input Display_EE, // from MISTer subsystem
|
||||
input Cold_Boot, // from MISTer subsystem
|
||||
@@ -107,117 +106,105 @@ assign Start_Display_EE = ((Display_EE == 1'b1) & (Display_EE_D == 1'b0));
|
||||
assign Start_Cold_Boot = ((Cold_Boot == 1'b1) & (Cold_Boot_D == 1'b0));
|
||||
|
||||
|
||||
always @ (posedge CLK or posedge RESET)
|
||||
always @(posedge CLK)
|
||||
begin
|
||||
if(RESET)
|
||||
|
||||
Display_EE_D <= Display_EE;
|
||||
Cold_Boot_D <= Cold_Boot;
|
||||
|
||||
next_instruction <= 1'b0;
|
||||
|
||||
if (Start_Display_EE)
|
||||
begin
|
||||
Display_EE_D <= 1'b0;
|
||||
Cold_Boot_D <= 1'b0;
|
||||
EE <= 1'b1;
|
||||
N_RESET <= 1'b1;
|
||||
prog <= 48'h000000000000;
|
||||
next_instruction <= 1'b0;
|
||||
timer <= 24'h000000;
|
||||
prog <= EE_PROG;
|
||||
end
|
||||
else
|
||||
|
||||
if (Start_Cold_Boot)
|
||||
begin
|
||||
Display_EE_D <= Display_EE;
|
||||
Cold_Boot_D <= Cold_Boot;
|
||||
|
||||
next_instruction <= 1'b0;
|
||||
|
||||
if (Start_Display_EE)
|
||||
begin
|
||||
prog <= EE_PROG;
|
||||
end
|
||||
|
||||
if (Start_Cold_Boot)
|
||||
begin
|
||||
prog <= Cold_Boot_PROG;
|
||||
end
|
||||
|
||||
if (next_instruction)
|
||||
prog[43:0] <= prog[47:4];
|
||||
|
||||
case(inst)
|
||||
|
||||
inst_NULL:;
|
||||
|
||||
inst_START:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
timer <= 24'h000000; // clear timer
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_EE_ACTIVE:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
EE <= 1'b0;
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_EE_INACTIVE:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
EE <= 1'b1;
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_RESET_ACTIVE:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
N_RESET <= 1'b0;
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_RESET_INACTIVE:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
N_RESET <= 1'b1;
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_SHORT_TIMER:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
timer <= timer + 1'b1;
|
||||
if (timer==SHORT_TIME)
|
||||
begin
|
||||
next_instruction <= 1'b1;
|
||||
timer <= 24'h000000; // clear timer
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
inst_LONG_TIMER:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
timer <= timer + 1'b1;
|
||||
if (timer==LONG_TIME)
|
||||
begin
|
||||
next_instruction <= 1'b1;
|
||||
timer <= 24'h000000; // clear timer
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
default:;
|
||||
|
||||
endcase
|
||||
prog <= Cold_Boot_PROG;
|
||||
end
|
||||
|
||||
if (next_instruction)
|
||||
prog[43:0] <= prog[47:4];
|
||||
|
||||
case(inst)
|
||||
|
||||
inst_NULL:;
|
||||
|
||||
inst_START:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
timer <= 24'h000000; // clear timer
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_EE_ACTIVE:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
EE <= 1'b0;
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_EE_INACTIVE:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
EE <= 1'b1;
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_RESET_ACTIVE:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
N_RESET <= 1'b0;
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_RESET_INACTIVE:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
N_RESET <= 1'b1;
|
||||
next_instruction <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
inst_SHORT_TIMER:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
timer <= timer + 1'b1;
|
||||
if (timer==SHORT_TIME)
|
||||
begin
|
||||
next_instruction <= 1'b1;
|
||||
timer <= 24'h000000; // clear timer
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
inst_LONG_TIMER:
|
||||
begin
|
||||
if (!next_instruction)
|
||||
begin
|
||||
timer <= timer + 1'b1;
|
||||
if (timer==LONG_TIME)
|
||||
begin
|
||||
next_instruction <= 1'b1;
|
||||
timer <= 24'h000000; // clear timer
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
default:;
|
||||
|
||||
endcase
|
||||
end
|
||||
|
||||
endmodule
|
||||
+4
-14
@@ -1827,25 +1827,15 @@ always @ (negedge MASTER_CLK)
|
||||
// Adjust HSYNC here
|
||||
**************************************************************************************/
|
||||
// Width from 87 GIME 5.08 uS = 73 clocks
|
||||
// 11'd751: // 824 - 751 = 73 (approx 5.09 uS)
|
||||
// begin
|
||||
// HSYNC_N <= 1'b0; // Turn on Sync
|
||||
// PIXEL_COUNT <= 11'd752;
|
||||
// end
|
||||
// 11'd810: // End of SYNC start of front porch 804 + 80 - 1, End of Sync to Video = 167 816 + 167 =
|
||||
// begin
|
||||
// HSYNC_N <= 1'b1; // SYNC OFF
|
||||
// PIXEL_COUNT <= 11'd811;
|
||||
// end
|
||||
11'd752: // 824 - 751 = 73 (approx 5.09 uS)
|
||||
11'd751: // 824 - 751 = 73 (approx 5.09 uS)
|
||||
begin
|
||||
HSYNC_N <= 1'b0; // Turn on Sync
|
||||
PIXEL_COUNT <= 11'd753;
|
||||
PIXEL_COUNT <= 11'd752;
|
||||
end
|
||||
11'd811: // End of SYNC start of front porch 804 + 80 - 1, End of Sync to Video = 167 816 + 167 =
|
||||
11'd810: // End of SYNC start of front porch 804 + 80 - 1, End of Sync to Video = 167 816 + 167 =
|
||||
begin
|
||||
HSYNC_N <= 1'b1; // SYNC OFF
|
||||
PIXEL_COUNT <= 11'd812;
|
||||
PIXEL_COUNT <= 11'd811;
|
||||
end
|
||||
/**************************************************************************************
|
||||
* End of HSYNC adjustment
|
||||
|
||||
+11
-11
@@ -6,16 +6,16 @@ module cassette(
|
||||
input rewind,
|
||||
input en,
|
||||
|
||||
output reg [15:0] sdram_addr,
|
||||
output reg [24:0] sdram_addr,
|
||||
input [7:0] sdram_data,
|
||||
// output reg sdram_rd,
|
||||
output reg sdram_rd,
|
||||
|
||||
output data
|
||||
// output [2:0] status
|
||||
output data,
|
||||
output [2:0] status
|
||||
|
||||
);
|
||||
|
||||
//assign status = state;
|
||||
assign status = state;
|
||||
|
||||
reg old_en;
|
||||
reg ffrewind;
|
||||
@@ -60,25 +60,25 @@ always @(posedge clk) begin
|
||||
end
|
||||
NEXT: begin
|
||||
state <= READ1;
|
||||
// sdram_rd <= 1'b0;
|
||||
sdram_rd <= 1'b0;
|
||||
if (seq == 24'h553c00) name <= 1'd1;
|
||||
if (seq == 24'h555555 && name) begin
|
||||
name <= 1'd0;
|
||||
state <= WAIT;
|
||||
hold <= 19'd445000; // 0.5s
|
||||
sdram_addr <= sdram_addr - 16'd3;
|
||||
sdram_addr <= sdram_addr - 25'd3;
|
||||
end
|
||||
if (seq == 24'h553cff) eof <= 2'd1;
|
||||
if (seq == 24'h00ff55 && eof == 2'd1) eof <= 2'd2;
|
||||
if (~en) state <= IDLE;
|
||||
end
|
||||
READ1: begin
|
||||
// sdram_rd <= 1'b1;
|
||||
sdram_rd <= 1'b1;
|
||||
state <= READ2;
|
||||
end
|
||||
READ2: begin
|
||||
ibyte <= sdram_data;
|
||||
// sdram_rd <= 1'b0;
|
||||
sdram_rd <= 1'b0;
|
||||
state <= READ3;
|
||||
sq_start <= 1'b1;
|
||||
end
|
||||
@@ -88,14 +88,14 @@ always @(posedge clk) begin
|
||||
end
|
||||
READ4: begin
|
||||
seq <= { seq[15:0], sdram_data };
|
||||
sdram_addr <= sdram_addr + 16'd1;
|
||||
sdram_addr <= sdram_addr + 25'd1;
|
||||
state <= eof == 2'd2 ? IDLE : NEXT;
|
||||
end
|
||||
endcase
|
||||
|
||||
if (ffrewind ^ rewind) begin
|
||||
seq <= 24'd0;
|
||||
sdram_addr <= 16'd0;
|
||||
sdram_addr <= 25'd0;
|
||||
state <= IDLE;
|
||||
eof <= 2'd0;
|
||||
end
|
||||
|
||||
+250
-451
File diff suppressed because it is too large.
Load diff
@@ -61,47 +61,23 @@
|
||||
// This file is a configuration definition file. The CoCo3FPGA for MiSTer source files
|
||||
// can be built into multiple objects which have mutually exclusive features.
|
||||
|
||||
`define Config_Debug_FLAG 4'hA
|
||||
localparam [7:0] FEATURE_1 = 8'h01;
|
||||
localparam [7:0] FEATURE_2 = 8'h02;
|
||||
localparam [7:0] FEATURE_3 = 8'h04;
|
||||
localparam [7:0] FEATURE_4 = 8'h08;
|
||||
localparam [7:0] FEATURE_5 = 8'h10;
|
||||
localparam [7:0] FEATURE_6 = 8'h20;
|
||||
localparam [7:0] FEATURE_7 = 8'h40;
|
||||
localparam [7:0] FEATURE_8 = 8'h80;
|
||||
`include "../rtl/config_inc.v"
|
||||
|
||||
// This is used for hardware debugging - it overrides the USER_IO to be user_out direct.
|
||||
// It should be commented out for release
|
||||
//`define Config_Debug
|
||||
// If defined the Config_Debug sets the FEATURE MASKS all OR'd together which appears on COCO space at FFF1 & (FFF0 = 0x55 as a debug flag)
|
||||
//`define Config_Debug
|
||||
|
||||
// Feature list - note only FEATURE_1 - FEATURE_8 are supported
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// `set_feature(CoCo3_Horz_INT_FIX,Feat_1) // Connection of the horz int to the Mister CoCo3 V5 rasterizer
|
||||
`define CoCo3_Horz_INT_FIX
|
||||
`define Feat_1
|
||||
`set_feature(CoCo3_Horz_INT_FIX, FEATURE_1) // Connection of the horz int to the Mister CoCo3 V5 rasterizer
|
||||
|
||||
// `set_feature(CoCo3_Vert_INT_FIX,Feat_2) // Connection of the vert int to the Mister CoCo3 V5 rasterizer
|
||||
// `define CoCo3_Vert_INT_FIX
|
||||
// `define Feat_2
|
||||
//`set_feature(CoCo3_Vert_INT_FIX, FEATURE_2) // Connection of the vert int to the Mister CoCo3 V5 rasterizer
|
||||
|
||||
// `set_feature(CoCo3_CYC_ACC_6809,Feat_3) // Use cycle accurate 6809
|
||||
`define CoCo3_CYC_ACC_6809
|
||||
`define Feat_3
|
||||
`set_feature(CoCo3_CYC_ACC_6809, FEATURE_3) // Use cycle accurate 6809
|
||||
|
||||
// `set_feature(CoCo3_sdc_override_size,Feat_4) // Define static size value
|
||||
`define CoCo3_sdc_override_size
|
||||
`define Feat_4
|
||||
`set_feature(CoCo3_sdc_override_size, FEATURE_4) // Define static size value
|
||||
|
||||
// `set_feature(CoCo3_sdc_fix_os9_driver,Feat_5) // fix sdc query disk size issue in llcocosdc driver in multipak enviroment
|
||||
`define CoCo3_sdc_fix_os9_driver
|
||||
`define Feat_5
|
||||
`set_feature(CoCo3_sdc_fix_os9_driver, FEATURE_5) // fix sdc query disk size issue in llcocosdc driver in multipak enviroment
|
||||
|
||||
// `set_feature(CoCo3_disable_GART_in_GIMEX,Feat_6) // Disable GIMEX ram transfers [GIMEX detection in OS9 EOU]
|
||||
`define CoCo3_disable_GART_in_GIMEX
|
||||
`define Feat_6
|
||||
|
||||
// `set_feature(CoCo3_Select_GIMEX_RAST,Feat_7) // Use GIMEX Rasterizer Engine
|
||||
// `define CoCo3_Select_GIMEX_RAST
|
||||
// `define Feat_7
|
||||
`set_feature(CoCo3_disable_GART_in_GIMEX, FEATURE_6)// Disable GIMEX ram transfers [GIMEX detection in OS( EOU]
|
||||
|
||||
//`set_feature(CoCo3_Select_GIMEX_RAST, FEATURE_7) // Use GIMEX Rasterizer Engine
|
||||
@@ -0,0 +1,123 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Project Name: CoCo3FPGA Version 5.x.x
|
||||
// File Name: config_inc.v
|
||||
//
|
||||
// CoCo3 in an FPGA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CPU section copyrighted by John Kent
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Color Computer 3 compatible system on a chip
|
||||
//
|
||||
// Version : 5.x
|
||||
//
|
||||
// Copyright (c) 2008 Gary Becker ([email protected])
|
||||
//
|
||||
// All rights reserved
|
||||
//
|
||||
// Redistribution and use in source and synthezised forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in synthesized form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// Neither the name of the author nor the names of other contributors may
|
||||
// be used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Please report bugs to the author, but before you do so, please
|
||||
// make sure that this is not a derivative work and that
|
||||
// you have the latest version of this file.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Gary Becker
|
||||
// [email protected]
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MISTer Conversion by Stan Hodge and Alan Steremberg (& Gary Becker)
|
||||
// [email protected]
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a configuration definition include file. The CoCo3FPGA for MiSTer source files
|
||||
// can be built into multiple objects which have mutually exclusive features.
|
||||
|
||||
`define Config_Debug_Value (`config_num_1 | `config_num_2 | `config_num_3 | `config_num_4 | `config_num_5 | `config_num_6 | `config_num_7 | `config_num_8)
|
||||
`define Config_Debug_FLAG 8'h55
|
||||
`define FEATURE_1 8'h01
|
||||
`define FEATURE_2 8'h02
|
||||
`define FEATURE_3 8'h04
|
||||
`define FEATURE_4 8'h08
|
||||
`define FEATURE_5 8'h10
|
||||
`define FEATURE_6 8'h20
|
||||
`define FEATURE_7 8'h40
|
||||
`define FEATURE_8 8'h80
|
||||
`define config_num_1 8'h00
|
||||
`define config_num_2 8'h00
|
||||
`define config_num_3 8'h00
|
||||
`define config_num_4 8'h00
|
||||
`define config_num_5 8'h00
|
||||
`define config_num_6 8'h00
|
||||
`define config_num_7 8'h00
|
||||
`define config_num_8 8'h00
|
||||
|
||||
`define set_feature(Feat_Name, Feat_Mask) \
|
||||
`define Feat_Name \
|
||||
`ifndef config_value_1 \
|
||||
`define config_value_1 Feat_Mask \
|
||||
`define config_num_1 Feat_Mask \
|
||||
`else \
|
||||
`ifndef config_value_2 \
|
||||
`define config_value_2 Feat_Mask \
|
||||
`define config_num_2 Feat_Mask \
|
||||
`else \
|
||||
`ifndef config_value_3 \
|
||||
`define config_value_3 Feat_Mask \
|
||||
`define config_num_3 Feat_Mask \
|
||||
`else \
|
||||
`ifndef config_value_4 \
|
||||
`define config_value_4 Feat_Mask \
|
||||
`define config_num_4 Feat_Mask \
|
||||
`else \
|
||||
`ifndef config_value_5 \
|
||||
`define config_value_5 Feat_Mask \
|
||||
`define config_num_5 Feat_Mask \
|
||||
`else \
|
||||
`ifndef config_value_6 \
|
||||
`define config_value_6 Feat_Mask \
|
||||
`define config_num_6 Feat_Mask \
|
||||
`else \
|
||||
`ifndef config_value_7 \
|
||||
`define config_value_7 Feat_Mask \
|
||||
`define config_num_7 Feat_Mask \
|
||||
`else \
|
||||
`ifndef config_value_8 \
|
||||
`define config_value_8 Feat_Mask \
|
||||
`define config_num_8 Feat_Mask \
|
||||
`endif \
|
||||
`endif \
|
||||
`endif \
|
||||
`endif \
|
||||
`endif \
|
||||
`endif \
|
||||
`endif \
|
||||
`endif
|
||||
+89
-213
@@ -135,10 +135,6 @@ wire [3:0] DRIVE_SEL_EXT_PRE = {DATA_IN[6], DATA_IN[2:0]};
|
||||
reg [2:0] drive_index;
|
||||
|
||||
// SD blk system is a array of 4 systems - one for each drive.
|
||||
// To keep disk track memory, we created 4 wd1793's to match the sd block interfaces
|
||||
// For the interface back to the coco - we need to isolate the wd1793 the computer is talking
|
||||
// to and route those feedback signals back to the coco. This is accomplished via the drive
|
||||
// select. 'drive_index' identifies which controller is addressd.
|
||||
|
||||
|
||||
always @(negedge FF40_CLK or negedge RESET_N)
|
||||
@@ -182,7 +178,7 @@ begin
|
||||
4'b1001:
|
||||
drive_index <= 3'd1;
|
||||
default:
|
||||
drive_index <= 3'd1; // Illegal
|
||||
drive_index <= 3'd0; // Illegal
|
||||
endcase
|
||||
end
|
||||
end
|
||||
@@ -212,13 +208,12 @@ wire DRQ[4];
|
||||
wire selected_DRQ;
|
||||
wire selected_INTRQ;
|
||||
|
||||
wire WR[4];
|
||||
wire RD[4];
|
||||
wire RD_E[4];
|
||||
wire WR;
|
||||
wire RD;
|
||||
wire RD_E;
|
||||
//wire CE;
|
||||
wire HALT_EN_RST;
|
||||
wire [7:0] DATA_1793;
|
||||
wire [7:0] dout[4];
|
||||
reg read;
|
||||
reg write;
|
||||
reg read_d;
|
||||
@@ -230,11 +225,7 @@ reg read1;
|
||||
reg write1;
|
||||
reg [1:0] ADDRESS_L;
|
||||
|
||||
|
||||
assign RD[0] = (read || RD_E[0]) && (drive_index == 2'd1);
|
||||
assign RD[1] = (read || RD_E[1]) && (drive_index == 3'd2);
|
||||
assign RD[2] = (read || RD_E[2]) && (drive_index == 3'd3);
|
||||
assign RD[3] = (read || RD_E[3]) && (drive_index == 3'd4);
|
||||
assign RD = read || RD_E;
|
||||
|
||||
// The idea here is to "stretch" the CPU read and write signals to ensure we catch a 8 mhz enable.
|
||||
// For writes we will buffer the data out to ensure it does not go away.
|
||||
@@ -253,14 +244,8 @@ begin
|
||||
write_d <= 1'b0;
|
||||
r_w_active <= 1'b0;
|
||||
clk_8Mhz_enable_found <= 1'b0;
|
||||
WR[0] <= 1'b0;
|
||||
WR[1] <= 1'b0;
|
||||
WR[2] <= 1'b0;
|
||||
WR[3] <= 1'b0;
|
||||
RD_E[0] <= 1'b0;
|
||||
RD_E[1] <= 1'b0;
|
||||
RD_E[2] <= 1'b0;
|
||||
RD_E[3] <= 1'b0;
|
||||
WR <= 1'b0;
|
||||
RD_E <= 1'b0;
|
||||
read1 <= 1'b0;
|
||||
write1 <= 1'b0;
|
||||
read <= 1'b0;
|
||||
@@ -293,32 +278,14 @@ begin
|
||||
begin
|
||||
// Set Writes
|
||||
r_w_active <= 1'b1;
|
||||
case (drive_index)
|
||||
3'd1:
|
||||
WR[0] <= 1'b1;
|
||||
3'd2:
|
||||
WR[1] <= 1'b1;
|
||||
3'd3:
|
||||
WR[2] <= 1'b1;
|
||||
3'd4:
|
||||
WR[3] <= 1'b1;
|
||||
endcase
|
||||
WR <= 1'b1;
|
||||
end
|
||||
|
||||
// Synchronus rising edge of read
|
||||
if ((read == 1'b1) && (read_d == 1'b0))
|
||||
begin
|
||||
r_w_active <= 1'b1;
|
||||
case (drive_index)
|
||||
3'd1:
|
||||
RD_E[0] <= 1'b1;
|
||||
3'd2:
|
||||
RD_E[1] <= 1'b1;
|
||||
3'd3:
|
||||
RD_E[2] <= 1'b1;
|
||||
3'd4:
|
||||
RD_E[3] <= 1'b1;
|
||||
endcase
|
||||
RD_E <= 1'b1;
|
||||
end
|
||||
|
||||
// Clears
|
||||
@@ -331,48 +298,54 @@ begin
|
||||
clk_8Mhz_enable_found <= 1'b0;
|
||||
r_w_active <= 1'b0;
|
||||
|
||||
WR[0] <= 1'b0;
|
||||
WR[1] <= 1'b0;
|
||||
WR[2] <= 1'b0;
|
||||
WR[3] <= 1'b0;
|
||||
WR <= 1'b0;
|
||||
|
||||
RD_E[0] <= 1'b0;
|
||||
RD_E[1] <= 1'b0;
|
||||
RD_E[2] <= 1'b0;
|
||||
RD_E[3] <= 1'b0;
|
||||
RD_E <= 1'b0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
// NMI from disk controller
|
||||
// Selected INTRQ
|
||||
assign selected_INTRQ = (drive_index == 3'd1) ? INTRQ[0]:
|
||||
(drive_index == 3'd2) ? INTRQ[1]:
|
||||
(drive_index == 3'd3) ? INTRQ[2]:
|
||||
(drive_index == 3'd4) ? INTRQ[3]:
|
||||
1'b0;
|
||||
|
||||
|
||||
assign NMI_09 = DENSITY & selected_INTRQ; // Send NMI if Double Density (Halt Mode)
|
||||
|
||||
// HALT from disk controller
|
||||
// Selected DRQ
|
||||
assign selected_DRQ = (drive_index == 3'd1) ? DRQ[0]:
|
||||
(drive_index == 3'd2) ? DRQ[1]:
|
||||
(drive_index == 3'd3) ? DRQ[2]:
|
||||
(drive_index == 3'd4) ? DRQ[3]:
|
||||
1'b1;
|
||||
|
||||
|
||||
assign HALT = (HALT_EN & ~selected_DRQ);
|
||||
|
||||
assign HALT_EN_RST = RESET_N & ~selected_INTRQ; // From controller schematic
|
||||
|
||||
// Data bus selection
|
||||
assign DATA_1793 = (drive_index == 3'd1) ? dout[0]:
|
||||
(drive_index == 3'd2) ? dout[1]:
|
||||
(drive_index == 3'd3) ? dout[2]:
|
||||
(drive_index == 3'd4) ? dout[3]:
|
||||
8'd0;
|
||||
assign sd_lba[0] = wd1793_sd_lba;
|
||||
assign sd_lba[1] = wd1793_sd_lba;
|
||||
assign sd_lba[2] = wd1793_sd_lba;
|
||||
assign sd_lba[3] = wd1793_sd_lba;
|
||||
|
||||
assign sd_rd[0] = (drive_index == 3'd1) ? wd1793_sd_rd:
|
||||
1'b0;
|
||||
assign sd_rd[1] = (drive_index == 3'd2) ? wd1793_sd_rd:
|
||||
1'b0;
|
||||
assign sd_rd[2] = (drive_index == 3'd3) ? wd1793_sd_rd:
|
||||
1'b0;
|
||||
assign sd_rd[3] = (drive_index == 3'd4) ? wd1793_sd_rd:
|
||||
1'b0;
|
||||
|
||||
assign sd_wr[0] = (drive_index == 3'd1) ? wd1793_sd_wr:
|
||||
1'b0;
|
||||
assign sd_wr[1] = (drive_index == 3'd2) ? wd1793_sd_wr:
|
||||
1'b0;
|
||||
assign sd_wr[2] = (drive_index == 3'd3) ? wd1793_sd_wr:
|
||||
1'b0;
|
||||
assign sd_wr[3] = (drive_index == 3'd4) ? wd1793_sd_wr:
|
||||
1'b0;
|
||||
|
||||
assign wd1793_sd_ack = (drive_index == 3'd1) ? sd_ack[0]:
|
||||
(drive_index == 3'd2) ? sd_ack[1]:
|
||||
(drive_index == 3'd3) ? sd_ack[2]:
|
||||
(drive_index == 3'd4) ? sd_ack[3]:
|
||||
sd_ack[0]; // default is drive 1
|
||||
|
||||
assign sd_buff_din[0] = wd1793_sd_buff_din;
|
||||
assign sd_buff_din[1] = wd1793_sd_buff_din;
|
||||
assign sd_buff_din[2] = wd1793_sd_buff_din;
|
||||
assign sd_buff_din[3] = wd1793_sd_buff_din;
|
||||
|
||||
|
||||
// The SD_BLK interface and thus the wd1793 will allways transfer 1 blk. This is blk qty - 1 per spec.
|
||||
@@ -385,6 +358,13 @@ reg drive_wp[4];
|
||||
reg [3:0] drive_ready = 4'B0000;
|
||||
reg [3:0] double_sided = 4'B0000;
|
||||
reg [23:0] drive_size[4];
|
||||
wire [23:0] selected_drive_size;
|
||||
wire [31:0] wd1793_sd_lba;
|
||||
wire wd1793_sd_rd;
|
||||
wire wd1793_sd_wr;
|
||||
wire wd1793_sd_ack;
|
||||
wire [7:0] wd1793_sd_buff_din;
|
||||
wire selected_drive_ready, selected_drive_wp, selected_double_sided;
|
||||
|
||||
|
||||
// As drives are mounted in MISTer this logic saves the write protect and generates ready for
|
||||
@@ -433,6 +413,28 @@ begin
|
||||
//double_sided[3]<= img_size > 20'd368600;//20'd368640;
|
||||
end
|
||||
|
||||
assign selected_drive_size = (drive_index == 3'd1) ? drive_size[0]:
|
||||
(drive_index == 3'd2) ? drive_size[1]:
|
||||
(drive_index == 3'd3) ? drive_size[2]:
|
||||
(drive_index == 3'd4) ? drive_size[3]:
|
||||
drive_size[0]; // default is drive 1
|
||||
|
||||
assign selected_drive_wp = (drive_index == 3'd1) ? drive_wp[0]:
|
||||
(drive_index == 3'd2) ? drive_wp[1]:
|
||||
(drive_index == 3'd3) ? drive_wp[2]:
|
||||
(drive_index == 3'd4) ? drive_wp[3]:
|
||||
drive_wp[0]; // default is drive 1
|
||||
|
||||
assign selected_double_sided= (drive_index == 3'd1) ? double_sided[0]:
|
||||
(drive_index == 3'd2) ? double_sided[1]:
|
||||
(drive_index == 3'd3) ? double_sided[2]:
|
||||
double_sided[0]; // default is drive 1
|
||||
|
||||
assign selected_drive_ready = (drive_index == 3'd1) ? drive_ready[0]:
|
||||
(drive_index == 3'd2) ? drive_ready[1]:
|
||||
(drive_index == 3'd3) ? drive_ready[2]:
|
||||
(drive_index == 3'd4) ? drive_ready[3]:
|
||||
1'b0; // default is not ready
|
||||
|
||||
wd1793 #(1,0) coco_wd1793_0
|
||||
(
|
||||
@@ -440,160 +442,34 @@ wd1793 #(1,0) coco_wd1793_0
|
||||
.ce(ena_8Mhz),
|
||||
.reset(~RESET_N),
|
||||
.io_en(1'b1),
|
||||
.rd(RD[0]),
|
||||
.wr(WR[0]),
|
||||
.rd(RD),
|
||||
.wr(WR),
|
||||
.addr(ADDRESS_L[1:0]),
|
||||
.din(DATA_IN_L),
|
||||
.dout(dout[0]),
|
||||
.drq(DRQ[0]),
|
||||
.intrq(INTRQ[0]),
|
||||
.dout(DATA_1793),
|
||||
.drq(selected_DRQ),
|
||||
.intrq(selected_INTRQ),
|
||||
|
||||
.img_mounted(1'b0),
|
||||
.img_mounted_overide(1'b1),
|
||||
.img_size(drive_size[0]),
|
||||
.img_size(selected_drive_size[19:0]),
|
||||
|
||||
.sd_lba(sd_lba[0]),
|
||||
.sd_rd(sd_rd[0]),
|
||||
.sd_wr(sd_wr[0]),
|
||||
.sd_ack(sd_ack[0]),
|
||||
.sd_lba(wd1793_sd_lba),
|
||||
.sd_rd(wd1793_sd_rd),
|
||||
.sd_wr(wd1793_sd_wr),
|
||||
.sd_ack(wd1793_sd_ack),
|
||||
|
||||
.sd_buff_addr(sd_buff_addr),
|
||||
.sd_buff_dout(sd_buff_dout),
|
||||
.sd_buff_din(sd_buff_din[0]),
|
||||
.sd_buff_din(wd1793_sd_buff_din),
|
||||
.sd_buff_wr(sd_buff_wr),
|
||||
|
||||
.wp(drive_wp[0]),
|
||||
.wp(selected_drive_wp),
|
||||
|
||||
.size_code(3'd5), // 5 is 18 sector x 256 bits COCO standard
|
||||
.layout(~double_sided[0]), // 0 = Track-Side-Sector, 1 - Side-Track-Sector
|
||||
.side(double_sided[0] & DRIVE_SEL_EXT[3]),
|
||||
.ready(drive_ready[0]),
|
||||
|
||||
.input_active(0), // Section not used
|
||||
.input_addr(0),
|
||||
.input_data(0),
|
||||
.input_wr(0),
|
||||
.buff_din(0)
|
||||
);
|
||||
|
||||
wd1793 #(1,0) coco_wd1793_1
|
||||
(
|
||||
.clk_sys(~CLK),
|
||||
.ce(ena_8Mhz),
|
||||
.reset(~RESET_N),
|
||||
.io_en(1'b1),
|
||||
.rd(RD[1]),
|
||||
.wr(WR[1]),
|
||||
.addr(ADDRESS_L[1:0]),
|
||||
.din(DATA_IN_L),
|
||||
.dout(dout[1]),
|
||||
.drq(DRQ[1]),
|
||||
.intrq(INTRQ[1]),
|
||||
|
||||
.img_mounted(1'b0),
|
||||
.img_mounted_overide(1'b1),
|
||||
.img_size(drive_size[1]),
|
||||
|
||||
.sd_lba(sd_lba[1]),
|
||||
.sd_rd(sd_rd[1]),
|
||||
.sd_wr(sd_wr[1]),
|
||||
.sd_ack(sd_ack[1]),
|
||||
|
||||
.sd_buff_addr(sd_buff_addr),
|
||||
.sd_buff_dout(sd_buff_dout),
|
||||
.sd_buff_din(sd_buff_din[1]),
|
||||
.sd_buff_wr(sd_buff_wr),
|
||||
|
||||
.wp(drive_wp[1]),
|
||||
|
||||
.size_code(3'd5), // 5 is 18 sector x 256 bits COCO standard
|
||||
.layout(~double_sided[1]), // 0 = Track-Side-Sector, 1 - Side-Track-Sector
|
||||
.side(double_sided[1] & DRIVE_SEL_EXT[3]),
|
||||
.ready(drive_ready[1]),
|
||||
|
||||
.input_active(0), // Section not used
|
||||
.input_addr(0),
|
||||
.input_data(0),
|
||||
.input_wr(0),
|
||||
.buff_din(0)
|
||||
);
|
||||
|
||||
wd1793 #(1,0) coco_wd1793_2
|
||||
(
|
||||
.clk_sys(~CLK),
|
||||
.ce(ena_8Mhz),
|
||||
.reset(~RESET_N),
|
||||
.io_en(1'b1),
|
||||
.rd(RD[2]),
|
||||
.wr(WR[2]),
|
||||
.addr(ADDRESS_L[1:0]),
|
||||
.din(DATA_IN_L),
|
||||
.dout(dout[2]),
|
||||
.drq(DRQ[2]),
|
||||
.intrq(INTRQ[2]),
|
||||
|
||||
.img_mounted(1'b0),
|
||||
.img_mounted_overide(1'b1),
|
||||
.img_size(drive_size[2]),
|
||||
|
||||
.sd_lba(sd_lba[2]),
|
||||
.sd_rd(sd_rd[2]),
|
||||
.sd_wr(sd_wr[2]),
|
||||
.sd_ack(sd_ack[2]),
|
||||
|
||||
.sd_buff_addr(sd_buff_addr),
|
||||
.sd_buff_dout(sd_buff_dout),
|
||||
.sd_buff_din(sd_buff_din[2]),
|
||||
.sd_buff_wr(sd_buff_wr),
|
||||
|
||||
.wp(drive_wp[2]),
|
||||
|
||||
.size_code(3'd5), // 5 is 18 sector x 256 bits COCO standard
|
||||
.layout(~double_sided[2]), // 0 = Track-Side-Sector, 1 - Side-Track-Sector
|
||||
.side(double_sided[2] & DRIVE_SEL_EXT[3]),
|
||||
.ready(drive_ready[2]),
|
||||
|
||||
.input_active(0), // Section not used
|
||||
.input_addr(0),
|
||||
.input_data(0),
|
||||
.input_wr(0),
|
||||
.buff_din(0)
|
||||
);
|
||||
|
||||
wd1793 #(1,0) coco_wd1793_3
|
||||
(
|
||||
.clk_sys(~CLK),
|
||||
.ce(ena_8Mhz),
|
||||
.reset(~RESET_N),
|
||||
.io_en(1'b1),
|
||||
.rd(RD[3]),
|
||||
.wr(WR[3]),
|
||||
.addr(ADDRESS_L[1:0]),
|
||||
.din(DATA_IN_L),
|
||||
.dout(dout[3]),
|
||||
.drq(DRQ[3]),
|
||||
.intrq(INTRQ[3]),
|
||||
|
||||
.img_mounted(1'b0),
|
||||
.img_mounted_overide(1'b1),
|
||||
.img_size(drive_size[3]),
|
||||
|
||||
.sd_lba(sd_lba[3]),
|
||||
.sd_rd(sd_rd[3]),
|
||||
.sd_wr(sd_wr[3]),
|
||||
.sd_ack(sd_ack[3]),
|
||||
|
||||
.sd_buff_addr(sd_buff_addr),
|
||||
.sd_buff_dout(sd_buff_dout),
|
||||
.sd_buff_din(sd_buff_din[3]),
|
||||
.sd_buff_wr(sd_buff_wr),
|
||||
|
||||
.wp(drive_wp[3]),
|
||||
|
||||
.size_code(3'd5), // 5 is 18 sector x 256 bits COCO standard
|
||||
.layout(1'b1), // 0 = Track-Side-Sector, 1 - Side-Track-Sector
|
||||
.side(1'b0),
|
||||
.ready(drive_ready[3]),
|
||||
.layout(~selected_double_sided), // 0 = Track-Side-Sector, 1 - Side-Track-Sector
|
||||
.side(selected_double_sided & DRIVE_SEL_EXT[3]),
|
||||
.ready(selected_drive_ready),
|
||||
|
||||
.input_active(0), // Section not used
|
||||
.input_addr(0),
|
||||
|
||||
+2
-3
@@ -47,6 +47,8 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Define Config features
|
||||
`include "../RTL/config.v"
|
||||
|
||||
module sdc(
|
||||
input CLK, // clock
|
||||
@@ -87,9 +89,6 @@ module sdc(
|
||||
|
||||
);
|
||||
|
||||
// Define Config features
|
||||
`include "../rtl/config.sv"
|
||||
|
||||
reg [23:0] LSN;
|
||||
reg [7:0] command;
|
||||
reg [7:0] transfer_address;
|
||||
|
||||
+74
-107
@@ -146,27 +146,54 @@ assign DATA_HDD =
|
||||
|
||||
wire [31:0] sdc_sd_lba[2];
|
||||
wire [31:0] fdc_sd_lba[2];
|
||||
wire [31:0] wd1793_sd_lba;
|
||||
wire [1:0] sdc_sd_rd;
|
||||
wire wd1793_sd_rd;
|
||||
wire [1:0] fdc_sd_rd;
|
||||
wire [1:0] sdc_sd_wr;
|
||||
wire [1:0] fdc_sd_wr;
|
||||
wire wd1793_sd_wr;
|
||||
wire [7:0] sdc_sd_buff_din[2];
|
||||
wire [7:0] fdc_sd_buff_din[2];
|
||||
wire [7:0] wd1793_sd_buff_din;
|
||||
wire wd1793_sd_ack;
|
||||
wire sdc_HALT;
|
||||
|
||||
assign sd_lba[0:1] = SDC_EN ? sdc_sd_lba[0:1]:
|
||||
fdc_sd_lba[0:1];
|
||||
|
||||
assign fdc_sd_lba[0] = wd1793_sd_lba;
|
||||
assign fdc_sd_lba[1] = wd1793_sd_lba;
|
||||
|
||||
assign sd_rd[1:0] = SDC_EN ? sdc_sd_rd[1:0]:
|
||||
fdc_sd_rd[1:0];
|
||||
|
||||
assign fdc_sd_rd[0] = (drive_index == 3'd1) ? wd1793_sd_rd:
|
||||
1'b0;
|
||||
|
||||
assign fdc_sd_rd[1] = (drive_index == 3'd2) ? wd1793_sd_rd:
|
||||
1'b0;
|
||||
|
||||
assign sd_wr[1:0] = SDC_EN ? sdc_sd_wr[1:0]:
|
||||
fdc_sd_wr[1:0];
|
||||
|
||||
assign fdc_sd_wr[0] = (drive_index == 3'd1) ? wd1793_sd_wr:
|
||||
1'b0;
|
||||
|
||||
assign fdc_sd_wr[1] = (drive_index == 3'd2) ? wd1793_sd_wr:
|
||||
1'b0;
|
||||
|
||||
assign sd_buff_din[0:1] = SDC_EN ? sdc_sd_buff_din[0:1]:
|
||||
fdc_sd_buff_din[0:1];
|
||||
|
||||
assign fdc_sd_buff_din[0] = wd1793_sd_buff_din;
|
||||
assign fdc_sd_buff_din[1] = wd1793_sd_buff_din;
|
||||
|
||||
|
||||
assign wd1793_sd_ack = (drive_index == 3'd1) ? sd_ack[0]:
|
||||
(drive_index == 3'd2) ? sd_ack[1]:
|
||||
sd_ack[0]; // default is drive 1
|
||||
|
||||
|
||||
sdc coco_sdc(
|
||||
.CLK(CLK), // clock
|
||||
@@ -250,13 +277,13 @@ begin
|
||||
drive_index <= 3'd1;
|
||||
|
||||
4'b1011: // This is what the Magic Number $43 does so we select a non-active drive
|
||||
drive_index <= 3'd1;
|
||||
drive_index <= 3'd0;
|
||||
4'b1000: // This is no drive with DS = illegal drive
|
||||
drive_index <= 3'd1;
|
||||
drive_index <= 3'd0;
|
||||
4'b0000: // This is no drive (maybe 0 in ff40) = illegal drive
|
||||
drive_index <= 3'd1;
|
||||
drive_index <= 3'd0;
|
||||
default:
|
||||
drive_index <= 3'd1;
|
||||
drive_index <= 3'd0;
|
||||
endcase
|
||||
end
|
||||
end
|
||||
@@ -283,17 +310,14 @@ end
|
||||
|
||||
// Control signals for the wd1793
|
||||
|
||||
wire INTRQ[2];
|
||||
wire DRQ[2];
|
||||
wire selected_DRQ;
|
||||
wire selected_INTRQ;
|
||||
|
||||
wire WR[2];
|
||||
wire RD[2];
|
||||
wire RD_E[2];
|
||||
wire WR;
|
||||
wire RD;
|
||||
wire RD_E;
|
||||
wire HALT_EN_RST;
|
||||
wire [7:0] DATA_1793;
|
||||
wire [7:0] dout[2];
|
||||
reg read;
|
||||
reg write;
|
||||
reg read_d;
|
||||
@@ -305,8 +329,7 @@ reg read1;
|
||||
reg write1;
|
||||
reg [1:0] ADDRESS_L;
|
||||
|
||||
assign RD[0] = (read || RD_E[0]) && (drive_index == 2'd1);
|
||||
assign RD[1] = (read || RD_E[1]) && (drive_index == 3'd2);
|
||||
assign RD = (read || RD_E); // Even with no drive selected allow read to the controller
|
||||
|
||||
// The idea here is to "stretch" the CPU read and write signals to ensure we catch a 8 mhz enable.
|
||||
// For writes we will buffer the data out to ensure it does not go away.
|
||||
@@ -327,10 +350,8 @@ begin
|
||||
write_d <= 1'b0;
|
||||
r_w_active <= 1'b0;
|
||||
clk_8Mhz_enable_found <= 1'b0;
|
||||
WR[0] <= 1'b0;
|
||||
WR[1] <= 1'b0;
|
||||
RD_E[0] <= 1'b0;
|
||||
RD_E[1] <= 1'b0;
|
||||
WR <= 1'b0;
|
||||
RD_E <= 1'b0;
|
||||
read1 <= 1'b0;
|
||||
write1 <= 1'b0;
|
||||
read <= 1'b0;
|
||||
@@ -362,24 +383,14 @@ begin
|
||||
begin
|
||||
// Set Write
|
||||
r_w_active <= 1'b1;
|
||||
case (drive_index)
|
||||
3'd1:
|
||||
WR[0] <= 1'b1;
|
||||
3'd2:
|
||||
WR[1] <= 1'b1;
|
||||
endcase
|
||||
WR <= 1'b1;
|
||||
end
|
||||
|
||||
// Synchronus rising edge of read
|
||||
if ((read == 1'b1) && (read_d == 1'b0))
|
||||
begin
|
||||
r_w_active <= 1'b1;
|
||||
case (drive_index)
|
||||
3'd1:
|
||||
RD_E[0] <= 1'b1;
|
||||
3'd2:
|
||||
RD_E[1] <= 1'b1;
|
||||
endcase
|
||||
RD_E <= 1'b1;
|
||||
end
|
||||
|
||||
// Clears
|
||||
@@ -391,42 +402,23 @@ begin
|
||||
begin
|
||||
clk_8Mhz_enable_found <= 1'b0;
|
||||
r_w_active <= 1'b0;
|
||||
WR[0] <= 1'b0;
|
||||
WR[1] <= 1'b0;
|
||||
|
||||
RD_E[0] <= 1'b0;
|
||||
RD_E[1] <= 1'b0;
|
||||
WR <= 1'b0;
|
||||
RD_E <= 1'b0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
// NMI from disk controller
|
||||
// Selected INTRQ
|
||||
assign selected_INTRQ = (drive_index == 3'd1) ? INTRQ[0]:
|
||||
(drive_index == 3'd2) ? INTRQ[1]:
|
||||
1'b0;
|
||||
|
||||
assign NMI_09 = ~SDC_EN & DENSITY & selected_INTRQ; // Send NMI if Double Density (Halt Mode)
|
||||
|
||||
|
||||
|
||||
// HALT from disk controller
|
||||
|
||||
// Selected DRQ
|
||||
assign selected_DRQ = (drive_index == 3'd1) ? DRQ[0]:
|
||||
(drive_index == 3'd2) ? DRQ[1]:
|
||||
1'b1;
|
||||
|
||||
assign HALT = (~SDC_EN & HALT_EN & ~selected_DRQ) | sdc_HALT;
|
||||
|
||||
assign HALT_EN_RST = RESET_N & ~selected_INTRQ; // From controller schematic
|
||||
|
||||
// Data bus selection
|
||||
assign DATA_1793 = (drive_index == 3'd1) ? dout[0]:
|
||||
(drive_index == 3'd2) ? dout[1]:
|
||||
8'd0;
|
||||
|
||||
|
||||
// The SD_BLK interface and thus the wd1793 will allways transfer 1 blk. This is blk qty - 1 per spec.
|
||||
assign sd_blk_cnt[1] = 6'd0;
|
||||
@@ -436,6 +428,8 @@ reg drive_wp[2];
|
||||
reg [1:0] drive_ready = 2'b00;
|
||||
reg [1:0] double_sided = 2'b00;
|
||||
reg [31:0] drive_size[2];
|
||||
wire [31:0] selected_drive_size;
|
||||
wire selected_drive_ready, selected_drive_wp, selected_double_sided;
|
||||
|
||||
// As drives are mounted in MISTer this logic saves the write protect and generates ready for
|
||||
// changing drives to the wd1793.
|
||||
@@ -463,83 +457,56 @@ begin
|
||||
double_sided[1]<= (img_size > 64'd368600) & (img_size < 64'd740000);//20'd368640;
|
||||
end
|
||||
|
||||
assign selected_drive_size = (drive_index == 3'd1) ? drive_size[0]:
|
||||
(drive_index == 3'd2) ? drive_size[1]:
|
||||
drive_size[0]; // default is drive 1
|
||||
|
||||
wd1793 #(1,0) coco_wd1793_sdc_0
|
||||
assign selected_drive_wp = (drive_index == 3'd1) ? drive_wp[0]:
|
||||
(drive_index == 3'd2) ? drive_wp[1]:
|
||||
drive_wp[0]; // default is drive 1
|
||||
|
||||
assign selected_double_sided= (drive_index == 3'd1) ? double_sided[0]:
|
||||
(drive_index == 3'd2) ? double_sided[1]:
|
||||
double_sided[0]; // default is drive 1
|
||||
|
||||
assign selected_drive_ready = (drive_index == 3'd1) ? drive_ready[0]:
|
||||
(drive_index == 3'd2) ? drive_ready[1]:
|
||||
drive_ready[0]; // default is drive 1
|
||||
|
||||
wd1793 #(1,0) coco_wd1793_sdc
|
||||
(
|
||||
.clk_sys(~CLK),
|
||||
.ce(ena_8Mhz),
|
||||
.reset(~RESET_N),
|
||||
.io_en(1'b1),
|
||||
.rd(RD[0]),
|
||||
.wr(WR[0]),
|
||||
.rd(RD),
|
||||
.wr(WR),
|
||||
.addr(ADDRESS_L[1:0]),
|
||||
.din(DATA_IN_L),
|
||||
.dout(dout[0]),
|
||||
.drq(DRQ[0]),
|
||||
.intrq(INTRQ[0]),
|
||||
.dout(DATA_1793),
|
||||
.drq(selected_DRQ),
|
||||
.intrq(selected_INTRQ),
|
||||
|
||||
.img_mounted(1'b0), // Not used when using _override
|
||||
.img_mounted_overide(1'b1), // Load img_size and layout on each clock
|
||||
.img_size(drive_size[0]),
|
||||
.img_size(selected_drive_size[19:0]),
|
||||
|
||||
.sd_lba(fdc_sd_lba[0]),
|
||||
.sd_rd(fdc_sd_rd[0]),
|
||||
.sd_wr(fdc_sd_wr[0]),
|
||||
.sd_ack(sd_ack[0]),
|
||||
.sd_lba(wd1793_sd_lba),
|
||||
.sd_rd(wd1793_sd_rd),
|
||||
.sd_wr(wd1793_sd_wr),
|
||||
.sd_ack(wd1793_sd_ack),
|
||||
|
||||
.sd_buff_addr(sd_buff_addr),
|
||||
.sd_buff_dout(sd_buff_dout),
|
||||
.sd_buff_din(fdc_sd_buff_din[0]),
|
||||
.sd_buff_din(wd1793_sd_buff_din),
|
||||
.sd_buff_wr(sd_buff_wr),
|
||||
|
||||
.wp(drive_wp[0]),
|
||||
.wp(selected_drive_wp),
|
||||
|
||||
.size_code(3'd5), // 5 is 18 sector x 256 bits COCO standard
|
||||
.layout(~double_sided[0]), // 0 = Track-Side-Sector, 1 - Side-Track-Sector
|
||||
.side(double_sided[0] & DRIVE_SEL_EXT[3]),
|
||||
.ready(drive_ready[0]),
|
||||
|
||||
.input_active(0), // Section not used
|
||||
.input_addr(0),
|
||||
.input_data(0),
|
||||
.input_wr(0),
|
||||
.buff_din(0)
|
||||
);
|
||||
|
||||
wd1793 #(1,0) coco_wd1793_sdc_1
|
||||
(
|
||||
.clk_sys(~CLK),
|
||||
.ce(ena_8Mhz),
|
||||
.reset(~RESET_N),
|
||||
.io_en(1'b1),
|
||||
.rd(RD[1]),
|
||||
.wr(WR[1]),
|
||||
.addr(ADDRESS_L[1:0]),
|
||||
.din(DATA_IN_L),
|
||||
.dout(dout[1]),
|
||||
.drq(DRQ[1]),
|
||||
.intrq(INTRQ[1]),
|
||||
|
||||
.img_mounted(1'b0), // Not used when using _override
|
||||
.img_mounted_overide(1'b1), // Load img_size and layout on each clock
|
||||
.img_size(drive_size[1]),
|
||||
|
||||
.sd_lba(fdc_sd_lba[1]),
|
||||
.sd_rd(fdc_sd_rd[1]),
|
||||
.sd_wr(fdc_sd_wr[1]),
|
||||
.sd_ack(sd_ack[1]),
|
||||
|
||||
.sd_buff_addr(sd_buff_addr),
|
||||
.sd_buff_dout(sd_buff_dout),
|
||||
.sd_buff_din(fdc_sd_buff_din[1]),
|
||||
.sd_buff_wr(sd_buff_wr),
|
||||
|
||||
.wp(drive_wp[1]),
|
||||
|
||||
.size_code(3'd5), // 5 is 18 sector x 256 bits COCO standard
|
||||
.layout(~double_sided[1]), // 0 = Track-Side-Sector, 1 - Side-Track-Sector
|
||||
.side(double_sided[1] & DRIVE_SEL_EXT[3]),
|
||||
.ready(drive_ready[1]),
|
||||
.layout(~selected_double_sided), // 0 = Track-Side-Sector, 1 - Side-Track-Sector
|
||||
.side(selected_double_sided & DRIVE_SEL_EXT[3]),
|
||||
.ready(selected_drive_ready),
|
||||
|
||||
.input_active(0), // Section not used
|
||||
.input_addr(0),
|
||||
|
||||
@@ -99,11 +99,6 @@ generate
|
||||
assign G = {RGB_fix[7:4],RGB_fix[7:4]};
|
||||
assign B = {RGB_fix[3:0],RGB_fix[3:0]};
|
||||
end
|
||||
else if(DW == 18) begin
|
||||
assign R = {RGB_fix[17:12],RGB_fix[17:16]};
|
||||
assign G = {RGB_fix[11: 6],RGB_fix[11:10]};
|
||||
assign B = {RGB_fix[ 5: 0],RGB_fix[ 5: 4]};
|
||||
end
|
||||
else begin // 24
|
||||
assign R = RGB_fix[23:16];
|
||||
assign G = RGB_fix[15:8];
|
||||
|
||||
+51
-170
@@ -103,7 +103,7 @@ USE ieee.numeric_std.ALL;
|
||||
-- DOWNSCALE : True=Support downscaling False=Downscaling disabled
|
||||
-- BYTESWAP : Little/Big endian byte swap
|
||||
-- FRAC : Fractional bits, subpixel resolution
|
||||
-- OHRES : Max. output horizontal resolution. 1024, 2048, 2304, 2560, 4096
|
||||
-- OHRES : Max. output horizontal resolution. Must be a power of two.
|
||||
-- (Used for sizing line buffers)
|
||||
-- IHRES : Max. input horizontal resolution. Must be a power of two.
|
||||
-- (Used for sizing line buffers)
|
||||
@@ -125,7 +125,7 @@ ENTITY ascal IS
|
||||
ADAPTIVE : boolean := true;
|
||||
DOWNSCALE_NN : boolean := false;
|
||||
FRAC : natural RANGE 4 TO 8 :=4;
|
||||
OHRES : natural RANGE 1 TO 4096 :=2304;
|
||||
OHRES : natural RANGE 1 TO 4096 :=2048;
|
||||
IHRES : natural RANGE 1 TO 2048 :=2048;
|
||||
N_DW : natural RANGE 64 TO 128 := 128;
|
||||
N_AW : natural RANGE 8 TO 32 := 32;
|
||||
@@ -201,10 +201,9 @@ ENTITY ascal IS
|
||||
i_vdmax : OUT natural RANGE 0 TO 4095;
|
||||
|
||||
-- Output video parameters
|
||||
run : IN std_logic :='1'; -- 1=Enable output image. 0=No image
|
||||
freeze : IN std_logic :='0'; -- 1=Disable framebuffer writes
|
||||
mode : IN unsigned(4 DOWNTO 0);
|
||||
bob_deint : IN std_logic := '0';
|
||||
run : IN std_logic :='1'; -- 1=Enable output image. 0=No image
|
||||
freeze : IN std_logic :='0'; -- 1=Disable framebuffer writes
|
||||
mode : IN unsigned(4 DOWNTO 0);
|
||||
-- SYNC |_________________________/"""""""""\_______|
|
||||
-- DE |""""""""""""""""""\________________________|
|
||||
-- RGB | <#IMAGE#> ^HDISP |
|
||||
@@ -223,7 +222,6 @@ ENTITY ascal IS
|
||||
vmax : IN natural RANGE 0 TO 4095; -- 0 <= vmin < vmax < vdisp
|
||||
vrr : IN std_logic := '0';
|
||||
vrrmax : IN natural RANGE 0 TO 4095 := 0;
|
||||
swblack : IN std_logic := '0'; -- will output 3 black frame on every resolution switch
|
||||
|
||||
-- Scaler format. 00=16bpp 565, 01=24bpp 10=32bpp
|
||||
format : IN unsigned(1 DOWNTO 0) :="01";
|
||||
@@ -259,9 +257,6 @@ ENTITY ascal IS
|
||||
BEGIN
|
||||
ASSERT N_DW=64 OR N_DW=128 REPORT "DW" SEVERITY failure;
|
||||
|
||||
ASSERT OHRES = 1024 OR OHRES = 2048 OR OHRES = 2304 OR
|
||||
OHRES = 2560 OR OHRES = 4096 REPORT "OHRES" SEVERITY failure;
|
||||
|
||||
END ENTITY ascal;
|
||||
|
||||
--##############################################################################
|
||||
@@ -292,39 +287,10 @@ ARCHITECTURE rtl OF ascal IS
|
||||
END IF;
|
||||
END FUNCTION to_std_logic;
|
||||
|
||||
----------------------------------------------------------
|
||||
FUNCTION ohres_h(CONSTANT r : natural) RETURN natural IS
|
||||
BEGIN
|
||||
CASE r IS
|
||||
WHEN 1024 => RETURN 1024;
|
||||
WHEN 2048 => RETURN 2048;
|
||||
WHEN OTHERS => RETURN 4096;
|
||||
END CASE;
|
||||
END FUNCTION;
|
||||
FUNCTION ohres_l(CONSTANT r : natural) RETURN natural IS
|
||||
BEGIN
|
||||
CASE r IS
|
||||
WHEN 1024 => RETURN 1024;
|
||||
WHEN 2048 | 2304 | 2560 => RETURN 2048;
|
||||
WHEN OTHERS => RETURN 4096;
|
||||
END CASE;
|
||||
END FUNCTION;
|
||||
FUNCTION ohres_m(CONSTANT r : natural) RETURN natural IS
|
||||
BEGIN
|
||||
CASE r IS
|
||||
WHEN 1024 | 2048 | 2304 => RETURN 256;
|
||||
WHEN OTHERS => RETURN 512;
|
||||
END CASE;
|
||||
END FUNCTION;
|
||||
|
||||
CONSTANT OHRESH : natural := ohres_h(OHRES);
|
||||
CONSTANT OHRESL : natural := ohres_l(OHRES);
|
||||
CONSTANT OHRESM : natural := ohres_m(OHRES);
|
||||
|
||||
----------------------------------------------------------
|
||||
CONSTANT NB_BURST : natural :=ilog2(N_BURST);
|
||||
CONSTANT NB_LA : natural :=ilog2(N_DW/8); -- Low address bits
|
||||
CONSTANT BLEN : natural :=N_BURST / N_DW * 8; -- Burst length
|
||||
CONSTANT NB_LA : natural :=ilog2(N_DW/8); -- Low address bits
|
||||
CONSTANT BLEN : natural :=N_BURST / N_DW * 8; -- Burst length
|
||||
|
||||
----------------------------------------------------------
|
||||
TYPE arr_dw IS ARRAY (natural RANGE <>) OF unsigned(N_DW-1 DOWNTO 0);
|
||||
@@ -352,7 +318,6 @@ ARCHITECTURE rtl OF ascal IS
|
||||
SIGNAL i_pvs,i_pfl,i_pde,i_pce : std_logic;
|
||||
SIGNAL i_ppix : type_pix;
|
||||
SIGNAL i_freeze : std_logic;
|
||||
SIGNAL i_bob_deint : std_logic;
|
||||
SIGNAL i_count : unsigned(2 DOWNTO 0);
|
||||
SIGNAL i_hsize,i_hmin,i_hmax,i_hcpt : uint12;
|
||||
SIGNAL i_hrsize,i_vrsize : uint12;
|
||||
@@ -368,7 +333,6 @@ ARCHITECTURE rtl OF ascal IS
|
||||
SIGNAL i_de_delay : natural RANGE 0 TO 31;
|
||||
SIGNAL i_intercnt : natural RANGE 0 TO 3;
|
||||
SIGNAL i_inter,i_half,i_flm : std_logic;
|
||||
SIGNAL i_wfl : std_logic_vector(2 DOWNTO 0);
|
||||
SIGNAL i_write,i_wreq,i_alt,i_line,i_wline,i_wline_mem : std_logic;
|
||||
SIGNAL i_walt,i_walt_mem,i_wreq_mem : std_logic;
|
||||
SIGNAL i_wdelay : natural RANGE 0 TO 7;
|
||||
@@ -398,7 +362,7 @@ ARCHITECTURE rtl OF ascal IS
|
||||
SIGNAL i_hacc,i_vacc : uint13;
|
||||
SIGNAL i_hdown,i_vdown : std_logic;
|
||||
SIGNAL i_divcpt : natural RANGE 0 TO 36;
|
||||
SIGNAL i_lwad,i_lrad : natural RANGE 0 TO OHRESH-1;
|
||||
SIGNAL i_lwad,i_lrad : natural RANGE 0 TO OHRES-1;
|
||||
SIGNAL i_lwr,i_bil : std_logic;
|
||||
SIGNAL i_ldw,i_ldrm : type_pix;
|
||||
SIGNAL i_hpixp,i_hpix0,i_hpix1,i_hpix2,i_hpix3,i_hpix4 : type_pix;
|
||||
@@ -446,8 +410,6 @@ ARCHITECTURE rtl OF ascal IS
|
||||
-- Output
|
||||
SIGNAL o_run : std_logic;
|
||||
SIGNAL o_freeze : std_logic;
|
||||
SIGNAL o_bob_deint : std_logic;
|
||||
SIGNAL o_iwfl : std_logic_vector(2 DOWNTO 0);
|
||||
SIGNAL o_mode,o_hmode,o_vmode : unsigned(4 DOWNTO 0);
|
||||
SIGNAL o_format : unsigned(5 DOWNTO 0);
|
||||
SIGNAL o_fb_pal_dr : unsigned(23 DOWNTO 0);
|
||||
@@ -494,21 +456,13 @@ ARCHITECTURE rtl OF ascal IS
|
||||
SIGNAL o_reset_na : std_logic;
|
||||
SIGNAL o_dpram : arr_dw(0 TO BLEN*2-1);
|
||||
ATTRIBUTE ramstyle OF o_dpram : SIGNAL IS "no_rw_check";
|
||||
SIGNAL o_line0,o_line1,o_line2,o_line3 : arr_pix(0 TO OHRESL-1);
|
||||
SIGNAL o_linf0,o_linf1,o_linf2,o_linf3 : arr_pix(0 TO OHRESM-1);
|
||||
|
||||
SIGNAL o_line0,o_line1,o_line2,o_line3 : arr_pix(0 TO OHRES-1);
|
||||
ATTRIBUTE ramstyle OF o_line0 : SIGNAL IS "no_rw_check";
|
||||
ATTRIBUTE ramstyle OF o_line1 : SIGNAL IS "no_rw_check";
|
||||
ATTRIBUTE ramstyle OF o_line2 : SIGNAL IS "no_rw_check";
|
||||
ATTRIBUTE ramstyle OF o_line3 : SIGNAL IS "no_rw_check";
|
||||
ATTRIBUTE ramstyle OF o_linf0 : SIGNAL IS "no_rw_check";
|
||||
ATTRIBUTE ramstyle OF o_linf1 : SIGNAL IS "no_rw_check";
|
||||
ATTRIBUTE ramstyle OF o_linf2 : SIGNAL IS "no_rw_check";
|
||||
ATTRIBUTE ramstyle OF o_linf3 : SIGNAL IS "no_rw_check";
|
||||
SIGNAL o_wadl,o_radl0,o_radl1,o_radl2,o_radl3 : natural RANGE 0 TO OHRESH-1;
|
||||
SIGNAL o_ldr0,o_ldr1,o_ldr2,o_ldr3,o_ldw : type_pix;
|
||||
SIGNAL o_ler0,o_ler1,o_ler2,o_ler3 : type_pix;
|
||||
SIGNAL o_lex0,o_lex1,o_lex2,o_lex3 : std_logic;
|
||||
SIGNAL o_wadl,o_radl0,o_radl1,o_radl2,o_radl3 : natural RANGE 0 TO OHRES-1;
|
||||
SIGNAL o_ldw,o_ldr0,o_ldr1,o_ldr2,o_ldr3 : type_pix;
|
||||
SIGNAL o_wr : unsigned(3 DOWNTO 0);
|
||||
SIGNAL o_hcpt,o_vcpt,o_vcpt_pre,o_vcpt_pre2,o_vcpt_pre3,o_vcpt2 : uint12;
|
||||
SIGNAL o_ihsize,o_ihsizem,o_ivsize : uint12;
|
||||
@@ -518,7 +472,7 @@ ARCHITECTURE rtl OF ascal IS
|
||||
SIGNAL o_hfrac : arr_frac(0 TO 9);
|
||||
ATTRIBUTE ramstyle OF o_hfrac : SIGNAL IS "logic"; -- avoid blockram shift register
|
||||
|
||||
SIGNAL o_hacc,o_hacc_ini,o_hacc_next,o_vacc,o_vacc_next,o_vacc_ini : natural RANGE 0 TO 4*OHRESH-1;
|
||||
SIGNAL o_hacc,o_hacc_ini,o_hacc_next,o_vacc,o_vacc_next,o_vacc_ini : natural RANGE 0 TO 4*OHRES-1;
|
||||
SIGNAL o_hsv,o_vsv,o_dev,o_pev,o_end : unsigned(0 TO 11);
|
||||
SIGNAL o_hsp,o_vss : std_logic;
|
||||
SIGNAL o_vcarrym,o_prim : boolean;
|
||||
@@ -536,9 +490,8 @@ ARCHITECTURE rtl OF ascal IS
|
||||
TYPE arr_uint4 IS ARRAY (natural RANGE <>) OF natural RANGE 0 TO 15;
|
||||
SIGNAL o_off : arr_uint4(0 TO 2);
|
||||
SIGNAL o_bibu : std_logic :='0';
|
||||
SIGNAL o_dcptv : arr_uint12(13 TO 14);
|
||||
SIGNAL o_dcpt_clr, o_dcpt_inc : std_logic;
|
||||
SIGNAL o_dcptv_clr, o_dcptv_inc : std_logic_vector(1 TO 12);
|
||||
SIGNAL o_dcptv : arr_uint12(1 TO 14);
|
||||
SIGNAL o_dcpt : uint12;
|
||||
SIGNAL o_hpixs,o_hpix0,o_hpix1,o_hpix2,o_hpix3 : type_pix;
|
||||
SIGNAL o_hpixq : arr_pixq(2 TO 8);
|
||||
ATTRIBUTE ramstyle OF o_hpixq : SIGNAL IS "logic"; -- avoid blockram shift register
|
||||
@@ -546,6 +499,7 @@ ARCHITECTURE rtl OF ascal IS
|
||||
SIGNAL o_vpix_outer : arr_pix(0 TO 2);
|
||||
SIGNAL o_vpix_inner : arr_pix(0 TO 6);
|
||||
|
||||
|
||||
SIGNAL o_vpe : std_logic;
|
||||
SIGNAL o_div : arr_div(0 TO 2); --uint12;
|
||||
SIGNAL o_dir : arr_frac(0 TO 2);
|
||||
@@ -556,7 +510,6 @@ ARCHITECTURE rtl OF ascal IS
|
||||
SIGNAL o_divrun : std_logic;
|
||||
SIGNAL o_hacpt,o_vacpt : unsigned(11 DOWNTO 0);
|
||||
SIGNAL o_vacptl : unsigned(1 DOWNTO 0);
|
||||
signal o_newres : integer range 0 to 3;
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTION shift_ishift(shift : unsigned(0 TO 119);
|
||||
@@ -575,11 +528,11 @@ ARCHITECTURE rtl OF ascal IS
|
||||
END CASE;
|
||||
END FUNCTION;
|
||||
|
||||
FUNCTION shift_ipack(i_dw : unsigned(N_DW-1 DOWNTO 0);
|
||||
acpt : natural RANGE 0 TO 15;
|
||||
shift : unsigned(0 TO 119);
|
||||
pix : type_pix;
|
||||
format : unsigned(1 DOWNTO 0)) RETURN unsigned IS
|
||||
FUNCTION shift_ipack( i_dw : unsigned(N_DW-1 DOWNTO 0);
|
||||
acpt : natural RANGE 0 TO 15;
|
||||
shift : unsigned(0 TO 119);
|
||||
pix : type_pix;
|
||||
format : unsigned(1 DOWNTO 0)) RETURN unsigned IS
|
||||
VARIABLE dw : unsigned(N_DW-1 DOWNTO 0);
|
||||
BEGIN
|
||||
dw:=i_dw;
|
||||
@@ -1177,7 +1130,6 @@ BEGIN
|
||||
i_pushhead<='0';
|
||||
i_eol<='0'; -- End Of Line
|
||||
i_freeze <=freeze; -- <ASYNC>
|
||||
i_bob_deint <= bob_deint;
|
||||
i_iauto<=iauto; -- <ASYNC>
|
||||
i_wreq<='0';
|
||||
i_wr<='0';
|
||||
@@ -1238,13 +1190,11 @@ BEGIN
|
||||
i_vcpt<=0;
|
||||
IF i_inter='1' AND i_flm='0' AND i_half='0' AND INTER THEN
|
||||
i_line<='1';
|
||||
i_wfl(o_ibuf1) <= '0';
|
||||
i_adrsi<=to_unsigned(N_BURST * i_hburst,32) +
|
||||
to_unsigned(N_BURST * to_integer(
|
||||
unsigned'("00") & to_std_logic(HEADER)),32);
|
||||
ELSE
|
||||
i_line<='0';
|
||||
i_wfl(o_ibuf0) <= '1';
|
||||
i_adrsi<=to_unsigned(N_BURST * to_integer(
|
||||
unsigned'("00") & to_std_logic(HEADER)),32);
|
||||
END IF;
|
||||
@@ -1254,8 +1204,8 @@ BEGIN
|
||||
i_vcpt>=i_vmin AND i_vcpt<=i_vmax);
|
||||
|
||||
-- Detects end of frame for triple buffering.
|
||||
i_endframe0<=i_vs AND (NOT i_inter OR i_flm OR i_bob_deint);
|
||||
i_endframe1<=i_vs AND (NOT i_inter OR NOT i_flm OR i_bob_deint);
|
||||
i_endframe0<=i_vs AND (NOT i_inter OR i_flm);
|
||||
i_endframe1<=i_vs AND (NOT i_inter OR NOT i_flm);
|
||||
|
||||
i_vss<=to_std_logic(i_vcpt>=i_vmin AND i_vcpt<=i_vmax);
|
||||
|
||||
@@ -1503,12 +1453,12 @@ BEGIN
|
||||
-- Push pixels to downscaling line buffer
|
||||
i_lwr<=i_hnp4 AND i_ven5 AND i_pce;
|
||||
IF i_lwr='1' THEN
|
||||
i_lwad<=(i_lwad+1) MOD OHRESH;
|
||||
i_lwad<=(i_lwad+1) MOD OHRES;
|
||||
END IF;
|
||||
i_ldw<=i_hpix;
|
||||
|
||||
IF i_hnp3='1' AND i_ven4='1' AND i_pce='1' THEN
|
||||
i_lrad<=(i_lrad+1) MOD OHRESH;
|
||||
i_lrad<=(i_lrad+1) MOD OHRES;
|
||||
END IF;
|
||||
|
||||
------------------------------------------------------
|
||||
@@ -1867,7 +1817,7 @@ BEGIN
|
||||
VARIABLE shift_v : unsigned(0 TO N_DW+15);
|
||||
VARIABLE hpix_v : type_pix;
|
||||
VARIABLE hcarry_v,vcarry_v : boolean;
|
||||
VARIABLE dif_v : natural RANGE 0 TO 8*OHRESH-1;
|
||||
VARIABLE dif_v : natural RANGE 0 TO 8*OHRES-1;
|
||||
VARIABLE off_v : natural RANGE 0 TO 15;
|
||||
BEGIN
|
||||
IF o_reset_na='0' THEN
|
||||
@@ -1912,8 +1862,6 @@ BEGIN
|
||||
o_isync <= '0';
|
||||
o_isync2 <= o_isync;
|
||||
o_freeze <= freeze;
|
||||
o_bob_deint <= bob_deint;
|
||||
o_iwfl <= i_wfl;
|
||||
o_inter <=i_inter; -- <ASYNC>
|
||||
o_iendframe0<=i_endframe0; -- <ASYNC>
|
||||
o_iendframe02<=o_iendframe0;
|
||||
@@ -1942,14 +1890,6 @@ BEGIN
|
||||
o_ivsize<=i_vrsize; -- <ASYNC>
|
||||
o_hdown<=i_hdown; -- <ASYNC>
|
||||
o_vdown<=i_vdown; -- <ASYNC>
|
||||
|
||||
IF (o_newres > 0) then
|
||||
o_newres <= o_newres- 1;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
IF (swblack = '1' and o_fb_ena = '0' and (o_ihsize /= i_hrsize or o_ivsize /= i_vrsize)) then
|
||||
o_newres <= 3;
|
||||
END IF;
|
||||
|
||||
-- Simultaneous change of input and output framebuffers
|
||||
@@ -2146,26 +2086,7 @@ BEGIN
|
||||
o_read<=o_read_pre AND o_run;
|
||||
o_rline<=o_vacpt(0); -- Even/Odd line for interlaced video
|
||||
|
||||
----
|
||||
-- When bob deinterlacing we read lines from one buffer (the most current) but we read them twice
|
||||
-- (in contrast to weave deinterlacing where we read each 480p line from alternating buffers)
|
||||
-- To counteract the severe vibrating/motion with bob deinterlacing, we need to offset one field
|
||||
-- by a half-line. This is done by only reading the first line of the 'even' frame once
|
||||
|
||||
IF o_inter='1' AND o_bob_deint='1' THEN
|
||||
IF o_iwfl(o_obuf0)='0' THEN
|
||||
IF o_vacpt=0 OR o_rline='1' THEN
|
||||
o_adrs_pre <= to_integer(o_vacpt) * to_integer(o_stride);
|
||||
ELSE
|
||||
o_adrs_pre <= (to_integer(o_vacpt)-1) * to_integer(o_stride);
|
||||
END IF;
|
||||
ELSE
|
||||
o_adrs_pre <= to_integer(o_vacpt(11 DOWNTO 1) & "0") * to_integer(o_stride);
|
||||
END IF;
|
||||
ELSE
|
||||
o_adrs_pre<=to_integer(o_vacpt) * to_integer(o_stride);
|
||||
END IF;
|
||||
|
||||
o_adrs_pre<=to_integer(o_vacpt) * to_integer(o_stride);
|
||||
IF o_adrsa='1' THEN
|
||||
IF o_fload=2 THEN
|
||||
o_adrs<=to_unsigned(o_hbcpt * N_BURST,32);
|
||||
@@ -2182,9 +2103,6 @@ BEGIN
|
||||
------------------------------------------------------
|
||||
-- Copy from buffered memory to pixel lines
|
||||
o_sh<='0';
|
||||
o_dcpt_clr <= '0';
|
||||
o_dcpt_inc <= '0';
|
||||
|
||||
CASE o_copy IS
|
||||
WHEN sWAIT =>
|
||||
o_copyv(0)<='0';
|
||||
@@ -2203,7 +2121,7 @@ BEGIN
|
||||
o_hacc <=o_hacc_ini;
|
||||
o_hacc_next<=o_hacc_ini + 2*o_ihsize;
|
||||
o_hacpt <=x"000";
|
||||
o_dcpt_clr <= '1';
|
||||
o_dcpt<=0;
|
||||
o_dshi<=2;
|
||||
o_acpt<=0;
|
||||
o_first<='1';
|
||||
@@ -2231,17 +2149,17 @@ BEGIN
|
||||
WHEN sCOPY =>
|
||||
-- dshi : Force shift first two or three pixels of each line
|
||||
IF o_dshi=0 THEN
|
||||
dif_v:=(o_hacc_next - 2*o_hsize + (8*OHRESH)) MOD (8*OHRESH);
|
||||
IF dif_v>=4*OHRESH THEN
|
||||
dif_v:=(o_hacc_next - 2*o_hsize + (8*OHRES)) MOD (8*OHRES);
|
||||
IF dif_v>=4*OHRES THEN
|
||||
o_hacc<=o_hacc_next;
|
||||
o_hacc_next<=o_hacc_next + 2*o_ihsize;
|
||||
hcarry_v:=false;
|
||||
ELSE
|
||||
o_hacc<=dif_v;
|
||||
o_hacc_next<=(dif_v + 2*o_ihsize + (4*OHRESH)) MOD (4*OHRESH);
|
||||
o_hacc_next<=(dif_v + 2*o_ihsize + (4*OHRES)) MOD (4*OHRES);
|
||||
hcarry_v:=true;
|
||||
END IF;
|
||||
o_dcpt_inc <= '1';
|
||||
o_dcpt<=(o_dcpt+1) MOD 4096;
|
||||
ELSE
|
||||
o_dshi<=o_dshi-1;
|
||||
hcarry_v:=false;
|
||||
@@ -2301,9 +2219,6 @@ BEGIN
|
||||
hpix_v:=(r=>o_fb_pal_dr(23 DOWNTO 16),g=>o_fb_pal_dr(15 DOWNTO 8),
|
||||
b=>o_fb_pal_dr(7 DOWNTO 0));
|
||||
END IF;
|
||||
IF (o_newres > 0) then
|
||||
hpix_v := (others => (others => '0'));
|
||||
END IF;
|
||||
o_hpix0<=hpix_v;
|
||||
o_hpix1<=o_hpix0;
|
||||
o_hpix2<=o_hpix1;
|
||||
@@ -2611,19 +2526,13 @@ BEGIN
|
||||
o_hfrac(2 TO 9) <= o_hfrac(1 TO 8);
|
||||
|
||||
o_copyv(1 TO 14)<=o_copyv(0 TO 13);
|
||||
o_dcptv_clr(1 TO 12)<=o_dcpt_clr & o_dcptv_clr(1 TO 11);
|
||||
o_dcptv_inc(1 TO 12)<=o_dcpt_inc & o_dcptv_inc(1 TO 11);
|
||||
|
||||
IF o_dcptv_clr(12)='1' THEN
|
||||
o_dcptv(13) <= 0;
|
||||
ELSIF o_dcptv_inc(12)='1' THEN
|
||||
o_dcptv(13) <= (o_dcptv(13) + 1) MOD OHRESH;
|
||||
END IF;
|
||||
o_dcptv(14)<=o_dcptv(13);
|
||||
|
||||
IF o_dcptv(13)>=o_hsize THEN
|
||||
o_copyv(14)<='0';
|
||||
o_dcptv(1)<=o_dcpt;
|
||||
IF o_dcptv(1)>=o_hsize THEN
|
||||
o_copyv(2)<='0';
|
||||
END IF;
|
||||
o_dcptv(2)<=o_dcptv(1) MOD OHRES;
|
||||
o_dcptv(3 TO 14)<=o_dcptv(2 TO 13);
|
||||
|
||||
-- C2
|
||||
o_hpixq(2)<=(o_hpix3,o_hpix2,o_hpix1,o_hpix0);
|
||||
@@ -2716,39 +2625,17 @@ BEGIN
|
||||
OLBUF:PROCESS(o_clk) IS
|
||||
BEGIN
|
||||
IF rising_edge(o_clk) THEN
|
||||
-----------------------------------------------
|
||||
-- WRITES
|
||||
IF o_wr(0)='1' AND o_wadl < OHRESL THEN o_line0(o_wadl MOD OHRESL)<=o_ldw; END IF;
|
||||
IF o_wr(1)='1' AND o_wadl < OHRESL THEN o_line1(o_wadl MOD OHRESL)<=o_ldw; END IF;
|
||||
IF o_wr(2)='1' AND o_wadl < OHRESL THEN o_line2(o_wadl MOD OHRESL)<=o_ldw; END IF;
|
||||
IF o_wr(3)='1' AND o_wadl < OHRESL THEN o_line3(o_wadl MOD OHRESL)<=o_ldw; END IF;
|
||||
IF OHRES = 2304 OR OHRES = 2560 THEN
|
||||
IF o_wr(0)='1' AND o_wadl >= OHRESL THEN o_linf0(o_wadl MOD OHRESM)<=o_ldw; END IF;
|
||||
IF o_wr(1)='1' AND o_wadl >= OHRESL THEN o_linf1(o_wadl MOD OHRESM)<=o_ldw; END IF;
|
||||
IF o_wr(2)='1' AND o_wadl >= OHRESL THEN o_linf2(o_wadl MOD OHRESM)<=o_ldw; END IF;
|
||||
IF o_wr(3)='1' AND o_wadl >= OHRESL THEN o_linf3(o_wadl MOD OHRESM)<=o_ldw; END IF;
|
||||
END IF;
|
||||
IF o_wr(0)='1' THEN o_line0(o_wadl)<=o_ldw; END IF;
|
||||
IF o_wr(1)='1' THEN o_line1(o_wadl)<=o_ldw; END IF;
|
||||
IF o_wr(2)='1' THEN o_line2(o_wadl)<=o_ldw; END IF;
|
||||
IF o_wr(3)='1' THEN o_line3(o_wadl)<=o_ldw; END IF;
|
||||
|
||||
-----------------------------------------------
|
||||
-- READS
|
||||
o_ldr0<=o_line0(o_radl0 MOD OHRESL);
|
||||
o_ldr1<=o_line1(o_radl1 MOD OHRESL);
|
||||
o_ldr2<=o_line2(o_radl2 MOD OHRESL);
|
||||
o_ldr3<=o_line3(o_radl3 MOD OHRESL);
|
||||
|
||||
IF OHRES = 2304 OR OHRES = 2560 THEN
|
||||
o_ler0<=o_linf0(o_radl0 MOD OHRESM);
|
||||
o_ler1<=o_linf1(o_radl1 MOD OHRESM);
|
||||
o_ler2<=o_linf2(o_radl2 MOD OHRESM);
|
||||
o_ler3<=o_linf3(o_radl3 MOD OHRESM);
|
||||
END IF;
|
||||
|
||||
o_lex0 <= to_std_logic(o_radl0 >= OHRESL);
|
||||
o_lex1 <= to_std_logic(o_radl1 >= OHRESL);
|
||||
o_lex2 <= to_std_logic(o_radl2 >= OHRESL);
|
||||
o_lex3 <= to_std_logic(o_radl3 >= OHRESL);
|
||||
-----------------------------------------------
|
||||
|
||||
o_ldr0<=o_line0(o_radl0);
|
||||
o_ldr1<=o_line1(o_radl1);
|
||||
o_ldr2<=o_line2(o_radl2);
|
||||
o_ldr3<=o_line3(o_radl3);
|
||||
END IF;
|
||||
END PROCESS OLBUF;
|
||||
|
||||
@@ -2834,17 +2721,16 @@ BEGIN
|
||||
VSCAL:PROCESS(o_clk) IS
|
||||
VARIABLE pixq_v : arr_pix(0 TO 3);
|
||||
VARIABLE vlumpix_v : type_pix;
|
||||
VARIABLE r1_v, r2_v : natural RANGE 0 TO OHRESH-1;
|
||||
VARIABLE r1_v, r2_v : natural RANGE 0 TO OHRES-1;
|
||||
VARIABLE fracnn_v : std_logic;
|
||||
VARIABLE o_l0_v, o_l1_v, o_l2_v, o_l3_v : type_pix;
|
||||
BEGIN
|
||||
IF rising_edge(o_clk) THEN
|
||||
IF o_ce='1' THEN
|
||||
o_v_hmin_adj<=o_hmin + 5;
|
||||
|
||||
fracnn_v := o_vfrac(o_vfrac'left);
|
||||
r1_v := (o_hcpt - o_v_hmin_adj + OHRESH) MOD OHRESH;
|
||||
r2_v := (o_hcpt - o_hmin + OHRESH) MOD OHRESH;
|
||||
r1_v := (o_hcpt - o_v_hmin_adj + OHRES) MOD OHRES;
|
||||
r2_v := (o_hcpt - o_hmin + OHRES) MOD OHRES;
|
||||
|
||||
-- CYCLE 1 -----------------------------------------
|
||||
-- Read mem
|
||||
@@ -2871,16 +2757,11 @@ BEGIN
|
||||
|
||||
-- CYCLE 2 -----------------------------------------
|
||||
-- Lines reordering
|
||||
IF o_lex0='0' THEN o_l0_v := o_ldr0; ELSE o_l0_v := o_ler0; END IF;
|
||||
IF o_lex1='0' THEN o_l1_v := o_ldr1; ELSE o_l1_v := o_ler1; END IF;
|
||||
IF o_lex2='0' THEN o_l2_v := o_ldr2; ELSE o_l2_v := o_ler2; END IF;
|
||||
IF o_lex3='0' THEN o_l3_v := o_ldr3; ELSE o_l3_v := o_ler3; END IF;
|
||||
|
||||
CASE o_vacptl IS
|
||||
WHEN "10" => pixq_v:=(o_l0_v,o_l1_v,o_l2_v,o_l3_v);
|
||||
WHEN "11" => pixq_v:=(o_l1_v,o_l2_v,o_l3_v,o_l0_v);
|
||||
WHEN "00" => pixq_v:=(o_l2_v,o_l3_v,o_l0_v,o_l1_v);
|
||||
WHEN OTHERS => pixq_v:=(o_l3_v,o_l0_v,o_l1_v,o_l2_v);
|
||||
WHEN "10" => pixq_v:=(o_ldr0,o_ldr1,o_ldr2,o_ldr3);
|
||||
WHEN "11" => pixq_v:=(o_ldr1,o_ldr2,o_ldr3,o_ldr0);
|
||||
WHEN "00" => pixq_v:=(o_ldr2,o_ldr3,o_ldr0,o_ldr1);
|
||||
WHEN OTHERS => pixq_v:=(o_ldr3,o_ldr0,o_ldr1,o_ldr2);
|
||||
END CASE;
|
||||
|
||||
IF fracnn_v = '0' THEN
|
||||
|
||||
+5
-11
@@ -27,7 +27,7 @@
|
||||
// VDNUM 1..10
|
||||
// BLKSZ 0..7: 0 = 128, 1 = 256, 2 = 512(default), .. 7 = 16384
|
||||
//
|
||||
module hps_io #(parameter CONF_STR, CONF_STR_BRAM=0, PS2DIV=0, WIDE=0, VDNUM=1, BLKSZ=2, PS2WE=0, STRLEN=$size(CONF_STR)>>3)
|
||||
module hps_io #(parameter CONF_STR, CONF_STR_BRAM=1, PS2DIV=0, WIDE=0, VDNUM=1, BLKSZ=2, PS2WE=0)
|
||||
(
|
||||
input clk_sys,
|
||||
inout [48:0] HPS_BUS,
|
||||
@@ -232,7 +232,8 @@ video_calc video_calc
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
localparam MAX_W = $clog2((64 > (STRLEN+2)) ? 64 : (STRLEN+2))-1;
|
||||
localparam STRLEN = $size(CONF_STR)>>3;
|
||||
localparam MAX_W = $clog2((32 > (STRLEN+2)) ? 32 : (STRLEN+2))-1;
|
||||
|
||||
wire [7:0] conf_byte;
|
||||
generate
|
||||
@@ -1031,15 +1032,8 @@ module confstr_rom #(parameter CONF_STR, STRLEN)
|
||||
output reg [7:0] conf_byte
|
||||
);
|
||||
|
||||
reg [7:0] rom[STRLEN];
|
||||
|
||||
initial begin
|
||||
if( CONF_STR=="" )
|
||||
$readmemh("cfgstr.hex",rom);
|
||||
else
|
||||
for(int i = 0; i < STRLEN; i++) rom[i] = CONF_STR[((STRLEN-i)*8)-1 -:8];
|
||||
end
|
||||
|
||||
wire [7:0] rom[STRLEN];
|
||||
initial for(int i = 0; i < STRLEN; i++) rom[i] = CONF_STR[((STRLEN-i)*8)-1 -:8];
|
||||
always @ (posedge clk_sys) conf_byte <= rom[conf_addr];
|
||||
|
||||
endmodule
|
||||
@@ -75,7 +75,7 @@ always @(posedge CLK) begin
|
||||
END <= 0;
|
||||
rd <= READ;
|
||||
len <= I2C_WLEN;
|
||||
if(READ) SD <= {2'b10, I2C_ADDR, 1'b1, 1'b1, 8'b11111111, 1'b1, 3'b011, 9'b111111111};
|
||||
if(READ) SD <= {2'b10, I2C_ADDR, 1'b1, 1'b1, 8'b11111111, 1'b0, 3'b011, 9'b111111111};
|
||||
else SD <= {2'b10, I2C_ADDR, 1'b0, 1'b1, I2C_WDATA1, 1'b1, I2C_WDATA2, 4'b1011};
|
||||
SD_COUNTER <= 0;
|
||||
end else begin
|
||||
|
||||
+5
-12
@@ -8,12 +8,10 @@ module mcp23009
|
||||
|
||||
output reg [2:0] btn,
|
||||
input [2:0] led,
|
||||
output reg flg_sd_cd,
|
||||
output reg flg_present,
|
||||
output reg flg_mode,
|
||||
output reg sd_cd,
|
||||
|
||||
output scl,
|
||||
inout sda
|
||||
output scl,
|
||||
inout sda
|
||||
);
|
||||
|
||||
|
||||
@@ -52,9 +50,7 @@ always@(posedge clk) begin
|
||||
idx <= 0;
|
||||
btn <= 0;
|
||||
rw <= 0;
|
||||
flg_sd_cd <= 1;
|
||||
flg_present <= 0;
|
||||
flg_mode <= 1;
|
||||
sd_cd <= 1;
|
||||
end
|
||||
else begin
|
||||
if(~&init_data[idx]) begin
|
||||
@@ -88,10 +84,7 @@ always@(posedge clk) begin
|
||||
state <= 0;
|
||||
rw <= 0;
|
||||
if(!error) begin
|
||||
if(rw) begin
|
||||
{flg_sd_cd, flg_mode, btn} <= {dout[7:3]};
|
||||
flg_present <= 1;
|
||||
end
|
||||
if(rw) {sd_cd, btn} <= {dout[7], dout[5:3]};
|
||||
rw <= ~rw;
|
||||
end
|
||||
end
|
||||
|
||||
+41
-2
@@ -1,5 +1,44 @@
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_TOOL_NAME "altera_pll_reconfig"
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_TOOL_VERSION "17.0"
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_TOOL_ENV "mwpim"
|
||||
set_global_assignment -library "pll_cfg" -name MISC_FILE [file join $::quartus(qip_path) "pll_cfg.cmp"]
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_TARGETED_DEVICE_FAMILY "Cyclone V"
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_GENERATED_DEVICE_FAMILY "{Cyclone V}"
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_QSYS_MODE "UNKNOWN"
|
||||
set_global_assignment -name SYNTHESIS_ONLY_QIP ON
|
||||
set_global_assignment -library "pll_cfg" -name VERILOG_FILE [file join $::quartus(qip_path) "pll_cfg/pll_cfg.v"]
|
||||
set_global_assignment -library "pll_cfg" -name VERILOG_FILE [file join $::quartus(qip_path) "pll_cfg/pll_cfg_hdmi.v"]
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_NAME "cGxsX2hkbWlfY2Zn"
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_DISPLAY_NAME "QWx0ZXJhIFBMTCBSZWNvbmZpZw=="
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_REPORT_HIERARCHY "Off"
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_INTERNAL "Off"
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_AUTHOR "QWx0ZXJhIENvcnBvcmF0aW9u"
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_VERSION "MTcuMA=="
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_DESCRIPTION "QWx0ZXJhIFBoYXNlLUxvY2tlZCBMb29wIFJlY29uZmlndXJhdGlvbiBCbG9jayhBTFRFUkFfUExMX1JFQ09ORklHKQ=="
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "RU5BQkxFX0JZVEVFTkFCTEU=::ZmFsc2U=::QWRkIGJ5dGVlbmFibGUgcG9ydA=="
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "QllURUVOQUJMRV9XSURUSA==::NA==::QllURUVOQUJMRV9XSURUSA=="
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "UkVDT05GSUdfQUREUl9XSURUSA==::Ng==::UkVDT05GSUdfQUREUl9XSURUSA=="
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "UkVDT05GSUdfREFUQV9XSURUSA==::MzI=::UkVDT05GSUdfREFUQV9XSURUSA=="
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "cmVjb25mX3dpZHRo::NjQ=::cmVjb25mX3dpZHRo"
|
||||
set_global_assignment -entity "pll_cfg" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "V0FJVF9GT1JfTE9DSw==::dHJ1ZQ==::V0FJVF9GT1JfTE9DSw=="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_NAME "YWx0ZXJhX3BsbF9yZWNvbmZpZ190b3A="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_DISPLAY_NAME "QWx0ZXJhIFBMTCBSZWNvbmZpZw=="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_REPORT_HIERARCHY "Off"
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_INTERNAL "Off"
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_AUTHOR "QWx0ZXJhIENvcnBvcmF0aW9u"
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_VERSION "MTcuMA=="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_DESCRIPTION "QWx0ZXJhIFBoYXNlLUxvY2tlZCBMb29wIFJlY29uZmlndXJhdGlvbiBCbG9jayhBTFRFUkFfUExMX1JFQ09ORklHKQ=="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "ZGV2aWNlX2ZhbWlseQ==::Q3ljbG9uZSBW::ZGV2aWNlX2ZhbWlseQ=="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "RU5BQkxFX01JRg==::ZmFsc2U=::RW5hYmxlIE1JRiBTdHJlYW1pbmc="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "RU5BQkxFX0JZVEVFTkFCTEU=::ZmFsc2U=::QWRkIGJ5dGVlbmFibGUgcG9ydA=="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "QllURUVOQUJMRV9XSURUSA==::NA==::QllURUVOQUJMRV9XSURUSA=="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "UkVDT05GSUdfQUREUl9XSURUSA==::Ng==::UkVDT05GSUdfQUREUl9XSURUSA=="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "UkVDT05GSUdfREFUQV9XSURUSA==::MzI=::UkVDT05GSUdfREFUQV9XSURUSA=="
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "cmVjb25mX3dpZHRo::NjQ=::cmVjb25mX3dpZHRo"
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_COMPONENT_PARAMETER "V0FJVF9GT1JfTE9DSw==::dHJ1ZQ==::V0FJVF9GT1JfTE9DSw=="
|
||||
|
||||
set_global_assignment -library "pll_cfg" -name VERILOG_FILE [file join $::quartus(qip_path) "pll_cfg.v"]
|
||||
set_global_assignment -library "pll_cfg" -name VERILOG_FILE [file join $::quartus(qip_path) "pll_cfg/altera_pll_reconfig_top.v"]
|
||||
set_global_assignment -library "pll_cfg" -name VERILOG_FILE [file join $::quartus(qip_path) "pll_cfg/altera_pll_reconfig_core.v"]
|
||||
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_TOOL_NAME "altera_pll_reconfig"
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_TOOL_VERSION "17.0"
|
||||
set_global_assignment -entity "altera_pll_reconfig_top" -library "pll_cfg" -name IP_TOOL_ENV "mwpim"
|
||||
@@ -16,7 +16,7 @@
|
||||
module altera_pll_reconfig_core
|
||||
#(
|
||||
parameter reconf_width = 64,
|
||||
parameter device_family = "Cyclone V",
|
||||
parameter device_family = "Stratix V",
|
||||
// MIF Streaming parameters
|
||||
parameter RECONFIG_ADDR_WIDTH = 6,
|
||||
parameter RECONFIG_DATA_WIDTH = 32,
|
||||
@@ -1883,7 +1883,7 @@ module fpll_dprio_init (
|
||||
endmodule
|
||||
module dyn_phase_shift
|
||||
#(
|
||||
parameter device_family = "Cyclone V"
|
||||
parameter device_family = "Stratix V"
|
||||
) (
|
||||
|
||||
input wire clk,
|
||||
@@ -2112,7 +2112,7 @@ endmodule
|
||||
module generic_lcell_comb
|
||||
#(
|
||||
//parameter
|
||||
parameter family = "Cyclone V",
|
||||
parameter family = "Stratix V",
|
||||
parameter lut_mask = 64'hAAAAAAAAAAAAAAAA,
|
||||
parameter dont_touch = "on"
|
||||
) (
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
module altera_pll_reconfig_top
|
||||
#(
|
||||
parameter reconf_width = 64,
|
||||
parameter device_family = "Cyclone V",
|
||||
parameter device_family = "Stratix V",
|
||||
parameter RECONFIG_ADDR_WIDTH = 6,
|
||||
parameter RECONFIG_DATA_WIDTH = 32,
|
||||
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
// megafunction wizard: %Altera PLL Reconfig v17.0%
|
||||
// GENERATION: XML
|
||||
// pll_cfg.v
|
||||
|
||||
// Generated using ACDS version 17.0 598
|
||||
|
||||
`timescale 1 ps / 1 ps
|
||||
module pll_cfg #(
|
||||
parameter ENABLE_BYTEENABLE = 0,
|
||||
parameter BYTEENABLE_WIDTH = 4,
|
||||
parameter RECONFIG_ADDR_WIDTH = 6,
|
||||
parameter RECONFIG_DATA_WIDTH = 32,
|
||||
parameter reconf_width = 64,
|
||||
parameter WAIT_FOR_LOCK = 1
|
||||
) (
|
||||
input wire mgmt_clk, // mgmt_clk.clk
|
||||
input wire mgmt_reset, // mgmt_reset.reset
|
||||
output wire mgmt_waitrequest, // mgmt_avalon_slave.waitrequest
|
||||
input wire mgmt_read, // .read
|
||||
input wire mgmt_write, // .write
|
||||
output wire [31:0] mgmt_readdata, // .readdata
|
||||
input wire [5:0] mgmt_address, // .address
|
||||
input wire [31:0] mgmt_writedata, // .writedata
|
||||
output wire [63:0] reconfig_to_pll, // reconfig_to_pll.reconfig_to_pll
|
||||
input wire [63:0] reconfig_from_pll // reconfig_from_pll.reconfig_from_pll
|
||||
);
|
||||
|
||||
altera_pll_reconfig_top #(
|
||||
.device_family ("Cyclone V"),
|
||||
.ENABLE_MIF (0),
|
||||
.MIF_FILE_NAME ("sys/pll_cfg.mif"),
|
||||
.ENABLE_BYTEENABLE (ENABLE_BYTEENABLE),
|
||||
.BYTEENABLE_WIDTH (BYTEENABLE_WIDTH),
|
||||
.RECONFIG_ADDR_WIDTH (RECONFIG_ADDR_WIDTH),
|
||||
.RECONFIG_DATA_WIDTH (RECONFIG_DATA_WIDTH),
|
||||
.reconf_width (reconf_width),
|
||||
.WAIT_FOR_LOCK (WAIT_FOR_LOCK)
|
||||
) pll_cfg_inst (
|
||||
.mgmt_clk (mgmt_clk), // mgmt_clk.clk
|
||||
.mgmt_reset (mgmt_reset), // mgmt_reset.reset
|
||||
.mgmt_waitrequest (mgmt_waitrequest), // mgmt_avalon_slave.waitrequest
|
||||
.mgmt_read (mgmt_read), // .read
|
||||
.mgmt_write (mgmt_write), // .write
|
||||
.mgmt_readdata (mgmt_readdata), // .readdata
|
||||
.mgmt_address (mgmt_address), // .address
|
||||
.mgmt_writedata (mgmt_writedata), // .writedata
|
||||
.reconfig_to_pll (reconfig_to_pll), // reconfig_to_pll.reconfig_to_pll
|
||||
.reconfig_from_pll (reconfig_from_pll), // reconfig_from_pll.reconfig_from_pll
|
||||
.mgmt_byteenable (4'b0000) // (terminated)
|
||||
);
|
||||
|
||||
endmodule
|
||||
// Retrieval info: <?xml version="1.0"?>
|
||||
//<!--
|
||||
// Generated by Altera MegaWizard Launcher Utility version 1.0
|
||||
// ************************************************************
|
||||
// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
// ************************************************************
|
||||
// Copyright (C) 1991-2018 Altera Corporation
|
||||
// Any megafunction design, and related net list (encrypted or decrypted),
|
||||
// support information, device programming or simulation file, and any other
|
||||
// associated documentation or information provided by Altera or a partner
|
||||
// under Altera's Megafunction Partnership Program may be used only to
|
||||
// program PLD devices (but not masked PLD devices) from Altera. Any other
|
||||
// use of such megafunction design, net list, support information, device
|
||||
// programming or simulation file, or any other related documentation or
|
||||
// information is prohibited for any other purpose, including, but not
|
||||
// limited to modification, reverse engineering, de-compiling, or use with
|
||||
// any other silicon devices, unless such use is explicitly licensed under
|
||||
// a separate agreement with Altera or a megafunction partner. Title to
|
||||
// the intellectual property, including patents, copyrights, trademarks,
|
||||
// trade secrets, or maskworks, embodied in any such megafunction design,
|
||||
// net list, support information, device programming or simulation file, or
|
||||
// any other related documentation or information provided by Altera or a
|
||||
// megafunction partner, remains with Altera, the megafunction partner, or
|
||||
// their respective licensors. No other licenses, including any licenses
|
||||
// needed under any third party's intellectual property, are provided herein.
|
||||
//-->
|
||||
// Retrieval info: <instance entity-name="altera_pll_reconfig" version="17.0" >
|
||||
// Retrieval info: <generic name="device_family" value="Cyclone V" />
|
||||
// Retrieval info: <generic name="ENABLE_MIF" value="false" />
|
||||
// Retrieval info: <generic name="MIF_FILE_NAME" value="sys/pll_cfg.mif" />
|
||||
// Retrieval info: <generic name="ENABLE_BYTEENABLE" value="false" />
|
||||
// Retrieval info: </instance>
|
||||
// IPFS_FILES : pll_cfg.vo
|
||||
// RELATED_FILES: pll_cfg.v, altera_pll_reconfig_top.v, altera_pll_reconfig_core.v, altera_std_synchronizer.v
|
||||
File diff suppressed because it is too large.
Load diff
+4
-1
@@ -1,4 +1,7 @@
|
||||
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll.13.qip ]
|
||||
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_hdmi.13.qip ]
|
||||
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_audio.13.qip ]
|
||||
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_cfg.qip ]
|
||||
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg.v ]
|
||||
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg/altera_pll_reconfig_core.v ]
|
||||
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg/altera_pll_reconfig_top.v ]
|
||||
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg_hdmi.v ]
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
set_global_assignment -name QIP_FILE rtl/pll.qip
|
||||
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_hdmi.qip ]
|
||||
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_audio.qip ]
|
||||
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_cfg.qip ]
|
||||
#set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_cfg.qip ]
|
||||
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg_hdmi.v ]
|
||||
+4
-4
@@ -58,10 +58,10 @@ localparam DW = WIDE ? 15 : 7;
|
||||
localparam SZ = OCTAL ? 8 : 1;
|
||||
localparam SW = SZ-1;
|
||||
|
||||
localparam DATA_TOKEN_CMD25 = 8'hfc;
|
||||
localparam STOP_TRAN = 8'hfd;
|
||||
localparam DATA_TOKEN = 8'hfe;
|
||||
localparam WRITE_DATA_RESPONSE = 8'he5;
|
||||
wire [7:0] DATA_TOKEN_CMD25 = 8'hfc;
|
||||
wire [7:0] STOP_TRAN = 8'hfd;
|
||||
wire [7:0] DATA_TOKEN = 8'hfe;
|
||||
wire [7:0] WRITE_DATA_RESPONSE = 8'h05;
|
||||
|
||||
// number of bytes to wait after a command before sending the reply
|
||||
localparam NCR = 5+3; // 5 bytes are required (command length)
|
||||
|
||||
+9
-2
@@ -16,6 +16,13 @@ set_location_assignment PIN_V10 -to ADC_SCK
|
||||
set_location_assignment PIN_AC4 -to ADC_SDI
|
||||
set_location_assignment PIN_AD4 -to ADC_SDO
|
||||
|
||||
#============================================================
|
||||
# ARDUINO
|
||||
#============================================================
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ARDUINO_IO[*]
|
||||
set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to ARDUINO_IO[*]
|
||||
set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to ARDUINO_IO[*]
|
||||
|
||||
#============================================================
|
||||
# I2C LEDS/BUTTONS
|
||||
#============================================================
|
||||
@@ -65,8 +72,8 @@ set_location_assignment PIN_AD17 -to SDRAM_A[11]
|
||||
set_location_assignment PIN_D12 -to SDRAM_A[12]
|
||||
set_location_assignment PIN_Y17 -to SDRAM_BA[0]
|
||||
set_location_assignment PIN_AB25 -to SDRAM_BA[1]
|
||||
set_location_assignment PIN_V12 -to SDRAM_DQ[0]
|
||||
set_location_assignment PIN_E8 -to SDRAM_DQ[1]
|
||||
set_location_assignment PIN_E8 -to SDRAM_DQ[0]
|
||||
set_location_assignment PIN_V12 -to SDRAM_DQ[1]
|
||||
set_location_assignment PIN_D11 -to SDRAM_DQ[2]
|
||||
set_location_assignment PIN_W12 -to SDRAM_DQ[3]
|
||||
set_location_assignment PIN_AH13 -to SDRAM_DQ[4]
|
||||
|
||||
+1
-5
@@ -25,7 +25,6 @@ set_false_path -from [get_ports {KEY*}]
|
||||
set_false_path -from [get_ports {BTN_*}]
|
||||
set_false_path -to [get_ports {LED_*}]
|
||||
set_false_path -to [get_ports {VGA_*}]
|
||||
set_false_path -from [get_ports {VGA_EN}]
|
||||
set_false_path -to [get_ports {AUDIO_SPDIF}]
|
||||
set_false_path -to [get_ports {AUDIO_L}]
|
||||
set_false_path -to [get_ports {AUDIO_R}]
|
||||
@@ -35,7 +34,6 @@ set_false_path -from {cfg[*]}
|
||||
set_false_path -from {VSET[*]}
|
||||
set_false_path -to {wcalc[*] hcalc[*]}
|
||||
set_false_path -to {hdmi_width[*] hdmi_height[*]}
|
||||
set_false_path -to {deb_* btn_en btn_up}
|
||||
|
||||
set_multicycle_path -to {*_osd|osd_vcnt*} -setup 2
|
||||
set_multicycle_path -to {*_osd|osd_vcnt*} -hold 1
|
||||
@@ -60,7 +58,6 @@ set_false_path -from {vol_att[*] scaler_flt[*] led_overtake[*] led_state[*]}
|
||||
set_false_path -from {aflt_* acx* acy* areset* arc*}
|
||||
set_false_path -from {arx* ary*}
|
||||
set_false_path -from {vs_line*}
|
||||
set_false_path -from {ColorBurst_Range* PhaseInc* pal_en cvbs yc_en}
|
||||
|
||||
set_false_path -from {ascal|o_ihsize*}
|
||||
set_false_path -from {ascal|o_ivsize*}
|
||||
@@ -73,5 +70,4 @@ set_false_path -from {ascal|o_htotal* ascal|o_vtotal*}
|
||||
set_false_path -from {ascal|o_hsstart* ascal|o_vsstart* ascal|o_hsend* ascal|o_vsend*}
|
||||
set_false_path -from {ascal|o_hsize* ascal|o_vsize*}
|
||||
|
||||
set_false_path -from {mcp23009|flg_*}
|
||||
set_false_path -to {sysmem|fpga_interfaces|clocks_resets|f2h*}
|
||||
set_false_path -from {mcp23009|sd_cd}
|
||||
+399
-494
File diff suppressed because it is too large.
Load diff
+3
-6
@@ -7,15 +7,13 @@ module vga_out
|
||||
input hsync,
|
||||
input vsync,
|
||||
input csync,
|
||||
input de,
|
||||
|
||||
input [23:0] din,
|
||||
output [23:0] dout,
|
||||
|
||||
output reg hsync_o,
|
||||
output reg vsync_o,
|
||||
output reg csync_o,
|
||||
output reg de_o
|
||||
output reg csync_o
|
||||
);
|
||||
|
||||
wire [7:0] red = din[23:16];
|
||||
@@ -37,8 +35,8 @@ always @(posedge clk) begin
|
||||
reg [18:0] y_1b, pb_1b, pr_1b;
|
||||
reg [18:0] y_2, pb_2, pr_2;
|
||||
reg [23:0] din1, din2;
|
||||
reg hsync2, vsync2, csync2, de2;
|
||||
reg hsync1, vsync1, csync1, de1;
|
||||
reg hsync2, vsync2, csync2;
|
||||
reg hsync1, vsync1, csync1;
|
||||
|
||||
y_1r <= {red, 6'd0} + {red, 3'd0} + {red, 2'd0} + red;
|
||||
pb_1r <= 19'd32768 - ({red, 5'd0} + {red, 3'd0} + {red, 1'd0});
|
||||
@@ -63,7 +61,6 @@ always @(posedge clk) begin
|
||||
hsync_o <= hsync2; hsync2 <= hsync1; hsync1 <= hsync;
|
||||
vsync_o <= vsync2; vsync2 <= vsync1; vsync1 <= vsync;
|
||||
csync_o <= csync2; csync2 <= csync1; csync1 <= csync;
|
||||
de_o <= de2; de2 <= de1; de1 <= de;
|
||||
|
||||
rgb <= din2; din2 <= din1; din1 <= din;
|
||||
end
|
||||
|
||||
+2
-11
@@ -26,10 +26,6 @@ module video_cleaner
|
||||
//optional de
|
||||
input DE_in,
|
||||
|
||||
//optional interlace support
|
||||
input interlace,
|
||||
input f1,
|
||||
|
||||
// video output signals
|
||||
output reg [7:0] VGA_R,
|
||||
output reg [7:0] VGA_G,
|
||||
@@ -60,19 +56,14 @@ always @(posedge clk_vid) begin
|
||||
HBlank_out <= hbl;
|
||||
|
||||
VGA_HS <= hs;
|
||||
if(~VGA_HS & hs) VGA_VS <= vs;
|
||||
|
||||
VGA_R <= R;
|
||||
VGA_G <= G;
|
||||
VGA_B <= B;
|
||||
DE_out <= DE_in;
|
||||
|
||||
if (interlace & f1) begin
|
||||
VGA_VS <= vs;
|
||||
VBlank_out <= vbl;
|
||||
end else begin
|
||||
if(~VGA_HS & hs) VGA_VS <= vs;
|
||||
if(HBlank_out & ~hbl) VBlank_out <= vbl;
|
||||
end
|
||||
if(HBlank_out & ~hbl) VBlank_out <= vbl;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+11
-22
@@ -170,8 +170,10 @@ reg [11:0] mul_arg1, mul_arg2;
|
||||
wire [23:0] mul_res;
|
||||
sys_umul #(12,12) mul(CLK_VIDEO,mul_start,mul_run, mul_arg1,mul_arg2,mul_res);
|
||||
|
||||
wire [11:0] wideres = mul_res[11:0] + hsize;
|
||||
|
||||
always @(posedge CLK_VIDEO) begin
|
||||
reg [11:0] oheight,htarget,wres,hinteger,wideres;
|
||||
reg [11:0] oheight,htarget,wres;
|
||||
reg [12:0] arxf,aryf;
|
||||
reg [3:0] cnt;
|
||||
reg narrow;
|
||||
@@ -262,8 +264,7 @@ always @(posedge CLK_VIDEO) begin
|
||||
// [3] 1080 / 512 * 512 * 4 / 3 / 512 * 512 -> 1024
|
||||
|
||||
7: if(mul_res <= HDMI_WIDTH) begin
|
||||
hinteger = mul_res[11:0];
|
||||
cnt <= 12;
|
||||
cnt <= 10;
|
||||
end
|
||||
|
||||
8: begin
|
||||
@@ -284,21 +285,9 @@ always @(posedge CLK_VIDEO) begin
|
||||
// [2] 1920 / 640 * 640 -> 1920
|
||||
// [3] 1920 / 512 * 512 -> 1536
|
||||
|
||||
10: begin
|
||||
hinteger <= mul_res[11:0];
|
||||
mul_arg1 <= vsize;
|
||||
mul_arg2 <= div_res[11:0] ? div_res[11:0] : 12'd1;
|
||||
mul_start <= 1;
|
||||
end
|
||||
|
||||
11: begin
|
||||
oheight <= mul_res[11:0];
|
||||
end
|
||||
|
||||
12: begin
|
||||
wideres <= hinteger + hsize;
|
||||
narrow <= ((htarget - hinteger) <= (wideres - htarget)) || (wideres > HDMI_WIDTH);
|
||||
wres <= hinteger == htarget ? hinteger : wideres;
|
||||
10: begin
|
||||
narrow <= ((htarget - mul_res[11:0]) <= (wideres - htarget)) || (wideres > HDMI_WIDTH);
|
||||
wres <= mul_res[11:0] == htarget ? mul_res[11:0] : wideres;
|
||||
end
|
||||
// [1] 1066 - 720 = 346 <= 1440 - 1066 = 374 || 1440 > 1920 -> true
|
||||
// [2] 1280 - 1280 = 0 <= 1920 - 1280 = 640 || 1920 > 1920 -> true
|
||||
@@ -310,11 +299,11 @@ always @(posedge CLK_VIDEO) begin
|
||||
// to target width, meaning it is not optimal for source aspect ratio.
|
||||
// otherwise it is set to narrow width that is optimal.
|
||||
|
||||
13: begin
|
||||
11: begin
|
||||
case(SCALE)
|
||||
2: arxf <= {1'b1, hinteger};
|
||||
3: arxf <= {1'b1, (wres > HDMI_WIDTH) ? hinteger : wres};
|
||||
4: arxf <= {1'b1, narrow ? hinteger : wres};
|
||||
2: arxf <= {1'b1, mul_res[11:0]};
|
||||
3: arxf <= {1'b1, (wres > HDMI_WIDTH) ? mul_res[11:0] : wres};
|
||||
4: arxf <= {1'b1, narrow ? mul_res[11:0] : wres};
|
||||
default: arxf <= {1'b1, div_num[11:0]};
|
||||
endcase
|
||||
aryf <= {1'b1, oheight};
|
||||
|
||||
+6
-9
@@ -36,15 +36,13 @@ module yc_out
|
||||
input hsync,
|
||||
input vsync,
|
||||
input csync,
|
||||
input de,
|
||||
|
||||
input [23:0] din,
|
||||
output [23:0] dout,
|
||||
|
||||
output reg hsync_o,
|
||||
output reg vsync_o,
|
||||
output reg csync_o,
|
||||
output reg de_o
|
||||
output reg csync_o
|
||||
);
|
||||
|
||||
wire [7:0] red = din[23:16];
|
||||
@@ -63,7 +61,6 @@ typedef struct {
|
||||
logic hsync;
|
||||
logic vsync;
|
||||
logic csync;
|
||||
logic de;
|
||||
} phase_t;
|
||||
|
||||
localparam MAX_PHASES = 7'd8;
|
||||
@@ -214,11 +211,11 @@ always_ff @(posedge clk) begin
|
||||
end
|
||||
|
||||
// Adjust sync timing correctly
|
||||
phase[1].hsync <= hsync; phase[1].vsync <= vsync; phase[1].csync <= csync; phase[1].de <= de;
|
||||
phase[2].hsync <= phase[1].hsync; phase[2].vsync <= phase[1].vsync; phase[2].csync <= phase[1].csync; phase[2].de <= phase[1].de;
|
||||
phase[3].hsync <= phase[2].hsync; phase[3].vsync <= phase[2].vsync; phase[3].csync <= phase[2].csync; phase[3].de <= phase[2].de;
|
||||
phase[4].hsync <= phase[3].hsync; phase[4].vsync <= phase[3].vsync; phase[4].csync <= phase[3].csync; phase[4].de <= phase[3].de;
|
||||
hsync_o <= phase[4].hsync; vsync_o <= phase[4].vsync; csync_o <= phase[4].csync; de_o <= phase[4].de;
|
||||
phase[1].hsync <= hsync; phase[1].vsync <= vsync; phase[1].csync <= csync;
|
||||
phase[2].hsync <= phase[1].hsync; phase[2].vsync <= phase[1].vsync; phase[2].csync <= phase[1].csync;
|
||||
phase[3].hsync <= phase[2].hsync; phase[3].vsync <= phase[2].vsync; phase[3].csync <= phase[2].csync;
|
||||
phase[4].hsync <= phase[3].hsync; phase[4].vsync <= phase[3].vsync; phase[4].csync <= phase[3].csync;
|
||||
hsync_o <= phase[4].hsync; vsync_o <= phase[4].vsync; csync_o <= phase[4].csync;
|
||||
|
||||
phase[1].y <= phase[0].y; phase[2].y <= phase[1].y; phase[3].y <= phase[2].y; phase[4].y <= phase[3].y; phase[5].y <= phase[4].y;
|
||||
|
||||
|
||||
Reference in new issue
Block a user