Skip to content

Commit 2f8031c

Browse files
committed
Added panologic-g2 target.
1 parent 16dad7c commit 2f8031c

File tree

9 files changed

+406
-0
lines changed

9 files changed

+406
-0
lines changed

fpga/panologic_g2/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
project

fpga/panologic_g2/Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
###############################################################################
2+
## Makefile
3+
###############################################################################
4+
CPU ?= riscv
5+
XILINX_ISE ?= /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64
6+
CABLE ?= jtaghs2
7+
8+
# Choice: [rv32i, rv32i_spartan6, rv32im, rv32imsu]
9+
RISCV_CORE ?= rv32i_spartan6
10+
11+
PART_NAME = xc6slx150
12+
PART_PACKAGE = fgg484
13+
PART_SPEED = 2
14+
15+
SRC_DIR = .
16+
SRC_DIR += ../common
17+
SRC_DIR += ../../soc/core_soc/src_v
18+
SRC_DIR += ../../soc/dbg_bridge/src_v
19+
20+
CORES_README = ../../soc/core_soc/README.md
21+
22+
23+
# RISC-V
24+
ifeq ($(CPU),riscv)
25+
SRC_DIR += ../../cpu/riscv/core/$(RISCV_CORE)
26+
SRC_DIR += ../../cpu/riscv/top_tcm_wrapper
27+
EXTRA_VFLAGS += CPU_SELECT_RISCV=1
28+
else
29+
# Cortex M0
30+
SRC_DIR += ../../cpu/cortex_m0/src_v
31+
EXTRA_VFLAGS += CPU_SELECT_ARMV6M=1
32+
endif
33+
34+
.PHONY: init_and_build
35+
36+
init_and_build: ${CORES_README} all
37+
38+
include ../common/makefile.fpga_ise
39+
40+
load:
41+
xc3sprog -c ${CABLE} project/${PROJECT}_routed.bit
42+
43+
${CORES_README}:
44+
git submodule init
45+
git submodule update
46+

fpga/panologic_g2/README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
## Target: Second generation Panologic thin client
2+
3+
![](./assets/pano.png)
4+
5+
If you don't know what a Panologic thin client then see [this](https://hackaday.com/2013/01/11/ask-hackaday-we-might-have-some-fpgas-to-hack/)
6+
article and refer to the links at the bottom of this page for further reading.
7+
8+
### HW Requirements
9+
10+
* A Panologic G2 thin client (the one with a DVI port)
11+
* A suitable 5 volt power supply
12+
* A JTAG programmer to load the bitstream into the FPGA.
13+
14+
### Building from sources
15+
16+
**NB:** While it may be possible to use Windows for development I haven't
17+
tried it and don't recommend it.
18+
19+
1. Clone the https://github.com/skiphansen/fpga_test_soc repository
20+
2. cd into .../fpga_test_soc/fpga/panologic_g2
21+
3. If you have a **REV B** Pano with the larger FPGA then just run "make",
22+
otherwise if you have a **REV C** then run "make PART_NAME=xc6slx100".
23+
24+
### Serial port
25+
26+
We will use the DDC port on the micro HDMI port for our serial port. This
27+
will leave the DVI port available for a display if needed.
28+
29+
| HDMI Signal | Pin | Serial signal |
30+
| ----------- | ----- | ------------- |
31+
| DDC SCL | 15 | PC -> Pano |
32+
| DDC SDA | 16 | Pano -> PC |
33+
| Ground | 17 | Ground |
34+
35+
An 3.3 volt compatible serial port adapter and an homebrew adapter cable is
36+
required.
37+
38+
I use a FTDI [TTL-232R-3V3](https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/TTL-232R-3V3/768-1015-ND/1836393)
39+
with an adapter that I built from a micro HDMI to HDMI adapter cable.
40+
41+
![](./assets/micro_hdmi_adapter.png)
42+
43+
To build the adapter I cut the micro to mini adapter cable, stripped the wires,
44+
identified the correct wires and then soldered them to .1 inch pin header to
45+
mate with my serial adapter. While I was eventually able to get the cable to
46+
work I **DO NOT RECOMMEND** following my lead. The wires in the adapter cable
47+
are VERY tiny and were very difficult to work with.
48+
49+
If I were to do again I would use a micro HDMI to HDMI cable and a HDMI breakout
50+
board. This would be much easier to wire and would be more robust physically
51+
than the approach I took.
52+
53+
![](./assets/micro_hdmi_cable.png)
54+
55+
![](./assets/hdmi_adapter.png)
56+
57+
[Adafruit](https://www.adafruit.com/product/3121) has an inexpensive breakout
58+
board that looks like it would be perfect.
59+
60+
61+
### Status
62+
63+
The bit file build and the hello world program can be run, however the output
64+
doesn't match the expected output. I'm in the process of investigating the
65+
problem.
66+
67+
### Pano Links
68+
69+
- [Gitter](https://gitter.im/panologic/community) chat room for Panologic hackers.
70+
- Group.io [group](https://groups.io/g/panohackers/topics) for discussions about Panologic hacking
71+
- [Original Hackaday](https://hackaday.com/2013/01/11/ask-hackaday-we-might-have-some-fpgas-to-hack/) article from 2013.
72+
- Hackaday article on Tom's [Raytracker](https://hackaday.com/2018/12/07/racing-the-beam-on-a-thin-client-in-fpgas/).
73+
- Hackaday article on my [Pacman](https://hackaday.com/2019/01/11/pac-man-fever-comes-to-the-pano-logic-fpga/) project.
74+
- Hackaday article on Tom's [Joystick adapter](https://hackaday.com/2019/02/11/two-joysticks-talk-to-fpga-arcade-game-over-a-vga-cable/).
75+
- Wenting Zhang's [VerilogBoy](https://github.com/zephray/VerilogBoy) project.
76+
- Hackaday article on My [pano_progfpga](https://hackaday.com/2019/04/19/pano-logic-fgpa-hacking-just-got-easier/) project
77+
- My [prog_fpga](https://github.com/skiphansen/pano_progfpga) project.
78+
- My [pacman](https://github.com/skiphansen/pano_man) project.
79+
- My [Hello World](https://github.com/skiphansen/pano_hello_g1) project.
80+
- My [USB sniffer](https://github.com/skiphansen/usb_sniffer/blob/master/fpga/panologic_g2/README.md) project.
81+
- https://github.com/tomverbeure/panologic
82+
- G1 [Schematics!](https://github.com/twj42/PanoLogicG2_ReverseEngineering/blob/master/files/G1_Schematics.zip)
83+
- https://github.com/tomverbeure/panologic-g2
84+
- https://twj42.github.io/PanoLogicG2_ReverseEngineering/
85+
98.8 KB
Loading
126 KB
Loading
37.7 KB
Loading

fpga/panologic_g2/assets/pano.png

240 KB
Loading

fpga/panologic_g2/fpga.ucf

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Clocks
2+
NET "SYSCLK" PERIOD = 125 MHz HIGH 50% | LOC = "Y13";
3+
4+
# Flash
5+
NET "flash_cs_o" LOC="T5" | IOSTANDARD=LVCMOS33;
6+
NET "flash_sck_o" LOC="Y21" | IOSTANDARD=LVCMOS33;
7+
NET "flash_si_o" LOC="AB20" | IOSTANDARD=LVCMOS33;
8+
NET "flash_so_i" LOC="AA20" | IOSTANDARD=LVCMOS33;
9+
10+
# serial cable connected to mini HDMI DDC signals
11+
NET "uart_txd_i" LOC="AA21" | IOSTANDARD=LVTTL; # AKA DDC2_SCK
12+
NET "uart_rxd_o" LOC="AB19" | IOSTANDARD=LVTTL; # AKA DDC2_SDA
13+
14+
############################################################################
15+
# ULPI Interface
16+
############################################################################
17+
# ignore relative timing between the 60MHz USB reference clock and the processing clock CLK_P
18+
#NET "u_pll/CLKOUT0" TNM_NET = TNM_NET_USB_CLK60G;
19+
#NET "USB_CLK60G" TNM_NET = "TNM_NET_USB_CLK60G"; # all synchronous elements after BUFG
20+
#TIMESPEC "TS_USB_CLK60G" = PERIOD "TNM_NET_USB_CLK60G" 16.666 ns HIGH 50%;
21+
22+
#NET "USB_ULPI_DATA<0>" LOC = "A7" ;
23+
#NET "USB_ULPI_DATA<1>" LOC = "B8" ;
24+
#NET "USB_ULPI_DATA<2>" LOC = "A8" ;
25+
#NET "USB_ULPI_DATA<3>" LOC = "D6" ;
26+
#NET "USB_ULPI_DATA<4>" LOC = "C6" ;
27+
#NET "USB_ULPI_DATA<5>" LOC = "B6" ;
28+
#NET "USB_ULPI_DATA<6>" LOC = "A6" ;
29+
#NET "USB_ULPI_DATA<7>" LOC = "A4" ;
30+
#NET "USB_ULPI_STP" LOC = "A5" ;
31+
#NET "USB_ULPI_NXT" LOC = "C5" ;
32+
#NET "USB_ULPI_DIR" LOC = "C7" ;
33+
#NET "USB_CLK60" LOC = "C12" ;
34+
35+
#INST "USB_ULPI_DATA<0>" TNM = USB_ULPI_OUT;
36+
#INST "USB_ULPI_DATA<1>" TNM = USB_ULPI_OUT;
37+
#INST "USB_ULPI_DATA<2>" TNM = USB_ULPI_OUT;
38+
#INST "USB_ULPI_DATA<3>" TNM = USB_ULPI_OUT;
39+
#INST "USB_ULPI_DATA<4>" TNM = USB_ULPI_OUT;
40+
#INST "USB_ULPI_DATA<5>" TNM = USB_ULPI_OUT;
41+
#INST "USB_ULPI_DATA<6>" TNM = USB_ULPI_OUT;
42+
#INST "USB_ULPI_DATA<7>" TNM = USB_ULPI_OUT;
43+
#INST "USB_ULPI_STP" TNM = USB_ULPI_OUT;
44+
#TIMEGRP "USB_ULPI_OUT" OFFSET = OUT 8.5 ns AFTER USB_CLK60;
45+
#INST "USB_ULPI_DATA<0>" TNM = USB_ULPI_IN;
46+
#INST "USB_ULPI_DATA<1>" TNM = USB_ULPI_IN;
47+
#INST "USB_ULPI_DATA<2>" TNM = USB_ULPI_IN;
48+
#INST "USB_ULPI_DATA<3>" TNM = USB_ULPI_IN;
49+
#INST "USB_ULPI_DATA<4>" TNM = USB_ULPI_IN;
50+
#INST "USB_ULPI_DATA<5>" TNM = USB_ULPI_IN;
51+
#INST "USB_ULPI_DATA<6>" TNM = USB_ULPI_IN;
52+
#INST "USB_ULPI_DATA<7>" TNM = USB_ULPI_IN;
53+
#INST "USB_ULPI_NXT" TNM = USB_ULPI_IN;
54+
#INST "USB_ULPI_DIR" TNM = USB_ULPI_IN;
55+
#TIMEGRP "USB_ULPI_IN" OFFSET = IN 13.666 ns BEFORE USB_CLK60; #3ns at ULPI PHY output, period 16.6ns
56+
57+
#NET "USB_ULPI_DATA<*>" IOSTANDARD = LVCMOS33;
58+
#NET "USB_ULPI_STP" IOSTANDARD = LVCMOS33;
59+
#NET "USB_ULPI_NXT" IOSTANDARD = LVCMOS33;
60+
#NET "USB_ULPI_DIR" IOSTANDARD = LVCMOS33;
61+
#NET "USB_CLK60" IOSTANDARD = LVCMOS33;
62+
63+
# 24 Mhz USB3300 clock
64+
#NET "usb_clk" LOC = W12 | IOSTANDARD = LVCMOS33;
65+
66+
# Ethernet PHY
67+
NET "GMII_RST_N" LOC = R11 | IOSTANDARD = LVCMOS33;
68+
69+
#NET "led_red" LOC = E12 | IOSTANDARD = LVCMOS33;
70+
NET "led_blue" LOC = H13 | IOSTANDARD = LVCMOS33;
71+
#NET "led_green" LOC = F13 | IOSTANDARD = LVCMOS33;
72+

0 commit comments

Comments
 (0)