platforms/sipeed_tang_primer_20k: Update hdmi pins to official dock version and fix compilation.

Test:
./sipeed_tang_primer_20k.py --cpu-type=serv --with-video-terminal --build --load

Working.
This commit is contained in:
Florent Kermarrec 2023-03-02 11:36:38 +01:00
parent 47659835b0
commit 9e73ba53ea
2 changed files with 15 additions and 16 deletions

View File

@ -135,10 +135,10 @@ _connectors = [
_dock_io = [ _dock_io = [
# Leds # Leds
("led", 0, Pins( "CARD1:44"), IOStandard("LVCMOS33")), ("led", 0, Pins( "CARD1:44"), IOStandard("LVCMOS18")),
("led", 1, Pins( "CARD1:46"), IOStandard("LVCMOS33")), ("led", 1, Pins( "CARD1:46"), IOStandard("LVCMOS18")),
("led", 3, Pins( "CARD1:40"), IOStandard("LVCMOS33")), ("led", 3, Pins( "CARD1:40"), IOStandard("LVCMOS18")),
("led", 2, Pins( "CARD1:42"), IOStandard("LVCMOS33")), ("led", 2, Pins( "CARD1:42"), IOStandard("LVCMOS18")),
("led", 4, Pins( "CARD1:98"), IOStandard("LVCMOS33")), ("led", 4, Pins( "CARD1:98"), IOStandard("LVCMOS33")),
("led", 5, Pins("CARD1:136"), IOStandard("LVCMOS33")), ("led", 5, Pins("CARD1:136"), IOStandard("LVCMOS33")),
@ -154,14 +154,14 @@ _dock_io = [
# HDMI. # HDMI.
("hdmi", 0, ("hdmi", 0,
Subsignal("clk_p", Pins("CARD1:132")), Subsignal("clk_p", Pins("CARD1:68")),
Subsignal("clk_n", Pins("CARD1:130")), Subsignal("clk_n", Pins("CARD1:70")),
Subsignal("data0_p", Pins("CARD1:50")), # Inverted. Subsignal("data0_p", Pins("CARD1:64")),
Subsignal("data0_n", Pins("CARD1:52")), Subsignal("data0_n", Pins("CARD1:62")),
Subsignal("data1_p", Pins("CARD1:62")), # Inverted. Subsignal("data1_p", Pins("CARD1:58")),
Subsignal("data1_n", Pins("CARD1:64")), Subsignal("data1_n", Pins("CARD1:56")),
Subsignal("data2_p", Pins("CARD1:68")), # Inverted. Subsignal("data2_p", Pins("CARD1:52")),
Subsignal("data2_n", Pins("CARD1:70")), Subsignal("data2_n", Pins("CARD1:50")),
Subsignal("hdp", Pins("CARD1:154"), IOStandard("LVCMOS18")), Subsignal("hdp", Pins("CARD1:154"), IOStandard("LVCMOS18")),
Subsignal("cec", Pins("CARD1:152"), IOStandard("LVCMOS18")), Subsignal("cec", Pins("CARD1:152"), IOStandard("LVCMOS18")),
Subsignal("sda", Pins("CARD1:95"), IOStandard("LVCMOS18")), Subsignal("sda", Pins("CARD1:95"), IOStandard("LVCMOS18")),

View File

@ -122,7 +122,7 @@ class BaseSoC(SoCCore):
SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on Tang Primer 20K", **kwargs) SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on Tang Primer 20K", **kwargs)
# DDR3 SDRAM ------------------------------------------------------------------------------- # DDR3 SDRAM -------------------------------------------------------------------------------
# FIXME: WIP. # FIXME: WIP / Untested.
if not self.integrated_main_ram_size: if not self.integrated_main_ram_size:
self.ddrphy = GW2DDRPHY( self.ddrphy = GW2DDRPHY(
pads = PHYPadsReducer(platform.request("ddram"), [0, 1]), pads = PHYPadsReducer(platform.request("ddram"), [0, 1]),
@ -176,12 +176,11 @@ class BaseSoC(SoCCore):
# Video ------------------------------------------------------------------------------------ # Video ------------------------------------------------------------------------------------
if with_video_terminal: if with_video_terminal:
# FIXME: Un-tested.
hdmi_pads = platform.request("hdmi") hdmi_pads = platform.request("hdmi")
self.comb += hdmi_pads.hdp.eq(1) self.comb += hdmi_pads.hdp.eq(1)
self.videophy = VideoHDMIPHY(hdmi_pads, clock_domain="hdmi", pn_swap=["r", "g", "b"]) self.videophy = VideoHDMIPHY(hdmi_pads, clock_domain="hdmi", pn_swap=["r", "g", "b"])
self.add_video_colorbars(phy=self.videophy, timings="640x480@60Hz", clock_domain="hdmi") #self.add_video_colorbars(phy=self.videophy, timings="640x480@60Hz", clock_domain="hdmi")
#self.add_video_terminal(phy=self.videophy, timings="640x480@75Hz", clock_domain="hdmi") self.add_video_terminal(phy=self.videophy, timings="640x480@75Hz", clock_domain="hdmi")
# Leds ------------------------------------------------------------------------------------- # Leds -------------------------------------------------------------------------------------
if with_led_chaser: if with_led_chaser: