-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
6,229 additions
and
2,204 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ simulation/sim/** | |
simulation/transcript | ||
!impl/pnr/device.cfg | ||
*.user | ||
impl/pnr/device.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# VIC20Nano on Tang Mega 60K NEO | ||
|
||
VIC20Nano can be used in the [Tang Mega 60K NEO](https://wiki.sipeed.com/hardware/en/tang/tang-mega-60k/mega-60k.html). | ||
|
||
Besides the significantly bigger FPGA over the Tang Nano 20K, the Tang Mega 60K adds several more features of | ||
which some can be used in the area of retro computing as well. | ||
|
||
Although the Tang Mega 60K comes with a significant ammount of | ||
DDR3-SDRAM, it also comes with a slot for the [Tang | ||
SDRAM](https://wiki.sipeed.com/hardware/en/tang/tang-PMOD/FPGA_PMOD.html#TANG_SDRAM). Using this board allows to use the same SDR-SDRAM memory access methods.<br> | ||
|
||
The M0S required to control the VIC20Nano is to be mounted in the | ||
**right PMOD** close to the HDMI connector with the help of the [M0S PMOD adapter](board/m0s_pmod). | ||
|
||
Plug the optional Dualshock [DS2x2](https://wiki.sipeed.com/hardware/en/tang/tang-PMOD/FPGA_PMOD.html#PMOD_DS2x2) Interface into the **edge PMOD** slot.<br> | ||
|
||
The **SDRAM 1** slot is allocated for a digital retro Joystick interface. | ||
A 40 pole 2.54mm pinheader need to be soldered into the Meag 60k NEO. | ||
An 40 pole receptable to be used connecting the 7 signals to the D9 connector. | ||
> [!WARNING] | ||
> Joystick interface is 3.3V tolerant and therefore the Joystick 5V supply pin has to be left floating when no level shifters are in use!<br> | ||
|Bus|Signal | D9 |40-pol| Name |FPGA pin | | ||
| - |------ |------| ---- |----------| ------- | | ||
| 0 | Button 0 | 6 | 36 |SDRAM1_A10| U17 | | ||
| 1 | Down | 2 | 35 |SDRAM1_BA1| U18 | | ||
| 2 | Up | 1 | 10 |SDRAM1_D14| V17 | | ||
| 3 | Right | 4 | 9 |SDRAM1_D15| W17 | | ||
| 4 | Left | 3 | 32 |SDRAM1_RAS| Y18 | | ||
| 5 |Button 1 X| 9 | 31 |SDRAM1_CAS| Y19 | | ||
| - |POT Y | 5 | - | | n.c. | | ||
| - | GND | - | 12 |GND | GND | | ||
| - | +5V |!!! n.c.|11 | | n.c. | | ||
|
||
The whole setup will look like this: | ||
|
||
![MiSTeryNano on TM60K NEO](./.assets/mega60k.png) | ||
|
||
The firmware for the M0S Dock is the [same version as for the Tang | ||
Nano 20K](firmware/misterynano_fw/). | ||
|
||
On the software side the setup is very simuilar to the original Tang Nano 20K based solution. The core needs to be built specifically | ||
for the different FPGA of the Tang Primer using either the [TCL script with the GoWin command line interface](build_tm60k.tcl) or the | ||
[project file for the graphical GoWin IDE](vic20nano_tm60k.gprj). The resulting bitstream is flashed to the TM60K as usual needing latest Gowin Programmer GUI 1.9.10.03 or newer. | ||
|
||
|
||
**HW modification** | ||
[Tang SDRAM Module](https://wiki.sipeed.com/hardware/en/tang/tang-PMOD/FPGA_PMOD.html#TANG_SDRAM) V1.2 modification to fit on the TM60k NEO dock.<br> | ||
The capacitors are a bit too lange and touching the 60k FPGA plug-module. | ||
Use duct tape to cover the capacitors avoiding shortcuts or unsolder three that are blocking. | ||
There is a also newer Version 1.3 of the TANG_SDRAM available (90° angle) that likely fit. | ||
![parts](./.assets/sdram_mod.png) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
rm -f impl/pnr/*.fs | ||
|
||
grc --config=gw_sh.grc gw_sh ./build_tm138k.tcl | ||
grc --config=gw_sh.grc gw_sh ./build_tm60k.tcl | ||
grc --config=gw_sh.grc gw_sh ./build_tp25k.tcl | ||
grc --config=gw_sh.grc gw_sh ./build_tn20k.tcl | ||
grc --config=gw_sh.grc gw_sh ./build_tp20k.tcl | ||
grc --config=gw_sh.grc gw_sh ./build_tn9k.tcl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
set_device GW5AT-LV60PG484AC1/I0 -device_version B | ||
|
||
add_file src/c1541/mist_sd_card.sv | ||
add_file src/dualshock2.v | ||
add_file src/gowin_dpb/gowin_dpb_track_buffer_b.v | ||
add_file src/gowin_dpb/gowin_dpb_trkbuf.v | ||
add_file src/gowin_dpb/sector_dpram.v | ||
add_file src/hdmi/audio_clock_regeneration_packet.sv | ||
add_file src/hdmi/audio_info_frame.sv | ||
add_file src/hdmi/audio_sample_packet.sv | ||
add_file src/hdmi/auxiliary_video_information_info_frame.sv | ||
add_file src/hdmi/hdmi.sv | ||
add_file src/hdmi/packet_assembler.sv | ||
add_file src/hdmi/packet_picker.sv | ||
add_file src/hdmi/serializer.sv | ||
add_file src/hdmi/source_product_description_info_frame.sv | ||
add_file src/hdmi/tmds_channel.sv | ||
add_file src/misc/flash_dspi.v | ||
add_file src/misc/hid.v | ||
add_file src/misc/mcu_spi.v | ||
add_file src/misc/osd_u8g2.v | ||
add_file src/misc/scandoubler.v | ||
add_file src/misc/sd_card.v | ||
add_file src/misc/sd_rw.v | ||
add_file src/misc/sdcmd_ctrl.v | ||
add_file src/misc/sysctrl.v | ||
add_file src/misc/video.v | ||
add_file src/misc/video_analyzer.v | ||
add_file src/misc/ws2812.v | ||
add_file src/sdram.v | ||
add_file src/c1541/c1541_logic.vhd | ||
add_file src/c1541/c1541_sd.vhd | ||
add_file src/c1541/gcr_floppy.vhd | ||
add_file src/c1541/via6522.vhd | ||
add_file src/gowin_dpb/gowin_dpb_1k.vhd | ||
add_file src/gowin_dpb/gowin_dpb_1k_x4.vhd | ||
add_file src/gowin_dpb/gowin_dpb_2k.vhd | ||
add_file src/gowin_dpb/gowin_dpb_8k.vhd | ||
add_file src/gowin_prom/gowin_prom_basic.vhd | ||
add_file src/gowin_prom/gowin_prom_char.vhd | ||
add_file src/gowin_sdpb/gowin_sdpb_kernal_8k_gw5a.vhd | ||
add_file src/gowin_sp/gowin_sp_2k.vhd | ||
add_file src/gowin_sp/gowin_sp_8k.vhd | ||
add_file src/m6522.vhd | ||
add_file src/m6561.vhd | ||
add_file src/ram_conf_1024x4.vhd | ||
add_file src/ram_conf_1024x8.vhd | ||
add_file src/ram_conf_2048x8.vhd | ||
add_file src/ram_conf_8192x8.vhd | ||
add_file src/t65/T65.vhd | ||
add_file src/t65/T65_ALU.vhd | ||
add_file src/t65/T65_MCode.vhd | ||
add_file src/t65/T65_Pack.vhd | ||
add_file src/vic20_tp25k.vhd | ||
add_file src/vic20_clocks.vhd | ||
add_file src/vic20_keyboard.vhd | ||
add_file src/gowin_pll/gowin_pll_60k_flash.vhd | ||
add_file src/gowin_pll/gowin_pll_60k_ntsc.vhd | ||
add_file src/gowin_pll/gowin_pll_60k_pal.vhd | ||
add_file src/tang/mega60k/vic20nano_top_tm60k.vhd | ||
add_file src/tang/mega60k/vic20nano_top_tm60k.cst | ||
add_file src/tang/mega60k/vic20nano_top_tm60k.sdc | ||
add_file src/loader_sd_card.sv | ||
add_file src/c1530.vhd | ||
add_file src/fifo_sc_hs/FIFO_SC_HS_Top_gw5a.vhd | ||
add_file src/core_timer.vhd | ||
add_file src/megacart.v | ||
|
||
set_option -synthesis_tool gowinsynthesis | ||
set_option -output_base_name vic20nano_tm60k | ||
set_option -verilog_std sysv2017 | ||
set_option -vhdl_std vhd2008 | ||
set_option -top_module VIC20_TOP_tm60k | ||
set_option -use_mspi_as_gpio 1 | ||
set_option -use_sspi_as_gpio 1 | ||
set_option -use_done_as_gpio 1 | ||
set_option -use_cpu_as_gpio 1 | ||
set_option -use_ready_as_gpio 1 | ||
set_option -use_sspi_as_gpio 1 | ||
set_option -use_i2c_as_gpio 1 | ||
set_option -rw_check_on_ram 0 | ||
set_option -user_code 00000001 | ||
set_option -bit_compress 1 | ||
set_option -vccx 1.8 | ||
set_option -vcc 0.9 | ||
|
||
#run syn | ||
run all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.