Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
35e62f6
Create work_plan.txt
Oct 23, 2017
9d471ee
Added gitignore
Joboman555 Oct 24, 2017
997f47c
add positive edge and negative edge detection
Joboman555 Oct 24, 2017
a46155e
idk
Oct 24, 2017
b82e205
Merge branch 'master' of github.com:davpapp/Lab2
Joboman555 Oct 24, 2017
17aeae5
Made stuff work
Joboman555 Oct 24, 2017
de4fdd3
i
Oct 24, 2017
cb86717
d'
Oct 24, 2017
12636ca
unmess up stuff
Joboman555 Oct 24, 2017
24667e8
understand behavior
Joboman555 Oct 25, 2017
85c5d6a
split up debouncer into seperate module
Joboman555 Oct 25, 2017
e882409
refactor debouncer
Joboman555 Oct 25, 2017
c3a6154
added posedge and negedge but theyre delayed
Oct 25, 2017
1cbfd7f
working
Oct 25, 2017
9730f81
remove comments
Oct 25, 2017
feebecb
Add parallel tests
Joboman555 Oct 25, 2017
e82ace4
Add parallel tests
Joboman555 Oct 25, 2017
a8494e8
serial tests
Oct 25, 2017
fa86896
not working
Oct 25, 2017
76a70f9
Merge branch 'master' of github.com:davpapp/Lab2
Joboman555 Oct 25, 2017
0365a9d
saving
Oct 25, 2017
07738ff
Merge branch 'master' of github.com:davpapp/Lab2
Joboman555 Oct 25, 2017
1a16be1
shifter working
Oct 26, 2017
707a14e
Merge branch 'master' of github.com:davpapp/Lab2
Joboman555 Oct 26, 2017
5888a5d
adding report
Oct 26, 2017
65dad5f
lab
Oct 28, 2017
1837ba4
finish midpoint
Joboman555 Oct 28, 2017
9cb5f32
Merge branch 'master' of github.com:davpapp/Lab2
Joboman555 Oct 28, 2017
bf26760
dff
Oct 28, 2017
f1981ac
Merge branch 'master' of github.com:davpapp/Lab2
Joboman555 Oct 28, 2017
f723076
spi
Oct 29, 2017
59881dc
fsm
Oct 29, 2017
6198d0f
fsm
Oct 29, 2017
66c865c
ad
Oct 29, 2017
cface2b
fixed sr module instantiating
Joboman555 Oct 29, 2017
8e3a0ae
Merge branch 'master' of github.com:davpapp/Lab2
Joboman555 Oct 29, 2017
225adc7
fixed compilation bugs
Joboman555 Oct 29, 2017
2e47eea
fixed address bits
Joboman555 Oct 29, 2017
f41a92a
fsm work
Oct 29, 2017
fe0e7e8
fsm work
Oct 29, 2017
22ad472
change initialization style to explicit
Joboman555 Oct 29, 2017
aaaa09f
add fsm to spi memory
Joboman555 Oct 29, 2017
1cf97df
add sclk pos
Joboman555 Oct 29, 2017
3db847e
fsm twerk
Oct 29, 2017
33774b2
Add tri-state buffer
Joboman555 Oct 29, 2017
e19e900
fsm progress
Oct 30, 2017
e5ef9fb
Merge branch 'master' of https://github.com/davpapp/Lab2
Oct 30, 2017
057331f
make stuff build
Joboman555 Oct 30, 2017
1d1cf1f
first test
Nov 1, 2017
d1ca4e5
fsm work
Nov 1, 2017
f5c7661
pus
Nov 1, 2017
7f75884
make clock faster
Joboman555 Nov 1, 2017
da00155
saves
Nov 1, 2017
a2a516d
Merge branch 'master' of https://github.com/davpapp/Lab2
Nov 1, 2017
08062eb
take changing state out of if
Joboman555 Nov 1, 2017
8f6c1d7
Merge branch 'master' of github.com:davpapp/Lab2
Joboman555 Nov 1, 2017
94283e2
parameterize input conditioner
Joboman555 Nov 1, 2017
e5f230b
fix datamemory instantiation
Joboman555 Nov 1, 2017
08d261d
update gitignore
Joboman555 Nov 1, 2017
84ee186
make branch state 1 earlier, sete memory initally to 0 for debugging
Joboman555 Nov 1, 2017
76bcb73
make things not depend on slow clock - move states back to right place
Joboman555 Nov 1, 2017
ec1abba
shits almost working
Joboman555 Nov 1, 2017
db42457
changes to fsm
Nov 1, 2017
84d122c
Report
Dec 3, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.out
*.vcd
55 changes: 55 additions & 0 deletions Lab-2-Midpoint-Check-In-Report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Lab 2 Midpoint Check-In Report
Jonah Spear, David Papp

# Input Conditioning

Our waveform illustrates the three desired characteristics:

![](https://d2mxuefqeaa7sj.cloudfront.net/s_B9532690B10F570C9A4A02C57E09079770E739AAA391501DF085C097B989418B_1508953194069_input_fixed.png)


**Input synchronisation:** The conditioned input is synchronised with the noisy input with the clock. This part was already done for us.

**Input debouncing:** We create a noisy signal with several bounces prior to stabilisation in both the positive and negative directions. It is evident from the waveform image that the conditioned input only changes if the input pin is stable for at least three cycles. Because of this, there is a three cycle delay between when the noisy signal changes to when conditioned registers this change.

**Edge detection:** It is evident from the waveform image that rising rises for exactly one clock cycle when conditioned switches from 0 to 1. Conversely, falling rises for exactly one clock cycle when conditioned switches from 1 to 0. Rising and falling flip at the exact time that condition flips.


**Circuit diagram:**
<insert here>


**Question:** If the main system clock is running at 50MHz, what is the maximum length input glitch that will be suppressed by this design for a `waittime` of 10? Include the analysis in your report.

With a *waittime* of 10, the noisy signal needs to be steady for 10 cycles before the conditioned input changes. With a 50MHz clock, each cycle takes 2e-8 seconds. Ten cycles will thus take 2e-7 seconds.


----------
# Shift Register

**Test bench for shiftregister.v:** We tested three properties of our shift register. First, we tested that parallel load was working properly. We confirmed that parallelDataOut was the same as the parallelDataIn when parallel load was enabled.
Next, we confirmed that the shift register advances one position and appends the correct serialDataIn value. We did this by manually setting the peripheralClkEdge and adding ones and zeros in manual clock cycles and verifying parallelDataOut in each iteration.
Finally, we made sure that serialDataOut was correct. This was simple to test, since we essentially just needed to make sure that we were reading the right value.



----------
# Midpoint


Pressing and releasing the button will reset the LEDs to the binary representation of hA5, which is b10101001.

Switch 0 will provide the serialBitIn. It will update when switch 1 is toggled from 0 to 1.

Switching switch 1 to from 0 to 1 will trigger a Clk Edge in the shift register, which will cause the register to shift.


We will confirm that our FPGA works by first initialising our LEDs to 0. We will then toggle switch 0 to ON, and proceeded to toggle switch 1 off and on several times. This will push a few 1s into our LED queue. We will then toggle switch 0 to OFF. Now, when we toggle switch 1 off and on, it will push 0s into our LED queue.
Finally, we will check that parallel load works as expected. When we press the button, the LEDs are set to the sequence 10101001.



----------



64 changes: 64 additions & 0 deletions Lab-2-Report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Lab 2 Report
Jonah Spear, David Papp


# Note:

We never finished this lab and at this point we’re submitting for partial credit.


# Input Conditioning

Our waveform illustrates the three desired characteristics:

![](https://d2mxuefqeaa7sj.cloudfront.net/s_B9532690B10F570C9A4A02C57E09079770E739AAA391501DF085C097B989418B_1508953194069_input_fixed.png)


**Input synchronisation:** The conditioned input is synchronised with the noisy input with the clock. This part was already done for us.

**Input debouncing:** We create a noisy signal with several bounces prior to stabilisation in both the positive and negative directions. It is evident from the waveform image that the conditioned input only changes if the input pin is stable for at least three cycles. Because of this, there is a three cycle delay between when the noisy signal changes to when conditioned registers this change.

**Edge detection:** It is evident from the waveform image that rising rises for exactly one clock cycle when conditioned switches from 0 to 1. Conversely, falling rises for exactly one clock cycle when conditioned switches from 1 to 0. Rising and falling flip at the exact time that condition flips.





**Circuit diagram:**
<insert here>


**Question:** If the main system clock is running at 50MHz, what is the maximum length input glitch that will be suppressed by this design for a `waittime` of 10? Include the analysis in your report.

With a *waittime* of 10, the noisy signal needs to be steady for 10 cycles before the conditioned input changes. With a 50MHz clock, each cycle takes 2e-8 seconds. Ten cycles will thus take 2e-7 seconds.


----------
# Shift Register

**Test bench for shiftregister.v:** We tested three properties of our shift register. First, we tested that parallel load was working properly. We confirmed that parallelDataOut was the same as the parallelDataIn when parallel load was enabled.
Next, we confirmed that the shift register advances one position and appends the correct serialDataIn value. We did this by manually setting the peripheralClkEdge and adding ones and zeros in manual clock cycles and verifying parallelDataOut in each iteration.
Finally, we made sure that serialDataOut was correct. This was simple to test, since we essentially just needed to make sure that we were reading the right value.



----------
# Midpoint


Pressing and releasing the button will reset the LEDs to the binary representation of hA5, which is b10101001.

Switch 0 will provide the serialBitIn. It will update when switch 1 is toggled from 0 to 1.

Switching switch 1 to from 0 to 1 will trigger a Clk Edge in the shift register, which will cause the register to shift.


We will confirm that our FPGA works by first initialising our LEDs to 0. We will then toggle switch 0 to ON, and proceeded to toggle switch 1 off and on several times. This will push a few 1s into our LED queue. We will then toggle switch 0 to OFF. Now, when we toggle switch 1 off and on, it will push 0s into our LED queue.
Finally, we will check that parallel load works as expected. When we press the button, the LEDs are set to the sequence 10101001.



----------



146 changes: 146 additions & 0 deletions ZYBO_Master.xdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
## This file is a general .xdc for the ZYBO Rev B board
## To use it in a project:
## - uncomment the lines corresponding to used pins
## - rename the used signals according to the project


##Clock signal
set_property -dict { PACKAGE_PIN L16 IOSTANDARD LVCMOS33 } [get_ports { clk }]; #IO_L11P_T1_SRCC_35 Sch=sysclk
#create_clock -add -name sys_clk_pin -period 8.00 -waveform {0 4} [get_ports { clk }];


##Switches
set_property -dict { PACKAGE_PIN G15 IOSTANDARD LVCMOS33 } [get_ports { sw[0] }]; #IO_L19N_T3_VREF_35 Sch=SW0
set_property -dict { PACKAGE_PIN P15 IOSTANDARD LVCMOS33 } [get_ports { sw[1] }]; #IO_L24P_T3_34 Sch=SW1
#set_property -dict { PACKAGE_PIN W13 IOSTANDARD LVCMOS33 } [get_ports { sw[2] }]; #IO_L4N_T0_34 Sch=SW2
#set_property -dict { PACKAGE_PIN T16 IOSTANDARD LVCMOS33 } [get_ports { sw[3] }]; #IO_L9P_T1_DQS_34 Sch=SW3


##Buttons
set_property -dict { PACKAGE_PIN R18 IOSTANDARD LVCMOS33 } [get_ports { btn }]; #IO_L20N_T3_34 Sch=BTN0
#set_property -dict { PACKAGE_PIN P16 IOSTANDARD LVCMOS33 } [get_ports { btn[1] }]; #IO_L24N_T3_34 Sch=BTN1
#set_property -dict { PACKAGE_PIN V16 IOSTANDARD LVCMOS33 } [get_ports { btn[2] }]; #IO_L18P_T2_34 Sch=BTN2
#set_property -dict { PACKAGE_PIN Y16 IOSTANDARD LVCMOS33 } [get_ports { btn[3] }]; #IO_L7P_T1_34 Sch=BTN3


##LEDs
#set_property -dict { PACKAGE_PIN M14 IOSTANDARD LVCMOS33 } [get_ports { led[0] }]; #IO_L23P_T3_35 Sch=LED0
#set_property -dict { PACKAGE_PIN M15 IOSTANDARD LVCMOS33 } [get_ports { led[1] }]; #IO_L23N_T3_35 Sch=LED1
#set_property -dict { PACKAGE_PIN G14 IOSTANDARD LVCMOS33 } [get_ports { led[2] }]; #IO_0_35=Sch=LED2
#set_property -dict { PACKAGE_PIN D18 IOSTANDARD LVCMOS33 } [get_ports { led[3] }]; #IO_L3N_T0_DQS_AD1N_35 Sch=LED3


##I2S Audio Codec
#set_property -dict { PACKAGE_PIN K18 IOSTANDARD LVCMOS33 } [get_ports ac_bclk]; #IO_L12N_T1_MRCC_35 Sch=AC_BCLK
#set_property -dict { PACKAGE_PIN T19 IOSTANDARD LVCMOS33 } [get_ports ac_mclk]; #IO_25_34 Sch=AC_MCLK
#set_property -dict { PACKAGE_PIN P18 IOSTANDARD LVCMOS33 } [get_ports ac_muten]; #IO_L23N_T3_34 Sch=AC_MUTEN
#set_property -dict { PACKAGE_PIN M17 IOSTANDARD LVCMOS33 } [get_ports ac_pbdat]; #IO_L8P_T1_AD10P_35 Sch=AC_PBDAT
#set_property -dict { PACKAGE_PIN L17 IOSTANDARD LVCMOS33 } [get_ports ac_pblrc]; #IO_L11N_T1_SRCC_35 Sch=AC_PBLRC
#set_property -dict { PACKAGE_PIN K17 IOSTANDARD LVCMOS33 } [get_ports ac_recdat]; #IO_L12P_T1_MRCC_35 Sch=AC_RECDAT
#set_property -dict { PACKAGE_PIN M18 IOSTANDARD LVCMOS33 } [get_ports ac_reclrc]; #IO_L8N_T1_AD10N_35 Sch=AC_RECLRC


##Audio Codec/external EEPROM IIC bus
#set_property -dict { PACKAGE_PIN N18 IOSTANDARD LVCMOS33 } [get_ports ac_scl]; #IO_L13P_T2_MRCC_34 Sch=AC_SCL
#set_property -dict { PACKAGE_PIN N17 IOSTANDARD LVCMOS33 } [get_ports ac_sda]; #IO_L23P_T3_34 Sch=AC_SDA


##Additional Ethernet signals
#set_property -dict { PACKAGE_PIN F16 IOSTANDARD LVCMOS33 } [get_ports eth_int_b]; #IO_L6P_T0_35 Sch=ETH_INT_B
#set_property -dict { PACKAGE_PIN E17 IOSTANDARD LVCMOS33 } [get_ports eth_rst_b]; #IO_L3P_T0_DQS_AD1P_35 Sch=ETH_RST_B


##HDMI Signals
#set_property -dict { PACKAGE_PIN H17 IOSTANDARD TMDS_33 } [get_ports hdmi_clk_n]; #IO_L13N_T2_MRCC_35 Sch=HDMI_CLK_N
#set_property -dict { PACKAGE_PIN H16 IOSTANDARD TMDS_33 } [get_ports hdmi_clk_p]; #IO_L13P_T2_MRCC_35 Sch=HDMI_CLK_P
#set_property -dict { PACKAGE_PIN D20 IOSTANDARD TMDS_33 } [get_ports { hdmi_d_n[0] }]; #IO_L4N_T0_35 Sch=HDMI_D0_N
#set_property -dict { PACKAGE_PIN D19 IOSTANDARD TMDS_33 } [get_ports { hdmi_d_p[0] }]; #IO_L4P_T0_35 Sch=HDMI_D0_P
#set_property -dict { PACKAGE_PIN B20 IOSTANDARD TMDS_33 } [get_ports { hdmi_d_n[1] }]; #IO_L1N_T0_AD0N_35 Sch=HDMI_D1_N
#set_property -dict { PACKAGE_PIN C20 IOSTANDARD TMDS_33 } [get_ports { hdmi_d_p[1] }]; #IO_L1P_T0_AD0P_35 Sch=HDMI_D1_P
#set_property -dict { PACKAGE_PIN A20 IOSTANDARD TMDS_33 } [get_ports { hdmi_d_n[2] }]; #IO_L2N_T0_AD8N_35 Sch=HDMI_D2_N
#set_property -dict { PACKAGE_PIN B19 IOSTANDARD TMDS_33 } [get_ports { hdmi_d_p[2] }]; #IO_L2P_T0_AD8P_35 Sch=HDMI_D2_P
#set_property -dict { PACKAGE_PIN E19 IOSTANDARD LVCMOS33 } [get_ports hdmi_cec]; #IO_L5N_T0_AD9N_35 Sch=HDMI_CEC
#set_property -dict { PACKAGE_PIN E18 IOSTANDARD LVCMOS33 } [get_ports hdmi_hpd]; #IO_L5P_T0_AD9P_35 Sch=HDMI_HPD
#set_property -dict { PACKAGE_PIN F17 IOSTANDARD LVCMOS33 } [get_ports hdmi_out_en]; #IO_L6N_T0_VREF_35 Sch=HDMI_OUT_EN
#set_property -dict { PACKAGE_PIN G17 IOSTANDARD LVCMOS33 } [get_ports hdmi_scl]; #IO_L16P_T2_35 Sch=HDMI_SCL
#set_property -dict { PACKAGE_PIN G18 IOSTANDARD LVCMOS33 } [get_ports hdmi_sda]; #IO_L16N_T2_35 Sch=HDMI_SDA


##Pmod Header JA (XADC)
#set_property -dict { PACKAGE_PIN N15 IOSTANDARD LVCMOS33 } [get_ports { ja_p[0] }]; #IO_L21P_T3_DQS_AD14P_35 Sch=JA1_R_p
#set_property -dict { PACKAGE_PIN L14 IOSTANDARD LVCMOS33 } [get_ports { ja_p[1] }]; #IO_L22P_T3_AD7P_35 Sch=JA2_R_P
#set_property -dict { PACKAGE_PIN K16 IOSTANDARD LVCMOS33 } [get_ports { ja_p[2] }]; #IO_L24P_T3_AD15P_35 Sch=JA3_R_P
#set_property -dict { PACKAGE_PIN K14 IOSTANDARD LVCMOS33 } [get_ports { ja_p[3] }]; #IO_L20P_T3_AD6P_35 Sch=JA4_R_P
#set_property -dict { PACKAGE_PIN N16 IOSTANDARD LVCMOS33 } [get_ports { ja_n[0] }]; #IO_L21N_T3_DQS_AD14N_35 Sch=JA1_R_N
#set_property -dict { PACKAGE_PIN L15 IOSTANDARD LVCMOS33 } [get_ports { ja_n[1] }]; #IO_L22N_T3_AD7N_35 Sch=JA2_R_N
#set_property -dict { PACKAGE_PIN J16 IOSTANDARD LVCMOS33 } [get_ports { ja_n[2] }]; #IO_L24N_T3_AD15N_35 Sch=JA3_R_N
#set_property -dict { PACKAGE_PIN J14 IOSTANDARD LVCMOS33 } [get_ports { ja_n[3] }]; #IO_L20N_T3_AD6N_35 Sch=JA4_R_N


##Pmod Header JB
#set_property -dict { PACKAGE_PIN T20 IOSTANDARD LVCMOS33 } [get_ports { jb_p[0] }]; #IO_L15P_T2_DQS_34 Sch=JB1_p
#set_property -dict { PACKAGE_PIN U20 IOSTANDARD LVCMOS33 } [get_ports { jb_n[0] }]; #IO_L15N_T2_DQS_34 Sch=JB1_N
#set_property -dict { PACKAGE_PIN V20 IOSTANDARD LVCMOS33 } [get_ports { jb_p[1] }]; #IO_L16P_T2_34 Sch=JB2_P
#set_property -dict { PACKAGE_PIN W20 IOSTANDARD LVCMOS33 } [get_ports { jb_n[1] }]; #IO_L16N_T2_34 Sch=JB2_N
#set_property -dict { PACKAGE_PIN Y18 IOSTANDARD LVCMOS33 } [get_ports { jb_p[2] }]; #IO_L17P_T2_34 Sch=JB3_P
#set_property -dict { PACKAGE_PIN Y19 IOSTANDARD LVCMOS33 } [get_ports { jb_n[2] }]; #IO_L17N_T2_34 Sch=JB3_N
#set_property -dict { PACKAGE_PIN W18 IOSTANDARD LVCMOS33 } [get_ports { jb_p[3] }]; #IO_L22P_T3_34 Sch=JB4_P
#set_property -dict { PACKAGE_PIN W19 IOSTANDARD LVCMOS33 } [get_ports { jb_n[3] }]; #IO_L22N_T3_34 Sch=JB4_N


##Pmod Header JC
#set_property -dict { PACKAGE_PIN V15 IOSTANDARD LVCMOS33 } [get_ports { jc_p[0] }]; #IO_L10P_T1_34 Sch=JC1_P
#set_property -dict { PACKAGE_PIN W15 IOSTANDARD LVCMOS33 } [get_ports { jc_n[0] }]; #IO_L10N_T1_34 Sch=JC1_N
#set_property -dict { PACKAGE_PIN T11 IOSTANDARD LVCMOS33 } [get_ports { jc_p[1] }]; #IO_L1P_T0_34 Sch=JC2_P
#set_property -dict { PACKAGE_PIN T10 IOSTANDARD LVCMOS33 } [get_ports { jc_n[1] }]; #IO_L1N_T0_34 Sch=JC2_N
#set_property -dict { PACKAGE_PIN W14 IOSTANDARD LVCMOS33 } [get_ports { jc_p[2] }]; #IO_L8P_T1_34 Sch=JC3_P
#set_property -dict { PACKAGE_PIN Y14 IOSTANDARD LVCMOS33 } [get_ports { jc_n[2] }]; #IO_L8N_T1_34 Sch=JC3_N
#set_property -dict { PACKAGE_PIN T12 IOSTANDARD LVCMOS33 } [get_ports { jc_p[3] }]; #IO_L2P_T0_34 Sch=JC4_P
#set_property -dict { PACKAGE_PIN U12 IOSTANDARD LVCMOS33 } [get_ports { jc_n[3] }]; #IO_L2N_T0_34 Sch=JC4_N


##Pmod Header JD
#set_property -dict { PACKAGE_PIN T14 IOSTANDARD LVCMOS33 } [get_ports { jd_p[0] }]; #IO_L5P_T0_34 Sch=JD1_P
#set_property -dict { PACKAGE_PIN T15 IOSTANDARD LVCMOS33 } [get_ports { jd_n[0] }]; #IO_L5N_T0_34 Sch=JD1_N
#set_property -dict { PACKAGE_PIN P14 IOSTANDARD LVCMOS33 } [get_ports { jd_p[1] }]; #IO_L6P_T0_34 Sch=JD2_P
#set_property -dict { PACKAGE_PIN R14 IOSTANDARD LVCMOS33 } [get_ports { jd_n[1] }]; #IO_L6N_T0_VREF_34 Sch=JD2_N
#set_property -dict { PACKAGE_PIN U14 IOSTANDARD LVCMOS33 } [get_ports { jd_p[2] }]; #IO_L11P_T1_SRCC_34 Sch=JD3_P
#set_property -dict { PACKAGE_PIN U15 IOSTANDARD LVCMOS33 } [get_ports { jd_n[2] }]; #IO_L11N_T1_SRCC_34 Sch=JD3_N
#set_property -dict { PACKAGE_PIN V17 IOSTANDARD LVCMOS33 } [get_ports { jd_p[3] }]; #IO_L21P_T3_DQS_34 Sch=JD4_P
#set_property -dict { PACKAGE_PIN V18 IOSTANDARD LVCMOS33 } [get_ports { jd_n[3] }]; #IO_L21N_T3_DQS_34 Sch=JD4_N


##Pmod Header JE
set_property -dict { PACKAGE_PIN V12 IOSTANDARD LVCMOS33 } [get_ports { je[0] }]; #IO_L4P_T0_34 Sch=JE1
set_property -dict { PACKAGE_PIN W16 IOSTANDARD LVCMOS33 } [get_ports { je[1] }]; #IO_L18N_T2_34 Sch=JE2
set_property -dict { PACKAGE_PIN J15 IOSTANDARD LVCMOS33 } [get_ports { je[2] }]; #IO_25_35 Sch=JE3
set_property -dict { PACKAGE_PIN H15 IOSTANDARD LVCMOS33 } [get_ports { je[3] }]; #IO_L19P_T3_35 Sch=JE4
set_property -dict { PACKAGE_PIN V13 IOSTANDARD LVCMOS33 } [get_ports { je[4] }]; #IO_L3N_T0_DQS_34 Sch=JE7
set_property -dict { PACKAGE_PIN U17 IOSTANDARD LVCMOS33 } [get_ports { je[5] }]; #IO_L9N_T1_DQS_34 Sch=JE8
set_property -dict { PACKAGE_PIN T17 IOSTANDARD LVCMOS33 } [get_ports { je[6] }]; #IO_L20P_T3_34 Sch=JE9
set_property -dict { PACKAGE_PIN Y17 IOSTANDARD LVCMOS33 } [get_ports { je[7] }]; #IO_L7N_T1_34 Sch=JE10


##USB-OTG overcurrent detect pin
#set_property -dict { PACKAGE_PIN U13 IOSTANDARD LVCMOS33 } [get_ports otg_oc]; #IO_L3P_T0_DQS_PUDC_B_34 Sch=OTG_OC


##VGA Connector
#set_property -dict { PACKAGE_PIN M19 IOSTANDARD LVCMOS33 } [get_ports { vga_r[0] }]; #IO_L7P_T1_AD2P_35 Sch=VGA_R1
#set_property -dict { PACKAGE_PIN L20 IOSTANDARD LVCMOS33 } [get_ports { vga_r[1] }]; #IO_L9N_T1_DQS_AD3N_35 Sch=VGA_R2
#set_property -dict { PACKAGE_PIN J20 IOSTANDARD LVCMOS33 } [get_ports { vga_r[2] }]; #IO_L17P_T2_AD5P_35 Sch=VGA_R3
#set_property -dict { PACKAGE_PIN G20 IOSTANDARD LVCMOS33 } [get_ports { vga_r[3] }]; #IO_L18N_T2_AD13N_35 Sch=VGA_R4
#set_property -dict { PACKAGE_PIN F19 IOSTANDARD LVCMOS33 } [get_ports { vga_r[4] }]; #IO_L15P_T2_DQS_AD12P_35 Sch=VGA_R5
#set_property -dict { PACKAGE_PIN H18 IOSTANDARD LVCMOS33 } [get_ports { vga_g[0] }]; #IO_L14N_T2_AD4N_SRCC_35 Sch=VGA_G0
#set_property -dict { PACKAGE_PIN N20 IOSTANDARD LVCMOS33 } [get_ports { vga_g[1] }]; #IO_L14P_T2_SRCC_34 Sch=VGA_G1
#set_property -dict { PACKAGE_PIN L19 IOSTANDARD LVCMOS33 } [get_ports { vga_g[2] }]; #IO_L9P_T1_DQS_AD3P_35 Sch=VGA_G2
#set_property -dict { PACKAGE_PIN J19 IOSTANDARD LVCMOS33 } [get_ports { vga_g[3] }]; #IO_L10N_T1_AD11N_35 Sch=VGA_G3
#set_property -dict { PACKAGE_PIN H20 IOSTANDARD LVCMOS33 } [get_ports { vga_g[4] }]; #IO_L17N_T2_AD5N_35 Sch=VGA_G4
#set_property -dict { PACKAGE_PIN F20 IOSTANDARD LVCMOS33 } [get_ports { vga_g[5] }]; #IO_L15N_T2_DQS_AD12N_35 Sch=VGA=G5
#set_property -dict { PACKAGE_PIN P20 IOSTANDARD LVCMOS33 } [get_ports { vga_b[0] }]; #IO_L14N_T2_SRCC_34 Sch=VGA_B1
#set_property -dict { PACKAGE_PIN M20 IOSTANDARD LVCMOS33 } [get_ports { vga_b[1] }]; #IO_L7N_T1_AD2N_35 Sch=VGA_B2
#set_property -dict { PACKAGE_PIN K19 IOSTANDARD LVCMOS33 } [get_ports { vga_b[2] }]; #IO_L10P_T1_AD11P_35 Sch=VGA_B3
#set_property -dict { PACKAGE_PIN J18 IOSTANDARD LVCMOS33 } [get_ports { vga_b[3] }]; #IO_L14P_T2_AD4P_SRCC_35 Sch=VGA_B4
#set_property -dict { PACKAGE_PIN G19 IOSTANDARD LVCMOS33 } [get_ports { vga_b[4] }]; #IO_L18P_T2_AD13P_35 Sch=VGA_B5
#set_property -dict { PACKAGE_PIN P19 IOSTANDARD LVCMOS33 } [get_ports vga_hs]; #IO_L13N_T2_MRCC_34 Sch=VGA_HS
#set_property -dict { PACKAGE_PIN R19 IOSTANDARD LVCMOS33 } [get_ports vga_vs]; #IO_0_34 Sch=VGA_VS
6 changes: 5 additions & 1 deletion datamemory.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ module datamemory
input [addresswidth-1:0] address,
input writeEnable,
input [width-1:0] dataIn
)
);


reg [width-1:0] memory [depth-1:0];

/*initial begin
memory[0] = 8'b11111111;
end*/

always @(posedge clk) begin
if(writeEnable)
memory[address] <= dataIn;
Expand Down
13 changes: 13 additions & 0 deletions dff.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module dff #( parameter W = 1 )
(
input trigger,
input enable,
input [W-1:0] d,
output reg [W-1:0] q
);
always @(posedge trigger) begin
if(enable) begin
q <= d;
end
end
endmodule
Loading