Skip to content

Commit

Permalink
spi: pin definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
schoeberl committed Nov 12, 2024
1 parent 2d4f6b0 commit 1227065
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions nexysA7.xdc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

``
## This file is a general .xdc for the Nexys A7-100T
## To use it in a project:
## - uncomment the lines corresponding to used pins
Expand Down Expand Up @@ -87,10 +87,10 @@ set_property -dict { PACKAGE_PIN M18 IOSTANDARD LVCMOS33 } [get_ports { reset

##Pmod Headers
##Pmod Header JA
set_property -dict { PACKAGE_PIN C17 IOSTANDARD LVCMOS33 } [get_ports { io_sck }]; #IO_L20N_T3_A19_15 Sch=ja[1]
set_property -dict { PACKAGE_PIN C17 IOSTANDARD LVCMOS33 } [get_ports { io_ncs }]; #IO_L20N_T3_A19_15 Sch=ja[1]
set_property -dict { PACKAGE_PIN D18 IOSTANDARD LVCMOS33 } [get_ports { io_mosi }]; #IO_L21N_T3_DQS_A18_15 Sch=ja[2]
set_property -dict { PACKAGE_PIN E18 IOSTANDARD LVCMOS33 } [get_ports { io_miso }]; #IO_L21P_T3_DQS_15 Sch=ja[3]
set_property -dict { PACKAGE_PIN G17 IOSTANDARD LVCMOS33 } [get_ports { io_ncs }]; #IO_L18N_T2_A23_15 Sch=ja[4]
set_property -dict { PACKAGE_PIN G17 IOSTANDARD LVCMOS33 } [get_ports { io_sck }]; #IO_L18N_T2_A23_15 Sch=ja[4]
#set_property -dict { PACKAGE_PIN C17 IOSTANDARD LVCMOS33 } [get_ports { JA[1] }]; #IO_L20N_T3_A19_15 Sch=ja[1]
#set_property -dict { PACKAGE_PIN D18 IOSTANDARD LVCMOS33 } [get_ports { JA[2] }]; #IO_L21N_T3_DQS_A18_15 Sch=ja[2]
#set_property -dict { PACKAGE_PIN E18 IOSTANDARD LVCMOS33 } [get_ports { JA[3] }]; #IO_L21P_T3_DQS_15 Sch=ja[3]
Expand Down
3 changes: 1 addition & 2 deletions src/main/scala/spi/SpiMaster.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class SpiMaster extends Module {
import State._
val state = RegInit(idle)

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


spi.ncs := 1.U
spi.sclk := x
spi.sclk := 0.U
spi.mosi := mosiReg(7)
io.dataOut := misoReg

Expand Down

0 comments on commit 1227065

Please sign in to comment.