Skip to content

Commit 1227065

Browse files
committed
spi: pin definitions
1 parent 2d4f6b0 commit 1227065

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

nexysA7.xdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
``
22
## This file is a general .xdc for the Nexys A7-100T
33
## To use it in a project:
44
## - uncomment the lines corresponding to used pins
@@ -87,10 +87,10 @@ set_property -dict { PACKAGE_PIN M18 IOSTANDARD LVCMOS33 } [get_ports { reset
8787

8888
##Pmod Headers
8989
##Pmod Header JA
90-
set_property -dict { PACKAGE_PIN C17 IOSTANDARD LVCMOS33 } [get_ports { io_sck }]; #IO_L20N_T3_A19_15 Sch=ja[1]
90+
set_property -dict { PACKAGE_PIN C17 IOSTANDARD LVCMOS33 } [get_ports { io_ncs }]; #IO_L20N_T3_A19_15 Sch=ja[1]
9191
set_property -dict { PACKAGE_PIN D18 IOSTANDARD LVCMOS33 } [get_ports { io_mosi }]; #IO_L21N_T3_DQS_A18_15 Sch=ja[2]
9292
set_property -dict { PACKAGE_PIN E18 IOSTANDARD LVCMOS33 } [get_ports { io_miso }]; #IO_L21P_T3_DQS_15 Sch=ja[3]
93-
set_property -dict { PACKAGE_PIN G17 IOSTANDARD LVCMOS33 } [get_ports { io_ncs }]; #IO_L18N_T2_A23_15 Sch=ja[4]
93+
set_property -dict { PACKAGE_PIN G17 IOSTANDARD LVCMOS33 } [get_ports { io_sck }]; #IO_L18N_T2_A23_15 Sch=ja[4]
9494
#set_property -dict { PACKAGE_PIN C17 IOSTANDARD LVCMOS33 } [get_ports { JA[1] }]; #IO_L20N_T3_A19_15 Sch=ja[1]
9595
#set_property -dict { PACKAGE_PIN D18 IOSTANDARD LVCMOS33 } [get_ports { JA[2] }]; #IO_L21N_T3_DQS_A18_15 Sch=ja[2]
9696
#set_property -dict { PACKAGE_PIN E18 IOSTANDARD LVCMOS33 } [get_ports { JA[3] }]; #IO_L21P_T3_DQS_15 Sch=ja[3]

src/main/scala/spi/SpiMaster.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class SpiMaster extends Module {
2121
import State._
2222
val state = RegInit(idle)
2323

24-
val (x, y) = Counter(true.B, 10)
2524
val mosiReg = RegInit(0.U(8.W))
2625
val misoReg = RegInit(0.U(8.W))
2726
val bitsReg = RegInit(0.U(8.W))
@@ -30,7 +29,7 @@ class SpiMaster extends Module {
3029

3130

3231
spi.ncs := 1.U
33-
spi.sclk := x
32+
spi.sclk := 0.U
3433
spi.mosi := mosiReg(7)
3534
io.dataOut := misoReg
3635

0 commit comments

Comments
 (0)