From 3fdad1ef617130baed76f00444ee873561b69840 Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Sat, 6 May 2023 17:58:16 +0200 Subject: [PATCH] CIC resistor pull changes --- fw/project/lcmxo2/sc64.lpf | 10 ++++++++-- fw/rtl/top.sv | 14 +++++++++++++- sw/controller/src/hw.c | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/fw/project/lcmxo2/sc64.lpf b/fw/project/lcmxo2/sc64.lpf index ac7502d..49d8d38 100644 --- a/fw/project/lcmxo2/sc64.lpf +++ b/fw/project/lcmxo2/sc64.lpf @@ -21,8 +21,10 @@ IOBUF PORT "inclk" PULLMODE=NONE IO_TYPE=LVCMOS33 ; IOBUF PORT "mcu_clk" PULLMODE=NONE IO_TYPE=LVCMOS33 ; IOBUF PORT "mcu_cs" PULLMODE=UP IO_TYPE=LVCMOS33 ; IOBUF PORT "mcu_int" PULLMODE=UP IO_TYPE=LVCMOS33 ; -IOBUF PORT "mcu_miso" IO_TYPE=LVCMOS33 PULLMODE=NONE ; -IOBUF PORT "mcu_mosi" IO_TYPE=LVCMOS33 PULLMODE=NONE ; +IOBUF PORT "mcu_miso" PULLMODE=NONE IO_TYPE=LVCMOS33 ; +IOBUF PORT "mcu_mosi" PULLMODE=NONE IO_TYPE=LVCMOS33 ; +IOBUF PORT "n64_cic_clk" PULLMODE=UP IO_TYPE=LVCMOS33 ; +IOBUF PORT "n64_cic_dq" PULLMODE=UP IO_TYPE=LVCMOS33 ; IOBUF PORT "n64_irq" PULLMODE=UP IO_TYPE=LVCMOS33 ; IOBUF PORT "n64_nmi" PULLMODE=DOWN IO_TYPE=LVCMOS33 ; IOBUF PORT "n64_pi_ad[0]" PULLMODE=NONE IO_TYPE=LVCMOS33 ; @@ -48,6 +50,7 @@ IOBUF PORT "n64_pi_write" PULLMODE=UP IO_TYPE=LVCMOS33 ; IOBUF PORT "n64_reset" PULLMODE=DOWN IO_TYPE=LVCMOS33 ; IOBUF PORT "n64_si_clk" PULLMODE=DOWN IO_TYPE=LVCMOS33 ; IOBUF PORT "n64_si_dq" PULLMODE=UP IO_TYPE=LVCMOS33 ; +IOBUF PORT "n64_video_sync" PULLMODE=NONE IO_TYPE=LVCMOS33 ; IOBUF PORT "sd_clk" PULLMODE=UP IO_TYPE=LVCMOS33 ; IOBUF PORT "sd_cmd" PULLMODE=UP IO_TYPE=LVCMOS33 ; IOBUF PORT "sd_dat[0]" PULLMODE=UP IO_TYPE=LVCMOS33 ; @@ -120,6 +123,8 @@ LOCATE COMP "mcu_miso" SITE "119" ; LOCATE COMP "mcu_mosi" SITE "120" ; LOCATE COMP "n64_irq" SITE "32" ; LOCATE COMP "n64_nmi" SITE "28" ; +LOCATE COMP "n64_cic_clk" SITE "34" ; +LOCATE COMP "n64_cic_dq" SITE "35" ; LOCATE COMP "n64_pi_ad[0]" SITE "60" ; LOCATE COMP "n64_pi_ad[1]" SITE "58" ; LOCATE COMP "n64_pi_ad[10]" SITE "42" ; @@ -143,6 +148,7 @@ LOCATE COMP "n64_pi_write" SITE "49" ; LOCATE COMP "n64_reset" SITE "31" ; LOCATE COMP "n64_si_clk" SITE "33" ; LOCATE COMP "n64_si_dq" SITE "27" ; +LOCATE COMP "n64_video_sync" SITE "26" ; LOCATE COMP "sd_clk" SITE "111" ; LOCATE COMP "sd_cmd" SITE "112" ; LOCATE COMP "sd_dat[0]" SITE "110" ; diff --git a/fw/rtl/top.sv b/fw/rtl/top.sv index 293dd9b..7cad9ad 100644 --- a/fw/rtl/top.sv +++ b/fw/rtl/top.sv @@ -45,7 +45,12 @@ module top ( input mcu_clk, input mcu_cs, input mcu_mosi, - output mcu_miso + output mcu_miso, + + // Unused I/O + output n64_cic_clk, + output n64_cic_dq, + output n64_video_sync ); logic clk; @@ -264,4 +269,11 @@ module top ( .vendor_scb(vendor_scb) ); + + // Unused I/O + + assign n64_cic_clk = 1'bZ; + assign n64_cic_dq = 1'bZ; + assign n64_video_sync = 1'bZ; + endmodule diff --git a/sw/controller/src/hw.c b/sw/controller/src/hw.c index fb6b189..25bdf37 100644 --- a/sw/controller/src/hw.c +++ b/sw/controller/src/hw.c @@ -508,7 +508,7 @@ static void hw_init_crc (void) { static void hw_init_misc (void) { hw_gpio_init(GPIO_ID_N64_RESET, GPIO_INPUT, GPIO_PP, GPIO_SPEED_VLOW, GPIO_PULL_DOWN, GPIO_AF_0, 0); - hw_gpio_init(GPIO_ID_N64_CIC_CLK, GPIO_INPUT, GPIO_PP, GPIO_SPEED_VLOW, GPIO_PULL_DOWN, GPIO_AF_0, 0); + hw_gpio_init(GPIO_ID_N64_CIC_CLK, GPIO_INPUT, GPIO_PP, GPIO_SPEED_VLOW, GPIO_PULL_UP, GPIO_AF_0, 0); hw_gpio_init(GPIO_ID_N64_CIC_DQ, GPIO_OUTPUT, GPIO_OD, GPIO_SPEED_VLOW, GPIO_PULL_UP, GPIO_AF_0, 1); hw_gpio_init(GPIO_ID_FPGA_INT, GPIO_INPUT, GPIO_PP, GPIO_SPEED_VLOW, GPIO_PULL_UP, GPIO_AF_0, 0); hw_gpio_init(GPIO_ID_RTC_MFP, GPIO_INPUT, GPIO_PP, GPIO_SPEED_VLOW, GPIO_PULL_UP, GPIO_AF_0, 0);