Add batch 2 (openasic-org_xkISP, JOKOSAHS_DMA-Pcileech, lawrie_fpga_pio, nukeykt_Nuked-MD-FPGA, vipinkmenon_neuralNetwork)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- JOKOSAHS_DMA-Pcileech/README.md +68 -0
- JOKOSAHS_DMA-Pcileech/pcie_7x +1 -0
- JOKOSAHS_DMA-Pcileech/src/75immt.xdc +114 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_captain_75T.xdc +115 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_com.sv +248 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_com_e.v +0 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_enigma_x1.xdc +115 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_enigma_x1_top.sv +166 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_fifo.sv +458 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_ft601.sv +181 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_header.svh +336 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_mux.sv +175 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_pcie_a7.sv +353 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_pcie_a7x4.sv +374 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_pcie_cfg_a7.sv +447 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_pcie_cfgspace_shadow.sv +105 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_pcie_tlp_a7.sv +350 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_screamer_m2.xdc +126 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_screamer_m2_top.sv +159 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_squirrel.xdc +116 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_squirrel_top.sv +166 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_tbx4_100t.xdc +179 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_tbx4_100t_top.sv +184 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_tlps128_bar_controller.sv +908 -0
- JOKOSAHS_DMA-Pcileech/src/pcileech_tlps128_cfgspace_shadow.sv +260 -0
- JOKOSAHS_DMA-Pcileech/vivado_build.tcl +26 -0
- JOKOSAHS_DMA-Pcileech/vivado_build_100t.tcl +26 -0
- JOKOSAHS_DMA-Pcileech/vivado_generate_project_100t.tcl +1068 -0
- JOKOSAHS_DMA-Pcileech/vivado_generate_project_captain_75T.tcl +1071 -0
- JOKOSAHS_DMA-Pcileech/vivado_generate_project_enigma_x1.tcl +1071 -0
- JOKOSAHS_DMA-Pcileech/vivado_generate_project_immortal_75T.tcl +1071 -0
- JOKOSAHS_DMA-Pcileech/vivado_generate_project_immortal_75Ts.tcl +1071 -0
- JOKOSAHS_DMA-Pcileech/vivado_generate_project_m2.tcl +1071 -0
- JOKOSAHS_DMA-Pcileech/vivado_generate_project_squirrel.tcl +1071 -0
- lawrie_fpga_pio/.gitignore +5 -0
- lawrie_fpga_pio/LICENSE +25 -0
- lawrie_fpga_pio/README.md +200 -0
- lawrie_fpga_pio/asm/adafruit_pioasm.py +165 -0
- lawrie_fpga_pio/asm/add.asm +13 -0
- lawrie_fpga_pio/asm/blink.asm +15 -0
- lawrie_fpga_pio/asm/compile +29 -0
- lawrie_fpga_pio/asm/copybit.asm +4 -0
- lawrie_fpga_pio/asm/i2s.asm +15 -0
- lawrie_fpga_pio/asm/pwm.asm +13 -0
- lawrie_fpga_pio/asm/spi.asm +5 -0
- lawrie_fpga_pio/asm/square.asm +4 -0
- lawrie_fpga_pio/asm/step2.asm +17 -0
- lawrie_fpga_pio/asm/stepper.asm +9 -0
- lawrie_fpga_pio/asm/uart_rx.asm +7 -0
- lawrie_fpga_pio/asm/uart_tx.asm +7 -0
JOKOSAHS_DMA-Pcileech/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## **💡 Current Status**
|
| 2 |
+
|
| 3 |
+
The **network card firmware** has been patched by **ACE** and is no longer functional in its original state.
|
| 4 |
+
The purpose of open-sourcing this firmware is to **accelerate learning** and provide insights into this project.
|
| 5 |
+
|
| 6 |
+
By sharing this resource, we aim to foster a deeper understanding and enable developers to explore and innovate further.
|
| 7 |
+
Remember, this is for educational and research purposes—let's build a better community together!
|
| 8 |
+
|
| 9 |
+
## **🔧 Focus Areas**
|
| 10 |
+
|
| 11 |
+
Our primary focus is on **media cards**, **sound cards**, and **hard drives**.
|
| 12 |
+
Due to the nature of these devices, we have decided **not to open-source them**.
|
| 13 |
+
|
| 14 |
+
If you are interested in discussing these technologies or joining our community, feel free to connect with us on **Discord**:
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
## ⚠️ About TLP Interrupts
|
| 18 |
+
|
| 19 |
+
The TLP interrupt mechanism requires proper echoing with the computer motherboard. This project was developed specifically for **ASUS motherboards**, ensuring compatibility. However, many individuals who have **stolen this project** fail to adapt the kernel interrupts for other systems. As a result, users might experience issues such as **blue screens** or other errors due to these unaddressed compatibility problems. These individuals often mislead users into switching to specific motherboards instead of resolving the underlying issues, highlighting their lack of technical expertise.
|
| 20 |
+
|
| 21 |
+
While **network card firmware technology is outdated**, some developers continue to sell it at **high prices**, exploiting users who may not know better. Our decision to open-source this technology has disrupted many fraudulent developers, leading to retaliation instead of constructive improvements on their part. We believe that true developers should focus on **learning, innovating**, and solving compatibility challenges rather than deceiving customers or charging unreasonable fees.
|
| 22 |
+
|
| 23 |
+
## ⚠️ Important Update on Network Card Firmware
|
| 24 |
+
|
| 25 |
+
ACE has now marked all **Intel** and **Realtek** series network cards. In the future, **network card firmware** will be fully detected. Scammers who are exploiting our open-source technology will soon be exposed.
|
| 26 |
+
|
| 27 |
+
### Why We Open-Sourced This Project
|
| 28 |
+
The primary purpose of open-sourcing this project was to **counter the exploitation of our work**. By making the technology publicly available, we ensure that **malicious users** cannot hide behind our creations and resell them unlawfully.
|
| 29 |
+
|
| 30 |
+
We will continue to monitor and update the firmware to stay ahead of these attempts.
|
| 31 |
+
|
| 32 |
+
Thank you for your continued support.
|
| 33 |
+
|
| 34 |
+
**Purpose of Open Source**: Following a leak by a customer, the firmware became widely distributed and resold. To address this, it has been made public.
|
| 35 |
+
|
| 36 |
+
Note that once exposed, anti-cheat systems will likely detect the firmware's space, which may limit its future usability.
|
| 37 |
+
|
| 38 |
+
We are not working with any developers and any mention of us is false!
|
| 39 |
+
|
| 40 |
+
## Caution Against Scammers
|
| 41 |
+
|
| 42 |
+
Currently, there are many fake users cloning this open-source library and using our information to deceive others.
|
| 43 |
+
|
| 44 |
+
**Devices for Full Emulation**: Killer series network cards.
|
| 45 |
+
|
| 46 |
+
**New Update**: We have modified a new IP core to support the detection of Delta games.
|
| 47 |
+
|
| 48 |
+
**Want to share your insights or seek assistance?**
|
| 49 |
+
|
| 50 |
+
> ⚠️ **Note to Malicious Attackers and Troublemakers**
|
| 51 |
+
> Please refrain from joining our group. We do not welcome individuals who intend to misuse our free resources for resale purposes. Such members will be removed from the community
|
| 52 |
+
|
| 53 |
+
### Open Access to Network Card DMA Firmware
|
| 54 |
+
ACE has recently restricted many RTL-type devices, including network card DMA firmware. Importantly, this technology has become **publicly accessible**, allowing anyone with basic technical knowledge to quickly learn and create it. As a result, prices for these firmware solutions remain relatively affordable, generally within the **100-180 USD** range. This applies to both Killer cards and other models, so prices should not vary significantly.
|
| 55 |
+
|
| 56 |
+
### Recognizing False Claims and High-Price Tactics
|
| 57 |
+
Some individuals may attempt to mislead new players by claiming that open-source network card devices, often with additional modifications, are exclusive "internal" products. They may also assert that their versions are unique or private.
|
| 58 |
+
|
| 59 |
+
- **Unique Firmware:** ACE is likely to soon gather data on all such devices. Each firmware version requires unique encoding, ensuring distinct versions for each user.
|
| 60 |
+
- **Open and Accessible Technology:** With the right emulation skills, anyone can achieve stability and reliability in these devices.
|
| 61 |
+
There is no "private" firmware—only **thousands of lines of code** accessible to those who seek it.
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
### Scam Alert
|
| 65 |
+
If you’ve paid **300 USD** for network card emulation firmware, there’s a strong chance you’ve been overcharged, as this technology is now widely accessible.
|
| 66 |
+
|
| 67 |
+
**Devices for Full Emulation**: Killer series network cards.
|
| 68 |
+
|
JOKOSAHS_DMA-Pcileech/pcie_7x
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
|
JOKOSAHS_DMA-Pcileech/src/75immt.xdc
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set_property PACKAGE_PIN V20 [get_ports ft601_be[0]]
|
| 2 |
+
set_property PACKAGE_PIN V19 [get_ports ft601_be[1]]
|
| 3 |
+
set_property PACKAGE_PIN W20 [get_ports ft601_be[2]]
|
| 4 |
+
set_property PACKAGE_PIN AB20 [get_ports ft601_be[3]]
|
| 5 |
+
set_property PACKAGE_PIN H20 [get_ports ft601_data[0]]
|
| 6 |
+
set_property PACKAGE_PIN H22 [get_ports ft601_data[1]]
|
| 7 |
+
set_property PACKAGE_PIN J21 [get_ports ft601_data[2]]
|
| 8 |
+
set_property PACKAGE_PIN J22 [get_ports ft601_data[3]]
|
| 9 |
+
set_property PACKAGE_PIN K21 [get_ports ft601_data[4]]
|
| 10 |
+
set_property PACKAGE_PIN K22 [get_ports ft601_data[5]]
|
| 11 |
+
set_property PACKAGE_PIN L21 [get_ports ft601_data[6]]
|
| 12 |
+
set_property PACKAGE_PIN N18 [get_ports ft601_data[7]]
|
| 13 |
+
set_property PACKAGE_PIN M18 [get_ports ft601_data[8]]
|
| 14 |
+
set_property PACKAGE_PIN L20 [get_ports ft601_data[9]]
|
| 15 |
+
set_property PACKAGE_PIN L19 [get_ports ft601_data[10]]
|
| 16 |
+
set_property PACKAGE_PIN M20 [get_ports ft601_data[11]]
|
| 17 |
+
set_property PACKAGE_PIN M22 [get_ports ft601_data[12]]
|
| 18 |
+
set_property PACKAGE_PIN M21 [get_ports ft601_data[13]]
|
| 19 |
+
set_property PACKAGE_PIN N22 [get_ports ft601_data[14]]
|
| 20 |
+
set_property PACKAGE_PIN N20 [get_ports ft601_data[15]]
|
| 21 |
+
set_property PACKAGE_PIN P15 [get_ports ft601_data[16]]
|
| 22 |
+
set_property PACKAGE_PIN T21 [get_ports ft601_data[17]]
|
| 23 |
+
set_property PACKAGE_PIN R16 [get_ports ft601_data[18]]
|
| 24 |
+
# OLD ft601_data[19]
|
| 25 |
+
set_property PACKAGE_PIN T20 [get_ports ft601_data[19]]
|
| 26 |
+
|
| 27 |
+
set_property PACKAGE_PIN U17 [get_ports ft601_data[20]]
|
| 28 |
+
set_property PACKAGE_PIN U20 [get_ports ft601_data[21]]
|
| 29 |
+
set_property PACKAGE_PIN U21 [get_ports ft601_data[22]]
|
| 30 |
+
set_property PACKAGE_PIN V22 [get_ports ft601_data[23]]
|
| 31 |
+
set_property PACKAGE_PIN W22 [get_ports ft601_data[24]]
|
| 32 |
+
set_property PACKAGE_PIN W21 [get_ports ft601_data[25]]
|
| 33 |
+
set_property PACKAGE_PIN Y22 [get_ports ft601_data[26]]
|
| 34 |
+
set_property PACKAGE_PIN Y21 [get_ports ft601_data[27]]
|
| 35 |
+
set_property PACKAGE_PIN AB22 [get_ports ft601_data[28]]
|
| 36 |
+
set_property PACKAGE_PIN AA21 [get_ports ft601_data[29]]
|
| 37 |
+
set_property PACKAGE_PIN AB21 [get_ports ft601_data[30]]
|
| 38 |
+
set_property PACKAGE_PIN AA20 [get_ports ft601_data[31]]
|
| 39 |
+
set_property PACKAGE_PIN W17 [get_ports ft601_oe_n]
|
| 40 |
+
set_property PACKAGE_PIN P16 [get_ports ft601_rd_n]
|
| 41 |
+
set_property PACKAGE_PIN AA18 [get_ports ft601_rxf_n]
|
| 42 |
+
set_property PACKAGE_PIN AB18 [get_ports ft601_siwu_n]
|
| 43 |
+
set_property PACKAGE_PIN AA19 [get_ports ft601_txe_n]
|
| 44 |
+
set_property PACKAGE_PIN W19 [get_ports ft601_wr_n]
|
| 45 |
+
set_property PACKAGE_PIN N13 [get_ports ft601_rst_n]
|
| 46 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_txe_n ft601_rxf_n}]
|
| 47 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 48 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 49 |
+
set_property SLEW FAST [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 50 |
+
set_property SLEW FAST [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 51 |
+
|
| 52 |
+
set_property PACKAGE_PIN G21 [get_ports user_ld1_n]
|
| 53 |
+
set_property PACKAGE_PIN G22 [get_ports user_ld2_n]
|
| 54 |
+
set_property PACKAGE_PIN F19 [get_ports user_sw1_n]
|
| 55 |
+
set_property PACKAGE_PIN F20 [get_ports user_sw2_n]
|
| 56 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {user_ld1_n user_ld2_n user_sw1_n user_sw2_n}]
|
| 57 |
+
|
| 58 |
+
# SYSCLK
|
| 59 |
+
set_property PACKAGE_PIN J19 [get_ports clk]
|
| 60 |
+
set_property IOSTANDARD LVCMOS33 [get_ports clk]
|
| 61 |
+
create_clock -period 10.000 -name net_clk -waveform {0.000 5.000} [get_ports clk]
|
| 62 |
+
|
| 63 |
+
# FT601 CLK
|
| 64 |
+
create_clock -period 10.000 -name net_ft601_clk -waveform {0.000 5.000} [get_ports ft601_clk]
|
| 65 |
+
set_property IOSTANDARD LVCMOS33 [get_ports ft601_clk]
|
| 66 |
+
set_property PACKAGE_PIN K18 [get_ports ft601_clk]
|
| 67 |
+
|
| 68 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports {ft601_data[*]}]
|
| 69 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports {ft601_data[*]}]
|
| 70 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_rxf_n]
|
| 71 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_rxf_n]
|
| 72 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_txe_n]
|
| 73 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_txe_n]
|
| 74 |
+
|
| 75 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 76 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 77 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 78 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 79 |
+
|
| 80 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_OE_N_reg]
|
| 81 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_RD_N_reg]
|
| 82 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_WR_N_reg]
|
| 83 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/txo_dout_reg[*]]
|
| 84 |
+
|
| 85 |
+
set_multicycle_path 2 -from [get_pins i_pcileech_com/i_pcileech_ft601/oe_reg/C] -to [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 86 |
+
set_false_path -from [get_pins {tickcount64_reg[*]/C}]
|
| 87 |
+
set_false_path -from [get_pins {i_pcileech_fifo/_pcie_core_config_reg[*]/C}]
|
| 88 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_lnk_up_int_reg/C] -to [get_pins {i_pcileech_fifo/_cmd_tx_din_reg[16]/D}]
|
| 89 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_reset_out_reg/C]
|
| 90 |
+
|
| 91 |
+
#PCIe signals
|
| 92 |
+
set_property PACKAGE_PIN A13 [get_ports pcie_present]
|
| 93 |
+
set_property PACKAGE_PIN C13 [get_ports pcie_perst_n]
|
| 94 |
+
set_property PACKAGE_PIN B13 [get_ports pcie_wake_n]
|
| 95 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_present]
|
| 96 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_perst_n]
|
| 97 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_wake_n]
|
| 98 |
+
|
| 99 |
+
set_property PACKAGE_PIN C9 [get_ports {pcie_rx_n[0]}]
|
| 100 |
+
set_property PACKAGE_PIN D9 [get_ports {pcie_rx_p[0]}]
|
| 101 |
+
set_property PACKAGE_PIN C7 [get_ports {pcie_tx_n[0]}]
|
| 102 |
+
set_property PACKAGE_PIN D7 [get_ports {pcie_tx_p[0]}]
|
| 103 |
+
|
| 104 |
+
set_property PACKAGE_PIN E10 [get_ports pcie_clk_n]
|
| 105 |
+
set_property PACKAGE_PIN F10 [get_ports pcie_clk_p]
|
| 106 |
+
|
| 107 |
+
create_clock -name pcie_sys_clk_p -period 10.0 [get_nets pcie_clk_p]
|
| 108 |
+
|
| 109 |
+
set_property CFGBVS Vcco [current_design]
|
| 110 |
+
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
| 111 |
+
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
|
| 112 |
+
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
|
| 113 |
+
set_property BITSTREAM.CONFIG.SPI_FALL_EDGE YES [current_design]
|
| 114 |
+
set_property BITSTREAM.CONFIG.CONFIGRATE 66 [current_design]
|
JOKOSAHS_DMA-Pcileech/src/pcileech_captain_75T.xdc
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set_property PACKAGE_PIN V20 [get_ports ft601_be[0]]
|
| 2 |
+
set_property PACKAGE_PIN V19 [get_ports ft601_be[1]]
|
| 3 |
+
set_property PACKAGE_PIN W20 [get_ports ft601_be[2]]
|
| 4 |
+
set_property PACKAGE_PIN AB20 [get_ports ft601_be[3]]
|
| 5 |
+
set_property PACKAGE_PIN H20 [get_ports ft601_data[0]]
|
| 6 |
+
set_property PACKAGE_PIN H22 [get_ports ft601_data[1]]
|
| 7 |
+
set_property PACKAGE_PIN J21 [get_ports ft601_data[2]]
|
| 8 |
+
set_property PACKAGE_PIN J22 [get_ports ft601_data[3]]
|
| 9 |
+
set_property PACKAGE_PIN K21 [get_ports ft601_data[4]]
|
| 10 |
+
set_property PACKAGE_PIN K22 [get_ports ft601_data[5]]
|
| 11 |
+
set_property PACKAGE_PIN L21 [get_ports ft601_data[6]]
|
| 12 |
+
set_property PACKAGE_PIN N18 [get_ports ft601_data[7]]
|
| 13 |
+
set_property PACKAGE_PIN M18 [get_ports ft601_data[8]]
|
| 14 |
+
set_property PACKAGE_PIN L20 [get_ports ft601_data[9]]
|
| 15 |
+
set_property PACKAGE_PIN L19 [get_ports ft601_data[10]]
|
| 16 |
+
set_property PACKAGE_PIN M20 [get_ports ft601_data[11]]
|
| 17 |
+
set_property PACKAGE_PIN M22 [get_ports ft601_data[12]]
|
| 18 |
+
set_property PACKAGE_PIN M21 [get_ports ft601_data[13]]
|
| 19 |
+
set_property PACKAGE_PIN N22 [get_ports ft601_data[14]]
|
| 20 |
+
set_property PACKAGE_PIN N20 [get_ports ft601_data[15]]
|
| 21 |
+
set_property PACKAGE_PIN P15 [get_ports ft601_data[16]]
|
| 22 |
+
set_property PACKAGE_PIN T21 [get_ports ft601_data[17]]
|
| 23 |
+
set_property PACKAGE_PIN R16 [get_ports ft601_data[18]]
|
| 24 |
+
# OLD ft601_data[19]
|
| 25 |
+
set_property PACKAGE_PIN T20 [get_ports ft601_data[19]]
|
| 26 |
+
# NEW ft601_data[19]
|
| 27 |
+
# set_property PACKAGE_PIN T18 [get_ports ft601_data[19]]
|
| 28 |
+
set_property PACKAGE_PIN U17 [get_ports ft601_data[20]]
|
| 29 |
+
set_property PACKAGE_PIN U20 [get_ports ft601_data[21]]
|
| 30 |
+
set_property PACKAGE_PIN U21 [get_ports ft601_data[22]]
|
| 31 |
+
set_property PACKAGE_PIN V22 [get_ports ft601_data[23]]
|
| 32 |
+
set_property PACKAGE_PIN W22 [get_ports ft601_data[24]]
|
| 33 |
+
set_property PACKAGE_PIN W21 [get_ports ft601_data[25]]
|
| 34 |
+
set_property PACKAGE_PIN Y22 [get_ports ft601_data[26]]
|
| 35 |
+
set_property PACKAGE_PIN Y21 [get_ports ft601_data[27]]
|
| 36 |
+
set_property PACKAGE_PIN AB22 [get_ports ft601_data[28]]
|
| 37 |
+
set_property PACKAGE_PIN AA21 [get_ports ft601_data[29]]
|
| 38 |
+
set_property PACKAGE_PIN AB21 [get_ports ft601_data[30]]
|
| 39 |
+
set_property PACKAGE_PIN AA20 [get_ports ft601_data[31]]
|
| 40 |
+
set_property PACKAGE_PIN W17 [get_ports ft601_oe_n]
|
| 41 |
+
set_property PACKAGE_PIN P16 [get_ports ft601_rd_n]
|
| 42 |
+
set_property PACKAGE_PIN AA18 [get_ports ft601_rxf_n]
|
| 43 |
+
set_property PACKAGE_PIN AB18 [get_ports ft601_siwu_n]
|
| 44 |
+
set_property PACKAGE_PIN AA19 [get_ports ft601_txe_n]
|
| 45 |
+
set_property PACKAGE_PIN W19 [get_ports ft601_wr_n]
|
| 46 |
+
set_property PACKAGE_PIN N13 [get_ports ft601_rst_n]
|
| 47 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_txe_n ft601_rxf_n}]
|
| 48 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 49 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 50 |
+
set_property SLEW FAST [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 51 |
+
set_property SLEW FAST [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 52 |
+
|
| 53 |
+
set_property PACKAGE_PIN G21 [get_ports user_ld1_n]
|
| 54 |
+
set_property PACKAGE_PIN G22 [get_ports user_ld2_n]
|
| 55 |
+
set_property PACKAGE_PIN F19 [get_ports user_sw1_n]
|
| 56 |
+
set_property PACKAGE_PIN F20 [get_ports user_sw2_n]
|
| 57 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {user_ld1_n user_ld2_n user_sw1_n user_sw2_n}]
|
| 58 |
+
|
| 59 |
+
# SYSCLK
|
| 60 |
+
set_property PACKAGE_PIN J19 [get_ports clk]
|
| 61 |
+
set_property IOSTANDARD LVCMOS33 [get_ports clk]
|
| 62 |
+
create_clock -period 10.000 -name net_clk -waveform {0.000 5.000} [get_ports clk]
|
| 63 |
+
|
| 64 |
+
# FT601 CLK
|
| 65 |
+
create_clock -period 10.000 -name net_ft601_clk -waveform {0.000 5.000} [get_ports ft601_clk]
|
| 66 |
+
set_property IOSTANDARD LVCMOS33 [get_ports ft601_clk]
|
| 67 |
+
set_property PACKAGE_PIN K18 [get_ports ft601_clk]
|
| 68 |
+
|
| 69 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports {ft601_data[*]}]
|
| 70 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports {ft601_data[*]}]
|
| 71 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_rxf_n]
|
| 72 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_rxf_n]
|
| 73 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_txe_n]
|
| 74 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_txe_n]
|
| 75 |
+
|
| 76 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 77 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 78 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 79 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 80 |
+
|
| 81 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_OE_N_reg]
|
| 82 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_RD_N_reg]
|
| 83 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_WR_N_reg]
|
| 84 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_DATA_OUT_reg[0][*]]
|
| 85 |
+
|
| 86 |
+
set_multicycle_path 2 -from [get_pins i_pcileech_com/i_pcileech_ft601/OE_reg/C] -to [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 87 |
+
set_false_path -from [get_pins {tickcount64_reg[*]/C}]
|
| 88 |
+
set_false_path -from [get_pins {i_pcileech_fifo/_pcie_core_config_reg[*]/C}]
|
| 89 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_lnk_up_int_reg/C] -to [get_pins {i_pcileech_fifo/_cmd_tx_din_reg[16]/D}]
|
| 90 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_reset_out_reg/C]
|
| 91 |
+
|
| 92 |
+
#PCIe signals
|
| 93 |
+
set_property PACKAGE_PIN A13 [get_ports pcie_present]
|
| 94 |
+
set_property PACKAGE_PIN C13 [get_ports pcie_perst_n]
|
| 95 |
+
set_property PACKAGE_PIN B13 [get_ports pcie_wake_n]
|
| 96 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_present]
|
| 97 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_perst_n]
|
| 98 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_wake_n]
|
| 99 |
+
|
| 100 |
+
set_property PACKAGE_PIN C9 [get_ports {pcie_rx_n[0]}]
|
| 101 |
+
set_property PACKAGE_PIN D9 [get_ports {pcie_rx_p[0]}]
|
| 102 |
+
set_property PACKAGE_PIN C7 [get_ports {pcie_tx_n[0]}]
|
| 103 |
+
set_property PACKAGE_PIN D7 [get_ports {pcie_tx_p[0]}]
|
| 104 |
+
|
| 105 |
+
set_property PACKAGE_PIN E10 [get_ports pcie_clk_n]
|
| 106 |
+
set_property PACKAGE_PIN F10 [get_ports pcie_clk_p]
|
| 107 |
+
|
| 108 |
+
create_clock -name pcie_sys_clk_p -period 10.0 [get_nets pcie_clk_p]
|
| 109 |
+
|
| 110 |
+
set_property CFGBVS Vcco [current_design]
|
| 111 |
+
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
| 112 |
+
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
|
| 113 |
+
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
|
| 114 |
+
set_property BITSTREAM.CONFIG.SPI_FALL_EDGE YES [current_design]
|
| 115 |
+
set_property BITSTREAM.CONFIG.CONFIGRATE 66 [current_design]
|
JOKOSAHS_DMA-Pcileech/src/pcileech_com.sv
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech Buffered Communication Core for either:
|
| 3 |
+
// - FT601 USB3.
|
| 4 |
+
// - FPGA RMII ETHERNET.
|
| 5 |
+
//
|
| 6 |
+
//
|
| 7 |
+
// (c) Ulf Frisk, 2019-2024
|
| 8 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 9 |
+
//
|
| 10 |
+
|
| 11 |
+
`timescale 1ns / 1ps
|
| 12 |
+
//`define ENABLE_ETH
|
| 13 |
+
`define ENABLE_FT601
|
| 14 |
+
|
| 15 |
+
module pcileech_com (
|
| 16 |
+
// SYS
|
| 17 |
+
input clk, // 100MHz SYSTEM CLK
|
| 18 |
+
input clk_com, // COMMUNICATION CORE CLK
|
| 19 |
+
input rst,
|
| 20 |
+
output led_state_txdata,
|
| 21 |
+
input led_state_invert,
|
| 22 |
+
|
| 23 |
+
// TO/FROM FIFO
|
| 24 |
+
IfComToFifo.mp_com dfifo,
|
| 25 |
+
|
| 26 |
+
`ifdef ENABLE_FT601
|
| 27 |
+
// FT601
|
| 28 |
+
inout [31:0] ft601_data,
|
| 29 |
+
output [3:0] ft601_be,
|
| 30 |
+
input ft601_rxf_n,
|
| 31 |
+
input ft601_txe_n,
|
| 32 |
+
output ft601_wr_n,
|
| 33 |
+
output ft601_siwu_n,
|
| 34 |
+
output ft601_rd_n,
|
| 35 |
+
output ft601_oe_n
|
| 36 |
+
`endif /* ENABLE_FT601 */
|
| 37 |
+
`ifdef ENABLE_ETH
|
| 38 |
+
// ETH
|
| 39 |
+
output eth_clk50,
|
| 40 |
+
output eth_rst_n,
|
| 41 |
+
input [1:0] eth_rx_data,
|
| 42 |
+
input eth_crs_dv,
|
| 43 |
+
output eth_tx_en,
|
| 44 |
+
output [1:0] eth_tx_data,
|
| 45 |
+
output eth_mdc,
|
| 46 |
+
inout eth_mdio,
|
| 47 |
+
input eth_rx_err,
|
| 48 |
+
input [31:0] eth_cfg_static_addr,
|
| 49 |
+
input eth_cfg_static_force,
|
| 50 |
+
input [15:0] eth_cfg_port,
|
| 51 |
+
output eth_led_state_red,
|
| 52 |
+
output eth_led_state_green
|
| 53 |
+
`endif /* ENABLE_ETH */
|
| 54 |
+
);
|
| 55 |
+
|
| 56 |
+
// ----------------------------------------------------------------------------
|
| 57 |
+
// COMMUNICATION CORE INITIAL ON-BOARD DEFAULT RX-DATA
|
| 58 |
+
// Sometimes there is a need to perform actions - such as setting DRP-related
|
| 59 |
+
// values before the PCIe core is brought online. This is possible by specify
|
| 60 |
+
// "virtual" COM-core initial transmitted values below.
|
| 61 |
+
// ----------------------------------------------------------------------------
|
| 62 |
+
|
| 63 |
+
bit [63:0] initial_rx [5] = '{
|
| 64 |
+
// Modify data below to set own actions - examples:
|
| 65 |
+
// - send some initial TLP on core startup.
|
| 66 |
+
// - set initial VID/PID if PCIe core has been modified.
|
| 67 |
+
// - write to DRP memory space to alter the core.
|
| 68 |
+
// replace / expand on dummy values below - for syntax of each 64-bit word
|
| 69 |
+
// please consult sources and also device_fpga.c in the LeechCore project.
|
| 70 |
+
64'h00000000_00000000,
|
| 71 |
+
64'h00000000_00000000,
|
| 72 |
+
64'h00000000_00000000,
|
| 73 |
+
64'h00000000_00000000,
|
| 74 |
+
|
| 75 |
+
// Bring the PCIe core online from initial hot-reset state. This is done by
|
| 76 |
+
// setting control bit in PCIleech FIFO CMD register. This should ideally be
|
| 77 |
+
// done after DRP&Config actions are completed - but before sending PCIe TLPs.
|
| 78 |
+
64'h00000003_80182377
|
| 79 |
+
};
|
| 80 |
+
|
| 81 |
+
time tickcount64 = 0;
|
| 82 |
+
always @ ( posedge clk )
|
| 83 |
+
tickcount64 <= rst ? 0 : tickcount64 + 1;
|
| 84 |
+
|
| 85 |
+
time tickcount64_com = 0;
|
| 86 |
+
always @ ( posedge clk_com )
|
| 87 |
+
tickcount64_com <= rst ? 0 : tickcount64_com + 1;
|
| 88 |
+
|
| 89 |
+
wire initial_rx_valid = ~rst & (tickcount64 >= 16) & (tickcount64 < $size(initial_rx) + 16);
|
| 90 |
+
wire [63:0] initial_rx_data = initial_rx_valid ? initial_rx[tickcount64 - 16] : 64'h0;
|
| 91 |
+
|
| 92 |
+
// ----------------------------------------------------------------------------
|
| 93 |
+
// COMMUNICATION CORE RX DATA BELOW:
|
| 94 |
+
// 1: convert 32-bit signal into 64-bit signal using logic.
|
| 95 |
+
// 2: change clock domain from clk_com to clk using a very shallow fifo.
|
| 96 |
+
// due to previous 32->64 conversion this will be fine if: 2*clk_com < clk.
|
| 97 |
+
// ----------------------------------------------------------------------------
|
| 98 |
+
|
| 99 |
+
wire [31:0] com_rx_data32;
|
| 100 |
+
wire com_rx_valid32;
|
| 101 |
+
reg [63:0] com_rx_data64;
|
| 102 |
+
reg [1:0] com_rx_valid64_dw;
|
| 103 |
+
wire com_rx_valid64 = com_rx_valid64_dw[0] & com_rx_valid64_dw[1];
|
| 104 |
+
wire [63:0] com_rx_dout;
|
| 105 |
+
wire com_rx_valid;
|
| 106 |
+
|
| 107 |
+
always @ ( posedge clk_com )
|
| 108 |
+
if ( rst | (~com_rx_valid32 & com_rx_valid64_dw[0] & com_rx_valid64_dw[1]) )
|
| 109 |
+
com_rx_valid64_dw <= 2'b00;
|
| 110 |
+
else if ( com_rx_valid32 && (com_rx_data32 == 32'h66665555) && (com_rx_data64[31:0] == 32'h66665555) )
|
| 111 |
+
// resync logic to allow the host to send resync data that will
|
| 112 |
+
// allow bitstream to sync to proper 32->64-bit sequence in case
|
| 113 |
+
// it should have happen to get out of sync at startup/shutdown.
|
| 114 |
+
com_rx_valid64_dw <= 2'b00;
|
| 115 |
+
else if ( com_rx_valid32 )
|
| 116 |
+
begin
|
| 117 |
+
com_rx_data64 <= (com_rx_data64 << 32) | com_rx_data32;
|
| 118 |
+
com_rx_valid64_dw <= (com_rx_valid64_dw == 2'b01) ? 2'b11 : 2'b01;
|
| 119 |
+
end
|
| 120 |
+
|
| 121 |
+
fifo_64_64_clk2_comrx i_fifo_64_64_clk2_comrx(
|
| 122 |
+
.rst ( rst | (tickcount64_com<2) ),
|
| 123 |
+
.wr_clk ( clk_com ),
|
| 124 |
+
.rd_clk ( clk ),
|
| 125 |
+
.din ( com_rx_data64 ),
|
| 126 |
+
.wr_en ( com_rx_valid64 ),
|
| 127 |
+
.rd_en ( 1'b1 ),
|
| 128 |
+
.dout ( com_rx_dout ),
|
| 129 |
+
.full ( ),
|
| 130 |
+
.empty ( ),
|
| 131 |
+
.valid ( com_rx_valid )
|
| 132 |
+
);
|
| 133 |
+
|
| 134 |
+
assign dfifo.com_dout = initial_rx_valid ? initial_rx_data : com_rx_dout;
|
| 135 |
+
assign dfifo.com_dout_valid = initial_rx_valid | com_rx_valid;
|
| 136 |
+
|
| 137 |
+
// ----------------------------------------------------------------------------
|
| 138 |
+
// COMMUNICATION CORE TX DATA BELOW:
|
| 139 |
+
// ----------------------------------------------------------------------------
|
| 140 |
+
|
| 141 |
+
wire [31:0] core_din;
|
| 142 |
+
wire core_din_empty;
|
| 143 |
+
wire core_din_wr_en;
|
| 144 |
+
wire core_din_ready;
|
| 145 |
+
|
| 146 |
+
wire [31:0] com_tx_data;
|
| 147 |
+
wire com_tx_wr_en;
|
| 148 |
+
wire com_tx_almost_full;
|
| 149 |
+
wire com_tx_prog_full;
|
| 150 |
+
wire com_tx_prog_empty;
|
| 151 |
+
|
| 152 |
+
wire out_buffer1_almost_full;
|
| 153 |
+
|
| 154 |
+
assign dfifo.com_din_ready = ~out_buffer1_almost_full;
|
| 155 |
+
assign led_state_txdata = com_tx_prog_full ^ led_state_invert;
|
| 156 |
+
|
| 157 |
+
fifo_32_32_clk1_comtx i_fifo_32_32_clk2_comtx(
|
| 158 |
+
.clk ( clk_com ),
|
| 159 |
+
.srst ( rst ),
|
| 160 |
+
.din ( com_tx_data ),
|
| 161 |
+
.wr_en ( com_tx_wr_en ),
|
| 162 |
+
.rd_en ( core_din_ready ),
|
| 163 |
+
.dout ( core_din ),
|
| 164 |
+
.full ( ),
|
| 165 |
+
.almost_full ( com_tx_almost_full ),
|
| 166 |
+
.empty ( core_din_empty ),
|
| 167 |
+
.prog_empty ( com_tx_prog_empty ), // threshold = 3
|
| 168 |
+
.prog_full ( com_tx_prog_full ), // threshold = 6
|
| 169 |
+
.valid ( core_din_wr_en )
|
| 170 |
+
);
|
| 171 |
+
fifo_256_32_clk2_comtx i_fifo_256_32_clk2_comtx(
|
| 172 |
+
.rd_clk ( clk_com ),
|
| 173 |
+
.wr_clk ( clk ),
|
| 174 |
+
.rst ( rst ),
|
| 175 |
+
.din ( dfifo.com_din ),
|
| 176 |
+
.wr_en ( dfifo.com_din_wr_en ),
|
| 177 |
+
.rd_en ( ~com_tx_almost_full ),
|
| 178 |
+
.dout ( com_tx_data ),
|
| 179 |
+
.full ( ),
|
| 180 |
+
.almost_full ( out_buffer1_almost_full ),
|
| 181 |
+
.empty ( ),
|
| 182 |
+
.valid ( com_tx_wr_en )
|
| 183 |
+
);
|
| 184 |
+
|
| 185 |
+
// ----------------------------------------------------
|
| 186 |
+
// FT601 USB3 BELOW:
|
| 187 |
+
// ----------------------------------------------------
|
| 188 |
+
`ifdef ENABLE_FT601
|
| 189 |
+
|
| 190 |
+
pcileech_ft601 i_pcileech_ft601(
|
| 191 |
+
// SYS
|
| 192 |
+
.clk ( clk_com ),
|
| 193 |
+
.rst ( rst ),
|
| 194 |
+
// TO/FROM FT601 PADS
|
| 195 |
+
.FT601_DATA ( ft601_data ),
|
| 196 |
+
.FT601_BE ( ft601_be ),
|
| 197 |
+
.FT601_TXE_N ( ft601_txe_n ),
|
| 198 |
+
.FT601_RXF_N ( ft601_rxf_n ),
|
| 199 |
+
.FT601_SIWU_N ( ft601_siwu_n ),
|
| 200 |
+
.FT601_WR_N ( ft601_wr_n ),
|
| 201 |
+
.FT601_RD_N ( ft601_rd_n ),
|
| 202 |
+
.FT601_OE_N ( ft601_oe_n ),
|
| 203 |
+
// TO/FROM FIFO
|
| 204 |
+
.dout ( com_rx_data32 ), // -> [31:0]
|
| 205 |
+
.dout_valid ( com_rx_valid32 ), // ->
|
| 206 |
+
.din ( core_din ), // <- [31:0]
|
| 207 |
+
.din_wr_en ( core_din_wr_en ), // <-
|
| 208 |
+
.din_req_data ( core_din_ready ) // ->
|
| 209 |
+
);
|
| 210 |
+
`endif /* ENABLE_FT601 */
|
| 211 |
+
|
| 212 |
+
// ----------------------------------------------------
|
| 213 |
+
// UDP Ethernet Below:
|
| 214 |
+
// ----------------------------------------------------
|
| 215 |
+
`ifdef ENABLE_ETH
|
| 216 |
+
|
| 217 |
+
pcileech_eth i_pcileech_eth(
|
| 218 |
+
// SYS
|
| 219 |
+
.clk ( clk_com ),
|
| 220 |
+
.rst ( rst ),
|
| 221 |
+
// MAC/RMII
|
| 222 |
+
.eth_clk50 ( eth_clk50 ),
|
| 223 |
+
.eth_rst_n ( eth_rst_n ),
|
| 224 |
+
.eth_crs_dv ( eth_crs_dv ),
|
| 225 |
+
.eth_rx_data ( eth_rx_data ),
|
| 226 |
+
.eth_rx_err ( eth_rx_err ),
|
| 227 |
+
.eth_tx_en ( eth_tx_en ),
|
| 228 |
+
.eth_tx_data ( eth_tx_data ),
|
| 229 |
+
.eth_mdc ( eth_mdc ),
|
| 230 |
+
.eth_mdio ( eth_mdio ),
|
| 231 |
+
// CFG
|
| 232 |
+
.cfg_static_addr ( eth_cfg_static_addr ), // <- [31:0]
|
| 233 |
+
.cfg_static_force ( eth_cfg_static_force ), // <-
|
| 234 |
+
.cfg_port ( eth_cfg_port ), // <- [15:0]
|
| 235 |
+
// State and Activity LEDs
|
| 236 |
+
.led_state_red ( eth_led_state_red ), // ->
|
| 237 |
+
.led_state_green ( eth_led_state_green ), // ->
|
| 238 |
+
// TO/FROM FIFO
|
| 239 |
+
.dout ( com_rx_data32 ), // -> [31:0]
|
| 240 |
+
.dout_valid ( com_rx_valid32 ), // ->
|
| 241 |
+
.din ( core_din ), // <- [31:0]
|
| 242 |
+
.din_empty ( core_din_empty ), // <-
|
| 243 |
+
.din_wr_en ( core_din_wr_en ), // <-
|
| 244 |
+
.din_ready ( core_din_ready ) // ->
|
| 245 |
+
);
|
| 246 |
+
`endif /* ENABLE_ETH */
|
| 247 |
+
|
| 248 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/src/pcileech_com_e.v
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
JOKOSAHS_DMA-Pcileech/src/pcileech_enigma_x1.xdc
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set_property PACKAGE_PIN V20 [get_ports ft601_be[0]]
|
| 2 |
+
set_property PACKAGE_PIN V19 [get_ports ft601_be[1]]
|
| 3 |
+
set_property PACKAGE_PIN W20 [get_ports ft601_be[2]]
|
| 4 |
+
set_property PACKAGE_PIN AB20 [get_ports ft601_be[3]]
|
| 5 |
+
set_property PACKAGE_PIN H20 [get_ports ft601_data[0]]
|
| 6 |
+
set_property PACKAGE_PIN H22 [get_ports ft601_data[1]]
|
| 7 |
+
set_property PACKAGE_PIN J21 [get_ports ft601_data[2]]
|
| 8 |
+
set_property PACKAGE_PIN J22 [get_ports ft601_data[3]]
|
| 9 |
+
set_property PACKAGE_PIN K21 [get_ports ft601_data[4]]
|
| 10 |
+
set_property PACKAGE_PIN K22 [get_ports ft601_data[5]]
|
| 11 |
+
set_property PACKAGE_PIN L21 [get_ports ft601_data[6]]
|
| 12 |
+
set_property PACKAGE_PIN N18 [get_ports ft601_data[7]]
|
| 13 |
+
set_property PACKAGE_PIN M18 [get_ports ft601_data[8]]
|
| 14 |
+
set_property PACKAGE_PIN L20 [get_ports ft601_data[9]]
|
| 15 |
+
set_property PACKAGE_PIN L19 [get_ports ft601_data[10]]
|
| 16 |
+
set_property PACKAGE_PIN M20 [get_ports ft601_data[11]]
|
| 17 |
+
set_property PACKAGE_PIN M22 [get_ports ft601_data[12]]
|
| 18 |
+
set_property PACKAGE_PIN M21 [get_ports ft601_data[13]]
|
| 19 |
+
set_property PACKAGE_PIN N22 [get_ports ft601_data[14]]
|
| 20 |
+
set_property PACKAGE_PIN N20 [get_ports ft601_data[15]]
|
| 21 |
+
set_property PACKAGE_PIN P15 [get_ports ft601_data[16]]
|
| 22 |
+
set_property PACKAGE_PIN T21 [get_ports ft601_data[17]]
|
| 23 |
+
set_property PACKAGE_PIN R16 [get_ports ft601_data[18]]
|
| 24 |
+
# OLD ft601_data[19]
|
| 25 |
+
#set_property PACKAGE_PIN T20 [get_ports ft601_data[19]]
|
| 26 |
+
# NEW ft601_data[19]
|
| 27 |
+
set_property PACKAGE_PIN T18 [get_ports ft601_data[19]]
|
| 28 |
+
set_property PACKAGE_PIN U17 [get_ports ft601_data[20]]
|
| 29 |
+
set_property PACKAGE_PIN U20 [get_ports ft601_data[21]]
|
| 30 |
+
set_property PACKAGE_PIN U21 [get_ports ft601_data[22]]
|
| 31 |
+
set_property PACKAGE_PIN V22 [get_ports ft601_data[23]]
|
| 32 |
+
set_property PACKAGE_PIN W22 [get_ports ft601_data[24]]
|
| 33 |
+
set_property PACKAGE_PIN W21 [get_ports ft601_data[25]]
|
| 34 |
+
set_property PACKAGE_PIN Y22 [get_ports ft601_data[26]]
|
| 35 |
+
set_property PACKAGE_PIN Y21 [get_ports ft601_data[27]]
|
| 36 |
+
set_property PACKAGE_PIN AB22 [get_ports ft601_data[28]]
|
| 37 |
+
set_property PACKAGE_PIN AA21 [get_ports ft601_data[29]]
|
| 38 |
+
set_property PACKAGE_PIN AB21 [get_ports ft601_data[30]]
|
| 39 |
+
set_property PACKAGE_PIN AA20 [get_ports ft601_data[31]]
|
| 40 |
+
set_property PACKAGE_PIN W17 [get_ports ft601_oe_n]
|
| 41 |
+
set_property PACKAGE_PIN P16 [get_ports ft601_rd_n]
|
| 42 |
+
set_property PACKAGE_PIN AA18 [get_ports ft601_rxf_n]
|
| 43 |
+
set_property PACKAGE_PIN AB18 [get_ports ft601_siwu_n]
|
| 44 |
+
set_property PACKAGE_PIN AA19 [get_ports ft601_txe_n]
|
| 45 |
+
set_property PACKAGE_PIN W19 [get_ports ft601_wr_n]
|
| 46 |
+
set_property PACKAGE_PIN N13 [get_ports ft601_rst_n]
|
| 47 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_txe_n ft601_rxf_n}]
|
| 48 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 49 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 50 |
+
set_property SLEW FAST [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 51 |
+
set_property SLEW FAST [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 52 |
+
|
| 53 |
+
set_property PACKAGE_PIN G21 [get_ports user_ld1_n]
|
| 54 |
+
set_property PACKAGE_PIN G22 [get_ports user_ld2_n]
|
| 55 |
+
set_property PACKAGE_PIN F19 [get_ports user_sw1_n]
|
| 56 |
+
set_property PACKAGE_PIN F20 [get_ports user_sw2_n]
|
| 57 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {user_ld1_n user_ld2_n user_sw1_n user_sw2_n}]
|
| 58 |
+
|
| 59 |
+
# SYSCLK
|
| 60 |
+
set_property PACKAGE_PIN J19 [get_ports clk]
|
| 61 |
+
set_property IOSTANDARD LVCMOS33 [get_ports clk]
|
| 62 |
+
create_clock -period 10.000 -name net_clk -waveform {0.000 5.000} [get_ports clk]
|
| 63 |
+
|
| 64 |
+
# FT601 CLK
|
| 65 |
+
create_clock -period 10.000 -name net_ft601_clk -waveform {0.000 5.000} [get_ports ft601_clk]
|
| 66 |
+
set_property IOSTANDARD LVCMOS33 [get_ports ft601_clk]
|
| 67 |
+
set_property PACKAGE_PIN K18 [get_ports ft601_clk]
|
| 68 |
+
|
| 69 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports {ft601_data[*]}]
|
| 70 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports {ft601_data[*]}]
|
| 71 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_rxf_n]
|
| 72 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_rxf_n]
|
| 73 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_txe_n]
|
| 74 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_txe_n]
|
| 75 |
+
|
| 76 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 77 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 78 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 79 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 80 |
+
|
| 81 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_OE_N_reg]
|
| 82 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_RD_N_reg]
|
| 83 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_WR_N_reg]
|
| 84 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_DATA_OUT_reg[0][*]]
|
| 85 |
+
|
| 86 |
+
set_multicycle_path 2 -from [get_pins i_pcileech_com/i_pcileech_ft601/OE_reg/C] -to [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 87 |
+
set_false_path -from [get_pins {tickcount64_reg[*]/C}]
|
| 88 |
+
set_false_path -from [get_pins {i_pcileech_fifo/_pcie_core_config_reg[*]/C}]
|
| 89 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_lnk_up_int_reg/C] -to [get_pins {i_pcileech_fifo/_cmd_tx_din_reg[16]/D}]
|
| 90 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_reset_out_reg/C]
|
| 91 |
+
|
| 92 |
+
#PCIe signals
|
| 93 |
+
set_property PACKAGE_PIN A13 [get_ports pcie_present]
|
| 94 |
+
set_property PACKAGE_PIN C13 [get_ports pcie_perst_n]
|
| 95 |
+
set_property PACKAGE_PIN B13 [get_ports pcie_wake_n]
|
| 96 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_present]
|
| 97 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_perst_n]
|
| 98 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_wake_n]
|
| 99 |
+
|
| 100 |
+
set_property PACKAGE_PIN C9 [get_ports {pcie_rx_n[0]}]
|
| 101 |
+
set_property PACKAGE_PIN D9 [get_ports {pcie_rx_p[0]}]
|
| 102 |
+
set_property PACKAGE_PIN C7 [get_ports {pcie_tx_n[0]}]
|
| 103 |
+
set_property PACKAGE_PIN D7 [get_ports {pcie_tx_p[0]}]
|
| 104 |
+
|
| 105 |
+
set_property PACKAGE_PIN E10 [get_ports pcie_clk_n]
|
| 106 |
+
set_property PACKAGE_PIN F10 [get_ports pcie_clk_p]
|
| 107 |
+
|
| 108 |
+
create_clock -name pcie_sys_clk_p -period 10.0 [get_nets pcie_clk_p]
|
| 109 |
+
|
| 110 |
+
set_property CFGBVS Vcco [current_design]
|
| 111 |
+
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
| 112 |
+
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
|
| 113 |
+
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
|
| 114 |
+
set_property BITSTREAM.CONFIG.SPI_FALL_EDGE YES [current_design]
|
| 115 |
+
set_property BITSTREAM.CONFIG.CONFIGRATE 66 [current_design]
|
JOKOSAHS_DMA-Pcileech/src/pcileech_enigma_x1_top.sv
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// Top module for the Enigma X1 Artix-7 board.
|
| 5 |
+
//
|
| 6 |
+
// (c) Ulf Frisk, 2019-2024
|
| 7 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
`timescale 1ns / 1ps
|
| 11 |
+
`include "pcileech_header.svh"
|
| 12 |
+
|
| 13 |
+
module pcileech_enigma_x1_top #(
|
| 14 |
+
// DEVICE IDs as follows:
|
| 15 |
+
// 0 = SP605, 1 = PCIeScreamer R1, 2 = AC701, 3 = PCIeScreamer R2, 4 = Screamer, 5 = NeTV2
|
| 16 |
+
parameter PARAM_DEVICE_ID = 9,
|
| 17 |
+
parameter PARAM_VERSION_NUMBER_MAJOR = 4,
|
| 18 |
+
parameter PARAM_VERSION_NUMBER_MINOR = 13,
|
| 19 |
+
parameter PARAM_CUSTOM_VALUE = 32'hffffffff
|
| 20 |
+
) (
|
| 21 |
+
// SYS
|
| 22 |
+
input clk,
|
| 23 |
+
input ft601_clk,
|
| 24 |
+
|
| 25 |
+
// SYSTEM LEDs and BUTTONs
|
| 26 |
+
output user_ld1_n,
|
| 27 |
+
output user_ld2_n,
|
| 28 |
+
input user_sw1_n,
|
| 29 |
+
input user_sw2_n,
|
| 30 |
+
|
| 31 |
+
// PCI-E FABRIC
|
| 32 |
+
output [0:0] pcie_tx_p,
|
| 33 |
+
output [0:0] pcie_tx_n,
|
| 34 |
+
input [0:0] pcie_rx_p,
|
| 35 |
+
input [0:0] pcie_rx_n,
|
| 36 |
+
input pcie_clk_p,
|
| 37 |
+
input pcie_clk_n,
|
| 38 |
+
input pcie_present,
|
| 39 |
+
input pcie_perst_n,
|
| 40 |
+
output reg pcie_wake_n = 1'b1,
|
| 41 |
+
|
| 42 |
+
// TO/FROM FT601 PADS
|
| 43 |
+
output ft601_rst_n,
|
| 44 |
+
|
| 45 |
+
inout [31:0] ft601_data,
|
| 46 |
+
output [3:0] ft601_be,
|
| 47 |
+
input ft601_rxf_n,
|
| 48 |
+
input ft601_txe_n,
|
| 49 |
+
output ft601_wr_n,
|
| 50 |
+
output ft601_siwu_n,
|
| 51 |
+
output ft601_rd_n,
|
| 52 |
+
output ft601_oe_n
|
| 53 |
+
);
|
| 54 |
+
|
| 55 |
+
// SYS
|
| 56 |
+
wire rst;
|
| 57 |
+
|
| 58 |
+
// FIFO CTL <--> COM CTL
|
| 59 |
+
wire [63:0] com_dout;
|
| 60 |
+
wire com_dout_valid;
|
| 61 |
+
wire [255:0] com_din;
|
| 62 |
+
wire com_din_wr_en;
|
| 63 |
+
wire com_din_ready;
|
| 64 |
+
wire led_com;
|
| 65 |
+
wire led_pcie;
|
| 66 |
+
|
| 67 |
+
// FIFO CTL <--> COM CTL
|
| 68 |
+
IfComToFifo dcom_fifo();
|
| 69 |
+
|
| 70 |
+
// FIFO CTL <--> PCIe
|
| 71 |
+
IfPCIeFifoCfg dcfg();
|
| 72 |
+
IfPCIeFifoTlp dtlp();
|
| 73 |
+
IfPCIeFifoCore dpcie();
|
| 74 |
+
IfShadow2Fifo dshadow2fifo();
|
| 75 |
+
|
| 76 |
+
// ----------------------------------------------------
|
| 77 |
+
// TickCount64 CLK
|
| 78 |
+
// ----------------------------------------------------
|
| 79 |
+
|
| 80 |
+
time tickcount64 = 0;
|
| 81 |
+
time tickcount64_reload = 0;
|
| 82 |
+
always @ ( posedge clk ) begin
|
| 83 |
+
tickcount64 <= user_sw2_n ? (tickcount64 + 1) : 0;
|
| 84 |
+
tickcount64_reload <= user_sw2_n ? 0 : (tickcount64_reload + 1);
|
| 85 |
+
end
|
| 86 |
+
|
| 87 |
+
assign rst = ~user_sw2_n || ((tickcount64 < 64) ? 1'b1 : 1'b0);
|
| 88 |
+
assign ft601_rst_n = ~rst;
|
| 89 |
+
wire led_pwronblink = ~user_sw1_n ^ (tickcount64[24] & (tickcount64[63:27] == 0));
|
| 90 |
+
|
| 91 |
+
OBUF led_ld1_obuf(.O(user_ld1_n), .I(~led_pcie));
|
| 92 |
+
OBUF led_ld2_obuf(.O(user_ld2_n), .I(~led_com));
|
| 93 |
+
|
| 94 |
+
// ----------------------------------------------------
|
| 95 |
+
// BUFFERED COMMUNICATION DEVICE (FT601)
|
| 96 |
+
// ----------------------------------------------------
|
| 97 |
+
|
| 98 |
+
pcileech_com i_pcileech_com (
|
| 99 |
+
// SYS
|
| 100 |
+
.clk ( clk ),
|
| 101 |
+
.clk_com ( ft601_clk ),
|
| 102 |
+
.rst ( rst ),
|
| 103 |
+
.led_state_txdata ( led_com ), // ->
|
| 104 |
+
.led_state_invert ( led_pwronblink ), // <-
|
| 105 |
+
// FIFO CTL <--> COM CTL
|
| 106 |
+
.dfifo ( dcom_fifo.mp_com ),
|
| 107 |
+
// TO/FROM FT601 PADS
|
| 108 |
+
.ft601_data ( ft601_data ), // <> [31:0]
|
| 109 |
+
.ft601_be ( ft601_be ), // -> [3:0]
|
| 110 |
+
.ft601_txe_n ( ft601_txe_n ), // <-
|
| 111 |
+
.ft601_rxf_n ( ft601_rxf_n ), // <-
|
| 112 |
+
.ft601_siwu_n ( ft601_siwu_n ), // ->
|
| 113 |
+
.ft601_wr_n ( ft601_wr_n ), // ->
|
| 114 |
+
.ft601_rd_n ( ft601_rd_n ), // ->
|
| 115 |
+
.ft601_oe_n ( ft601_oe_n ) // ->
|
| 116 |
+
);
|
| 117 |
+
|
| 118 |
+
// ----------------------------------------------------
|
| 119 |
+
// FIFO CTL
|
| 120 |
+
// ----------------------------------------------------
|
| 121 |
+
|
| 122 |
+
pcileech_fifo #(
|
| 123 |
+
.PARAM_DEVICE_ID ( PARAM_DEVICE_ID ),
|
| 124 |
+
.PARAM_VERSION_NUMBER_MAJOR ( PARAM_VERSION_NUMBER_MAJOR ),
|
| 125 |
+
.PARAM_VERSION_NUMBER_MINOR ( PARAM_VERSION_NUMBER_MINOR ),
|
| 126 |
+
.PARAM_CUSTOM_VALUE ( PARAM_CUSTOM_VALUE )
|
| 127 |
+
) i_pcileech_fifo (
|
| 128 |
+
.clk ( clk ),
|
| 129 |
+
.rst ( rst ),
|
| 130 |
+
.rst_cfg_reload ( (tickcount64_reload > 500000000) ? 1'b1 : 1'b0 ), // config reload after 5s button press
|
| 131 |
+
.pcie_present ( pcie_present ),
|
| 132 |
+
.pcie_perst_n ( pcie_perst_n ),
|
| 133 |
+
// FIFO CTL <--> COM CTL
|
| 134 |
+
.dcom ( dcom_fifo.mp_fifo ),
|
| 135 |
+
// FIFO CTL <--> PCIe
|
| 136 |
+
.dcfg ( dcfg.mp_fifo ),
|
| 137 |
+
.dtlp ( dtlp.mp_fifo ),
|
| 138 |
+
.dpcie ( dpcie.mp_fifo ),
|
| 139 |
+
.dshadow2fifo ( dshadow2fifo.fifo )
|
| 140 |
+
);
|
| 141 |
+
|
| 142 |
+
// ----------------------------------------------------
|
| 143 |
+
// PCIe
|
| 144 |
+
// ----------------------------------------------------
|
| 145 |
+
|
| 146 |
+
pcileech_pcie_a7 i_pcileech_pcie_a7(
|
| 147 |
+
.clk_sys ( clk ),
|
| 148 |
+
.rst ( rst ),
|
| 149 |
+
// PCIe fabric
|
| 150 |
+
.pcie_tx_p ( pcie_tx_p ),
|
| 151 |
+
.pcie_tx_n ( pcie_tx_n ),
|
| 152 |
+
.pcie_rx_p ( pcie_rx_p ),
|
| 153 |
+
.pcie_rx_n ( pcie_rx_n ),
|
| 154 |
+
.pcie_clk_p ( pcie_clk_p ),
|
| 155 |
+
.pcie_clk_n ( pcie_clk_n ),
|
| 156 |
+
.pcie_perst_n ( pcie_perst_n ),
|
| 157 |
+
// State and Activity LEDs
|
| 158 |
+
.led_state ( led_pcie ),
|
| 159 |
+
// FIFO CTL <--> PCIe
|
| 160 |
+
.dfifo_cfg ( dcfg.mp_pcie ),
|
| 161 |
+
.dfifo_tlp ( dtlp.mp_pcie ),
|
| 162 |
+
.dfifo_pcie ( dpcie.mp_pcie ),
|
| 163 |
+
.dshadow2fifo ( dshadow2fifo.shadow )
|
| 164 |
+
);
|
| 165 |
+
|
| 166 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/src/pcileech_fifo.sv
ADDED
|
@@ -0,0 +1,458 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// FIFO network / control.
|
| 5 |
+
//
|
| 6 |
+
// (c) Ulf Frisk, 2017-2024
|
| 7 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 8 |
+
// Special thanks to: Dmytro Oleksiuk @d_olex
|
| 9 |
+
//
|
| 10 |
+
|
| 11 |
+
`timescale 1ns / 1ps
|
| 12 |
+
`include "pcileech_header.svh"
|
| 13 |
+
|
| 14 |
+
`define ENABLE_STARTUPE2
|
| 15 |
+
|
| 16 |
+
module pcileech_fifo #(
|
| 17 |
+
parameter PARAM_DEVICE_ID = 0,
|
| 18 |
+
parameter PARAM_VERSION_NUMBER_MAJOR = 0,
|
| 19 |
+
parameter PARAM_VERSION_NUMBER_MINOR = 0,
|
| 20 |
+
parameter PARAM_CUSTOM_VALUE = 0
|
| 21 |
+
) (
|
| 22 |
+
input clk,
|
| 23 |
+
input rst,
|
| 24 |
+
input rst_cfg_reload,
|
| 25 |
+
|
| 26 |
+
input pcie_present,
|
| 27 |
+
input pcie_perst_n,
|
| 28 |
+
|
| 29 |
+
IfComToFifo.mp_fifo dcom,
|
| 30 |
+
|
| 31 |
+
IfPCIeFifoCfg.mp_fifo dcfg,
|
| 32 |
+
IfPCIeFifoTlp.mp_fifo dtlp,
|
| 33 |
+
IfPCIeFifoCore.mp_fifo dpcie,
|
| 34 |
+
IfShadow2Fifo.fifo dshadow2fifo
|
| 35 |
+
);
|
| 36 |
+
|
| 37 |
+
// ----------------------------------------------------
|
| 38 |
+
// TickCount64
|
| 39 |
+
// ----------------------------------------------------
|
| 40 |
+
|
| 41 |
+
time tickcount64 = 0;
|
| 42 |
+
always @ ( posedge clk )
|
| 43 |
+
tickcount64 <= tickcount64 + 1;
|
| 44 |
+
|
| 45 |
+
// ----------------------------------------------------------------------------
|
| 46 |
+
// RX FROM USB/FT601/FT245 BELOW:
|
| 47 |
+
// ----------------------------------------------------------------------------
|
| 48 |
+
// Incoming data received from FT601 is converted from 32-bit to 64-bit.
|
| 49 |
+
// This always happen regardless whether receiving FIFOs are full or not.
|
| 50 |
+
// The actual data contains a MAGIC which tells which receiving FIFO should
|
| 51 |
+
// accept the data. Receiving TYPEs are: PCIe TLP, PCIe CFG, Loopback, Command.
|
| 52 |
+
//
|
| 53 |
+
// /--> PCIe TLP (32-bit)
|
| 54 |
+
// |
|
| 55 |
+
// FT601 --+--> PCIe CFG (64-bit)
|
| 56 |
+
// |
|
| 57 |
+
// +--> LOOPBACK (32-bit)
|
| 58 |
+
// |
|
| 59 |
+
// \--> COMMAND (64-bit)
|
| 60 |
+
//
|
| 61 |
+
|
| 62 |
+
// ----------------------------------------------------------
|
| 63 |
+
// Route 64-bit incoming FT601 data to correct receiver below:
|
| 64 |
+
// ----------------------------------------------------------
|
| 65 |
+
`define CHECK_MAGIC (dcom.com_dout[7:0] == 8'h77)
|
| 66 |
+
`define CHECK_TYPE_TLP (dcom.com_dout[9:8] == 2'b00)
|
| 67 |
+
`define CHECK_TYPE_CFG (dcom.com_dout[9:8] == 2'b01)
|
| 68 |
+
`define CHECK_TYPE_LOOP (dcom.com_dout[9:8] == 2'b10)
|
| 69 |
+
`define CHECK_TYPE_CMD (dcom.com_dout[9:8] == 2'b11)
|
| 70 |
+
|
| 71 |
+
assign dtlp.tx_valid = dcom.com_dout_valid & `CHECK_MAGIC & `CHECK_TYPE_TLP;
|
| 72 |
+
assign dcfg.tx_valid = dcom.com_dout_valid & `CHECK_MAGIC & `CHECK_TYPE_CFG;
|
| 73 |
+
wire _loop_rx_wren = dcom.com_dout_valid & `CHECK_MAGIC & `CHECK_TYPE_LOOP;
|
| 74 |
+
wire _cmd_rx_wren = dcom.com_dout_valid & `CHECK_MAGIC & `CHECK_TYPE_CMD;
|
| 75 |
+
|
| 76 |
+
// Incoming TLPs are forwarded to PCIe core logic.
|
| 77 |
+
assign dtlp.tx_data = dcom.com_dout[63:32];
|
| 78 |
+
assign dtlp.tx_last = dcom.com_dout[10];
|
| 79 |
+
// Incoming CFGs are forwarded to PCIe core logic.
|
| 80 |
+
assign dcfg.tx_data = dcom.com_dout;
|
| 81 |
+
|
| 82 |
+
// ----------------------------------------------------------------------------
|
| 83 |
+
// TX TO USB/FT601/FT245 BELOW:
|
| 84 |
+
// ----------------------------------------------------------------------------
|
| 85 |
+
//
|
| 86 |
+
// MULTIPLEXER
|
| 87 |
+
// ===========
|
| 88 |
+
// 1st priority
|
| 89 |
+
// PCIe TLP ->(32-bit) --------------------->--\
|
| 90 |
+
// 2nd | /-----------------------------------------\
|
| 91 |
+
// PCIe CFG ->(32-bit)---------------------->--+--> | 256-> BUFFER FIFO (NATIVE OR DRAM) ->32 | -> FT601
|
| 92 |
+
// | \-----------------------------------------/
|
| 93 |
+
// /--------------------------\ 3rd |
|
| 94 |
+
// FT601 -> | 34-> Loopback FIFO ->34 | ->--/
|
| 95 |
+
// \--------------------------/ |
|
| 96 |
+
// |
|
| 97 |
+
// /--------------------------\ 4th |
|
| 98 |
+
// COMMAND -> | 34-> Command FIFO ->34 | ->--/
|
| 99 |
+
// \--------------------------/
|
| 100 |
+
//
|
| 101 |
+
|
| 102 |
+
// ----------------------------------------------------------
|
| 103 |
+
// LOOPBACK FIFO:
|
| 104 |
+
// ----------------------------------------------------------
|
| 105 |
+
wire [33:0] _loop_dout;
|
| 106 |
+
wire _loop_valid;
|
| 107 |
+
wire _loop_rd_en;
|
| 108 |
+
fifo_34_34 i_fifo_loop_tx(
|
| 109 |
+
.clk ( clk ),
|
| 110 |
+
.srst ( rst ),
|
| 111 |
+
.rd_en ( _loop_rd_en ),
|
| 112 |
+
.dout ( _loop_dout ),
|
| 113 |
+
.din ( {dcom.com_dout[11:10], dcom.com_dout[63:32]} ),
|
| 114 |
+
.wr_en ( _loop_rx_wren ),
|
| 115 |
+
.full ( ),
|
| 116 |
+
.almost_full ( ),
|
| 117 |
+
.empty ( ),
|
| 118 |
+
.valid ( _loop_valid )
|
| 119 |
+
);
|
| 120 |
+
|
| 121 |
+
// ----------------------------------------------------------
|
| 122 |
+
// COMMAND FIFO:
|
| 123 |
+
// ----------------------------------------------------------
|
| 124 |
+
wire [33:0] _cmd_tx_dout;
|
| 125 |
+
wire _cmd_tx_valid;
|
| 126 |
+
wire _cmd_tx_rd_en;
|
| 127 |
+
wire _cmd_tx_almost_full;
|
| 128 |
+
reg _cmd_tx_wr_en;
|
| 129 |
+
reg [33:0] _cmd_tx_din;
|
| 130 |
+
fifo_34_34 i_fifo_cmd_tx(
|
| 131 |
+
.clk ( clk ),
|
| 132 |
+
.srst ( rst ),
|
| 133 |
+
.rd_en ( _cmd_tx_rd_en ),
|
| 134 |
+
.dout ( _cmd_tx_dout ),
|
| 135 |
+
.din ( _cmd_tx_din ),
|
| 136 |
+
.wr_en ( _cmd_tx_wr_en ),
|
| 137 |
+
.full ( ),
|
| 138 |
+
.almost_full ( _cmd_tx_almost_full ),
|
| 139 |
+
.empty ( ),
|
| 140 |
+
.valid ( _cmd_tx_valid )
|
| 141 |
+
);
|
| 142 |
+
|
| 143 |
+
// ----------------------------------------------------------
|
| 144 |
+
// MULTIPLEXER
|
| 145 |
+
// ----------------------------------------------------------
|
| 146 |
+
pcileech_mux i_pcileech_mux(
|
| 147 |
+
.clk ( clk ),
|
| 148 |
+
.rst ( rst ),
|
| 149 |
+
// output
|
| 150 |
+
.dout ( dcom.com_din ),
|
| 151 |
+
.valid ( dcom.com_din_wr_en ),
|
| 152 |
+
.rd_en ( dcom.com_din_ready ),
|
| 153 |
+
// LOOPBACK:
|
| 154 |
+
.p0_din ( _loop_dout[31:0] ),
|
| 155 |
+
.p0_tag ( 2'b10 ),
|
| 156 |
+
.p0_ctx ( _loop_dout[33:32] ),
|
| 157 |
+
.p0_wr_en ( _loop_valid ),
|
| 158 |
+
.p0_req_data ( _loop_rd_en ),
|
| 159 |
+
// COMMAND:
|
| 160 |
+
.p1_din ( _cmd_tx_dout[31:0] ),
|
| 161 |
+
.p1_tag ( 2'b11 ),
|
| 162 |
+
.p1_ctx ( _cmd_tx_dout[33:32] ),
|
| 163 |
+
.p1_wr_en ( _cmd_tx_valid ),
|
| 164 |
+
.p1_req_data ( _cmd_tx_rd_en ),
|
| 165 |
+
// PCIe CFG
|
| 166 |
+
.p2_din ( dcfg.rx_data ),
|
| 167 |
+
.p2_tag ( 2'b01 ),
|
| 168 |
+
.p2_ctx ( 2'b00 ),
|
| 169 |
+
.p2_wr_en ( dcfg.rx_valid ),
|
| 170 |
+
.p2_req_data ( dcfg.rx_rd_en ),
|
| 171 |
+
// PCIe TLP #1
|
| 172 |
+
.p3_din ( dtlp.rx_data[0] ),
|
| 173 |
+
.p3_tag ( 2'b00 ),
|
| 174 |
+
.p3_ctx ( {dtlp.rx_first[0], dtlp.rx_last[0]} ),
|
| 175 |
+
.p3_wr_en ( dtlp.rx_valid[0] ),
|
| 176 |
+
.p3_req_data ( dtlp.rx_rd_en ),
|
| 177 |
+
// PCIe TLP #2
|
| 178 |
+
.p4_din ( dtlp.rx_data[1] ),
|
| 179 |
+
.p4_tag ( 2'b00 ),
|
| 180 |
+
.p4_ctx ( {dtlp.rx_first[1], dtlp.rx_last[1]} ),
|
| 181 |
+
.p4_wr_en ( dtlp.rx_valid[1] ),
|
| 182 |
+
.p4_req_data ( ),
|
| 183 |
+
// PCIe TLP #3
|
| 184 |
+
.p5_din ( dtlp.rx_data[2] ),
|
| 185 |
+
.p5_tag ( 2'b00 ),
|
| 186 |
+
.p5_ctx ( {dtlp.rx_first[2], dtlp.rx_last[2]} ),
|
| 187 |
+
.p5_wr_en ( dtlp.rx_valid[2] ),
|
| 188 |
+
.p5_req_data ( dtlp.rx_rd_en ),
|
| 189 |
+
// PCIe TLP #4
|
| 190 |
+
.p6_din ( dtlp.rx_data[3] ),
|
| 191 |
+
.p6_tag ( 2'b00 ),
|
| 192 |
+
.p6_ctx ( {dtlp.rx_first[3], dtlp.rx_last[3]} ),
|
| 193 |
+
.p6_wr_en ( dtlp.rx_valid[3] ),
|
| 194 |
+
.p6_req_data ( ),
|
| 195 |
+
// P7
|
| 196 |
+
.p7_din ( 32'h00000000 ),
|
| 197 |
+
.p7_tag ( 2'b11 ),
|
| 198 |
+
.p7_ctx ( 2'b00 ),
|
| 199 |
+
.p7_wr_en ( 1'b0 ),
|
| 200 |
+
.p7_req_data ( )
|
| 201 |
+
);
|
| 202 |
+
|
| 203 |
+
// ------------------------------------------------------------------------
|
| 204 |
+
// COMMAND / CONTROL FIFO: REGISTER FILE: COMMON
|
| 205 |
+
// ------------------------------------------------------------------------
|
| 206 |
+
|
| 207 |
+
localparam RWPOS_WAIT_COMPLETE = 18; // WAIT FOR DRP COMPLETION
|
| 208 |
+
localparam RWPOS_DRP_RD_EN = 20;
|
| 209 |
+
localparam RWPOS_DRP_WR_EN = 21;
|
| 210 |
+
localparam RWPOS_GLOBAL_SYSTEM_RESET = 31;
|
| 211 |
+
|
| 212 |
+
wire [319:0] ro;
|
| 213 |
+
reg [239:0] rw;
|
| 214 |
+
|
| 215 |
+
// special non-user accessible registers
|
| 216 |
+
reg [79:0] _pcie_core_config = { 4'hf, 1'b1, 1'b1, 1'b0, 1'b0, 8'h02, 16'h0666, 16'h10EE, 16'h0007, 16'h10EE };
|
| 217 |
+
time _cmd_timer_inactivity_base;
|
| 218 |
+
reg rwi_drp_rd_en;
|
| 219 |
+
reg rwi_drp_wr_en;
|
| 220 |
+
reg [15:0] rwi_drp_data;
|
| 221 |
+
|
| 222 |
+
// ------------------------------------------------------------------------
|
| 223 |
+
// COMMAND / CONTROL FIFO: REGISTER FILE: READ-ONLY LAYOUT/SPECIFICATION
|
| 224 |
+
// ------------------------------------------------------------------------
|
| 225 |
+
|
| 226 |
+
// MAGIC
|
| 227 |
+
assign ro[15:0] = 16'hab89; // +000: MAGIC
|
| 228 |
+
// SPECIAL
|
| 229 |
+
assign ro[19:16] = 0; // +002: SPECIAL
|
| 230 |
+
assign ro[20] = rwi_drp_rd_en; //
|
| 231 |
+
assign ro[21] = rwi_drp_wr_en; //
|
| 232 |
+
assign ro[31:22] = 0; //
|
| 233 |
+
// SIZEOF / BYTECOUNT [little-endian]
|
| 234 |
+
assign ro[63:32] = $bits(ro) >> 3; // +004: SIZEOF / BYTECOUNT [little-endian]
|
| 235 |
+
// ID: VERSION & DEVICE
|
| 236 |
+
assign ro[71:64] = PARAM_VERSION_NUMBER_MAJOR; // +008: VERSION MAJOR
|
| 237 |
+
assign ro[79:72] = PARAM_VERSION_NUMBER_MINOR; // +009: VERSION MINOR
|
| 238 |
+
assign ro[87:80] = PARAM_DEVICE_ID; // +00A: DEVICE ID
|
| 239 |
+
assign ro[127:88] = 0; // +00B: SLACK
|
| 240 |
+
// UPTIME (tickcount64*100MHz)
|
| 241 |
+
assign ro[191:128] = tickcount64; // +010: UPTIME (tickcount64*100MHz)
|
| 242 |
+
// INACTIVITY TIMER
|
| 243 |
+
assign ro[255:192] = _cmd_timer_inactivity_base; // +018: INACTIVITY TIMER
|
| 244 |
+
// PCIe DRP
|
| 245 |
+
assign ro[271:256] = rwi_drp_data; // +020: DRP: pcie_drp_do
|
| 246 |
+
// PCIe
|
| 247 |
+
assign ro[272] = pcie_present; // +022: PCIe PRSNT#
|
| 248 |
+
assign ro[273] = pcie_perst_n; // PCIe PERST#
|
| 249 |
+
assign ro[287:274] = 0; // SLACK
|
| 250 |
+
// CUSTOM_VALUE
|
| 251 |
+
assign ro[319:288] = PARAM_CUSTOM_VALUE; // +024: CUSTOM VALUE
|
| 252 |
+
// +028
|
| 253 |
+
|
| 254 |
+
// ------------------------------------------------------------------------
|
| 255 |
+
// INITIALIZATION/RESET BLOCK _AND_
|
| 256 |
+
// COMMAND / CONTROL FIFO: REGISTER FILE: READ-WRITE LAYOUT/SPECIFICATION
|
| 257 |
+
// ------------------------------------------------------------------------
|
| 258 |
+
|
| 259 |
+
task pcileech_fifo_ctl_initialvalues; // task is non automatic
|
| 260 |
+
begin
|
| 261 |
+
_cmd_tx_wr_en <= 1'b0;
|
| 262 |
+
|
| 263 |
+
// MAGIC
|
| 264 |
+
rw[15:0] <= 16'hefcd; // +000: MAGIC
|
| 265 |
+
// SPECIAL
|
| 266 |
+
rw[16] <= 0; // +002: enable inactivity timer
|
| 267 |
+
rw[17] <= 0; // enable send count
|
| 268 |
+
rw[18] <= 1; // WAIT FOR PCIe DRP RD/WR COMPLETION BEFORE ACCEPT NEW FIFO READ/WRITES
|
| 269 |
+
rw[19] <= 0; // SLACK
|
| 270 |
+
rw[20] <= 0; // DRP RD EN
|
| 271 |
+
rw[21] <= 0; // DRP WR EN
|
| 272 |
+
rw[30:22] <= 0; // RESERVED FUTURE
|
| 273 |
+
rw[31] <= 0; // global system reset (GSR) via STARTUPE2 primitive
|
| 274 |
+
// SIZEOF / BYTECOUNT [little-endian]
|
| 275 |
+
rw[63:32] <= $bits(rw) >> 3; // +004: bytecount [little endian]
|
| 276 |
+
// CMD INACTIVITY TIMER TRIGGER VALUE
|
| 277 |
+
rw[95:64] <= 0; // +008: cmd_inactivity_timer (ticks) [little-endian]
|
| 278 |
+
// CMD SEND COUNT
|
| 279 |
+
rw[127:96] <= 0; // +00C: cmd_send_count [little-endian]
|
| 280 |
+
// PCIE INITIAL CONFIG (SPECIAL BITSTREAM)
|
| 281 |
+
// NB! "initial" CLK0 values may also be changed in: '_pcie_core_config = {...};' [important on PCIeScreamer].
|
| 282 |
+
rw[143:128] <= 16'h10EE; // +010: CFG_SUBSYS_VEND_ID (NOT IMPLEMENTED)
|
| 283 |
+
rw[159:144] <= 16'h0007; // +012: CFG_SUBSYS_ID (NOT IMPLEMENTED)
|
| 284 |
+
rw[175:160] <= 16'h10EE; // +014: CFG_VEND_ID (NOT IMPLEMENTED)
|
| 285 |
+
rw[191:176] <= 16'h0666; // +016: CFG_DEV_ID (NOT IMPLEMENTED)
|
| 286 |
+
rw[199:192] <= 8'h02; // +018: CFG_REV_ID (NOT IMPLEMENTED)
|
| 287 |
+
rw[200] <= 1'b1; // +019: PCIE CORE RESET
|
| 288 |
+
rw[201] <= 1'b0; // PCIE SUBSYSTEM RESET
|
| 289 |
+
rw[202] <= 1'b1; // CFGTLP PROCESSING ENABLE
|
| 290 |
+
rw[203] <= 1'b1; // CFGTLP ZERO DATA
|
| 291 |
+
rw[204] <= 1'b1; // CFGTLP FILTER TLP FROM USER
|
| 292 |
+
rw[205] <= 1'b1; // PCIE BAR PIO ON-BOARD PROCESSING ENABLE
|
| 293 |
+
rw[206] <= 1'b0; // CFGTLP PCIE WRITE ENABLE
|
| 294 |
+
rw[207] <= 1'b1; // TLP FILTER FROM USER: EXCEPT: Cpl,CplD and CfgRd/CfgWr (handled by rw[204])
|
| 295 |
+
// PCIe DRP, PRSNT#, PERST#
|
| 296 |
+
rw[208+:16] <= 0; // +01A: DRP: pcie_drp_di
|
| 297 |
+
rw[224+:9] <= 0; // +01C: DRP: pcie_drp_addr
|
| 298 |
+
rw[233+:7] <= 0; // SLACK
|
| 299 |
+
// 01E -
|
| 300 |
+
|
| 301 |
+
end
|
| 302 |
+
endtask
|
| 303 |
+
|
| 304 |
+
wire _cmd_timer_inactivity_enable = rw[16];
|
| 305 |
+
wire [31:0] _cmd_timer_inactivity_ticks = rw[95:64];
|
| 306 |
+
wire [15:0] _cmd_send_count_dword = rw[63:32];
|
| 307 |
+
wire _cmd_send_count_enable = rw[17] & (_cmd_send_count_dword != 16'h0000);
|
| 308 |
+
|
| 309 |
+
always @ ( posedge clk )
|
| 310 |
+
_pcie_core_config <= rw[207:128];
|
| 311 |
+
assign dpcie.pcie_rst_core = _pcie_core_config[72];
|
| 312 |
+
assign dpcie.pcie_rst_subsys = _pcie_core_config[73];
|
| 313 |
+
assign dshadow2fifo.cfgtlp_en = _pcie_core_config[74];
|
| 314 |
+
assign dshadow2fifo.cfgtlp_zero = _pcie_core_config[75];
|
| 315 |
+
assign dshadow2fifo.cfgtlp_filter = _pcie_core_config[76];
|
| 316 |
+
assign dshadow2fifo.bar_en = _pcie_core_config[77];
|
| 317 |
+
assign dshadow2fifo.cfgtlp_wren = _pcie_core_config[78];
|
| 318 |
+
assign dshadow2fifo.alltlp_filter = _pcie_core_config[79];
|
| 319 |
+
assign dpcie.drp_en = rw[RWPOS_DRP_WR_EN] | rw[RWPOS_DRP_RD_EN];
|
| 320 |
+
assign dpcie.drp_we = rw[RWPOS_DRP_WR_EN];
|
| 321 |
+
assign dpcie.drp_addr = rw[224+:9];
|
| 322 |
+
assign dpcie.drp_di = rw[208+:16];
|
| 323 |
+
|
| 324 |
+
// ------------------------------------------------------------------------
|
| 325 |
+
// COMMAND / CONTROL FIFO: STATE MACHINE / LOGIC FOR READ/WRITE AND OTHER HOUSEKEEPING TASKS
|
| 326 |
+
// ------------------------------------------------------------------------
|
| 327 |
+
|
| 328 |
+
wire [63:0] cmd_rx_dout;
|
| 329 |
+
wire cmd_rx_valid;
|
| 330 |
+
wire cmd_rx_rd_en_drp = rwi_drp_rd_en | rwi_drp_wr_en | rw[RWPOS_DRP_RD_EN] | rw[RWPOS_DRP_WR_EN];
|
| 331 |
+
wire cmd_rx_rd_en = tickcount64[1] & ( ~rw[RWPOS_WAIT_COMPLETE] | ~cmd_rx_rd_en_drp);
|
| 332 |
+
|
| 333 |
+
fifo_64_64_clk1_fifocmd i_fifo_cmd_rx(
|
| 334 |
+
.clk ( clk ),
|
| 335 |
+
.srst ( rst ),
|
| 336 |
+
.rd_en ( cmd_rx_rd_en ),
|
| 337 |
+
.dout ( cmd_rx_dout ),
|
| 338 |
+
.din ( dcom.com_dout ),
|
| 339 |
+
.wr_en ( _cmd_rx_wren ),
|
| 340 |
+
.full ( ),
|
| 341 |
+
.empty ( ),
|
| 342 |
+
.valid ( cmd_rx_valid )
|
| 343 |
+
);
|
| 344 |
+
|
| 345 |
+
integer i_write;
|
| 346 |
+
wire [15:0] in_cmd_address_byte = cmd_rx_dout[31:16];
|
| 347 |
+
wire [17:0] in_cmd_address_bit = {in_cmd_address_byte[14:0], 3'b000};
|
| 348 |
+
wire [15:0] in_cmd_value = {cmd_rx_dout[48+:8], cmd_rx_dout[56+:8]};
|
| 349 |
+
wire [15:0] in_cmd_mask = {cmd_rx_dout[32+:8], cmd_rx_dout[40+:8]};
|
| 350 |
+
wire f_rw = in_cmd_address_byte[15];
|
| 351 |
+
wire f_shadowcfgspace = in_cmd_address_byte[14];
|
| 352 |
+
wire [15:0] in_cmd_data_in = (in_cmd_address_bit < (f_rw ? $bits(rw) : $bits(ro))) ? (f_rw ? rw[in_cmd_address_bit+:16] : ro[in_cmd_address_bit+:16]) : 16'h0000;
|
| 353 |
+
wire in_cmd_read = cmd_rx_valid & cmd_rx_dout[12] & ~f_shadowcfgspace;
|
| 354 |
+
wire in_cmd_write = cmd_rx_valid & cmd_rx_dout[13] & ~f_shadowcfgspace & f_rw;
|
| 355 |
+
assign dshadow2fifo.rx_rden = cmd_rx_valid & cmd_rx_dout[12] & f_shadowcfgspace;
|
| 356 |
+
assign dshadow2fifo.rx_wren = cmd_rx_valid & cmd_rx_dout[13] & f_shadowcfgspace & f_rw;
|
| 357 |
+
assign dshadow2fifo.rx_be = {(in_cmd_mask[7:0] > 0 ? ~in_cmd_address_byte[1] : 1'b0), (in_cmd_mask[15:8] > 0 ? ~in_cmd_address_byte[1] : 1'b0), (in_cmd_mask[7:0] > 0 ? in_cmd_address_byte[1] : 1'b0), (in_cmd_mask[15:8] > 0 ? in_cmd_address_byte[1] : 1'b0)};
|
| 358 |
+
assign dshadow2fifo.rx_addr = in_cmd_address_byte[11:2];
|
| 359 |
+
assign dshadow2fifo.rx_addr_lo = in_cmd_address_byte[1];
|
| 360 |
+
assign dshadow2fifo.rx_data = {in_cmd_value[7:0], in_cmd_value[15:8], in_cmd_value[7:0], in_cmd_value[15:8]};
|
| 361 |
+
|
| 362 |
+
initial pcileech_fifo_ctl_initialvalues();
|
| 363 |
+
|
| 364 |
+
always @ ( posedge clk )
|
| 365 |
+
if ( rst )
|
| 366 |
+
pcileech_fifo_ctl_initialvalues();
|
| 367 |
+
else
|
| 368 |
+
begin
|
| 369 |
+
// SHADOW CONFIG SPACE RESPONSE
|
| 370 |
+
if ( dshadow2fifo.tx_valid )
|
| 371 |
+
begin
|
| 372 |
+
_cmd_tx_wr_en <= 1'b1;
|
| 373 |
+
_cmd_tx_din[31:16] <= {4'b1100, dshadow2fifo.tx_addr, dshadow2fifo.tx_addr_lo, 1'b0};
|
| 374 |
+
_cmd_tx_din[15:0] <= dshadow2fifo.tx_addr_lo ? dshadow2fifo.tx_data[15:0] : dshadow2fifo.tx_data[31:16];
|
| 375 |
+
end
|
| 376 |
+
// READ config
|
| 377 |
+
else if ( in_cmd_read )
|
| 378 |
+
begin
|
| 379 |
+
_cmd_tx_wr_en <= 1'b1;
|
| 380 |
+
_cmd_tx_din[31:16] <= in_cmd_address_byte;
|
| 381 |
+
_cmd_tx_din[15:0] <= {in_cmd_data_in[7:0], in_cmd_data_in[15:8]};
|
| 382 |
+
end
|
| 383 |
+
// SEND COUNT ACTION
|
| 384 |
+
else if ( ~_cmd_tx_almost_full & ~in_cmd_write & _cmd_send_count_enable )
|
| 385 |
+
begin
|
| 386 |
+
_cmd_tx_wr_en <= 1'b1;
|
| 387 |
+
_cmd_tx_din[31:16] <= 16'hfffe;
|
| 388 |
+
_cmd_tx_din[15:0] <= _cmd_send_count_dword;
|
| 389 |
+
rw[63:32] <= _cmd_send_count_dword - 1;
|
| 390 |
+
end
|
| 391 |
+
// INACTIVITY TIMER ACTION
|
| 392 |
+
else if ( ~_cmd_tx_almost_full & ~in_cmd_write & _cmd_timer_inactivity_enable & (_cmd_timer_inactivity_ticks + _cmd_timer_inactivity_base < tickcount64) )
|
| 393 |
+
begin
|
| 394 |
+
_cmd_tx_wr_en <= 1'b1;
|
| 395 |
+
_cmd_tx_din[31:16] <= 16'hffff;
|
| 396 |
+
_cmd_tx_din[15:0] <= 16'hcede;
|
| 397 |
+
rw[16] <= 1'b0;
|
| 398 |
+
end
|
| 399 |
+
else
|
| 400 |
+
_cmd_tx_wr_en <= 1'b0;
|
| 401 |
+
|
| 402 |
+
// WRITE config
|
| 403 |
+
if ( tickcount64 < 8 )
|
| 404 |
+
pcileech_fifo_ctl_initialvalues();
|
| 405 |
+
else if ( in_cmd_write )
|
| 406 |
+
for ( i_write = 0; i_write < 16; i_write = i_write + 1 )
|
| 407 |
+
begin
|
| 408 |
+
if ( in_cmd_mask[i_write] )
|
| 409 |
+
rw[in_cmd_address_bit+i_write] <= in_cmd_value[i_write];
|
| 410 |
+
end
|
| 411 |
+
|
| 412 |
+
// UPDATE INACTIVITY TIMER BASE
|
| 413 |
+
if ( dcom.com_din_wr_en | ~dcom.com_din_ready )
|
| 414 |
+
_cmd_timer_inactivity_base <= tickcount64;
|
| 415 |
+
|
| 416 |
+
// DRP READ/WRITE
|
| 417 |
+
if ( dpcie.drp_rdy )
|
| 418 |
+
begin
|
| 419 |
+
rwi_drp_rd_en <= 1'b0;
|
| 420 |
+
rwi_drp_wr_en <= 1'b0;
|
| 421 |
+
rwi_drp_data <= dpcie.drp_do;
|
| 422 |
+
end
|
| 423 |
+
else if ( rw[RWPOS_DRP_RD_EN] | rw[RWPOS_DRP_WR_EN] )
|
| 424 |
+
begin
|
| 425 |
+
rw[RWPOS_DRP_RD_EN] <= 1'b0;
|
| 426 |
+
rw[RWPOS_DRP_WR_EN] <= 1'b0;
|
| 427 |
+
rwi_drp_rd_en <= rwi_drp_rd_en | rw[RWPOS_DRP_RD_EN];
|
| 428 |
+
rwi_drp_wr_en <= rwi_drp_wr_en | rw[RWPOS_DRP_WR_EN];
|
| 429 |
+
end
|
| 430 |
+
|
| 431 |
+
end
|
| 432 |
+
|
| 433 |
+
// ----------------------------------------------------
|
| 434 |
+
// GLOBAL SYSTEM RESET: ( provided via STARTUPE2 primitive )
|
| 435 |
+
// ----------------------------------------------------
|
| 436 |
+
`ifdef ENABLE_STARTUPE2
|
| 437 |
+
|
| 438 |
+
STARTUPE2 #(
|
| 439 |
+
.PROG_USR ( "FALSE" ),
|
| 440 |
+
.SIM_CCLK_FREQ ( 0.0 )
|
| 441 |
+
) i_STARTUPE2 (
|
| 442 |
+
.CFGCLK ( ), // ->
|
| 443 |
+
.CFGMCLK ( ), // ->
|
| 444 |
+
.EOS ( ), // ->
|
| 445 |
+
.PREQ ( ), // ->
|
| 446 |
+
.CLK ( clk ), // <-
|
| 447 |
+
.GSR ( rw[RWPOS_GLOBAL_SYSTEM_RESET] | rst_cfg_reload ), // <- GLOBAL SYSTEM RESET
|
| 448 |
+
.GTS ( 1'b0 ), // <-
|
| 449 |
+
.KEYCLEARB ( 1'b0 ), // <-
|
| 450 |
+
.PACK ( 1'b0 ), // <-
|
| 451 |
+
.USRCCLKO ( 1'b0 ), // <-
|
| 452 |
+
.USRCCLKTS ( 1'b0 ), // <-
|
| 453 |
+
.USRDONEO ( 1'b1 ), // <-
|
| 454 |
+
.USRDONETS ( 1'b1 ) // <-
|
| 455 |
+
);
|
| 456 |
+
`endif /* ENABLE_STARTUPE2 */
|
| 457 |
+
|
| 458 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/src/pcileech_ft601.sv
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// FT601 / FT245 controller module (v4).
|
| 5 |
+
//
|
| 6 |
+
// (c) Ulf Frisk, 2017-2024
|
| 7 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
`timescale 1ns / 1ps
|
| 11 |
+
|
| 12 |
+
module pcileech_ft601(
|
| 13 |
+
input clk,
|
| 14 |
+
input rst,
|
| 15 |
+
// TO/FROM PADS
|
| 16 |
+
output [3:0] FT601_BE,
|
| 17 |
+
inout [31:0] FT601_DATA,
|
| 18 |
+
input FT601_RXF_N,
|
| 19 |
+
input FT601_TXE_N,
|
| 20 |
+
output bit FT601_OE_N,
|
| 21 |
+
output bit FT601_RD_N,
|
| 22 |
+
output bit FT601_WR_N,
|
| 23 |
+
output bit FT601_SIWU_N,
|
| 24 |
+
// TO/FROM FIFO
|
| 25 |
+
output bit [31:0] dout,
|
| 26 |
+
output bit dout_valid,
|
| 27 |
+
input [31:0] din,
|
| 28 |
+
input din_wr_en,
|
| 29 |
+
output din_req_data
|
| 30 |
+
);
|
| 31 |
+
|
| 32 |
+
initial begin
|
| 33 |
+
FT601_OE_N <= 1'b1;
|
| 34 |
+
FT601_RD_N <= 1'b1;
|
| 35 |
+
FT601_WR_N <= 1'b1;
|
| 36 |
+
FT601_SIWU_N <= 1'b1;
|
| 37 |
+
dout_valid <= 1'b0;
|
| 38 |
+
dout <= 32'h00000000;
|
| 39 |
+
end
|
| 40 |
+
|
| 41 |
+
`define S_FT601_IDLE 4'h0
|
| 42 |
+
`define S_FT601_RX_WAIT1 4'h2
|
| 43 |
+
`define S_FT601_RX_WAIT2 4'h3
|
| 44 |
+
`define S_FT601_RX_WAIT3 4'h4
|
| 45 |
+
`define S_FT601_RX_ACTIVE 4'h5
|
| 46 |
+
`define S_FT601_RX_COOLDOWN1 4'h6
|
| 47 |
+
`define S_FT601_RX_COOLDOWN2 4'h7
|
| 48 |
+
`define S_FT601_TX_WAIT1 4'h8
|
| 49 |
+
`define S_FT601_TX_WAIT2 4'h9
|
| 50 |
+
`define S_FT601_TX_ACTIVE 4'ha
|
| 51 |
+
`define S_FT601_TX_COOLDOWN1 4'hb
|
| 52 |
+
`define S_FT601_TX_COOLDOWN2 4'hc
|
| 53 |
+
|
| 54 |
+
bit [31:0] FT601_DATA_OUT[5];
|
| 55 |
+
(* KEEP = "TRUE" *) wire FWD;
|
| 56 |
+
(* KEEP = "TRUE" *) bit OE = 1'b1;
|
| 57 |
+
(* KEEP = "TRUE" *) bit [3:0] data_cooldown_count = 0;
|
| 58 |
+
(* KEEP = "TRUE" *) bit [2:0] data_queue_count = 0;
|
| 59 |
+
(* KEEP = "TRUE" *) bit [3:0] state = `S_FT601_IDLE;
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
// -------------------------------------------------------------------------
|
| 64 |
+
// FT245 RX / DATA INPUT BELOW:
|
| 65 |
+
// -------------------------------------------------------------------------
|
| 66 |
+
|
| 67 |
+
always @ ( posedge clk )
|
| 68 |
+
begin
|
| 69 |
+
dout_valid <= !rst && !FT601_RXF_N && (state == `S_FT601_RX_ACTIVE);
|
| 70 |
+
dout[7:0] <= FT601_DATA[31:24];
|
| 71 |
+
dout[15:8] <= FT601_DATA[23:16];
|
| 72 |
+
dout[23:16] <= FT601_DATA[15:8];
|
| 73 |
+
dout[31:24] <= FT601_DATA[7:0];
|
| 74 |
+
end
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
// -------------------------------------------------------------------------
|
| 79 |
+
// FT245 TX / DATA OUTPUT BELOW:
|
| 80 |
+
// -------------------------------------------------------------------------
|
| 81 |
+
|
| 82 |
+
assign FT601_BE = OE ? 4'b1111 : 4'bzzzz;
|
| 83 |
+
assign FT601_DATA = OE ? {FT601_DATA_OUT[0][7:0], FT601_DATA_OUT[0][15:8], FT601_DATA_OUT[0][23:16], FT601_DATA_OUT[0][31:24]} : 32'hzzzzzzzz;
|
| 84 |
+
assign din_req_data = !rst && (data_queue_count == 2) || (data_queue_count == 3);
|
| 85 |
+
assign FWD = !rst && !FT601_TXE_N && (data_queue_count != 0) && (state == `S_FT601_TX_ACTIVE);
|
| 86 |
+
|
| 87 |
+
always @ ( posedge clk ) begin
|
| 88 |
+
if ( rst || (data_cooldown_count == 4'hf) ) begin
|
| 89 |
+
data_cooldown_count <= 0;
|
| 90 |
+
data_queue_count <= 5;
|
| 91 |
+
FT601_DATA_OUT[0] <= 32'h66665555;
|
| 92 |
+
FT601_DATA_OUT[1] <= 32'h66665555;
|
| 93 |
+
FT601_DATA_OUT[2] <= 32'h66665555;
|
| 94 |
+
FT601_DATA_OUT[3] <= 32'h66665555;
|
| 95 |
+
FT601_DATA_OUT[4] <= 32'h66665555;
|
| 96 |
+
end
|
| 97 |
+
else begin
|
| 98 |
+
data_cooldown_count <= (data_queue_count == 0) ? (data_cooldown_count + 1) : 0;
|
| 99 |
+
data_queue_count <= data_queue_count + (din_wr_en ? 3'b001 : 3'b000) - (FWD ? 3'b001 : 3'b000);
|
| 100 |
+
if ( FWD ) begin
|
| 101 |
+
if ( data_queue_count > 1 ) begin
|
| 102 |
+
FT601_DATA_OUT[0] <= FT601_DATA_OUT[1];
|
| 103 |
+
end
|
| 104 |
+
if ( data_queue_count > 2 ) begin
|
| 105 |
+
FT601_DATA_OUT[1] <= FT601_DATA_OUT[2];
|
| 106 |
+
end
|
| 107 |
+
if ( data_queue_count > 3 ) begin
|
| 108 |
+
FT601_DATA_OUT[2] <= FT601_DATA_OUT[3];
|
| 109 |
+
end
|
| 110 |
+
if ( data_queue_count > 4 ) begin
|
| 111 |
+
FT601_DATA_OUT[3] <= FT601_DATA_OUT[4];
|
| 112 |
+
end
|
| 113 |
+
end
|
| 114 |
+
if ( din_wr_en ) begin
|
| 115 |
+
FT601_DATA_OUT[data_queue_count - (FWD ? 3'b001 : 3'b000)] <= din;
|
| 116 |
+
end
|
| 117 |
+
end
|
| 118 |
+
end
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
// -------------------------------------------------------------------------
|
| 123 |
+
// FT245 main control below:
|
| 124 |
+
// -------------------------------------------------------------------------
|
| 125 |
+
|
| 126 |
+
always @ ( posedge clk )
|
| 127 |
+
begin
|
| 128 |
+
OE <= (rst || FT601_RXF_N || ((state != `S_FT601_RX_ACTIVE) && (state != `S_FT601_RX_WAIT3) && (state != `S_FT601_RX_WAIT2) && (state != `S_FT601_RX_COOLDOWN1) && (state != `S_FT601_RX_COOLDOWN2)));
|
| 129 |
+
FT601_OE_N <= (rst || FT601_RXF_N || ((state != `S_FT601_RX_ACTIVE) && (state != `S_FT601_RX_WAIT3) && (state != `S_FT601_RX_WAIT2)));
|
| 130 |
+
FT601_RD_N <= (rst || FT601_RXF_N || ((state != `S_FT601_RX_ACTIVE) && (state != `S_FT601_RX_WAIT3)));
|
| 131 |
+
FT601_WR_N <= !(!rst && !FT601_TXE_N && ((state == `S_FT601_TX_WAIT2) || ((state == `S_FT601_TX_ACTIVE) && (din_wr_en || (data_queue_count > 1)))));
|
| 132 |
+
end
|
| 133 |
+
|
| 134 |
+
always @ ( posedge clk )
|
| 135 |
+
if ( rst )
|
| 136 |
+
begin
|
| 137 |
+
state <= `S_FT601_IDLE;
|
| 138 |
+
end
|
| 139 |
+
else case ( state )
|
| 140 |
+
// ----------------------------------------------------------------
|
| 141 |
+
// IDLE STATE:
|
| 142 |
+
// RX are prioritized above TX in case both options are available.
|
| 143 |
+
// ----------------------------------------------------------------
|
| 144 |
+
`S_FT601_IDLE:
|
| 145 |
+
if ( !FT601_RXF_N )
|
| 146 |
+
state <= `S_FT601_RX_WAIT1;
|
| 147 |
+
else if ( !FT601_TXE_N && (data_queue_count > 0) )
|
| 148 |
+
state <= `S_FT601_TX_WAIT1;
|
| 149 |
+
// ----------------------------------------------------------------
|
| 150 |
+
// RX DATA FROM THE FT601:
|
| 151 |
+
// The receiver FIFO is assumed to always be non-full.
|
| 152 |
+
// If receiver FIFO is full data will still be received but lost.
|
| 153 |
+
// ----------------------------------------------------------------
|
| 154 |
+
`S_FT601_RX_WAIT1:
|
| 155 |
+
state <= FT601_RXF_N ? `S_FT601_RX_COOLDOWN1 : `S_FT601_RX_WAIT2;
|
| 156 |
+
`S_FT601_RX_WAIT2:
|
| 157 |
+
state <= FT601_RXF_N ? `S_FT601_RX_COOLDOWN1 : `S_FT601_RX_WAIT3;
|
| 158 |
+
`S_FT601_RX_WAIT3:
|
| 159 |
+
state <= FT601_RXF_N ? `S_FT601_RX_COOLDOWN1 : `S_FT601_RX_ACTIVE;
|
| 160 |
+
`S_FT601_RX_ACTIVE:
|
| 161 |
+
state <= FT601_RXF_N ? `S_FT601_RX_COOLDOWN1 : `S_FT601_RX_ACTIVE;
|
| 162 |
+
`S_FT601_RX_COOLDOWN1:
|
| 163 |
+
state <= `S_FT601_RX_COOLDOWN2;
|
| 164 |
+
`S_FT601_RX_COOLDOWN2:
|
| 165 |
+
state <= `S_FT601_IDLE;
|
| 166 |
+
// ----------------------------------------------------------------
|
| 167 |
+
// TX DATA TO THE FT601:
|
| 168 |
+
// ----------------------------------------------------------------
|
| 169 |
+
`S_FT601_TX_WAIT1:
|
| 170 |
+
state <= FT601_TXE_N ? `S_FT601_TX_COOLDOWN1 : `S_FT601_TX_WAIT2;
|
| 171 |
+
`S_FT601_TX_WAIT2:
|
| 172 |
+
state <= FT601_TXE_N ? `S_FT601_TX_COOLDOWN1 : `S_FT601_TX_ACTIVE;
|
| 173 |
+
`S_FT601_TX_ACTIVE:
|
| 174 |
+
state <= (FT601_TXE_N || (!din_wr_en && (data_queue_count <= 1))) ? `S_FT601_TX_COOLDOWN1 : `S_FT601_TX_ACTIVE;
|
| 175 |
+
`S_FT601_TX_COOLDOWN1:
|
| 176 |
+
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// SystemVerilog Header File for PCILeech FPGA projects.
|
| 5 |
+
//
|
| 6 |
+
// (c) Ulf Frisk, 2019-2024
|
| 7 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
`ifndef _pcileech_header_svh_
|
| 11 |
+
`define _pcileech_header_svh_
|
| 12 |
+
|
| 13 |
+
`define _bs16(v) {{v}[7:0], {v}[15:8]}
|
| 14 |
+
`define _bs32(v) {{v}[7:0], {v}[15:8], {v}[23:16], {v}[31:24]}
|
| 15 |
+
|
| 16 |
+
// ------------------------------------------------------------------------
|
| 17 |
+
// Interface connecting COM to FIFO module.
|
| 18 |
+
// ------------------------------------------------------------------------
|
| 19 |
+
interface IfComToFifo;
|
| 20 |
+
wire [63:0] com_dout;
|
| 21 |
+
wire com_dout_valid;
|
| 22 |
+
wire [255:0] com_din;
|
| 23 |
+
wire com_din_wr_en;
|
| 24 |
+
wire com_din_ready;
|
| 25 |
+
|
| 26 |
+
modport mp_com (
|
| 27 |
+
output com_dout, com_dout_valid, com_din_ready,
|
| 28 |
+
input com_din, com_din_wr_en
|
| 29 |
+
);
|
| 30 |
+
|
| 31 |
+
modport mp_fifo (
|
| 32 |
+
input com_dout, com_dout_valid, com_din_ready,
|
| 33 |
+
output com_din, com_din_wr_en
|
| 34 |
+
);
|
| 35 |
+
endinterface
|
| 36 |
+
|
| 37 |
+
// ------------------------------------------------------------------------
|
| 38 |
+
// Interface connecting PCIe to PCIe CFG module.
|
| 39 |
+
// ------------------------------------------------------------------------
|
| 40 |
+
interface IfPCIeSignals;
|
| 41 |
+
// ------------------------------------------------------------------------
|
| 42 |
+
// VALUES FROM PCIe TO module.
|
| 43 |
+
// ------------------------------------------------------------------------
|
| 44 |
+
wire [7:0] cfg_bus_number;
|
| 45 |
+
wire [4:0] cfg_device_number;
|
| 46 |
+
wire [2:0] cfg_function_number;
|
| 47 |
+
|
| 48 |
+
wire [15:0] cfg_command;
|
| 49 |
+
wire [31:0] cfg_mgmt_do;
|
| 50 |
+
wire cfg_mgmt_rd_wr_done;
|
| 51 |
+
|
| 52 |
+
wire [2:0] pl_initial_link_width;
|
| 53 |
+
wire pl_phy_lnk_up;
|
| 54 |
+
wire [1:0] pl_lane_reversal_mode;
|
| 55 |
+
wire pl_link_gen2_cap;
|
| 56 |
+
wire pl_link_partner_gen2_supported;
|
| 57 |
+
wire pl_link_upcfg_cap;
|
| 58 |
+
wire pl_sel_lnk_rate;
|
| 59 |
+
wire [1:0] pl_sel_lnk_width;
|
| 60 |
+
wire [5:0] pl_ltssm_state;
|
| 61 |
+
wire [1:0] pl_rx_pm_state;
|
| 62 |
+
wire [2:0] pl_tx_pm_state;
|
| 63 |
+
wire pl_directed_change_done;
|
| 64 |
+
wire pl_received_hot_rst;
|
| 65 |
+
|
| 66 |
+
wire cfg_aer_rooterr_corr_err_received;
|
| 67 |
+
wire cfg_aer_rooterr_corr_err_reporting_en;
|
| 68 |
+
wire cfg_aer_rooterr_fatal_err_received;
|
| 69 |
+
wire cfg_aer_rooterr_fatal_err_reporting_en;
|
| 70 |
+
wire cfg_aer_rooterr_non_fatal_err_received;
|
| 71 |
+
wire cfg_aer_rooterr_non_fatal_err_reporting_en;
|
| 72 |
+
wire cfg_bridge_serr_en;
|
| 73 |
+
wire [15:0] cfg_dcommand;
|
| 74 |
+
wire [15:0] cfg_dcommand2;
|
| 75 |
+
wire [15:0] cfg_dstatus;
|
| 76 |
+
wire [15:0] cfg_lcommand;
|
| 77 |
+
wire [15:0] cfg_lstatus;
|
| 78 |
+
wire [2:0] cfg_pcie_link_state;
|
| 79 |
+
wire cfg_pmcsr_pme_en;
|
| 80 |
+
wire cfg_pmcsr_pme_status;
|
| 81 |
+
wire [1:0] cfg_pmcsr_powerstate;
|
| 82 |
+
wire cfg_received_func_lvl_rst;
|
| 83 |
+
wire cfg_root_control_pme_int_en;
|
| 84 |
+
wire cfg_root_control_syserr_corr_err_en;
|
| 85 |
+
wire cfg_root_control_syserr_fatal_err_en;
|
| 86 |
+
wire cfg_root_control_syserr_non_fatal_err_en;
|
| 87 |
+
wire cfg_slot_control_electromech_il_ctl_pulse;
|
| 88 |
+
wire [15:0] cfg_status;
|
| 89 |
+
wire cfg_to_turnoff;
|
| 90 |
+
wire [5:0] tx_buf_av;
|
| 91 |
+
wire tx_cfg_req;
|
| 92 |
+
wire tx_err_drop;
|
| 93 |
+
wire [6:0] cfg_vc_tcvc_map;
|
| 94 |
+
|
| 95 |
+
wire [2:0] cfg_interrupt_mmenable;
|
| 96 |
+
wire cfg_interrupt_msienable;
|
| 97 |
+
wire cfg_interrupt_msixenable;
|
| 98 |
+
wire cfg_interrupt_msixfm;
|
| 99 |
+
wire cfg_interrupt_rdy;
|
| 100 |
+
wire [7:0] cfg_interrupt_do;
|
| 101 |
+
|
| 102 |
+
// ------------------------------------------------------------------------
|
| 103 |
+
// VALUES FROM module TO PCIe.
|
| 104 |
+
// ------------------------------------------------------------------------
|
| 105 |
+
|
| 106 |
+
wire cfg_mgmt_rd_en;
|
| 107 |
+
wire cfg_mgmt_wr_en;
|
| 108 |
+
|
| 109 |
+
wire [63:0] cfg_dsn;
|
| 110 |
+
wire [31:0] cfg_mgmt_di;
|
| 111 |
+
wire [9:0] cfg_mgmt_dwaddr;
|
| 112 |
+
wire [3:0] cfg_mgmt_byte_en;
|
| 113 |
+
wire cfg_mgmt_wr_readonly;
|
| 114 |
+
wire cfg_mgmt_wr_rw1c_as_rw;
|
| 115 |
+
|
| 116 |
+
wire [1:0] pl_directed_link_change;
|
| 117 |
+
wire [1:0] pl_directed_link_width;
|
| 118 |
+
wire pl_directed_link_auton;
|
| 119 |
+
wire pl_directed_link_speed;
|
| 120 |
+
wire pl_upstream_prefer_deemph;
|
| 121 |
+
wire pl_transmit_hot_rst;
|
| 122 |
+
wire pl_downstream_deemph_source;
|
| 123 |
+
|
| 124 |
+
wire [7:0] cfg_interrupt_di;
|
| 125 |
+
wire [4:0] cfg_pciecap_interrupt_msgnum;
|
| 126 |
+
wire cfg_interrupt_assert;
|
| 127 |
+
wire cfg_interrupt;
|
| 128 |
+
wire cfg_interrupt_stat;
|
| 129 |
+
|
| 130 |
+
wire [1:0] cfg_pm_force_state;
|
| 131 |
+
wire cfg_pm_force_state_en;
|
| 132 |
+
wire cfg_pm_halt_aspm_l0s;
|
| 133 |
+
wire cfg_pm_halt_aspm_l1;
|
| 134 |
+
wire cfg_pm_send_pme_to;
|
| 135 |
+
wire cfg_pm_wake;
|
| 136 |
+
wire cfg_trn_pending;
|
| 137 |
+
wire cfg_turnoff_ok;
|
| 138 |
+
wire rx_np_ok;
|
| 139 |
+
wire rx_np_req;
|
| 140 |
+
wire tx_cfg_gnt;
|
| 141 |
+
|
| 142 |
+
modport mpm (
|
| 143 |
+
input cfg_bus_number, cfg_device_number, cfg_function_number, cfg_command, cfg_mgmt_do, cfg_mgmt_rd_wr_done,
|
| 144 |
+
pl_initial_link_width, pl_phy_lnk_up, pl_lane_reversal_mode, pl_link_gen2_cap, pl_link_partner_gen2_supported,
|
| 145 |
+
pl_link_upcfg_cap, pl_sel_lnk_rate, pl_sel_lnk_width, pl_ltssm_state, pl_rx_pm_state,
|
| 146 |
+
pl_tx_pm_state, pl_directed_change_done, pl_received_hot_rst,
|
| 147 |
+
cfg_aer_rooterr_corr_err_received, cfg_aer_rooterr_corr_err_reporting_en, cfg_aer_rooterr_fatal_err_received, cfg_aer_rooterr_fatal_err_reporting_en,
|
| 148 |
+
cfg_aer_rooterr_non_fatal_err_received, cfg_aer_rooterr_non_fatal_err_reporting_en, cfg_bridge_serr_en, cfg_dcommand, cfg_dcommand2, cfg_dstatus,
|
| 149 |
+
cfg_lcommand, cfg_lstatus, cfg_pcie_link_state, cfg_pmcsr_pme_en, cfg_pmcsr_pme_status, cfg_pmcsr_powerstate, cfg_received_func_lvl_rst, cfg_root_control_pme_int_en,
|
| 150 |
+
cfg_root_control_syserr_corr_err_en, cfg_root_control_syserr_fatal_err_en, cfg_root_control_syserr_non_fatal_err_en, cfg_slot_control_electromech_il_ctl_pulse,
|
| 151 |
+
cfg_status, cfg_to_turnoff, tx_buf_av, tx_cfg_req, tx_err_drop, cfg_vc_tcvc_map,
|
| 152 |
+
cfg_interrupt_mmenable, cfg_interrupt_msienable, cfg_interrupt_msixenable, cfg_interrupt_msixfm, cfg_interrupt_rdy, cfg_interrupt_do,
|
| 153 |
+
|
| 154 |
+
output cfg_mgmt_rd_en, cfg_mgmt_wr_en, cfg_dsn, cfg_mgmt_di, cfg_mgmt_dwaddr, cfg_mgmt_wr_readonly, cfg_mgmt_wr_rw1c_as_rw, cfg_mgmt_byte_en, pl_directed_link_change, pl_directed_link_width, pl_directed_link_auton,
|
| 155 |
+
pl_directed_link_speed, pl_upstream_prefer_deemph, pl_transmit_hot_rst, pl_downstream_deemph_source,
|
| 156 |
+
cfg_interrupt_di, cfg_pciecap_interrupt_msgnum, cfg_interrupt_assert, cfg_interrupt, cfg_interrupt_stat, cfg_pm_force_state, cfg_pm_force_state_en, cfg_pm_halt_aspm_l0s,
|
| 157 |
+
cfg_pm_halt_aspm_l1, cfg_pm_send_pme_to, cfg_pm_wake, cfg_trn_pending, cfg_turnoff_ok, rx_np_ok, rx_np_req, tx_cfg_gnt
|
| 158 |
+
);
|
| 159 |
+
endinterface
|
| 160 |
+
|
| 161 |
+
// ------------------------------------------------------------------------
|
| 162 |
+
// Interface PCIe 128-bit RX stream
|
| 163 |
+
// ------------------------------------------------------------------------
|
| 164 |
+
|
| 165 |
+
interface IfAXIS128;
|
| 166 |
+
wire [127:0] tdata;
|
| 167 |
+
wire [3:0] tkeepdw;
|
| 168 |
+
wire tvalid;
|
| 169 |
+
wire tlast;
|
| 170 |
+
wire [8:0] tuser; // [0] = first
|
| 171 |
+
// [1] = last
|
| 172 |
+
// [8:2] = BAR, 2=BAR0, 3=BAR1, .. 7=BAR5, 8=EXPROM
|
| 173 |
+
|
| 174 |
+
wire tready;
|
| 175 |
+
wire has_data;
|
| 176 |
+
|
| 177 |
+
modport source(
|
| 178 |
+
input tready,
|
| 179 |
+
output tdata, tkeepdw, tvalid, tlast, tuser, has_data
|
| 180 |
+
);
|
| 181 |
+
|
| 182 |
+
modport sink(
|
| 183 |
+
output tready,
|
| 184 |
+
input tdata, tkeepdw, tvalid, tlast, tuser, has_data
|
| 185 |
+
);
|
| 186 |
+
|
| 187 |
+
modport source_lite(
|
| 188 |
+
output tdata, tkeepdw, tvalid, tlast, tuser
|
| 189 |
+
);
|
| 190 |
+
|
| 191 |
+
modport sink_lite(
|
| 192 |
+
input tdata, tkeepdw, tvalid, tlast, tuser
|
| 193 |
+
);
|
| 194 |
+
endinterface
|
| 195 |
+
|
| 196 |
+
// ------------------------------------------------------------------------
|
| 197 |
+
// Interface connecting PCIe CFG to FIFO
|
| 198 |
+
// ------------------------------------------------------------------------
|
| 199 |
+
interface IfPCIeFifoCfg;
|
| 200 |
+
wire [63:0] tx_data;
|
| 201 |
+
wire tx_valid;
|
| 202 |
+
wire [31:0] rx_data;
|
| 203 |
+
wire rx_valid;
|
| 204 |
+
wire rx_rd_en;
|
| 205 |
+
|
| 206 |
+
modport mp_fifo (
|
| 207 |
+
output tx_data, tx_valid, rx_rd_en,
|
| 208 |
+
input rx_data, rx_valid
|
| 209 |
+
);
|
| 210 |
+
|
| 211 |
+
modport mp_pcie (
|
| 212 |
+
input tx_data, tx_valid, rx_rd_en,
|
| 213 |
+
output rx_data, rx_valid
|
| 214 |
+
);
|
| 215 |
+
endinterface
|
| 216 |
+
|
| 217 |
+
// ------------------------------------------------------------------------
|
| 218 |
+
// Interface connecting PCIe TLP to FIFO
|
| 219 |
+
// ------------------------------------------------------------------------
|
| 220 |
+
interface IfPCIeFifoTlp;
|
| 221 |
+
wire [31:0] tx_data;
|
| 222 |
+
wire tx_last;
|
| 223 |
+
wire tx_valid;
|
| 224 |
+
wire [31:0] rx_data[4];
|
| 225 |
+
wire rx_first[4];
|
| 226 |
+
wire rx_last[4];
|
| 227 |
+
wire rx_valid[4];
|
| 228 |
+
wire rx_rd_en;
|
| 229 |
+
|
| 230 |
+
modport mp_fifo (
|
| 231 |
+
output tx_data, tx_last, tx_valid, rx_rd_en,
|
| 232 |
+
input rx_data, rx_first, rx_last, rx_valid
|
| 233 |
+
);
|
| 234 |
+
|
| 235 |
+
modport mp_pcie (
|
| 236 |
+
input tx_data, tx_last, tx_valid, rx_rd_en,
|
| 237 |
+
output rx_data, rx_first, rx_last, rx_valid
|
| 238 |
+
);
|
| 239 |
+
endinterface
|
| 240 |
+
|
| 241 |
+
// ------------------------------------------------------------------------
|
| 242 |
+
// Interface connecting PCIe CORE config to FIFO
|
| 243 |
+
// ------------------------------------------------------------------------
|
| 244 |
+
interface IfPCIeFifoCore;
|
| 245 |
+
// PCIe optional config
|
| 246 |
+
wire pcie_rst_core;
|
| 247 |
+
wire pcie_rst_subsys;
|
| 248 |
+
// DRP config
|
| 249 |
+
wire drp_rdy;
|
| 250 |
+
wire [15:0] drp_do;
|
| 251 |
+
wire drp_en;
|
| 252 |
+
wire drp_we;
|
| 253 |
+
wire [8:0] drp_addr;
|
| 254 |
+
wire [15:0] drp_di;
|
| 255 |
+
|
| 256 |
+
modport mp_fifo (
|
| 257 |
+
input drp_rdy, drp_do,
|
| 258 |
+
output pcie_rst_core, pcie_rst_subsys, drp_en, drp_we, drp_addr, drp_di
|
| 259 |
+
);
|
| 260 |
+
|
| 261 |
+
modport mp_pcie (
|
| 262 |
+
input pcie_rst_core, pcie_rst_subsys, drp_en, drp_we, drp_addr, drp_di,
|
| 263 |
+
output drp_rdy, drp_do
|
| 264 |
+
);
|
| 265 |
+
endinterface
|
| 266 |
+
|
| 267 |
+
interface IfShadow2Fifo;
|
| 268 |
+
// SHADOW CONFIGURATION SPACE TO FIFO
|
| 269 |
+
wire rx_rden;
|
| 270 |
+
wire rx_wren;
|
| 271 |
+
wire [3:0] rx_be;
|
| 272 |
+
wire [31:0] rx_data;
|
| 273 |
+
wire [9:0] rx_addr;
|
| 274 |
+
wire rx_addr_lo;
|
| 275 |
+
wire tx_valid;
|
| 276 |
+
wire [31:0] tx_data;
|
| 277 |
+
wire [9:0] tx_addr;
|
| 278 |
+
wire tx_addr_lo;
|
| 279 |
+
wire cfgtlp_wren;
|
| 280 |
+
wire cfgtlp_zero;
|
| 281 |
+
wire cfgtlp_en;
|
| 282 |
+
wire cfgtlp_filter;
|
| 283 |
+
wire alltlp_filter;
|
| 284 |
+
wire bar_en;
|
| 285 |
+
|
| 286 |
+
modport fifo (
|
| 287 |
+
output cfgtlp_wren, cfgtlp_zero, rx_rden, rx_wren, rx_be, rx_addr, rx_addr_lo, rx_data, cfgtlp_en, cfgtlp_filter, alltlp_filter, bar_en,
|
| 288 |
+
input tx_valid, tx_addr, tx_addr_lo, tx_data
|
| 289 |
+
);
|
| 290 |
+
|
| 291 |
+
modport shadow (
|
| 292 |
+
input cfgtlp_wren, cfgtlp_zero, rx_rden, rx_wren, rx_be, rx_addr, rx_addr_lo, rx_data, cfgtlp_en, cfgtlp_filter, alltlp_filter, bar_en,
|
| 293 |
+
output tx_valid, tx_addr, tx_addr_lo, tx_data
|
| 294 |
+
);
|
| 295 |
+
endinterface
|
| 296 |
+
|
| 297 |
+
// ------------------------------------------------------------------------
|
| 298 |
+
// Interface PCIe AXI RX / TX
|
| 299 |
+
// ------------------------------------------------------------------------
|
| 300 |
+
interface IfPCIeTlpRxTx;
|
| 301 |
+
wire [63:0] data;
|
| 302 |
+
wire [7:0] keep;
|
| 303 |
+
wire last;
|
| 304 |
+
wire [21:0] user;
|
| 305 |
+
wire valid;
|
| 306 |
+
wire ready;
|
| 307 |
+
|
| 308 |
+
modport source (
|
| 309 |
+
output data, keep, last, user, valid,
|
| 310 |
+
input ready
|
| 311 |
+
);
|
| 312 |
+
|
| 313 |
+
modport sink (
|
| 314 |
+
input data, keep, last, user, valid,
|
| 315 |
+
output ready
|
| 316 |
+
);
|
| 317 |
+
endinterface
|
| 318 |
+
|
| 319 |
+
interface IfPCIeTlpRx128;
|
| 320 |
+
wire [127:0] data;
|
| 321 |
+
wire [21:0] user;
|
| 322 |
+
wire valid;
|
| 323 |
+
wire ready;
|
| 324 |
+
|
| 325 |
+
modport source (
|
| 326 |
+
output data, user, valid,
|
| 327 |
+
input ready
|
| 328 |
+
);
|
| 329 |
+
|
| 330 |
+
modport sink (
|
| 331 |
+
input data, user, valid,
|
| 332 |
+
output ready
|
| 333 |
+
);
|
| 334 |
+
endinterface
|
| 335 |
+
|
| 336 |
+
`endif
|
JOKOSAHS_DMA-Pcileech/src/pcileech_mux.sv
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// Merge multiple 32-bit words into a 256-bit word consisting of one (1) 32-bit
|
| 5 |
+
// status word and seven (7) data words. This is done to enable relatively
|
| 6 |
+
// efficient transmission over the FT601 together with some additional info.
|
| 7 |
+
//
|
| 8 |
+
// (c) Ulf Frisk, 2017-2024
|
| 9 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 10 |
+
//
|
| 11 |
+
|
| 12 |
+
`timescale 1ns / 1ps
|
| 13 |
+
|
| 14 |
+
module pcileech_mux(
|
| 15 |
+
input clk,
|
| 16 |
+
input rst,
|
| 17 |
+
// output
|
| 18 |
+
output [255:0] dout,
|
| 19 |
+
output valid,
|
| 20 |
+
input rd_en,
|
| 21 |
+
// port0: input highest priority
|
| 22 |
+
input [31:0] p0_din,
|
| 23 |
+
input [1:0] p0_tag,
|
| 24 |
+
input [1:0] p0_ctx,
|
| 25 |
+
input p0_wr_en,
|
| 26 |
+
output p0_req_data,
|
| 27 |
+
// port1:
|
| 28 |
+
input [31:0] p1_din,
|
| 29 |
+
input [1:0] p1_tag,
|
| 30 |
+
input [1:0] p1_ctx,
|
| 31 |
+
input p1_wr_en,
|
| 32 |
+
output p1_req_data,
|
| 33 |
+
// port2:
|
| 34 |
+
input [31:0] p2_din,
|
| 35 |
+
input [1:0] p2_tag,
|
| 36 |
+
input [1:0] p2_ctx,
|
| 37 |
+
input p2_wr_en,
|
| 38 |
+
output p2_req_data,
|
| 39 |
+
// port3:
|
| 40 |
+
input [31:0] p3_din,
|
| 41 |
+
input [1:0] p3_tag,
|
| 42 |
+
input [1:0] p3_ctx,
|
| 43 |
+
input p3_wr_en,
|
| 44 |
+
output p3_req_data,
|
| 45 |
+
// port4:
|
| 46 |
+
input [31:0] p4_din,
|
| 47 |
+
input [1:0] p4_tag,
|
| 48 |
+
input [1:0] p4_ctx,
|
| 49 |
+
input p4_wr_en,
|
| 50 |
+
output p4_req_data,
|
| 51 |
+
// port5:
|
| 52 |
+
input [31:0] p5_din,
|
| 53 |
+
input [1:0] p5_tag,
|
| 54 |
+
input [1:0] p5_ctx,
|
| 55 |
+
input p5_wr_en,
|
| 56 |
+
output p5_req_data,
|
| 57 |
+
// port6:
|
| 58 |
+
input [31:0] p6_din,
|
| 59 |
+
input [1:0] p6_tag,
|
| 60 |
+
input [1:0] p6_ctx,
|
| 61 |
+
input p6_wr_en,
|
| 62 |
+
output p6_req_data,
|
| 63 |
+
// port7:
|
| 64 |
+
input [31:0] p7_din,
|
| 65 |
+
input [1:0] p7_tag,
|
| 66 |
+
input [1:0] p7_ctx,
|
| 67 |
+
input p7_wr_en,
|
| 68 |
+
output p7_req_data
|
| 69 |
+
);
|
| 70 |
+
|
| 71 |
+
// 'en' is delayed 1CLK so it's in synch with inputs.
|
| 72 |
+
// output integrity is handled by extra register.
|
| 73 |
+
reg en;
|
| 74 |
+
always @ ( posedge clk )
|
| 75 |
+
en <= rd_en && !rst;
|
| 76 |
+
|
| 77 |
+
assign p0_req_data = rd_en;
|
| 78 |
+
assign p1_req_data = rd_en;
|
| 79 |
+
assign p2_req_data = rd_en;
|
| 80 |
+
assign p3_req_data = rd_en;
|
| 81 |
+
assign p4_req_data = rd_en;
|
| 82 |
+
assign p5_req_data = rd_en;
|
| 83 |
+
assign p6_req_data = rd_en;
|
| 84 |
+
assign p7_req_data = rd_en;
|
| 85 |
+
|
| 86 |
+
reg [31:0] data_reg[14];
|
| 87 |
+
reg [3:0] ctx_reg[14];
|
| 88 |
+
|
| 89 |
+
wire p8_wr_en;
|
| 90 |
+
reg [3:0] idx_base;
|
| 91 |
+
wire [3:0] p0_idx = idx_base;
|
| 92 |
+
wire [3:0] p1_idx = p0_idx + p0_wr_en;
|
| 93 |
+
wire [3:0] p2_idx = p1_idx + p1_wr_en;
|
| 94 |
+
wire [3:0] p3_idx = p2_idx + p2_wr_en;
|
| 95 |
+
wire [3:0] p4_idx = p3_idx + p3_wr_en;
|
| 96 |
+
wire [3:0] p5_idx = p4_idx + p4_wr_en;
|
| 97 |
+
wire [3:0] p6_idx = p5_idx + p5_wr_en;
|
| 98 |
+
wire [3:0] p7_idx = p6_idx + p6_wr_en;
|
| 99 |
+
wire [3:0] p8_idx = p7_idx + p7_wr_en; // idle port
|
| 100 |
+
wire [3:0] idx_max = p8_idx + p8_wr_en; // max index
|
| 101 |
+
|
| 102 |
+
// P8: INTERNAL "IDLE PORT"
|
| 103 |
+
reg [3:0] idle_count;
|
| 104 |
+
wire [31:0] p8_din = 32'hffffffff;
|
| 105 |
+
wire [1:0] p8_tag = 2'b11;
|
| 106 |
+
wire [1:0] p8_ctx = 2'b11;
|
| 107 |
+
assign p8_wr_en = en && (idx_base > 0) && (idle_count > 7) && (idx_base == p8_idx);
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
// output buffer logic, when rd_en is deasserted the output data must be
|
| 112 |
+
// buffered not to cause data loss.
|
| 113 |
+
reg dout_valid;
|
| 114 |
+
wire [255:0] dout_data = { ctx_reg[1], ctx_reg[0], ctx_reg[3], ctx_reg[2], ctx_reg[5], ctx_reg[4], 4'hE, ctx_reg[6], data_reg[0], data_reg[1], data_reg[2], data_reg[3], data_reg[4], data_reg[5], data_reg[6] };
|
| 115 |
+
reg dout_buf_valid;
|
| 116 |
+
reg [255:0] dout_buf_data;
|
| 117 |
+
assign valid = rd_en && (dout_buf_valid || dout_valid);
|
| 118 |
+
assign dout = dout_buf_valid ? dout_buf_data : dout_data;
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
always @ ( posedge clk ) begin
|
| 123 |
+
if( rst )
|
| 124 |
+
begin
|
| 125 |
+
idx_base <= 0;
|
| 126 |
+
idle_count <= 0;
|
| 127 |
+
dout_valid <= 0;
|
| 128 |
+
dout_buf_valid <= 0;
|
| 129 |
+
end
|
| 130 |
+
else
|
| 131 |
+
begin
|
| 132 |
+
// OUTPUT BUFFER LOGIC:
|
| 133 |
+
|
| 134 |
+
if( en ) begin
|
| 135 |
+
dout_buf_valid <= 0;
|
| 136 |
+
end else if( dout_valid ) begin
|
| 137 |
+
dout_buf_data <= dout_data;
|
| 138 |
+
dout_buf_valid <= 1;
|
| 139 |
+
end
|
| 140 |
+
|
| 141 |
+
// OUTPUT VALID:
|
| 142 |
+
dout_valid <= en && (idx_max >= 7);
|
| 143 |
+
|
| 144 |
+
if( en ) begin
|
| 145 |
+
// NEXT INDEX BASE:
|
| 146 |
+
idx_base <= idx_max - ((idx_max >= 7) ? 7 : 0);
|
| 147 |
+
// IDLE COUNT:
|
| 148 |
+
idle_count <= ((idx_base > 0) && (idx_base == p8_idx)) ? (idle_count + 1) : 0;
|
| 149 |
+
// DATA/CTX writes into index [0-8]:
|
| 150 |
+
if( p0_wr_en ) begin data_reg[p0_idx] <= p0_din; ctx_reg[p0_idx] <= {p0_ctx, p0_tag}; end
|
| 151 |
+
if( p1_wr_en ) begin data_reg[p1_idx] <= p1_din; ctx_reg[p1_idx] <= {p1_ctx, p1_tag}; end
|
| 152 |
+
if( p2_wr_en ) begin data_reg[p2_idx] <= p2_din; ctx_reg[p2_idx] <= {p2_ctx, p2_tag}; end
|
| 153 |
+
if( p3_wr_en ) begin data_reg[p3_idx] <= p3_din; ctx_reg[p3_idx] <= {p3_ctx, p3_tag}; end
|
| 154 |
+
if( p4_wr_en ) begin data_reg[p4_idx] <= p4_din; ctx_reg[p4_idx] <= {p4_ctx, p4_tag}; end
|
| 155 |
+
if( p5_wr_en ) begin data_reg[p5_idx] <= p5_din; ctx_reg[p5_idx] <= {p5_ctx, p5_tag}; end
|
| 156 |
+
if( p6_wr_en ) begin data_reg[p6_idx] <= p6_din; ctx_reg[p6_idx] <= {p6_ctx, p6_tag}; end
|
| 157 |
+
if( p7_wr_en ) begin data_reg[p7_idx] <= p7_din; ctx_reg[p7_idx] <= {p7_ctx, p7_tag}; end
|
| 158 |
+
if( p8_wr_en ) begin data_reg[p8_idx] <= p8_din; ctx_reg[p8_idx] <= {p8_ctx, p8_tag}; end
|
| 159 |
+
end
|
| 160 |
+
|
| 161 |
+
if( dout_valid ) begin
|
| 162 |
+
// DATA/CTX previous move:
|
| 163 |
+
if( idx_base > 0) begin data_reg[0] <= data_reg[7+0]; ctx_reg[0] <= ctx_reg[7+0]; end
|
| 164 |
+
if( idx_base > 1) begin data_reg[1] <= data_reg[7+1]; ctx_reg[1] <= ctx_reg[7+1]; end
|
| 165 |
+
if( idx_base > 2) begin data_reg[2] <= data_reg[7+2]; ctx_reg[2] <= ctx_reg[7+2]; end
|
| 166 |
+
if( idx_base > 3) begin data_reg[3] <= data_reg[7+3]; ctx_reg[3] <= ctx_reg[7+3]; end
|
| 167 |
+
if( idx_base > 4) begin data_reg[4] <= data_reg[7+4]; ctx_reg[4] <= ctx_reg[7+4]; end
|
| 168 |
+
if( idx_base > 5) begin data_reg[5] <= data_reg[7+5]; ctx_reg[5] <= ctx_reg[7+5]; end
|
| 169 |
+
if( idx_base > 6) begin data_reg[6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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// PCIe module for Artix-7.
|
| 5 |
+
//
|
| 6 |
+
// (c) Ulf Frisk, 2018-2024
|
| 7 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
`timescale 1ns / 1ps
|
| 11 |
+
`include "pcileech_header.svh"
|
| 12 |
+
|
| 13 |
+
module pcileech_pcie_a7(
|
| 14 |
+
input clk_sys,
|
| 15 |
+
input rst,
|
| 16 |
+
|
| 17 |
+
// PCIe fabric
|
| 18 |
+
output [0:0] pcie_tx_p,
|
| 19 |
+
output [0:0] pcie_tx_n,
|
| 20 |
+
input [0:0] pcie_rx_p,
|
| 21 |
+
input [0:0] pcie_rx_n,
|
| 22 |
+
input pcie_clk_p,
|
| 23 |
+
input pcie_clk_n,
|
| 24 |
+
input pcie_perst_n,
|
| 25 |
+
|
| 26 |
+
// State and Activity LEDs
|
| 27 |
+
output led_state,
|
| 28 |
+
|
| 29 |
+
// PCIe <--> FIFOs
|
| 30 |
+
IfPCIeFifoCfg.mp_pcie dfifo_cfg,
|
| 31 |
+
IfPCIeFifoTlp.mp_pcie dfifo_tlp,
|
| 32 |
+
IfPCIeFifoCore.mp_pcie dfifo_pcie,
|
| 33 |
+
IfShadow2Fifo.shadow dshadow2fifo
|
| 34 |
+
);
|
| 35 |
+
|
| 36 |
+
// ----------------------------------------------------------------------------
|
| 37 |
+
// PCIe DEFINES AND WIRES
|
| 38 |
+
// ----------------------------------------------------------------------------
|
| 39 |
+
|
| 40 |
+
IfPCIeSignals ctx();
|
| 41 |
+
IfPCIeTlpRxTx tlp_tx();
|
| 42 |
+
IfPCIeTlpRxTx tlp_rx();
|
| 43 |
+
IfAXIS128 tlps_tx();
|
| 44 |
+
IfAXIS128 tlps_rx();
|
| 45 |
+
|
| 46 |
+
IfAXIS128 tlps_static(); // static tlp transmit from cfg->tlp
|
| 47 |
+
wire [15:0] pcie_id;
|
| 48 |
+
wire user_lnk_up;
|
| 49 |
+
|
| 50 |
+
// system interface
|
| 51 |
+
wire pcie_clk_c;
|
| 52 |
+
wire clk_pcie;
|
| 53 |
+
wire rst_pcie_user;
|
| 54 |
+
wire rst_subsys = rst || rst_pcie_user || dfifo_pcie.pcie_rst_subsys;
|
| 55 |
+
wire rst_pcie = rst || ~pcie_perst_n || dfifo_pcie.pcie_rst_core;
|
| 56 |
+
|
| 57 |
+
// Buffer for differential system clock
|
| 58 |
+
IBUFDS_GTE2 refclk_ibuf (.O(pcie_clk_c), .ODIV2(), .I(pcie_clk_p), .CEB(1'b0), .IB(pcie_clk_n));
|
| 59 |
+
|
| 60 |
+
// ----------------------------------------------------
|
| 61 |
+
// TickCount64 PCIe REFCLK and LED OUTPUT
|
| 62 |
+
// ----------------------------------------------------
|
| 63 |
+
|
| 64 |
+
time tickcount64_pcie_refclk = 0;
|
| 65 |
+
always @ ( posedge pcie_clk_c )
|
| 66 |
+
tickcount64_pcie_refclk <= tickcount64_pcie_refclk + 1;
|
| 67 |
+
assign led_state = user_lnk_up || tickcount64_pcie_refclk[25];
|
| 68 |
+
|
| 69 |
+
// ----------------------------------------------------------------------------
|
| 70 |
+
// PCIe CFG RX/TX <--> FIFO below
|
| 71 |
+
// ----------------------------------------------------------------------------
|
| 72 |
+
wire [31:0] base_address_register;
|
| 73 |
+
|
| 74 |
+
pcileech_pcie_cfg_a7 i_pcileech_pcie_cfg_a7(
|
| 75 |
+
.rst ( rst_subsys ),
|
| 76 |
+
.clk_sys ( clk_sys ),
|
| 77 |
+
.clk_pcie ( clk_pcie ),
|
| 78 |
+
.dfifo ( dfifo_cfg ),
|
| 79 |
+
.ctx ( ctx ),
|
| 80 |
+
.tlps_static ( tlps_static.source ),
|
| 81 |
+
.pcie_id ( pcie_id ), // -> [15:0]
|
| 82 |
+
.base_address_register ( base_address_register )
|
| 83 |
+
);
|
| 84 |
+
|
| 85 |
+
// ----------------------------------------------------------------------------
|
| 86 |
+
// PCIe TLP RX/TX <--> FIFO below
|
| 87 |
+
// ----------------------------------------------------------------------------
|
| 88 |
+
|
| 89 |
+
pcileech_tlps128_src64 i_pcileech_tlps128_src64(
|
| 90 |
+
.rst ( rst_subsys ),
|
| 91 |
+
.clk_pcie ( clk_pcie ),
|
| 92 |
+
.tlp_rx ( tlp_rx.sink ),
|
| 93 |
+
.tlps_out ( tlps_rx.source_lite )
|
| 94 |
+
);
|
| 95 |
+
|
| 96 |
+
pcileech_pcie_tlp_a7 i_pcileech_pcie_tlp_a7(
|
| 97 |
+
.rst ( rst_subsys ),
|
| 98 |
+
.clk_pcie ( clk_pcie ),
|
| 99 |
+
.clk_sys ( clk_sys ),
|
| 100 |
+
.dfifo ( dfifo_tlp ),
|
| 101 |
+
.tlps_tx ( tlps_tx.source ),
|
| 102 |
+
.tlps_rx ( tlps_rx.sink_lite ),
|
| 103 |
+
.tlps_static ( tlps_static.sink ),
|
| 104 |
+
.dshadow2fifo ( dshadow2fifo ),
|
| 105 |
+
.pcie_id ( pcie_id ), // <- [15:0]
|
| 106 |
+
.base_address_register ( base_address_register )
|
| 107 |
+
);
|
| 108 |
+
|
| 109 |
+
pcileech_tlps128_dst64 i_pcileech_tlps128_dst64(
|
| 110 |
+
.rst ( rst ),
|
| 111 |
+
.clk_pcie ( clk_pcie ),
|
| 112 |
+
.tlp_tx ( tlp_tx.source ),
|
| 113 |
+
.tlps_in ( tlps_tx.sink )
|
| 114 |
+
);
|
| 115 |
+
|
| 116 |
+
// ----------------------------------------------------------------------------
|
| 117 |
+
// PCIe CORE BELOW
|
| 118 |
+
// ----------------------------------------------------------------------------
|
| 119 |
+
|
| 120 |
+
pcie_7x_0 i_pcie_7x_0 (
|
| 121 |
+
// pcie_7x_mgt
|
| 122 |
+
.pci_exp_txp ( pcie_tx_p ), // ->
|
| 123 |
+
.pci_exp_txn ( pcie_tx_n ), // ->
|
| 124 |
+
.pci_exp_rxp ( pcie_rx_p ), // <-
|
| 125 |
+
.pci_exp_rxn ( pcie_rx_n ), // <-
|
| 126 |
+
.sys_clk ( pcie_clk_c ), // <-
|
| 127 |
+
.sys_rst_n ( ~rst_pcie ), // <-
|
| 128 |
+
|
| 129 |
+
// s_axis_tx (transmit data)
|
| 130 |
+
.s_axis_tx_tdata ( tlp_tx.data ), // <- [63:0]
|
| 131 |
+
.s_axis_tx_tkeep ( tlp_tx.keep ), // <- [7:0]
|
| 132 |
+
.s_axis_tx_tlast ( tlp_tx.last ), // <-
|
| 133 |
+
.s_axis_tx_tready ( tlp_tx.ready ), // ->
|
| 134 |
+
.s_axis_tx_tuser ( 4'b0 ), // <- [3:0]
|
| 135 |
+
.s_axis_tx_tvalid ( tlp_tx.valid ), // <-
|
| 136 |
+
|
| 137 |
+
// s_axis_rx (receive data)
|
| 138 |
+
.m_axis_rx_tdata ( tlp_rx.data ), // -> [63:0]
|
| 139 |
+
.m_axis_rx_tkeep ( tlp_rx.keep ), // -> [7:0]
|
| 140 |
+
.m_axis_rx_tlast ( tlp_rx.last ), // ->
|
| 141 |
+
.m_axis_rx_tready ( tlp_rx.ready ), // <-
|
| 142 |
+
.m_axis_rx_tuser ( tlp_rx.user ), // -> [21:0]
|
| 143 |
+
.m_axis_rx_tvalid ( tlp_rx.valid ), // ->
|
| 144 |
+
|
| 145 |
+
// pcie_cfg_mgmt
|
| 146 |
+
.cfg_mgmt_dwaddr ( ctx.cfg_mgmt_dwaddr ), // <- [9:0]
|
| 147 |
+
.cfg_mgmt_byte_en ( ctx.cfg_mgmt_byte_en ), // <- [3:0]
|
| 148 |
+
.cfg_mgmt_do ( ctx.cfg_mgmt_do ), // -> [31:0]
|
| 149 |
+
.cfg_mgmt_rd_en ( ctx.cfg_mgmt_rd_en ), // <-
|
| 150 |
+
.cfg_mgmt_rd_wr_done ( ctx.cfg_mgmt_rd_wr_done ), // ->
|
| 151 |
+
.cfg_mgmt_wr_readonly ( ctx.cfg_mgmt_wr_readonly ), // <-
|
| 152 |
+
.cfg_mgmt_wr_rw1c_as_rw ( ctx.cfg_mgmt_wr_rw1c_as_rw ), // <-
|
| 153 |
+
.cfg_mgmt_di ( ctx.cfg_mgmt_di ), // <- [31:0]
|
| 154 |
+
.cfg_mgmt_wr_en ( ctx.cfg_mgmt_wr_en ), // <-
|
| 155 |
+
|
| 156 |
+
// special core config
|
| 157 |
+
//.pcie_cfg_vend_id ( dfifo_pcie.pcie_cfg_vend_id ), // <- [15:0]
|
| 158 |
+
//.pcie_cfg_dev_id ( dfifo_pcie.pcie_cfg_dev_id ), // <- [15:0]
|
| 159 |
+
//.pcie_cfg_rev_id ( dfifo_pcie.pcie_cfg_rev_id ), // <- [7:0]
|
| 160 |
+
//.pcie_cfg_subsys_vend_id ( dfifo_pcie.pcie_cfg_subsys_vend_id ), // <- [15:0]
|
| 161 |
+
//.pcie_cfg_subsys_id ( dfifo_pcie.pcie_cfg_subsys_id ), // <- [15:0]
|
| 162 |
+
|
| 163 |
+
// pcie2_cfg_interrupt
|
| 164 |
+
.cfg_interrupt_assert ( ctx.cfg_interrupt_assert ), // <-
|
| 165 |
+
.cfg_interrupt ( ctx.cfg_interrupt ), // <-
|
| 166 |
+
.cfg_interrupt_mmenable ( ctx.cfg_interrupt_mmenable ), // -> [2:0]
|
| 167 |
+
.cfg_interrupt_msienable ( ctx.cfg_interrupt_msienable ), // ->
|
| 168 |
+
.cfg_interrupt_msixenable ( ctx.cfg_interrupt_msixenable ), // ->
|
| 169 |
+
.cfg_interrupt_msixfm ( ctx.cfg_interrupt_msixfm ), // ->
|
| 170 |
+
.cfg_pciecap_interrupt_msgnum ( ctx.cfg_pciecap_interrupt_msgnum ), // <- [4:0]
|
| 171 |
+
.cfg_interrupt_rdy ( ctx.cfg_interrupt_rdy ), // ->
|
| 172 |
+
.cfg_interrupt_do ( ctx.cfg_interrupt_do ), // -> [7:0]
|
| 173 |
+
.cfg_interrupt_stat ( ctx.cfg_interrupt_stat ), // <-
|
| 174 |
+
.cfg_interrupt_di ( ctx.cfg_interrupt_di ), // <- [7:0]
|
| 175 |
+
|
| 176 |
+
// pcie2_cfg_control
|
| 177 |
+
.cfg_ds_bus_number ( ctx.cfg_bus_number ), // <- [7:0]
|
| 178 |
+
.cfg_ds_device_number ( ctx.cfg_device_number ), // <- [4:0]
|
| 179 |
+
.cfg_ds_function_number ( ctx.cfg_function_number ), // <- [2:0]
|
| 180 |
+
.cfg_dsn ( ctx.cfg_dsn ), // <- [63:0]
|
| 181 |
+
.cfg_pm_force_state ( ctx.cfg_pm_force_state ), // <- [1:0]
|
| 182 |
+
.cfg_pm_force_state_en ( ctx.cfg_pm_force_state_en ), // <-
|
| 183 |
+
.cfg_pm_halt_aspm_l0s ( ctx.cfg_pm_halt_aspm_l0s ), // <-
|
| 184 |
+
.cfg_pm_halt_aspm_l1 ( ctx.cfg_pm_halt_aspm_l1 ), // <-
|
| 185 |
+
.cfg_pm_send_pme_to ( ctx.cfg_pm_send_pme_to ), // <-
|
| 186 |
+
.cfg_pm_wake ( ctx.cfg_pm_wake ), // <-
|
| 187 |
+
.rx_np_ok ( ctx.rx_np_ok ), // <-
|
| 188 |
+
.rx_np_req ( ctx.rx_np_req ), // <-
|
| 189 |
+
.cfg_trn_pending ( ctx.cfg_trn_pending ), // <-
|
| 190 |
+
.cfg_turnoff_ok ( ctx.cfg_turnoff_ok ), // <-
|
| 191 |
+
.tx_cfg_gnt ( ctx.tx_cfg_gnt ), // <-
|
| 192 |
+
|
| 193 |
+
// pcie2_cfg_status
|
| 194 |
+
.cfg_command ( ctx.cfg_command ), // -> [15:0]
|
| 195 |
+
.cfg_bus_number ( ctx.cfg_bus_number ), // -> [7:0]
|
| 196 |
+
.cfg_device_number ( ctx.cfg_device_number ), // -> [4:0]
|
| 197 |
+
.cfg_function_number ( ctx.cfg_function_number ), // -> [2:0]
|
| 198 |
+
.cfg_root_control_pme_int_en( ctx.cfg_root_control_pme_int_en ), // ->
|
| 199 |
+
.cfg_bridge_serr_en ( ctx.cfg_bridge_serr_en ), // ->
|
| 200 |
+
.cfg_dcommand ( ctx.cfg_dcommand ), // -> [15:0]
|
| 201 |
+
.cfg_dcommand2 ( ctx.cfg_dcommand2 ), // -> [15:0]
|
| 202 |
+
.cfg_dstatus ( ctx.cfg_dstatus ), // -> [15:0]
|
| 203 |
+
.cfg_lcommand ( ctx.cfg_lcommand ), // -> [15:0]
|
| 204 |
+
.cfg_lstatus ( ctx.cfg_lstatus ), // -> [15:0]
|
| 205 |
+
.cfg_pcie_link_state ( ctx.cfg_pcie_link_state ), // -> [2:0]
|
| 206 |
+
.cfg_pmcsr_pme_en ( ctx.cfg_pmcsr_pme_en ), // ->
|
| 207 |
+
.cfg_pmcsr_pme_status ( ctx.cfg_pmcsr_pme_status ), // ->
|
| 208 |
+
.cfg_pmcsr_powerstate ( ctx.cfg_pmcsr_powerstate ), // -> [1:0]
|
| 209 |
+
.cfg_received_func_lvl_rst ( ctx.cfg_received_func_lvl_rst ), // ->
|
| 210 |
+
.cfg_status ( ctx.cfg_status ), // -> [15:0]
|
| 211 |
+
.cfg_to_turnoff ( ctx.cfg_to_turnoff ), // ->
|
| 212 |
+
.tx_buf_av ( ctx.tx_buf_av ), // -> [5:0]
|
| 213 |
+
.tx_cfg_req ( ctx.tx_cfg_req ), // ->
|
| 214 |
+
.tx_err_drop ( ctx.tx_err_drop ), // ->
|
| 215 |
+
.cfg_vc_tcvc_map ( ctx.cfg_vc_tcvc_map ), // -> [6:0]
|
| 216 |
+
.cfg_aer_rooterr_corr_err_received ( ctx.cfg_aer_rooterr_corr_err_received ), // ->
|
| 217 |
+
.cfg_aer_rooterr_corr_err_reporting_en ( ctx.cfg_aer_rooterr_corr_err_reporting_en ), // ->
|
| 218 |
+
.cfg_aer_rooterr_fatal_err_received ( ctx.cfg_aer_rooterr_fatal_err_received ), // ->
|
| 219 |
+
.cfg_aer_rooterr_fatal_err_reporting_en ( ctx.cfg_aer_rooterr_fatal_err_reporting_en ), // ->
|
| 220 |
+
.cfg_aer_rooterr_non_fatal_err_received ( ctx.cfg_aer_rooterr_non_fatal_err_received ), // ->
|
| 221 |
+
.cfg_aer_rooterr_non_fatal_err_reporting_en ( ctx.cfg_aer_rooterr_non_fatal_err_reporting_en ), // ->
|
| 222 |
+
.cfg_root_control_syserr_corr_err_en ( ctx.cfg_root_control_syserr_corr_err_en ), // ->
|
| 223 |
+
.cfg_root_control_syserr_fatal_err_en ( ctx.cfg_root_control_syserr_fatal_err_en ), // ->
|
| 224 |
+
.cfg_root_control_syserr_non_fatal_err_en ( ctx.cfg_root_control_syserr_non_fatal_err_en ), // ->
|
| 225 |
+
.cfg_slot_control_electromech_il_ctl_pulse ( ctx.cfg_slot_control_electromech_il_ctl_pulse ), // ->
|
| 226 |
+
|
| 227 |
+
// PCIe core PHY
|
| 228 |
+
.pl_initial_link_width ( ctx.pl_initial_link_width ), // -> [2:0]
|
| 229 |
+
.pl_phy_lnk_up ( ctx.pl_phy_lnk_up ), // ->
|
| 230 |
+
.pl_lane_reversal_mode ( ctx.pl_lane_reversal_mode ), // -> [1:0]
|
| 231 |
+
.pl_link_gen2_cap ( ctx.pl_link_gen2_cap ), // ->
|
| 232 |
+
.pl_link_partner_gen2_supported ( ctx.pl_link_partner_gen2_supported ), // ->
|
| 233 |
+
.pl_link_upcfg_cap ( ctx.pl_link_upcfg_cap ), // ->
|
| 234 |
+
.pl_sel_lnk_rate ( ctx.pl_sel_lnk_rate ), // ->
|
| 235 |
+
.pl_sel_lnk_width ( ctx.pl_sel_lnk_width ), // -> [1:0]
|
| 236 |
+
.pl_ltssm_state ( ctx.pl_ltssm_state ), // -> [5:0]
|
| 237 |
+
.pl_rx_pm_state ( ctx.pl_rx_pm_state ), // -> [1:0]
|
| 238 |
+
.pl_tx_pm_state ( ctx.pl_tx_pm_state ), // -> [2:0]
|
| 239 |
+
.pl_directed_change_done ( ctx.pl_directed_change_done ), // ->
|
| 240 |
+
.pl_received_hot_rst ( ctx.pl_received_hot_rst ), // ->
|
| 241 |
+
.pl_directed_link_auton ( ctx.pl_directed_link_auton ), // <-
|
| 242 |
+
.pl_directed_link_change ( ctx.pl_directed_link_change ), // <- [1:0]
|
| 243 |
+
.pl_directed_link_speed ( ctx.pl_directed_link_speed ), // <-
|
| 244 |
+
.pl_directed_link_width ( ctx.pl_directed_link_width ), // <- [1:0]
|
| 245 |
+
.pl_upstream_prefer_deemph ( ctx.pl_upstream_prefer_deemph ), // <-
|
| 246 |
+
.pl_transmit_hot_rst ( ctx.pl_transmit_hot_rst ), // <-
|
| 247 |
+
.pl_downstream_deemph_source( ctx.pl_downstream_deemph_source ), // <-
|
| 248 |
+
|
| 249 |
+
// DRP - clock domain clk_100 - write should only happen when core is in reset state ...
|
| 250 |
+
.pcie_drp_clk ( clk_sys ), // <-
|
| 251 |
+
.pcie_drp_en ( dfifo_pcie.drp_en ), // <-
|
| 252 |
+
.pcie_drp_we ( dfifo_pcie.drp_we ), // <-
|
| 253 |
+
.pcie_drp_addr ( dfifo_pcie.drp_addr ), // <- [8:0]
|
| 254 |
+
.pcie_drp_di ( dfifo_pcie.drp_di ), // <- [15:0]
|
| 255 |
+
.pcie_drp_rdy ( dfifo_pcie.drp_rdy ), // ->
|
| 256 |
+
.pcie_drp_do ( dfifo_pcie.drp_do ), // -> [15:0]
|
| 257 |
+
|
| 258 |
+
// user interface
|
| 259 |
+
.user_clk_out ( clk_pcie ), // ->
|
| 260 |
+
.user_reset_out ( rst_pcie_user ), // ->
|
| 261 |
+
.user_lnk_up ( user_lnk_up ), // ->
|
| 262 |
+
.user_app_rdy ( ) // ->
|
| 263 |
+
);
|
| 264 |
+
|
| 265 |
+
endmodule
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
// ------------------------------------------------------------------------
|
| 269 |
+
// TLP STREAM SINK:
|
| 270 |
+
// Convert a 128-bit TLP-AXI-STREAM to a 64-bit PCIe core AXI-STREAM.
|
| 271 |
+
// ------------------------------------------------------------------------
|
| 272 |
+
module pcileech_tlps128_dst64(
|
| 273 |
+
input rst,
|
| 274 |
+
input clk_pcie,
|
| 275 |
+
IfPCIeTlpRxTx.source tlp_tx,
|
| 276 |
+
IfAXIS128.sink tlps_in
|
| 277 |
+
);
|
| 278 |
+
|
| 279 |
+
bit [63:0] d1_tdata;
|
| 280 |
+
bit d1_tkeepdw2;
|
| 281 |
+
bit d1_tlast;
|
| 282 |
+
bit d1_tvalid = 0;
|
| 283 |
+
|
| 284 |
+
assign tlps_in.tready = tlp_tx.ready && !(tlps_in.tvalid && tlps_in.tkeepdw[2]);
|
| 285 |
+
|
| 286 |
+
wire tkeepdw2 = d1_tvalid ? d1_tkeepdw2 : tlps_in.tkeepdw[1];
|
| 287 |
+
assign tlp_tx.data = d1_tvalid ? d1_tdata : tlps_in.tdata[63:0];
|
| 288 |
+
assign tlp_tx.last = d1_tvalid ? d1_tlast : (tlps_in.tlast && !tlps_in.tkeepdw[2]);
|
| 289 |
+
assign tlp_tx.keep = tkeepdw2 ? 8'hff : 8'h0f;
|
| 290 |
+
assign tlp_tx.valid = d1_tvalid || tlps_in.tvalid;
|
| 291 |
+
|
| 292 |
+
always @ ( posedge clk_pcie ) begin
|
| 293 |
+
d1_tvalid <= !rst && tlps_in.tvalid && tlps_in.tkeepdw[2];
|
| 294 |
+
d1_tdata <= tlps_in.tdata[127:64];
|
| 295 |
+
d1_tlast <= tlps_in.tlast;
|
| 296 |
+
d1_tkeepdw2 <= tlps_in.tkeepdw[3];
|
| 297 |
+
end
|
| 298 |
+
|
| 299 |
+
endmodule
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
// ------------------------------------------------------------------------
|
| 303 |
+
// TLP STREAM SOURCE:
|
| 304 |
+
// Convert a 64-bit PCIe core AXIS to a 128-bit TLP-AXI-STREAM
|
| 305 |
+
// ------------------------------------------------------------------------
|
| 306 |
+
module pcileech_tlps128_src64(
|
| 307 |
+
input rst,
|
| 308 |
+
input clk_pcie,
|
| 309 |
+
IfPCIeTlpRxTx.sink tlp_rx,
|
| 310 |
+
IfAXIS128.source_lite tlps_out
|
| 311 |
+
);
|
| 312 |
+
|
| 313 |
+
bit [127:0] tdata;
|
| 314 |
+
bit first = 1;
|
| 315 |
+
bit tlast = 0;
|
| 316 |
+
bit [3:0] len = 0;
|
| 317 |
+
bit [6:0] bar_hit = 0;
|
| 318 |
+
wire tvalid = tlast || (len>2);
|
| 319 |
+
|
| 320 |
+
assign tlp_rx.ready = 1'b1;
|
| 321 |
+
assign tlps_out.tdata = tdata;
|
| 322 |
+
assign tlps_out.tkeepdw = {(len>3), (len>2), (len>1), 1'b1};
|
| 323 |
+
assign tlps_out.tlast = tlast;
|
| 324 |
+
assign tlps_out.tvalid = tvalid;
|
| 325 |
+
assign tlps_out.tuser[0] = first;
|
| 326 |
+
assign tlps_out.tuser[1] = tlast;
|
| 327 |
+
assign tlps_out.tuser[8:2] = bar_hit;
|
| 328 |
+
|
| 329 |
+
wire [3:0] next_base = (tlast || tvalid) ? 0 : len;
|
| 330 |
+
wire [3:0] next_len = next_base + 1 + tlp_rx.keep[4];
|
| 331 |
+
|
| 332 |
+
always @ ( posedge clk_pcie )
|
| 333 |
+
if ( rst ) begin
|
| 334 |
+
first <= 1;
|
| 335 |
+
tlast <= 0;
|
| 336 |
+
len <= 0;
|
| 337 |
+
bar_hit <= 0;
|
| 338 |
+
end
|
| 339 |
+
else if ( tlp_rx.valid ) begin
|
| 340 |
+
tdata[(32*next_base)+:64] <= tlp_rx.data;
|
| 341 |
+
first <= tvalid ? tlast : first;
|
| 342 |
+
tlast <= tlp_rx.last;
|
| 343 |
+
len <= next_len;
|
| 344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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// PCIe module for Artix-7.
|
| 5 |
+
//
|
| 6 |
+
// (c) Ulf Frisk, 2018-2024
|
| 7 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
`timescale 1ns / 1ps
|
| 11 |
+
`include "pcileech_header.svh"
|
| 12 |
+
|
| 13 |
+
module pcileech_pcie_a7x4(
|
| 14 |
+
input clk_sys,
|
| 15 |
+
input rst,
|
| 16 |
+
|
| 17 |
+
// PCIe fabric
|
| 18 |
+
output [3:0] pcie_tx_p,
|
| 19 |
+
output [3:0] pcie_tx_n,
|
| 20 |
+
input [3:0] pcie_rx_p,
|
| 21 |
+
input [3:0] pcie_rx_n,
|
| 22 |
+
input pcie_clk_p,
|
| 23 |
+
input pcie_clk_n,
|
| 24 |
+
input pcie_perst_n,
|
| 25 |
+
|
| 26 |
+
// State and Activity LEDs
|
| 27 |
+
output led_state,
|
| 28 |
+
|
| 29 |
+
// PCIe <--> FIFOs
|
| 30 |
+
IfPCIeFifoCfg.mp_pcie dfifo_cfg,
|
| 31 |
+
IfPCIeFifoTlp.mp_pcie dfifo_tlp,
|
| 32 |
+
IfPCIeFifoCore.mp_pcie dfifo_pcie,
|
| 33 |
+
IfShadow2Fifo.shadow dshadow2fifo
|
| 34 |
+
);
|
| 35 |
+
|
| 36 |
+
// ----------------------------------------------------------------------------
|
| 37 |
+
// PCIe DEFINES AND WIRES
|
| 38 |
+
// ----------------------------------------------------------------------------
|
| 39 |
+
|
| 40 |
+
IfPCIeSignals ctx();
|
| 41 |
+
IfAXIS128 tlp_tx();
|
| 42 |
+
IfPCIeTlpRx128 tlp_rx();
|
| 43 |
+
IfAXIS128 tlps_tx();
|
| 44 |
+
IfAXIS128 tlps_rx();
|
| 45 |
+
|
| 46 |
+
IfAXIS128 tlps_static(); // static tlp transmit from cfg->tlp
|
| 47 |
+
wire [15:0] pcie_id;
|
| 48 |
+
wire user_lnk_up;
|
| 49 |
+
|
| 50 |
+
// system interface
|
| 51 |
+
wire pcie_clk_c;
|
| 52 |
+
wire clk_pcie;
|
| 53 |
+
wire rst_pcie_user;
|
| 54 |
+
wire rst_subsys = rst || rst_pcie_user || dfifo_pcie.pcie_rst_subsys;
|
| 55 |
+
wire rst_pcie = rst || ~pcie_perst_n || dfifo_pcie.pcie_rst_core;
|
| 56 |
+
|
| 57 |
+
// Buffer for differential system clock
|
| 58 |
+
IBUFDS_GTE2 refclk_ibuf (.O(pcie_clk_c), .ODIV2(), .I(pcie_clk_p), .CEB(1'b0), .IB(pcie_clk_n));
|
| 59 |
+
|
| 60 |
+
// ----------------------------------------------------
|
| 61 |
+
// TickCount64 PCIe REFCLK and LED OUTPUT
|
| 62 |
+
// ----------------------------------------------------
|
| 63 |
+
|
| 64 |
+
time tickcount64_pcie_refclk = 0;
|
| 65 |
+
always @ ( posedge pcie_clk_c )
|
| 66 |
+
tickcount64_pcie_refclk <= tickcount64_pcie_refclk + 1;
|
| 67 |
+
assign led_state = user_lnk_up || tickcount64_pcie_refclk[25];
|
| 68 |
+
|
| 69 |
+
// ----------------------------------------------------------------------------
|
| 70 |
+
// PCIe CFG RX/TX <--> FIFO below
|
| 71 |
+
// ----------------------------------------------------------------------------
|
| 72 |
+
wire [31:0] base_address_register;
|
| 73 |
+
pcileech_pcie_cfg_a7 i_pcileech_pcie_cfg_a7(
|
| 74 |
+
.rst ( rst_subsys ),
|
| 75 |
+
.clk_sys ( clk_sys ),
|
| 76 |
+
.clk_pcie ( clk_pcie ),
|
| 77 |
+
.dfifo ( dfifo_cfg ),
|
| 78 |
+
.ctx ( ctx ),
|
| 79 |
+
.tlps_static ( tlps_static.source ),
|
| 80 |
+
.pcie_id ( pcie_id ), // -> [15:0]
|
| 81 |
+
.base_address_register ( base_address_register )
|
| 82 |
+
);
|
| 83 |
+
|
| 84 |
+
// ----------------------------------------------------------------------------
|
| 85 |
+
// PCIe TLP RX/TX <--> FIFO below
|
| 86 |
+
// ----------------------------------------------------------------------------
|
| 87 |
+
|
| 88 |
+
pcileech_tlps128_src128 i_pcileech_tlps128_src128(
|
| 89 |
+
.rst ( rst_subsys ),
|
| 90 |
+
.clk_pcie ( clk_pcie ),
|
| 91 |
+
.tlp_rx ( tlp_rx.sink ),
|
| 92 |
+
.tlps_out ( tlps_rx.source_lite )
|
| 93 |
+
);
|
| 94 |
+
|
| 95 |
+
pcileech_pcie_tlp_a7 i_pcileech_pcie_tlp_a7(
|
| 96 |
+
.rst ( rst_subsys ),
|
| 97 |
+
.clk_pcie ( clk_pcie ),
|
| 98 |
+
.clk_sys ( clk_sys ),
|
| 99 |
+
.dfifo ( dfifo_tlp ),
|
| 100 |
+
.tlps_tx ( tlps_tx.source ),
|
| 101 |
+
.tlps_rx ( tlps_rx.sink_lite ),
|
| 102 |
+
.tlps_static ( tlps_static.sink ),
|
| 103 |
+
.dshadow2fifo ( dshadow2fifo ),
|
| 104 |
+
.pcie_id ( pcie_id ), // <- [15:0]
|
| 105 |
+
.base_address_register ( base_address_register )
|
| 106 |
+
);
|
| 107 |
+
|
| 108 |
+
pcileech_tlps128_dst128 i_pcileech_tlps128_dst128(
|
| 109 |
+
.rst ( rst_subsys ),
|
| 110 |
+
.clk_pcie ( clk_pcie ),
|
| 111 |
+
.tlps_in ( tlps_tx.sink ),
|
| 112 |
+
.tlps_out ( tlp_tx.source )
|
| 113 |
+
);
|
| 114 |
+
|
| 115 |
+
wire [15:0] tlp_tx_tkeep;
|
| 116 |
+
assign tlp_tx_tkeep[3:0] = tlp_tx.tkeepdw[0] ? 4'hf : 4'h0;
|
| 117 |
+
assign tlp_tx_tkeep[7:4] = tlp_tx.tkeepdw[1] ? 4'hf : 4'h0;
|
| 118 |
+
assign tlp_tx_tkeep[11:8] = tlp_tx.tkeepdw[2] ? 4'hf : 4'h0;
|
| 119 |
+
assign tlp_tx_tkeep[15:12] = tlp_tx.tkeepdw[3] ? 4'hf : 4'h0;
|
| 120 |
+
|
| 121 |
+
// ----------------------------------------------------------------------------
|
| 122 |
+
// PCIe CORE BELOW
|
| 123 |
+
// ----------------------------------------------------------------------------
|
| 124 |
+
|
| 125 |
+
pcie_7x_0 i_pcie_7x_0 (
|
| 126 |
+
// pcie_7x_mgt
|
| 127 |
+
.pci_exp_txp ( pcie_tx_p ), // ->
|
| 128 |
+
.pci_exp_txn ( pcie_tx_n ), // ->
|
| 129 |
+
.pci_exp_rxp ( pcie_rx_p ), // <-
|
| 130 |
+
.pci_exp_rxn ( pcie_rx_n ), // <-
|
| 131 |
+
.sys_clk ( pcie_clk_c ), // <-
|
| 132 |
+
.sys_rst_n ( ~rst_pcie ), // <-
|
| 133 |
+
|
| 134 |
+
// s_axis_tx (transmit data) - 128-bit AXIS
|
| 135 |
+
.s_axis_tx_tdata ( tlp_tx.tdata ), // <- [127:0]
|
| 136 |
+
.s_axis_tx_tkeep ( tlp_tx_tkeep ), // <- [15:0]
|
| 137 |
+
.s_axis_tx_tlast ( tlp_tx.tlast ), // <-
|
| 138 |
+
.s_axis_tx_tready ( tlp_tx.tready ), // ->
|
| 139 |
+
.s_axis_tx_tuser ( 4'b0000 ), // <- [3:0]
|
| 140 |
+
.s_axis_tx_tvalid ( tlp_tx.tvalid ), // <-
|
| 141 |
+
// s_axis_rx (receive data) - 128-bit AXIS
|
| 142 |
+
.m_axis_rx_tdata ( tlp_rx.data ), // -> [127:0]
|
| 143 |
+
.m_axis_rx_tkeep ( ), // -> [15:0]
|
| 144 |
+
.m_axis_rx_tlast ( ), // ->
|
| 145 |
+
.m_axis_rx_tready ( tlp_rx.ready ), // <-
|
| 146 |
+
.m_axis_rx_tuser ( tlp_rx.user ), // -> [21:0]
|
| 147 |
+
.m_axis_rx_tvalid ( tlp_rx.valid ), // ->
|
| 148 |
+
|
| 149 |
+
// pcie_cfg_mgmt
|
| 150 |
+
.cfg_mgmt_dwaddr ( ctx.cfg_mgmt_dwaddr ), // <- [9:0]
|
| 151 |
+
.cfg_mgmt_byte_en ( ctx.cfg_mgmt_byte_en ), // <- [3:0]
|
| 152 |
+
.cfg_mgmt_do ( ctx.cfg_mgmt_do ), // -> [31:0]
|
| 153 |
+
.cfg_mgmt_rd_en ( ctx.cfg_mgmt_rd_en ), // <-
|
| 154 |
+
.cfg_mgmt_rd_wr_done ( ctx.cfg_mgmt_rd_wr_done ), // ->
|
| 155 |
+
.cfg_mgmt_wr_readonly ( ctx.cfg_mgmt_wr_readonly ), // <-
|
| 156 |
+
.cfg_mgmt_wr_rw1c_as_rw ( ctx.cfg_mgmt_wr_rw1c_as_rw ), // <-
|
| 157 |
+
.cfg_mgmt_di ( ctx.cfg_mgmt_di ), // <- [31:0]
|
| 158 |
+
.cfg_mgmt_wr_en ( ctx.cfg_mgmt_wr_en ), // <-
|
| 159 |
+
|
| 160 |
+
// special core config
|
| 161 |
+
//.pcie_cfg_vend_id ( dfifo_pcie.pcie_cfg_vend_id ), // <- [15:0]
|
| 162 |
+
//.pcie_cfg_dev_id ( dfifo_pcie.pcie_cfg_dev_id ), // <- [15:0]
|
| 163 |
+
//.pcie_cfg_rev_id ( dfifo_pcie.pcie_cfg_rev_id ), // <- [7:0]
|
| 164 |
+
//.pcie_cfg_subsys_vend_id ( dfifo_pcie.pcie_cfg_subsys_vend_id ), // <- [15:0]
|
| 165 |
+
//.pcie_cfg_subsys_id ( dfifo_pcie.pcie_cfg_subsys_id ), // <- [15:0]
|
| 166 |
+
|
| 167 |
+
// pcie2_cfg_interrupt
|
| 168 |
+
.cfg_interrupt_assert ( ctx.cfg_interrupt_assert ), // <-
|
| 169 |
+
.cfg_interrupt ( ctx.cfg_interrupt ), // <-
|
| 170 |
+
.cfg_interrupt_mmenable ( ctx.cfg_interrupt_mmenable ), // -> [2:0]
|
| 171 |
+
.cfg_interrupt_msienable ( ctx.cfg_interrupt_msienable ), // ->
|
| 172 |
+
.cfg_interrupt_msixenable ( ctx.cfg_interrupt_msixenable ), // ->
|
| 173 |
+
.cfg_interrupt_msixfm ( ctx.cfg_interrupt_msixfm ), // ->
|
| 174 |
+
.cfg_pciecap_interrupt_msgnum ( ctx.cfg_pciecap_interrupt_msgnum ), // <- [4:0]
|
| 175 |
+
.cfg_interrupt_rdy ( ctx.cfg_interrupt_rdy ), // ->
|
| 176 |
+
.cfg_interrupt_do ( ctx.cfg_interrupt_do ), // -> [7:0]
|
| 177 |
+
.cfg_interrupt_stat ( ctx.cfg_interrupt_stat ), // <-
|
| 178 |
+
.cfg_interrupt_di ( ctx.cfg_interrupt_di ), // <- [7:0]
|
| 179 |
+
|
| 180 |
+
// pcie2_cfg_control
|
| 181 |
+
.cfg_ds_bus_number ( ctx.cfg_bus_number ), // <- [7:0]
|
| 182 |
+
.cfg_ds_device_number ( ctx.cfg_device_number ), // <- [4:0]
|
| 183 |
+
.cfg_ds_function_number ( ctx.cfg_function_number ), // <- [2:0]
|
| 184 |
+
.cfg_dsn ( ctx.cfg_dsn ), // <- [63:0]
|
| 185 |
+
.cfg_pm_force_state ( ctx.cfg_pm_force_state ), // <- [1:0]
|
| 186 |
+
.cfg_pm_force_state_en ( ctx.cfg_pm_force_state_en ), // <-
|
| 187 |
+
.cfg_pm_halt_aspm_l0s ( ctx.cfg_pm_halt_aspm_l0s ), // <-
|
| 188 |
+
.cfg_pm_halt_aspm_l1 ( ctx.cfg_pm_halt_aspm_l1 ), // <-
|
| 189 |
+
.cfg_pm_send_pme_to ( ctx.cfg_pm_send_pme_to ), // <-
|
| 190 |
+
.cfg_pm_wake ( ctx.cfg_pm_wake ), // <-
|
| 191 |
+
.rx_np_ok ( ctx.rx_np_ok ), // <-
|
| 192 |
+
.rx_np_req ( ctx.rx_np_req ), // <-
|
| 193 |
+
.cfg_trn_pending ( ctx.cfg_trn_pending ), // <-
|
| 194 |
+
.cfg_turnoff_ok ( ctx.cfg_turnoff_ok ), // <-
|
| 195 |
+
.tx_cfg_gnt ( ctx.tx_cfg_gnt ), // <-
|
| 196 |
+
|
| 197 |
+
// pcie2_cfg_status
|
| 198 |
+
.cfg_command ( ctx.cfg_command ), // -> [15:0]
|
| 199 |
+
.cfg_bus_number ( ctx.cfg_bus_number ), // -> [7:0]
|
| 200 |
+
.cfg_device_number ( ctx.cfg_device_number ), // -> [4:0]
|
| 201 |
+
.cfg_function_number ( ctx.cfg_function_number ), // -> [2:0]
|
| 202 |
+
.cfg_root_control_pme_int_en( ctx.cfg_root_control_pme_int_en ), // ->
|
| 203 |
+
.cfg_bridge_serr_en ( ctx.cfg_bridge_serr_en ), // ->
|
| 204 |
+
.cfg_dcommand ( ctx.cfg_dcommand ), // -> [15:0]
|
| 205 |
+
.cfg_dcommand2 ( ctx.cfg_dcommand2 ), // -> [15:0]
|
| 206 |
+
.cfg_dstatus ( ctx.cfg_dstatus ), // -> [15:0]
|
| 207 |
+
.cfg_lcommand ( ctx.cfg_lcommand ), // -> [15:0]
|
| 208 |
+
.cfg_lstatus ( ctx.cfg_lstatus ), // -> [15:0]
|
| 209 |
+
.cfg_pcie_link_state ( ctx.cfg_pcie_link_state ), // -> [2:0]
|
| 210 |
+
.cfg_pmcsr_pme_en ( ctx.cfg_pmcsr_pme_en ), // ->
|
| 211 |
+
.cfg_pmcsr_pme_status ( ctx.cfg_pmcsr_pme_status ), // ->
|
| 212 |
+
.cfg_pmcsr_powerstate ( ctx.cfg_pmcsr_powerstate ), // -> [1:0]
|
| 213 |
+
.cfg_received_func_lvl_rst ( ctx.cfg_received_func_lvl_rst ), // ->
|
| 214 |
+
.cfg_status ( ctx.cfg_status ), // -> [15:0]
|
| 215 |
+
.cfg_to_turnoff ( ctx.cfg_to_turnoff ), // ->
|
| 216 |
+
.tx_buf_av ( ctx.tx_buf_av ), // -> [5:0]
|
| 217 |
+
.tx_cfg_req ( ctx.tx_cfg_req ), // ->
|
| 218 |
+
.tx_err_drop ( ctx.tx_err_drop ), // ->
|
| 219 |
+
.cfg_vc_tcvc_map ( ctx.cfg_vc_tcvc_map ), // -> [6:0]
|
| 220 |
+
.cfg_aer_rooterr_corr_err_received ( ctx.cfg_aer_rooterr_corr_err_received ), // ->
|
| 221 |
+
.cfg_aer_rooterr_corr_err_reporting_en ( ctx.cfg_aer_rooterr_corr_err_reporting_en ), // ->
|
| 222 |
+
.cfg_aer_rooterr_fatal_err_received ( ctx.cfg_aer_rooterr_fatal_err_received ), // ->
|
| 223 |
+
.cfg_aer_rooterr_fatal_err_reporting_en ( ctx.cfg_aer_rooterr_fatal_err_reporting_en ), // ->
|
| 224 |
+
.cfg_aer_rooterr_non_fatal_err_received ( ctx.cfg_aer_rooterr_non_fatal_err_received ), // ->
|
| 225 |
+
.cfg_aer_rooterr_non_fatal_err_reporting_en ( ctx.cfg_aer_rooterr_non_fatal_err_reporting_en ), // ->
|
| 226 |
+
.cfg_root_control_syserr_corr_err_en ( ctx.cfg_root_control_syserr_corr_err_en ), // ->
|
| 227 |
+
.cfg_root_control_syserr_fatal_err_en ( ctx.cfg_root_control_syserr_fatal_err_en ), // ->
|
| 228 |
+
.cfg_root_control_syserr_non_fatal_err_en ( ctx.cfg_root_control_syserr_non_fatal_err_en ), // ->
|
| 229 |
+
.cfg_slot_control_electromech_il_ctl_pulse ( ctx.cfg_slot_control_electromech_il_ctl_pulse ), // ->
|
| 230 |
+
|
| 231 |
+
// PCIe core PHY
|
| 232 |
+
.pl_initial_link_width ( ctx.pl_initial_link_width ), // -> [2:0]
|
| 233 |
+
.pl_phy_lnk_up ( ctx.pl_phy_lnk_up ), // ->
|
| 234 |
+
.pl_lane_reversal_mode ( ctx.pl_lane_reversal_mode ), // -> [1:0]
|
| 235 |
+
.pl_link_gen2_cap ( ctx.pl_link_gen2_cap ), // ->
|
| 236 |
+
.pl_link_partner_gen2_supported ( ctx.pl_link_partner_gen2_supported ), // ->
|
| 237 |
+
.pl_link_upcfg_cap ( ctx.pl_link_upcfg_cap ), // ->
|
| 238 |
+
.pl_sel_lnk_rate ( ctx.pl_sel_lnk_rate ), // ->
|
| 239 |
+
.pl_sel_lnk_width ( ctx.pl_sel_lnk_width ), // -> [1:0]
|
| 240 |
+
.pl_ltssm_state ( ctx.pl_ltssm_state ), // -> [5:0]
|
| 241 |
+
.pl_rx_pm_state ( ctx.pl_rx_pm_state ), // -> [1:0]
|
| 242 |
+
.pl_tx_pm_state ( ctx.pl_tx_pm_state ), // -> [2:0]
|
| 243 |
+
.pl_directed_change_done ( ctx.pl_directed_change_done ), // ->
|
| 244 |
+
.pl_received_hot_rst ( ctx.pl_received_hot_rst ), // ->
|
| 245 |
+
.pl_directed_link_auton ( ctx.pl_directed_link_auton ), // <-
|
| 246 |
+
.pl_directed_link_change ( ctx.pl_directed_link_change ), // <- [1:0]
|
| 247 |
+
.pl_directed_link_speed ( ctx.pl_directed_link_speed ), // <-
|
| 248 |
+
.pl_directed_link_width ( ctx.pl_directed_link_width ), // <- [1:0]
|
| 249 |
+
.pl_upstream_prefer_deemph ( ctx.pl_upstream_prefer_deemph ), // <-
|
| 250 |
+
.pl_transmit_hot_rst ( ctx.pl_transmit_hot_rst ), // <-
|
| 251 |
+
.pl_downstream_deemph_source( ctx.pl_downstream_deemph_source ), // <-
|
| 252 |
+
|
| 253 |
+
// DRP - clock domain clk - write should only happen when core is in reset state ...
|
| 254 |
+
.pcie_drp_clk ( clk_sys ), // <-
|
| 255 |
+
.pcie_drp_en ( dfifo_pcie.drp_en ), // <-
|
| 256 |
+
.pcie_drp_we ( dfifo_pcie.drp_we ), // <-
|
| 257 |
+
.pcie_drp_addr ( dfifo_pcie.drp_addr ), // <- [8:0]
|
| 258 |
+
.pcie_drp_di ( dfifo_pcie.drp_di ), // <- [15:0]
|
| 259 |
+
.pcie_drp_rdy ( dfifo_pcie.drp_rdy ), // ->
|
| 260 |
+
.pcie_drp_do ( dfifo_pcie.drp_do ), // -> [15:0]
|
| 261 |
+
|
| 262 |
+
// user interface
|
| 263 |
+
.user_clk_out ( clk_pcie ), // ->
|
| 264 |
+
.user_reset_out ( rst_pcie_user ), // ->
|
| 265 |
+
.user_lnk_up ( user_lnk_up ), // ->
|
| 266 |
+
.user_app_rdy ( ) // ->
|
| 267 |
+
);
|
| 268 |
+
|
| 269 |
+
endmodule
|
| 270 |
+
|
| 271 |
+
// ------------------------------------------------------------------------
|
| 272 |
+
// TLP STREAM SINK:
|
| 273 |
+
// Convert a 128-bit TLP-AXI-STREAM to a 128-bit PCIe core AXI-STREAM.
|
| 274 |
+
// ------------------------------------------------------------------------
|
| 275 |
+
module pcileech_tlps128_dst128(
|
| 276 |
+
input rst,
|
| 277 |
+
input clk_pcie,
|
| 278 |
+
IfAXIS128.source tlps_out,
|
| 279 |
+
IfAXIS128.sink tlps_in
|
| 280 |
+
);
|
| 281 |
+
|
| 282 |
+
bit [127:0] d_tdata;
|
| 283 |
+
bit [3:0] d_tkeepdw;
|
| 284 |
+
bit d_tlast;
|
| 285 |
+
bit d_tvalid;
|
| 286 |
+
always @ ( posedge clk_pcie ) begin
|
| 287 |
+
if ( rst ) begin
|
| 288 |
+
d_tvalid <= 0;
|
| 289 |
+
end
|
| 290 |
+
else if ( tlps_in.tvalid ) begin
|
| 291 |
+
d_tdata <= tlps_in.tdata;
|
| 292 |
+
d_tkeepdw <= tlps_in.tkeepdw;
|
| 293 |
+
d_tlast <= tlps_in.tlast;
|
| 294 |
+
d_tvalid <= !tlps_out.tready;
|
| 295 |
+
end
|
| 296 |
+
else if ( tlps_out.tready ) begin
|
| 297 |
+
d_tvalid <= 0;
|
| 298 |
+
end
|
| 299 |
+
end
|
| 300 |
+
|
| 301 |
+
assign tlps_in.tready = tlps_out.tready && !d_tvalid;
|
| 302 |
+
assign tlps_out.tdata = d_tvalid ? d_tdata : tlps_in.tdata;
|
| 303 |
+
assign tlps_out.tkeepdw = d_tvalid ? d_tkeepdw : tlps_in.tkeepdw;
|
| 304 |
+
assign tlps_out.tlast = d_tvalid ? d_tlast : tlps_in.tlast;
|
| 305 |
+
assign tlps_out.tvalid = d_tvalid || tlps_in.tvalid;
|
| 306 |
+
|
| 307 |
+
endmodule
|
| 308 |
+
|
| 309 |
+
// ------------------------------------------------------------------------
|
| 310 |
+
// TLP STREAM SOURCE:
|
| 311 |
+
// Convert a 128-bit PCIe core AXIS to a 128-bit TLP-AXI-STREAM
|
| 312 |
+
// ------------------------------------------------------------------------
|
| 313 |
+
module pcileech_tlps128_src128(
|
| 314 |
+
input rst,
|
| 315 |
+
input clk_pcie,
|
| 316 |
+
IfPCIeTlpRx128.sink tlp_rx,
|
| 317 |
+
IfAXIS128.source_lite tlps_out
|
| 318 |
+
);
|
| 319 |
+
|
| 320 |
+
bit rxd_ready;
|
| 321 |
+
wire [127:0] rxf_data = tlp_rx.data;
|
| 322 |
+
wire [21:0] rxf_user = tlp_rx.user;
|
| 323 |
+
wire rxf_valid = tlp_rx.valid && rxd_ready;
|
| 324 |
+
wire rxf_ready;
|
| 325 |
+
assign tlp_rx.ready = rxf_ready;
|
| 326 |
+
|
| 327 |
+
bit rxd_sof;
|
| 328 |
+
bit rxd_eof;
|
| 329 |
+
bit rxd_eof_dw;
|
| 330 |
+
bit [6:0] rxd_bar_hit;
|
| 331 |
+
bit [63:0] rxd_data_qw;
|
| 332 |
+
bit rxd_valid;
|
| 333 |
+
|
| 334 |
+
wire [63:0] rxf_data_qw0 = rxf_data[63:0];
|
| 335 |
+
wire [63:0] rxf_data_qw1 = rxf_data[127:64];
|
| 336 |
+
wire rxf_sof = rxf_user[14];
|
| 337 |
+
wire rxf_sof_qw = rxf_user[13];
|
| 338 |
+
wire rxf_eof = rxf_user[21];
|
| 339 |
+
wire [1:0] rxf_eof_dw = rxf_user[20:19];
|
| 340 |
+
wire [6:0] rxf_bar_hit = rxf_user[8:2];
|
| 341 |
+
|
| 342 |
+
wire [3:0] rx_keep_dw;
|
| 343 |
+
|
| 344 |
+
assign rxf_ready = !(rxd_valid && rxf_eof && (rxf_eof_dw >= 2)) || !rxf_valid;
|
| 345 |
+
|
| 346 |
+
assign tlps_out.tdata = rxd_valid ? {rxf_data_qw0, rxd_data_qw} : {rxf_data_qw1, rxf_data_qw0};
|
| 347 |
+
assign tlps_out.tuser[0] = rxd_valid ? rxd_sof : (rxf_sof && !rxf_sof_qw); // tfirst
|
| 348 |
+
assign tlps_out.tuser[1] = rxd_valid ? (rxd_eof || (rxf_eof && (rxf_eof_dw <= 1))) : rxf_eof; // tlast
|
| 349 |
+
assign tlps_out.tuser[8:2] = rxd_valid ? rxd_bar_hit : rxf_bar_hit;
|
| 350 |
+
assign tlps_out.tlast = tlps_out.tuser[1];
|
| 351 |
+
assign tlps_out.tvalid = rxd_valid || (rxf_valid && rxf_eof) || (rxf_valid && !(rxf_sof && rxf_sof_qw));
|
| 352 |
+
|
| 353 |
+
assign tlps_out.tkeepdw[0] = rxd_valid || rxf_valid;
|
| 354 |
+
assign tlps_out.tkeepdw[1] = rxd_valid ? (!rxd_eof || rxd_eof_dw) :
|
| 355 |
+
(!rxf_eof || (rxf_eof_dw >= 1));
|
| 356 |
+
assign tlps_out.tkeepdw[2] = rxd_valid ? (!rxd_eof && rxf_valid) :
|
| 357 |
+
(!rxf_eof || (rxf_eof_dw >= 2));
|
| 358 |
+
assign tlps_out.tkeepdw[3] = rxd_valid ? (!rxd_eof && rxf_valid && (!rxf_eof || (rxf_eof_dw >= 1))) :
|
| 359 |
+
(!rxf_eof || (rxf_eof_dw >= 3));
|
| 360 |
+
|
| 361 |
+
wire rxf_rxd_valid_next = !rst && rxf_valid && (rxd_valid ? ((!rxf_sof && !rxf_eof) || (rxf_sof && rxf_sof_qw) || (rxf_eof && (rxf_eof_dw >= 2))) :
|
| 362 |
+
(rxf_sof && rxf_sof_qw));
|
| 363 |
+
|
| 364 |
+
always @ ( posedge clk_pcie ) begin
|
| 365 |
+
rxd_ready <= rxf_ready;
|
| 366 |
+
rxd_bar_hit <= rxf_bar_hit;
|
| 367 |
+
rxd_data_qw <= rxf_data_qw1;
|
| 368 |
+
rxd_sof <= rxf_sof && rxf_sof_qw;
|
| 369 |
+
rxd_eof <= rxf_eof && (rxf_eof_dw >= 2);
|
| 370 |
+
rxd_eof_dw <= (rxf_eof_dw == 3);
|
| 371 |
+
rxd_valid <= rxf_rxd_valid_next;
|
| 372 |
+
end
|
| 373 |
+
|
| 374 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/src/pcileech_pcie_cfg_a7.sv
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// PCIe configuration module - CFG handling for Artix-7.
|
| 5 |
+
//
|
| 6 |
+
// (c) Ulf Frisk, 2018-2024
|
| 7 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
`timescale 1ns / 1ps
|
| 11 |
+
`include "pcileech_header.svh"
|
| 12 |
+
|
| 13 |
+
module pcileech_pcie_cfg_a7(
|
| 14 |
+
input rst,
|
| 15 |
+
input clk_sys,
|
| 16 |
+
input clk_pcie,
|
| 17 |
+
IfPCIeFifoCfg.mp_pcie dfifo,
|
| 18 |
+
IfPCIeSignals.mpm ctx,
|
| 19 |
+
IfAXIS128.source tlps_static,
|
| 20 |
+
output [15:0] pcie_id,
|
| 21 |
+
output wire [31:0] base_address_register
|
| 22 |
+
);
|
| 23 |
+
|
| 24 |
+
// ----------------------------------------------------
|
| 25 |
+
// TickCount64
|
| 26 |
+
// ----------------------------------------------------
|
| 27 |
+
|
| 28 |
+
time tickcount64 = 0;
|
| 29 |
+
always @ ( posedge clk_pcie )
|
| 30 |
+
tickcount64 <= tickcount64 + 1;
|
| 31 |
+
|
| 32 |
+
// ----------------------------------------------------------------------------
|
| 33 |
+
// Convert received CFG data from FT601 to PCIe clock domain
|
| 34 |
+
// FIFO depth: 512 / 64-bits
|
| 35 |
+
// ----------------------------------------------------------------------------
|
| 36 |
+
reg in_rden;
|
| 37 |
+
wire [63:0] in_dout;
|
| 38 |
+
wire in_empty;
|
| 39 |
+
wire in_valid;
|
| 40 |
+
|
| 41 |
+
reg [63:0] in_data64;
|
| 42 |
+
wire [31:0] in_data32 = in_data64[63:32];
|
| 43 |
+
wire [15:0] in_data16 = in_data64[31:16];
|
| 44 |
+
wire [3:0] in_type = in_data64[15:12];
|
| 45 |
+
|
| 46 |
+
fifo_64_64 i_fifo_pcie_cfg_tx(
|
| 47 |
+
.rst ( rst ),
|
| 48 |
+
.wr_clk ( clk_sys ),
|
| 49 |
+
.rd_clk ( clk_pcie ),
|
| 50 |
+
.din ( dfifo.tx_data ),
|
| 51 |
+
.wr_en ( dfifo.tx_valid ),
|
| 52 |
+
.rd_en ( in_rden ),
|
| 53 |
+
.dout ( in_dout ),
|
| 54 |
+
.full ( ),
|
| 55 |
+
.empty ( in_empty ),
|
| 56 |
+
.valid ( in_valid )
|
| 57 |
+
);
|
| 58 |
+
|
| 59 |
+
// ------------------------------------------------------------------------
|
| 60 |
+
// Convert received CFG from PCIe core and transmit onwards to FT601
|
| 61 |
+
// FIFO depth: 512 / 64-bits.
|
| 62 |
+
// ------------------------------------------------------------------------
|
| 63 |
+
reg out_wren;
|
| 64 |
+
reg [31:0] out_data;
|
| 65 |
+
wire pcie_cfg_rx_almost_full;
|
| 66 |
+
|
| 67 |
+
fifo_32_32_clk2 i_fifo_pcie_cfg_rx(
|
| 68 |
+
.rst ( rst ),
|
| 69 |
+
.wr_clk ( clk_pcie ),
|
| 70 |
+
.rd_clk ( clk_sys ),
|
| 71 |
+
.din ( out_data ),
|
| 72 |
+
.wr_en ( out_wren ),
|
| 73 |
+
.rd_en ( dfifo.rx_rd_en ),
|
| 74 |
+
.dout ( dfifo.rx_data ),
|
| 75 |
+
.full ( ),
|
| 76 |
+
.almost_full ( pcie_cfg_rx_almost_full ),
|
| 77 |
+
.empty ( ),
|
| 78 |
+
.valid ( dfifo.rx_valid )
|
| 79 |
+
);
|
| 80 |
+
|
| 81 |
+
// ------------------------------------------------------------------------
|
| 82 |
+
// REGISTER FILE: COMMON
|
| 83 |
+
// ------------------------------------------------------------------------
|
| 84 |
+
|
| 85 |
+
wire [383:0] ro;
|
| 86 |
+
reg [703:0] rw;
|
| 87 |
+
|
| 88 |
+
// special non-user accessible registers
|
| 89 |
+
reg rwi_cfg_mgmt_rd_en;
|
| 90 |
+
reg rwi_cfg_mgmt_wr_en;
|
| 91 |
+
reg rwi_cfgrd_valid;
|
| 92 |
+
reg [9:0] rwi_cfgrd_addr;
|
| 93 |
+
reg [3:0] rwi_cfgrd_byte_en;
|
| 94 |
+
reg [31:0] rwi_cfgrd_data;
|
| 95 |
+
reg rwi_tlp_static_valid;
|
| 96 |
+
reg rwi_tlp_static_2nd;
|
| 97 |
+
reg rwi_tlp_static_has_data;
|
| 98 |
+
reg [31:0] rwi_count_cfgspace_status_cl;
|
| 99 |
+
bit [31:0] base_address_register_reg;
|
| 100 |
+
|
| 101 |
+
// ------------------------------------------------------------------------
|
| 102 |
+
// REGISTER FILE: READ-ONLY LAYOUT/SPECIFICATION
|
| 103 |
+
// ------------------------------------------------------------------------
|
| 104 |
+
|
| 105 |
+
// MAGIC
|
| 106 |
+
assign base_address_register = base_address_register_reg;
|
| 107 |
+
assign ro[15:0] = 16'h2301; // +000: MAGIC
|
| 108 |
+
// SPECIAL
|
| 109 |
+
assign ro[16] = ctx.cfg_mgmt_rd_en; // +002: SPECIAL
|
| 110 |
+
assign ro[17] = ctx.cfg_mgmt_wr_en; //
|
| 111 |
+
assign ro[31:18] = 0; //
|
| 112 |
+
// SIZEOF / BYTECOUNT [little-endian]
|
| 113 |
+
assign ro[63:32] = $bits(ro) >> 3; // +004: BYTECOUNT
|
| 114 |
+
// PCIe CFG STATUS
|
| 115 |
+
assign ro[71:64] = ctx.cfg_bus_number; // +008:
|
| 116 |
+
assign ro[76:72] = ctx.cfg_device_number; //
|
| 117 |
+
assign ro[79:77] = ctx.cfg_function_number; //
|
| 118 |
+
// PCIe PL PHY
|
| 119 |
+
assign ro[85:80] = ctx.pl_ltssm_state; // +00A
|
| 120 |
+
assign ro[87:86] = ctx.pl_rx_pm_state; //
|
| 121 |
+
assign ro[90:88] = ctx.pl_tx_pm_state; // +00B
|
| 122 |
+
assign ro[93:91] = ctx.pl_initial_link_width; //
|
| 123 |
+
assign ro[95:94] = ctx.pl_lane_reversal_mode; //
|
| 124 |
+
assign ro[97:96] = ctx.pl_sel_lnk_width; // +00C
|
| 125 |
+
assign ro[98] = ctx.pl_phy_lnk_up; //
|
| 126 |
+
assign ro[99] = ctx.pl_link_gen2_cap; //
|
| 127 |
+
assign ro[100] = ctx.pl_link_partner_gen2_supported; //
|
| 128 |
+
assign ro[101] = ctx.pl_link_upcfg_cap; //
|
| 129 |
+
assign ro[102] = ctx.pl_sel_lnk_rate; //
|
| 130 |
+
assign ro[103] = ctx.pl_directed_change_done; // +00D:
|
| 131 |
+
assign ro[104] = ctx.pl_received_hot_rst; //
|
| 132 |
+
assign ro[126:105] = 0; // SLACK
|
| 133 |
+
assign ro[127] = ctx.cfg_mgmt_rd_wr_done; //
|
| 134 |
+
// PCIe CFG MGMT
|
| 135 |
+
assign ro[159:128] = ctx.cfg_mgmt_do; // +010:
|
| 136 |
+
// PCIe CFG STATUS
|
| 137 |
+
assign ro[175:160] = ctx.cfg_command; // +014:
|
| 138 |
+
assign ro[176] = ctx.cfg_aer_rooterr_corr_err_received; // +016:
|
| 139 |
+
assign ro[177] = ctx.cfg_aer_rooterr_corr_err_reporting_en; //
|
| 140 |
+
assign ro[178] = ctx.cfg_aer_rooterr_fatal_err_received; //
|
| 141 |
+
assign ro[179] = ctx.cfg_aer_rooterr_fatal_err_reporting_en; //
|
| 142 |
+
assign ro[180] = ctx.cfg_aer_rooterr_non_fatal_err_received; //
|
| 143 |
+
assign ro[181] = ctx.cfg_aer_rooterr_non_fatal_err_reporting_en; //
|
| 144 |
+
assign ro[182] = ctx.cfg_bridge_serr_en; //
|
| 145 |
+
assign ro[183] = ctx.cfg_received_func_lvl_rst; //
|
| 146 |
+
assign ro[186:184] = ctx.cfg_pcie_link_state; // +017:
|
| 147 |
+
assign ro[187] = ctx.cfg_pmcsr_pme_en; //
|
| 148 |
+
assign ro[189:188] = ctx.cfg_pmcsr_powerstate; //
|
| 149 |
+
assign ro[190] = ctx.cfg_pmcsr_pme_status; //
|
| 150 |
+
assign ro[191] = 0; // SLACK
|
| 151 |
+
assign ro[207:192] = ctx.cfg_dcommand; // +018:
|
| 152 |
+
assign ro[223:208] = ctx.cfg_dcommand2; // +01A:
|
| 153 |
+
assign ro[239:224] = ctx.cfg_dstatus; // +01C:
|
| 154 |
+
assign ro[255:240] = ctx.cfg_lcommand; // +01E:
|
| 155 |
+
assign ro[271:256] = ctx.cfg_lstatus; // +020:
|
| 156 |
+
assign ro[287:272] = ctx.cfg_status; // +022:
|
| 157 |
+
assign ro[293:288] = ctx.tx_buf_av; // +024:
|
| 158 |
+
assign ro[294] = ctx.tx_cfg_req; //
|
| 159 |
+
assign ro[295] = ctx.tx_err_drop; //
|
| 160 |
+
assign ro[302:296] = ctx.cfg_vc_tcvc_map; // +025:
|
| 161 |
+
assign ro[303] = 0; // SLACK
|
| 162 |
+
assign ro[304] = ctx.cfg_root_control_pme_int_en; // +026:
|
| 163 |
+
assign ro[305] = ctx.cfg_root_control_syserr_corr_err_en; //
|
| 164 |
+
assign ro[306] = ctx.cfg_root_control_syserr_fatal_err_en; //
|
| 165 |
+
assign ro[307] = ctx.cfg_root_control_syserr_non_fatal_err_en; //
|
| 166 |
+
assign ro[308] = ctx.cfg_slot_control_electromech_il_ctl_pulse;//
|
| 167 |
+
assign ro[309] = ctx.cfg_to_turnoff; //
|
| 168 |
+
assign ro[319:310] = 0; // SLACK
|
| 169 |
+
// PCIe INTERRUPT
|
| 170 |
+
assign ro[327:320] = ctx.cfg_interrupt_do; // +028:
|
| 171 |
+
assign ro[330:328] = ctx.cfg_interrupt_mmenable; // +029:
|
| 172 |
+
assign ro[331] = ctx.cfg_interrupt_msienable; //
|
| 173 |
+
assign ro[332] = ctx.cfg_interrupt_msixenable; //
|
| 174 |
+
assign ro[333] = ctx.cfg_interrupt_msixfm; //
|
| 175 |
+
assign ro[334] = ctx.cfg_interrupt_rdy; //
|
| 176 |
+
assign ro[335] = 0; // SLACK
|
| 177 |
+
// CFG SPACE READ RESULT
|
| 178 |
+
assign ro[345:336] = rwi_cfgrd_addr; // +02A:
|
| 179 |
+
assign ro[346] = 0; // SLACK
|
| 180 |
+
assign ro[347] = rwi_cfgrd_valid; //
|
| 181 |
+
assign ro[351:348] = rwi_cfgrd_byte_en; //
|
| 182 |
+
assign ro[383:352] = rwi_cfgrd_data; // +02C:
|
| 183 |
+
// 0030 -
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
// ------------------------------------------------------------------------
|
| 187 |
+
// INITIALIZATION/RESET BLOCK _AND_
|
| 188 |
+
// REGISTER FILE: READ-WRITE LAYOUT/SPECIFICATION
|
| 189 |
+
// ------------------------------------------------------------------------
|
| 190 |
+
|
| 191 |
+
localparam integer RWPOS_CFG_RD_EN = 16;
|
| 192 |
+
localparam integer RWPOS_CFG_WR_EN = 17;
|
| 193 |
+
localparam integer RWPOS_CFG_WAIT_COMPLETE = 18;
|
| 194 |
+
localparam integer RWPOS_CFG_STATIC_TLP_TX_EN = 19;
|
| 195 |
+
localparam integer RWPOS_CFG_CFGSPACE_STATUS_CL_EN = 20;
|
| 196 |
+
localparam integer RWPOS_CFG_CFGSPACE_COMMAND_EN = 21;
|
| 197 |
+
|
| 198 |
+
task pcileech_pcie_cfg_a7_initialvalues; // task is non automatic
|
| 199 |
+
begin
|
| 200 |
+
out_wren <= 1'b0;
|
| 201 |
+
|
| 202 |
+
rwi_cfg_mgmt_rd_en <= 1'b0;
|
| 203 |
+
rwi_cfg_mgmt_wr_en <= 1'b0;
|
| 204 |
+
base_address_register_reg <= 32'h00000000;
|
| 205 |
+
|
| 206 |
+
// MAGIC
|
| 207 |
+
rw[15:0] <= 16'h6745; // +000:
|
| 208 |
+
// SPECIAL START TASK BLOCK (write 1 to start action)
|
| 209 |
+
rw[16] <= 0; // +002: CFG RD EN
|
| 210 |
+
rw[17] <= 0; // CFG WR EN
|
| 211 |
+
rw[18] <= 0; // WAIT FOR PCIe CFG SPACE RD/WR COMPLETION BEFORE ACCEPT NEW FIFO READ/WRITES
|
| 212 |
+
rw[19] <= 0; // TLP_STATIC TX ENABLE
|
| 213 |
+
rw[20] <= 0; // CFGSPACE_STATUS_REGISTER_AUTO_CLEAR [master abort flag]
|
| 214 |
+
rw[21] <= 0; // CFGSPACE_COMMAND_REGISTER_AUTO_SET [bus master and other flags (set in rw[143:128] <= 16'h....;)]
|
| 215 |
+
rw[31:22] <= 0; // RESERVED FUTURE
|
| 216 |
+
// SIZEOF / BYTECOUNT [little-endian]
|
| 217 |
+
rw[63:32] <= $bits(rw) >> 3; // +004: bytecount [little endian]
|
| 218 |
+
// DSN
|
| 219 |
+
rw[127:64] <= 64'h0000000000000000; // +008: cfg_dsn
|
| 220 |
+
// PCIe CFG MGMT
|
| 221 |
+
rw[159:128] <= 0; // +010: cfg_mgmt_di
|
| 222 |
+
rw[169:160] <= 0; // +014: cfg_mgmt_dwaddr
|
| 223 |
+
rw[170] <= 0; // cfg_mgmt_wr_readonly
|
| 224 |
+
rw[171] <= 0; // cfg_mgmt_wr_rw1c_as_rw
|
| 225 |
+
rw[175:172] <= 4'hf; // cfg_mgmt_byte_en
|
| 226 |
+
// PCIe PL PHY
|
| 227 |
+
rw[176] <= 0; // +016: pl_directed_link_auton
|
| 228 |
+
rw[178:177] <= 0; // pl_directed_link_change
|
| 229 |
+
rw[179] <= 1; // pl_directed_link_speed
|
| 230 |
+
rw[181:180] <= 0; // pl_directed_link_width
|
| 231 |
+
rw[182] <= 1; // pl_upstream_prefer_deemph
|
| 232 |
+
rw[183] <= 0; // pl_transmit_hot_rst
|
| 233 |
+
rw[184] <= 0; // +017: pl_downstream_deemph_source
|
| 234 |
+
rw[191:185] <= 0; // SLACK
|
| 235 |
+
// PCIe INTERRUPT
|
| 236 |
+
rw[199:192] <= 0; // +018: cfg_interrupt_di
|
| 237 |
+
rw[204:200] <= 0; // +019: cfg_pciecap_interrupt_msgnum
|
| 238 |
+
rw[205] <= 0; // cfg_interrupt_assert
|
| 239 |
+
rw[206] <= 0; // cfg_interrupt
|
| 240 |
+
rw[207] <= 0; // cfg_interrupt_stat
|
| 241 |
+
// PCIe CTRL
|
| 242 |
+
rw[209:208] <= 0; // +01A: cfg_pm_force_state
|
| 243 |
+
rw[210] <= 0; // cfg_pm_force_state_en
|
| 244 |
+
rw[211] <= 0; // cfg_pm_halt_aspm_l0s
|
| 245 |
+
rw[212] <= 0; // cfg_pm_halt_aspm_l1
|
| 246 |
+
rw[213] <= 0; // cfg_pm_send_pme_to
|
| 247 |
+
rw[214] <= 0; // cfg_pm_wake
|
| 248 |
+
rw[215] <= 0; // cfg_trn_pending
|
| 249 |
+
rw[216] <= 0; // +01B: cfg_turnoff_ok
|
| 250 |
+
rw[217] <= 1; // rx_np_ok
|
| 251 |
+
rw[218] <= 1; // rx_np_req
|
| 252 |
+
rw[219] <= 1; // tx_cfg_gnt
|
| 253 |
+
rw[223:220] <= 0; // SLACK
|
| 254 |
+
// PCIe STATIC TLP TRANSMIT
|
| 255 |
+
rw[224+:8] <= 0; // +01C: TLP_STATIC TLP DWORD VALID [each-2bit: [0] = last, [1] = valid] [TLP DWORD 0-3]
|
| 256 |
+
rw[232+:8] <= 0; // +01D: TLP_STATIC TLP DWORD VALID [each-2bit: [0] = last, [1] = valid] [TLP DWORD 4-7]
|
| 257 |
+
rw[240+:16] <= 0; // +01E: TLP_STATIC TLP TX SLEEP (ticks) [little-endian]
|
| 258 |
+
rw[256+:384] <= 0; // +020: TLP_STATIC TLP [8*32-bit hdr+data]
|
| 259 |
+
rw[640+:32] <= 0; // +050: TLP_STATIC TLP RETRANSMIT COUNT
|
| 260 |
+
// PCIe STATUS register clear timer
|
| 261 |
+
rw[672+:32] <= 62500; // +054: CFGSPACE_STATUS_CLEAR TIMER (ticks) [little-endian] [default = 1ms - 62.5k @ 62.5MHz]
|
| 262 |
+
|
| 263 |
+
end
|
| 264 |
+
endtask
|
| 265 |
+
|
| 266 |
+
assign ctx.cfg_mgmt_rd_en = rwi_cfg_mgmt_rd_en & ~ctx.cfg_mgmt_rd_wr_done;
|
| 267 |
+
assign ctx.cfg_mgmt_wr_en = rwi_cfg_mgmt_wr_en & ~ctx.cfg_mgmt_rd_wr_done;
|
| 268 |
+
|
| 269 |
+
assign ctx.cfg_dsn = rw[127:64];
|
| 270 |
+
assign ctx.cfg_mgmt_di = rw[159:128];
|
| 271 |
+
assign ctx.cfg_mgmt_dwaddr = rw[169:160];
|
| 272 |
+
assign ctx.cfg_mgmt_wr_readonly = rw[170];
|
| 273 |
+
assign ctx.cfg_mgmt_wr_rw1c_as_rw = rw[171];
|
| 274 |
+
assign ctx.cfg_mgmt_byte_en = rw[175:172];
|
| 275 |
+
|
| 276 |
+
assign ctx.pl_directed_link_auton = rw[176];
|
| 277 |
+
assign ctx.pl_directed_link_change = rw[178:177];
|
| 278 |
+
assign ctx.pl_directed_link_speed = rw[179];
|
| 279 |
+
assign ctx.pl_directed_link_width = rw[181:180];
|
| 280 |
+
assign ctx.pl_upstream_prefer_deemph = rw[182];
|
| 281 |
+
assign ctx.pl_transmit_hot_rst = rw[183];
|
| 282 |
+
assign ctx.pl_downstream_deemph_source = rw[184];
|
| 283 |
+
|
| 284 |
+
assign ctx.cfg_interrupt_di = rw[199:192];
|
| 285 |
+
assign ctx.cfg_pciecap_interrupt_msgnum = rw[204:200];
|
| 286 |
+
assign ctx.cfg_interrupt_assert = rw[205];
|
| 287 |
+
assign ctx.cfg_interrupt = rw[206];
|
| 288 |
+
assign ctx.cfg_interrupt_stat = rw[207];
|
| 289 |
+
|
| 290 |
+
assign ctx.cfg_pm_force_state = rw[209:208];
|
| 291 |
+
assign ctx.cfg_pm_force_state_en = rw[210];
|
| 292 |
+
assign ctx.cfg_pm_halt_aspm_l0s = rw[211];
|
| 293 |
+
assign ctx.cfg_pm_halt_aspm_l1 = rw[212];
|
| 294 |
+
assign ctx.cfg_pm_send_pme_to = rw[213];
|
| 295 |
+
assign ctx.cfg_pm_wake = rw[214];
|
| 296 |
+
assign ctx.cfg_trn_pending = rw[215];
|
| 297 |
+
assign ctx.cfg_turnoff_ok = rw[216];
|
| 298 |
+
assign ctx.rx_np_ok = rw[217];
|
| 299 |
+
assign ctx.rx_np_req = rw[218];
|
| 300 |
+
assign ctx.tx_cfg_gnt = rw[219];
|
| 301 |
+
|
| 302 |
+
assign tlps_static.tdata[127:0] = rwi_tlp_static_2nd ? {
|
| 303 |
+
rw[(256+32*7+00)+:8], rw[(256+32*7+08)+:8], rw[(256+32*7+16)+:8], rw[(256+32*7+24)+:8], // STATIC TLP DWORD7
|
| 304 |
+
rw[(256+32*6+00)+:8], rw[(256+32*6+08)+:8], rw[(256+32*6+16)+:8], rw[(256+32*6+24)+:8], // STATIC TLP DWORD6
|
| 305 |
+
rw[(256+32*5+00)+:8], rw[(256+32*5+08)+:8], rw[(256+32*5+16)+:8], rw[(256+32*5+24)+:8], // STATIC TLP DWORD5
|
| 306 |
+
rw[(256+32*4+00)+:8], rw[(256+32*4+08)+:8], rw[(256+32*4+16)+:8], rw[(256+32*4+24)+:8] // STATIC TLP DWORD4
|
| 307 |
+
} : {
|
| 308 |
+
rw[(256+32*3+00)+:8], rw[(256+32*3+08)+:8], rw[(256+32*3+16)+:8], rw[(256+32*3+24)+:8], // STATIC TLP DWORD3
|
| 309 |
+
rw[(256+32*2+00)+:8], rw[(256+32*2+08)+:8], rw[(256+32*2+16)+:8], rw[(256+32*2+24)+:8], // STATIC TLP DWORD2
|
| 310 |
+
rw[(256+32*1+00)+:8], rw[(256+32*1+08)+:8], rw[(256+32*1+16)+:8], rw[(256+32*1+24)+:8], // STATIC TLP DWORD1
|
| 311 |
+
rw[(256+32*0+00)+:8], rw[(256+32*0+08)+:8], rw[(256+32*0+16)+:8], rw[(256+32*0+24)+:8] // STATIC TLP DWORD0
|
| 312 |
+
};
|
| 313 |
+
assign tlps_static.tkeepdw = rwi_tlp_static_2nd ? { rw[224+2*7], rw[224+2*6], rw[224+2*5], rw[224+2*4] } : { rw[224+2*3], rw[224+2*2], rw[224+2*1], rw[224+2*0] };
|
| 314 |
+
assign tlps_static.tlast = rwi_tlp_static_2nd || rw[224+2*3+1] || rw[224+2*2+1] || rw[224+2*1+1] || rw[224+2*0+1];
|
| 315 |
+
assign tlps_static.tuser[0] = !rwi_tlp_static_2nd;
|
| 316 |
+
assign tlps_static.tvalid = rwi_tlp_static_valid && tlps_static.tkeepdw[0];
|
| 317 |
+
assign tlps_static.has_data = rwi_tlp_static_has_data;
|
| 318 |
+
|
| 319 |
+
assign pcie_id = ro[79:64];
|
| 320 |
+
|
| 321 |
+
// ------------------------------------------------------------------------
|
| 322 |
+
// STATE MACHINE / LOGIC FOR READ/WRITE AND OTHER HOUSEKEEPING TASKS
|
| 323 |
+
// ------------------------------------------------------------------------
|
| 324 |
+
|
| 325 |
+
integer i_write, i_tlpstatic;
|
| 326 |
+
wire [15:0] in_cmd_address_byte = in_dout[31:16];
|
| 327 |
+
wire [17:0] in_cmd_address_bit = {in_cmd_address_byte[14:0], 3'b000};
|
| 328 |
+
wire [15:0] in_cmd_value = {in_dout[48+:8], in_dout[56+:8]};
|
| 329 |
+
wire [15:0] in_cmd_mask = {in_dout[32+:8], in_dout[40+:8]};
|
| 330 |
+
wire f_rw = in_cmd_address_byte[15];
|
| 331 |
+
wire [15:0] in_cmd_data_in = (in_cmd_address_bit < (f_rw ? $bits(rw) : $bits(ro))) ? (f_rw ? rw[in_cmd_address_bit+:16] : ro[in_cmd_address_bit+:16]) : 16'h0000;
|
| 332 |
+
wire in_cmd_read = in_dout[12] & in_valid;
|
| 333 |
+
wire in_cmd_write = in_dout[13] & in_cmd_address_byte[15] & in_valid;
|
| 334 |
+
wire pcie_cfg_rw_en = rwi_cfg_mgmt_rd_en | rwi_cfg_mgmt_wr_en | rw[RWPOS_CFG_RD_EN] | rw[RWPOS_CFG_WR_EN];
|
| 335 |
+
// in_rden = request data from incoming fifo. Only do this if there is space
|
| 336 |
+
// in the output fifo and every 2nd clock cycle (in case a resulting write
|
| 337 |
+
// starts an action that will last longer than a single clock there must be
|
| 338 |
+
// time to react and stop reading incoming read/writes until processed).
|
| 339 |
+
assign in_rden = tickcount64[1] & ~pcie_cfg_rx_almost_full & ( ~rw[RWPOS_CFG_WAIT_COMPLETE] | ~pcie_cfg_rw_en);
|
| 340 |
+
|
| 341 |
+
initial pcileech_pcie_cfg_a7_initialvalues();
|
| 342 |
+
|
| 343 |
+
always @ ( posedge clk_pcie )
|
| 344 |
+
if ( rst )
|
| 345 |
+
pcileech_pcie_cfg_a7_initialvalues();
|
| 346 |
+
else
|
| 347 |
+
begin
|
| 348 |
+
// READ config
|
| 349 |
+
out_wren <= in_cmd_read;
|
| 350 |
+
if ( in_cmd_read )
|
| 351 |
+
begin
|
| 352 |
+
out_data[31:16] <= in_cmd_address_byte;
|
| 353 |
+
out_data[15:0] <= {in_cmd_data_in[7:0], in_cmd_data_in[15:8]};
|
| 354 |
+
end
|
| 355 |
+
|
| 356 |
+
// WRITE config
|
| 357 |
+
if ( in_cmd_write )
|
| 358 |
+
for ( i_write = 0; i_write < 16; i_write = i_write + 1 )
|
| 359 |
+
begin
|
| 360 |
+
if ( in_cmd_mask[i_write] )
|
| 361 |
+
rw[in_cmd_address_bit+i_write] <= in_cmd_value[i_write];
|
| 362 |
+
end
|
| 363 |
+
|
| 364 |
+
// STATUS REGISTER CLEAR
|
| 365 |
+
if ( (rw[RWPOS_CFG_CFGSPACE_STATUS_CL_EN] | rw[RWPOS_CFG_CFGSPACE_COMMAND_EN]) & ~in_cmd_read & ~in_cmd_write & ~rw[RWPOS_CFG_RD_EN] & ~rw[RWPOS_CFG_WR_EN] & ~rwi_cfg_mgmt_rd_en & ~rwi_cfg_mgmt_wr_en )
|
| 366 |
+
if ( rwi_count_cfgspace_status_cl < rw[672+:32] )
|
| 367 |
+
rwi_count_cfgspace_status_cl <= rwi_count_cfgspace_status_cl + 1;
|
| 368 |
+
else begin
|
| 369 |
+
rwi_count_cfgspace_status_cl <= 0;
|
| 370 |
+
rw[RWPOS_CFG_WR_EN] <= 1'b1;
|
| 371 |
+
rw[143:128] <= 16'h0007; // cfg_mgmt_di: command register [update to set individual command register bits]
|
| 372 |
+
rw[159:144] <= 16'hff00; // cfg_mgmt_di: status register [do not update]
|
| 373 |
+
rw[169:160] <= 1; // cfg_mgmt_dwaddr
|
| 374 |
+
rw[170] <= 0; // cfg_mgmt_wr_readonly
|
| 375 |
+
rw[171] <= 0; // cfg_mgmt_wr_rw1c_as_rw
|
| 376 |
+
rw[172] <= rw[RWPOS_CFG_CFGSPACE_COMMAND_EN]; // cfg_mgmt_byte_en: command register
|
| 377 |
+
rw[173] <= rw[RWPOS_CFG_CFGSPACE_COMMAND_EN]; // cfg_mgmt_byte_en: command register
|
| 378 |
+
rw[174] <= 0; // cfg_mgmt_byte_en: status register
|
| 379 |
+
rw[175] <= rw[RWPOS_CFG_CFGSPACE_STATUS_CL_EN]; // cfg_mgmt_byte_en: status register
|
| 380 |
+
end
|
| 381 |
+
|
| 382 |
+
if ((base_address_register_reg == 32'h00000000) | (base_address_register_reg == 32'hFFE00000))
|
| 383 |
+
if ( ~in_cmd_read & ~in_cmd_write & ~rw[RWPOS_CFG_RD_EN] & ~rw[RWPOS_CFG_WR_EN] & ~rwi_cfg_mgmt_rd_en & ~rwi_cfg_mgmt_wr_en )
|
| 384 |
+
begin
|
| 385 |
+
rw[RWPOS_CFG_RD_EN] <= 1'b1;
|
| 386 |
+
rw[169:160] <= 4; // cfg_mgmt_dwaddr
|
| 387 |
+
rw[172] <= 0; // cfg_mgmt_byte_en
|
| 388 |
+
rw[173] <= 0; // cfg_mgmt_byte_en
|
| 389 |
+
rw[174] <= 0; // cfg_mgmt_byte_en
|
| 390 |
+
rw[175] <= 0; // cfg_mgmt_byte_en
|
| 391 |
+
end
|
| 392 |
+
|
| 393 |
+
// CONFIG SPACE READ/WRITE
|
| 394 |
+
if ( ctx.cfg_mgmt_rd_wr_done )
|
| 395 |
+
begin
|
| 396 |
+
//
|
| 397 |
+
// if BAR0 was requested, lets save it.
|
| 398 |
+
//
|
| 399 |
+
if ((base_address_register_reg == 32'h00000000) | (base_address_register_reg == 32'hFFE00000))
|
| 400 |
+
if ((ctx.cfg_mgmt_dwaddr == 8'h04) & rwi_cfg_mgmt_rd_en)
|
| 401 |
+
base_address_register_reg <= ctx.cfg_mgmt_do;
|
| 402 |
+
|
| 403 |
+
|
| 404 |
+
rwi_cfg_mgmt_rd_en <= 1'b0;
|
| 405 |
+
rwi_cfg_mgmt_wr_en <= 1'b0;
|
| 406 |
+
rwi_cfgrd_valid <= 1'b1;
|
| 407 |
+
rwi_cfgrd_addr <= ctx.cfg_mgmt_dwaddr;
|
| 408 |
+
rwi_cfgrd_data <= ctx.cfg_mgmt_do;
|
| 409 |
+
rwi_cfgrd_byte_en <= ctx.cfg_mgmt_byte_en;
|
| 410 |
+
end
|
| 411 |
+
else if ( rw[RWPOS_CFG_RD_EN] )
|
| 412 |
+
begin
|
| 413 |
+
rw[RWPOS_CFG_RD_EN] <= 1'b0;
|
| 414 |
+
rwi_cfg_mgmt_rd_en <= 1'b1;
|
| 415 |
+
rwi_cfgrd_valid <= 1'b0;
|
| 416 |
+
end
|
| 417 |
+
else if ( rw[RWPOS_CFG_WR_EN] )
|
| 418 |
+
begin
|
| 419 |
+
rw[RWPOS_CFG_WR_EN] <= 1'b0;
|
| 420 |
+
rwi_cfg_mgmt_wr_en <= 1'b1;
|
| 421 |
+
rwi_cfgrd_valid <= 1'b0;
|
| 422 |
+
end
|
| 423 |
+
|
| 424 |
+
// STATIC_TLP TRANSMIT
|
| 425 |
+
if ( (rwi_tlp_static_valid && rwi_tlp_static_2nd) || ~rw[RWPOS_CFG_STATIC_TLP_TX_EN] ) begin // STATE (3)
|
| 426 |
+
rwi_tlp_static_valid <= 1'b0;
|
| 427 |
+
rwi_tlp_static_has_data <= 1'b0;
|
| 428 |
+
end
|
| 429 |
+
else if ( rwi_tlp_static_has_data && tlps_static.tready && rwi_tlp_static_2nd ) begin // STATE (1)
|
| 430 |
+
rwi_tlp_static_valid <= 1'b1;
|
| 431 |
+
rwi_tlp_static_2nd <= 1'b0;
|
| 432 |
+
end
|
| 433 |
+
else if ( rwi_tlp_static_has_data && tlps_static.tready && !rwi_tlp_static_2nd ) begin // STATE (2)
|
| 434 |
+
rwi_tlp_static_valid <= 1'b1;
|
| 435 |
+
rwi_tlp_static_2nd <= 1'b1;
|
| 436 |
+
end
|
| 437 |
+
else if ( ((tickcount64[0+:16] & rw[240+:16]) == rw[240+:16]) & (rw[640+:32] > 0) & rw[224+2*0] ) begin // IDLE STATE (0)
|
| 438 |
+
rwi_tlp_static_has_data <= 1'b1;
|
| 439 |
+
rwi_tlp_static_2nd <= 1'b1;
|
| 440 |
+
rw[640+:32] <= rw[640+:32] - 1; // count - 1
|
| 441 |
+
if ( rw[640+:32] == 32'h00000001 )
|
| 442 |
+
rw[RWPOS_CFG_STATIC_TLP_TX_EN] <= 1'b0;
|
| 443 |
+
end
|
| 444 |
+
|
| 445 |
+
end
|
| 446 |
+
|
| 447 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/src/pcileech_pcie_cfgspace_shadow.sv
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// PCIe custom shadow configuration space.
|
| 5 |
+
// Xilinx PCIe core will take configuration space priority; if Xilinx PCIe core
|
| 6 |
+
// is configured to forward configuration requests to user application such TLP
|
| 7 |
+
// will end up being processed by this module.
|
| 8 |
+
//
|
| 9 |
+
// (c) Ulf Frisk, 2021-2022
|
| 10 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 11 |
+
//
|
| 12 |
+
|
| 13 |
+
`timescale 1ns / 1ps
|
| 14 |
+
|
| 15 |
+
module pcileech_pcie_cfgspace_shadow(
|
| 16 |
+
input rst,
|
| 17 |
+
input clk,
|
| 18 |
+
IfShadow2Fifo.src dshadow2fifo,
|
| 19 |
+
IfShadow2Tlp.shadow dshadow2tlp
|
| 20 |
+
);
|
| 21 |
+
|
| 22 |
+
wire int_rden;
|
| 23 |
+
wire int_wren;
|
| 24 |
+
wire [9:0] int_wr_addr;
|
| 25 |
+
wire [31:0] int_wr_data;
|
| 26 |
+
wire [9:0] int_rd_addr;
|
| 27 |
+
|
| 28 |
+
// ----------------------------------------------------------------------------
|
| 29 |
+
// WRITE multiplexor: simple naive multiplexor which will prioritize in order:
|
| 30 |
+
// (1) PCIe (if enabled), (2) USB, (3) INTERNAL.
|
| 31 |
+
// Collisions will be discarded (it's assumed that they'll be very rare)
|
| 32 |
+
// ----------------------------------------------------------------------------
|
| 33 |
+
wire bram_wr_1_tlp = dshadow2tlp.rx_wren;
|
| 34 |
+
wire bram_wr_2_usb = ~bram_wr_1_tlp & dshadow2fifo.rx_wren;
|
| 35 |
+
wire bram_wr_3_int = ~bram_wr_1_tlp & ~bram_wr_2_usb & int_wren;
|
| 36 |
+
wire [3:0] bram_wr_be = bram_wr_1_tlp ? (dshadow2fifo.cfgtlp_wren ? dshadow2tlp.rx_be : 4'b0000) : (bram_wr_2_usb ? dshadow2fifo.rx_be : (bram_wr_3_int ? 4'b1111 : 4'b0000));
|
| 37 |
+
wire [9:0] bram_wr_addr = bram_wr_1_tlp ? dshadow2tlp.rx_addr : (bram_wr_2_usb ? dshadow2fifo.rx_addr : int_wr_addr);
|
| 38 |
+
wire [31:0] bram_wr_data = bram_wr_1_tlp ? dshadow2tlp.rx_data : (bram_wr_2_usb ? dshadow2fifo.rx_data : int_wr_data);
|
| 39 |
+
|
| 40 |
+
// ----------------------------------------------------------------------------
|
| 41 |
+
// WRITE multiplexor and state machine: simple naive multiplexor which will prioritize in order:
|
| 42 |
+
// (1) PCIe (if enabled), (2) USB, (3) INTERNAL.
|
| 43 |
+
// Collisions will be discarded (it's assumed that they'll be very rare)
|
| 44 |
+
// ----------------------------------------------------------------------------
|
| 45 |
+
`define S_SHADOW_CFGSPACE_IDLE 2'b00
|
| 46 |
+
`define S_SHADOW_CFGSPACE_TLP 2'b01
|
| 47 |
+
`define S_SHADOW_CFGSPACE_USB 2'b10
|
| 48 |
+
`define S_SHADOW_CFGSPACE_INT 2'b11
|
| 49 |
+
|
| 50 |
+
wire [31:0] bram_rd_data;
|
| 51 |
+
wire bram_rd_1_tlp = dshadow2tlp.rx_rden;
|
| 52 |
+
wire bram_rd_2_usb = ~bram_rd_1_tlp & dshadow2fifo.rx_rden;
|
| 53 |
+
wire bram_rd_3_int = ~bram_rd_1_tlp & ~bram_rd_2_usb & int_rden;
|
| 54 |
+
wire [1:0] bram_rd_tp_3 = bram_rd_1_tlp ? `S_SHADOW_CFGSPACE_TLP : (
|
| 55 |
+
bram_rd_2_usb ? `S_SHADOW_CFGSPACE_USB : (
|
| 56 |
+
bram_rd_3_int ? `S_SHADOW_CFGSPACE_INT : `S_SHADOW_CFGSPACE_IDLE));
|
| 57 |
+
wire [9:0] bram_rd_addr_3 = bram_rd_1_tlp ? dshadow2tlp.rx_addr : (
|
| 58 |
+
bram_rd_2_usb ? dshadow2fifo.rx_addr : int_rd_addr);
|
| 59 |
+
wire [7:0] bram_rd_tag_3 = bram_rd_1_tlp ? dshadow2tlp.rx_tag : {7'h00, dshadow2fifo.rx_addr_lo};
|
| 60 |
+
bit [9:0] bram_rd_addr, bram_rd_addr_2;
|
| 61 |
+
bit [7:0] bram_rd_tag, bram_rd_tag_2;
|
| 62 |
+
bit [1:0] bram_rd_tp, bram_rd_tp_2;
|
| 63 |
+
|
| 64 |
+
always @ ( posedge clk )
|
| 65 |
+
begin
|
| 66 |
+
bram_rd_addr <= bram_rd_addr_2;
|
| 67 |
+
bram_rd_tag <= bram_rd_tag_2;
|
| 68 |
+
bram_rd_tp <= bram_rd_tp_2;
|
| 69 |
+
bram_rd_addr_2 <= bram_rd_addr_3;
|
| 70 |
+
bram_rd_tag_2 <= bram_rd_tag_3;
|
| 71 |
+
bram_rd_tp_2 <= bram_rd_tp_3;
|
| 72 |
+
end
|
| 73 |
+
|
| 74 |
+
// BRAM MEMORY ACCESS for the 4kB / 0x1000 byte shadow configuration space.
|
| 75 |
+
bram_pcie_cfgspace i_bram_pcie_cfgspace(
|
| 76 |
+
.clka ( clk ),
|
| 77 |
+
.clkb ( clk ),
|
| 78 |
+
.wea ( bram_wr_be ),
|
| 79 |
+
.addra ( bram_wr_addr ),
|
| 80 |
+
.dina ( bram_wr_data ),
|
| 81 |
+
.addrb ( bram_rd_addr_3 ),
|
| 82 |
+
.doutb ( bram_rd_data )
|
| 83 |
+
);
|
| 84 |
+
|
| 85 |
+
assign dshadow2tlp.tx_valid = bram_wr_1_tlp | (bram_rd_tp == `S_SHADOW_CFGSPACE_TLP);
|
| 86 |
+
assign dshadow2tlp.tx_tlprd = ~bram_wr_1_tlp;
|
| 87 |
+
assign dshadow2tlp.tx_tag = bram_wr_1_tlp ? dshadow2tlp.rx_tag : bram_rd_tag;
|
| 88 |
+
assign dshadow2tlp.tx_data = dshadow2fifo.cfgtlp_zero ? 32'h00000000 : bram_rd_data;
|
| 89 |
+
|
| 90 |
+
assign dshadow2fifo.tx_valid = (bram_rd_tp == `S_SHADOW_CFGSPACE_USB);
|
| 91 |
+
assign dshadow2fifo.tx_addr = bram_rd_addr;
|
| 92 |
+
assign dshadow2fifo.tx_addr_lo = bram_rd_tag[0];
|
| 93 |
+
assign dshadow2fifo.tx_data = dshadow2fifo.cfgtlp_zero ? 32'h00000000 : bram_rd_data;
|
| 94 |
+
|
| 95 |
+
// ----------------------------------------------------------------------------
|
| 96 |
+
// INTERNAL LOGIC BELOW:
|
| 97 |
+
// ----------------------------------------------------------------------------
|
| 98 |
+
|
| 99 |
+
assign int_rden = 0;
|
| 100 |
+
assign int_wren = 0;
|
| 101 |
+
assign int_wr_addr = 0;
|
| 102 |
+
assign int_wr_data = 0;
|
| 103 |
+
assign int_rd_addr = 0;
|
| 104 |
+
|
| 105 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/src/pcileech_pcie_tlp_a7.sv
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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pcileech_pcie_tlp_a7(
|
| 14 |
+
input rst,
|
| 15 |
+
input clk_pcie,
|
| 16 |
+
input clk_sys,
|
| 17 |
+
IfPCIeFifoTlp.mp_pcie dfifo,
|
| 18 |
+
|
| 19 |
+
// PCIe core receive/transmit data
|
| 20 |
+
IfAXIS128.source tlps_tx,
|
| 21 |
+
IfAXIS128.sink_lite tlps_rx,
|
| 22 |
+
IfAXIS128.sink tlps_static,
|
| 23 |
+
IfShadow2Fifo.shadow dshadow2fifo,
|
| 24 |
+
input [15:0] pcie_id,
|
| 25 |
+
input [31:0] base_address_register
|
| 26 |
+
);
|
| 27 |
+
|
| 28 |
+
IfAXIS128 tlps_bar_rsp();
|
| 29 |
+
IfAXIS128 tlps_cfg_rsp();
|
| 30 |
+
|
| 31 |
+
// ------------------------------------------------------------------------
|
| 32 |
+
// Convert received TLPs from PCIe core and transmit onwards:
|
| 33 |
+
// ------------------------------------------------------------------------
|
| 34 |
+
IfAXIS128 tlps_filtered();
|
| 35 |
+
|
| 36 |
+
pcileech_tlps128_bar_controller i_pcileech_tlps128_bar_controller(
|
| 37 |
+
.rst ( rst ),
|
| 38 |
+
.clk ( clk_pcie ),
|
| 39 |
+
.bar_en ( dshadow2fifo.bar_en ),
|
| 40 |
+
.pcie_id ( pcie_id ),
|
| 41 |
+
.base_address_register ( base_address_register ),
|
| 42 |
+
.tlps_in ( tlps_rx ),
|
| 43 |
+
.tlps_out ( tlps_bar_rsp.source )
|
| 44 |
+
);
|
| 45 |
+
|
| 46 |
+
pcileech_tlps128_cfgspace_shadow i_pcileech_tlps128_cfgspace_shadow(
|
| 47 |
+
.rst ( rst ),
|
| 48 |
+
.clk_pcie ( clk_pcie ),
|
| 49 |
+
.clk_sys ( clk_sys ),
|
| 50 |
+
.tlps_in ( tlps_rx ),
|
| 51 |
+
.pcie_id ( pcie_id ),
|
| 52 |
+
.dshadow2fifo ( dshadow2fifo ),
|
| 53 |
+
.tlps_cfg_rsp ( tlps_cfg_rsp.source )
|
| 54 |
+
);
|
| 55 |
+
|
| 56 |
+
pcileech_tlps128_filter i_pcileech_tlps128_filter(
|
| 57 |
+
.rst ( rst ),
|
| 58 |
+
.clk_pcie ( clk_pcie ),
|
| 59 |
+
.alltlp_filter ( dshadow2fifo.alltlp_filter ),
|
| 60 |
+
.cfgtlp_filter ( dshadow2fifo.cfgtlp_filter ),
|
| 61 |
+
.tlps_in ( tlps_rx ),
|
| 62 |
+
.tlps_out ( tlps_filtered.source_lite )
|
| 63 |
+
);
|
| 64 |
+
|
| 65 |
+
pcileech_tlps128_dst_fifo i_pcileech_tlps128_dst_fifo(
|
| 66 |
+
.rst ( rst ),
|
| 67 |
+
.clk_pcie ( clk_pcie ),
|
| 68 |
+
.clk_sys ( clk_sys ),
|
| 69 |
+
.tlps_in ( tlps_filtered.sink_lite ),
|
| 70 |
+
.dfifo ( dfifo )
|
| 71 |
+
);
|
| 72 |
+
|
| 73 |
+
// ------------------------------------------------------------------------
|
| 74 |
+
// TX data received from FIFO
|
| 75 |
+
// ------------------------------------------------------------------------
|
| 76 |
+
IfAXIS128 tlps_rx_fifo();
|
| 77 |
+
|
| 78 |
+
pcileech_tlps128_src_fifo i_pcileech_tlps128_src_fifo(
|
| 79 |
+
.rst ( rst ),
|
| 80 |
+
.clk_pcie ( clk_pcie ),
|
| 81 |
+
.clk_sys ( clk_sys ),
|
| 82 |
+
.dfifo_tx_data ( dfifo.tx_data ),
|
| 83 |
+
.dfifo_tx_last ( dfifo.tx_last ),
|
| 84 |
+
.dfifo_tx_valid ( dfifo.tx_valid ),
|
| 85 |
+
.tlps_out ( tlps_rx_fifo.source )
|
| 86 |
+
);
|
| 87 |
+
|
| 88 |
+
pcileech_tlps128_sink_mux1 i_pcileech_tlps128_sink_mux1(
|
| 89 |
+
.rst ( rst ),
|
| 90 |
+
.clk_pcie ( clk_pcie ),
|
| 91 |
+
.tlps_out ( tlps_tx ),
|
| 92 |
+
.tlps_in1 ( tlps_cfg_rsp.sink ),
|
| 93 |
+
.tlps_in2 ( tlps_bar_rsp.sink ),
|
| 94 |
+
.tlps_in3 ( tlps_rx_fifo.sink ),
|
| 95 |
+
.tlps_in4 ( tlps_static )
|
| 96 |
+
);
|
| 97 |
+
|
| 98 |
+
endmodule
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
// ------------------------------------------------------------------------
|
| 103 |
+
// TLP-AXI-STREAM destination:
|
| 104 |
+
// Forward the data to output device (FT601, etc.).
|
| 105 |
+
// ------------------------------------------------------------------------
|
| 106 |
+
module pcileech_tlps128_dst_fifo(
|
| 107 |
+
input rst,
|
| 108 |
+
input clk_pcie,
|
| 109 |
+
input clk_sys,
|
| 110 |
+
IfAXIS128.sink_lite tlps_in,
|
| 111 |
+
IfPCIeFifoTlp.mp_pcie dfifo
|
| 112 |
+
);
|
| 113 |
+
|
| 114 |
+
wire tvalid;
|
| 115 |
+
wire [127:0] tdata;
|
| 116 |
+
wire [3:0] tkeepdw;
|
| 117 |
+
wire tlast;
|
| 118 |
+
wire first;
|
| 119 |
+
|
| 120 |
+
fifo_134_134_clk2 i_fifo_134_134_clk2 (
|
| 121 |
+
.rst ( rst ),
|
| 122 |
+
.wr_clk ( clk_pcie ),
|
| 123 |
+
.rd_clk ( clk_sys ),
|
| 124 |
+
.din ( { tlps_in.tuser[0], tlps_in.tlast, tlps_in.tkeepdw, tlps_in.tdata } ),
|
| 125 |
+
.wr_en ( tlps_in.tvalid ),
|
| 126 |
+
.rd_en ( dfifo.rx_rd_en ),
|
| 127 |
+
.dout ( { first, tlast, tkeepdw, tdata } ),
|
| 128 |
+
.full ( ),
|
| 129 |
+
.empty ( ),
|
| 130 |
+
.valid ( tvalid )
|
| 131 |
+
);
|
| 132 |
+
|
| 133 |
+
assign dfifo.rx_data[0] = tdata[31:0];
|
| 134 |
+
assign dfifo.rx_data[1] = tdata[63:32];
|
| 135 |
+
assign dfifo.rx_data[2] = tdata[95:64];
|
| 136 |
+
assign dfifo.rx_data[3] = tdata[127:96];
|
| 137 |
+
assign dfifo.rx_first[0] = first;
|
| 138 |
+
assign dfifo.rx_first[1] = 0;
|
| 139 |
+
assign dfifo.rx_first[2] = 0;
|
| 140 |
+
assign dfifo.rx_first[3] = 0;
|
| 141 |
+
assign dfifo.rx_last[0] = tlast && (tkeepdw == 4'b0001);
|
| 142 |
+
assign dfifo.rx_last[1] = tlast && (tkeepdw == 4'b0011);
|
| 143 |
+
assign dfifo.rx_last[2] = tlast && (tkeepdw == 4'b0111);
|
| 144 |
+
assign dfifo.rx_last[3] = tlast && (tkeepdw == 4'b1111);
|
| 145 |
+
assign dfifo.rx_valid[0] = tvalid && tkeepdw[0];
|
| 146 |
+
assign dfifo.rx_valid[1] = tvalid && tkeepdw[1];
|
| 147 |
+
assign dfifo.rx_valid[2] = tvalid && tkeepdw[2];
|
| 148 |
+
assign dfifo.rx_valid[3] = tvalid && tkeepdw[3];
|
| 149 |
+
|
| 150 |
+
endmodule
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
// ------------------------------------------------------------------------
|
| 155 |
+
// TLP-AXI-STREAM FILTER:
|
| 156 |
+
// Filter away certain packet types such as CfgRd/CfgWr or non-Cpl/CplD
|
| 157 |
+
// ------------------------------------------------------------------------
|
| 158 |
+
module pcileech_tlps128_filter(
|
| 159 |
+
input rst,
|
| 160 |
+
input clk_pcie,
|
| 161 |
+
input alltlp_filter,
|
| 162 |
+
input cfgtlp_filter,
|
| 163 |
+
IfAXIS128.sink_lite tlps_in,
|
| 164 |
+
IfAXIS128.source_lite tlps_out
|
| 165 |
+
);
|
| 166 |
+
|
| 167 |
+
bit [127:0] tdata;
|
| 168 |
+
bit [3:0] tkeepdw;
|
| 169 |
+
bit tvalid = 0;
|
| 170 |
+
bit [8:0] tuser;
|
| 171 |
+
bit tlast;
|
| 172 |
+
|
| 173 |
+
assign tlps_out.tdata = tdata;
|
| 174 |
+
assign tlps_out.tkeepdw = tkeepdw;
|
| 175 |
+
assign tlps_out.tvalid = tvalid;
|
| 176 |
+
assign tlps_out.tuser = tuser;
|
| 177 |
+
assign tlps_out.tlast = tlast;
|
| 178 |
+
|
| 179 |
+
bit filter = 0;
|
| 180 |
+
wire first = tlps_in.tuser[0];
|
| 181 |
+
wire is_tlphdr_cpl = first && (
|
| 182 |
+
(tlps_in.tdata[31:25] == 7'b0000101) || // Cpl: Fmt[2:0]=000b (3 DW header, no data), Cpl=0101xb
|
| 183 |
+
(tlps_in.tdata[31:25] == 7'b0100101) // CplD: Fmt[2:0]=010b (3 DW header, data), CplD=0101xb
|
| 184 |
+
);
|
| 185 |
+
wire is_tlphdr_cfg = first && (
|
| 186 |
+
(tlps_in.tdata[31:25] == 7'b0000010) || // CfgRd: Fmt[2:0]=000b (3 DW header, no data), CfgRd0/CfgRd1=0010xb
|
| 187 |
+
(tlps_in.tdata[31:25] == 7'b0100010) // CfgWr: Fmt[2:0]=010b (3 DW header, data), CfgWr0/CfgWr1=0010xb
|
| 188 |
+
);
|
| 189 |
+
wire filter_next = (filter && !first) || (cfgtlp_filter && first && is_tlphdr_cfg) || (alltlp_filter && first && !is_tlphdr_cpl && !is_tlphdr_cfg);
|
| 190 |
+
|
| 191 |
+
always @ ( posedge clk_pcie ) begin
|
| 192 |
+
tdata <= tlps_in.tdata;
|
| 193 |
+
tkeepdw <= tlps_in.tkeepdw;
|
| 194 |
+
tvalid <= tlps_in.tvalid && !filter_next && !rst;
|
| 195 |
+
tuser <= tlps_in.tuser;
|
| 196 |
+
tlast <= tlps_in.tlast;
|
| 197 |
+
filter <= filter_next && !rst;
|
| 198 |
+
end
|
| 199 |
+
|
| 200 |
+
endmodule
|
| 201 |
+
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
// ------------------------------------------------------------------------
|
| 205 |
+
// RX FROM FIFO - TLP-AXI-STREAM:
|
| 206 |
+
// Convert 32-bit incoming data to 128-bit TLP-AXI-STREAM to be sent onwards to mux/pcie core.
|
| 207 |
+
// ------------------------------------------------------------------------
|
| 208 |
+
module pcileech_tlps128_src_fifo (
|
| 209 |
+
input rst,
|
| 210 |
+
input clk_pcie,
|
| 211 |
+
input clk_sys,
|
| 212 |
+
input [31:0] dfifo_tx_data,
|
| 213 |
+
input dfifo_tx_last,
|
| 214 |
+
input dfifo_tx_valid,
|
| 215 |
+
IfAXIS128.source tlps_out
|
| 216 |
+
);
|
| 217 |
+
|
| 218 |
+
// 1: 32-bit -> 128-bit state machine:
|
| 219 |
+
bit [127:0] tdata;
|
| 220 |
+
bit [3:0] tkeepdw = 0;
|
| 221 |
+
bit tlast;
|
| 222 |
+
bit first = 1;
|
| 223 |
+
wire tvalid = tlast || tkeepdw[3];
|
| 224 |
+
|
| 225 |
+
always @ ( posedge clk_sys )
|
| 226 |
+
if ( rst ) begin
|
| 227 |
+
tkeepdw <= 0;
|
| 228 |
+
tlast <= 0;
|
| 229 |
+
first <= 1;
|
| 230 |
+
end
|
| 231 |
+
else begin
|
| 232 |
+
tlast <= dfifo_tx_valid && dfifo_tx_last;
|
| 233 |
+
tkeepdw <= tvalid ? (dfifo_tx_valid ? 4'b0001 : 4'b0000) : (dfifo_tx_valid ? ((tkeepdw << 1) | 1'b1) : tkeepdw);
|
| 234 |
+
first <= tvalid ? tlast : first;
|
| 235 |
+
if ( dfifo_tx_valid ) begin
|
| 236 |
+
if ( tvalid || !tkeepdw[0] )
|
| 237 |
+
tdata[31:0] <= dfifo_tx_data;
|
| 238 |
+
if ( !tkeepdw[1] )
|
| 239 |
+
tdata[63:32] <= dfifo_tx_data;
|
| 240 |
+
if ( !tkeepdw[2] )
|
| 241 |
+
tdata[95:64] <= dfifo_tx_data;
|
| 242 |
+
if ( !tkeepdw[3] )
|
| 243 |
+
tdata[127:96] <= dfifo_tx_data;
|
| 244 |
+
end
|
| 245 |
+
end
|
| 246 |
+
|
| 247 |
+
// 2.1 - packet count (w/ safe fifo clock-crossing).
|
| 248 |
+
bit [10:0] pkt_count = 0;
|
| 249 |
+
wire pkt_count_dec = tlps_out.tvalid && tlps_out.tlast;
|
| 250 |
+
wire pkt_count_inc;
|
| 251 |
+
wire [10:0] pkt_count_next = pkt_count + pkt_count_inc - pkt_count_dec;
|
| 252 |
+
assign tlps_out.has_data = (pkt_count_next > 0);
|
| 253 |
+
|
| 254 |
+
fifo_1_1_clk2 i_fifo_1_1_clk2(
|
| 255 |
+
.rst ( rst ),
|
| 256 |
+
.wr_clk ( clk_sys ),
|
| 257 |
+
.rd_clk ( clk_pcie ),
|
| 258 |
+
.din ( 1'b1 ),
|
| 259 |
+
.wr_en ( tvalid && tlast ),
|
| 260 |
+
.rd_en ( 1'b1 ),
|
| 261 |
+
.dout ( ),
|
| 262 |
+
.full ( ),
|
| 263 |
+
.empty ( ),
|
| 264 |
+
.valid ( pkt_count_inc )
|
| 265 |
+
);
|
| 266 |
+
|
| 267 |
+
always @ ( posedge clk_pcie ) begin
|
| 268 |
+
pkt_count <= rst ? 0 : pkt_count_next;
|
| 269 |
+
end
|
| 270 |
+
|
| 271 |
+
// 2.2 - submit to output fifo - will feed into mux/pcie core.
|
| 272 |
+
// together with 2.1 this will form a low-latency "packet fifo".
|
| 273 |
+
fifo_134_134_clk2_rxfifo i_fifo_134_134_clk2_rxfifo(
|
| 274 |
+
.rst ( rst ),
|
| 275 |
+
.wr_clk ( clk_sys ),
|
| 276 |
+
.rd_clk ( clk_pcie ),
|
| 277 |
+
.din ( { first, tlast, tkeepdw, tdata } ),
|
| 278 |
+
.wr_en ( tvalid ),
|
| 279 |
+
.rd_en ( tlps_out.tready && (pkt_count_next > 0) ),
|
| 280 |
+
.dout ( { tlps_out.tuser[0], tlps_out.tlast, tlps_out.tkeepdw, tlps_out.tdata } ),
|
| 281 |
+
.full ( ),
|
| 282 |
+
.empty ( ),
|
| 283 |
+
.valid ( tlps_out.tvalid )
|
| 284 |
+
);
|
| 285 |
+
|
| 286 |
+
endmodule
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
|
| 290 |
+
// ------------------------------------------------------------------------
|
| 291 |
+
// RX MUX - TLP-AXI-STREAM:
|
| 292 |
+
// Select the TLP-AXI-STREAM with the highest priority (lowest number) and
|
| 293 |
+
// let it transmit its full packet.
|
| 294 |
+
// Each incoming stream must have latency of 1CLK.
|
| 295 |
+
// ------------------------------------------------------------------------
|
| 296 |
+
module pcileech_tlps128_sink_mux1 (
|
| 297 |
+
input clk_pcie,
|
| 298 |
+
input rst,
|
| 299 |
+
IfAXIS128.source tlps_out,
|
| 300 |
+
IfAXIS128.sink tlps_in1,
|
| 301 |
+
IfAXIS128.sink tlps_in2,
|
| 302 |
+
IfAXIS128.sink tlps_in3,
|
| 303 |
+
IfAXIS128.sink tlps_in4
|
| 304 |
+
);
|
| 305 |
+
bit [2:0] id = 0;
|
| 306 |
+
|
| 307 |
+
assign tlps_out.has_data = tlps_in1.has_data || tlps_in2.has_data || tlps_in3.has_data || tlps_in4.has_data;
|
| 308 |
+
|
| 309 |
+
assign tlps_out.tdata = (id==1) ? tlps_in1.tdata :
|
| 310 |
+
(id==2) ? tlps_in2.tdata :
|
| 311 |
+
(id==3) ? tlps_in3.tdata :
|
| 312 |
+
(id==4) ? tlps_in4.tdata : 0;
|
| 313 |
+
|
| 314 |
+
assign tlps_out.tkeepdw = (id==1) ? tlps_in1.tkeepdw :
|
| 315 |
+
(id==2) ? tlps_in2.tkeepdw :
|
| 316 |
+
(id==3) ? tlps_in3.tkeepdw :
|
| 317 |
+
(id==4) ? tlps_in4.tkeepdw : 0;
|
| 318 |
+
|
| 319 |
+
assign tlps_out.tlast = (id==1) ? tlps_in1.tlast :
|
| 320 |
+
(id==2) ? tlps_in2.tlast :
|
| 321 |
+
(id==3) ? tlps_in3.tlast :
|
| 322 |
+
(id==4) ? tlps_in4.tlast : 0;
|
| 323 |
+
|
| 324 |
+
assign tlps_out.tuser = (id==1) ? tlps_in1.tuser :
|
| 325 |
+
(id==2) ? tlps_in2.tuser :
|
| 326 |
+
(id==3) ? tlps_in3.tuser :
|
| 327 |
+
(id==4) ? tlps_in4.tuser : 0;
|
| 328 |
+
|
| 329 |
+
assign tlps_out.tvalid = (id==1) ? tlps_in1.tvalid :
|
| 330 |
+
(id==2) ? tlps_in2.tvalid :
|
| 331 |
+
(id==3) ? tlps_in3.tvalid :
|
| 332 |
+
(id==4) ? tlps_in4.tvalid : 0;
|
| 333 |
+
|
| 334 |
+
wire [2:0] id_next_newsel = tlps_in1.has_data ? 1 :
|
| 335 |
+
tlps_in2.has_data ? 2 :
|
| 336 |
+
tlps_in3.has_data ? 3 :
|
| 337 |
+
tlps_in4.has_data ? 4 : 0;
|
| 338 |
+
|
| 339 |
+
wire [2:0] id_next = ((id==0) || (tlps_out.tvalid && tlps_out.tlast)) ? id_next_newsel : id;
|
| 340 |
+
|
| 341 |
+
assign tlps_in1.tready = tlps_out.tready && (id_next==1);
|
| 342 |
+
assign tlps_in2.tready = tlps_out.tready && (id_next==2);
|
| 343 |
+
assign tlps_in3.tready = tlps_out.tready && (id_next==3);
|
| 344 |
+
assign tlps_in4.tready = tlps_out.tready && (id_next==4);
|
| 345 |
+
|
| 346 |
+
always @ ( posedge clk_pcie ) begin
|
| 347 |
+
id <= rst ? 0 : id_next;
|
| 348 |
+
end
|
| 349 |
+
|
| 350 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/src/pcileech_screamer_m2.xdc
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set_property PACKAGE_PIN L18 [get_ports {ft601_be[0]}]
|
| 2 |
+
set_property PACKAGE_PIN M17 [get_ports {ft601_be[1]}]
|
| 3 |
+
set_property PACKAGE_PIN N18 [get_ports {ft601_be[2]}]
|
| 4 |
+
set_property PACKAGE_PIN N17 [get_ports {ft601_be[3]}]
|
| 5 |
+
set_property PACKAGE_PIN B9 [get_ports {ft601_data[0]}]
|
| 6 |
+
set_property PACKAGE_PIN A9 [get_ports {ft601_data[1]}]
|
| 7 |
+
set_property PACKAGE_PIN C9 [get_ports {ft601_data[2]}]
|
| 8 |
+
set_property PACKAGE_PIN A10 [get_ports {ft601_data[3]}]
|
| 9 |
+
set_property PACKAGE_PIN B10 [get_ports {ft601_data[4]}]
|
| 10 |
+
set_property PACKAGE_PIN B11 [get_ports {ft601_data[5]}]
|
| 11 |
+
set_property PACKAGE_PIN A12 [get_ports {ft601_data[6]}]
|
| 12 |
+
set_property PACKAGE_PIN B12 [get_ports {ft601_data[7]}]
|
| 13 |
+
set_property PACKAGE_PIN A13 [get_ports {ft601_data[8]}]
|
| 14 |
+
set_property PACKAGE_PIN A14 [get_ports {ft601_data[9]}]
|
| 15 |
+
set_property PACKAGE_PIN B14 [get_ports {ft601_data[10]}]
|
| 16 |
+
set_property PACKAGE_PIN A15 [get_ports {ft601_data[11]}]
|
| 17 |
+
set_property PACKAGE_PIN B15 [get_ports {ft601_data[12]}]
|
| 18 |
+
set_property PACKAGE_PIN B16 [get_ports {ft601_data[13]}]
|
| 19 |
+
set_property PACKAGE_PIN A17 [get_ports {ft601_data[14]}]
|
| 20 |
+
set_property PACKAGE_PIN B17 [get_ports {ft601_data[15]}]
|
| 21 |
+
set_property PACKAGE_PIN C17 [get_ports {ft601_data[16]}]
|
| 22 |
+
set_property PACKAGE_PIN C18 [get_ports {ft601_data[17]}]
|
| 23 |
+
set_property PACKAGE_PIN D18 [get_ports {ft601_data[18]}]
|
| 24 |
+
set_property PACKAGE_PIN E17 [get_ports {ft601_data[19]}]
|
| 25 |
+
set_property PACKAGE_PIN E18 [get_ports {ft601_data[20]}]
|
| 26 |
+
set_property PACKAGE_PIN E16 [get_ports {ft601_data[21]}]
|
| 27 |
+
set_property PACKAGE_PIN F18 [get_ports {ft601_data[22]}]
|
| 28 |
+
set_property PACKAGE_PIN F17 [get_ports {ft601_data[23]}]
|
| 29 |
+
set_property PACKAGE_PIN G17 [get_ports {ft601_data[24]}]
|
| 30 |
+
set_property PACKAGE_PIN H18 [get_ports {ft601_data[25]}]
|
| 31 |
+
set_property PACKAGE_PIN D13 [get_ports {ft601_data[26]}]
|
| 32 |
+
set_property PACKAGE_PIN C14 [get_ports {ft601_data[27]}]
|
| 33 |
+
set_property PACKAGE_PIN D14 [get_ports {ft601_data[28]}]
|
| 34 |
+
set_property PACKAGE_PIN D15 [get_ports {ft601_data[29]}]
|
| 35 |
+
set_property PACKAGE_PIN C16 [get_ports {ft601_data[30]}]
|
| 36 |
+
set_property PACKAGE_PIN D16 [get_ports {ft601_data[31]}]
|
| 37 |
+
set_property PACKAGE_PIN T15 [get_ports ft601_oe_n]
|
| 38 |
+
set_property PACKAGE_PIN R16 [get_ports ft601_rd_n]
|
| 39 |
+
set_property PACKAGE_PIN R18 [get_ports ft601_rxf_n]
|
| 40 |
+
set_property PACKAGE_PIN R17 [get_ports ft601_siwu_n]
|
| 41 |
+
set_property PACKAGE_PIN P18 [get_ports ft601_txe_n]
|
| 42 |
+
set_property PACKAGE_PIN T18 [get_ports ft601_wr_n]
|
| 43 |
+
set_property PACKAGE_PIN U15 [get_ports ft601_rst_n]
|
| 44 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_txe_n ft601_rxf_n}]
|
| 45 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 46 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 47 |
+
set_property SLEW FAST [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 48 |
+
set_property SLEW FAST [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 49 |
+
|
| 50 |
+
set_property PACKAGE_PIN V17 [get_ports user_ld1]
|
| 51 |
+
set_property PACKAGE_PIN U17 [get_ports user_ld2]
|
| 52 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {user_ld1 user_ld2}]
|
| 53 |
+
|
| 54 |
+
# SYSCLK
|
| 55 |
+
set_property PACKAGE_PIN R2 [get_ports clk]
|
| 56 |
+
set_property IOSTANDARD LVCMOS33 [get_ports clk]
|
| 57 |
+
create_clock -period 10.000 -name net_clk -waveform {0.000 5.000} [get_ports clk]
|
| 58 |
+
|
| 59 |
+
# FT601 CLK
|
| 60 |
+
create_clock -period 10.000 -name net_ft601_clk -waveform {0.000 5.000} [get_ports ft601_clk]
|
| 61 |
+
set_property IOSTANDARD LVCMOS33 [get_ports ft601_clk]
|
| 62 |
+
set_property PACKAGE_PIN E13 [get_ports ft601_clk]
|
| 63 |
+
|
| 64 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports {ft601_data[*]}]
|
| 65 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports {ft601_data[*]}]
|
| 66 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_rxf_n]
|
| 67 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_rxf_n]
|
| 68 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_txe_n]
|
| 69 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_txe_n]
|
| 70 |
+
|
| 71 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 72 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 73 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 74 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 75 |
+
|
| 76 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_OE_N_reg]
|
| 77 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_RD_N_reg]
|
| 78 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_WR_N_reg]
|
| 79 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_DATA_OUT_reg[0][*]]
|
| 80 |
+
|
| 81 |
+
set_multicycle_path 2 -from [get_pins i_pcileech_com/i_pcileech_ft601/OE_reg/C] -to [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 82 |
+
set_false_path -from [get_pins {tickcount64_reg[*]/C}]
|
| 83 |
+
set_false_path -from [get_pins {i_pcileech_fifo/_pcie_core_config_reg[*]/C}]
|
| 84 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_lnk_up_int_reg/C] -to [get_pins {i_pcileech_fifo/_cmd_tx_din_reg[16]/D}]
|
| 85 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_reset_out_reg/C]
|
| 86 |
+
|
| 87 |
+
#PCIe signals
|
| 88 |
+
set_property PACKAGE_PIN K1 [get_ports pcie_present]
|
| 89 |
+
set_property PACKAGE_PIN M1 [get_ports pcie_perst_n]
|
| 90 |
+
set_property PACKAGE_PIN L2 [get_ports pcie_wake_n]
|
| 91 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_present]
|
| 92 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_perst_n]
|
| 93 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_wake_n]
|
| 94 |
+
|
| 95 |
+
set_property LOC GTPE2_CHANNEL_X0Y2 [get_cells {i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/gt_top_i/pipe_wrapper_i/pipe_lane[0].gt_wrapper_i/gtp_channel.gtpe2_channel_i}]
|
| 96 |
+
set_property PACKAGE_PIN E3 [get_ports pcie_rx_n[0]]
|
| 97 |
+
set_property PACKAGE_PIN E4 [get_ports pcie_rx_p[0]]
|
| 98 |
+
set_property PACKAGE_PIN H1 [get_ports pcie_tx_n[0]]
|
| 99 |
+
set_property PACKAGE_PIN H2 [get_ports pcie_tx_p[0]]
|
| 100 |
+
|
| 101 |
+
#set_property PACKAGE_PIN A3 [get_ports pcie_rx_n[1]]
|
| 102 |
+
#set_property PACKAGE_PIN A4 [get_ports pcie_rx_p[1]]
|
| 103 |
+
#set_property PACKAGE_PIN F1 [get_ports pcie_tx_n[1]]
|
| 104 |
+
#set_property PACKAGE_PIN F2 [get_ports pcie_tx_p[1]]
|
| 105 |
+
|
| 106 |
+
#set_property PACKAGE_PIN C3 [get_ports pcie_rx_n[2]]
|
| 107 |
+
#set_property PACKAGE_PIN C4 [get_ports pcie_rx_p[2]]
|
| 108 |
+
#set_property PACKAGE_PIN D1 [get_ports pcie_tx_n[2]]
|
| 109 |
+
#set_property PACKAGE_PIN D2 [get_ports pcie_tx_p[2]]
|
| 110 |
+
|
| 111 |
+
#set_property PACKAGE_PIN G3 [get_ports pcie_rx_n[3]]
|
| 112 |
+
#set_property PACKAGE_PIN G4 [get_ports pcie_rx_p[3]]
|
| 113 |
+
#set_property PACKAGE_PIN B1 [get_ports pcie_tx_n[3]]
|
| 114 |
+
#set_property PACKAGE_PIN B2 [get_ports pcie_tx_p[3]]
|
| 115 |
+
|
| 116 |
+
set_property PACKAGE_PIN D5 [get_ports pcie_clk_n]
|
| 117 |
+
set_property PACKAGE_PIN D6 [get_ports pcie_clk_p]
|
| 118 |
+
|
| 119 |
+
create_clock -name pcie_sys_clk_p -period 10.0 [get_nets pcie_clk_p]
|
| 120 |
+
|
| 121 |
+
set_property CFGBVS Vcco [current_design]
|
| 122 |
+
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
| 123 |
+
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
|
| 124 |
+
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
|
| 125 |
+
set_property BITSTREAM.CONFIG.SPI_FALL_EDGE YES [current_design]
|
| 126 |
+
set_property BITSTREAM.CONFIG.CONFIGRATE 66 [current_design]
|
JOKOSAHS_DMA-Pcileech/src/pcileech_screamer_m2_top.sv
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// Top module for various 35T-325 x1 Artix-7 boards.
|
| 5 |
+
//
|
| 6 |
+
// (c) Ulf Frisk, 2019-2024
|
| 7 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
`timescale 1ns / 1ps
|
| 11 |
+
`include "pcileech_header.svh"
|
| 12 |
+
|
| 13 |
+
module pcileech_screamer_m2_top #(
|
| 14 |
+
parameter PARAM_DEVICE_ID = 4,
|
| 15 |
+
parameter PARAM_VERSION_NUMBER_MAJOR = 4,
|
| 16 |
+
parameter PARAM_VERSION_NUMBER_MINOR = 13,
|
| 17 |
+
parameter PARAM_CUSTOM_VALUE = 32'hffffffff
|
| 18 |
+
) (
|
| 19 |
+
// SYS
|
| 20 |
+
input clk,
|
| 21 |
+
input ft601_clk,
|
| 22 |
+
|
| 23 |
+
// SYSTEM LEDs and BUTTONs
|
| 24 |
+
output user_ld1,
|
| 25 |
+
output user_ld2,
|
| 26 |
+
|
| 27 |
+
// PCI-E FABRIC
|
| 28 |
+
output [0:0] pcie_tx_p,
|
| 29 |
+
output [0:0] pcie_tx_n,
|
| 30 |
+
input [0:0] pcie_rx_p,
|
| 31 |
+
input [0:0] pcie_rx_n,
|
| 32 |
+
input pcie_clk_p,
|
| 33 |
+
input pcie_clk_n,
|
| 34 |
+
input pcie_present,
|
| 35 |
+
input pcie_perst_n,
|
| 36 |
+
output reg pcie_wake_n = 1'b1,
|
| 37 |
+
|
| 38 |
+
// TO/FROM FT601 PADS
|
| 39 |
+
output ft601_rst_n,
|
| 40 |
+
|
| 41 |
+
inout [31:0] ft601_data,
|
| 42 |
+
output [3:0] ft601_be,
|
| 43 |
+
input ft601_rxf_n,
|
| 44 |
+
input ft601_txe_n,
|
| 45 |
+
output ft601_wr_n,
|
| 46 |
+
output ft601_siwu_n,
|
| 47 |
+
output ft601_rd_n,
|
| 48 |
+
output ft601_oe_n
|
| 49 |
+
);
|
| 50 |
+
|
| 51 |
+
// SYS
|
| 52 |
+
wire rst;
|
| 53 |
+
|
| 54 |
+
// FIFO CTL <--> COM CTL
|
| 55 |
+
wire [63:0] com_dout;
|
| 56 |
+
wire com_dout_valid;
|
| 57 |
+
wire [255:0] com_din;
|
| 58 |
+
wire com_din_wr_en;
|
| 59 |
+
wire com_din_ready;
|
| 60 |
+
wire led_com;
|
| 61 |
+
wire led_pcie;
|
| 62 |
+
|
| 63 |
+
// FIFO CTL <--> COM CTL
|
| 64 |
+
IfComToFifo dcom_fifo();
|
| 65 |
+
|
| 66 |
+
// FIFO CTL <--> PCIe
|
| 67 |
+
IfPCIeFifoCfg dcfg();
|
| 68 |
+
IfPCIeFifoTlp dtlp();
|
| 69 |
+
IfPCIeFifoCore dpcie();
|
| 70 |
+
IfShadow2Fifo dshadow2fifo();
|
| 71 |
+
|
| 72 |
+
// ----------------------------------------------------
|
| 73 |
+
// TickCount64 CLK
|
| 74 |
+
// ----------------------------------------------------
|
| 75 |
+
|
| 76 |
+
time tickcount64 = 0;
|
| 77 |
+
always @ ( posedge clk )
|
| 78 |
+
tickcount64 <= tickcount64 + 1;
|
| 79 |
+
|
| 80 |
+
assign rst = (tickcount64 < 64) ? 1'b1 : 1'b0;
|
| 81 |
+
assign ft601_rst_n = ~rst;
|
| 82 |
+
wire led_pwronblink = tickcount64[24] & (tickcount64[63:27] == 0);
|
| 83 |
+
|
| 84 |
+
OBUF led_ld1_obuf(.O(user_ld1), .I(led_pcie));
|
| 85 |
+
OBUF led_ld2_obuf(.O(user_ld2), .I(led_com));
|
| 86 |
+
|
| 87 |
+
// ----------------------------------------------------
|
| 88 |
+
// BUFFERED COMMUNICATION DEVICE (FT601)
|
| 89 |
+
// ----------------------------------------------------
|
| 90 |
+
|
| 91 |
+
pcileech_com i_pcileech_com (
|
| 92 |
+
// SYS
|
| 93 |
+
.clk ( clk ),
|
| 94 |
+
.clk_com ( ft601_clk ),
|
| 95 |
+
.rst ( rst ),
|
| 96 |
+
.led_state_txdata ( led_com ), // ->
|
| 97 |
+
.led_state_invert ( led_pwronblink ), // <-
|
| 98 |
+
// FIFO CTL <--> COM CTL
|
| 99 |
+
.dfifo ( dcom_fifo.mp_com ),
|
| 100 |
+
// TO/FROM FT601 PADS
|
| 101 |
+
.ft601_data ( ft601_data ), // <> [31:0]
|
| 102 |
+
.ft601_be ( ft601_be ), // -> [3:0]
|
| 103 |
+
.ft601_txe_n ( ft601_txe_n ), // <-
|
| 104 |
+
.ft601_rxf_n ( ft601_rxf_n ), // <-
|
| 105 |
+
.ft601_siwu_n ( ft601_siwu_n ), // ->
|
| 106 |
+
.ft601_wr_n ( ft601_wr_n ), // ->
|
| 107 |
+
.ft601_rd_n ( ft601_rd_n ), // ->
|
| 108 |
+
.ft601_oe_n ( ft601_oe_n ) // ->
|
| 109 |
+
);
|
| 110 |
+
|
| 111 |
+
// ----------------------------------------------------
|
| 112 |
+
// FIFO CTL
|
| 113 |
+
// ----------------------------------------------------
|
| 114 |
+
|
| 115 |
+
pcileech_fifo #(
|
| 116 |
+
.PARAM_DEVICE_ID ( PARAM_DEVICE_ID ),
|
| 117 |
+
.PARAM_VERSION_NUMBER_MAJOR ( PARAM_VERSION_NUMBER_MAJOR ),
|
| 118 |
+
.PARAM_VERSION_NUMBER_MINOR ( PARAM_VERSION_NUMBER_MINOR ),
|
| 119 |
+
.PARAM_CUSTOM_VALUE ( PARAM_CUSTOM_VALUE )
|
| 120 |
+
) i_pcileech_fifo (
|
| 121 |
+
.clk ( clk ),
|
| 122 |
+
.rst ( rst ),
|
| 123 |
+
.rst_cfg_reload ( 1'b0 ),
|
| 124 |
+
.pcie_present ( pcie_present ),
|
| 125 |
+
.pcie_perst_n ( pcie_perst_n ),
|
| 126 |
+
// FIFO CTL <--> COM CTL
|
| 127 |
+
.dcom ( dcom_fifo.mp_fifo ),
|
| 128 |
+
// FIFO CTL <--> PCIe
|
| 129 |
+
.dcfg ( dcfg.mp_fifo ),
|
| 130 |
+
.dtlp ( dtlp.mp_fifo ),
|
| 131 |
+
.dpcie ( dpcie.mp_fifo ),
|
| 132 |
+
.dshadow2fifo ( dshadow2fifo.fifo )
|
| 133 |
+
);
|
| 134 |
+
|
| 135 |
+
// ----------------------------------------------------
|
| 136 |
+
// PCIe
|
| 137 |
+
// ----------------------------------------------------
|
| 138 |
+
|
| 139 |
+
pcileech_pcie_a7 i_pcileech_pcie_a7(
|
| 140 |
+
.clk_sys ( clk ),
|
| 141 |
+
.rst ( rst ),
|
| 142 |
+
// PCIe fabric
|
| 143 |
+
.pcie_tx_p ( pcie_tx_p ),
|
| 144 |
+
.pcie_tx_n ( pcie_tx_n ),
|
| 145 |
+
.pcie_rx_p ( pcie_rx_p ),
|
| 146 |
+
.pcie_rx_n ( pcie_rx_n ),
|
| 147 |
+
.pcie_clk_p ( pcie_clk_p ),
|
| 148 |
+
.pcie_clk_n ( pcie_clk_n ),
|
| 149 |
+
.pcie_perst_n ( pcie_perst_n ),
|
| 150 |
+
// State and Activity LEDs
|
| 151 |
+
.led_state ( led_pcie ),
|
| 152 |
+
// FIFO CTL <--> PCIe
|
| 153 |
+
.dfifo_cfg ( dcfg.mp_pcie ),
|
| 154 |
+
.dfifo_tlp ( dtlp.mp_pcie ),
|
| 155 |
+
.dfifo_pcie ( dpcie.mp_pcie ),
|
| 156 |
+
.dshadow2fifo ( dshadow2fifo.shadow )
|
| 157 |
+
);
|
| 158 |
+
|
| 159 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/src/pcileech_squirrel.xdc
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set_property PACKAGE_PIN Y18 [get_ports ft601_be[0]]
|
| 2 |
+
set_property PACKAGE_PIN AA18 [get_ports ft601_be[1]]
|
| 3 |
+
set_property PACKAGE_PIN AB18 [get_ports ft601_be[2]]
|
| 4 |
+
set_property PACKAGE_PIN W17 [get_ports ft601_be[3]]
|
| 5 |
+
set_property PACKAGE_PIN N13 [get_ports ft601_data[0]]
|
| 6 |
+
set_property PACKAGE_PIN N14 [get_ports ft601_data[1]]
|
| 7 |
+
set_property PACKAGE_PIN N15 [get_ports ft601_data[2]]
|
| 8 |
+
set_property PACKAGE_PIN P15 [get_ports ft601_data[3]]
|
| 9 |
+
set_property PACKAGE_PIN P16 [get_ports ft601_data[4]]
|
| 10 |
+
set_property PACKAGE_PIN N17 [get_ports ft601_data[5]]
|
| 11 |
+
set_property PACKAGE_PIN P17 [get_ports ft601_data[6]]
|
| 12 |
+
set_property PACKAGE_PIN R17 [get_ports ft601_data[7]]
|
| 13 |
+
set_property PACKAGE_PIN P19 [get_ports ft601_data[8]]
|
| 14 |
+
set_property PACKAGE_PIN R18 [get_ports ft601_data[9]]
|
| 15 |
+
set_property PACKAGE_PIN R19 [get_ports ft601_data[10]]
|
| 16 |
+
set_property PACKAGE_PIN T18 [get_ports ft601_data[11]]
|
| 17 |
+
set_property PACKAGE_PIN U18 [get_ports ft601_data[12]]
|
| 18 |
+
set_property PACKAGE_PIN V18 [get_ports ft601_data[13]]
|
| 19 |
+
set_property PACKAGE_PIN V19 [get_ports ft601_data[14]]
|
| 20 |
+
set_property PACKAGE_PIN V17 [get_ports ft601_data[15]]
|
| 21 |
+
set_property PACKAGE_PIN W20 [get_ports ft601_data[16]]
|
| 22 |
+
set_property PACKAGE_PIN Y19 [get_ports ft601_data[17]]
|
| 23 |
+
set_property PACKAGE_PIN T21 [get_ports ft601_data[18]]
|
| 24 |
+
set_property PACKAGE_PIN T20 [get_ports ft601_data[19]]
|
| 25 |
+
set_property PACKAGE_PIN U21 [get_ports ft601_data[20]]
|
| 26 |
+
set_property PACKAGE_PIN V20 [get_ports ft601_data[21]]
|
| 27 |
+
set_property PACKAGE_PIN W22 [get_ports ft601_data[22]]
|
| 28 |
+
set_property PACKAGE_PIN W21 [get_ports ft601_data[23]]
|
| 29 |
+
set_property PACKAGE_PIN Y22 [get_ports ft601_data[24]]
|
| 30 |
+
set_property PACKAGE_PIN Y21 [get_ports ft601_data[25]]
|
| 31 |
+
set_property PACKAGE_PIN AA21 [get_ports ft601_data[26]]
|
| 32 |
+
set_property PACKAGE_PIN AB22 [get_ports ft601_data[27]]
|
| 33 |
+
set_property PACKAGE_PIN AA20 [get_ports ft601_data[28]]
|
| 34 |
+
set_property PACKAGE_PIN AB21 [get_ports ft601_data[29]]
|
| 35 |
+
set_property PACKAGE_PIN AA19 [get_ports ft601_data[30]]
|
| 36 |
+
set_property PACKAGE_PIN AB20 [get_ports ft601_data[31]]
|
| 37 |
+
set_property PACKAGE_PIN AB6 [get_ports ft601_oe_n]
|
| 38 |
+
set_property PACKAGE_PIN AA6 [get_ports ft601_rd_n]
|
| 39 |
+
set_property PACKAGE_PIN AB8 [get_ports ft601_rxf_n]
|
| 40 |
+
set_property PACKAGE_PIN Y8 [get_ports ft601_siwu_n]
|
| 41 |
+
set_property PACKAGE_PIN AA8 [get_ports ft601_txe_n]
|
| 42 |
+
set_property PACKAGE_PIN AB7 [get_ports ft601_wr_n]
|
| 43 |
+
set_property PACKAGE_PIN Y9 [get_ports ft601_rst_n]
|
| 44 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_txe_n ft601_rxf_n}]
|
| 45 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 46 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 47 |
+
set_property SLEW FAST [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 48 |
+
set_property SLEW FAST [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n ft601_siwu_n ft601_rst_n}]
|
| 49 |
+
|
| 50 |
+
set_property PACKAGE_PIN Y6 [get_ports user_ld1]
|
| 51 |
+
set_property PACKAGE_PIN AB5 [get_ports user_ld2]
|
| 52 |
+
set_property PACKAGE_PIN AB3 [get_ports user_sw1_n]
|
| 53 |
+
set_property PACKAGE_PIN AA5 [get_ports user_sw2_n]
|
| 54 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {user_ld1 user_ld2 user_sw1_n user_sw2_n}]
|
| 55 |
+
|
| 56 |
+
set_property PACKAGE_PIN F21 [get_ports ft2232_rst_n]
|
| 57 |
+
set_property IOSTANDARD LVCMOS33 [get_ports ft2232_rst_n]
|
| 58 |
+
|
| 59 |
+
# SYSCLK
|
| 60 |
+
set_property PACKAGE_PIN H4 [get_ports clk]
|
| 61 |
+
set_property IOSTANDARD LVCMOS33 [get_ports clk]
|
| 62 |
+
create_clock -period 10.000 -name net_clk -waveform {0.000 5.000} [get_ports clk]
|
| 63 |
+
|
| 64 |
+
# FT601 CLK
|
| 65 |
+
create_clock -period 10.000 -name net_ft601_clk -waveform {0.000 5.000} [get_ports ft601_clk]
|
| 66 |
+
set_property IOSTANDARD LVCMOS33 [get_ports ft601_clk]
|
| 67 |
+
set_property PACKAGE_PIN W19 [get_ports ft601_clk]
|
| 68 |
+
|
| 69 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports {ft601_data[*]}]
|
| 70 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports {ft601_data[*]}]
|
| 71 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_rxf_n]
|
| 72 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_rxf_n]
|
| 73 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -min 6.5 [get_ports ft601_txe_n]
|
| 74 |
+
set_input_delay -clock [get_clocks net_ft601_clk] -max 7.0 [get_ports ft601_txe_n]
|
| 75 |
+
|
| 76 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 77 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {ft601_wr_n ft601_rd_n ft601_oe_n}]
|
| 78 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -max 1.0 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 79 |
+
set_output_delay -clock [get_clocks net_ft601_clk] -min 4.8 [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 80 |
+
|
| 81 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_OE_N_reg]
|
| 82 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_RD_N_reg]
|
| 83 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_WR_N_reg]
|
| 84 |
+
set_property IOB TRUE [get_cells i_pcileech_com/i_pcileech_ft601/FT601_DATA_OUT_reg[0][*]]
|
| 85 |
+
|
| 86 |
+
set_multicycle_path 2 -from [get_pins i_pcileech_com/i_pcileech_ft601/OE_reg/C] -to [get_ports {{ft601_be[*]} {ft601_data[*]}}]
|
| 87 |
+
set_false_path -from [get_pins {tickcount64_reg[*]/C}]
|
| 88 |
+
set_false_path -from [get_pins {i_pcileech_fifo/_pcie_core_config_reg[*]/C}]
|
| 89 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_lnk_up_int_reg/C] -to [get_pins {i_pcileech_fifo/_cmd_tx_din_reg[16]/D}]
|
| 90 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/user_reset_out_reg/C]
|
| 91 |
+
|
| 92 |
+
#PCIe signals
|
| 93 |
+
set_property LOC GTPE2_CHANNEL_X0Y2 [get_cells {i_pcileech_pcie_a7/i_pcie_7x_0/inst/inst/gt_top_i/pipe_wrapper_i/pipe_lane[0].gt_wrapper_i/gtp_channel.gtpe2_channel_i}]
|
| 94 |
+
set_property PACKAGE_PIN A13 [get_ports pcie_present]
|
| 95 |
+
set_property PACKAGE_PIN B13 [get_ports pcie_perst_n]
|
| 96 |
+
set_property PACKAGE_PIN A14 [get_ports pcie_wake_n]
|
| 97 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_present]
|
| 98 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_perst_n]
|
| 99 |
+
set_property IOSTANDARD LVCMOS33 [get_ports pcie_wake_n]
|
| 100 |
+
|
| 101 |
+
set_property PACKAGE_PIN A10 [get_ports {pcie_rx_n[0]}]
|
| 102 |
+
set_property PACKAGE_PIN B10 [get_ports {pcie_rx_p[0]}]
|
| 103 |
+
set_property PACKAGE_PIN A6 [get_ports {pcie_tx_n[0]}]
|
| 104 |
+
set_property PACKAGE_PIN B6 [get_ports {pcie_tx_p[0]}]
|
| 105 |
+
|
| 106 |
+
set_property PACKAGE_PIN E6 [get_ports pcie_clk_n]
|
| 107 |
+
set_property PACKAGE_PIN F6 [get_ports pcie_clk_p]
|
| 108 |
+
|
| 109 |
+
create_clock -name pcie_sys_clk_p -period 10.0 [get_nets pcie_clk_p]
|
| 110 |
+
|
| 111 |
+
set_property CFGBVS Vcco [current_design]
|
| 112 |
+
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
| 113 |
+
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
|
| 114 |
+
set_property BITSTREAM.GENERAL.COMPRESS TRUE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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// Top module for various 35T-484 x1 Artix-7 boards.
|
| 5 |
+
//
|
| 6 |
+
// (c) Ulf Frisk, 2019-2024
|
| 7 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
`timescale 1ns / 1ps
|
| 11 |
+
`include "pcileech_header.svh"
|
| 12 |
+
|
| 13 |
+
module pcileech_squirrel_top #(
|
| 14 |
+
parameter PARAM_DEVICE_ID = 4,
|
| 15 |
+
parameter PARAM_VERSION_NUMBER_MAJOR = 4,
|
| 16 |
+
parameter PARAM_VERSION_NUMBER_MINOR = 13,
|
| 17 |
+
parameter PARAM_CUSTOM_VALUE = 32'hffffffff
|
| 18 |
+
) (
|
| 19 |
+
// SYS
|
| 20 |
+
input clk,
|
| 21 |
+
input ft601_clk,
|
| 22 |
+
|
| 23 |
+
// SYSTEM LEDs and BUTTONs
|
| 24 |
+
output user_ld1,
|
| 25 |
+
output user_ld2,
|
| 26 |
+
input user_sw1_n,
|
| 27 |
+
input user_sw2_n,
|
| 28 |
+
|
| 29 |
+
output ft2232_rst_n,
|
| 30 |
+
|
| 31 |
+
// PCI-E FABRIC
|
| 32 |
+
output [0:0] pcie_tx_p,
|
| 33 |
+
output [0:0] pcie_tx_n,
|
| 34 |
+
input [0:0] pcie_rx_p,
|
| 35 |
+
input [0:0] pcie_rx_n,
|
| 36 |
+
input pcie_clk_p,
|
| 37 |
+
input pcie_clk_n,
|
| 38 |
+
input pcie_present,
|
| 39 |
+
input pcie_perst_n,
|
| 40 |
+
output reg pcie_wake_n = 1'b1,
|
| 41 |
+
|
| 42 |
+
// TO/FROM FT601 PADS
|
| 43 |
+
output ft601_rst_n,
|
| 44 |
+
inout [31:0] ft601_data,
|
| 45 |
+
output [3:0] ft601_be,
|
| 46 |
+
input ft601_rxf_n,
|
| 47 |
+
input ft601_txe_n,
|
| 48 |
+
output ft601_wr_n,
|
| 49 |
+
output ft601_siwu_n,
|
| 50 |
+
output ft601_rd_n,
|
| 51 |
+
output ft601_oe_n
|
| 52 |
+
);
|
| 53 |
+
|
| 54 |
+
// SYS
|
| 55 |
+
wire rst;
|
| 56 |
+
|
| 57 |
+
// FIFO CTL <--> COM CTL
|
| 58 |
+
wire [63:0] com_dout;
|
| 59 |
+
wire com_dout_valid;
|
| 60 |
+
wire [255:0] com_din;
|
| 61 |
+
wire com_din_wr_en;
|
| 62 |
+
wire com_din_ready;
|
| 63 |
+
wire led_com;
|
| 64 |
+
wire led_pcie;
|
| 65 |
+
|
| 66 |
+
// FIFO CTL <--> COM CTL
|
| 67 |
+
IfComToFifo dcom_fifo();
|
| 68 |
+
|
| 69 |
+
// FIFO CTL <--> PCIe
|
| 70 |
+
IfPCIeFifoCfg dcfg();
|
| 71 |
+
IfPCIeFifoTlp dtlp();
|
| 72 |
+
IfPCIeFifoCore dpcie();
|
| 73 |
+
IfShadow2Fifo dshadow2fifo();
|
| 74 |
+
|
| 75 |
+
// ----------------------------------------------------
|
| 76 |
+
// TickCount64 CLK
|
| 77 |
+
// ----------------------------------------------------
|
| 78 |
+
|
| 79 |
+
time tickcount64 = 0;
|
| 80 |
+
time tickcount64_reload = 0;
|
| 81 |
+
always @ ( posedge clk ) begin
|
| 82 |
+
tickcount64 <= user_sw2_n ? (tickcount64 + 1) : 0;
|
| 83 |
+
tickcount64_reload <= user_sw2_n ? 0 : (tickcount64_reload + 1);
|
| 84 |
+
end
|
| 85 |
+
|
| 86 |
+
assign rst = ~user_sw2_n || ((tickcount64 < 64) ? 1'b1 : 1'b0);
|
| 87 |
+
assign ft601_rst_n = ~rst;
|
| 88 |
+
wire led_pwronblink = ~user_sw1_n ^ (tickcount64[24] & (tickcount64[63:27] == 0));
|
| 89 |
+
|
| 90 |
+
OBUF led_ld1_obuf(.O(user_ld1), .I(led_pcie));
|
| 91 |
+
OBUF led_ld2_obuf(.O(user_ld2), .I(led_com));
|
| 92 |
+
OBUF ft2232_rst_obuf(.O(ft2232_rst_n), .I(user_sw2_n));
|
| 93 |
+
|
| 94 |
+
// ----------------------------------------------------
|
| 95 |
+
// BUFFERED COMMUNICATION DEVICE (FT601)
|
| 96 |
+
// ----------------------------------------------------
|
| 97 |
+
|
| 98 |
+
pcileech_com i_pcileech_com (
|
| 99 |
+
// SYS
|
| 100 |
+
.clk ( clk ),
|
| 101 |
+
.clk_com ( ft601_clk ),
|
| 102 |
+
.rst ( rst ),
|
| 103 |
+
.led_state_txdata ( led_com ), // ->
|
| 104 |
+
.led_state_invert ( led_pwronblink ), // <-
|
| 105 |
+
// FIFO CTL <--> COM CTL
|
| 106 |
+
.dfifo ( dcom_fifo.mp_com ),
|
| 107 |
+
// TO/FROM FT601 PADS
|
| 108 |
+
.ft601_data ( ft601_data ), // <> [31:0]
|
| 109 |
+
.ft601_be ( ft601_be ), // -> [3:0]
|
| 110 |
+
.ft601_txe_n ( ft601_txe_n ), // <-
|
| 111 |
+
.ft601_rxf_n ( ft601_rxf_n ), // <-
|
| 112 |
+
.ft601_siwu_n ( ft601_siwu_n ), // ->
|
| 113 |
+
.ft601_wr_n ( ft601_wr_n ), // ->
|
| 114 |
+
.ft601_rd_n ( ft601_rd_n ), // ->
|
| 115 |
+
.ft601_oe_n ( ft601_oe_n ) // ->
|
| 116 |
+
);
|
| 117 |
+
|
| 118 |
+
// ----------------------------------------------------
|
| 119 |
+
// FIFO CTL
|
| 120 |
+
// ----------------------------------------------------
|
| 121 |
+
|
| 122 |
+
pcileech_fifo #(
|
| 123 |
+
.PARAM_DEVICE_ID ( PARAM_DEVICE_ID ),
|
| 124 |
+
.PARAM_VERSION_NUMBER_MAJOR ( PARAM_VERSION_NUMBER_MAJOR ),
|
| 125 |
+
.PARAM_VERSION_NUMBER_MINOR ( PARAM_VERSION_NUMBER_MINOR ),
|
| 126 |
+
.PARAM_CUSTOM_VALUE ( PARAM_CUSTOM_VALUE )
|
| 127 |
+
) i_pcileech_fifo (
|
| 128 |
+
.clk ( clk ),
|
| 129 |
+
.rst ( rst ),
|
| 130 |
+
.rst_cfg_reload ( (tickcount64_reload > 500000000) ? 1'b1 : 1'b0 ), // config reload after 5s button press
|
| 131 |
+
.pcie_present ( pcie_present ),
|
| 132 |
+
.pcie_perst_n ( pcie_perst_n ),
|
| 133 |
+
// FIFO CTL <--> COM CTL
|
| 134 |
+
.dcom ( dcom_fifo.mp_fifo ),
|
| 135 |
+
// FIFO CTL <--> PCIe
|
| 136 |
+
.dcfg ( dcfg.mp_fifo ),
|
| 137 |
+
.dtlp ( dtlp.mp_fifo ),
|
| 138 |
+
.dpcie ( dpcie.mp_fifo ),
|
| 139 |
+
.dshadow2fifo ( dshadow2fifo.fifo )
|
| 140 |
+
);
|
| 141 |
+
|
| 142 |
+
// ----------------------------------------------------
|
| 143 |
+
// PCIe
|
| 144 |
+
// ----------------------------------------------------
|
| 145 |
+
|
| 146 |
+
pcileech_pcie_a7 i_pcileech_pcie_a7(
|
| 147 |
+
.clk_sys ( clk ),
|
| 148 |
+
.rst ( rst ),
|
| 149 |
+
// PCIe fabric
|
| 150 |
+
.pcie_tx_p ( pcie_tx_p ),
|
| 151 |
+
.pcie_tx_n ( pcie_tx_n ),
|
| 152 |
+
.pcie_rx_p ( pcie_rx_p ),
|
| 153 |
+
.pcie_rx_n ( pcie_rx_n ),
|
| 154 |
+
.pcie_clk_p ( pcie_clk_p ),
|
| 155 |
+
.pcie_clk_n ( pcie_clk_n ),
|
| 156 |
+
.pcie_perst_n ( pcie_perst_n ),
|
| 157 |
+
// State and Activity LEDs
|
| 158 |
+
.led_state ( led_pcie ),
|
| 159 |
+
// FIFO CTL <--> PCIe
|
| 160 |
+
.dfifo_cfg ( dcfg.mp_p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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SW
|
| 2 |
+
set_property PACKAGE_PIN F21 [get_ports power_sw]
|
| 3 |
+
set_property IOSTANDARD LVCMOS18 [get_ports power_sw]
|
| 4 |
+
set_property PULLTYPE PULLUP [get_ports power_sw]
|
| 5 |
+
|
| 6 |
+
# LED
|
| 7 |
+
set_property PACKAGE_PIN AA5 [get_ports pcie_led]
|
| 8 |
+
set_property IOSTANDARD LVCMOS18 [get_ports pcie_led]
|
| 9 |
+
|
| 10 |
+
# SYSCLK
|
| 11 |
+
set_property PACKAGE_PIN J19 [get_ports clk_in]
|
| 12 |
+
set_property IOSTANDARD LVCMOS33 [get_ports clk_in]
|
| 13 |
+
create_clock -period 8.000 [get_nets clk]
|
| 14 |
+
|
| 15 |
+
#BUS DO
|
| 16 |
+
set_property PACKAGE_PIN A21 [get_ports {BUS_DO[0]}]
|
| 17 |
+
set_property PACKAGE_PIN A20 [get_ports {BUS_DO[1]}]
|
| 18 |
+
set_property PACKAGE_PIN A19 [get_ports {BUS_DO[2]}]
|
| 19 |
+
set_property PACKAGE_PIN A18 [get_ports {BUS_DO[3]}]
|
| 20 |
+
set_property PACKAGE_PIN A16 [get_ports {BUS_DO[4]}]
|
| 21 |
+
set_property PACKAGE_PIN A15 [get_ports {BUS_DO[5]}]
|
| 22 |
+
set_property PACKAGE_PIN A14 [get_ports {BUS_DO[6]}]
|
| 23 |
+
set_property PACKAGE_PIN A13 [get_ports {BUS_DO[7]}]
|
| 24 |
+
set_property PACKAGE_PIN B22 [get_ports {BUS_DO[8]}]
|
| 25 |
+
set_property PACKAGE_PIN B21 [get_ports {BUS_DO[9]}]
|
| 26 |
+
set_property PACKAGE_PIN B20 [get_ports {BUS_DO[10]}]
|
| 27 |
+
set_property PACKAGE_PIN B18 [get_ports {BUS_DO[11]}]
|
| 28 |
+
set_property PACKAGE_PIN B17 [get_ports {BUS_DO[12]}]
|
| 29 |
+
set_property PACKAGE_PIN B16 [get_ports {BUS_DO[13]}]
|
| 30 |
+
set_property PACKAGE_PIN B15 [get_ports {BUS_DO[14]}]
|
| 31 |
+
set_property PACKAGE_PIN B13 [get_ports {BUS_DO[15]}]
|
| 32 |
+
set_property PACKAGE_PIN C22 [get_ports {BUS_DO[16]}]
|
| 33 |
+
set_property PACKAGE_PIN C20 [get_ports {BUS_DO[17]}]
|
| 34 |
+
set_property PACKAGE_PIN C19 [get_ports {BUS_DO[18]}]
|
| 35 |
+
set_property PACKAGE_PIN C18 [get_ports {BUS_DO[19]}]
|
| 36 |
+
set_property PACKAGE_PIN V7 [get_ports {BUS_DO[20]}]
|
| 37 |
+
set_property PACKAGE_PIN Y4 [get_ports {BUS_DO[21]}]
|
| 38 |
+
set_property PACKAGE_PIN AA4 [get_ports {BUS_DO[22]}]
|
| 39 |
+
set_property PACKAGE_PIN V4 [get_ports {BUS_DO[23]}]
|
| 40 |
+
set_property PACKAGE_PIN W4 [get_ports {BUS_DO[24]}]
|
| 41 |
+
set_property PACKAGE_PIN R4 [get_ports {BUS_DO[25]}]
|
| 42 |
+
set_property PACKAGE_PIN T4 [get_ports {BUS_DO[26]}]
|
| 43 |
+
set_property PACKAGE_PIN T5 [get_ports {BUS_DO[27]}]
|
| 44 |
+
set_property PACKAGE_PIN U5 [get_ports {BUS_DO[28]}]
|
| 45 |
+
set_property PACKAGE_PIN W6 [get_ports {BUS_DO[29]}]
|
| 46 |
+
set_property PACKAGE_PIN W5 [get_ports {BUS_DO[30]}]
|
| 47 |
+
set_property PACKAGE_PIN U6 [get_ports {BUS_DO[31]}]
|
| 48 |
+
set_property PACKAGE_PIN V5 [get_ports {BUS_DO[32]}]
|
| 49 |
+
set_property PACKAGE_PIN R6 [get_ports {BUS_DO[33]}]
|
| 50 |
+
set_property PACKAGE_PIN T6 [get_ports {BUS_DO[34]}]
|
| 51 |
+
set_property PACKAGE_PIN Y6 [get_ports {BUS_DO[35]}]
|
| 52 |
+
set_property PACKAGE_PIN AA6 [get_ports {BUS_DO[36]}]
|
| 53 |
+
set_property IOSTANDARD LVCMOS18 [get_ports {BUS_DO[*]}]
|
| 54 |
+
|
| 55 |
+
#BUS DI
|
| 56 |
+
set_property PACKAGE_PIN F4 [get_ports {BUS_DI[0]}]
|
| 57 |
+
set_property PACKAGE_PIN B1 [get_ports {BUS_DI[1]}]
|
| 58 |
+
set_property PACKAGE_PIN A1 [get_ports {BUS_DI[2]}]
|
| 59 |
+
set_property PACKAGE_PIN C2 [get_ports {BUS_DI[3]}]
|
| 60 |
+
set_property PACKAGE_PIN B2 [get_ports {BUS_DI[4]}]
|
| 61 |
+
set_property PACKAGE_PIN E1 [get_ports {BUS_DI[5]}]
|
| 62 |
+
set_property PACKAGE_PIN D1 [get_ports {BUS_DI[6]}]
|
| 63 |
+
set_property PACKAGE_PIN E2 [get_ports {BUS_DI[7]}]
|
| 64 |
+
set_property PACKAGE_PIN D2 [get_ports {BUS_DI[8]}]
|
| 65 |
+
set_property PACKAGE_PIN G1 [get_ports {BUS_DI[9]}]
|
| 66 |
+
set_property PACKAGE_PIN F1 [get_ports {BUS_DI[10]}]
|
| 67 |
+
set_property PACKAGE_PIN F3 [get_ports {BUS_DI[11]}]
|
| 68 |
+
set_property PACKAGE_PIN E3 [get_ports {BUS_DI[12]}]
|
| 69 |
+
set_property PACKAGE_PIN K1 [get_ports {BUS_DI[13]}]
|
| 70 |
+
set_property PACKAGE_PIN J1 [get_ports {BUS_DI[14]}]
|
| 71 |
+
set_property PACKAGE_PIN H2 [get_ports {BUS_DI[15]}]
|
| 72 |
+
set_property PACKAGE_PIN G2 [get_ports {BUS_DI[16]}]
|
| 73 |
+
set_property PACKAGE_PIN K2 [get_ports {BUS_DI[17]}]
|
| 74 |
+
set_property PACKAGE_PIN J2 [get_ports {BUS_DI[18]}]
|
| 75 |
+
set_property PACKAGE_PIN J5 [get_ports {BUS_DI[19]}]
|
| 76 |
+
set_property PACKAGE_PIN H5 [get_ports {BUS_DI[20]}]
|
| 77 |
+
set_property PACKAGE_PIN H3 [get_ports {BUS_DI[21]}]
|
| 78 |
+
set_property PACKAGE_PIN G3 [get_ports {BUS_DI[22]}]
|
| 79 |
+
set_property PACKAGE_PIN H4 [get_ports {BUS_DI[23]}]
|
| 80 |
+
set_property PACKAGE_PIN G4 [get_ports {BUS_DI[24]}]
|
| 81 |
+
set_property PACKAGE_PIN K4 [get_ports {BUS_DI[25]}]
|
| 82 |
+
set_property PACKAGE_PIN J4 [get_ports {BUS_DI[26]}]
|
| 83 |
+
set_property PACKAGE_PIN L3 [get_ports {BUS_DI[27]}]
|
| 84 |
+
set_property PACKAGE_PIN K3 [get_ports {BUS_DI[28]}]
|
| 85 |
+
set_property PACKAGE_PIN M1 [get_ports {BUS_DI[29]}]
|
| 86 |
+
set_property PACKAGE_PIN L1 [get_ports {BUS_DI[30]}]
|
| 87 |
+
set_property PACKAGE_PIN M3 [get_ports {BUS_DI[31]}]
|
| 88 |
+
set_property PACKAGE_PIN M2 [get_ports {BUS_DI[32]}]
|
| 89 |
+
set_property PACKAGE_PIN K6 [get_ports {BUS_DI[33]}]
|
| 90 |
+
set_property PACKAGE_PIN J6 [get_ports {BUS_DI[34]}]
|
| 91 |
+
set_property PACKAGE_PIN L5 [get_ports {BUS_DI[35]}]
|
| 92 |
+
set_property PACKAGE_PIN L4 [get_ports {BUS_DI[36]}]
|
| 93 |
+
set_property PACKAGE_PIN N4 [get_ports {BUS_DI[37]}]
|
| 94 |
+
set_property PACKAGE_PIN N3 [get_ports {BUS_DI[38]}]
|
| 95 |
+
set_property PACKAGE_PIN R1 [get_ports {BUS_DI[39]}]
|
| 96 |
+
set_property PACKAGE_PIN P1 [get_ports {BUS_DI[40]}]
|
| 97 |
+
set_property PACKAGE_PIN P5 [get_ports {BUS_DI[41]}]
|
| 98 |
+
set_property PACKAGE_PIN P4 [get_ports {BUS_DI[42]}]
|
| 99 |
+
set_property PACKAGE_PIN P2 [get_ports {BUS_DI[43]}]
|
| 100 |
+
set_property PACKAGE_PIN N2 [get_ports {BUS_DI[44]}]
|
| 101 |
+
set_property PACKAGE_PIN M6 [get_ports {BUS_DI[45]}]
|
| 102 |
+
set_property PACKAGE_PIN M5 [get_ports {BUS_DI[46]}]
|
| 103 |
+
set_property PACKAGE_PIN P6 [get_ports {BUS_DI[47]}]
|
| 104 |
+
set_property PACKAGE_PIN N5 [get_ports {BUS_DI[48]}]
|
| 105 |
+
set_property PACKAGE_PIN L6 [get_ports {BUS_DI[49]}]
|
| 106 |
+
set_property PACKAGE_PIN T3 [get_ports {BUS_DI[50]}]
|
| 107 |
+
set_property PACKAGE_PIN T1 [get_ports {BUS_DI[51]}]
|
| 108 |
+
set_property PACKAGE_PIN U1 [get_ports {BUS_DI[52]}]
|
| 109 |
+
set_property PACKAGE_PIN U2 [get_ports {BUS_DI[53]}]
|
| 110 |
+
set_property PACKAGE_PIN V2 [get_ports {BUS_DI[54]}]
|
| 111 |
+
set_property PACKAGE_PIN R3 [get_ports {BUS_DI[55]}]
|
| 112 |
+
set_property PACKAGE_PIN R2 [get_ports {BUS_DI[56]}]
|
| 113 |
+
set_property PACKAGE_PIN W2 [get_ports {BUS_DI[57]}]
|
| 114 |
+
set_property PACKAGE_PIN Y2 [get_ports {BUS_DI[58]}]
|
| 115 |
+
set_property PACKAGE_PIN W1 [get_ports {BUS_DI[59]}]
|
| 116 |
+
set_property PACKAGE_PIN Y1 [get_ports {BUS_DI[60]}]
|
| 117 |
+
set_property PACKAGE_PIN U3 [get_ports {BUS_DI[61]}]
|
| 118 |
+
set_property PACKAGE_PIN V3 [get_ports {BUS_DI[62]}]
|
| 119 |
+
set_property PACKAGE_PIN AA1 [get_ports {BUS_DI[63]}]
|
| 120 |
+
set_property PACKAGE_PIN AB1 [get_ports {BUS_DI[64]}]
|
| 121 |
+
set_property PACKAGE_PIN AB3 [get_ports {BUS_DI[65]}]
|
| 122 |
+
set_property PACKAGE_PIN AB2 [get_ports {BUS_DI[66]}]
|
| 123 |
+
set_property PACKAGE_PIN Y3 [get_ports {BUS_DI[67]}]
|
| 124 |
+
set_property PACKAGE_PIN AA3 [get_ports {BUS_DI[68]}]
|
| 125 |
+
set_property IOSTANDARD LVCMOS18 [get_ports {BUS_DI[*]}]
|
| 126 |
+
|
| 127 |
+
set_property PACKAGE_PIN AB6 [get_ports BUS_DI_PROG_FULL]
|
| 128 |
+
set_property IOSTANDARD LVCMOS18 [get_ports BUS_DI_PROG_FULL]
|
| 129 |
+
|
| 130 |
+
#TIMING FALSE PATHS
|
| 131 |
+
set_false_path -from [get_pins {tickcount64_reg[*]/C}]
|
| 132 |
+
set_false_path -from [get_pins {i_pcileech_fifo/_pcie_core_config_reg[*]/C}]
|
| 133 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7x4/i_pcie_7x_0/inst/inst/user_lnk_up_int_reg/C] -to [get_pins {i_pcileech_fifo/_cmd_tx_din_reg[16]/D}]
|
| 134 |
+
set_false_path -from [get_pins i_pcileech_pcie_a7x4/i_pcie_7x_0/inst/inst/user_reset_out_reg/C]
|
| 135 |
+
|
| 136 |
+
#PCIe signals
|
| 137 |
+
set_property PACKAGE_PIN J14 [get_ports pcie_present1]
|
| 138 |
+
set_property PACKAGE_PIN AB16 [get_ports pcie_present2]
|
| 139 |
+
set_property PACKAGE_PIN J22 [get_ports pcie_perst1_n]
|
| 140 |
+
set_property PACKAGE_PIN AB10 [get_ports pcie_perst2_n]
|
| 141 |
+
set_property IOSTANDARD LVCMOS33 [get_ports {pcie_present1 pcie_present2 pcie_perst1_n pcie_perst2_n}]
|
| 142 |
+
set_property PULLTYPE PULLUP [get_ports {pcie_present1 pcie_present2 pcie_perst1_n pcie_perst2_n}]
|
| 143 |
+
|
| 144 |
+
set_property LOC GTPE2_CHANNEL_X0Y4 [get_cells {i_pcileech_pcie_a7x4/i_pcie_7x_0/inst/inst/gt_top_i/pipe_wrapper_i/pipe_lane[0].gt_wrapper_i/gtp_channel.gtpe2_channel_i}]
|
| 145 |
+
set_property LOC GTPE2_CHANNEL_X0Y5 [get_cells {i_pcileech_pcie_a7x4/i_pcie_7x_0/inst/inst/gt_top_i/pipe_wrapper_i/pipe_lane[1].gt_wrapper_i/gtp_channel.gtpe2_channel_i}]
|
| 146 |
+
set_property LOC GTPE2_CHANNEL_X0Y6 [get_cells {i_pcileech_pcie_a7x4/i_pcie_7x_0/inst/inst/gt_top_i/pipe_wrapper_i/pipe_lane[2].gt_wrapper_i/gtp_channel.gtpe2_channel_i}]
|
| 147 |
+
set_property LOC GTPE2_CHANNEL_X0Y7 [get_cells {i_pcileech_pcie_a7x4/i_pcie_7x_0/inst/inst/gt_top_i/pipe_wrapper_i/pipe_lane[3].gt_wrapper_i/gtp_channel.gtpe2_channel_i}]
|
| 148 |
+
|
| 149 |
+
set_property PACKAGE_PIN A8 [get_ports pcie_rx_n[0]]
|
| 150 |
+
set_property PACKAGE_PIN B8 [get_ports pcie_rx_p[0]]
|
| 151 |
+
set_property PACKAGE_PIN A4 [get_ports pcie_tx_n[0]]
|
| 152 |
+
set_property PACKAGE_PIN B4 [get_ports pcie_tx_p[0]]
|
| 153 |
+
|
| 154 |
+
set_property PACKAGE_PIN C11 [get_ports pcie_rx_n[1]]
|
| 155 |
+
set_property PACKAGE_PIN D11 [get_ports pcie_rx_p[1]]
|
| 156 |
+
set_property PACKAGE_PIN C5 [get_ports pcie_tx_n[1]]
|
| 157 |
+
set_property PACKAGE_PIN D5 [get_ports pcie_tx_p[1]]
|
| 158 |
+
|
| 159 |
+
set_property PACKAGE_PIN A10 [get_ports pcie_rx_n[2]]
|
| 160 |
+
set_property PACKAGE_PIN B10 [get_ports pcie_rx_p[2]]
|
| 161 |
+
set_property PACKAGE_PIN A6 [get_ports pcie_tx_n[2]]
|
| 162 |
+
set_property PACKAGE_PIN B6 [get_ports pcie_tx_p[2]]
|
| 163 |
+
|
| 164 |
+
set_property PACKAGE_PIN C9 [get_ports pcie_rx_n[3]]
|
| 165 |
+
set_property PACKAGE_PIN D9 [get_ports pcie_rx_p[3]]
|
| 166 |
+
set_property PACKAGE_PIN C7 [get_ports pcie_tx_n[3]]
|
| 167 |
+
set_property PACKAGE_PIN D7 [get_ports pcie_tx_p[3]]
|
| 168 |
+
|
| 169 |
+
set_property PACKAGE_PIN F10 [get_ports pcie_clk_p]
|
| 170 |
+
set_property PACKAGE_PIN E10 [get_ports pcie_clk_n]
|
| 171 |
+
create_clock -period 10.000 -name pcie_sys_clk_p [get_nets pcie_clk_p]
|
| 172 |
+
|
| 173 |
+
#GENRAL CONFIG
|
| 174 |
+
set_property CFGBVS Vcco [current_design]
|
| 175 |
+
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
| 176 |
+
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
|
| 177 |
+
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
|
| 178 |
+
set_property BITSTREAM.CONFIG.SPI_FALL_EDGE YES [current_design]
|
| 179 |
+
set_property BITSTREAM.CONFIG.CONFIGRATE 66 [current_design]
|
JOKOSAHS_DMA-Pcileech/src/pcileech_tbx4_100t_top.sv
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
| 8 |
+
//
|
| 9 |
+
|
| 10 |
+
`timescale 1ns / 1ps
|
| 11 |
+
`include "pcileech_header.svh"
|
| 12 |
+
|
| 13 |
+
module pcileech_tbx4_100t_top #(
|
| 14 |
+
// DEVICE IDs as follows:
|
| 15 |
+
parameter PARAM_DEVICE_ID = 17,
|
| 16 |
+
parameter PARAM_VERSION_NUMBER_MAJOR = 4,
|
| 17 |
+
parameter PARAM_VERSION_NUMBER_MINOR = 15,
|
| 18 |
+
parameter PARAM_CUSTOM_VALUE = 32'hffffffff,
|
| 19 |
+
parameter POWER_SW_MODE = 0, // disable_pcie_on_thunderbolt_noconnect_not_enabled(0), disable_pcie_on_thunderbolt_noconnect_enabled(1)
|
| 20 |
+
parameter POWER_SW_TIME = 60*125_000_000 // detection sample time in ticks of 125MHz (125M=1s)
|
| 21 |
+
) (
|
| 22 |
+
// SYS
|
| 23 |
+
input clk_in,
|
| 24 |
+
|
| 25 |
+
// SYSTEM LEDs and BUTTONs
|
| 26 |
+
output pcie_led,
|
| 27 |
+
input power_sw,
|
| 28 |
+
|
| 29 |
+
// TO/FROM FPGA IO BRIDGE
|
| 30 |
+
input [36:0] BUS_DO,
|
| 31 |
+
output [68:0] BUS_DI,
|
| 32 |
+
input BUS_DI_PROG_FULL,
|
| 33 |
+
|
| 34 |
+
// PCI-E FABRIC
|
| 35 |
+
output [3:0] pcie_tx_p,
|
| 36 |
+
output [3:0] pcie_tx_n,
|
| 37 |
+
input [3:0] pcie_rx_p,
|
| 38 |
+
input [3:0] pcie_rx_n,
|
| 39 |
+
input pcie_clk_p,
|
| 40 |
+
input pcie_clk_n,
|
| 41 |
+
input pcie_present1,
|
| 42 |
+
input pcie_present2,
|
| 43 |
+
input pcie_perst1_n,
|
| 44 |
+
input pcie_perst2_n
|
| 45 |
+
);
|
| 46 |
+
|
| 47 |
+
// SYS
|
| 48 |
+
wire rst;
|
| 49 |
+
wire clk;
|
| 50 |
+
wire clk_com;
|
| 51 |
+
reg rst_sw = 0;
|
| 52 |
+
|
| 53 |
+
// FIFO CTL <--> COM CTL
|
| 54 |
+
wire [63:0] com_dout;
|
| 55 |
+
wire com_dout_valid;
|
| 56 |
+
wire [255:0] com_din;
|
| 57 |
+
wire com_din_wr_en;
|
| 58 |
+
wire com_din_ready;
|
| 59 |
+
|
| 60 |
+
// FIFO CTL <--> COM CTL
|
| 61 |
+
IfComToFifo dcom_fifo();
|
| 62 |
+
|
| 63 |
+
// FIFO CTL <--> PCIe
|
| 64 |
+
IfPCIeFifoCfg dcfg();
|
| 65 |
+
IfPCIeFifoTlp dtlp();
|
| 66 |
+
IfPCIeFifoCore dpcie();
|
| 67 |
+
IfShadow2Fifo dshadow2fifo();
|
| 68 |
+
|
| 69 |
+
// PCIe
|
| 70 |
+
wire pcie_present = pcie_present1 && pcie_present2;
|
| 71 |
+
wire pcie_perst_n = pcie_perst1_n && pcie_perst2_n && ~rst_sw;
|
| 72 |
+
|
| 73 |
+
// ----------------------------------------------------
|
| 74 |
+
// CLK: INPUT (clkin): 50MHz
|
| 75 |
+
// COM (clk_com): 250MHz
|
| 76 |
+
// SYS (clk): 125MHz
|
| 77 |
+
// ----------------------------------------------------
|
| 78 |
+
|
| 79 |
+
wire clk_locked, clk_out1, clk_out2;
|
| 80 |
+
clk_wiz_0 i_clk_wiz_0(
|
| 81 |
+
.clk_in1 ( clk_in ), // <- 50MHz
|
| 82 |
+
.clk_out1 ( clk_out1 ), // -> 250MHz
|
| 83 |
+
.clk_out2 ( clk_out2 ), // -> 125MHz
|
| 84 |
+
.locked ( clk_locked )
|
| 85 |
+
);
|
| 86 |
+
|
| 87 |
+
BUFG i_BUFG_1 ( .I( clk_locked ? clk_out1 : clk_in ), .O( clk_com ) );
|
| 88 |
+
BUFG i_BUFG_2 ( .I( clk_locked ? clk_out2 : clk_in ), .O( clk ) );
|
| 89 |
+
|
| 90 |
+
// ----------------------------------------------------
|
| 91 |
+
// TickCount64 CLK
|
| 92 |
+
// ----------------------------------------------------
|
| 93 |
+
|
| 94 |
+
time tickcount64 = 0;
|
| 95 |
+
always @ ( posedge clk )
|
| 96 |
+
tickcount64 <= tickcount64 + 1;
|
| 97 |
+
assign rst = (tickcount64 < 64) ? 1'b1 : 1'b0;
|
| 98 |
+
|
| 99 |
+
wire led_pcie;
|
| 100 |
+
OBUF led_ld1_obuf(.O(pcie_led), .I(led_pcie));
|
| 101 |
+
|
| 102 |
+
// ----------------------------------------------------
|
| 103 |
+
// POWER SWITCH MODE (DISABLE PCIE WHEN THUNDERBOLT NOT CONNECTED)
|
| 104 |
+
// ----------------------------------------------------
|
| 105 |
+
|
| 106 |
+
always @ ( posedge clk ) begin
|
| 107 |
+
if ( rst ) begin
|
| 108 |
+
rst_sw <= 0;
|
| 109 |
+
end
|
| 110 |
+
else if ( (POWER_SW_MODE == 1) && (tickcount64 == POWER_SW_TIME) ) begin
|
| 111 |
+
rst_sw <= ~power_sw;
|
| 112 |
+
end
|
| 113 |
+
end
|
| 114 |
+
|
| 115 |
+
// ----------------------------------------------------
|
| 116 |
+
// BUFFERED COMMUNICATION DEVICE (FPGA IO BRIDGE)
|
| 117 |
+
// ----------------------------------------------------
|
| 118 |
+
|
| 119 |
+
pcileech_com i_pcileech_com (
|
| 120 |
+
// SYS
|
| 121 |
+
.clk ( clk ),
|
| 122 |
+
.clk_com ( clk_com ),
|
| 123 |
+
.rst ( rst ),
|
| 124 |
+
// TO/FROM FPGA IO BRIDGE
|
| 125 |
+
.BUS_DO ( BUS_DO ),
|
| 126 |
+
.BUS_DI ( BUS_DI ),
|
| 127 |
+
.BUS_DI_PROG_FULL ( BUS_DI_PROG_FULL ),
|
| 128 |
+
// FIFO CTL <--> COM CTL
|
| 129 |
+
.com_dout ( dcom_fifo.com_dout ),
|
| 130 |
+
.com_dout_valid ( dcom_fifo.com_dout_valid ),
|
| 131 |
+
.com_din_ready ( dcom_fifo.com_din_ready ),
|
| 132 |
+
.com_din ( dcom_fifo.com_din ),
|
| 133 |
+
.com_din_wr_en ( dcom_fifo.com_din_wr_en )
|
| 134 |
+
);
|
| 135 |
+
|
| 136 |
+
// ----------------------------------------------------
|
| 137 |
+
// FIFO CTL
|
| 138 |
+
// ----------------------------------------------------
|
| 139 |
+
|
| 140 |
+
pcileech_fifo #(
|
| 141 |
+
.PARAM_DEVICE_ID ( PARAM_DEVICE_ID ),
|
| 142 |
+
.PARAM_VERSION_NUMBER_MAJOR ( PARAM_VERSION_NUMBER_MAJOR ),
|
| 143 |
+
.PARAM_VERSION_NUMBER_MINOR ( PARAM_VERSION_NUMBER_MINOR ),
|
| 144 |
+
.PARAM_CUSTOM_VALUE ( PARAM_CUSTOM_VALUE )
|
| 145 |
+
) i_pcileech_fifo (
|
| 146 |
+
.clk ( clk ),
|
| 147 |
+
.rst ( rst ),
|
| 148 |
+
.rst_cfg_reload ( 1'b0 ),
|
| 149 |
+
.pcie_present ( pcie_present ),
|
| 150 |
+
.pcie_perst_n ( pcie_perst_n ),
|
| 151 |
+
// FIFO CTL <--> COM CTL
|
| 152 |
+
.dcom ( dcom_fifo.mp_fifo ),
|
| 153 |
+
// FIFO CTL <--> PCIe
|
| 154 |
+
.dcfg ( dcfg.mp_fifo ),
|
| 155 |
+
.dtlp ( dtlp.mp_fifo ),
|
| 156 |
+
.dpcie ( dpcie.mp_fifo ),
|
| 157 |
+
.dshadow2fifo ( dshadow2fifo.fifo )
|
| 158 |
+
);
|
| 159 |
+
|
| 160 |
+
// ----------------------------------------------------
|
| 161 |
+
// PCIe
|
| 162 |
+
// ----------------------------------------------------
|
| 163 |
+
|
| 164 |
+
pcileech_pcie_a7x4 i_pcileech_pcie_a7x4(
|
| 165 |
+
.clk_sys ( clk ),
|
| 166 |
+
.rst ( rst ),
|
| 167 |
+
// PCIe fabric
|
| 168 |
+
.pcie_tx_p ( pcie_tx_p ),
|
| 169 |
+
.pcie_tx_n ( pcie_tx_n ),
|
| 170 |
+
.pcie_rx_p ( pcie_rx_p ),
|
| 171 |
+
.pcie_rx_n ( pcie_rx_n ),
|
| 172 |
+
.pcie_clk_p ( pcie_clk_p ),
|
| 173 |
+
.pcie_clk_n ( pcie_clk_n ),
|
| 174 |
+
.pcie_perst_n ( pcie_perst_n ),
|
| 175 |
+
// State and Activity LEDs
|
| 176 |
+
.led_state ( led_pcie ),
|
| 177 |
+
// FIFO CTL <--> PCIe
|
| 178 |
+
.dfifo_cfg ( dcfg.mp_pcie ),
|
| 179 |
+
.dfifo_tlp ( dtlp.mp_pcie ),
|
| 180 |
+
.dfifo_pcie ( dpcie.mp_pcie ),
|
| 181 |
+
.dshadow2fifo ( dshadow2fifo.shadow )
|
| 182 |
+
);
|
| 183 |
+
|
| 184 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/src/pcileech_tlps128_bar_controller.sv
ADDED
|
@@ -0,0 +1,908 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// PCIe BAR PIO controller.
|
| 5 |
+
//
|
| 6 |
+
// The PCILeech BAR PIO controller allows for easy user-implementation on top
|
| 7 |
+
// of the PCILeech AXIS128 PCIe TLP streaming interface.
|
| 8 |
+
// The controller consists of a read engine and a write engine and pluggable
|
| 9 |
+
// user-implemented PCIe BAR implementations (found at bottom of the file).
|
| 10 |
+
//
|
| 11 |
+
// Considerations:
|
| 12 |
+
// - The core handles 1 DWORD read + 1 DWORD write per CLK max. If a lot of
|
| 13 |
+
// data is written / read from the TLP streaming interface the core may
|
| 14 |
+
// drop packet silently.
|
| 15 |
+
// - The core reads 1 DWORD of data (without byte enable) per CLK.
|
| 16 |
+
// - The core writes 1 DWORD of data (with byte enable) per CLK.
|
| 17 |
+
// - All user-implemented cores must have the same latency in CLKs for the
|
| 18 |
+
// returned read data or else undefined behavior will take place.
|
| 19 |
+
// - 32-bit addresses are passed for read/writes. Larger BARs than 4GB are
|
| 20 |
+
// not supported due to addressing constraints. Lower bits (LSBs) are the
|
| 21 |
+
// BAR offset, Higher bits (MSBs) are the 32-bit base address of the BAR.
|
| 22 |
+
// - DO NOT edit read/write engines.
|
| 23 |
+
// - DO edit pcileech_tlps128_bar_controller (to swap bar implementations).
|
| 24 |
+
// - DO edit the bar implementations (at bottom of the file, if neccessary).
|
| 25 |
+
//
|
| 26 |
+
// Example implementations exists below, swap out any of the example cores
|
| 27 |
+
// against a core of your use case, or modify existing cores.
|
| 28 |
+
// Following test cores exist (see below in this file):
|
| 29 |
+
// - pcileech_bar_impl_zerowrite4k = zero-initialized read/write BAR.
|
| 30 |
+
// It's possible to modify contents by use of .coe file.
|
| 31 |
+
// - pcileech_bar_impl_loopaddr = test core that loops back the 32-bit
|
| 32 |
+
// address of the current read. Does not support writes.
|
| 33 |
+
// - pcileech_bar_impl_none = core without any reply.
|
| 34 |
+
//
|
| 35 |
+
// (c) Ulf Frisk, 2024
|
| 36 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 37 |
+
//
|
| 38 |
+
|
| 39 |
+
`timescale 1ns / 1ps
|
| 40 |
+
`include "pcileech_header.svh"
|
| 41 |
+
|
| 42 |
+
module pcileech_tlps128_bar_controller(
|
| 43 |
+
input rst,
|
| 44 |
+
input clk,
|
| 45 |
+
input bar_en,
|
| 46 |
+
input [15:0] pcie_id,
|
| 47 |
+
input [31:0] base_address_register,
|
| 48 |
+
IfAXIS128.sink_lite tlps_in,
|
| 49 |
+
IfAXIS128.source tlps_out
|
| 50 |
+
);
|
| 51 |
+
|
| 52 |
+
// ------------------------------------------------------------------------
|
| 53 |
+
// 1: TLP RECEIVE:
|
| 54 |
+
// Receive incoming BAR requests from the TLP stream:
|
| 55 |
+
// send them onwards to read and write FIFOs
|
| 56 |
+
// ------------------------------------------------------------------------
|
| 57 |
+
wire in_is_wr_ready;
|
| 58 |
+
bit in_is_wr_last;
|
| 59 |
+
wire in_is_first = tlps_in.tuser[0];
|
| 60 |
+
wire in_is_bar = bar_en && (tlps_in.tuser[8:2] != 0);
|
| 61 |
+
wire in_is_rd = (in_is_first && tlps_in.tlast && ((tlps_in.tdata[31:25] == 7'b0000000) || (tlps_in.tdata[31:25] == 7'b0010000) || (tlps_in.tdata[31:24] == 8'b00000010)));
|
| 62 |
+
wire in_is_wr = in_is_wr_last || (in_is_first && in_is_wr_ready && ((tlps_in.tdata[31:25] == 7'b0100000) || (tlps_in.tdata[31:25] == 7'b0110000) || (tlps_in.tdata[31:24] == 8'b01000010)));
|
| 63 |
+
|
| 64 |
+
always @ ( posedge clk )
|
| 65 |
+
if ( rst ) begin
|
| 66 |
+
in_is_wr_last <= 0;
|
| 67 |
+
end
|
| 68 |
+
else if ( tlps_in.tvalid ) begin
|
| 69 |
+
in_is_wr_last <= !tlps_in.tlast && in_is_wr;
|
| 70 |
+
end
|
| 71 |
+
|
| 72 |
+
wire [6:0] wr_bar;
|
| 73 |
+
wire [31:0] wr_addr;
|
| 74 |
+
wire [3:0] wr_be;
|
| 75 |
+
wire [31:0] wr_data;
|
| 76 |
+
wire wr_valid;
|
| 77 |
+
wire [87:0] rd_req_ctx;
|
| 78 |
+
wire [6:0] rd_req_bar;
|
| 79 |
+
wire [31:0] rd_req_addr;
|
| 80 |
+
wire rd_req_valid;
|
| 81 |
+
wire [87:0] rd_rsp_ctx;
|
| 82 |
+
wire [31:0] rd_rsp_data;
|
| 83 |
+
wire rd_rsp_valid;
|
| 84 |
+
|
| 85 |
+
pcileech_tlps128_bar_rdengine i_pcileech_tlps128_bar_rdengine(
|
| 86 |
+
.rst ( rst ),
|
| 87 |
+
.clk ( clk ),
|
| 88 |
+
// TLPs:
|
| 89 |
+
.pcie_id ( pcie_id ),
|
| 90 |
+
.tlps_in ( tlps_in ),
|
| 91 |
+
.tlps_in_valid ( tlps_in.tvalid && in_is_bar && in_is_rd ),
|
| 92 |
+
.tlps_out ( tlps_out ),
|
| 93 |
+
// BAR reads:
|
| 94 |
+
.rd_req_ctx ( rd_req_ctx ),
|
| 95 |
+
.rd_req_bar ( rd_req_bar ),
|
| 96 |
+
.rd_req_addr ( rd_req_addr ),
|
| 97 |
+
.rd_req_valid ( rd_req_valid ),
|
| 98 |
+
.rd_rsp_ctx ( rd_rsp_ctx ),
|
| 99 |
+
.rd_rsp_data ( rd_rsp_data ),
|
| 100 |
+
.rd_rsp_valid ( rd_rsp_valid )
|
| 101 |
+
);
|
| 102 |
+
|
| 103 |
+
pcileech_tlps128_bar_wrengine i_pcileech_tlps128_bar_wrengine(
|
| 104 |
+
.rst ( rst ),
|
| 105 |
+
.clk ( clk ),
|
| 106 |
+
// TLPs:
|
| 107 |
+
.tlps_in ( tlps_in ),
|
| 108 |
+
.tlps_in_valid ( tlps_in.tvalid && in_is_bar && in_is_wr ),
|
| 109 |
+
.tlps_in_ready ( in_is_wr_ready ),
|
| 110 |
+
// outgoing BAR writes:
|
| 111 |
+
.wr_bar ( wr_bar ),
|
| 112 |
+
.wr_addr ( wr_addr ),
|
| 113 |
+
.wr_be ( wr_be ),
|
| 114 |
+
.wr_data ( wr_data ),
|
| 115 |
+
.wr_valid ( wr_valid )
|
| 116 |
+
);
|
| 117 |
+
|
| 118 |
+
wire [87:0] bar_rsp_ctx[7];
|
| 119 |
+
wire [31:0] bar_rsp_data[7];
|
| 120 |
+
wire bar_rsp_valid[7];
|
| 121 |
+
|
| 122 |
+
assign rd_rsp_ctx = bar_rsp_valid[0] ? bar_rsp_ctx[0] :
|
| 123 |
+
bar_rsp_valid[1] ? bar_rsp_ctx[1] :
|
| 124 |
+
bar_rsp_valid[2] ? bar_rsp_ctx[2] :
|
| 125 |
+
bar_rsp_valid[3] ? bar_rsp_ctx[3] :
|
| 126 |
+
bar_rsp_valid[4] ? bar_rsp_ctx[4] :
|
| 127 |
+
bar_rsp_valid[5] ? bar_rsp_ctx[5] :
|
| 128 |
+
bar_rsp_valid[6] ? bar_rsp_ctx[6] : 0;
|
| 129 |
+
assign rd_rsp_data = bar_rsp_valid[0] ? bar_rsp_data[0] :
|
| 130 |
+
bar_rsp_valid[1] ? bar_rsp_data[1] :
|
| 131 |
+
bar_rsp_valid[2] ? bar_rsp_data[2] :
|
| 132 |
+
bar_rsp_valid[3] ? bar_rsp_data[3] :
|
| 133 |
+
bar_rsp_valid[4] ? bar_rsp_data[4] :
|
| 134 |
+
bar_rsp_valid[5] ? bar_rsp_data[5] :
|
| 135 |
+
bar_rsp_valid[6] ? bar_rsp_data[6] : 0;
|
| 136 |
+
assign rd_rsp_valid = bar_rsp_valid[0] || bar_rsp_valid[1] || bar_rsp_valid[2] || bar_rsp_valid[3] || bar_rsp_valid[4] || bar_rsp_valid[5] || bar_rsp_valid[6];
|
| 137 |
+
|
| 138 |
+
pcileech_bar_impl_ar9287_wifi i_bar0(
|
| 139 |
+
.rst ( rst ),
|
| 140 |
+
.clk ( clk ),
|
| 141 |
+
.wr_addr ( wr_addr ),
|
| 142 |
+
.wr_be ( wr_be ),
|
| 143 |
+
.wr_data ( wr_data ),
|
| 144 |
+
.wr_valid ( wr_valid && wr_bar[0] ),
|
| 145 |
+
.rd_req_ctx ( rd_req_ctx ),
|
| 146 |
+
.rd_req_addr ( rd_req_addr ),
|
| 147 |
+
.rd_req_valid ( rd_req_valid && rd_req_bar[0] ),
|
| 148 |
+
.base_address_register ( base_address_register ),
|
| 149 |
+
.rd_rsp_ctx ( bar_rsp_ctx[0] ),
|
| 150 |
+
.rd_rsp_data ( bar_rsp_data[0] ),
|
| 151 |
+
.rd_rsp_valid ( bar_rsp_valid[0] )
|
| 152 |
+
);
|
| 153 |
+
|
| 154 |
+
pcileech_bar_impl_loopaddr i_bar1(
|
| 155 |
+
.rst ( rst ),
|
| 156 |
+
.clk ( clk ),
|
| 157 |
+
.wr_addr ( wr_addr ),
|
| 158 |
+
.wr_be ( wr_be ),
|
| 159 |
+
.wr_data ( wr_data ),
|
| 160 |
+
.wr_valid ( wr_valid && wr_bar[1] ),
|
| 161 |
+
.rd_req_ctx ( rd_req_ctx ),
|
| 162 |
+
.rd_req_addr ( rd_req_addr ),
|
| 163 |
+
.rd_req_valid ( rd_req_valid && rd_req_bar[1] ),
|
| 164 |
+
.rd_rsp_ctx ( bar_rsp_ctx[1] ),
|
| 165 |
+
.rd_rsp_data ( bar_rsp_data[1] ),
|
| 166 |
+
.rd_rsp_valid ( bar_rsp_valid[1] )
|
| 167 |
+
);
|
| 168 |
+
|
| 169 |
+
pcileech_bar_impl_none i_bar2(
|
| 170 |
+
.rst ( rst ),
|
| 171 |
+
.clk ( clk ),
|
| 172 |
+
.wr_addr ( wr_addr ),
|
| 173 |
+
.wr_be ( wr_be ),
|
| 174 |
+
.wr_data ( wr_data ),
|
| 175 |
+
.wr_valid ( wr_valid && wr_bar[2] ),
|
| 176 |
+
.rd_req_ctx ( rd_req_ctx ),
|
| 177 |
+
.rd_req_addr ( rd_req_addr ),
|
| 178 |
+
.rd_req_valid ( rd_req_valid && rd_req_bar[2] ),
|
| 179 |
+
.rd_rsp_ctx ( bar_rsp_ctx[2] ),
|
| 180 |
+
.rd_rsp_data ( bar_rsp_data[2] ),
|
| 181 |
+
.rd_rsp_valid ( bar_rsp_valid[2] )
|
| 182 |
+
);
|
| 183 |
+
|
| 184 |
+
pcileech_bar_impl_none i_bar3(
|
| 185 |
+
.rst ( rst ),
|
| 186 |
+
.clk ( clk ),
|
| 187 |
+
.wr_addr ( wr_addr ),
|
| 188 |
+
.wr_be ( wr_be ),
|
| 189 |
+
.wr_data ( wr_data ),
|
| 190 |
+
.wr_valid ( wr_valid && wr_bar[3] ),
|
| 191 |
+
.rd_req_ctx ( rd_req_ctx ),
|
| 192 |
+
.rd_req_addr ( rd_req_addr ),
|
| 193 |
+
.rd_req_valid ( rd_req_valid && rd_req_bar[3] ),
|
| 194 |
+
.rd_rsp_ctx ( bar_rsp_ctx[3] ),
|
| 195 |
+
.rd_rsp_data ( bar_rsp_data[3] ),
|
| 196 |
+
.rd_rsp_valid ( bar_rsp_valid[3] )
|
| 197 |
+
);
|
| 198 |
+
|
| 199 |
+
pcileech_bar_impl_none i_bar4(
|
| 200 |
+
.rst ( rst ),
|
| 201 |
+
.clk ( clk ),
|
| 202 |
+
.wr_addr ( wr_addr ),
|
| 203 |
+
.wr_be ( wr_be ),
|
| 204 |
+
.wr_data ( wr_data ),
|
| 205 |
+
.wr_valid ( wr_valid && wr_bar[4] ),
|
| 206 |
+
.rd_req_ctx ( rd_req_ctx ),
|
| 207 |
+
.rd_req_addr ( rd_req_addr ),
|
| 208 |
+
.rd_req_valid ( rd_req_valid && rd_req_bar[4] ),
|
| 209 |
+
.rd_rsp_ctx ( bar_rsp_ctx[4] ),
|
| 210 |
+
.rd_rsp_data ( bar_rsp_data[4] ),
|
| 211 |
+
.rd_rsp_valid ( bar_rsp_valid[4] )
|
| 212 |
+
);
|
| 213 |
+
|
| 214 |
+
pcileech_bar_impl_none i_bar5(
|
| 215 |
+
.rst ( rst ),
|
| 216 |
+
.clk ( clk ),
|
| 217 |
+
.wr_addr ( wr_addr ),
|
| 218 |
+
.wr_be ( wr_be ),
|
| 219 |
+
.wr_data ( wr_data ),
|
| 220 |
+
.wr_valid ( wr_valid && wr_bar[5] ),
|
| 221 |
+
.rd_req_ctx ( rd_req_ctx ),
|
| 222 |
+
.rd_req_addr ( rd_req_addr ),
|
| 223 |
+
.rd_req_valid ( rd_req_valid && rd_req_bar[5] ),
|
| 224 |
+
.rd_rsp_ctx ( bar_rsp_ctx[5] ),
|
| 225 |
+
.rd_rsp_data ( bar_rsp_data[5] ),
|
| 226 |
+
.rd_rsp_valid ( bar_rsp_valid[5] )
|
| 227 |
+
);
|
| 228 |
+
|
| 229 |
+
pcileech_bar_impl_none i_bar6_optrom(
|
| 230 |
+
.rst ( rst ),
|
| 231 |
+
.clk ( clk ),
|
| 232 |
+
.wr_addr ( wr_addr ),
|
| 233 |
+
.wr_be ( wr_be ),
|
| 234 |
+
.wr_data ( wr_data ),
|
| 235 |
+
.wr_valid ( wr_valid && wr_bar[6] ),
|
| 236 |
+
.rd_req_ctx ( rd_req_ctx ),
|
| 237 |
+
.rd_req_addr ( rd_req_addr ),
|
| 238 |
+
.rd_req_valid ( rd_req_valid && rd_req_bar[6] ),
|
| 239 |
+
.rd_rsp_ctx ( bar_rsp_ctx[6] ),
|
| 240 |
+
.rd_rsp_data ( bar_rsp_data[6] ),
|
| 241 |
+
.rd_rsp_valid ( bar_rsp_valid[6] )
|
| 242 |
+
);
|
| 243 |
+
|
| 244 |
+
|
| 245 |
+
endmodule
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
// ------------------------------------------------------------------------
|
| 250 |
+
// BAR WRITE ENGINE:
|
| 251 |
+
// Receives BAR WRITE TLPs and output BAR WRITE requests.
|
| 252 |
+
// Holds a 2048-byte buffer.
|
| 253 |
+
// Input flow rate is 16bytes/CLK (max).
|
| 254 |
+
// Output flow rate is 4bytes/CLK.
|
| 255 |
+
// If write engine overflows incoming TLP is completely discarded silently.
|
| 256 |
+
// ------------------------------------------------------------------------
|
| 257 |
+
module pcileech_tlps128_bar_wrengine(
|
| 258 |
+
input rst,
|
| 259 |
+
input clk,
|
| 260 |
+
// TLPs:
|
| 261 |
+
IfAXIS128.sink_lite tlps_in,
|
| 262 |
+
input tlps_in_valid,
|
| 263 |
+
output tlps_in_ready,
|
| 264 |
+
// outgoing BAR writes:
|
| 265 |
+
output bit [6:0] wr_bar,
|
| 266 |
+
output bit [31:0] wr_addr,
|
| 267 |
+
output bit [3:0] wr_be,
|
| 268 |
+
output bit [31:0] wr_data,
|
| 269 |
+
output bit wr_valid
|
| 270 |
+
);
|
| 271 |
+
|
| 272 |
+
wire f_rd_en;
|
| 273 |
+
wire [127:0] f_tdata;
|
| 274 |
+
wire [3:0] f_tkeepdw;
|
| 275 |
+
wire [8:0] f_tuser;
|
| 276 |
+
wire f_tvalid;
|
| 277 |
+
|
| 278 |
+
bit [127:0] tdata;
|
| 279 |
+
bit [3:0] tkeepdw;
|
| 280 |
+
bit tlast;
|
| 281 |
+
|
| 282 |
+
bit [3:0] be_first;
|
| 283 |
+
bit [3:0] be_last;
|
| 284 |
+
bit first_dw;
|
| 285 |
+
bit [31:0] addr;
|
| 286 |
+
|
| 287 |
+
fifo_141_141_clk1_bar_wr i_fifo_141_141_clk1_bar_wr(
|
| 288 |
+
.srst ( rst ),
|
| 289 |
+
.clk ( clk ),
|
| 290 |
+
.wr_en ( tlps_in_valid ),
|
| 291 |
+
.din ( {tlps_in.tuser[8:0], tlps_in.tkeepdw, tlps_in.tdata} ),
|
| 292 |
+
.full ( ),
|
| 293 |
+
.prog_empty ( tlps_in_ready ),
|
| 294 |
+
.rd_en ( f_rd_en ),
|
| 295 |
+
.dout ( {f_tuser, f_tkeepdw, f_tdata} ),
|
| 296 |
+
.empty ( ),
|
| 297 |
+
.valid ( f_tvalid )
|
| 298 |
+
);
|
| 299 |
+
|
| 300 |
+
// STATE MACHINE:
|
| 301 |
+
`define S_ENGINE_IDLE 3'h0
|
| 302 |
+
`define S_ENGINE_FIRST 3'h1
|
| 303 |
+
`define S_ENGINE_4DW_REQDATA 3'h2
|
| 304 |
+
`define S_ENGINE_TX0 3'h4
|
| 305 |
+
`define S_ENGINE_TX1 3'h5
|
| 306 |
+
`define S_ENGINE_TX2 3'h6
|
| 307 |
+
`define S_ENGINE_TX3 3'h7
|
| 308 |
+
(* KEEP = "TRUE" *) bit [3:0] state = `S_ENGINE_IDLE;
|
| 309 |
+
|
| 310 |
+
assign f_rd_en = (state == `S_ENGINE_IDLE) ||
|
| 311 |
+
(state == `S_ENGINE_4DW_REQDATA) ||
|
| 312 |
+
(state == `S_ENGINE_TX3) ||
|
| 313 |
+
((state == `S_ENGINE_TX2 && !tkeepdw[3])) ||
|
| 314 |
+
((state == `S_ENGINE_TX1 && !tkeepdw[2])) ||
|
| 315 |
+
((state == `S_ENGINE_TX0 && !f_tkeepdw[1]));
|
| 316 |
+
|
| 317 |
+
always @ ( posedge clk ) begin
|
| 318 |
+
wr_addr <= addr;
|
| 319 |
+
wr_valid <= ((state == `S_ENGINE_TX0) && f_tvalid) || (state == `S_ENGINE_TX1) || (state == `S_ENGINE_TX2) || (state == `S_ENGINE_TX3);
|
| 320 |
+
|
| 321 |
+
end
|
| 322 |
+
|
| 323 |
+
always @ ( posedge clk )
|
| 324 |
+
if ( rst ) begin
|
| 325 |
+
state <= `S_ENGINE_IDLE;
|
| 326 |
+
end
|
| 327 |
+
else case ( state )
|
| 328 |
+
`S_ENGINE_IDLE: begin
|
| 329 |
+
state <= `S_ENGINE_FIRST;
|
| 330 |
+
end
|
| 331 |
+
`S_ENGINE_FIRST: begin
|
| 332 |
+
if ( f_tvalid && f_tuser[0] ) begin
|
| 333 |
+
wr_bar <= f_tuser[8:2];
|
| 334 |
+
tdata <= f_tdata;
|
| 335 |
+
tkeepdw <= f_tkeepdw;
|
| 336 |
+
tlast <= f_tuser[1];
|
| 337 |
+
first_dw <= 1;
|
| 338 |
+
be_first <= f_tdata[35:32];
|
| 339 |
+
be_last <= f_tdata[39:36];
|
| 340 |
+
if ( f_tdata[31:29] == 8'b010 ) begin // 3 DW header, with data
|
| 341 |
+
addr <= { f_tdata[95:66], 2'b00 };
|
| 342 |
+
state <= `S_ENGINE_TX3;
|
| 343 |
+
end
|
| 344 |
+
else if ( f_tdata[31:29] == 8'b011 ) begin // 4 DW header, with data
|
| 345 |
+
addr <= { f_tdata[127:98], 2'b00 };
|
| 346 |
+
state <= `S_ENGINE_4DW_REQDATA;
|
| 347 |
+
end
|
| 348 |
+
end
|
| 349 |
+
else begin
|
| 350 |
+
state <= `S_ENGINE_IDLE;
|
| 351 |
+
end
|
| 352 |
+
end
|
| 353 |
+
`S_ENGINE_4DW_REQDATA: begin
|
| 354 |
+
state <= `S_ENGINE_TX0;
|
| 355 |
+
end
|
| 356 |
+
`S_ENGINE_TX0: begin
|
| 357 |
+
tdata <= f_tdata;
|
| 358 |
+
tkeepdw <= f_tkeepdw;
|
| 359 |
+
tlast <= f_tuser[1];
|
| 360 |
+
addr <= addr + 4;
|
| 361 |
+
wr_data <= { f_tdata[0+00+:8], f_tdata[0+08+:8], f_tdata[0+16+:8], f_tdata[0+24+:8] };
|
| 362 |
+
first_dw <= 0;
|
| 363 |
+
wr_be <= first_dw ? be_first : (f_tkeepdw[1] ? 4'hf : be_last);
|
| 364 |
+
state <= f_tvalid ? (f_tkeepdw[1] ? `S_ENGINE_TX1 : `S_ENGINE_FIRST) : `S_ENGINE_IDLE;
|
| 365 |
+
end
|
| 366 |
+
`S_ENGINE_TX1: begin
|
| 367 |
+
addr <= addr + 4;
|
| 368 |
+
wr_data <= { tdata[32+00+:8], tdata[32+08+:8], tdata[32+16+:8], tdata[32+24+:8] };
|
| 369 |
+
first_dw <= 0;
|
| 370 |
+
wr_be <= first_dw ? be_first : (tkeepdw[2] ? 4'hf : be_last);
|
| 371 |
+
state <= tkeepdw[2] ? `S_ENGINE_TX2 : `S_ENGINE_FIRST;
|
| 372 |
+
end
|
| 373 |
+
`S_ENGINE_TX2: begin
|
| 374 |
+
addr <= addr + 4;
|
| 375 |
+
wr_data <= { tdata[64+00+:8], tdata[64+08+:8], tdata[64+16+:8], tdata[64+24+:8] };
|
| 376 |
+
first_dw <= 0;
|
| 377 |
+
wr_be <= first_dw ? be_first : (tkeepdw[3] ? 4'hf : be_last);
|
| 378 |
+
state <= tkeepdw[3] ? `S_ENGINE_TX3 : `S_ENGINE_FIRST;
|
| 379 |
+
end
|
| 380 |
+
`S_ENGINE_TX3: begin
|
| 381 |
+
addr <= addr + 4;
|
| 382 |
+
wr_data <= { tdata[96+00+:8], tdata[96+08+:8], tdata[96+16+:8], tdata[96+24+:8] };
|
| 383 |
+
first_dw <= 0;
|
| 384 |
+
wr_be <= first_dw ? be_first : (!tlast ? 4'hf : be_last);
|
| 385 |
+
state <= !tlast ? `S_ENGINE_TX0 : `S_ENGINE_FIRST;
|
| 386 |
+
end
|
| 387 |
+
endcase
|
| 388 |
+
|
| 389 |
+
endmodule
|
| 390 |
+
|
| 391 |
+
|
| 392 |
+
|
| 393 |
+
// ------------------------------------------------------------------------
|
| 394 |
+
// BAR READ ENGINE:
|
| 395 |
+
// Receives BAR READ TLPs and output BAR READ requests.
|
| 396 |
+
// ------------------------------------------------------------------------
|
| 397 |
+
module pcileech_tlps128_bar_rdengine(
|
| 398 |
+
input rst,
|
| 399 |
+
input clk,
|
| 400 |
+
// TLPs:
|
| 401 |
+
input [15:0] pcie_id,
|
| 402 |
+
IfAXIS128.sink_lite tlps_in,
|
| 403 |
+
input tlps_in_valid,
|
| 404 |
+
IfAXIS128.source tlps_out,
|
| 405 |
+
// BAR reads:
|
| 406 |
+
output [87:0] rd_req_ctx,
|
| 407 |
+
output [6:0] rd_req_bar,
|
| 408 |
+
output [31:0] rd_req_addr,
|
| 409 |
+
output rd_req_valid,
|
| 410 |
+
input [87:0] rd_rsp_ctx,
|
| 411 |
+
input [31:0] rd_rsp_data,
|
| 412 |
+
input rd_rsp_valid
|
| 413 |
+
);
|
| 414 |
+
|
| 415 |
+
// ------------------------------------------------------------------------
|
| 416 |
+
// 1: PROCESS AND QUEUE INCOMING READ TLPs:
|
| 417 |
+
// ------------------------------------------------------------------------
|
| 418 |
+
wire [10:0] rd1_in_dwlen = (tlps_in.tdata[9:0] == 0) ? 11'd1024 : {1'b0, tlps_in.tdata[9:0]};
|
| 419 |
+
wire [6:0] rd1_in_bar = tlps_in.tuser[8:2];
|
| 420 |
+
wire [15:0] rd1_in_reqid = tlps_in.tdata[63:48];
|
| 421 |
+
wire [7:0] rd1_in_tag = tlps_in.tdata[47:40];
|
| 422 |
+
wire [31:0] rd1_in_addr = { ((tlps_in.tdata[31:29] == 3'b000) ? tlps_in.tdata[95:66] : tlps_in.tdata[127:98]), 2'b00 };
|
| 423 |
+
wire [73:0] rd1_in_data;
|
| 424 |
+
assign rd1_in_data[73:63] = rd1_in_dwlen;
|
| 425 |
+
assign rd1_in_data[62:56] = rd1_in_bar;
|
| 426 |
+
assign rd1_in_data[55:48] = rd1_in_tag;
|
| 427 |
+
assign rd1_in_data[47:32] = rd1_in_reqid;
|
| 428 |
+
assign rd1_in_data[31:0] = rd1_in_addr;
|
| 429 |
+
|
| 430 |
+
wire rd1_out_rden;
|
| 431 |
+
wire [73:0] rd1_out_data;
|
| 432 |
+
wire rd1_out_valid;
|
| 433 |
+
|
| 434 |
+
fifo_74_74_clk1_bar_rd1 i_fifo_74_74_clk1_bar_rd1(
|
| 435 |
+
.srst ( rst ),
|
| 436 |
+
.clk ( clk ),
|
| 437 |
+
.wr_en ( tlps_in_valid ),
|
| 438 |
+
.din ( rd1_in_data ),
|
| 439 |
+
.full ( ),
|
| 440 |
+
.rd_en ( rd1_out_rden ),
|
| 441 |
+
.dout ( rd1_out_data ),
|
| 442 |
+
.empty ( ),
|
| 443 |
+
.valid ( rd1_out_valid )
|
| 444 |
+
);
|
| 445 |
+
|
| 446 |
+
// ------------------------------------------------------------------------
|
| 447 |
+
// 2: PROCESS AND SPLIT READ TLPs INTO RESPONSE TLP READ REQUESTS AND QUEUE:
|
| 448 |
+
// (READ REQUESTS LARGER THAN 128-BYTES WILL BE SPLIT INTO MULTIPLE).
|
| 449 |
+
// ------------------------------------------------------------------------
|
| 450 |
+
|
| 451 |
+
wire [10:0] rd1_out_dwlen = rd1_out_data[73:63];
|
| 452 |
+
wire [4:0] rd1_out_dwlen5 = rd1_out_data[67:63];
|
| 453 |
+
wire [4:0] rd1_out_addr5 = rd1_out_data[6:2];
|
| 454 |
+
|
| 455 |
+
// 1st "instant" packet:
|
| 456 |
+
wire [4:0] rd2_pkt1_dwlen_pre = ((rd1_out_addr5 + rd1_out_dwlen5 > 6'h20) || ((rd1_out_addr5 != 0) && (rd1_out_dwlen5 == 0))) ? (6'h20 - rd1_out_addr5) : rd1_out_dwlen5;
|
| 457 |
+
wire [5:0] rd2_pkt1_dwlen = (rd2_pkt1_dwlen_pre == 0) ? 6'h20 : rd2_pkt1_dwlen_pre;
|
| 458 |
+
wire [10:0] rd2_pkt1_dwlen_next = rd1_out_dwlen - rd2_pkt1_dwlen;
|
| 459 |
+
wire rd2_pkt1_large = (rd1_out_dwlen > 32) || (rd1_out_dwlen != rd2_pkt1_dwlen);
|
| 460 |
+
wire rd2_pkt1_tiny = (rd1_out_dwlen == 1);
|
| 461 |
+
wire [11:0] rd2_pkt1_bc = rd1_out_dwlen << 2;
|
| 462 |
+
wire [85:0] rd2_pkt1;
|
| 463 |
+
assign rd2_pkt1[85:74] = rd2_pkt1_bc;
|
| 464 |
+
assign rd2_pkt1[73:63] = rd2_pkt1_dwlen;
|
| 465 |
+
assign rd2_pkt1[62:0] = rd1_out_data[62:0];
|
| 466 |
+
|
| 467 |
+
// Nth packet (if split should take place):
|
| 468 |
+
bit [10:0] rd2_total_dwlen;
|
| 469 |
+
wire [10:0] rd2_total_dwlen_next = rd2_total_dwlen - 11'h20;
|
| 470 |
+
|
| 471 |
+
bit [85:0] rd2_pkt2;
|
| 472 |
+
wire [10:0] rd2_pkt2_dwlen = rd2_pkt2[73:63];
|
| 473 |
+
wire rd2_pkt2_large = (rd2_total_dwlen > 11'h20);
|
| 474 |
+
|
| 475 |
+
wire rd2_out_rden;
|
| 476 |
+
|
| 477 |
+
// STATE MACHINE:
|
| 478 |
+
`define S2_ENGINE_REQDATA 1'h0
|
| 479 |
+
`define S2_ENGINE_PROCESSING 1'h1
|
| 480 |
+
(* KEEP = "TRUE" *) bit [0:0] state2 = `S2_ENGINE_REQDATA;
|
| 481 |
+
|
| 482 |
+
always @ ( posedge clk )
|
| 483 |
+
if ( rst ) begin
|
| 484 |
+
state2 <= `S2_ENGINE_REQDATA;
|
| 485 |
+
end
|
| 486 |
+
else case ( state2 )
|
| 487 |
+
`S2_ENGINE_REQDATA: begin
|
| 488 |
+
if ( rd1_out_valid && rd2_pkt1_large ) begin
|
| 489 |
+
rd2_total_dwlen <= rd2_pkt1_dwlen_next; // dwlen (total remaining)
|
| 490 |
+
rd2_pkt2[85:74] <= rd2_pkt1_dwlen_next << 2; // byte-count
|
| 491 |
+
rd2_pkt2[73:63] <= (rd2_pkt1_dwlen_next > 11'h20) ? 11'h20 : rd2_pkt1_dwlen_next; // dwlen next
|
| 492 |
+
rd2_pkt2[62:12] <= rd1_out_data[62:12]; // various data
|
| 493 |
+
rd2_pkt2[11:0] <= rd1_out_data[11:0] + (rd2_pkt1_dwlen << 2); // base address (within 4k page)
|
| 494 |
+
state2 <= `S2_ENGINE_PROCESSING;
|
| 495 |
+
end
|
| 496 |
+
end
|
| 497 |
+
`S2_ENGINE_PROCESSING: begin
|
| 498 |
+
if ( rd2_out_rden ) begin
|
| 499 |
+
rd2_total_dwlen <= rd2_total_dwlen_next; // dwlen (total remaining)
|
| 500 |
+
rd2_pkt2[85:74] <= rd2_total_dwlen_next << 2; // byte-count
|
| 501 |
+
rd2_pkt2[73:63] <= (rd2_total_dwlen_next > 11'h20) ? 11'h20 : rd2_total_dwlen_next; // dwlen next
|
| 502 |
+
rd2_pkt2[62:12] <= rd2_pkt2[62:12]; // various data
|
| 503 |
+
rd2_pkt2[11:0] <= rd2_pkt2[11:0] + (rd2_pkt2_dwlen << 2); // base address (within 4k page)
|
| 504 |
+
if ( !rd2_pkt2_large ) begin
|
| 505 |
+
state2 <= `S2_ENGINE_REQDATA;
|
| 506 |
+
end
|
| 507 |
+
end
|
| 508 |
+
end
|
| 509 |
+
endcase
|
| 510 |
+
|
| 511 |
+
assign rd1_out_rden = rd2_out_rden && (((state2 == `S2_ENGINE_REQDATA) && (!rd1_out_valid || rd2_pkt1_tiny)) || ((state2 == `S2_ENGINE_PROCESSING) && !rd2_pkt2_large));
|
| 512 |
+
|
| 513 |
+
wire [85:0] rd2_in_data = (state2 == `S2_ENGINE_REQDATA) ? rd2_pkt1 : rd2_pkt2;
|
| 514 |
+
wire rd2_in_valid = rd1_out_valid || ((state2 == `S2_ENGINE_PROCESSING) && rd2_out_rden);
|
| 515 |
+
|
| 516 |
+
bit [85:0] rd2_out_data;
|
| 517 |
+
bit rd2_out_valid;
|
| 518 |
+
always @ ( posedge clk ) begin
|
| 519 |
+
rd2_out_data <= rd2_in_valid ? rd2_in_data : rd2_out_data;
|
| 520 |
+
rd2_out_valid <= rd2_in_valid && !rst;
|
| 521 |
+
end
|
| 522 |
+
|
| 523 |
+
// ------------------------------------------------------------------------
|
| 524 |
+
// 3: PROCESS EACH READ REQUEST PACKAGE PER INDIVIDUAL 32-bit READ DWORDS:
|
| 525 |
+
// ------------------------------------------------------------------------
|
| 526 |
+
|
| 527 |
+
wire [4:0] rd2_out_dwlen = rd2_out_data[67:63];
|
| 528 |
+
wire rd2_out_last = (rd2_out_dwlen == 1);
|
| 529 |
+
wire [9:0] rd2_out_dwaddr = rd2_out_data[11:2];
|
| 530 |
+
|
| 531 |
+
wire rd3_enable;
|
| 532 |
+
|
| 533 |
+
bit rd3_process_valid;
|
| 534 |
+
bit rd3_process_first;
|
| 535 |
+
bit rd3_process_last;
|
| 536 |
+
bit [4:0] rd3_process_dwlen;
|
| 537 |
+
bit [9:0] rd3_process_dwaddr;
|
| 538 |
+
bit [85:0] rd3_process_data;
|
| 539 |
+
wire rd3_process_next_last = (rd3_process_dwlen == 2);
|
| 540 |
+
wire rd3_process_nextnext_last = (rd3_process_dwlen <= 3);
|
| 541 |
+
|
| 542 |
+
assign rd_req_ctx = { rd3_process_first, rd3_process_last, rd3_process_data };
|
| 543 |
+
assign rd_req_bar = rd3_process_data[62:56];
|
| 544 |
+
assign rd_req_addr = { rd3_process_data[31:12], rd3_process_dwaddr, 2'b00 };
|
| 545 |
+
assign rd_req_valid = rd3_process_valid;
|
| 546 |
+
|
| 547 |
+
// STATE MACHINE:
|
| 548 |
+
`define S3_ENGINE_REQDATA 1'h0
|
| 549 |
+
`define S3_ENGINE_PROCESSING 1'h1
|
| 550 |
+
(* KEEP = "TRUE" *) bit [0:0] state3 = `S3_ENGINE_REQDATA;
|
| 551 |
+
|
| 552 |
+
always @ ( posedge clk )
|
| 553 |
+
if ( rst ) begin
|
| 554 |
+
rd3_process_valid <= 1'b0;
|
| 555 |
+
state3 <= `S3_ENGINE_REQDATA;
|
| 556 |
+
end
|
| 557 |
+
else case ( state3 )
|
| 558 |
+
`S3_ENGINE_REQDATA: begin
|
| 559 |
+
if ( rd2_out_valid ) begin
|
| 560 |
+
rd3_process_valid <= 1'b1;
|
| 561 |
+
rd3_process_first <= 1'b1; // FIRST
|
| 562 |
+
rd3_process_last <= rd2_out_last; // LAST (low 5 bits of dwlen == 1, [max pktlen = 0x20))
|
| 563 |
+
rd3_process_dwlen <= rd2_out_dwlen; // PKT LENGTH IN DW
|
| 564 |
+
rd3_process_dwaddr <= rd2_out_dwaddr; // DWADDR OF THIS DWORD
|
| 565 |
+
rd3_process_data[85:0] <= rd2_out_data[85:0]; // FORWARD / SAVE DATA
|
| 566 |
+
if ( !rd2_out_last ) begin
|
| 567 |
+
state3 <= `S3_ENGINE_PROCESSING;
|
| 568 |
+
end
|
| 569 |
+
end
|
| 570 |
+
else begin
|
| 571 |
+
rd3_process_valid <= 1'b0;
|
| 572 |
+
end
|
| 573 |
+
end
|
| 574 |
+
`S3_ENGINE_PROCESSING: begin
|
| 575 |
+
rd3_process_first <= 1'b0; // FIRST
|
| 576 |
+
rd3_process_last <= rd3_process_next_last; // LAST
|
| 577 |
+
rd3_process_dwlen <= rd3_process_dwlen - 1; // LEN DEC
|
| 578 |
+
rd3_process_dwaddr <= rd3_process_dwaddr + 1; // ADDR INC
|
| 579 |
+
if ( rd3_process_next_last ) begin
|
| 580 |
+
state3 <= `S3_ENGINE_REQDATA;
|
| 581 |
+
end
|
| 582 |
+
end
|
| 583 |
+
endcase
|
| 584 |
+
|
| 585 |
+
assign rd2_out_rden = rd3_enable && (
|
| 586 |
+
((state3 == `S3_ENGINE_REQDATA) && (!rd2_out_valid || rd2_out_last)) ||
|
| 587 |
+
((state3 == `S3_ENGINE_PROCESSING) && rd3_process_nextnext_last));
|
| 588 |
+
|
| 589 |
+
// ------------------------------------------------------------------------
|
| 590 |
+
// 4: PROCESS RESPONSES:
|
| 591 |
+
// ------------------------------------------------------------------------
|
| 592 |
+
|
| 593 |
+
wire rd_rsp_first = rd_rsp_ctx[87];
|
| 594 |
+
wire rd_rsp_last = rd_rsp_ctx[86];
|
| 595 |
+
|
| 596 |
+
wire [9:0] rd_rsp_dwlen = rd_rsp_ctx[72:63];
|
| 597 |
+
wire [11:0] rd_rsp_bc = rd_rsp_ctx[85:74];
|
| 598 |
+
wire [15:0] rd_rsp_reqid = rd_rsp_ctx[47:32];
|
| 599 |
+
wire [7:0] rd_rsp_tag = rd_rsp_ctx[55:48];
|
| 600 |
+
wire [6:0] rd_rsp_lowaddr = rd_rsp_ctx[6:0];
|
| 601 |
+
wire [31:0] rd_rsp_addr = rd_rsp_ctx[31:0];
|
| 602 |
+
wire [31:0] rd_rsp_data_bs = { rd_rsp_data[7:0], rd_rsp_data[15:8], rd_rsp_data[23:16], rd_rsp_data[31:24] };
|
| 603 |
+
|
| 604 |
+
// 1: 32-bit -> 128-bit state machine:
|
| 605 |
+
bit [127:0] tdata;
|
| 606 |
+
bit [3:0] tkeepdw = 0;
|
| 607 |
+
bit tlast;
|
| 608 |
+
bit first = 1;
|
| 609 |
+
wire tvalid = tlast || tkeepdw[3];
|
| 610 |
+
|
| 611 |
+
always @ ( posedge clk )
|
| 612 |
+
if ( rst ) begin
|
| 613 |
+
tkeepdw <= 0;
|
| 614 |
+
tlast <= 0;
|
| 615 |
+
first <= 0;
|
| 616 |
+
end
|
| 617 |
+
else if ( rd_rsp_valid && rd_rsp_first ) begin
|
| 618 |
+
tkeepdw <= 4'b1111;
|
| 619 |
+
tlast <= rd_rsp_last;
|
| 620 |
+
first <= 1'b1;
|
| 621 |
+
tdata[31:0] <= { 22'b0100101000000000000000, rd_rsp_dwlen }; // format, type, length
|
| 622 |
+
tdata[63:32] <= { pcie_id[7:0], pcie_id[15:8], 4'b0, rd_rsp_bc }; // pcie_id, byte_count
|
| 623 |
+
tdata[95:64] <= { rd_rsp_reqid, rd_rsp_tag, 1'b0, rd_rsp_lowaddr }; // req_id, tag, lower_addr
|
| 624 |
+
tdata[127:96] <= rd_rsp_data_bs;
|
| 625 |
+
end
|
| 626 |
+
else begin
|
| 627 |
+
tlast <= rd_rsp_valid && rd_rsp_last;
|
| 628 |
+
tkeepdw <= tvalid ? (rd_rsp_valid ? 4'b0001 : 4'b0000) : (rd_rsp_valid ? ((tkeepdw << 1) | 1'b1) : tkeepdw);
|
| 629 |
+
first <= 0;
|
| 630 |
+
if ( rd_rsp_valid ) begin
|
| 631 |
+
if ( tvalid || !tkeepdw[0] )
|
| 632 |
+
tdata[31:0] <= rd_rsp_data_bs;
|
| 633 |
+
if ( !tkeepdw[1] )
|
| 634 |
+
tdata[63:32] <= rd_rsp_data_bs;
|
| 635 |
+
if ( !tkeepdw[2] )
|
| 636 |
+
tdata[95:64] <= rd_rsp_data_bs;
|
| 637 |
+
if ( !tkeepdw[3] )
|
| 638 |
+
tdata[127:96] <= rd_rsp_data_bs;
|
| 639 |
+
end
|
| 640 |
+
end
|
| 641 |
+
|
| 642 |
+
// 2.1 - submit to output fifo - will feed into mux/pcie core.
|
| 643 |
+
fifo_134_134_clk1_bar_rdrsp i_fifo_134_134_clk1_bar_rdrsp(
|
| 644 |
+
.srst ( rst ),
|
| 645 |
+
.clk ( clk ),
|
| 646 |
+
.din ( { first, tlast, tkeepdw, tdata } ),
|
| 647 |
+
.wr_en ( tvalid ),
|
| 648 |
+
.rd_en ( tlps_out.tready ),
|
| 649 |
+
.dout ( { tlps_out.tuser[0], tlps_out.tlast, tlps_out.tkeepdw, tlps_out.tdata } ),
|
| 650 |
+
.full ( ),
|
| 651 |
+
.empty ( ),
|
| 652 |
+
.prog_empty ( rd3_enable ),
|
| 653 |
+
.valid ( tlps_out.tvalid )
|
| 654 |
+
);
|
| 655 |
+
|
| 656 |
+
assign tlps_out.tuser[1] = tlps_out.tlast;
|
| 657 |
+
assign tlps_out.tuser[8:2] = 0;
|
| 658 |
+
|
| 659 |
+
// 2.2 - packet count:
|
| 660 |
+
bit [10:0] pkt_count = 0;
|
| 661 |
+
wire pkt_count_dec = tlps_out.tvalid && tlps_out.tlast;
|
| 662 |
+
wire pkt_count_inc = tvalid && tlast;
|
| 663 |
+
wire [10:0] pkt_count_next = pkt_count + pkt_count_inc - pkt_count_dec;
|
| 664 |
+
assign tlps_out.has_data = (pkt_count_next > 0);
|
| 665 |
+
|
| 666 |
+
always @ ( posedge clk ) begin
|
| 667 |
+
pkt_count <= rst ? 0 : pkt_count_next;
|
| 668 |
+
end
|
| 669 |
+
|
| 670 |
+
endmodule
|
| 671 |
+
|
| 672 |
+
|
| 673 |
+
|
| 674 |
+
// ------------------------------------------------------------------------
|
| 675 |
+
// Example BAR implementation that does nothing but drop any read/writes
|
| 676 |
+
// silently without generating a response.
|
| 677 |
+
// This is only recommended for placeholder designs.
|
| 678 |
+
// Latency = N/A.
|
| 679 |
+
// ------------------------------------------------------------------------
|
| 680 |
+
module pcileech_bar_impl_none(
|
| 681 |
+
input rst,
|
| 682 |
+
input clk,
|
| 683 |
+
// incoming BAR writes:
|
| 684 |
+
input [31:0] wr_addr,
|
| 685 |
+
input [3:0] wr_be,
|
| 686 |
+
input [31:0] wr_data,
|
| 687 |
+
input wr_valid,
|
| 688 |
+
// incoming BAR reads:
|
| 689 |
+
input [87:0] rd_req_ctx,
|
| 690 |
+
input [31:0] rd_req_addr,
|
| 691 |
+
input rd_req_valid,
|
| 692 |
+
// outgoing BAR read replies:
|
| 693 |
+
output bit [87:0] rd_rsp_ctx,
|
| 694 |
+
output bit [31:0] rd_rsp_data,
|
| 695 |
+
output bit rd_rsp_valid
|
| 696 |
+
);
|
| 697 |
+
|
| 698 |
+
initial rd_rsp_ctx = 0;
|
| 699 |
+
initial rd_rsp_data = 0;
|
| 700 |
+
initial rd_rsp_valid = 0;
|
| 701 |
+
|
| 702 |
+
endmodule
|
| 703 |
+
|
| 704 |
+
|
| 705 |
+
|
| 706 |
+
// ------------------------------------------------------------------------
|
| 707 |
+
// Example BAR implementation of "address loopback" which can be useful
|
| 708 |
+
// for testing. Any read to a specific BAR address will result in the
|
| 709 |
+
// address as response.
|
| 710 |
+
// Latency = 2CLKs.
|
| 711 |
+
// ------------------------------------------------------------------------
|
| 712 |
+
module pcileech_bar_impl_loopaddr(
|
| 713 |
+
input rst,
|
| 714 |
+
input clk,
|
| 715 |
+
// incoming BAR writes:
|
| 716 |
+
input [31:0] wr_addr,
|
| 717 |
+
input [3:0] wr_be,
|
| 718 |
+
input [31:0] wr_data,
|
| 719 |
+
input wr_valid,
|
| 720 |
+
// incoming BAR reads:
|
| 721 |
+
input [87:0] rd_req_ctx,
|
| 722 |
+
input [31:0] rd_req_addr,
|
| 723 |
+
input rd_req_valid,
|
| 724 |
+
// outgoing BAR read replies:
|
| 725 |
+
output bit [87:0] rd_rsp_ctx,
|
| 726 |
+
output bit [31:0] rd_rsp_data,
|
| 727 |
+
output bit rd_rsp_valid
|
| 728 |
+
);
|
| 729 |
+
|
| 730 |
+
bit [87:0] rd_req_ctx_1;
|
| 731 |
+
bit [31:0] rd_req_addr_1;
|
| 732 |
+
bit rd_req_valid_1;
|
| 733 |
+
|
| 734 |
+
always @ ( posedge clk ) begin
|
| 735 |
+
rd_req_ctx_1 <= rd_req_ctx;
|
| 736 |
+
rd_req_addr_1 <= rd_req_addr;
|
| 737 |
+
rd_req_valid_1 <= rd_req_valid;
|
| 738 |
+
rd_rsp_ctx <= rd_req_ctx_1;
|
| 739 |
+
rd_rsp_data <= rd_req_addr_1;
|
| 740 |
+
rd_rsp_valid <= rd_req_valid_1;
|
| 741 |
+
end
|
| 742 |
+
|
| 743 |
+
endmodule
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
|
| 747 |
+
// ------------------------------------------------------------------------
|
| 748 |
+
// Example BAR implementation of a 4kB writable initial-zero BAR.
|
| 749 |
+
// Latency = 2CLKs.
|
| 750 |
+
// ------------------------------------------------------------------------
|
| 751 |
+
module pcileech_bar_impl_zerowrite4k(
|
| 752 |
+
input rst,
|
| 753 |
+
input clk,
|
| 754 |
+
// incoming BAR writes:
|
| 755 |
+
input [31:0] wr_addr,
|
| 756 |
+
input [3:0] wr_be,
|
| 757 |
+
input [31:0] wr_data,
|
| 758 |
+
input wr_valid,
|
| 759 |
+
// incoming BAR reads:
|
| 760 |
+
input [87:0] rd_req_ctx,
|
| 761 |
+
input [31:0] rd_req_addr,
|
| 762 |
+
input rd_req_valid,
|
| 763 |
+
// outgoing BAR read replies:
|
| 764 |
+
output bit [87:0] rd_rsp_ctx,
|
| 765 |
+
output bit [31:0] rd_rsp_data,
|
| 766 |
+
output bit rd_rsp_valid
|
| 767 |
+
);
|
| 768 |
+
|
| 769 |
+
bit [87:0] drd_req_ctx;
|
| 770 |
+
bit drd_req_valid;
|
| 771 |
+
wire [31:0] doutb;
|
| 772 |
+
|
| 773 |
+
always @ ( posedge clk ) begin
|
| 774 |
+
drd_req_ctx <= rd_req_ctx;
|
| 775 |
+
drd_req_valid <= rd_req_valid;
|
| 776 |
+
rd_rsp_ctx <= drd_req_ctx;
|
| 777 |
+
rd_rsp_valid <= drd_req_valid;
|
| 778 |
+
rd_rsp_data <= doutb;
|
| 779 |
+
end
|
| 780 |
+
|
| 781 |
+
bram_bar_zero4k i_bram_bar_zero4k(
|
| 782 |
+
// Port A - write:
|
| 783 |
+
.addra ( wr_addr[11:2] ),
|
| 784 |
+
.clka ( clk ),
|
| 785 |
+
.dina ( wr_data ),
|
| 786 |
+
.ena ( wr_valid ),
|
| 787 |
+
.wea ( wr_be ),
|
| 788 |
+
// Port A - read (2 CLK latency):
|
| 789 |
+
.addrb ( rd_req_addr[11:2] ),
|
| 790 |
+
.clkb ( clk ),
|
| 791 |
+
.doutb ( doutb ),
|
| 792 |
+
.enb ( rd_req_valid )
|
| 793 |
+
);
|
| 794 |
+
|
| 795 |
+
endmodule
|
| 796 |
+
|
| 797 |
+
|
| 798 |
+
|
| 799 |
+
// ------------------------------------------------------------------------
|
| 800 |
+
// pcileech wifi BAR implementation
|
| 801 |
+
// Works with Qualcomm Atheros AR9287 chip wifi adapters
|
| 802 |
+
// ------------------------------------------------------------------------
|
| 803 |
+
module pcileech_bar_impl_ar9287_wifi(
|
| 804 |
+
input rst,
|
| 805 |
+
input clk,
|
| 806 |
+
// incoming BAR writes:
|
| 807 |
+
input [31:0] wr_addr,
|
| 808 |
+
input [3:0] wr_be,
|
| 809 |
+
input [31:0] wr_data,
|
| 810 |
+
input wr_valid,
|
| 811 |
+
// incoming BAR reads:
|
| 812 |
+
input [87:0] rd_req_ctx,
|
| 813 |
+
input [31:0] rd_req_addr,
|
| 814 |
+
input rd_req_valid,
|
| 815 |
+
input [31:0] base_address_register,
|
| 816 |
+
// outgoing BAR read replies:
|
| 817 |
+
output bit [87:0] rd_rsp_ctx,
|
| 818 |
+
output bit [31:0] rd_rsp_data,
|
| 819 |
+
output bit rd_rsp_valid
|
| 820 |
+
);
|
| 821 |
+
|
| 822 |
+
bit [87:0] drd_req_ctx;
|
| 823 |
+
bit [31:0] drd_req_addr;
|
| 824 |
+
bit drd_req_valid;
|
| 825 |
+
|
| 826 |
+
bit [31:0] dwr_addr;
|
| 827 |
+
bit [31:0] dwr_data;
|
| 828 |
+
bit dwr_valid;
|
| 829 |
+
|
| 830 |
+
bit [31:0] data_32;
|
| 831 |
+
|
| 832 |
+
time number = 0;
|
| 833 |
+
|
| 834 |
+
always @ ( posedge clk ) begin
|
| 835 |
+
if (rst)
|
| 836 |
+
number <= 0;
|
| 837 |
+
|
| 838 |
+
number <= number + 1;
|
| 839 |
+
drd_req_ctx <= rd_req_ctx;
|
| 840 |
+
drd_req_valid <= rd_req_valid;
|
| 841 |
+
dwr_valid <= wr_valid;
|
| 842 |
+
drd_req_addr <= rd_req_addr;
|
| 843 |
+
rd_rsp_ctx <= drd_req_ctx;
|
| 844 |
+
rd_rsp_valid <= drd_req_valid;
|
| 845 |
+
dwr_addr <= wr_addr;
|
| 846 |
+
dwr_data <= wr_data;
|
| 847 |
+
|
| 848 |
+
if (drd_req_valid)
|
| 849 |
+
case ({drd_req_addr[31:24], drd_req_addr[23:16], drd_req_addr[15:08], drd_req_addr[07:00]} - base_address_register)
|
| 850 |
+
16'h2000 : begin data_32 <= 1; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM MGIC REQ
|
| 851 |
+
16'h2200 : begin data_32 <= 2; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM SIZE REQ
|
| 852 |
+
16'h2204 : begin data_32 <= 3; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM CSUM REQ
|
| 853 |
+
16'h2208 : begin data_32 <= 4; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM VERS REQ
|
| 854 |
+
16'h220C : begin data_32 <= 5; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM ANTN REQ
|
| 855 |
+
16'h2210 : begin data_32 <= 6; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM RDMN REQ
|
| 856 |
+
16'h2218 : begin data_32 <= 7; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM MAC0 REQ
|
| 857 |
+
16'h221C : begin data_32 <= 8; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM MAC1 REQ
|
| 858 |
+
16'h2220 : begin data_32 <= 9; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM MAC2 REQ
|
| 859 |
+
16'h2224 : begin data_32 <= 10; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM RXTX REQ
|
| 860 |
+
16'h2228 : begin data_32 <= 11; rd_rsp_data <= 32'hDEADBEEF; end // EEPROM ENDZ REQ
|
| 861 |
+
16'h4020 : rd_rsp_data <= 32'h001800FF; // MAC VERSION
|
| 862 |
+
16'h4028 : rd_rsp_data <= 32'h00000060; // interrupt pending
|
| 863 |
+
16'h4038 : rd_rsp_data <= 32'h00000002; // interrupt pending
|
| 864 |
+
16'h407C :
|
| 865 |
+
case (data_32)
|
| 866 |
+
1 : rd_rsp_data <= 32'h0000A55A; // EEPROM_MAGIC
|
| 867 |
+
2 : rd_rsp_data <= 32'h00000004; // EEPROM_SIZE
|
| 868 |
+
3 : rd_rsp_data <= 32'h0000FFFB; // EEPROM_CHECKSUM
|
| 869 |
+
4 : rd_rsp_data <= 32'h0000E00E; // EEPROM_VERSION
|
| 870 |
+
5 : rd_rsp_data <= 32'h0000E00E; // EEPROM_ANTENNA (2.4ghz, 5ghz)
|
| 871 |
+
6 : rd_rsp_data <= 32'h00000000; // EEPROM_REGDOMAIN (location)
|
| 872 |
+
7 : rd_rsp_data <= 32'h00006EC4; // EEPROM_MAC0 (C4:6E)
|
| 873 |
+
8 :
|
| 874 |
+
begin
|
| 875 |
+
rd_rsp_data[7:0] <= 8'h1F;
|
| 876 |
+
rd_rsp_data[15:8] <= ((0 + (number) % (15 + 1 - 0)) << 4) | (0 + (number + 3) % (15 + 1 - 0));
|
| 877 |
+
rd_rsp_data[31:16] <= 16'h0000;
|
| 878 |
+
end
|
| 879 |
+
9 :
|
| 880 |
+
begin
|
| 881 |
+
rd_rsp_data[7:0] <= ((0 + (number + 6) % (15 + 1 - 0)) << 4) | (0 + (number + 9) % (15 + 1 - 0));
|
| 882 |
+
rd_rsp_data[15:8] <= ((0 + (number + 12) % (15 + 1 - 0)) << 4) | (0 + (number + 15) % (15 + 1 - 0));
|
| 883 |
+
rd_rsp_data[31:16] <= 16'h0000;
|
| 884 |
+
end
|
| 885 |
+
10 : rd_rsp_data <= 32'h00000100; // EEPROM_RXTX (00,01)
|
| 886 |
+
11 : begin rd_rsp_data <= 32'h00000000; data_32 <= 0; end
|
| 887 |
+
default : rd_rsp_data <= 32'h00000000;
|
| 888 |
+
endcase
|
| 889 |
+
16'h7000 : rd_rsp_data <= 32'h00000000; // AR_RTC_RC
|
| 890 |
+
16'h7044 : rd_rsp_data <= 32'h00000002; // AR_RTC_STATUS
|
| 891 |
+
16'h8000 : rd_rsp_data <= data_32; // AR_STA_ID0
|
| 892 |
+
16'h806C : rd_rsp_data <= 32'h00000000; // AR_OBS_BUS_1
|
| 893 |
+
16'h9820 : rd_rsp_data <= data_32; // AR_STA_ID0
|
| 894 |
+
16'h9860 : rd_rsp_data <= 32'h00000000; // ath_hal_wait
|
| 895 |
+
16'h9C00 : rd_rsp_data <= 32'h00000000; // rf claim
|
| 896 |
+
default : rd_rsp_data <= 32'hDEADBEEF; // default value: 0xDEADBEEF
|
| 897 |
+
endcase
|
| 898 |
+
else if (dwr_valid)
|
| 899 |
+
case ({dwr_addr[31:24], dwr_addr[23:16], dwr_addr[15:08], dwr_addr[07:00]} - base_address_register)
|
| 900 |
+
16'h8000 : data_32 <= dwr_data;
|
| 901 |
+
16'h9820 : data_32 <= dwr_data;
|
| 902 |
+
endcase
|
| 903 |
+
else
|
| 904 |
+
rd_rsp_data <= 32'hDEADBEEF;
|
| 905 |
+
end
|
| 906 |
+
|
| 907 |
+
endmodule
|
| 908 |
+
|
JOKOSAHS_DMA-Pcileech/src/pcileech_tlps128_cfgspace_shadow.sv
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// PCILeech FPGA.
|
| 3 |
+
//
|
| 4 |
+
// PCIe custom shadow configuration space.
|
| 5 |
+
// Xilinx PCIe core will take configuration space priority; if Xilinx PCIe core
|
| 6 |
+
// is configured to forward configuration requests to user application such TLP
|
| 7 |
+
// will end up being processed by this module.
|
| 8 |
+
//
|
| 9 |
+
// (c) Ulf Frisk, 2021-2024
|
| 10 |
+
// Author: Ulf Frisk, pcileech@frizk.net
|
| 11 |
+
//
|
| 12 |
+
|
| 13 |
+
`timescale 1ns / 1ps
|
| 14 |
+
|
| 15 |
+
module pcileech_tlps128_cfgspace_shadow(
|
| 16 |
+
input rst,
|
| 17 |
+
input clk_pcie,
|
| 18 |
+
input clk_sys,
|
| 19 |
+
IfAXIS128.sink_lite tlps_in,
|
| 20 |
+
input [15:0] pcie_id,
|
| 21 |
+
IfAXIS128.source tlps_cfg_rsp,
|
| 22 |
+
IfShadow2Fifo.shadow dshadow2fifo
|
| 23 |
+
);
|
| 24 |
+
// ----------------------------------------------------------------------------
|
| 25 |
+
// PCIe RECEIVE:
|
| 26 |
+
// ----------------------------------------------------------------------------
|
| 27 |
+
wire pcie_rx_rden = tlps_in.tvalid && tlps_in.tuser[0] && (tlps_in.tdata[31:25] == 7'b0000010); // CfgRd: Fmt[2:0]=000b (3 DW header, no data), CfgRd0/CfgRd1=0010xb
|
| 28 |
+
wire pcie_rx_wren = tlps_in.tvalid && tlps_in.tuser[0] && (tlps_in.tdata[31:25] == 7'b0100010); // CfgWr: Fmt[2:0]=010b (3 DW header, data), CfgWr0/CfgWr1=0010xb
|
| 29 |
+
wire [9:0] pcie_rx_addr = tlps_in.tdata[75:66];
|
| 30 |
+
wire [31:0] pcie_rx_data = tlps_in.tdata[127:96];
|
| 31 |
+
wire [7:0] pcie_rx_tag = tlps_in.tdata[47:40];
|
| 32 |
+
wire [3:0] pcie_rx_be = {tlps_in.tdata[32], tlps_in.tdata[33], tlps_in.tdata[34], tlps_in.tdata[35]};
|
| 33 |
+
wire [15:0] pcie_rx_reqid = tlps_in.tdata[63:48];
|
| 34 |
+
|
| 35 |
+
// ----------------------------------------------------------------------------
|
| 36 |
+
// USB RECEIVE (clock domain crossing):
|
| 37 |
+
// ----------------------------------------------------------------------------
|
| 38 |
+
wire usb_rx_rden_out;
|
| 39 |
+
wire usb_rx_wren_out;
|
| 40 |
+
wire usb_rx_valid;
|
| 41 |
+
wire usb_rx_rden = usb_rx_valid && usb_rx_rden_out;
|
| 42 |
+
wire usb_rx_wren = usb_rx_valid && usb_rx_wren_out;
|
| 43 |
+
wire [3:0] usb_rx_be;
|
| 44 |
+
wire [31:0] usb_rx_data;
|
| 45 |
+
wire [9:0] usb_rx_addr;
|
| 46 |
+
wire usb_rx_addr_lo;
|
| 47 |
+
fifo_49_49_clk2 i_fifo_49_49_clk2(
|
| 48 |
+
.rst ( rst ),
|
| 49 |
+
.wr_clk ( clk_sys ),
|
| 50 |
+
.rd_clk ( clk_pcie ),
|
| 51 |
+
.wr_en ( dshadow2fifo.rx_rden || dshadow2fifo.rx_wren ),
|
| 52 |
+
.din ( {dshadow2fifo.rx_rden, dshadow2fifo.rx_wren, dshadow2fifo.rx_addr_lo, dshadow2fifo.rx_addr, dshadow2fifo.rx_be, dshadow2fifo.rx_data} ),
|
| 53 |
+
.full ( ),
|
| 54 |
+
.rd_en ( 1'b1 ),
|
| 55 |
+
.dout ( {usb_rx_rden_out, usb_rx_wren_out, usb_rx_addr_lo, usb_rx_addr, usb_rx_be, usb_rx_data} ),
|
| 56 |
+
.empty ( ),
|
| 57 |
+
.valid ( usb_rx_valid )
|
| 58 |
+
);
|
| 59 |
+
|
| 60 |
+
// ----------------------------------------------------------------------------
|
| 61 |
+
// WRITE multiplexor: simple naive multiplexor which will prioritize in order:
|
| 62 |
+
// (1) PCIe (if enabled), (2) USB, (3) INTERNAL.
|
| 63 |
+
// Collisions will be discarded (it's assumed that they'll be very rare)
|
| 64 |
+
// ----------------------------------------------------------------------------
|
| 65 |
+
wire bram_wr_1_tlp = pcie_rx_wren & dshadow2fifo.cfgtlp_en;
|
| 66 |
+
wire bram_wr_2_usb = ~bram_wr_1_tlp & usb_rx_wren;
|
| 67 |
+
wire [3:0] bram_wr_be = bram_wr_1_tlp ? (dshadow2fifo.cfgtlp_wren ? pcie_rx_be : 4'b0000) : (bram_wr_2_usb ? usb_rx_be : 4'b0000);
|
| 68 |
+
wire [31:0] bram_wr_data = bram_wr_1_tlp ? pcie_rx_data : (bram_wr_2_usb ? usb_rx_data : 32'h00000000);
|
| 69 |
+
|
| 70 |
+
// ----------------------------------------------------------------------------
|
| 71 |
+
// WRITE multiplexor and state machine: simple naive multiplexor which will prioritize in order:
|
| 72 |
+
// (1) PCIe (if enabled), (2) USB, (3) INTERNAL.
|
| 73 |
+
// Collisions will be discarded (it's assumed that they'll be very rare)
|
| 74 |
+
// ----------------------------------------------------------------------------
|
| 75 |
+
`define S_SHADOW_CFGSPACE_IDLE 2'b00
|
| 76 |
+
`define S_SHADOW_CFGSPACE_TLP 2'b01
|
| 77 |
+
`define S_SHADOW_CFGSPACE_USB 2'b10
|
| 78 |
+
|
| 79 |
+
wire [15:0] bram_rd_reqid;
|
| 80 |
+
wire [1:0] bram_rd_tp;
|
| 81 |
+
wire [7:0] bram_rd_tag;
|
| 82 |
+
wire [9:0] bram_rd_addr;
|
| 83 |
+
wire [31:0] bram_rd_data;
|
| 84 |
+
wire [31:0] bram_rd_data_z = dshadow2fifo.cfgtlp_zero ? 32'h00000000 : bram_rd_data;
|
| 85 |
+
wire bram_rd_valid = (bram_rd_tp == `S_SHADOW_CFGSPACE_TLP);
|
| 86 |
+
wire bram_rd_tlpwr;
|
| 87 |
+
|
| 88 |
+
wire bram_rd_1_tlp = pcie_rx_rden & dshadow2fifo.cfgtlp_en;
|
| 89 |
+
wire bram_tlp = bram_rd_1_tlp | bram_wr_1_tlp;
|
| 90 |
+
wire bram_rd_2_usb = ~bram_tlp & usb_rx_rden;
|
| 91 |
+
wire [1:0] bram_rdreq_tp = bram_tlp ? `S_SHADOW_CFGSPACE_TLP : (bram_rd_2_usb ? `S_SHADOW_CFGSPACE_USB : `S_SHADOW_CFGSPACE_IDLE);
|
| 92 |
+
wire [9:0] bram_rdreq_addr = bram_tlp ? pcie_rx_addr : usb_rx_addr;
|
| 93 |
+
wire [7:0] bram_rdreq_tag = bram_tlp ? pcie_rx_tag : {7'h00, usb_rx_addr_lo};
|
| 94 |
+
wire [15:0] bram_rdreq_reqid= bram_tlp ? pcie_rx_reqid : 16'h0000;
|
| 95 |
+
|
| 96 |
+
// BRAM MEMORY ACCESS for the 4kB / 0x1000 byte shadow configuration space.
|
| 97 |
+
pcileech_mem_wrap i_pcileech_mem_wrap(
|
| 98 |
+
.clk_pcie ( clk_pcie ), // <-
|
| 99 |
+
.rdwr_addr ( bram_rdreq_addr ), // <-
|
| 100 |
+
.wr_be ( bram_wr_be ), // <-
|
| 101 |
+
.wr_data ( bram_wr_data ), // <-
|
| 102 |
+
.rdreq_tag ( bram_rdreq_tag ), // <-
|
| 103 |
+
.rdreq_tp ( bram_rdreq_tp ), // <-
|
| 104 |
+
.rdreq_reqid ( bram_rdreq_reqid ), // <-
|
| 105 |
+
.rdreq_tlpwr ( bram_wr_1_tlp ), // <-
|
| 106 |
+
.rd_data ( bram_rd_data ), // ->
|
| 107 |
+
.rd_addr ( bram_rd_addr ), // ->
|
| 108 |
+
.rd_tag ( bram_rd_tag ), // ->
|
| 109 |
+
.rd_tp ( bram_rd_tp ), // ->
|
| 110 |
+
.rd_reqid ( bram_rd_reqid ), // ->
|
| 111 |
+
.rd_tlpwr ( bram_rd_tlpwr ) // ->
|
| 112 |
+
);
|
| 113 |
+
|
| 114 |
+
// PCIe REPLY:
|
| 115 |
+
pcileech_cfgspace_pcie_tx i_pcileech_cfgspace_pcie_tx(
|
| 116 |
+
.rst ( rst ), // <-
|
| 117 |
+
.clk_pcie ( clk_pcie ), // <-
|
| 118 |
+
.pcie_id ( pcie_id ), // <- [15:0]
|
| 119 |
+
.tlps_cfg_rsp ( tlps_cfg_rsp ),
|
| 120 |
+
// cfgspace:
|
| 121 |
+
.cfg_wren ( bram_rd_valid ), // <-
|
| 122 |
+
.cfg_tlpwr ( bram_rd_tlpwr ), // <-
|
| 123 |
+
.cfg_tag ( bram_rd_tag ), // <- [7:0]
|
| 124 |
+
.cfg_data ( bram_rd_data_z ), // <- [32:0]
|
| 125 |
+
.cfg_reqid ( bram_rd_reqid ) // <- [15:0]
|
| 126 |
+
);
|
| 127 |
+
|
| 128 |
+
// USB REPLY:
|
| 129 |
+
fifo_43_43_clk2 i_fifo_43_43_clk2(
|
| 130 |
+
.rst ( rst ),
|
| 131 |
+
.wr_clk ( clk_pcie ),
|
| 132 |
+
.rd_clk ( clk_sys ),
|
| 133 |
+
.wr_en ( (bram_rd_tp == `S_SHADOW_CFGSPACE_USB) ),
|
| 134 |
+
.din ( {bram_rd_tag[0], bram_rd_addr, bram_rd_data_z} ),
|
| 135 |
+
.full ( ),
|
| 136 |
+
.rd_en ( 1'b1 ),
|
| 137 |
+
.dout ( {dshadow2fifo.tx_addr_lo, dshadow2fifo.tx_addr, dshadow2fifo.tx_data} ),
|
| 138 |
+
.empty ( ),
|
| 139 |
+
.valid ( dshadow2fifo.tx_valid )
|
| 140 |
+
);
|
| 141 |
+
|
| 142 |
+
endmodule
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
// PCIe TLP cfg reply module:
|
| 147 |
+
module pcileech_cfgspace_pcie_tx(
|
| 148 |
+
input rst,
|
| 149 |
+
input clk_pcie,
|
| 150 |
+
input [15:0] pcie_id, // PCIe id of this core
|
| 151 |
+
IfAXIS128.source tlps_cfg_rsp,
|
| 152 |
+
// cfgspace:
|
| 153 |
+
input cfg_wren,
|
| 154 |
+
input cfg_tlpwr,
|
| 155 |
+
input [7:0] cfg_tag,
|
| 156 |
+
input [31:0] cfg_data,
|
| 157 |
+
input [15:0] cfg_reqid
|
| 158 |
+
);
|
| 159 |
+
|
| 160 |
+
wire [31:0] cpl_tlp_data_dw0_rd = 32'b01001010000000000000000000000001;
|
| 161 |
+
wire [31:0] cpl_tlp_data_dw0_wr = 32'b00001010000000000000000000000000;
|
| 162 |
+
wire [31:0] cpl_tlp_data_dw1 = { `_bs16(pcie_id), 16'h0004 };
|
| 163 |
+
wire [31:0] cpl_tlp_data_dw2 = { cfg_reqid, cfg_tag, 8'h00 };
|
| 164 |
+
wire [31:0] cpl_tlp_data_dw3 = cfg_data;
|
| 165 |
+
wire [127:0] cpl_tlp_rd = { cpl_tlp_data_dw3, cpl_tlp_data_dw2, cpl_tlp_data_dw1, cpl_tlp_data_dw0_rd };
|
| 166 |
+
wire [127:0] cpl_tlp_wr = { 32'h00000000, cpl_tlp_data_dw2, cpl_tlp_data_dw1, cpl_tlp_data_dw0_wr };
|
| 167 |
+
wire [128:0] cpl_tlps = cfg_tlpwr ? {1'b0, cpl_tlp_wr} : {1'b1, cpl_tlp_rd};
|
| 168 |
+
|
| 169 |
+
wire tx_tp;
|
| 170 |
+
wire tx_empty;
|
| 171 |
+
fifo_129_129_clk1 i_fifo_129_129_clk1 (
|
| 172 |
+
.srst ( rst ),
|
| 173 |
+
.clk ( clk_pcie ),
|
| 174 |
+
// data in
|
| 175 |
+
.wr_en ( cfg_wren ),
|
| 176 |
+
.din ( cpl_tlps ),
|
| 177 |
+
.full ( ),
|
| 178 |
+
// data out
|
| 179 |
+
.rd_en ( tlps_cfg_rsp.tready ),
|
| 180 |
+
.dout ( {tx_tp, tlps_cfg_rsp.tdata} ),
|
| 181 |
+
.empty ( tx_empty ),
|
| 182 |
+
.valid ( tlps_cfg_rsp.tvalid )
|
| 183 |
+
);
|
| 184 |
+
|
| 185 |
+
assign tlps_cfg_rsp.tkeepdw = (tx_tp ? 4'b1111 : 4'b0111);
|
| 186 |
+
assign tlps_cfg_rsp.tlast = 1;
|
| 187 |
+
assign tlps_cfg_rsp.tuser = 0;
|
| 188 |
+
assign tlps_cfg_rsp.has_data = ~tx_empty;
|
| 189 |
+
endmodule
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
// Wrapper module for the BRAM-backed configuration space.
|
| 194 |
+
module pcileech_mem_wrap(
|
| 195 |
+
input clk_pcie,
|
| 196 |
+
|
| 197 |
+
// Address common to Read/Write:
|
| 198 |
+
input [9:0] rdwr_addr,
|
| 199 |
+
|
| 200 |
+
// Write to 'configuration/action space':
|
| 201 |
+
input [3:0] wr_be,
|
| 202 |
+
input [31:0] wr_data,
|
| 203 |
+
|
| 204 |
+
// Read from 'configuration space':
|
| 205 |
+
input [7:0] rdreq_tag,
|
| 206 |
+
input [1:0] rdreq_tp,
|
| 207 |
+
input [15:0] rdreq_reqid,
|
| 208 |
+
input rdreq_tlpwr,
|
| 209 |
+
|
| 210 |
+
output bit [9:0] rd_addr,
|
| 211 |
+
output [31:0] rd_data,
|
| 212 |
+
output bit [7:0] rd_tag,
|
| 213 |
+
output bit [1:0] rd_tp,
|
| 214 |
+
output bit [15:0] rd_reqid,
|
| 215 |
+
output bit rd_tlpwr
|
| 216 |
+
);
|
| 217 |
+
|
| 218 |
+
bit [3:0] wr_be_d;
|
| 219 |
+
bit [31:0] wr_data_d;
|
| 220 |
+
|
| 221 |
+
wire [31:0] wr_mask;
|
| 222 |
+
wire [31:0] wr_dina;
|
| 223 |
+
|
| 224 |
+
// DELAY TO FOLLOW BRAM DELAY
|
| 225 |
+
always @ ( posedge clk_pcie )
|
| 226 |
+
begin
|
| 227 |
+
wr_be_d <= wr_be;
|
| 228 |
+
wr_data_d <= wr_data;
|
| 229 |
+
rd_addr <= rdwr_addr;
|
| 230 |
+
rd_tag <= rdreq_tag;
|
| 231 |
+
rd_tp <= rdreq_tp;
|
| 232 |
+
rd_reqid <= rdreq_reqid;
|
| 233 |
+
rd_tlpwr <= rdreq_tlpwr;
|
| 234 |
+
end
|
| 235 |
+
|
| 236 |
+
// BRAM: 'configuration space' - 4kB / 0x1000 bytes:
|
| 237 |
+
bram_pcie_cfgspace i_bram_pcie_cfgspace(
|
| 238 |
+
.clka ( clk_pcie ),
|
| 239 |
+
.clkb ( clk_pcie ),
|
| 240 |
+
.wea ( wr_be_d ),
|
| 241 |
+
.addra ( rd_addr ),
|
| 242 |
+
.dina ( wr_dina ),
|
| 243 |
+
.addrb ( rdwr_addr ),
|
| 244 |
+
.doutb ( rd_data )
|
| 245 |
+
);
|
| 246 |
+
|
| 247 |
+
// DROM: 'configuration space' - 4kB / 0x1000 bytes write mask:
|
| 248 |
+
drom_pcie_cfgspace_writemask i_drom_pcie_cfgspace_writemask(
|
| 249 |
+
.a ( rd_addr ),
|
| 250 |
+
.spo ( wr_mask )
|
| 251 |
+
);
|
| 252 |
+
|
| 253 |
+
genvar i;
|
| 254 |
+
generate
|
| 255 |
+
for (i = 0; i < 32; i++) begin
|
| 256 |
+
assign wr_dina[i] = wr_mask[i] ? wr_data_d[i] : rd_data[i];
|
| 257 |
+
end
|
| 258 |
+
endgenerate
|
| 259 |
+
|
| 260 |
+
endmodule
|
JOKOSAHS_DMA-Pcileech/vivado_build.tcl
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# RUN FROM WITHIN "Vivado Tcl Shell" WITH COMMAND:
|
| 3 |
+
# source vivado_build.tcl -notrace
|
| 4 |
+
#
|
| 5 |
+
puts "-------------------------------------------------------"
|
| 6 |
+
puts " STARTING SYNTHESIS STEP. "
|
| 7 |
+
puts "-------------------------------------------------------"
|
| 8 |
+
launch_runs synth_1
|
| 9 |
+
puts "-------------------------------------------------------"
|
| 10 |
+
puts " WAITING FOR SYNTHESIS STEP TO FINISH ... "
|
| 11 |
+
puts " THIS IS LIKELY TO TAKE A VERY LONG TIME. "
|
| 12 |
+
puts "-------------------------------------------------------"
|
| 13 |
+
wait_on_run synth_1
|
| 14 |
+
puts "-------------------------------------------------------"
|
| 15 |
+
puts " STARTING IMPLEMENTATION STEP. "
|
| 16 |
+
puts "-------------------------------------------------------"
|
| 17 |
+
launch_runs impl_1 -to_step write_bitstream
|
| 18 |
+
puts "-------------------------------------------------------"
|
| 19 |
+
puts " WAITING FOR IMPLEMENTATION STEP TO FINISH ... "
|
| 20 |
+
puts " THIS IS LIKELY TO TAKE A VERY LONG TIME. "
|
| 21 |
+
puts "-------------------------------------------------------"
|
| 22 |
+
wait_on_run impl_1
|
| 23 |
+
file copy -force ./pcileech_squirrel/pcileech_squirrel.runs/impl_1/pcileech_squirrel_top.bin pcileech_squirrel.bin
|
| 24 |
+
puts "-------------------------------------------------------"
|
| 25 |
+
puts " BUILD HOPEFULLY COMPLETED. "
|
| 26 |
+
puts "-------------------------------------------------------"
|
JOKOSAHS_DMA-Pcileech/vivado_build_100t.tcl
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# RUN FROM WITHIN "Vivado Tcl Shell" WITH COMMAND:
|
| 3 |
+
# source vivado_build.tcl -notrace
|
| 4 |
+
#
|
| 5 |
+
puts "-------------------------------------------------------"
|
| 6 |
+
puts " STARTING SYNTHESIS STEP. "
|
| 7 |
+
puts "-------------------------------------------------------"
|
| 8 |
+
launch_runs -jobs 6 synth_1
|
| 9 |
+
puts "-------------------------------------------------------"
|
| 10 |
+
puts " WAITING FOR SYNTHESIS STEP TO FINISH ... "
|
| 11 |
+
puts " THIS IS LIKELY TO TAKE A VERY LONG TIME. "
|
| 12 |
+
puts "-------------------------------------------------------"
|
| 13 |
+
wait_on_run synth_1
|
| 14 |
+
puts "-------------------------------------------------------"
|
| 15 |
+
puts " STARTING IMPLEMENTATION STEP. "
|
| 16 |
+
puts "-------------------------------------------------------"
|
| 17 |
+
launch_runs -jobs 4 impl_1 -to_step write_bitstream
|
| 18 |
+
puts "-------------------------------------------------------"
|
| 19 |
+
puts " WAITING FOR IMPLEMENTATION STEP TO FINISH ... "
|
| 20 |
+
puts " THIS IS LIKELY TO TAKE A VERY LONG TIME. "
|
| 21 |
+
puts "-------------------------------------------------------"
|
| 22 |
+
wait_on_run impl_1
|
| 23 |
+
file copy -force ./pcileech_tbx4_100t/pcileech_tbx4_100t.runs/impl_1/pcileech_tbx4_100t_top.bin pcileech_zdma_100t_fpga0.bin
|
| 24 |
+
puts "-------------------------------------------------------"
|
| 25 |
+
puts " BUILD HOPEFULLY COMPLETED. "
|
| 26 |
+
puts "-------------------------------------------------------"
|
JOKOSAHS_DMA-Pcileech/vivado_generate_project_100t.tcl
ADDED
|
@@ -0,0 +1,1068 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Vivado generated .tcl for creating the pcileech_tbx4_100t vivado project.
|
| 3 |
+
# Run from within "Vivado Tcl Shell" with command: source vivado_generate_project.tcl -notrace
|
| 4 |
+
#
|
| 5 |
+
|
| 6 |
+
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
| 7 |
+
set origin_dir "."
|
| 8 |
+
|
| 9 |
+
# Use origin directory path location variable, if specified in the tcl shell
|
| 10 |
+
if { [info exists ::origin_dir_loc] } {
|
| 11 |
+
set origin_dir $::origin_dir_loc
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
# Set the project name
|
| 15 |
+
set _xil_proj_name_ "pcileech_tbx4_100t"
|
| 16 |
+
|
| 17 |
+
# Use project name variable, if specified in the tcl shell
|
| 18 |
+
if { [info exists ::user_project_name] } {
|
| 19 |
+
set _xil_proj_name_ $::user_project_name
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
variable script_file
|
| 23 |
+
set script_file "vivado_generate_project.tcl"
|
| 24 |
+
|
| 25 |
+
# Help information for this script
|
| 26 |
+
proc print_help {} {
|
| 27 |
+
variable script_file
|
| 28 |
+
puts "\nDescription:"
|
| 29 |
+
puts "Recreate a Vivado project from this script. The created project will be"
|
| 30 |
+
puts "functionally equivalent to the original project for which this script was"
|
| 31 |
+
puts "generated. The script contains commands for creating a project, filesets,"
|
| 32 |
+
puts "runs, adding/importing sources and setting properties on various objects.\n"
|
| 33 |
+
puts "Syntax:"
|
| 34 |
+
puts "$script_file"
|
| 35 |
+
puts "$script_file -tclargs \[--origin_dir <path>\]"
|
| 36 |
+
puts "$script_file -tclargs \[--project_name <name>\]"
|
| 37 |
+
puts "$script_file -tclargs \[--help\]\n"
|
| 38 |
+
puts "Usage:"
|
| 39 |
+
puts "Name Description"
|
| 40 |
+
puts "-------------------------------------------------------------------------"
|
| 41 |
+
puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
|
| 42 |
+
puts " origin_dir path value is \".\", otherwise, the value"
|
| 43 |
+
puts " that was set with the \"-paths_relative_to\" switch"
|
| 44 |
+
puts " when this script was generated.\n"
|
| 45 |
+
puts "\[--project_name <name>\] Create project with the specified name. Default"
|
| 46 |
+
puts " name is the name of the project from where this"
|
| 47 |
+
puts " script was generated.\n"
|
| 48 |
+
puts "\[--help\] Print help information for this script"
|
| 49 |
+
puts "-------------------------------------------------------------------------\n"
|
| 50 |
+
exit 0
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
if { $::argc > 0 } {
|
| 54 |
+
for {set i 0} {$i < $::argc} {incr i} {
|
| 55 |
+
set option [string trim [lindex $::argv $i]]
|
| 56 |
+
switch -regexp -- $option {
|
| 57 |
+
"--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
|
| 58 |
+
"--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
|
| 59 |
+
"--help" { print_help }
|
| 60 |
+
default {
|
| 61 |
+
if { [regexp {^-} $option] } {
|
| 62 |
+
puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
|
| 63 |
+
return 1
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
# Set the directory path for the original project from where this script was exported
|
| 71 |
+
set orig_proj_dir "[file normalize "$origin_dir/../ScreamerM2_TEST4/pcileech_screamer_m2"]"
|
| 72 |
+
|
| 73 |
+
# Check for paths and files needed for project creation
|
| 74 |
+
set validate_required 0
|
| 75 |
+
if { $validate_required } {
|
| 76 |
+
if { [checkRequiredFiles $origin_dir] } {
|
| 77 |
+
puts "Tcl file $script_file is valid. All files required for project creation is accesable. "
|
| 78 |
+
} else {
|
| 79 |
+
puts "Tcl file $script_file is not valid. Not all files required for project creation is accesable. "
|
| 80 |
+
return
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
# Create project
|
| 85 |
+
create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7a100tfgg484-2
|
| 86 |
+
|
| 87 |
+
# Set the directory path for the new project
|
| 88 |
+
set proj_dir [get_property directory [current_project]]
|
| 89 |
+
|
| 90 |
+
# Set project properties
|
| 91 |
+
set obj [current_project]
|
| 92 |
+
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
|
| 93 |
+
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
|
| 94 |
+
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
|
| 95 |
+
set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
|
| 96 |
+
set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
|
| 97 |
+
set_property -name "part" -value "xc7a100tfgg484-2" -objects $obj
|
| 98 |
+
set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
|
| 99 |
+
set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
|
| 100 |
+
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
|
| 101 |
+
set_property -name "simulator_language" -value "Mixed" -objects $obj
|
| 102 |
+
set_property -name "webtalk.activehdl_export_sim" -value "27" -objects $obj
|
| 103 |
+
set_property -name "webtalk.ies_export_sim" -value "27" -objects $obj
|
| 104 |
+
set_property -name "webtalk.modelsim_export_sim" -value "27" -objects $obj
|
| 105 |
+
set_property -name "webtalk.questa_export_sim" -value "27" -objects $obj
|
| 106 |
+
set_property -name "webtalk.riviera_export_sim" -value "27" -objects $obj
|
| 107 |
+
set_property -name "webtalk.vcs_export_sim" -value "27" -objects $obj
|
| 108 |
+
set_property -name "webtalk.xcelium_export_sim" -value "4" -objects $obj
|
| 109 |
+
set_property -name "webtalk.xsim_export_sim" -value "27" -objects $obj
|
| 110 |
+
set_property -name "xpm_libraries" -value "XPM_CDC XPM_MEMORY" -objects $obj
|
| 111 |
+
|
| 112 |
+
# Create 'sources_1' fileset (if not found)
|
| 113 |
+
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
| 114 |
+
create_fileset -srcset sources_1
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
# Set 'sources_1' fileset object
|
| 118 |
+
set obj [get_filesets sources_1]
|
| 119 |
+
# Import local files from the original project
|
| 120 |
+
set files [list \
|
| 121 |
+
[file normalize "${origin_dir}/src/pcileech_header.svh"]\
|
| 122 |
+
[file normalize "${origin_dir}/src/pcileech_com_e.v" ]\
|
| 123 |
+
[file normalize "${origin_dir}/src/pcileech_fifo.sv"]\
|
| 124 |
+
[file normalize "${origin_dir}/src/pcileech_mux.sv"]\
|
| 125 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_a7x4.sv"]\
|
| 126 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_cfg_a7.sv"]\
|
| 127 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_tlp_a7.sv"]\
|
| 128 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_bar_controller.sv"]\
|
| 129 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_cfgspace_shadow.sv"]\
|
| 130 |
+
[file normalize "${origin_dir}/src/pcileech_tbx4_100t_top.sv" ]\
|
| 131 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0.v"]\
|
| 132 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_axi_basic_rx.v"]\
|
| 133 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_axi_basic_rx_null_gen.v"]\
|
| 134 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_axi_basic_rx_pipeline.v"]\
|
| 135 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_axi_basic_top.v"]\
|
| 136 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_axi_basic_tx.v"]\
|
| 137 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_axi_basic_tx_pipeline.v"]\
|
| 138 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"]\
|
| 139 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_core_top.v"]\
|
| 140 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_gt_common.v"]\
|
| 141 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_gt_rx_valid_filter_7x.v"]\
|
| 142 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_gt_top.v"]\
|
| 143 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_gt_wrapper.v"]\
|
| 144 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_gtp_cpllpd_ovrd.v"]\
|
| 145 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_gtp_pipe_drp.v"]\
|
| 146 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_gtp_pipe_rate.v"]\
|
| 147 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_gtp_pipe_reset.v"]\
|
| 148 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_gtx_cpllpd_ovrd.v"]\
|
| 149 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pcie_7x.v"]\
|
| 150 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pcie_bram_7x.v"]\
|
| 151 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pcie_bram_top_7x.v"]\
|
| 152 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pcie_brams_7x.v"]\
|
| 153 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pcie_pipe_lane.v"]\
|
| 154 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pcie_pipe_misc.v"]\
|
| 155 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pcie_pipe_pipeline.v"]\
|
| 156 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pcie_top.v"]\
|
| 157 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pcie2_top.v"]\
|
| 158 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pipe_clock.v"]\
|
| 159 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pipe_drp.v"]\
|
| 160 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pipe_eq.v"]\
|
| 161 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pipe_rate.v"]\
|
| 162 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pipe_reset.v"]\
|
| 163 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pipe_sync.v"]\
|
| 164 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pipe_user.v"]\
|
| 165 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_pipe_wrapper.v"]\
|
| 166 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_qpll_drp.v"]\
|
| 167 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_qpll_reset.v"]\
|
| 168 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_qpll_wrapper.v"]\
|
| 169 |
+
[file normalize "${origin_dir}/pcie_7x/zdma/pcie_7x_0_rxeq_scan.v"]\
|
| 170 |
+
]
|
| 171 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 172 |
+
|
| 173 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 174 |
+
# None
|
| 175 |
+
|
| 176 |
+
# Set 'sources_1' fileset file properties for local files
|
| 177 |
+
set file "src/pcileech_header.svh"
|
| 178 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 179 |
+
set_property -name "file_type" -value "Verilog Header" -objects $file_obj
|
| 180 |
+
|
| 181 |
+
set file "src/pcileech_com_e.v"
|
| 182 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 183 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 184 |
+
|
| 185 |
+
set file "src/pcileech_fifo.sv"
|
| 186 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 187 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 188 |
+
|
| 189 |
+
set file "src/pcileech_mux.sv"
|
| 190 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 191 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 192 |
+
|
| 193 |
+
set file "src/pcileech_pcie_a7x4.sv"
|
| 194 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 195 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 196 |
+
|
| 197 |
+
set file "src/pcileech_pcie_cfg_a7.sv"
|
| 198 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 199 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 200 |
+
|
| 201 |
+
set file "src/pcileech_pcie_tlp_a7.sv"
|
| 202 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 203 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 204 |
+
|
| 205 |
+
set file "src/pcileech_tlps128_bar_controller.sv"
|
| 206 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 207 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 208 |
+
|
| 209 |
+
set file "src/pcileech_tlps128_cfgspace_shadow.sv"
|
| 210 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 211 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 212 |
+
|
| 213 |
+
set file "src/pcileech_tbx4_100t_top.sv"
|
| 214 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 215 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 216 |
+
|
| 217 |
+
set file "pcie_7x/zdma/pcie_7x_0.v"
|
| 218 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 219 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 220 |
+
|
| 221 |
+
set file "pcie_7x/zdma/pcie_7x_0_axi_basic_rx.v"
|
| 222 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 223 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 224 |
+
|
| 225 |
+
set file "pcie_7x/zdma/pcie_7x_0_axi_basic_rx_null_gen.v"
|
| 226 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 227 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 228 |
+
|
| 229 |
+
set file "pcie_7x/zdma/pcie_7x_0_axi_basic_rx_pipeline.v"
|
| 230 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 231 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 232 |
+
|
| 233 |
+
set file "pcie_7x/zdma/pcie_7x_0_axi_basic_top.v"
|
| 234 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 235 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 236 |
+
|
| 237 |
+
set file "pcie_7x/zdma/pcie_7x_0_axi_basic_tx.v"
|
| 238 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 239 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 240 |
+
|
| 241 |
+
set file "pcie_7x/zdma/pcie_7x_0_axi_basic_tx_pipeline.v"
|
| 242 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 243 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 244 |
+
|
| 245 |
+
set file "pcie_7x/zdma/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"
|
| 246 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 247 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 248 |
+
|
| 249 |
+
set file "pcie_7x/zdma/pcie_7x_0_core_top.v"
|
| 250 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 251 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 252 |
+
|
| 253 |
+
set file "pcie_7x/zdma/pcie_7x_0_gt_common.v"
|
| 254 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 255 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 256 |
+
|
| 257 |
+
set file "pcie_7x/zdma/pcie_7x_0_gt_rx_valid_filter_7x.v"
|
| 258 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 259 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 260 |
+
|
| 261 |
+
set file "pcie_7x/zdma/pcie_7x_0_gt_top.v"
|
| 262 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 263 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 264 |
+
|
| 265 |
+
set file "pcie_7x/zdma/pcie_7x_0_gt_wrapper.v"
|
| 266 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 267 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 268 |
+
|
| 269 |
+
set file "pcie_7x/zdma/pcie_7x_0_gtp_cpllpd_ovrd.v"
|
| 270 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 271 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 272 |
+
|
| 273 |
+
set file "pcie_7x/zdma/pcie_7x_0_gtp_pipe_drp.v"
|
| 274 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 275 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 276 |
+
|
| 277 |
+
set file "pcie_7x/zdma/pcie_7x_0_gtp_pipe_rate.v"
|
| 278 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 279 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 280 |
+
|
| 281 |
+
set file "pcie_7x/zdma/pcie_7x_0_gtp_pipe_reset.v"
|
| 282 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 283 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 284 |
+
|
| 285 |
+
set file "pcie_7x/zdma/pcie_7x_0_gtx_cpllpd_ovrd.v"
|
| 286 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 287 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 288 |
+
|
| 289 |
+
set file "pcie_7x/zdma/pcie_7x_0_pcie_7x.v"
|
| 290 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 291 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 292 |
+
|
| 293 |
+
set file "pcie_7x/zdma/pcie_7x_0_pcie_bram_7x.v"
|
| 294 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 295 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 296 |
+
|
| 297 |
+
set file "pcie_7x/zdma/pcie_7x_0_pcie_bram_top_7x.v"
|
| 298 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 299 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 300 |
+
|
| 301 |
+
set file "pcie_7x/zdma/pcie_7x_0_pcie_brams_7x.v"
|
| 302 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 303 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 304 |
+
|
| 305 |
+
set file "pcie_7x/zdma/pcie_7x_0_pcie_pipe_lane.v"
|
| 306 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 307 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 308 |
+
|
| 309 |
+
set file "pcie_7x/zdma/pcie_7x_0_pcie_pipe_misc.v"
|
| 310 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 311 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 312 |
+
|
| 313 |
+
set file "pcie_7x/zdma/pcie_7x_0_pcie_pipe_pipeline.v"
|
| 314 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 315 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 316 |
+
|
| 317 |
+
set file "pcie_7x/zdma/pcie_7x_0_pcie_top.v"
|
| 318 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 319 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 320 |
+
|
| 321 |
+
set file "pcie_7x/zdma/pcie_7x_0_pcie2_top.v"
|
| 322 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 323 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 324 |
+
|
| 325 |
+
set file "pcie_7x/zdma/pcie_7x_0_pipe_clock.v"
|
| 326 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 327 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 328 |
+
|
| 329 |
+
set file "pcie_7x/zdma/pcie_7x_0_pipe_drp.v"
|
| 330 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 331 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 332 |
+
|
| 333 |
+
set file "pcie_7x/zdma/pcie_7x_0_pipe_eq.v"
|
| 334 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 335 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 336 |
+
|
| 337 |
+
set file "pcie_7x/zdma/pcie_7x_0_pipe_rate.v"
|
| 338 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 339 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 340 |
+
|
| 341 |
+
set file "pcie_7x/zdma/pcie_7x_0_pipe_reset.v"
|
| 342 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 343 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 344 |
+
|
| 345 |
+
set file "pcie_7x/zdma/pcie_7x_0_pipe_sync.v"
|
| 346 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 347 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 348 |
+
|
| 349 |
+
set file "pcie_7x/zdma/pcie_7x_0_pipe_user.v"
|
| 350 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 351 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 352 |
+
|
| 353 |
+
set file "pcie_7x/zdma/pcie_7x_0_qpll_drp.v"
|
| 354 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 355 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 356 |
+
|
| 357 |
+
set file "pcie_7x/zdma/pcie_7x_0_pipe_wrapper.v"
|
| 358 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 359 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 360 |
+
|
| 361 |
+
set file "pcie_7x/zdma/pcie_7x_0_qpll_reset.v"
|
| 362 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 363 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 364 |
+
|
| 365 |
+
set file "pcie_7x/zdma/pcie_7x_0_qpll_wrapper.v"
|
| 366 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 367 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 368 |
+
|
| 369 |
+
set file "pcie_7x/zdma/pcie_7x_0_rxeq_scan.v"
|
| 370 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 371 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 372 |
+
|
| 373 |
+
# Set 'sources_1' fileset properties
|
| 374 |
+
set obj [get_filesets sources_1]
|
| 375 |
+
set_property -name "top" -value "pcileech_tbx4_100t_top" -objects $obj
|
| 376 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 377 |
+
|
| 378 |
+
# Set 'sources_1' fileset object
|
| 379 |
+
set obj [get_filesets sources_1]
|
| 380 |
+
# Import local files from the original project
|
| 381 |
+
set files [list \
|
| 382 |
+
[file normalize "${origin_dir}/ip/100T/pcileech_bar_zero4k.coe" ]\
|
| 383 |
+
[file normalize "${origin_dir}/ip/100T/pcileech_cfgspace.coe" ]\
|
| 384 |
+
[file normalize "${origin_dir}/ip/100T/pcileech_cfgspace_writemask.coe" ]\
|
| 385 |
+
[file normalize "${origin_dir}/ip/100T/bram_pcie_cfgspace.xci" ]\
|
| 386 |
+
]
|
| 387 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 388 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 389 |
+
# None
|
| 390 |
+
# Set 'sources_1' fileset file properties for local files
|
| 391 |
+
set file "bram_pcie_cfgspace/bram_pcie_cfgspace.xci"
|
| 392 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 393 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 394 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 395 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 396 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
# Set 'sources_1' fileset object
|
| 401 |
+
set obj [get_filesets sources_1]
|
| 402 |
+
# Import local files from the original project
|
| 403 |
+
set files [list \
|
| 404 |
+
[file normalize "${origin_dir}/ip/100T/clk_wiz_0.xci"]\
|
| 405 |
+
]
|
| 406 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 407 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 408 |
+
# None
|
| 409 |
+
# Set 'sources_1' fileset file properties for local files
|
| 410 |
+
set file "clk_wiz_0/clk_wiz_0.xci"
|
| 411 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 412 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 413 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 414 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 415 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
|
| 419 |
+
# Set 'sources_1' fileset object
|
| 420 |
+
set obj [get_filesets sources_1]
|
| 421 |
+
# Import local files from the original project
|
| 422 |
+
set files [list \
|
| 423 |
+
[file normalize "${origin_dir}/ip/100T/drom_pcie_cfgspace_writemask.xci"]\
|
| 424 |
+
]
|
| 425 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 426 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 427 |
+
# None
|
| 428 |
+
# Set 'sources_1' fileset file properties for local files
|
| 429 |
+
set file "drom_pcie_cfgspace_writemask/drom_pcie_cfgspace_writemask.xci"
|
| 430 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 431 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 432 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 433 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 434 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
|
| 438 |
+
# Set 'sources_1' fileset object
|
| 439 |
+
set obj [get_filesets sources_1]
|
| 440 |
+
# Import local files from the original project
|
| 441 |
+
set files [list \
|
| 442 |
+
[file normalize "${origin_dir}/ip/100T/fifo_74_74_clk1_bar_rd1.xci"]\
|
| 443 |
+
]
|
| 444 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 445 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 446 |
+
# None
|
| 447 |
+
# Set 'sources_1' fileset file properties for local files
|
| 448 |
+
set file "fifo_74_74_clk1_bar_rd1/fifo_74_74_clk1_bar_rd1.xci"
|
| 449 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 450 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 451 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 452 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 453 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
|
| 457 |
+
# Set 'sources_1' fileset object
|
| 458 |
+
set obj [get_filesets sources_1]
|
| 459 |
+
# Import local files from the original project
|
| 460 |
+
set files [list \
|
| 461 |
+
[file normalize "${origin_dir}/ip/100T/bram_bar_zero4k.xci"]\
|
| 462 |
+
]
|
| 463 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 464 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 465 |
+
# None
|
| 466 |
+
# Set 'sources_1' fileset file properties for local files
|
| 467 |
+
set file "bram_bar_zero4k/bram_bar_zero4k.xci"
|
| 468 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 469 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 470 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 471 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 472 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 473 |
+
}
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
# Set 'sources_1' fileset object
|
| 477 |
+
set obj [get_filesets sources_1]
|
| 478 |
+
# Import local files from the original project
|
| 479 |
+
set files [list \
|
| 480 |
+
[file normalize "${origin_dir}/ip/100T/fifo_134_134_clk1_bar_rdrsp.xci"]\
|
| 481 |
+
]
|
| 482 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 483 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 484 |
+
# None
|
| 485 |
+
# Set 'sources_1' fileset file properties for local files
|
| 486 |
+
set file "fifo_134_134_clk1_bar_rdrsp/fifo_134_134_clk1_bar_rdrsp.xci"
|
| 487 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 488 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 489 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 490 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 491 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
|
| 495 |
+
# Set 'sources_1' fileset object
|
| 496 |
+
set obj [get_filesets sources_1]
|
| 497 |
+
# Import local files from the original project
|
| 498 |
+
set files [list \
|
| 499 |
+
[file normalize "${origin_dir}/ip/100T/fifo_141_141_clk1_bar_wr.xci"]\
|
| 500 |
+
]
|
| 501 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 502 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 503 |
+
# None
|
| 504 |
+
# Set 'sources_1' fileset file properties for local files
|
| 505 |
+
set file "fifo_141_141_clk1_bar_wr/fifo_141_141_clk1_bar_wr.xci"
|
| 506 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 507 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 508 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 509 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 510 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
|
| 514 |
+
# Set 'sources_1' fileset object
|
| 515 |
+
set obj [get_filesets sources_1]
|
| 516 |
+
# Import local files from the original project
|
| 517 |
+
set files [list \
|
| 518 |
+
[file normalize "${origin_dir}/ip/100T/fifo_134_134_clk2_rxfifo.xci"]\
|
| 519 |
+
]
|
| 520 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 521 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 522 |
+
# None
|
| 523 |
+
# Set 'sources_1' fileset file properties for local files
|
| 524 |
+
set file "fifo_134_134_clk2_rxfifo/fifo_134_134_clk2_rxfifo.xci"
|
| 525 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 526 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 527 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 528 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 529 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
|
| 533 |
+
# Set 'sources_1' fileset object
|
| 534 |
+
set obj [get_filesets sources_1]
|
| 535 |
+
# Import local files from the original project
|
| 536 |
+
set files [list \
|
| 537 |
+
[file normalize "${origin_dir}/ip/100T/fifo_1_1_clk2.xci"]\
|
| 538 |
+
]
|
| 539 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 540 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 541 |
+
# None
|
| 542 |
+
# Set 'sources_1' fileset file properties for local files
|
| 543 |
+
set file "fifo_1_1_clk2/fifo_1_1_clk2.xci"
|
| 544 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 545 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 546 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 547 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 548 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
|
| 552 |
+
# Set 'sources_1' fileset object
|
| 553 |
+
set obj [get_filesets sources_1]
|
| 554 |
+
# Import local files from the original project
|
| 555 |
+
set files [list \
|
| 556 |
+
[file normalize "${origin_dir}/ip/100T/fifo_134_134_clk2.xci"]\
|
| 557 |
+
]
|
| 558 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 559 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 560 |
+
# None
|
| 561 |
+
# Set 'sources_1' fileset file properties for local files
|
| 562 |
+
set file "fifo_134_134_clk2/fifo_134_134_clk2.xci"
|
| 563 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 564 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 565 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 566 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 567 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 568 |
+
}
|
| 569 |
+
|
| 570 |
+
|
| 571 |
+
# Set 'sources_1' fileset object
|
| 572 |
+
set obj [get_filesets sources_1]
|
| 573 |
+
# Import local files from the original project
|
| 574 |
+
set files [list \
|
| 575 |
+
[file normalize "${origin_dir}/ip/100T/fifo_64_64_clk1_fifocmd.xci"]\
|
| 576 |
+
]
|
| 577 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 578 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 579 |
+
# None
|
| 580 |
+
# Set 'sources_1' fileset file properties for local files
|
| 581 |
+
set file "fifo_64_64_clk1_fifocmd/fifo_64_64_clk1_fifocmd.xci"
|
| 582 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 583 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 584 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 585 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 586 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 587 |
+
}
|
| 588 |
+
|
| 589 |
+
|
| 590 |
+
|
| 591 |
+
# Set 'sources_1' fileset object
|
| 592 |
+
set obj [get_filesets sources_1]
|
| 593 |
+
# Import local files from the original project
|
| 594 |
+
set files [list \
|
| 595 |
+
[file normalize "${origin_dir}/ip/100T/fifo_129_129_clk1.xci"]\
|
| 596 |
+
]
|
| 597 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 598 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 599 |
+
# None
|
| 600 |
+
# Set 'sources_1' fileset file properties for local files
|
| 601 |
+
set file "fifo_129_129_clk1/fifo_129_129_clk1.xci"
|
| 602 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 603 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 604 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 605 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 606 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 607 |
+
}
|
| 608 |
+
|
| 609 |
+
# Set 'sources_1' fileset object
|
| 610 |
+
set obj [get_filesets sources_1]
|
| 611 |
+
# Import local files from the original project
|
| 612 |
+
set files [list \
|
| 613 |
+
[file normalize "${origin_dir}/ip/100T/fifo_64_64.xci"]\
|
| 614 |
+
]
|
| 615 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 616 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 617 |
+
# None
|
| 618 |
+
# Set 'sources_1' fileset file properties for local files
|
| 619 |
+
set file "fifo_64_64/fifo_64_64.xci"
|
| 620 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 621 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 622 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 623 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 624 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 625 |
+
}
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
# Set 'sources_1' fileset object
|
| 629 |
+
set obj [get_filesets sources_1]
|
| 630 |
+
# Import local files from the original project
|
| 631 |
+
set files [list \
|
| 632 |
+
[file normalize "${origin_dir}/ip/100T/fifo_32_32_clk2.xci"]\
|
| 633 |
+
]
|
| 634 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 635 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 636 |
+
# None
|
| 637 |
+
# Set 'sources_1' fileset file properties for local files
|
| 638 |
+
set file "fifo_32_32_clk2/fifo_32_32_clk2.xci"
|
| 639 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 640 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 641 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 642 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 643 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 644 |
+
}
|
| 645 |
+
|
| 646 |
+
|
| 647 |
+
# Set 'sources_1' fileset object
|
| 648 |
+
set obj [get_filesets sources_1]
|
| 649 |
+
# Import local files from the original project
|
| 650 |
+
set files [list \
|
| 651 |
+
[file normalize "${origin_dir}/ip/100T/fifo_49_49_clk2.xci"]\
|
| 652 |
+
]
|
| 653 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 654 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 655 |
+
# None
|
| 656 |
+
# Set 'sources_1' fileset file properties for local files
|
| 657 |
+
set file "fifo_49_49_clk2/fifo_49_49_clk2.xci"
|
| 658 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 659 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 660 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 661 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 662 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 663 |
+
}
|
| 664 |
+
|
| 665 |
+
|
| 666 |
+
# Set 'sources_1' fileset object
|
| 667 |
+
set obj [get_filesets sources_1]
|
| 668 |
+
# Import local files from the original project
|
| 669 |
+
set files [list \
|
| 670 |
+
[file normalize "${origin_dir}/ip/100T/fifo_43_43_clk2.xci"]\
|
| 671 |
+
]
|
| 672 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 673 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 674 |
+
# None
|
| 675 |
+
# Set 'sources_1' fileset file properties for local files
|
| 676 |
+
set file "fifo_43_43_clk2/fifo_43_43_clk2.xci"
|
| 677 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 678 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 679 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 680 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 681 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
|
| 685 |
+
# Set 'sources_1' fileset object
|
| 686 |
+
set obj [get_filesets sources_1]
|
| 687 |
+
# Import local files from the original project
|
| 688 |
+
set files [list \
|
| 689 |
+
[file normalize "${origin_dir}/ip/100T/fifo_34_34.xci"]\
|
| 690 |
+
]
|
| 691 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 692 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 693 |
+
# None
|
| 694 |
+
# Set 'sources_1' fileset file properties for local files
|
| 695 |
+
set file "fifo_34_34/fifo_34_34.xci"
|
| 696 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 697 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 698 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 699 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 700 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 701 |
+
}
|
| 702 |
+
|
| 703 |
+
|
| 704 |
+
# Create 'constrs_1' fileset (if not found)
|
| 705 |
+
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
| 706 |
+
create_fileset -constrset constrs_1
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
# Set 'constrs_1' fileset object
|
| 710 |
+
set obj [get_filesets constrs_1]
|
| 711 |
+
|
| 712 |
+
# Add/Import constrs file and set constrs file properties
|
| 713 |
+
set file "[file normalize ${origin_dir}/src/pcileech_tbx4_100t.xdc]"
|
| 714 |
+
set file_imported [import_files -fileset constrs_1 [list $file]]
|
| 715 |
+
set file "src/pcileech_tbx4_100t.xdc"
|
| 716 |
+
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
|
| 717 |
+
set_property -name "file_type" -value "XDC" -objects $file_obj
|
| 718 |
+
set_property -name "processing_order" -value "EARLY" -objects $file_obj
|
| 719 |
+
|
| 720 |
+
# Set 'constrs_1' fileset properties
|
| 721 |
+
set obj [get_filesets constrs_1]
|
| 722 |
+
set_property -name "target_part" -value "xc7a100tfgg484-2" -objects $obj
|
| 723 |
+
|
| 724 |
+
# Create 'sim_1' fileset (if not found)
|
| 725 |
+
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
| 726 |
+
create_fileset -simset sim_1
|
| 727 |
+
}
|
| 728 |
+
|
| 729 |
+
# Set 'sim_1' fileset object
|
| 730 |
+
set obj [get_filesets sim_1]
|
| 731 |
+
# Empty (no sources present)
|
| 732 |
+
|
| 733 |
+
# Set 'sim_1' fileset properties
|
| 734 |
+
set obj [get_filesets sim_1]
|
| 735 |
+
set_property -name "hbs.configure_design_for_hier_access" -value "1" -objects $obj
|
| 736 |
+
set_property -name "top" -value "pcileech_tbx4_100t_top" -objects $obj
|
| 737 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 738 |
+
|
| 739 |
+
# Upgrade IP from the currently installed Vivado version
|
| 740 |
+
upgrade_ip [get_ips *]
|
| 741 |
+
|
| 742 |
+
# Set 'utils_1' fileset object
|
| 743 |
+
set obj [get_filesets utils_1]
|
| 744 |
+
# Empty (no sources present)
|
| 745 |
+
|
| 746 |
+
# Set 'utils_1' fileset properties
|
| 747 |
+
set obj [get_filesets utils_1]
|
| 748 |
+
|
| 749 |
+
# Create 'synth_1' run (if not found)
|
| 750 |
+
if {[string equal [get_runs -quiet synth_1] ""]} {
|
| 751 |
+
create_run -name synth_1 -part xc7a100tfgg484-2 -flow {Vivado Synthesis 2023} -strategy "Flow_PerfOptimized_high" -report_strategy {No Reports} -constrset constrs_1
|
| 752 |
+
} else {
|
| 753 |
+
set_property strategy "Flow_PerfOptimized_high" [get_runs synth_1]
|
| 754 |
+
set_property flow "Vivado Synthesis 2023" [get_runs synth_1]
|
| 755 |
+
}
|
| 756 |
+
set obj [get_runs synth_1]
|
| 757 |
+
set_property set_report_strategy_name 1 $obj
|
| 758 |
+
set_property report_strategy {Vivado Synthesis Default Reports} $obj
|
| 759 |
+
set_property set_report_strategy_name 0 $obj
|
| 760 |
+
# Create 'synth_1_synth_report_utilization_0' report (if not found)
|
| 761 |
+
if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
|
| 762 |
+
create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
|
| 763 |
+
}
|
| 764 |
+
set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
|
| 765 |
+
if { $obj != "" } {
|
| 766 |
+
|
| 767 |
+
}
|
| 768 |
+
set obj [get_runs synth_1]
|
| 769 |
+
set_property -name "needs_refresh" -value "1" -objects $obj
|
| 770 |
+
set_property -name "part" -value "xc7a100tfgg484-2" -objects $obj
|
| 771 |
+
set_property -name "auto_incremental_checkpoint" -value "1" -objects $obj
|
| 772 |
+
set_property -name "strategy" -value "Flow_PerfOptimized_high" -objects $obj
|
| 773 |
+
set_property -name "steps.synth_design.args.directive" -value "PerformanceOptimized" -objects $obj
|
| 774 |
+
set_property -name "steps.synth_design.args.fsm_extraction" -value "one_hot" -objects $obj
|
| 775 |
+
set_property -name "steps.synth_design.args.keep_equivalent_registers" -value "1" -objects $obj
|
| 776 |
+
set_property -name "steps.synth_design.args.resource_sharing" -value "off" -objects $obj
|
| 777 |
+
set_property -name "steps.synth_design.args.no_lc" -value "1" -objects $obj
|
| 778 |
+
set_property -name "steps.synth_design.args.shreg_min_size" -value "5" -objects $obj
|
| 779 |
+
|
| 780 |
+
# set the current synth run
|
| 781 |
+
current_run -synthesis [get_runs synth_1]
|
| 782 |
+
|
| 783 |
+
# Create 'impl_1' run (if not found)
|
| 784 |
+
if {[string equal [get_runs -quiet impl_1] ""]} {
|
| 785 |
+
create_run -name impl_1 -part xc7a100tfgg484-2 -flow {Vivado Implementation 2023} -strategy "Performance_ExtraTimingOpt" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
|
| 786 |
+
} else {
|
| 787 |
+
set_property strategy "Performance_ExtraTimingOpt" [get_runs impl_1]
|
| 788 |
+
set_property flow "Vivado Implementation 2023" [get_runs impl_1]
|
| 789 |
+
}
|
| 790 |
+
set obj [get_runs impl_1]
|
| 791 |
+
set_property set_report_strategy_name 1 $obj
|
| 792 |
+
set_property report_strategy {Vivado Implementation Default Reports} $obj
|
| 793 |
+
set_property set_report_strategy_name 0 $obj
|
| 794 |
+
# Create 'impl_1_init_report_timing_summary_0' report (if not found)
|
| 795 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
|
| 796 |
+
create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
|
| 797 |
+
}
|
| 798 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
|
| 799 |
+
if { $obj != "" } {
|
| 800 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 801 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 802 |
+
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
| 803 |
+
|
| 804 |
+
}
|
| 805 |
+
# Create 'impl_1_opt_report_drc_0' report (if not found)
|
| 806 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
|
| 807 |
+
create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
|
| 808 |
+
}
|
| 809 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
|
| 810 |
+
if { $obj != "" } {
|
| 811 |
+
|
| 812 |
+
}
|
| 813 |
+
# Create 'impl_1_opt_report_timing_summary_0' report (if not found)
|
| 814 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
|
| 815 |
+
create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
|
| 816 |
+
}
|
| 817 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
|
| 818 |
+
if { $obj != "" } {
|
| 819 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 820 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 821 |
+
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
| 822 |
+
|
| 823 |
+
}
|
| 824 |
+
# Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
|
| 825 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
|
| 826 |
+
create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
|
| 827 |
+
}
|
| 828 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
|
| 829 |
+
if { $obj != "" } {
|
| 830 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 831 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 832 |
+
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
| 833 |
+
|
| 834 |
+
}
|
| 835 |
+
# Create 'impl_1_place_report_io_0' report (if not found)
|
| 836 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
|
| 837 |
+
create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
|
| 838 |
+
}
|
| 839 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
|
| 840 |
+
if { $obj != "" } {
|
| 841 |
+
|
| 842 |
+
}
|
| 843 |
+
# Create 'impl_1_place_report_utilization_0' report (if not found)
|
| 844 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
|
| 845 |
+
create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
|
| 846 |
+
}
|
| 847 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
|
| 848 |
+
if { $obj != "" } {
|
| 849 |
+
|
| 850 |
+
}
|
| 851 |
+
# Create 'impl_1_place_report_control_sets_0' report (if not found)
|
| 852 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
|
| 853 |
+
create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
|
| 854 |
+
}
|
| 855 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
|
| 856 |
+
if { $obj != "" } {
|
| 857 |
+
set_property -name "options.verbose" -value "1" -objects $obj
|
| 858 |
+
|
| 859 |
+
}
|
| 860 |
+
# Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
|
| 861 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
|
| 862 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 863 |
+
}
|
| 864 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
|
| 865 |
+
if { $obj != "" } {
|
| 866 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 867 |
+
|
| 868 |
+
}
|
| 869 |
+
# Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
|
| 870 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
|
| 871 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 872 |
+
}
|
| 873 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
|
| 874 |
+
if { $obj != "" } {
|
| 875 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 876 |
+
|
| 877 |
+
}
|
| 878 |
+
# Create 'impl_1_place_report_timing_summary_0' report (if not found)
|
| 879 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
|
| 880 |
+
create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
|
| 881 |
+
}
|
| 882 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
|
| 883 |
+
if { $obj != "" } {
|
| 884 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 885 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 886 |
+
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
| 887 |
+
|
| 888 |
+
}
|
| 889 |
+
# Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
|
| 890 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
|
| 891 |
+
create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
|
| 892 |
+
}
|
| 893 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
|
| 894 |
+
if { $obj != "" } {
|
| 895 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 896 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 897 |
+
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
| 898 |
+
|
| 899 |
+
}
|
| 900 |
+
# Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
|
| 901 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
|
| 902 |
+
create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
|
| 903 |
+
}
|
| 904 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
|
| 905 |
+
if { $obj != "" } {
|
| 906 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 907 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 908 |
+
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
| 909 |
+
|
| 910 |
+
}
|
| 911 |
+
# Create 'impl_1_route_report_drc_0' report (if not found)
|
| 912 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
|
| 913 |
+
create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
|
| 914 |
+
}
|
| 915 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
|
| 916 |
+
if { $obj != "" } {
|
| 917 |
+
|
| 918 |
+
}
|
| 919 |
+
# Create 'impl_1_route_report_methodology_0' report (if not found)
|
| 920 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
|
| 921 |
+
create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
|
| 922 |
+
}
|
| 923 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
|
| 924 |
+
if { $obj != "" } {
|
| 925 |
+
|
| 926 |
+
}
|
| 927 |
+
# Create 'impl_1_route_report_power_0' report (if not found)
|
| 928 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
|
| 929 |
+
create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
|
| 930 |
+
}
|
| 931 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
|
| 932 |
+
if { $obj != "" } {
|
| 933 |
+
|
| 934 |
+
}
|
| 935 |
+
# Create 'impl_1_route_report_route_status_0' report (if not found)
|
| 936 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
|
| 937 |
+
create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
|
| 938 |
+
}
|
| 939 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
|
| 940 |
+
if { $obj != "" } {
|
| 941 |
+
|
| 942 |
+
}
|
| 943 |
+
# Create 'impl_1_route_report_timing_summary_0' report (if not found)
|
| 944 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
|
| 945 |
+
create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
|
| 946 |
+
}
|
| 947 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
|
| 948 |
+
if { $obj != "" } {
|
| 949 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 950 |
+
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
| 951 |
+
|
| 952 |
+
}
|
| 953 |
+
# Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
|
| 954 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
|
| 955 |
+
create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
|
| 956 |
+
}
|
| 957 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
|
| 958 |
+
if { $obj != "" } {
|
| 959 |
+
|
| 960 |
+
}
|
| 961 |
+
# Create 'impl_1_route_report_clock_utilization_0' report (if not found)
|
| 962 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
|
| 963 |
+
create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
|
| 964 |
+
}
|
| 965 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
|
| 966 |
+
if { $obj != "" } {
|
| 967 |
+
|
| 968 |
+
}
|
| 969 |
+
# Create 'impl_1_route_report_bus_skew_0' report (if not found)
|
| 970 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
|
| 971 |
+
create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
|
| 972 |
+
}
|
| 973 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
|
| 974 |
+
if { $obj != "" } {
|
| 975 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 976 |
+
|
| 977 |
+
}
|
| 978 |
+
# Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
|
| 979 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
|
| 980 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
|
| 981 |
+
}
|
| 982 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
|
| 983 |
+
if { $obj != "" } {
|
| 984 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 985 |
+
set_property -name "options.report_unconstrained" -value "1" -objects $obj
|
| 986 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 987 |
+
|
| 988 |
+
}
|
| 989 |
+
# Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
|
| 990 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
|
| 991 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
|
| 992 |
+
}
|
| 993 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
|
| 994 |
+
if { $obj != "" } {
|
| 995 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 996 |
+
|
| 997 |
+
}
|
| 998 |
+
set obj [get_runs impl_1]
|
| 999 |
+
set_property -name "part" -value "xc7a100tfgg484-2" -objects $obj
|
| 1000 |
+
set_property -name "strategy" -value "Performance_ExtraTimingOpt" -objects $obj
|
| 1001 |
+
set_property -name "steps.place_design.args.directive" -value "ExtraTimingOpt" -objects $obj
|
| 1002 |
+
set_property -name "steps.phys_opt_design.args.directive" -value "Explore" -objects $obj
|
| 1003 |
+
set_property -name "steps.route_design.args.directive" -value "NoTimingRelaxation" -objects $obj
|
| 1004 |
+
set_property -name "steps.post_route_phys_opt_design.is_enabled" -value "1" -objects $obj
|
| 1005 |
+
set_property -name "steps.post_route_phys_opt_design.args.directive" -value "AddRetime" -objects $obj
|
| 1006 |
+
set_property -name "steps.write_bitstream.args.bin_file" -value "1" -objects $obj
|
| 1007 |
+
set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
|
| 1008 |
+
set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
|
| 1009 |
+
|
| 1010 |
+
# set the current impl run
|
| 1011 |
+
current_run -implementation [get_runs impl_1]
|
| 1012 |
+
catch {
|
| 1013 |
+
if { $idrFlowPropertiesConstraints != {} } {
|
| 1014 |
+
set_param runs.disableIDRFlowPropertyConstraints $idrFlowPropertiesConstraints
|
| 1015 |
+
}
|
| 1016 |
+
}
|
| 1017 |
+
|
| 1018 |
+
puts "INFO: Project created:${_xil_proj_name_}"
|
| 1019 |
+
# Create 'drc_1' gadget (if not found)
|
| 1020 |
+
if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
|
| 1021 |
+
create_dashboard_gadget -name {drc_1} -type drc
|
| 1022 |
+
}
|
| 1023 |
+
set obj [get_dashboard_gadgets [ list "drc_1" ] ]
|
| 1024 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
|
| 1025 |
+
|
| 1026 |
+
# Create 'methodology_1' gadget (if not found)
|
| 1027 |
+
if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
|
| 1028 |
+
create_dashboard_gadget -name {methodology_1} -type methodology
|
| 1029 |
+
}
|
| 1030 |
+
set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
|
| 1031 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
|
| 1032 |
+
|
| 1033 |
+
# Create 'power_1' gadget (if not found)
|
| 1034 |
+
if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
|
| 1035 |
+
create_dashboard_gadget -name {power_1} -type power
|
| 1036 |
+
}
|
| 1037 |
+
set obj [get_dashboard_gadgets [ list "power_1" ] ]
|
| 1038 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
|
| 1039 |
+
|
| 1040 |
+
# Create 'timing_1' gadget (if not found)
|
| 1041 |
+
if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
|
| 1042 |
+
create_dashboard_gadget -name {timing_1} -type timing
|
| 1043 |
+
}
|
| 1044 |
+
set obj [get_dashboard_gadgets [ list "timing_1" ] ]
|
| 1045 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
|
| 1046 |
+
|
| 1047 |
+
# Create 'utilization_1' gadget (if not found)
|
| 1048 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
|
| 1049 |
+
create_dashboard_gadget -name {utilization_1} -type utilization
|
| 1050 |
+
}
|
| 1051 |
+
set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
|
| 1052 |
+
set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
|
| 1053 |
+
set_property -name "run.step" -value "synth_design" -objects $obj
|
| 1054 |
+
set_property -name "run.type" -value "synthesis" -objects $obj
|
| 1055 |
+
|
| 1056 |
+
# Create 'utilization_2' gadget (if not found)
|
| 1057 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
|
| 1058 |
+
create_dashboard_gadget -name {utilization_2} -type utilization
|
| 1059 |
+
}
|
| 1060 |
+
set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
|
| 1061 |
+
set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
|
| 1062 |
+
|
| 1063 |
+
move_dashboard_gadget -name {utilization_1} -row 0 -col 0
|
| 1064 |
+
move_dashboard_gadget -name {power_1} -row 1 -col 0
|
| 1065 |
+
move_dashboard_gadget -name {drc_1} -row 2 -col 0
|
| 1066 |
+
move_dashboard_gadget -name {timing_1} -row 0 -col 1
|
| 1067 |
+
move_dashboard_gadget -name {utilization_2} -row 1 -col 1
|
| 1068 |
+
move_dashboard_gadget -name {methodology_1} -row 2 -col 1
|
JOKOSAHS_DMA-Pcileech/vivado_generate_project_captain_75T.tcl
ADDED
|
@@ -0,0 +1,1071 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Vivado generated .tcl for creating the pcileech_enigma_x1 vivado project.
|
| 3 |
+
# Run from within "Vivado Tcl Shell" with command: source vivado_generate_project.tcl -notrace
|
| 4 |
+
#
|
| 5 |
+
|
| 6 |
+
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
| 7 |
+
set origin_dir "."
|
| 8 |
+
|
| 9 |
+
# Use origin directory path location variable, if specified in the tcl shell
|
| 10 |
+
if { [info exists ::origin_dir_loc] } {
|
| 11 |
+
set origin_dir $::origin_dir_loc
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
# Set the project name
|
| 15 |
+
set _xil_proj_name_ "pcileech_enigma_x1"
|
| 16 |
+
|
| 17 |
+
# Use project name variable, if specified in the tcl shell
|
| 18 |
+
if { [info exists ::user_project_name] } {
|
| 19 |
+
set _xil_proj_name_ $::user_project_name
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
variable script_file
|
| 23 |
+
set script_file "vivado_generate_project.tcl"
|
| 24 |
+
|
| 25 |
+
# Help information for this script
|
| 26 |
+
proc print_help {} {
|
| 27 |
+
variable script_file
|
| 28 |
+
puts "\nDescription:"
|
| 29 |
+
puts "Recreate a Vivado project from this script. The created project will be"
|
| 30 |
+
puts "functionally equivalent to the original project for which this script was"
|
| 31 |
+
puts "generated. The script contains commands for creating a project, filesets,"
|
| 32 |
+
puts "runs, adding/importing sources and setting properties on various objects.\n"
|
| 33 |
+
puts "Syntax:"
|
| 34 |
+
puts "$script_file"
|
| 35 |
+
puts "$script_file -tclargs \[--origin_dir <path>\]"
|
| 36 |
+
puts "$script_file -tclargs \[--project_name <name>\]"
|
| 37 |
+
puts "$script_file -tclargs \[--help\]\n"
|
| 38 |
+
puts "Usage:"
|
| 39 |
+
puts "Name Description"
|
| 40 |
+
puts "-------------------------------------------------------------------------"
|
| 41 |
+
puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
|
| 42 |
+
puts " origin_dir path value is \".\", otherwise, the value"
|
| 43 |
+
puts " that was set with the \"-paths_relative_to\" switch"
|
| 44 |
+
puts " when this script was generated.\n"
|
| 45 |
+
puts "\[--project_name <name>\] Create project with the specified name. Default"
|
| 46 |
+
puts " name is the name of the project from where this"
|
| 47 |
+
puts " script was generated.\n"
|
| 48 |
+
puts "\[--help\] Print help information for this script"
|
| 49 |
+
puts "-------------------------------------------------------------------------\n"
|
| 50 |
+
exit 0
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
if { $::argc > 0 } {
|
| 54 |
+
for {set i 0} {$i < $::argc} {incr i} {
|
| 55 |
+
set option [string trim [lindex $::argv $i]]
|
| 56 |
+
switch -regexp -- $option {
|
| 57 |
+
"--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
|
| 58 |
+
"--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
|
| 59 |
+
"--help" { print_help }
|
| 60 |
+
default {
|
| 61 |
+
if { [regexp {^-} $option] } {
|
| 62 |
+
puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
|
| 63 |
+
return 1
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
# Set the directory path for the original project from where this script was exported
|
| 71 |
+
set orig_proj_dir "[file normalize "$origin_dir/pcileech_enigma_x1"]"
|
| 72 |
+
|
| 73 |
+
# Create project
|
| 74 |
+
create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7a75tfgg484-2
|
| 75 |
+
|
| 76 |
+
# Set the directory path for the new project
|
| 77 |
+
set proj_dir [get_property directory [current_project]]
|
| 78 |
+
|
| 79 |
+
# Set project properties
|
| 80 |
+
set obj [current_project]
|
| 81 |
+
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
|
| 82 |
+
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
|
| 83 |
+
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
|
| 84 |
+
set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
|
| 85 |
+
set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
|
| 86 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 87 |
+
set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
|
| 88 |
+
set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
|
| 89 |
+
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
|
| 90 |
+
set_property -name "simulator_language" -value "Mixed" -objects $obj
|
| 91 |
+
set_property -name "webtalk.activehdl_export_sim" -value "5" -objects $obj
|
| 92 |
+
set_property -name "webtalk.ies_export_sim" -value "5" -objects $obj
|
| 93 |
+
set_property -name "webtalk.modelsim_export_sim" -value "5" -objects $obj
|
| 94 |
+
set_property -name "webtalk.questa_export_sim" -value "5" -objects $obj
|
| 95 |
+
set_property -name "webtalk.riviera_export_sim" -value "5" -objects $obj
|
| 96 |
+
set_property -name "webtalk.vcs_export_sim" -value "5" -objects $obj
|
| 97 |
+
set_property -name "webtalk.xsim_export_sim" -value "5" -objects $obj
|
| 98 |
+
set_property -name "xpm_libraries" -value "XPM_CDC XPM_MEMORY" -objects $obj
|
| 99 |
+
|
| 100 |
+
# Create 'sources_1' fileset (if not found)
|
| 101 |
+
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
| 102 |
+
create_fileset -srcset sources_1
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
# Set 'sources_1' fileset object
|
| 106 |
+
set obj [get_filesets sources_1]
|
| 107 |
+
# Import local files from the original project
|
| 108 |
+
set files [list \
|
| 109 |
+
[file normalize "${origin_dir}/src/pcileech_header.svh"]\
|
| 110 |
+
[file normalize "${origin_dir}/src/pcileech_com.sv" ]\
|
| 111 |
+
[file normalize "${origin_dir}/src/pcileech_fifo.sv"]\
|
| 112 |
+
[file normalize "${origin_dir}/src/pcileech_ft601.sv"]\
|
| 113 |
+
[file normalize "${origin_dir}/src/pcileech_mux.sv"]\
|
| 114 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_a7.sv"]\
|
| 115 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_cfg_a7.sv"]\
|
| 116 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_tlp_a7.sv"]\
|
| 117 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_bar_controller.sv"]\
|
| 118 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_cfgspace_shadow.sv"]\
|
| 119 |
+
[file normalize "${origin_dir}/src/pcileech_enigma_x1_top.sv"]\
|
| 120 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0.v"]\
|
| 121 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx.v"]\
|
| 122 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"]\
|
| 123 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"]\
|
| 124 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_top.v"]\
|
| 125 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx.v"]\
|
| 126 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"]\
|
| 127 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"]\
|
| 128 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_core_top.v"]\
|
| 129 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_common.v"]\
|
| 130 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"]\
|
| 131 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_top.v"]\
|
| 132 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_wrapper.v"]\
|
| 133 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"]\
|
| 134 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_drp.v"]\
|
| 135 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_rate.v"]\
|
| 136 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_reset.v"]\
|
| 137 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"]\
|
| 138 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_7x.v"]\
|
| 139 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_7x.v"]\
|
| 140 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"]\
|
| 141 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_brams_7x.v"]\
|
| 142 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_lane.v"]\
|
| 143 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_misc.v"]\
|
| 144 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"]\
|
| 145 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_top.v"]\
|
| 146 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie2_top.v"]\
|
| 147 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_clock.v"]\
|
| 148 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_drp.v"]\
|
| 149 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_eq.v"]\
|
| 150 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_rate.v"]\
|
| 151 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_reset.v"]\
|
| 152 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_sync.v"]\
|
| 153 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_user.v"]\
|
| 154 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_wrapper.v"]\
|
| 155 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_drp.v"]\
|
| 156 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_reset.v"]\
|
| 157 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_wrapper.v"]\
|
| 158 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_rxeq_scan.v"]\
|
| 159 |
+
]
|
| 160 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 161 |
+
|
| 162 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 163 |
+
# None
|
| 164 |
+
|
| 165 |
+
# Set 'sources_1' fileset file properties for local files
|
| 166 |
+
set file "src/pcileech_header.svh"
|
| 167 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 168 |
+
set_property -name "file_type" -value "Verilog Header" -objects $file_obj
|
| 169 |
+
|
| 170 |
+
set file "src/pcileech_com.sv"
|
| 171 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 172 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 173 |
+
|
| 174 |
+
set file "src/pcileech_fifo.sv"
|
| 175 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 176 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 177 |
+
|
| 178 |
+
set file "src/pcileech_ft601.sv"
|
| 179 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 180 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 181 |
+
|
| 182 |
+
set file "src/pcileech_mux.sv"
|
| 183 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 184 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 185 |
+
|
| 186 |
+
set file "src/pcileech_pcie_a7.sv"
|
| 187 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 188 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 189 |
+
|
| 190 |
+
set file "src/pcileech_pcie_cfg_a7.sv"
|
| 191 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 192 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 193 |
+
|
| 194 |
+
set file "src/pcileech_pcie_tlp_a7.sv"
|
| 195 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 196 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 197 |
+
|
| 198 |
+
set file "src/pcileech_tlps128_bar_controller.sv"
|
| 199 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 200 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 201 |
+
|
| 202 |
+
set file "src/pcileech_tlps128_cfgspace_shadow.sv"
|
| 203 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 204 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 205 |
+
|
| 206 |
+
set file "src/pcileech_enigma_x1_top.sv"
|
| 207 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 208 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 209 |
+
|
| 210 |
+
set file "pcie_7x/pcie_7x_0.v"
|
| 211 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 212 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 213 |
+
|
| 214 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx.v"
|
| 215 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 216 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 217 |
+
|
| 218 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"
|
| 219 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 220 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 221 |
+
|
| 222 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"
|
| 223 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 224 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 225 |
+
|
| 226 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_top.v"
|
| 227 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 228 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 229 |
+
|
| 230 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx.v"
|
| 231 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 232 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 233 |
+
|
| 234 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"
|
| 235 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 236 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 237 |
+
|
| 238 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"
|
| 239 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 240 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 241 |
+
|
| 242 |
+
set file "pcie_7x/pcie_7x_0_core_top.v"
|
| 243 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 244 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 245 |
+
|
| 246 |
+
set file "pcie_7x/pcie_7x_0_gt_common.v"
|
| 247 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 248 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 249 |
+
|
| 250 |
+
set file "pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"
|
| 251 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 252 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 253 |
+
|
| 254 |
+
set file "pcie_7x/pcie_7x_0_gt_top.v"
|
| 255 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 256 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 257 |
+
|
| 258 |
+
set file "pcie_7x/pcie_7x_0_gt_wrapper.v"
|
| 259 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 260 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 261 |
+
|
| 262 |
+
set file "pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"
|
| 263 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 264 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 265 |
+
|
| 266 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_drp.v"
|
| 267 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 268 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 269 |
+
|
| 270 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_rate.v"
|
| 271 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 272 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 273 |
+
|
| 274 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_reset.v"
|
| 275 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 276 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 277 |
+
|
| 278 |
+
set file "pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"
|
| 279 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 280 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 281 |
+
|
| 282 |
+
set file "pcie_7x/pcie_7x_0_pcie_7x.v"
|
| 283 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 284 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 285 |
+
|
| 286 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_7x.v"
|
| 287 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 288 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 289 |
+
|
| 290 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"
|
| 291 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 292 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 293 |
+
|
| 294 |
+
set file "pcie_7x/pcie_7x_0_pcie_brams_7x.v"
|
| 295 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 296 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 297 |
+
|
| 298 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_lane.v"
|
| 299 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 300 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 301 |
+
|
| 302 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_misc.v"
|
| 303 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 304 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 305 |
+
|
| 306 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"
|
| 307 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 308 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 309 |
+
|
| 310 |
+
set file "pcie_7x/pcie_7x_0_pcie_top.v"
|
| 311 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 312 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 313 |
+
|
| 314 |
+
set file "pcie_7x/pcie_7x_0_pcie2_top.v"
|
| 315 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 316 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 317 |
+
|
| 318 |
+
set file "pcie_7x/pcie_7x_0_pipe_clock.v"
|
| 319 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 320 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 321 |
+
|
| 322 |
+
set file "pcie_7x/pcie_7x_0_pipe_drp.v"
|
| 323 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 324 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 325 |
+
|
| 326 |
+
set file "pcie_7x/pcie_7x_0_pipe_eq.v"
|
| 327 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 328 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 329 |
+
|
| 330 |
+
set file "pcie_7x/pcie_7x_0_pipe_rate.v"
|
| 331 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 332 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 333 |
+
|
| 334 |
+
set file "pcie_7x/pcie_7x_0_pipe_reset.v"
|
| 335 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 336 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 337 |
+
|
| 338 |
+
set file "pcie_7x/pcie_7x_0_pipe_sync.v"
|
| 339 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 340 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 341 |
+
|
| 342 |
+
set file "pcie_7x/pcie_7x_0_pipe_user.v"
|
| 343 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 344 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 345 |
+
|
| 346 |
+
set file "pcie_7x/pcie_7x_0_qpll_drp.v"
|
| 347 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 348 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 349 |
+
|
| 350 |
+
set file "pcie_7x/pcie_7x_0_pipe_wrapper.v"
|
| 351 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 352 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 353 |
+
|
| 354 |
+
set file "pcie_7x/pcie_7x_0_qpll_reset.v"
|
| 355 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 356 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 357 |
+
|
| 358 |
+
set file "pcie_7x/pcie_7x_0_qpll_wrapper.v"
|
| 359 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 360 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 361 |
+
|
| 362 |
+
set file "pcie_7x/pcie_7x_0_rxeq_scan.v"
|
| 363 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 364 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 365 |
+
|
| 366 |
+
# Set 'sources_1' fileset properties
|
| 367 |
+
set obj [get_filesets sources_1]
|
| 368 |
+
set_property -name "top" -value "pcileech_enigma_x1_top" -objects $obj
|
| 369 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
# Set 'sources_1' fileset object
|
| 373 |
+
set obj [get_filesets sources_1]
|
| 374 |
+
# Import local files from the original project
|
| 375 |
+
set files [list \
|
| 376 |
+
[file normalize "${origin_dir}/ip/pcileech_bar_zero4k.coe" ]\
|
| 377 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace.coe" ]\
|
| 378 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace_writemask.coe" ]\
|
| 379 |
+
[file normalize "${origin_dir}/ip/bram_pcie_cfgspace.xci" ]\
|
| 380 |
+
]
|
| 381 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 382 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 383 |
+
# None
|
| 384 |
+
# Set 'sources_1' fileset file properties for local files
|
| 385 |
+
set file "bram_pcie_cfgspace/bram_pcie_cfgspace.xci"
|
| 386 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 387 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 388 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 389 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 390 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
# Set 'sources_1' fileset object
|
| 395 |
+
set obj [get_filesets sources_1]
|
| 396 |
+
# Import local files from the original project
|
| 397 |
+
set files [list \
|
| 398 |
+
[file normalize "${origin_dir}/ip/drom_pcie_cfgspace_writemask.xci"]\
|
| 399 |
+
]
|
| 400 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 401 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 402 |
+
# None
|
| 403 |
+
# Set 'sources_1' fileset file properties for local files
|
| 404 |
+
set file "drom_pcie_cfgspace_writemask/drom_pcie_cfgspace_writemask.xci"
|
| 405 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 406 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 407 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 408 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 409 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
# Set 'sources_1' fileset object
|
| 414 |
+
set obj [get_filesets sources_1]
|
| 415 |
+
# Import local files from the original project
|
| 416 |
+
set files [list \
|
| 417 |
+
[file normalize "${origin_dir}/ip/fifo_74_74_clk1_bar_rd1.xci"]\
|
| 418 |
+
]
|
| 419 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 420 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 421 |
+
# None
|
| 422 |
+
# Set 'sources_1' fileset file properties for local files
|
| 423 |
+
set file "fifo_74_74_clk1_bar_rd1/fifo_74_74_clk1_bar_rd1.xci"
|
| 424 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 425 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 426 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 427 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 428 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
|
| 432 |
+
# Set 'sources_1' fileset object
|
| 433 |
+
set obj [get_filesets sources_1]
|
| 434 |
+
# Import local files from the original project
|
| 435 |
+
set files [list \
|
| 436 |
+
[file normalize "${origin_dir}/ip/bram_bar_zero4k.xci"]\
|
| 437 |
+
]
|
| 438 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 439 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 440 |
+
# None
|
| 441 |
+
# Set 'sources_1' fileset file properties for local files
|
| 442 |
+
set file "bram_bar_zero4k/bram_bar_zero4k.xci"
|
| 443 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 444 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 445 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 446 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 447 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
# Set 'sources_1' fileset object
|
| 452 |
+
set obj [get_filesets sources_1]
|
| 453 |
+
# Import local files from the original project
|
| 454 |
+
set files [list \
|
| 455 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk1_bar_rdrsp.xci"]\
|
| 456 |
+
]
|
| 457 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 458 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 459 |
+
# None
|
| 460 |
+
# Set 'sources_1' fileset file properties for local files
|
| 461 |
+
set file "fifo_134_134_clk1_bar_rdrsp/fifo_134_134_clk1_bar_rdrsp.xci"
|
| 462 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 463 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 464 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 465 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 466 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
# Set 'sources_1' fileset object
|
| 471 |
+
set obj [get_filesets sources_1]
|
| 472 |
+
# Import local files from the original project
|
| 473 |
+
set files [list \
|
| 474 |
+
[file normalize "${origin_dir}/ip/fifo_141_141_clk1_bar_wr.xci"]\
|
| 475 |
+
]
|
| 476 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 477 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 478 |
+
# None
|
| 479 |
+
# Set 'sources_1' fileset file properties for local files
|
| 480 |
+
set file "fifo_141_141_clk1_bar_wr/fifo_141_141_clk1_bar_wr.xci"
|
| 481 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 482 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 483 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 484 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 485 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
# Set 'sources_1' fileset object
|
| 490 |
+
set obj [get_filesets sources_1]
|
| 491 |
+
# Import local files from the original project
|
| 492 |
+
set files [list \
|
| 493 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2_rxfifo.xci"]\
|
| 494 |
+
]
|
| 495 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 496 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 497 |
+
# None
|
| 498 |
+
# Set 'sources_1' fileset file properties for local files
|
| 499 |
+
set file "fifo_134_134_clk2_rxfifo/fifo_134_134_clk2_rxfifo.xci"
|
| 500 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 501 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 502 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 503 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 504 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
# Set 'sources_1' fileset object
|
| 509 |
+
set obj [get_filesets sources_1]
|
| 510 |
+
# Import local files from the original project
|
| 511 |
+
set files [list \
|
| 512 |
+
[file normalize "${origin_dir}/ip/fifo_1_1_clk2.xci"]\
|
| 513 |
+
]
|
| 514 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 515 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 516 |
+
# None
|
| 517 |
+
# Set 'sources_1' fileset file properties for local files
|
| 518 |
+
set file "fifo_1_1_clk2/fifo_1_1_clk2.xci"
|
| 519 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 520 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 521 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 522 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 523 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
|
| 527 |
+
# Set 'sources_1' fileset object
|
| 528 |
+
set obj [get_filesets sources_1]
|
| 529 |
+
# Import local files from the original project
|
| 530 |
+
set files [list \
|
| 531 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2.xci"]\
|
| 532 |
+
]
|
| 533 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 534 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 535 |
+
# None
|
| 536 |
+
# Set 'sources_1' fileset file properties for local files
|
| 537 |
+
set file "fifo_134_134_clk2/fifo_134_134_clk2.xci"
|
| 538 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 539 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 540 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 541 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 542 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
|
| 546 |
+
# Set 'sources_1' fileset object
|
| 547 |
+
set obj [get_filesets sources_1]
|
| 548 |
+
# Import local files from the original project
|
| 549 |
+
set files [list \
|
| 550 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk1_fifocmd.xci"]\
|
| 551 |
+
]
|
| 552 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 553 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 554 |
+
# None
|
| 555 |
+
# Set 'sources_1' fileset file properties for local files
|
| 556 |
+
set file "fifo_64_64_clk1_fifocmd/fifo_64_64_clk1_fifocmd.xci"
|
| 557 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 558 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 559 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 560 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 561 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
# Set 'sources_1' fileset object
|
| 566 |
+
set obj [get_filesets sources_1]
|
| 567 |
+
# Import local files from the original project
|
| 568 |
+
set files [list \
|
| 569 |
+
[file normalize "${origin_dir}/ip/fifo_256_32_clk2_comtx.xci"]\
|
| 570 |
+
]
|
| 571 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 572 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 573 |
+
# None
|
| 574 |
+
# Set 'sources_1' fileset file properties for local files
|
| 575 |
+
set file "fifo_256_32_clk2_comtx/fifo_256_32_clk2_comtx.xci"
|
| 576 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 577 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 578 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 579 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 580 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
# Set 'sources_1' fileset object
|
| 585 |
+
set obj [get_filesets sources_1]
|
| 586 |
+
# Import local files from the original project
|
| 587 |
+
set files [list \
|
| 588 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk1_comtx.xci"]\
|
| 589 |
+
]
|
| 590 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 591 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 592 |
+
# None
|
| 593 |
+
# Set 'sources_1' fileset file properties for local files
|
| 594 |
+
set file "fifo_32_32_clk1_comtx/fifo_32_32_clk1_comtx.xci"
|
| 595 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 596 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 597 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 598 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 599 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
# Set 'sources_1' fileset object
|
| 604 |
+
set obj [get_filesets sources_1]
|
| 605 |
+
# Import local files from the original project
|
| 606 |
+
set files [list \
|
| 607 |
+
[file normalize "${origin_dir}/ip/fifo_129_129_clk1.xci"]\
|
| 608 |
+
]
|
| 609 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 610 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 611 |
+
# None
|
| 612 |
+
# Set 'sources_1' fileset file properties for local files
|
| 613 |
+
set file "fifo_129_129_clk1/fifo_129_129_clk1.xci"
|
| 614 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 615 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 616 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 617 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 618 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
# Set 'sources_1' fileset object
|
| 623 |
+
set obj [get_filesets sources_1]
|
| 624 |
+
# Import local files from the original project
|
| 625 |
+
set files [list \
|
| 626 |
+
[file normalize "${origin_dir}/ip/fifo_64_64.xci"]\
|
| 627 |
+
]
|
| 628 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 629 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 630 |
+
# None
|
| 631 |
+
# Set 'sources_1' fileset file properties for local files
|
| 632 |
+
set file "fifo_64_64/fifo_64_64.xci"
|
| 633 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 634 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 635 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 636 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 637 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 638 |
+
}
|
| 639 |
+
|
| 640 |
+
|
| 641 |
+
# Set 'sources_1' fileset object
|
| 642 |
+
set obj [get_filesets sources_1]
|
| 643 |
+
# Import local files from the original project
|
| 644 |
+
set files [list \
|
| 645 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk2.xci"]\
|
| 646 |
+
]
|
| 647 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 648 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 649 |
+
# None
|
| 650 |
+
# Set 'sources_1' fileset file properties for local files
|
| 651 |
+
set file "fifo_32_32_clk2/fifo_32_32_clk2.xci"
|
| 652 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 653 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 654 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 655 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 656 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
|
| 660 |
+
# Set 'sources_1' fileset object
|
| 661 |
+
set obj [get_filesets sources_1]
|
| 662 |
+
# Import local files from the original project
|
| 663 |
+
set files [list \
|
| 664 |
+
[file normalize "${origin_dir}/ip/fifo_49_49_clk2.xci"]\
|
| 665 |
+
]
|
| 666 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 667 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 668 |
+
# None
|
| 669 |
+
# Set 'sources_1' fileset file properties for local files
|
| 670 |
+
set file "fifo_49_49_clk2/fifo_49_49_clk2.xci"
|
| 671 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 672 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 673 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 674 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 675 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
|
| 679 |
+
# Set 'sources_1' fileset object
|
| 680 |
+
set obj [get_filesets sources_1]
|
| 681 |
+
# Import local files from the original project
|
| 682 |
+
set files [list \
|
| 683 |
+
[file normalize "${origin_dir}/ip/fifo_43_43_clk2.xci"]\
|
| 684 |
+
]
|
| 685 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 686 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 687 |
+
# None
|
| 688 |
+
# Set 'sources_1' fileset file properties for local files
|
| 689 |
+
set file "fifo_43_43_clk2/fifo_43_43_clk2.xci"
|
| 690 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 691 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 692 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 693 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 694 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
|
| 698 |
+
# Set 'sources_1' fileset object
|
| 699 |
+
set obj [get_filesets sources_1]
|
| 700 |
+
# Import local files from the original project
|
| 701 |
+
set files [list \
|
| 702 |
+
[file normalize "${origin_dir}/ip/fifo_34_34.xci"]\
|
| 703 |
+
]
|
| 704 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 705 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 706 |
+
# None
|
| 707 |
+
# Set 'sources_1' fileset file properties for local files
|
| 708 |
+
set file "fifo_34_34/fifo_34_34.xci"
|
| 709 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 710 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 711 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 712 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 713 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 714 |
+
}
|
| 715 |
+
|
| 716 |
+
|
| 717 |
+
# Set 'sources_1' fileset object
|
| 718 |
+
set obj [get_filesets sources_1]
|
| 719 |
+
# Import local files from the original project
|
| 720 |
+
set files [list \
|
| 721 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk2_comrx.xci" ]\
|
| 722 |
+
]
|
| 723 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 724 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 725 |
+
# None
|
| 726 |
+
# Set 'sources_1' fileset file properties for local files
|
| 727 |
+
set file "fifo_64_64_clk2_comrx/fifo_64_64_clk2_comrx.xci"
|
| 728 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 729 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 730 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 731 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 732 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 733 |
+
}
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
# Create 'constrs_1' fileset (if not found)
|
| 737 |
+
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
| 738 |
+
create_fileset -constrset constrs_1
|
| 739 |
+
}
|
| 740 |
+
# Set 'constrs_1' fileset object
|
| 741 |
+
set obj [get_filesets constrs_1]
|
| 742 |
+
# Add/Import constrs file and set constrs file properties
|
| 743 |
+
set file "[file normalize ${origin_dir}/src/pcileech_captain_75T.xdc]"
|
| 744 |
+
set file_imported [import_files -fileset constrs_1 [list $file]]
|
| 745 |
+
set file "src/pcileech_captain_75T.xdc"
|
| 746 |
+
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
|
| 747 |
+
set_property -name "file_type" -value "XDC" -objects $file_obj
|
| 748 |
+
|
| 749 |
+
# Set 'constrs_1' fileset properties
|
| 750 |
+
set obj [get_filesets constrs_1]
|
| 751 |
+
set_property -name "target_part" -value "xc7a75tfgg484-2" -objects $obj
|
| 752 |
+
|
| 753 |
+
# Create 'sim_1' fileset (if not found)
|
| 754 |
+
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
| 755 |
+
create_fileset -simset sim_1
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
# Set 'sim_1' fileset object
|
| 759 |
+
set obj [get_filesets sim_1]
|
| 760 |
+
# Empty (no sources present)
|
| 761 |
+
|
| 762 |
+
# Set 'sim_1' fileset properties
|
| 763 |
+
set obj [get_filesets sim_1]
|
| 764 |
+
set_property -name "top" -value "pcileech_enigma_x1_top" -objects $obj
|
| 765 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 766 |
+
|
| 767 |
+
# Upgrade IP from the currently installed Vivado version
|
| 768 |
+
upgrade_ip [get_ips *]
|
| 769 |
+
|
| 770 |
+
# Set 'utils_1' fileset object
|
| 771 |
+
set obj [get_filesets utils_1]
|
| 772 |
+
# Empty (no sources present)
|
| 773 |
+
|
| 774 |
+
# Set 'utils_1' fileset properties
|
| 775 |
+
set obj [get_filesets utils_1]
|
| 776 |
+
|
| 777 |
+
# Create 'synth_1' run (if not found)
|
| 778 |
+
if {[string equal [get_runs -quiet synth_1] ""]} {
|
| 779 |
+
create_run -name synth_1 -part xc7a75tfgg484-2 -flow {Vivado Synthesis 2022} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
|
| 780 |
+
} else {
|
| 781 |
+
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
|
| 782 |
+
set_property flow "Vivado Synthesis 2022" [get_runs synth_1]
|
| 783 |
+
}
|
| 784 |
+
set obj [get_runs synth_1]
|
| 785 |
+
set_property set_report_strategy_name 1 $obj
|
| 786 |
+
set_property report_strategy {Vivado Synthesis Default Reports} $obj
|
| 787 |
+
set_property set_report_strategy_name 0 $obj
|
| 788 |
+
# Create 'synth_1_synth_report_utilization_0' report (if not found)
|
| 789 |
+
if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
|
| 790 |
+
create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
|
| 791 |
+
}
|
| 792 |
+
set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
|
| 793 |
+
if { $obj != "" } {
|
| 794 |
+
|
| 795 |
+
}
|
| 796 |
+
set obj [get_runs synth_1]
|
| 797 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 798 |
+
set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
|
| 799 |
+
|
| 800 |
+
# set the current synth run
|
| 801 |
+
current_run -synthesis [get_runs synth_1]
|
| 802 |
+
|
| 803 |
+
# Create 'impl_1' run (if not found)
|
| 804 |
+
if {[string equal [get_runs -quiet impl_1] ""]} {
|
| 805 |
+
create_run -name impl_1 -part xc7a75tfgg484-2 -flow {Vivado Implementation 2022} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
|
| 806 |
+
} else {
|
| 807 |
+
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
|
| 808 |
+
set_property flow "Vivado Implementation 2022" [get_runs impl_1]
|
| 809 |
+
}
|
| 810 |
+
set obj [get_runs impl_1]
|
| 811 |
+
set_property set_report_strategy_name 1 $obj
|
| 812 |
+
set_property report_strategy {Vivado Implementation Default Reports} $obj
|
| 813 |
+
set_property set_report_strategy_name 0 $obj
|
| 814 |
+
# Create 'impl_1_init_report_timing_summary_0' report (if not found)
|
| 815 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
|
| 816 |
+
create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
|
| 817 |
+
}
|
| 818 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
|
| 819 |
+
if { $obj != "" } {
|
| 820 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 821 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 822 |
+
|
| 823 |
+
}
|
| 824 |
+
# Create 'impl_1_opt_report_drc_0' report (if not found)
|
| 825 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
|
| 826 |
+
create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
|
| 827 |
+
}
|
| 828 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
|
| 829 |
+
if { $obj != "" } {
|
| 830 |
+
|
| 831 |
+
}
|
| 832 |
+
# Create 'impl_1_opt_report_timing_summary_0' report (if not found)
|
| 833 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
|
| 834 |
+
create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
|
| 835 |
+
}
|
| 836 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
|
| 837 |
+
if { $obj != "" } {
|
| 838 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 839 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 840 |
+
|
| 841 |
+
}
|
| 842 |
+
# Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
|
| 843 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
|
| 844 |
+
create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
|
| 845 |
+
}
|
| 846 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
|
| 847 |
+
if { $obj != "" } {
|
| 848 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 849 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 850 |
+
|
| 851 |
+
}
|
| 852 |
+
# Create 'impl_1_place_report_io_0' report (if not found)
|
| 853 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
|
| 854 |
+
create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
|
| 855 |
+
}
|
| 856 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
|
| 857 |
+
if { $obj != "" } {
|
| 858 |
+
|
| 859 |
+
}
|
| 860 |
+
# Create 'impl_1_place_report_utilization_0' report (if not found)
|
| 861 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
|
| 862 |
+
create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
|
| 863 |
+
}
|
| 864 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
|
| 865 |
+
if { $obj != "" } {
|
| 866 |
+
|
| 867 |
+
}
|
| 868 |
+
# Create 'impl_1_place_report_control_sets_0' report (if not found)
|
| 869 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
|
| 870 |
+
create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
|
| 871 |
+
}
|
| 872 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
|
| 873 |
+
if { $obj != "" } {
|
| 874 |
+
set_property -name "options.verbose" -value "1" -objects $obj
|
| 875 |
+
|
| 876 |
+
}
|
| 877 |
+
# Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
|
| 878 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
|
| 879 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 880 |
+
}
|
| 881 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
|
| 882 |
+
if { $obj != "" } {
|
| 883 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 884 |
+
|
| 885 |
+
}
|
| 886 |
+
# Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
|
| 887 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
|
| 888 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 889 |
+
}
|
| 890 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
|
| 891 |
+
if { $obj != "" } {
|
| 892 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 893 |
+
|
| 894 |
+
}
|
| 895 |
+
# Create 'impl_1_place_report_timing_summary_0' report (if not found)
|
| 896 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
|
| 897 |
+
create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
|
| 898 |
+
}
|
| 899 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
|
| 900 |
+
if { $obj != "" } {
|
| 901 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 902 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 903 |
+
|
| 904 |
+
}
|
| 905 |
+
# Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
|
| 906 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
|
| 907 |
+
create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
|
| 908 |
+
}
|
| 909 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
|
| 910 |
+
if { $obj != "" } {
|
| 911 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 912 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 913 |
+
|
| 914 |
+
}
|
| 915 |
+
# Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
|
| 916 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
|
| 917 |
+
create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
|
| 918 |
+
}
|
| 919 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
|
| 920 |
+
if { $obj != "" } {
|
| 921 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 922 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 923 |
+
|
| 924 |
+
}
|
| 925 |
+
# Create 'impl_1_route_report_drc_0' report (if not found)
|
| 926 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
|
| 927 |
+
create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
|
| 928 |
+
}
|
| 929 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
|
| 930 |
+
if { $obj != "" } {
|
| 931 |
+
|
| 932 |
+
}
|
| 933 |
+
# Create 'impl_1_route_report_methodology_0' report (if not found)
|
| 934 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
|
| 935 |
+
create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
|
| 936 |
+
}
|
| 937 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
|
| 938 |
+
if { $obj != "" } {
|
| 939 |
+
|
| 940 |
+
}
|
| 941 |
+
# Create 'impl_1_route_report_power_0' report (if not found)
|
| 942 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
|
| 943 |
+
create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
|
| 944 |
+
}
|
| 945 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
|
| 946 |
+
if { $obj != "" } {
|
| 947 |
+
|
| 948 |
+
}
|
| 949 |
+
# Create 'impl_1_route_report_route_status_0' report (if not found)
|
| 950 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
|
| 951 |
+
create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
|
| 952 |
+
}
|
| 953 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
|
| 954 |
+
if { $obj != "" } {
|
| 955 |
+
|
| 956 |
+
}
|
| 957 |
+
# Create 'impl_1_route_report_timing_summary_0' report (if not found)
|
| 958 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
|
| 959 |
+
create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
|
| 960 |
+
}
|
| 961 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
|
| 962 |
+
if { $obj != "" } {
|
| 963 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 964 |
+
|
| 965 |
+
}
|
| 966 |
+
# Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
|
| 967 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
|
| 968 |
+
create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
|
| 969 |
+
}
|
| 970 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
|
| 971 |
+
if { $obj != "" } {
|
| 972 |
+
|
| 973 |
+
}
|
| 974 |
+
# Create 'impl_1_route_report_clock_utilization_0' report (if not found)
|
| 975 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
|
| 976 |
+
create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
|
| 977 |
+
}
|
| 978 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
|
| 979 |
+
if { $obj != "" } {
|
| 980 |
+
|
| 981 |
+
}
|
| 982 |
+
# Create 'impl_1_route_report_bus_skew_0' report (if not found)
|
| 983 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
|
| 984 |
+
create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
|
| 985 |
+
}
|
| 986 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
|
| 987 |
+
if { $obj != "" } {
|
| 988 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 989 |
+
|
| 990 |
+
}
|
| 991 |
+
# Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
|
| 992 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
|
| 993 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
|
| 994 |
+
}
|
| 995 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
|
| 996 |
+
if { $obj != "" } {
|
| 997 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 998 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 999 |
+
|
| 1000 |
+
}
|
| 1001 |
+
# Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
|
| 1002 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
|
| 1003 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
|
| 1004 |
+
}
|
| 1005 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
|
| 1006 |
+
if { $obj != "" } {
|
| 1007 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 1008 |
+
|
| 1009 |
+
}
|
| 1010 |
+
set obj [get_runs impl_1]
|
| 1011 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 1012 |
+
set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
|
| 1013 |
+
set_property -name "steps.phys_opt_design.is_enabled" -value "1" -objects $obj
|
| 1014 |
+
set_property -name "steps.write_bitstream.args.bin_file" -value "1" -objects $obj
|
| 1015 |
+
set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
|
| 1016 |
+
set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
|
| 1017 |
+
|
| 1018 |
+
# set the current impl run
|
| 1019 |
+
current_run -implementation [get_runs impl_1]
|
| 1020 |
+
|
| 1021 |
+
puts "INFO: Project created:${_xil_proj_name_}"
|
| 1022 |
+
# Create 'drc_1' gadget (if not found)
|
| 1023 |
+
if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
|
| 1024 |
+
create_dashboard_gadget -name {drc_1} -type drc
|
| 1025 |
+
}
|
| 1026 |
+
set obj [get_dashboard_gadgets [ list "drc_1" ] ]
|
| 1027 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
|
| 1028 |
+
|
| 1029 |
+
# Create 'methodology_1' gadget (if not found)
|
| 1030 |
+
if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
|
| 1031 |
+
create_dashboard_gadget -name {methodology_1} -type methodology
|
| 1032 |
+
}
|
| 1033 |
+
set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
|
| 1034 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
|
| 1035 |
+
|
| 1036 |
+
# Create 'power_1' gadget (if not found)
|
| 1037 |
+
if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
|
| 1038 |
+
create_dashboard_gadget -name {power_1} -type power
|
| 1039 |
+
}
|
| 1040 |
+
set obj [get_dashboard_gadgets [ list "power_1" ] ]
|
| 1041 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
|
| 1042 |
+
|
| 1043 |
+
# Create 'timing_1' gadget (if not found)
|
| 1044 |
+
if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
|
| 1045 |
+
create_dashboard_gadget -name {timing_1} -type timing
|
| 1046 |
+
}
|
| 1047 |
+
set obj [get_dashboard_gadgets [ list "timing_1" ] ]
|
| 1048 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
|
| 1049 |
+
|
| 1050 |
+
# Create 'utilization_1' gadget (if not found)
|
| 1051 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
|
| 1052 |
+
create_dashboard_gadget -name {utilization_1} -type utilization
|
| 1053 |
+
}
|
| 1054 |
+
set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
|
| 1055 |
+
set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
|
| 1056 |
+
set_property -name "run.step" -value "synth_design" -objects $obj
|
| 1057 |
+
set_property -name "run.type" -value "synthesis" -objects $obj
|
| 1058 |
+
|
| 1059 |
+
# Create 'utilization_2' gadget (if not found)
|
| 1060 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
|
| 1061 |
+
create_dashboard_gadget -name {utilization_2} -type utilization
|
| 1062 |
+
}
|
| 1063 |
+
set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
|
| 1064 |
+
set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
|
| 1065 |
+
|
| 1066 |
+
move_dashboard_gadget -name {utilization_1} -row 0 -col 0
|
| 1067 |
+
move_dashboard_gadget -name {power_1} -row 1 -col 0
|
| 1068 |
+
move_dashboard_gadget -name {drc_1} -row 2 -col 0
|
| 1069 |
+
move_dashboard_gadget -name {timing_1} -row 0 -col 1
|
| 1070 |
+
move_dashboard_gadget -name {utilization_2} -row 1 -col 1
|
| 1071 |
+
move_dashboard_gadget -name {methodology_1} -row 2 -col 1
|
JOKOSAHS_DMA-Pcileech/vivado_generate_project_enigma_x1.tcl
ADDED
|
@@ -0,0 +1,1071 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Vivado generated .tcl for creating the pcileech_enigma_x1 vivado project.
|
| 3 |
+
# Run from within "Vivado Tcl Shell" with command: source vivado_generate_project.tcl -notrace
|
| 4 |
+
#
|
| 5 |
+
|
| 6 |
+
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
| 7 |
+
set origin_dir "."
|
| 8 |
+
|
| 9 |
+
# Use origin directory path location variable, if specified in the tcl shell
|
| 10 |
+
if { [info exists ::origin_dir_loc] } {
|
| 11 |
+
set origin_dir $::origin_dir_loc
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
# Set the project name
|
| 15 |
+
set _xil_proj_name_ "pcileech_enigma_x1"
|
| 16 |
+
|
| 17 |
+
# Use project name variable, if specified in the tcl shell
|
| 18 |
+
if { [info exists ::user_project_name] } {
|
| 19 |
+
set _xil_proj_name_ $::user_project_name
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
variable script_file
|
| 23 |
+
set script_file "vivado_generate_project.tcl"
|
| 24 |
+
|
| 25 |
+
# Help information for this script
|
| 26 |
+
proc print_help {} {
|
| 27 |
+
variable script_file
|
| 28 |
+
puts "\nDescription:"
|
| 29 |
+
puts "Recreate a Vivado project from this script. The created project will be"
|
| 30 |
+
puts "functionally equivalent to the original project for which this script was"
|
| 31 |
+
puts "generated. The script contains commands for creating a project, filesets,"
|
| 32 |
+
puts "runs, adding/importing sources and setting properties on various objects.\n"
|
| 33 |
+
puts "Syntax:"
|
| 34 |
+
puts "$script_file"
|
| 35 |
+
puts "$script_file -tclargs \[--origin_dir <path>\]"
|
| 36 |
+
puts "$script_file -tclargs \[--project_name <name>\]"
|
| 37 |
+
puts "$script_file -tclargs \[--help\]\n"
|
| 38 |
+
puts "Usage:"
|
| 39 |
+
puts "Name Description"
|
| 40 |
+
puts "-------------------------------------------------------------------------"
|
| 41 |
+
puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
|
| 42 |
+
puts " origin_dir path value is \".\", otherwise, the value"
|
| 43 |
+
puts " that was set with the \"-paths_relative_to\" switch"
|
| 44 |
+
puts " when this script was generated.\n"
|
| 45 |
+
puts "\[--project_name <name>\] Create project with the specified name. Default"
|
| 46 |
+
puts " name is the name of the project from where this"
|
| 47 |
+
puts " script was generated.\n"
|
| 48 |
+
puts "\[--help\] Print help information for this script"
|
| 49 |
+
puts "-------------------------------------------------------------------------\n"
|
| 50 |
+
exit 0
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
if { $::argc > 0 } {
|
| 54 |
+
for {set i 0} {$i < $::argc} {incr i} {
|
| 55 |
+
set option [string trim [lindex $::argv $i]]
|
| 56 |
+
switch -regexp -- $option {
|
| 57 |
+
"--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
|
| 58 |
+
"--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
|
| 59 |
+
"--help" { print_help }
|
| 60 |
+
default {
|
| 61 |
+
if { [regexp {^-} $option] } {
|
| 62 |
+
puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
|
| 63 |
+
return 1
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
# Set the directory path for the original project from where this script was exported
|
| 71 |
+
set orig_proj_dir "[file normalize "$origin_dir/pcileech_enigma_x1"]"
|
| 72 |
+
|
| 73 |
+
# Create project
|
| 74 |
+
create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7a75tfgg484-2
|
| 75 |
+
|
| 76 |
+
# Set the directory path for the new project
|
| 77 |
+
set proj_dir [get_property directory [current_project]]
|
| 78 |
+
|
| 79 |
+
# Set project properties
|
| 80 |
+
set obj [current_project]
|
| 81 |
+
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
|
| 82 |
+
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
|
| 83 |
+
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
|
| 84 |
+
set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
|
| 85 |
+
set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
|
| 86 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 87 |
+
set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
|
| 88 |
+
set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
|
| 89 |
+
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
|
| 90 |
+
set_property -name "simulator_language" -value "Mixed" -objects $obj
|
| 91 |
+
set_property -name "webtalk.activehdl_export_sim" -value "5" -objects $obj
|
| 92 |
+
set_property -name "webtalk.ies_export_sim" -value "5" -objects $obj
|
| 93 |
+
set_property -name "webtalk.modelsim_export_sim" -value "5" -objects $obj
|
| 94 |
+
set_property -name "webtalk.questa_export_sim" -value "5" -objects $obj
|
| 95 |
+
set_property -name "webtalk.riviera_export_sim" -value "5" -objects $obj
|
| 96 |
+
set_property -name "webtalk.vcs_export_sim" -value "5" -objects $obj
|
| 97 |
+
set_property -name "webtalk.xsim_export_sim" -value "5" -objects $obj
|
| 98 |
+
set_property -name "xpm_libraries" -value "XPM_CDC XPM_MEMORY" -objects $obj
|
| 99 |
+
|
| 100 |
+
# Create 'sources_1' fileset (if not found)
|
| 101 |
+
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
| 102 |
+
create_fileset -srcset sources_1
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
# Set 'sources_1' fileset object
|
| 106 |
+
set obj [get_filesets sources_1]
|
| 107 |
+
# Import local files from the original project
|
| 108 |
+
set files [list \
|
| 109 |
+
[file normalize "${origin_dir}/src/pcileech_header.svh"]\
|
| 110 |
+
[file normalize "${origin_dir}/src/pcileech_com.sv" ]\
|
| 111 |
+
[file normalize "${origin_dir}/src/pcileech_fifo.sv"]\
|
| 112 |
+
[file normalize "${origin_dir}/src/pcileech_ft601.sv"]\
|
| 113 |
+
[file normalize "${origin_dir}/src/pcileech_mux.sv"]\
|
| 114 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_a7.sv"]\
|
| 115 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_cfg_a7.sv"]\
|
| 116 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_tlp_a7.sv"]\
|
| 117 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_bar_controller.sv"]\
|
| 118 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_cfgspace_shadow.sv"]\
|
| 119 |
+
[file normalize "${origin_dir}/src/pcileech_enigma_x1_top.sv"]\
|
| 120 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0.v"]\
|
| 121 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx.v"]\
|
| 122 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"]\
|
| 123 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"]\
|
| 124 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_top.v"]\
|
| 125 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx.v"]\
|
| 126 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"]\
|
| 127 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"]\
|
| 128 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_core_top.v"]\
|
| 129 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_common.v"]\
|
| 130 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"]\
|
| 131 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_top.v"]\
|
| 132 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_wrapper.v"]\
|
| 133 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"]\
|
| 134 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_drp.v"]\
|
| 135 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_rate.v"]\
|
| 136 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_reset.v"]\
|
| 137 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"]\
|
| 138 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_7x.v"]\
|
| 139 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_7x.v"]\
|
| 140 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"]\
|
| 141 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_brams_7x.v"]\
|
| 142 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_lane.v"]\
|
| 143 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_misc.v"]\
|
| 144 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"]\
|
| 145 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_top.v"]\
|
| 146 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie2_top.v"]\
|
| 147 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_clock.v"]\
|
| 148 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_drp.v"]\
|
| 149 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_eq.v"]\
|
| 150 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_rate.v"]\
|
| 151 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_reset.v"]\
|
| 152 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_sync.v"]\
|
| 153 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_user.v"]\
|
| 154 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_wrapper.v"]\
|
| 155 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_drp.v"]\
|
| 156 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_reset.v"]\
|
| 157 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_wrapper.v"]\
|
| 158 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_rxeq_scan.v"]\
|
| 159 |
+
]
|
| 160 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 161 |
+
|
| 162 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 163 |
+
# None
|
| 164 |
+
|
| 165 |
+
# Set 'sources_1' fileset file properties for local files
|
| 166 |
+
set file "src/pcileech_header.svh"
|
| 167 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 168 |
+
set_property -name "file_type" -value "Verilog Header" -objects $file_obj
|
| 169 |
+
|
| 170 |
+
set file "src/pcileech_com.sv"
|
| 171 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 172 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 173 |
+
|
| 174 |
+
set file "src/pcileech_fifo.sv"
|
| 175 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 176 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 177 |
+
|
| 178 |
+
set file "src/pcileech_ft601.sv"
|
| 179 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 180 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 181 |
+
|
| 182 |
+
set file "src/pcileech_mux.sv"
|
| 183 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 184 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 185 |
+
|
| 186 |
+
set file "src/pcileech_pcie_a7.sv"
|
| 187 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 188 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 189 |
+
|
| 190 |
+
set file "src/pcileech_pcie_cfg_a7.sv"
|
| 191 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 192 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 193 |
+
|
| 194 |
+
set file "src/pcileech_pcie_tlp_a7.sv"
|
| 195 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 196 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 197 |
+
|
| 198 |
+
set file "src/pcileech_tlps128_bar_controller.sv"
|
| 199 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 200 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 201 |
+
|
| 202 |
+
set file "src/pcileech_tlps128_cfgspace_shadow.sv"
|
| 203 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 204 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 205 |
+
|
| 206 |
+
set file "src/pcileech_enigma_x1_top.sv"
|
| 207 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 208 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 209 |
+
|
| 210 |
+
set file "pcie_7x/pcie_7x_0.v"
|
| 211 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 212 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 213 |
+
|
| 214 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx.v"
|
| 215 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 216 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 217 |
+
|
| 218 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"
|
| 219 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 220 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 221 |
+
|
| 222 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"
|
| 223 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 224 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 225 |
+
|
| 226 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_top.v"
|
| 227 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 228 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 229 |
+
|
| 230 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx.v"
|
| 231 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 232 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 233 |
+
|
| 234 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"
|
| 235 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 236 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 237 |
+
|
| 238 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"
|
| 239 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 240 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 241 |
+
|
| 242 |
+
set file "pcie_7x/pcie_7x_0_core_top.v"
|
| 243 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 244 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 245 |
+
|
| 246 |
+
set file "pcie_7x/pcie_7x_0_gt_common.v"
|
| 247 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 248 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 249 |
+
|
| 250 |
+
set file "pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"
|
| 251 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 252 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 253 |
+
|
| 254 |
+
set file "pcie_7x/pcie_7x_0_gt_top.v"
|
| 255 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 256 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 257 |
+
|
| 258 |
+
set file "pcie_7x/pcie_7x_0_gt_wrapper.v"
|
| 259 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 260 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 261 |
+
|
| 262 |
+
set file "pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"
|
| 263 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 264 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 265 |
+
|
| 266 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_drp.v"
|
| 267 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 268 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 269 |
+
|
| 270 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_rate.v"
|
| 271 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 272 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 273 |
+
|
| 274 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_reset.v"
|
| 275 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 276 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 277 |
+
|
| 278 |
+
set file "pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"
|
| 279 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 280 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 281 |
+
|
| 282 |
+
set file "pcie_7x/pcie_7x_0_pcie_7x.v"
|
| 283 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 284 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 285 |
+
|
| 286 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_7x.v"
|
| 287 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 288 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 289 |
+
|
| 290 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"
|
| 291 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 292 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 293 |
+
|
| 294 |
+
set file "pcie_7x/pcie_7x_0_pcie_brams_7x.v"
|
| 295 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 296 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 297 |
+
|
| 298 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_lane.v"
|
| 299 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 300 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 301 |
+
|
| 302 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_misc.v"
|
| 303 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 304 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 305 |
+
|
| 306 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"
|
| 307 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 308 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 309 |
+
|
| 310 |
+
set file "pcie_7x/pcie_7x_0_pcie_top.v"
|
| 311 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 312 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 313 |
+
|
| 314 |
+
set file "pcie_7x/pcie_7x_0_pcie2_top.v"
|
| 315 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 316 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 317 |
+
|
| 318 |
+
set file "pcie_7x/pcie_7x_0_pipe_clock.v"
|
| 319 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 320 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 321 |
+
|
| 322 |
+
set file "pcie_7x/pcie_7x_0_pipe_drp.v"
|
| 323 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 324 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 325 |
+
|
| 326 |
+
set file "pcie_7x/pcie_7x_0_pipe_eq.v"
|
| 327 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 328 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 329 |
+
|
| 330 |
+
set file "pcie_7x/pcie_7x_0_pipe_rate.v"
|
| 331 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 332 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 333 |
+
|
| 334 |
+
set file "pcie_7x/pcie_7x_0_pipe_reset.v"
|
| 335 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 336 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 337 |
+
|
| 338 |
+
set file "pcie_7x/pcie_7x_0_pipe_sync.v"
|
| 339 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 340 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 341 |
+
|
| 342 |
+
set file "pcie_7x/pcie_7x_0_pipe_user.v"
|
| 343 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 344 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 345 |
+
|
| 346 |
+
set file "pcie_7x/pcie_7x_0_qpll_drp.v"
|
| 347 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 348 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 349 |
+
|
| 350 |
+
set file "pcie_7x/pcie_7x_0_pipe_wrapper.v"
|
| 351 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 352 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 353 |
+
|
| 354 |
+
set file "pcie_7x/pcie_7x_0_qpll_reset.v"
|
| 355 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 356 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 357 |
+
|
| 358 |
+
set file "pcie_7x/pcie_7x_0_qpll_wrapper.v"
|
| 359 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 360 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 361 |
+
|
| 362 |
+
set file "pcie_7x/pcie_7x_0_rxeq_scan.v"
|
| 363 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 364 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 365 |
+
|
| 366 |
+
# Set 'sources_1' fileset properties
|
| 367 |
+
set obj [get_filesets sources_1]
|
| 368 |
+
set_property -name "top" -value "pcileech_enigma_x1_top" -objects $obj
|
| 369 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
# Set 'sources_1' fileset object
|
| 373 |
+
set obj [get_filesets sources_1]
|
| 374 |
+
# Import local files from the original project
|
| 375 |
+
set files [list \
|
| 376 |
+
[file normalize "${origin_dir}/ip/pcileech_bar_zero4k.coe" ]\
|
| 377 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace.coe" ]\
|
| 378 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace_writemask.coe" ]\
|
| 379 |
+
[file normalize "${origin_dir}/ip/bram_pcie_cfgspace.xci" ]\
|
| 380 |
+
]
|
| 381 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 382 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 383 |
+
# None
|
| 384 |
+
# Set 'sources_1' fileset file properties for local files
|
| 385 |
+
set file "bram_pcie_cfgspace/bram_pcie_cfgspace.xci"
|
| 386 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 387 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 388 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 389 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 390 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
# Set 'sources_1' fileset object
|
| 395 |
+
set obj [get_filesets sources_1]
|
| 396 |
+
# Import local files from the original project
|
| 397 |
+
set files [list \
|
| 398 |
+
[file normalize "${origin_dir}/ip/drom_pcie_cfgspace_writemask.xci"]\
|
| 399 |
+
]
|
| 400 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 401 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 402 |
+
# None
|
| 403 |
+
# Set 'sources_1' fileset file properties for local files
|
| 404 |
+
set file "drom_pcie_cfgspace_writemask/drom_pcie_cfgspace_writemask.xci"
|
| 405 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 406 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 407 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 408 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 409 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
# Set 'sources_1' fileset object
|
| 414 |
+
set obj [get_filesets sources_1]
|
| 415 |
+
# Import local files from the original project
|
| 416 |
+
set files [list \
|
| 417 |
+
[file normalize "${origin_dir}/ip/fifo_74_74_clk1_bar_rd1.xci"]\
|
| 418 |
+
]
|
| 419 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 420 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 421 |
+
# None
|
| 422 |
+
# Set 'sources_1' fileset file properties for local files
|
| 423 |
+
set file "fifo_74_74_clk1_bar_rd1/fifo_74_74_clk1_bar_rd1.xci"
|
| 424 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 425 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 426 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 427 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 428 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
|
| 432 |
+
# Set 'sources_1' fileset object
|
| 433 |
+
set obj [get_filesets sources_1]
|
| 434 |
+
# Import local files from the original project
|
| 435 |
+
set files [list \
|
| 436 |
+
[file normalize "${origin_dir}/ip/bram_bar_zero4k.xci"]\
|
| 437 |
+
]
|
| 438 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 439 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 440 |
+
# None
|
| 441 |
+
# Set 'sources_1' fileset file properties for local files
|
| 442 |
+
set file "bram_bar_zero4k/bram_bar_zero4k.xci"
|
| 443 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 444 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 445 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 446 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 447 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
# Set 'sources_1' fileset object
|
| 452 |
+
set obj [get_filesets sources_1]
|
| 453 |
+
# Import local files from the original project
|
| 454 |
+
set files [list \
|
| 455 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk1_bar_rdrsp.xci"]\
|
| 456 |
+
]
|
| 457 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 458 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 459 |
+
# None
|
| 460 |
+
# Set 'sources_1' fileset file properties for local files
|
| 461 |
+
set file "fifo_134_134_clk1_bar_rdrsp/fifo_134_134_clk1_bar_rdrsp.xci"
|
| 462 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 463 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 464 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 465 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 466 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
# Set 'sources_1' fileset object
|
| 471 |
+
set obj [get_filesets sources_1]
|
| 472 |
+
# Import local files from the original project
|
| 473 |
+
set files [list \
|
| 474 |
+
[file normalize "${origin_dir}/ip/fifo_141_141_clk1_bar_wr.xci"]\
|
| 475 |
+
]
|
| 476 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 477 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 478 |
+
# None
|
| 479 |
+
# Set 'sources_1' fileset file properties for local files
|
| 480 |
+
set file "fifo_141_141_clk1_bar_wr/fifo_141_141_clk1_bar_wr.xci"
|
| 481 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 482 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 483 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 484 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 485 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
# Set 'sources_1' fileset object
|
| 490 |
+
set obj [get_filesets sources_1]
|
| 491 |
+
# Import local files from the original project
|
| 492 |
+
set files [list \
|
| 493 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2_rxfifo.xci"]\
|
| 494 |
+
]
|
| 495 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 496 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 497 |
+
# None
|
| 498 |
+
# Set 'sources_1' fileset file properties for local files
|
| 499 |
+
set file "fifo_134_134_clk2_rxfifo/fifo_134_134_clk2_rxfifo.xci"
|
| 500 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 501 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 502 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 503 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 504 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
# Set 'sources_1' fileset object
|
| 509 |
+
set obj [get_filesets sources_1]
|
| 510 |
+
# Import local files from the original project
|
| 511 |
+
set files [list \
|
| 512 |
+
[file normalize "${origin_dir}/ip/fifo_1_1_clk2.xci"]\
|
| 513 |
+
]
|
| 514 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 515 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 516 |
+
# None
|
| 517 |
+
# Set 'sources_1' fileset file properties for local files
|
| 518 |
+
set file "fifo_1_1_clk2/fifo_1_1_clk2.xci"
|
| 519 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 520 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 521 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 522 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 523 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
|
| 527 |
+
# Set 'sources_1' fileset object
|
| 528 |
+
set obj [get_filesets sources_1]
|
| 529 |
+
# Import local files from the original project
|
| 530 |
+
set files [list \
|
| 531 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2.xci"]\
|
| 532 |
+
]
|
| 533 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 534 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 535 |
+
# None
|
| 536 |
+
# Set 'sources_1' fileset file properties for local files
|
| 537 |
+
set file "fifo_134_134_clk2/fifo_134_134_clk2.xci"
|
| 538 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 539 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 540 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 541 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 542 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
|
| 546 |
+
# Set 'sources_1' fileset object
|
| 547 |
+
set obj [get_filesets sources_1]
|
| 548 |
+
# Import local files from the original project
|
| 549 |
+
set files [list \
|
| 550 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk1_fifocmd.xci"]\
|
| 551 |
+
]
|
| 552 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 553 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 554 |
+
# None
|
| 555 |
+
# Set 'sources_1' fileset file properties for local files
|
| 556 |
+
set file "fifo_64_64_clk1_fifocmd/fifo_64_64_clk1_fifocmd.xci"
|
| 557 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 558 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 559 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 560 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 561 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
# Set 'sources_1' fileset object
|
| 566 |
+
set obj [get_filesets sources_1]
|
| 567 |
+
# Import local files from the original project
|
| 568 |
+
set files [list \
|
| 569 |
+
[file normalize "${origin_dir}/ip/fifo_256_32_clk2_comtx.xci"]\
|
| 570 |
+
]
|
| 571 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 572 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 573 |
+
# None
|
| 574 |
+
# Set 'sources_1' fileset file properties for local files
|
| 575 |
+
set file "fifo_256_32_clk2_comtx/fifo_256_32_clk2_comtx.xci"
|
| 576 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 577 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 578 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 579 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 580 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
# Set 'sources_1' fileset object
|
| 585 |
+
set obj [get_filesets sources_1]
|
| 586 |
+
# Import local files from the original project
|
| 587 |
+
set files [list \
|
| 588 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk1_comtx.xci"]\
|
| 589 |
+
]
|
| 590 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 591 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 592 |
+
# None
|
| 593 |
+
# Set 'sources_1' fileset file properties for local files
|
| 594 |
+
set file "fifo_32_32_clk1_comtx/fifo_32_32_clk1_comtx.xci"
|
| 595 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 596 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 597 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 598 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 599 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
# Set 'sources_1' fileset object
|
| 604 |
+
set obj [get_filesets sources_1]
|
| 605 |
+
# Import local files from the original project
|
| 606 |
+
set files [list \
|
| 607 |
+
[file normalize "${origin_dir}/ip/fifo_129_129_clk1.xci"]\
|
| 608 |
+
]
|
| 609 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 610 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 611 |
+
# None
|
| 612 |
+
# Set 'sources_1' fileset file properties for local files
|
| 613 |
+
set file "fifo_129_129_clk1/fifo_129_129_clk1.xci"
|
| 614 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 615 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 616 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 617 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 618 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
# Set 'sources_1' fileset object
|
| 623 |
+
set obj [get_filesets sources_1]
|
| 624 |
+
# Import local files from the original project
|
| 625 |
+
set files [list \
|
| 626 |
+
[file normalize "${origin_dir}/ip/fifo_64_64.xci"]\
|
| 627 |
+
]
|
| 628 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 629 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 630 |
+
# None
|
| 631 |
+
# Set 'sources_1' fileset file properties for local files
|
| 632 |
+
set file "fifo_64_64/fifo_64_64.xci"
|
| 633 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 634 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 635 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 636 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 637 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 638 |
+
}
|
| 639 |
+
|
| 640 |
+
|
| 641 |
+
# Set 'sources_1' fileset object
|
| 642 |
+
set obj [get_filesets sources_1]
|
| 643 |
+
# Import local files from the original project
|
| 644 |
+
set files [list \
|
| 645 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk2.xci"]\
|
| 646 |
+
]
|
| 647 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 648 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 649 |
+
# None
|
| 650 |
+
# Set 'sources_1' fileset file properties for local files
|
| 651 |
+
set file "fifo_32_32_clk2/fifo_32_32_clk2.xci"
|
| 652 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 653 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 654 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 655 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 656 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
|
| 660 |
+
# Set 'sources_1' fileset object
|
| 661 |
+
set obj [get_filesets sources_1]
|
| 662 |
+
# Import local files from the original project
|
| 663 |
+
set files [list \
|
| 664 |
+
[file normalize "${origin_dir}/ip/fifo_49_49_clk2.xci"]\
|
| 665 |
+
]
|
| 666 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 667 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 668 |
+
# None
|
| 669 |
+
# Set 'sources_1' fileset file properties for local files
|
| 670 |
+
set file "fifo_49_49_clk2/fifo_49_49_clk2.xci"
|
| 671 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 672 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 673 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 674 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 675 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
|
| 679 |
+
# Set 'sources_1' fileset object
|
| 680 |
+
set obj [get_filesets sources_1]
|
| 681 |
+
# Import local files from the original project
|
| 682 |
+
set files [list \
|
| 683 |
+
[file normalize "${origin_dir}/ip/fifo_43_43_clk2.xci"]\
|
| 684 |
+
]
|
| 685 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 686 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 687 |
+
# None
|
| 688 |
+
# Set 'sources_1' fileset file properties for local files
|
| 689 |
+
set file "fifo_43_43_clk2/fifo_43_43_clk2.xci"
|
| 690 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 691 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 692 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 693 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 694 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
|
| 698 |
+
# Set 'sources_1' fileset object
|
| 699 |
+
set obj [get_filesets sources_1]
|
| 700 |
+
# Import local files from the original project
|
| 701 |
+
set files [list \
|
| 702 |
+
[file normalize "${origin_dir}/ip/fifo_34_34.xci"]\
|
| 703 |
+
]
|
| 704 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 705 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 706 |
+
# None
|
| 707 |
+
# Set 'sources_1' fileset file properties for local files
|
| 708 |
+
set file "fifo_34_34/fifo_34_34.xci"
|
| 709 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 710 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 711 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 712 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 713 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 714 |
+
}
|
| 715 |
+
|
| 716 |
+
|
| 717 |
+
# Set 'sources_1' fileset object
|
| 718 |
+
set obj [get_filesets sources_1]
|
| 719 |
+
# Import local files from the original project
|
| 720 |
+
set files [list \
|
| 721 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk2_comrx.xci" ]\
|
| 722 |
+
]
|
| 723 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 724 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 725 |
+
# None
|
| 726 |
+
# Set 'sources_1' fileset file properties for local files
|
| 727 |
+
set file "fifo_64_64_clk2_comrx/fifo_64_64_clk2_comrx.xci"
|
| 728 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 729 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 730 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 731 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 732 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 733 |
+
}
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
# Create 'constrs_1' fileset (if not found)
|
| 737 |
+
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
| 738 |
+
create_fileset -constrset constrs_1
|
| 739 |
+
}
|
| 740 |
+
# Set 'constrs_1' fileset object
|
| 741 |
+
set obj [get_filesets constrs_1]
|
| 742 |
+
# Add/Import constrs file and set constrs file properties
|
| 743 |
+
set file "[file normalize ${origin_dir}/src/pcileech_enigma_x1.xdc]"
|
| 744 |
+
set file_imported [import_files -fileset constrs_1 [list $file]]
|
| 745 |
+
set file "src/pcileech_enigma_x1.xdc"
|
| 746 |
+
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
|
| 747 |
+
set_property -name "file_type" -value "XDC" -objects $file_obj
|
| 748 |
+
|
| 749 |
+
# Set 'constrs_1' fileset properties
|
| 750 |
+
set obj [get_filesets constrs_1]
|
| 751 |
+
set_property -name "target_part" -value "xc7a75tfgg484-2" -objects $obj
|
| 752 |
+
|
| 753 |
+
# Create 'sim_1' fileset (if not found)
|
| 754 |
+
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
| 755 |
+
create_fileset -simset sim_1
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
# Set 'sim_1' fileset object
|
| 759 |
+
set obj [get_filesets sim_1]
|
| 760 |
+
# Empty (no sources present)
|
| 761 |
+
|
| 762 |
+
# Set 'sim_1' fileset properties
|
| 763 |
+
set obj [get_filesets sim_1]
|
| 764 |
+
set_property -name "top" -value "pcileech_enigma_x1_top" -objects $obj
|
| 765 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 766 |
+
|
| 767 |
+
# Upgrade IP from the currently installed Vivado version
|
| 768 |
+
upgrade_ip [get_ips *]
|
| 769 |
+
|
| 770 |
+
# Set 'utils_1' fileset object
|
| 771 |
+
set obj [get_filesets utils_1]
|
| 772 |
+
# Empty (no sources present)
|
| 773 |
+
|
| 774 |
+
# Set 'utils_1' fileset properties
|
| 775 |
+
set obj [get_filesets utils_1]
|
| 776 |
+
|
| 777 |
+
# Create 'synth_1' run (if not found)
|
| 778 |
+
if {[string equal [get_runs -quiet synth_1] ""]} {
|
| 779 |
+
create_run -name synth_1 -part xc7a75tfgg484-2 -flow {Vivado Synthesis 2022} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
|
| 780 |
+
} else {
|
| 781 |
+
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
|
| 782 |
+
set_property flow "Vivado Synthesis 2022" [get_runs synth_1]
|
| 783 |
+
}
|
| 784 |
+
set obj [get_runs synth_1]
|
| 785 |
+
set_property set_report_strategy_name 1 $obj
|
| 786 |
+
set_property report_strategy {Vivado Synthesis Default Reports} $obj
|
| 787 |
+
set_property set_report_strategy_name 0 $obj
|
| 788 |
+
# Create 'synth_1_synth_report_utilization_0' report (if not found)
|
| 789 |
+
if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
|
| 790 |
+
create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
|
| 791 |
+
}
|
| 792 |
+
set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
|
| 793 |
+
if { $obj != "" } {
|
| 794 |
+
|
| 795 |
+
}
|
| 796 |
+
set obj [get_runs synth_1]
|
| 797 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 798 |
+
set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
|
| 799 |
+
|
| 800 |
+
# set the current synth run
|
| 801 |
+
current_run -synthesis [get_runs synth_1]
|
| 802 |
+
|
| 803 |
+
# Create 'impl_1' run (if not found)
|
| 804 |
+
if {[string equal [get_runs -quiet impl_1] ""]} {
|
| 805 |
+
create_run -name impl_1 -part xc7a75tfgg484-2 -flow {Vivado Implementation 2022} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
|
| 806 |
+
} else {
|
| 807 |
+
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
|
| 808 |
+
set_property flow "Vivado Implementation 2022" [get_runs impl_1]
|
| 809 |
+
}
|
| 810 |
+
set obj [get_runs impl_1]
|
| 811 |
+
set_property set_report_strategy_name 1 $obj
|
| 812 |
+
set_property report_strategy {Vivado Implementation Default Reports} $obj
|
| 813 |
+
set_property set_report_strategy_name 0 $obj
|
| 814 |
+
# Create 'impl_1_init_report_timing_summary_0' report (if not found)
|
| 815 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
|
| 816 |
+
create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
|
| 817 |
+
}
|
| 818 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
|
| 819 |
+
if { $obj != "" } {
|
| 820 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 821 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 822 |
+
|
| 823 |
+
}
|
| 824 |
+
# Create 'impl_1_opt_report_drc_0' report (if not found)
|
| 825 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
|
| 826 |
+
create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
|
| 827 |
+
}
|
| 828 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
|
| 829 |
+
if { $obj != "" } {
|
| 830 |
+
|
| 831 |
+
}
|
| 832 |
+
# Create 'impl_1_opt_report_timing_summary_0' report (if not found)
|
| 833 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
|
| 834 |
+
create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
|
| 835 |
+
}
|
| 836 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
|
| 837 |
+
if { $obj != "" } {
|
| 838 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 839 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 840 |
+
|
| 841 |
+
}
|
| 842 |
+
# Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
|
| 843 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
|
| 844 |
+
create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
|
| 845 |
+
}
|
| 846 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
|
| 847 |
+
if { $obj != "" } {
|
| 848 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 849 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 850 |
+
|
| 851 |
+
}
|
| 852 |
+
# Create 'impl_1_place_report_io_0' report (if not found)
|
| 853 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
|
| 854 |
+
create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
|
| 855 |
+
}
|
| 856 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
|
| 857 |
+
if { $obj != "" } {
|
| 858 |
+
|
| 859 |
+
}
|
| 860 |
+
# Create 'impl_1_place_report_utilization_0' report (if not found)
|
| 861 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
|
| 862 |
+
create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
|
| 863 |
+
}
|
| 864 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
|
| 865 |
+
if { $obj != "" } {
|
| 866 |
+
|
| 867 |
+
}
|
| 868 |
+
# Create 'impl_1_place_report_control_sets_0' report (if not found)
|
| 869 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
|
| 870 |
+
create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
|
| 871 |
+
}
|
| 872 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
|
| 873 |
+
if { $obj != "" } {
|
| 874 |
+
set_property -name "options.verbose" -value "1" -objects $obj
|
| 875 |
+
|
| 876 |
+
}
|
| 877 |
+
# Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
|
| 878 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
|
| 879 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 880 |
+
}
|
| 881 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
|
| 882 |
+
if { $obj != "" } {
|
| 883 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 884 |
+
|
| 885 |
+
}
|
| 886 |
+
# Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
|
| 887 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
|
| 888 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 889 |
+
}
|
| 890 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
|
| 891 |
+
if { $obj != "" } {
|
| 892 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 893 |
+
|
| 894 |
+
}
|
| 895 |
+
# Create 'impl_1_place_report_timing_summary_0' report (if not found)
|
| 896 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
|
| 897 |
+
create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
|
| 898 |
+
}
|
| 899 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
|
| 900 |
+
if { $obj != "" } {
|
| 901 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 902 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 903 |
+
|
| 904 |
+
}
|
| 905 |
+
# Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
|
| 906 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
|
| 907 |
+
create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
|
| 908 |
+
}
|
| 909 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
|
| 910 |
+
if { $obj != "" } {
|
| 911 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 912 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 913 |
+
|
| 914 |
+
}
|
| 915 |
+
# Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
|
| 916 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
|
| 917 |
+
create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
|
| 918 |
+
}
|
| 919 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
|
| 920 |
+
if { $obj != "" } {
|
| 921 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 922 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 923 |
+
|
| 924 |
+
}
|
| 925 |
+
# Create 'impl_1_route_report_drc_0' report (if not found)
|
| 926 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
|
| 927 |
+
create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
|
| 928 |
+
}
|
| 929 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
|
| 930 |
+
if { $obj != "" } {
|
| 931 |
+
|
| 932 |
+
}
|
| 933 |
+
# Create 'impl_1_route_report_methodology_0' report (if not found)
|
| 934 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
|
| 935 |
+
create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
|
| 936 |
+
}
|
| 937 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
|
| 938 |
+
if { $obj != "" } {
|
| 939 |
+
|
| 940 |
+
}
|
| 941 |
+
# Create 'impl_1_route_report_power_0' report (if not found)
|
| 942 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
|
| 943 |
+
create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
|
| 944 |
+
}
|
| 945 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
|
| 946 |
+
if { $obj != "" } {
|
| 947 |
+
|
| 948 |
+
}
|
| 949 |
+
# Create 'impl_1_route_report_route_status_0' report (if not found)
|
| 950 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
|
| 951 |
+
create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
|
| 952 |
+
}
|
| 953 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
|
| 954 |
+
if { $obj != "" } {
|
| 955 |
+
|
| 956 |
+
}
|
| 957 |
+
# Create 'impl_1_route_report_timing_summary_0' report (if not found)
|
| 958 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
|
| 959 |
+
create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
|
| 960 |
+
}
|
| 961 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
|
| 962 |
+
if { $obj != "" } {
|
| 963 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 964 |
+
|
| 965 |
+
}
|
| 966 |
+
# Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
|
| 967 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
|
| 968 |
+
create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
|
| 969 |
+
}
|
| 970 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
|
| 971 |
+
if { $obj != "" } {
|
| 972 |
+
|
| 973 |
+
}
|
| 974 |
+
# Create 'impl_1_route_report_clock_utilization_0' report (if not found)
|
| 975 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
|
| 976 |
+
create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
|
| 977 |
+
}
|
| 978 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
|
| 979 |
+
if { $obj != "" } {
|
| 980 |
+
|
| 981 |
+
}
|
| 982 |
+
# Create 'impl_1_route_report_bus_skew_0' report (if not found)
|
| 983 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
|
| 984 |
+
create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
|
| 985 |
+
}
|
| 986 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
|
| 987 |
+
if { $obj != "" } {
|
| 988 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 989 |
+
|
| 990 |
+
}
|
| 991 |
+
# Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
|
| 992 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
|
| 993 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
|
| 994 |
+
}
|
| 995 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
|
| 996 |
+
if { $obj != "" } {
|
| 997 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 998 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 999 |
+
|
| 1000 |
+
}
|
| 1001 |
+
# Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
|
| 1002 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
|
| 1003 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
|
| 1004 |
+
}
|
| 1005 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
|
| 1006 |
+
if { $obj != "" } {
|
| 1007 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 1008 |
+
|
| 1009 |
+
}
|
| 1010 |
+
set obj [get_runs impl_1]
|
| 1011 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 1012 |
+
set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
|
| 1013 |
+
set_property -name "steps.phys_opt_design.is_enabled" -value "1" -objects $obj
|
| 1014 |
+
set_property -name "steps.write_bitstream.args.bin_file" -value "1" -objects $obj
|
| 1015 |
+
set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
|
| 1016 |
+
set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
|
| 1017 |
+
|
| 1018 |
+
# set the current impl run
|
| 1019 |
+
current_run -implementation [get_runs impl_1]
|
| 1020 |
+
|
| 1021 |
+
puts "INFO: Project created:${_xil_proj_name_}"
|
| 1022 |
+
# Create 'drc_1' gadget (if not found)
|
| 1023 |
+
if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
|
| 1024 |
+
create_dashboard_gadget -name {drc_1} -type drc
|
| 1025 |
+
}
|
| 1026 |
+
set obj [get_dashboard_gadgets [ list "drc_1" ] ]
|
| 1027 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
|
| 1028 |
+
|
| 1029 |
+
# Create 'methodology_1' gadget (if not found)
|
| 1030 |
+
if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
|
| 1031 |
+
create_dashboard_gadget -name {methodology_1} -type methodology
|
| 1032 |
+
}
|
| 1033 |
+
set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
|
| 1034 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
|
| 1035 |
+
|
| 1036 |
+
# Create 'power_1' gadget (if not found)
|
| 1037 |
+
if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
|
| 1038 |
+
create_dashboard_gadget -name {power_1} -type power
|
| 1039 |
+
}
|
| 1040 |
+
set obj [get_dashboard_gadgets [ list "power_1" ] ]
|
| 1041 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
|
| 1042 |
+
|
| 1043 |
+
# Create 'timing_1' gadget (if not found)
|
| 1044 |
+
if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
|
| 1045 |
+
create_dashboard_gadget -name {timing_1} -type timing
|
| 1046 |
+
}
|
| 1047 |
+
set obj [get_dashboard_gadgets [ list "timing_1" ] ]
|
| 1048 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
|
| 1049 |
+
|
| 1050 |
+
# Create 'utilization_1' gadget (if not found)
|
| 1051 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
|
| 1052 |
+
create_dashboard_gadget -name {utilization_1} -type utilization
|
| 1053 |
+
}
|
| 1054 |
+
set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
|
| 1055 |
+
set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
|
| 1056 |
+
set_property -name "run.step" -value "synth_design" -objects $obj
|
| 1057 |
+
set_property -name "run.type" -value "synthesis" -objects $obj
|
| 1058 |
+
|
| 1059 |
+
# Create 'utilization_2' gadget (if not found)
|
| 1060 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
|
| 1061 |
+
create_dashboard_gadget -name {utilization_2} -type utilization
|
| 1062 |
+
}
|
| 1063 |
+
set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
|
| 1064 |
+
set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
|
| 1065 |
+
|
| 1066 |
+
move_dashboard_gadget -name {utilization_1} -row 0 -col 0
|
| 1067 |
+
move_dashboard_gadget -name {power_1} -row 1 -col 0
|
| 1068 |
+
move_dashboard_gadget -name {drc_1} -row 2 -col 0
|
| 1069 |
+
move_dashboard_gadget -name {timing_1} -row 0 -col 1
|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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Vivado generated .tcl for creating the pcileech_enigma_x1 vivado project.
|
| 3 |
+
# Run from within "Vivado Tcl Shell" with command: source vivado_generate_project.tcl -notrace
|
| 4 |
+
#
|
| 5 |
+
|
| 6 |
+
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
| 7 |
+
set origin_dir "."
|
| 8 |
+
|
| 9 |
+
# Use origin directory path location variable, if specified in the tcl shell
|
| 10 |
+
if { [info exists ::origin_dir_loc] } {
|
| 11 |
+
set origin_dir $::origin_dir_loc
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
# Set the project name
|
| 15 |
+
set _xil_proj_name_ "pcileech_enigma_x1"
|
| 16 |
+
|
| 17 |
+
# Use project name variable, if specified in the tcl shell
|
| 18 |
+
if { [info exists ::user_project_name] } {
|
| 19 |
+
set _xil_proj_name_ $::user_project_name
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
variable script_file
|
| 23 |
+
set script_file "vivado_generate_project.tcl"
|
| 24 |
+
|
| 25 |
+
# Help information for this script
|
| 26 |
+
proc print_help {} {
|
| 27 |
+
variable script_file
|
| 28 |
+
puts "\nDescription:"
|
| 29 |
+
puts "Recreate a Vivado project from this script. The created project will be"
|
| 30 |
+
puts "functionally equivalent to the original project for which this script was"
|
| 31 |
+
puts "generated. The script contains commands for creating a project, filesets,"
|
| 32 |
+
puts "runs, adding/importing sources and setting properties on various objects.\n"
|
| 33 |
+
puts "Syntax:"
|
| 34 |
+
puts "$script_file"
|
| 35 |
+
puts "$script_file -tclargs \[--origin_dir <path>\]"
|
| 36 |
+
puts "$script_file -tclargs \[--project_name <name>\]"
|
| 37 |
+
puts "$script_file -tclargs \[--help\]\n"
|
| 38 |
+
puts "Usage:"
|
| 39 |
+
puts "Name Description"
|
| 40 |
+
puts "-------------------------------------------------------------------------"
|
| 41 |
+
puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
|
| 42 |
+
puts " origin_dir path value is \".\", otherwise, the value"
|
| 43 |
+
puts " that was set with the \"-paths_relative_to\" switch"
|
| 44 |
+
puts " when this script was generated.\n"
|
| 45 |
+
puts "\[--project_name <name>\] Create project with the specified name. Default"
|
| 46 |
+
puts " name is the name of the project from where this"
|
| 47 |
+
puts " script was generated.\n"
|
| 48 |
+
puts "\[--help\] Print help information for this script"
|
| 49 |
+
puts "-------------------------------------------------------------------------\n"
|
| 50 |
+
exit 0
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
if { $::argc > 0 } {
|
| 54 |
+
for {set i 0} {$i < $::argc} {incr i} {
|
| 55 |
+
set option [string trim [lindex $::argv $i]]
|
| 56 |
+
switch -regexp -- $option {
|
| 57 |
+
"--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
|
| 58 |
+
"--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
|
| 59 |
+
"--help" { print_help }
|
| 60 |
+
default {
|
| 61 |
+
if { [regexp {^-} $option] } {
|
| 62 |
+
puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
|
| 63 |
+
return 1
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
# Set the directory path for the original project from where this script was exported
|
| 71 |
+
set orig_proj_dir "[file normalize "$origin_dir/pcileech_enigma_x1"]"
|
| 72 |
+
|
| 73 |
+
# Create project
|
| 74 |
+
create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7a75tfgg484-2
|
| 75 |
+
|
| 76 |
+
# Set the directory path for the new project
|
| 77 |
+
set proj_dir [get_property directory [current_project]]
|
| 78 |
+
|
| 79 |
+
# Set project properties
|
| 80 |
+
set obj [current_project]
|
| 81 |
+
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
|
| 82 |
+
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
|
| 83 |
+
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
|
| 84 |
+
set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
|
| 85 |
+
set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
|
| 86 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 87 |
+
set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
|
| 88 |
+
set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
|
| 89 |
+
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
|
| 90 |
+
set_property -name "simulator_language" -value "Mixed" -objects $obj
|
| 91 |
+
set_property -name "webtalk.activehdl_export_sim" -value "5" -objects $obj
|
| 92 |
+
set_property -name "webtalk.ies_export_sim" -value "5" -objects $obj
|
| 93 |
+
set_property -name "webtalk.modelsim_export_sim" -value "5" -objects $obj
|
| 94 |
+
set_property -name "webtalk.questa_export_sim" -value "5" -objects $obj
|
| 95 |
+
set_property -name "webtalk.riviera_export_sim" -value "5" -objects $obj
|
| 96 |
+
set_property -name "webtalk.vcs_export_sim" -value "5" -objects $obj
|
| 97 |
+
set_property -name "webtalk.xsim_export_sim" -value "5" -objects $obj
|
| 98 |
+
set_property -name "xpm_libraries" -value "XPM_CDC XPM_MEMORY" -objects $obj
|
| 99 |
+
|
| 100 |
+
# Create 'sources_1' fileset (if not found)
|
| 101 |
+
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
| 102 |
+
create_fileset -srcset sources_1
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
# Set 'sources_1' fileset object
|
| 106 |
+
set obj [get_filesets sources_1]
|
| 107 |
+
# Import local files from the original project
|
| 108 |
+
set files [list \
|
| 109 |
+
[file normalize "${origin_dir}/src/pcileech_header.svh"]\
|
| 110 |
+
[file normalize "${origin_dir}/src/pcileech_com.sv" ]\
|
| 111 |
+
[file normalize "${origin_dir}/src/pcileech_fifo.sv"]\
|
| 112 |
+
[file normalize "${origin_dir}/src/pcileech_ft601.sv"]\
|
| 113 |
+
[file normalize "${origin_dir}/src/pcileech_mux.sv"]\
|
| 114 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_a7.sv"]\
|
| 115 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_cfg_a7.sv"]\
|
| 116 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_tlp_a7.sv"]\
|
| 117 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_bar_controller.sv"]\
|
| 118 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_cfgspace_shadow.sv"]\
|
| 119 |
+
[file normalize "${origin_dir}/src/pcileech_enigma_x1_top.sv"]\
|
| 120 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0.v"]\
|
| 121 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx.v"]\
|
| 122 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"]\
|
| 123 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"]\
|
| 124 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_top.v"]\
|
| 125 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx.v"]\
|
| 126 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"]\
|
| 127 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"]\
|
| 128 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_core_top.v"]\
|
| 129 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_common.v"]\
|
| 130 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"]\
|
| 131 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_top.v"]\
|
| 132 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_wrapper.v"]\
|
| 133 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"]\
|
| 134 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_drp.v"]\
|
| 135 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_rate.v"]\
|
| 136 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_reset.v"]\
|
| 137 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"]\
|
| 138 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_7x.v"]\
|
| 139 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_7x.v"]\
|
| 140 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"]\
|
| 141 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_brams_7x.v"]\
|
| 142 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_lane.v"]\
|
| 143 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_misc.v"]\
|
| 144 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"]\
|
| 145 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_top.v"]\
|
| 146 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie2_top.v"]\
|
| 147 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_clock.v"]\
|
| 148 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_drp.v"]\
|
| 149 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_eq.v"]\
|
| 150 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_rate.v"]\
|
| 151 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_reset.v"]\
|
| 152 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_sync.v"]\
|
| 153 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_user.v"]\
|
| 154 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_wrapper.v"]\
|
| 155 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_drp.v"]\
|
| 156 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_reset.v"]\
|
| 157 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_wrapper.v"]\
|
| 158 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_rxeq_scan.v"]\
|
| 159 |
+
]
|
| 160 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 161 |
+
|
| 162 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 163 |
+
# None
|
| 164 |
+
|
| 165 |
+
# Set 'sources_1' fileset file properties for local files
|
| 166 |
+
set file "src/pcileech_header.svh"
|
| 167 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 168 |
+
set_property -name "file_type" -value "Verilog Header" -objects $file_obj
|
| 169 |
+
|
| 170 |
+
set file "src/pcileech_com.sv"
|
| 171 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 172 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 173 |
+
|
| 174 |
+
set file "src/pcileech_fifo.sv"
|
| 175 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 176 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 177 |
+
|
| 178 |
+
set file "src/pcileech_ft601.sv"
|
| 179 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 180 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 181 |
+
|
| 182 |
+
set file "src/pcileech_mux.sv"
|
| 183 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 184 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 185 |
+
|
| 186 |
+
set file "src/pcileech_pcie_a7.sv"
|
| 187 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 188 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 189 |
+
|
| 190 |
+
set file "src/pcileech_pcie_cfg_a7.sv"
|
| 191 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 192 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 193 |
+
|
| 194 |
+
set file "src/pcileech_pcie_tlp_a7.sv"
|
| 195 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 196 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 197 |
+
|
| 198 |
+
set file "src/pcileech_tlps128_bar_controller.sv"
|
| 199 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 200 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 201 |
+
|
| 202 |
+
set file "src/pcileech_tlps128_cfgspace_shadow.sv"
|
| 203 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 204 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 205 |
+
|
| 206 |
+
set file "src/pcileech_enigma_x1_top.sv"
|
| 207 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 208 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 209 |
+
|
| 210 |
+
set file "pcie_7x/pcie_7x_0.v"
|
| 211 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 212 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 213 |
+
|
| 214 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx.v"
|
| 215 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 216 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 217 |
+
|
| 218 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"
|
| 219 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 220 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 221 |
+
|
| 222 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"
|
| 223 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 224 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 225 |
+
|
| 226 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_top.v"
|
| 227 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 228 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 229 |
+
|
| 230 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx.v"
|
| 231 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 232 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 233 |
+
|
| 234 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"
|
| 235 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 236 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 237 |
+
|
| 238 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"
|
| 239 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 240 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 241 |
+
|
| 242 |
+
set file "pcie_7x/pcie_7x_0_core_top.v"
|
| 243 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 244 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 245 |
+
|
| 246 |
+
set file "pcie_7x/pcie_7x_0_gt_common.v"
|
| 247 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 248 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 249 |
+
|
| 250 |
+
set file "pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"
|
| 251 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 252 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 253 |
+
|
| 254 |
+
set file "pcie_7x/pcie_7x_0_gt_top.v"
|
| 255 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 256 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 257 |
+
|
| 258 |
+
set file "pcie_7x/pcie_7x_0_gt_wrapper.v"
|
| 259 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 260 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 261 |
+
|
| 262 |
+
set file "pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"
|
| 263 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 264 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 265 |
+
|
| 266 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_drp.v"
|
| 267 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 268 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 269 |
+
|
| 270 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_rate.v"
|
| 271 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 272 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 273 |
+
|
| 274 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_reset.v"
|
| 275 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 276 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 277 |
+
|
| 278 |
+
set file "pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"
|
| 279 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 280 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 281 |
+
|
| 282 |
+
set file "pcie_7x/pcie_7x_0_pcie_7x.v"
|
| 283 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 284 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 285 |
+
|
| 286 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_7x.v"
|
| 287 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 288 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 289 |
+
|
| 290 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"
|
| 291 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 292 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 293 |
+
|
| 294 |
+
set file "pcie_7x/pcie_7x_0_pcie_brams_7x.v"
|
| 295 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 296 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 297 |
+
|
| 298 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_lane.v"
|
| 299 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 300 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 301 |
+
|
| 302 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_misc.v"
|
| 303 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 304 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 305 |
+
|
| 306 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"
|
| 307 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 308 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 309 |
+
|
| 310 |
+
set file "pcie_7x/pcie_7x_0_pcie_top.v"
|
| 311 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 312 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 313 |
+
|
| 314 |
+
set file "pcie_7x/pcie_7x_0_pcie2_top.v"
|
| 315 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 316 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 317 |
+
|
| 318 |
+
set file "pcie_7x/pcie_7x_0_pipe_clock.v"
|
| 319 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 320 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 321 |
+
|
| 322 |
+
set file "pcie_7x/pcie_7x_0_pipe_drp.v"
|
| 323 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 324 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 325 |
+
|
| 326 |
+
set file "pcie_7x/pcie_7x_0_pipe_eq.v"
|
| 327 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 328 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 329 |
+
|
| 330 |
+
set file "pcie_7x/pcie_7x_0_pipe_rate.v"
|
| 331 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 332 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 333 |
+
|
| 334 |
+
set file "pcie_7x/pcie_7x_0_pipe_reset.v"
|
| 335 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 336 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 337 |
+
|
| 338 |
+
set file "pcie_7x/pcie_7x_0_pipe_sync.v"
|
| 339 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 340 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 341 |
+
|
| 342 |
+
set file "pcie_7x/pcie_7x_0_pipe_user.v"
|
| 343 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 344 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 345 |
+
|
| 346 |
+
set file "pcie_7x/pcie_7x_0_qpll_drp.v"
|
| 347 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 348 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 349 |
+
|
| 350 |
+
set file "pcie_7x/pcie_7x_0_pipe_wrapper.v"
|
| 351 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 352 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 353 |
+
|
| 354 |
+
set file "pcie_7x/pcie_7x_0_qpll_reset.v"
|
| 355 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 356 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 357 |
+
|
| 358 |
+
set file "pcie_7x/pcie_7x_0_qpll_wrapper.v"
|
| 359 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 360 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 361 |
+
|
| 362 |
+
set file "pcie_7x/pcie_7x_0_rxeq_scan.v"
|
| 363 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 364 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 365 |
+
|
| 366 |
+
# Set 'sources_1' fileset properties
|
| 367 |
+
set obj [get_filesets sources_1]
|
| 368 |
+
set_property -name "top" -value "pcileech_enigma_x1_top" -objects $obj
|
| 369 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
# Set 'sources_1' fileset object
|
| 373 |
+
set obj [get_filesets sources_1]
|
| 374 |
+
# Import local files from the original project
|
| 375 |
+
set files [list \
|
| 376 |
+
[file normalize "${origin_dir}/ip/pcileech_bar_zero4k.coe" ]\
|
| 377 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace.coe" ]\
|
| 378 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace_writemask.coe" ]\
|
| 379 |
+
[file normalize "${origin_dir}/ip/bram_pcie_cfgspace.xci" ]\
|
| 380 |
+
]
|
| 381 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 382 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 383 |
+
# None
|
| 384 |
+
# Set 'sources_1' fileset file properties for local files
|
| 385 |
+
set file "bram_pcie_cfgspace/bram_pcie_cfgspace.xci"
|
| 386 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 387 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 388 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 389 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 390 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
# Set 'sources_1' fileset object
|
| 395 |
+
set obj [get_filesets sources_1]
|
| 396 |
+
# Import local files from the original project
|
| 397 |
+
set files [list \
|
| 398 |
+
[file normalize "${origin_dir}/ip/drom_pcie_cfgspace_writemask.xci"]\
|
| 399 |
+
]
|
| 400 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 401 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 402 |
+
# None
|
| 403 |
+
# Set 'sources_1' fileset file properties for local files
|
| 404 |
+
set file "drom_pcie_cfgspace_writemask/drom_pcie_cfgspace_writemask.xci"
|
| 405 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 406 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 407 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 408 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 409 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
# Set 'sources_1' fileset object
|
| 414 |
+
set obj [get_filesets sources_1]
|
| 415 |
+
# Import local files from the original project
|
| 416 |
+
set files [list \
|
| 417 |
+
[file normalize "${origin_dir}/ip/fifo_74_74_clk1_bar_rd1.xci"]\
|
| 418 |
+
]
|
| 419 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 420 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 421 |
+
# None
|
| 422 |
+
# Set 'sources_1' fileset file properties for local files
|
| 423 |
+
set file "fifo_74_74_clk1_bar_rd1/fifo_74_74_clk1_bar_rd1.xci"
|
| 424 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 425 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 426 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 427 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 428 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
|
| 432 |
+
# Set 'sources_1' fileset object
|
| 433 |
+
set obj [get_filesets sources_1]
|
| 434 |
+
# Import local files from the original project
|
| 435 |
+
set files [list \
|
| 436 |
+
[file normalize "${origin_dir}/ip/bram_bar_zero4k.xci"]\
|
| 437 |
+
]
|
| 438 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 439 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 440 |
+
# None
|
| 441 |
+
# Set 'sources_1' fileset file properties for local files
|
| 442 |
+
set file "bram_bar_zero4k/bram_bar_zero4k.xci"
|
| 443 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 444 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 445 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 446 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 447 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
# Set 'sources_1' fileset object
|
| 452 |
+
set obj [get_filesets sources_1]
|
| 453 |
+
# Import local files from the original project
|
| 454 |
+
set files [list \
|
| 455 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk1_bar_rdrsp.xci"]\
|
| 456 |
+
]
|
| 457 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 458 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 459 |
+
# None
|
| 460 |
+
# Set 'sources_1' fileset file properties for local files
|
| 461 |
+
set file "fifo_134_134_clk1_bar_rdrsp/fifo_134_134_clk1_bar_rdrsp.xci"
|
| 462 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 463 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 464 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 465 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 466 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
# Set 'sources_1' fileset object
|
| 471 |
+
set obj [get_filesets sources_1]
|
| 472 |
+
# Import local files from the original project
|
| 473 |
+
set files [list \
|
| 474 |
+
[file normalize "${origin_dir}/ip/fifo_141_141_clk1_bar_wr.xci"]\
|
| 475 |
+
]
|
| 476 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 477 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 478 |
+
# None
|
| 479 |
+
# Set 'sources_1' fileset file properties for local files
|
| 480 |
+
set file "fifo_141_141_clk1_bar_wr/fifo_141_141_clk1_bar_wr.xci"
|
| 481 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 482 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 483 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 484 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 485 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
# Set 'sources_1' fileset object
|
| 490 |
+
set obj [get_filesets sources_1]
|
| 491 |
+
# Import local files from the original project
|
| 492 |
+
set files [list \
|
| 493 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2_rxfifo.xci"]\
|
| 494 |
+
]
|
| 495 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 496 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 497 |
+
# None
|
| 498 |
+
# Set 'sources_1' fileset file properties for local files
|
| 499 |
+
set file "fifo_134_134_clk2_rxfifo/fifo_134_134_clk2_rxfifo.xci"
|
| 500 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 501 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 502 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 503 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 504 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
# Set 'sources_1' fileset object
|
| 509 |
+
set obj [get_filesets sources_1]
|
| 510 |
+
# Import local files from the original project
|
| 511 |
+
set files [list \
|
| 512 |
+
[file normalize "${origin_dir}/ip/fifo_1_1_clk2.xci"]\
|
| 513 |
+
]
|
| 514 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 515 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 516 |
+
# None
|
| 517 |
+
# Set 'sources_1' fileset file properties for local files
|
| 518 |
+
set file "fifo_1_1_clk2/fifo_1_1_clk2.xci"
|
| 519 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 520 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 521 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 522 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 523 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
|
| 527 |
+
# Set 'sources_1' fileset object
|
| 528 |
+
set obj [get_filesets sources_1]
|
| 529 |
+
# Import local files from the original project
|
| 530 |
+
set files [list \
|
| 531 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2.xci"]\
|
| 532 |
+
]
|
| 533 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 534 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 535 |
+
# None
|
| 536 |
+
# Set 'sources_1' fileset file properties for local files
|
| 537 |
+
set file "fifo_134_134_clk2/fifo_134_134_clk2.xci"
|
| 538 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 539 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 540 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 541 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 542 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
|
| 546 |
+
# Set 'sources_1' fileset object
|
| 547 |
+
set obj [get_filesets sources_1]
|
| 548 |
+
# Import local files from the original project
|
| 549 |
+
set files [list \
|
| 550 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk1_fifocmd.xci"]\
|
| 551 |
+
]
|
| 552 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 553 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 554 |
+
# None
|
| 555 |
+
# Set 'sources_1' fileset file properties for local files
|
| 556 |
+
set file "fifo_64_64_clk1_fifocmd/fifo_64_64_clk1_fifocmd.xci"
|
| 557 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 558 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 559 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 560 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 561 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
# Set 'sources_1' fileset object
|
| 566 |
+
set obj [get_filesets sources_1]
|
| 567 |
+
# Import local files from the original project
|
| 568 |
+
set files [list \
|
| 569 |
+
[file normalize "${origin_dir}/ip/fifo_256_32_clk2_comtx.xci"]\
|
| 570 |
+
]
|
| 571 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 572 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 573 |
+
# None
|
| 574 |
+
# Set 'sources_1' fileset file properties for local files
|
| 575 |
+
set file "fifo_256_32_clk2_comtx/fifo_256_32_clk2_comtx.xci"
|
| 576 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 577 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 578 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 579 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 580 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
# Set 'sources_1' fileset object
|
| 585 |
+
set obj [get_filesets sources_1]
|
| 586 |
+
# Import local files from the original project
|
| 587 |
+
set files [list \
|
| 588 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk1_comtx.xci"]\
|
| 589 |
+
]
|
| 590 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 591 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 592 |
+
# None
|
| 593 |
+
# Set 'sources_1' fileset file properties for local files
|
| 594 |
+
set file "fifo_32_32_clk1_comtx/fifo_32_32_clk1_comtx.xci"
|
| 595 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 596 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 597 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 598 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 599 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
# Set 'sources_1' fileset object
|
| 604 |
+
set obj [get_filesets sources_1]
|
| 605 |
+
# Import local files from the original project
|
| 606 |
+
set files [list \
|
| 607 |
+
[file normalize "${origin_dir}/ip/fifo_129_129_clk1.xci"]\
|
| 608 |
+
]
|
| 609 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 610 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 611 |
+
# None
|
| 612 |
+
# Set 'sources_1' fileset file properties for local files
|
| 613 |
+
set file "fifo_129_129_clk1/fifo_129_129_clk1.xci"
|
| 614 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 615 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 616 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 617 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 618 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
# Set 'sources_1' fileset object
|
| 623 |
+
set obj [get_filesets sources_1]
|
| 624 |
+
# Import local files from the original project
|
| 625 |
+
set files [list \
|
| 626 |
+
[file normalize "${origin_dir}/ip/fifo_64_64.xci"]\
|
| 627 |
+
]
|
| 628 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 629 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 630 |
+
# None
|
| 631 |
+
# Set 'sources_1' fileset file properties for local files
|
| 632 |
+
set file "fifo_64_64/fifo_64_64.xci"
|
| 633 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 634 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 635 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 636 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 637 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 638 |
+
}
|
| 639 |
+
|
| 640 |
+
|
| 641 |
+
# Set 'sources_1' fileset object
|
| 642 |
+
set obj [get_filesets sources_1]
|
| 643 |
+
# Import local files from the original project
|
| 644 |
+
set files [list \
|
| 645 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk2.xci"]\
|
| 646 |
+
]
|
| 647 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 648 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 649 |
+
# None
|
| 650 |
+
# Set 'sources_1' fileset file properties for local files
|
| 651 |
+
set file "fifo_32_32_clk2/fifo_32_32_clk2.xci"
|
| 652 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 653 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 654 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 655 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 656 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
|
| 660 |
+
# Set 'sources_1' fileset object
|
| 661 |
+
set obj [get_filesets sources_1]
|
| 662 |
+
# Import local files from the original project
|
| 663 |
+
set files [list \
|
| 664 |
+
[file normalize "${origin_dir}/ip/fifo_49_49_clk2.xci"]\
|
| 665 |
+
]
|
| 666 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 667 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 668 |
+
# None
|
| 669 |
+
# Set 'sources_1' fileset file properties for local files
|
| 670 |
+
set file "fifo_49_49_clk2/fifo_49_49_clk2.xci"
|
| 671 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 672 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 673 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 674 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 675 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
|
| 679 |
+
# Set 'sources_1' fileset object
|
| 680 |
+
set obj [get_filesets sources_1]
|
| 681 |
+
# Import local files from the original project
|
| 682 |
+
set files [list \
|
| 683 |
+
[file normalize "${origin_dir}/ip/fifo_43_43_clk2.xci"]\
|
| 684 |
+
]
|
| 685 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 686 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 687 |
+
# None
|
| 688 |
+
# Set 'sources_1' fileset file properties for local files
|
| 689 |
+
set file "fifo_43_43_clk2/fifo_43_43_clk2.xci"
|
| 690 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 691 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 692 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 693 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 694 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
|
| 698 |
+
# Set 'sources_1' fileset object
|
| 699 |
+
set obj [get_filesets sources_1]
|
| 700 |
+
# Import local files from the original project
|
| 701 |
+
set files [list \
|
| 702 |
+
[file normalize "${origin_dir}/ip/fifo_34_34.xci"]\
|
| 703 |
+
]
|
| 704 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 705 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 706 |
+
# None
|
| 707 |
+
# Set 'sources_1' fileset file properties for local files
|
| 708 |
+
set file "fifo_34_34/fifo_34_34.xci"
|
| 709 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 710 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 711 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 712 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 713 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 714 |
+
}
|
| 715 |
+
|
| 716 |
+
|
| 717 |
+
# Set 'sources_1' fileset object
|
| 718 |
+
set obj [get_filesets sources_1]
|
| 719 |
+
# Import local files from the original project
|
| 720 |
+
set files [list \
|
| 721 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk2_comrx.xci" ]\
|
| 722 |
+
]
|
| 723 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 724 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 725 |
+
# None
|
| 726 |
+
# Set 'sources_1' fileset file properties for local files
|
| 727 |
+
set file "fifo_64_64_clk2_comrx/fifo_64_64_clk2_comrx.xci"
|
| 728 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 729 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 730 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 731 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 732 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 733 |
+
}
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
# Create 'constrs_1' fileset (if not found)
|
| 737 |
+
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
| 738 |
+
create_fileset -constrset constrs_1
|
| 739 |
+
}
|
| 740 |
+
# Set 'constrs_1' fileset object
|
| 741 |
+
set obj [get_filesets constrs_1]
|
| 742 |
+
# Add/Import constrs file and set constrs file properties
|
| 743 |
+
set file "[file normalize ${origin_dir}/src/75immt.xdc]"
|
| 744 |
+
set file_imported [import_files -fileset constrs_1 [list $file]]
|
| 745 |
+
set file "src/75immt.xdc"
|
| 746 |
+
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
|
| 747 |
+
set_property -name "file_type" -value "XDC" -objects $file_obj
|
| 748 |
+
|
| 749 |
+
# Set 'constrs_1' fileset properties
|
| 750 |
+
set obj [get_filesets constrs_1]
|
| 751 |
+
set_property -name "target_part" -value "xc7a75tfgg484-2" -objects $obj
|
| 752 |
+
|
| 753 |
+
# Create 'sim_1' fileset (if not found)
|
| 754 |
+
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
| 755 |
+
create_fileset -simset sim_1
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
# Set 'sim_1' fileset object
|
| 759 |
+
set obj [get_filesets sim_1]
|
| 760 |
+
# Empty (no sources present)
|
| 761 |
+
|
| 762 |
+
# Set 'sim_1' fileset properties
|
| 763 |
+
set obj [get_filesets sim_1]
|
| 764 |
+
set_property -name "top" -value "pcileech_enigma_x1_top" -objects $obj
|
| 765 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 766 |
+
|
| 767 |
+
# Upgrade IP from the currently installed Vivado version
|
| 768 |
+
upgrade_ip [get_ips *]
|
| 769 |
+
|
| 770 |
+
# Set 'utils_1' fileset object
|
| 771 |
+
set obj [get_filesets utils_1]
|
| 772 |
+
# Empty (no sources present)
|
| 773 |
+
|
| 774 |
+
# Set 'utils_1' fileset properties
|
| 775 |
+
set obj [get_filesets utils_1]
|
| 776 |
+
|
| 777 |
+
# Create 'synth_1' run (if not found)
|
| 778 |
+
if {[string equal [get_runs -quiet synth_1] ""]} {
|
| 779 |
+
create_run -name synth_1 -part xc7a75tfgg484-2 -flow {Vivado Synthesis 2022} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
|
| 780 |
+
} else {
|
| 781 |
+
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
|
| 782 |
+
set_property flow "Vivado Synthesis 2022" [get_runs synth_1]
|
| 783 |
+
}
|
| 784 |
+
set obj [get_runs synth_1]
|
| 785 |
+
set_property set_report_strategy_name 1 $obj
|
| 786 |
+
set_property report_strategy {Vivado Synthesis Default Reports} $obj
|
| 787 |
+
set_property set_report_strategy_name 0 $obj
|
| 788 |
+
# Create 'synth_1_synth_report_utilization_0' report (if not found)
|
| 789 |
+
if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
|
| 790 |
+
create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
|
| 791 |
+
}
|
| 792 |
+
set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
|
| 793 |
+
if { $obj != "" } {
|
| 794 |
+
|
| 795 |
+
}
|
| 796 |
+
set obj [get_runs synth_1]
|
| 797 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 798 |
+
set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
|
| 799 |
+
|
| 800 |
+
# set the current synth run
|
| 801 |
+
current_run -synthesis [get_runs synth_1]
|
| 802 |
+
|
| 803 |
+
# Create 'impl_1' run (if not found)
|
| 804 |
+
if {[string equal [get_runs -quiet impl_1] ""]} {
|
| 805 |
+
create_run -name impl_1 -part xc7a75tfgg484-2 -flow {Vivado Implementation 2022} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
|
| 806 |
+
} else {
|
| 807 |
+
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
|
| 808 |
+
set_property flow "Vivado Implementation 2022" [get_runs impl_1]
|
| 809 |
+
}
|
| 810 |
+
set obj [get_runs impl_1]
|
| 811 |
+
set_property set_report_strategy_name 1 $obj
|
| 812 |
+
set_property report_strategy {Vivado Implementation Default Reports} $obj
|
| 813 |
+
set_property set_report_strategy_name 0 $obj
|
| 814 |
+
# Create 'impl_1_init_report_timing_summary_0' report (if not found)
|
| 815 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
|
| 816 |
+
create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
|
| 817 |
+
}
|
| 818 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
|
| 819 |
+
if { $obj != "" } {
|
| 820 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 821 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 822 |
+
|
| 823 |
+
}
|
| 824 |
+
# Create 'impl_1_opt_report_drc_0' report (if not found)
|
| 825 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
|
| 826 |
+
create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
|
| 827 |
+
}
|
| 828 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
|
| 829 |
+
if { $obj != "" } {
|
| 830 |
+
|
| 831 |
+
}
|
| 832 |
+
# Create 'impl_1_opt_report_timing_summary_0' report (if not found)
|
| 833 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
|
| 834 |
+
create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
|
| 835 |
+
}
|
| 836 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
|
| 837 |
+
if { $obj != "" } {
|
| 838 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 839 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 840 |
+
|
| 841 |
+
}
|
| 842 |
+
# Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
|
| 843 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
|
| 844 |
+
create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
|
| 845 |
+
}
|
| 846 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
|
| 847 |
+
if { $obj != "" } {
|
| 848 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 849 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 850 |
+
|
| 851 |
+
}
|
| 852 |
+
# Create 'impl_1_place_report_io_0' report (if not found)
|
| 853 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
|
| 854 |
+
create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
|
| 855 |
+
}
|
| 856 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
|
| 857 |
+
if { $obj != "" } {
|
| 858 |
+
|
| 859 |
+
}
|
| 860 |
+
# Create 'impl_1_place_report_utilization_0' report (if not found)
|
| 861 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
|
| 862 |
+
create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
|
| 863 |
+
}
|
| 864 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
|
| 865 |
+
if { $obj != "" } {
|
| 866 |
+
|
| 867 |
+
}
|
| 868 |
+
# Create 'impl_1_place_report_control_sets_0' report (if not found)
|
| 869 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
|
| 870 |
+
create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
|
| 871 |
+
}
|
| 872 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
|
| 873 |
+
if { $obj != "" } {
|
| 874 |
+
set_property -name "options.verbose" -value "1" -objects $obj
|
| 875 |
+
|
| 876 |
+
}
|
| 877 |
+
# Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
|
| 878 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
|
| 879 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 880 |
+
}
|
| 881 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
|
| 882 |
+
if { $obj != "" } {
|
| 883 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 884 |
+
|
| 885 |
+
}
|
| 886 |
+
# Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
|
| 887 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
|
| 888 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 889 |
+
}
|
| 890 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
|
| 891 |
+
if { $obj != "" } {
|
| 892 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 893 |
+
|
| 894 |
+
}
|
| 895 |
+
# Create 'impl_1_place_report_timing_summary_0' report (if not found)
|
| 896 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
|
| 897 |
+
create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
|
| 898 |
+
}
|
| 899 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
|
| 900 |
+
if { $obj != "" } {
|
| 901 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 902 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 903 |
+
|
| 904 |
+
}
|
| 905 |
+
# Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
|
| 906 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
|
| 907 |
+
create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
|
| 908 |
+
}
|
| 909 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
|
| 910 |
+
if { $obj != "" } {
|
| 911 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 912 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 913 |
+
|
| 914 |
+
}
|
| 915 |
+
# Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
|
| 916 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
|
| 917 |
+
create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
|
| 918 |
+
}
|
| 919 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
|
| 920 |
+
if { $obj != "" } {
|
| 921 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 922 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 923 |
+
|
| 924 |
+
}
|
| 925 |
+
# Create 'impl_1_route_report_drc_0' report (if not found)
|
| 926 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
|
| 927 |
+
create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
|
| 928 |
+
}
|
| 929 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
|
| 930 |
+
if { $obj != "" } {
|
| 931 |
+
|
| 932 |
+
}
|
| 933 |
+
# Create 'impl_1_route_report_methodology_0' report (if not found)
|
| 934 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
|
| 935 |
+
create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
|
| 936 |
+
}
|
| 937 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
|
| 938 |
+
if { $obj != "" } {
|
| 939 |
+
|
| 940 |
+
}
|
| 941 |
+
# Create 'impl_1_route_report_power_0' report (if not found)
|
| 942 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
|
| 943 |
+
create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
|
| 944 |
+
}
|
| 945 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
|
| 946 |
+
if { $obj != "" } {
|
| 947 |
+
|
| 948 |
+
}
|
| 949 |
+
# Create 'impl_1_route_report_route_status_0' report (if not found)
|
| 950 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
|
| 951 |
+
create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
|
| 952 |
+
}
|
| 953 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
|
| 954 |
+
if { $obj != "" } {
|
| 955 |
+
|
| 956 |
+
}
|
| 957 |
+
# Create 'impl_1_route_report_timing_summary_0' report (if not found)
|
| 958 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
|
| 959 |
+
create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
|
| 960 |
+
}
|
| 961 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
|
| 962 |
+
if { $obj != "" } {
|
| 963 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 964 |
+
|
| 965 |
+
}
|
| 966 |
+
# Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
|
| 967 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
|
| 968 |
+
create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
|
| 969 |
+
}
|
| 970 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
|
| 971 |
+
if { $obj != "" } {
|
| 972 |
+
|
| 973 |
+
}
|
| 974 |
+
# Create 'impl_1_route_report_clock_utilization_0' report (if not found)
|
| 975 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
|
| 976 |
+
create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
|
| 977 |
+
}
|
| 978 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
|
| 979 |
+
if { $obj != "" } {
|
| 980 |
+
|
| 981 |
+
}
|
| 982 |
+
# Create 'impl_1_route_report_bus_skew_0' report (if not found)
|
| 983 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
|
| 984 |
+
create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
|
| 985 |
+
}
|
| 986 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
|
| 987 |
+
if { $obj != "" } {
|
| 988 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 989 |
+
|
| 990 |
+
}
|
| 991 |
+
# Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
|
| 992 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
|
| 993 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
|
| 994 |
+
}
|
| 995 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
|
| 996 |
+
if { $obj != "" } {
|
| 997 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 998 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 999 |
+
|
| 1000 |
+
}
|
| 1001 |
+
# Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
|
| 1002 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
|
| 1003 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
|
| 1004 |
+
}
|
| 1005 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
|
| 1006 |
+
if { $obj != "" } {
|
| 1007 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 1008 |
+
|
| 1009 |
+
}
|
| 1010 |
+
set obj [get_runs impl_1]
|
| 1011 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 1012 |
+
set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
|
| 1013 |
+
set_property -name "steps.phys_opt_design.is_enabled" -value "1" -objects $obj
|
| 1014 |
+
set_property -name "steps.write_bitstream.args.bin_file" -value "1" -objects $obj
|
| 1015 |
+
set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
|
| 1016 |
+
set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
|
| 1017 |
+
|
| 1018 |
+
# set the current impl run
|
| 1019 |
+
current_run -implementation [get_runs impl_1]
|
| 1020 |
+
|
| 1021 |
+
puts "INFO: Project created:${_xil_proj_name_}"
|
| 1022 |
+
# Create 'drc_1' gadget (if not found)
|
| 1023 |
+
if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
|
| 1024 |
+
create_dashboard_gadget -name {drc_1} -type drc
|
| 1025 |
+
}
|
| 1026 |
+
set obj [get_dashboard_gadgets [ list "drc_1" ] ]
|
| 1027 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
|
| 1028 |
+
|
| 1029 |
+
# Create 'methodology_1' gadget (if not found)
|
| 1030 |
+
if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
|
| 1031 |
+
create_dashboard_gadget -name {methodology_1} -type methodology
|
| 1032 |
+
}
|
| 1033 |
+
set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
|
| 1034 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
|
| 1035 |
+
|
| 1036 |
+
# Create 'power_1' gadget (if not found)
|
| 1037 |
+
if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
|
| 1038 |
+
create_dashboard_gadget -name {power_1} -type power
|
| 1039 |
+
}
|
| 1040 |
+
set obj [get_dashboard_gadgets [ list "power_1" ] ]
|
| 1041 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
|
| 1042 |
+
|
| 1043 |
+
# Create 'timing_1' gadget (if not found)
|
| 1044 |
+
if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
|
| 1045 |
+
create_dashboard_gadget -name {timing_1} -type timing
|
| 1046 |
+
}
|
| 1047 |
+
set obj [get_dashboard_gadgets [ list "timing_1" ] ]
|
| 1048 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
|
| 1049 |
+
|
| 1050 |
+
# Create 'utilization_1' gadget (if not found)
|
| 1051 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
|
| 1052 |
+
create_dashboard_gadget -name {utilization_1} -type utilization
|
| 1053 |
+
}
|
| 1054 |
+
set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
|
| 1055 |
+
set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
|
| 1056 |
+
set_property -name "run.step" -value "synth_design" -objects $obj
|
| 1057 |
+
set_property -name "run.type" -value "synthesis" -objects $obj
|
| 1058 |
+
|
| 1059 |
+
# Create 'utilization_2' gadget (if not found)
|
| 1060 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
|
| 1061 |
+
create_dashboard_gadget -name {utilization_2} -type utilization
|
| 1062 |
+
}
|
| 1063 |
+
set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
|
| 1064 |
+
set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
|
| 1065 |
+
|
| 1066 |
+
move_dashboard_gadget -name {utilization_1} -row 0 -col 0
|
| 1067 |
+
move_dashboard_gadget -name {power_1} -row 1 -col 0
|
| 1068 |
+
move_dashboard_gadget -name {drc_1} -row 2 -col 0
|
| 1069 |
+
move_dashboard_gadget -name {timing_1} -row 0 -col 1
|
| 1070 |
+
move_dashboard_gadget -name {utilization_2} -row 1 -col 1
|
| 1071 |
+
move_dashboard_gadget -name {methodology_1} -row 2 -col 1
|
JOKOSAHS_DMA-Pcileech/vivado_generate_project_immortal_75Ts.tcl
ADDED
|
@@ -0,0 +1,1071 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Vivado generated .tcl for creating the pcileech_squirrel vivado project.
|
| 3 |
+
# Run from within "Vivado Tcl Shell" with command: source vivado_generate_project.tcl -notrace
|
| 4 |
+
#
|
| 5 |
+
|
| 6 |
+
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
| 7 |
+
set origin_dir "."
|
| 8 |
+
|
| 9 |
+
# Use origin directory path location variable, if specified in the tcl shell
|
| 10 |
+
if { [info exists ::origin_dir_loc] } {
|
| 11 |
+
set origin_dir $::origin_dir_loc
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
# Set the project name
|
| 15 |
+
set _xil_proj_name_ "pcileech_squirrel"
|
| 16 |
+
|
| 17 |
+
# Use project name variable, if specified in the tcl shell
|
| 18 |
+
if { [info exists ::user_project_name] } {
|
| 19 |
+
set _xil_proj_name_ $::user_project_name
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
variable script_file
|
| 23 |
+
set script_file "vivado_generate_project.tcl"
|
| 24 |
+
|
| 25 |
+
# Help information for this script
|
| 26 |
+
proc print_help {} {
|
| 27 |
+
variable script_file
|
| 28 |
+
puts "\nDescription:"
|
| 29 |
+
puts "Recreate a Vivado project from this script. The created project will be"
|
| 30 |
+
puts "functionally equivalent to the original project for which this script was"
|
| 31 |
+
puts "generated. The script contains commands for creating a project, filesets,"
|
| 32 |
+
puts "runs, adding/importing sources and setting properties on various objects.\n"
|
| 33 |
+
puts "Syntax:"
|
| 34 |
+
puts "$script_file"
|
| 35 |
+
puts "$script_file -tclargs \[--origin_dir <path>\]"
|
| 36 |
+
puts "$script_file -tclargs \[--project_name <name>\]"
|
| 37 |
+
puts "$script_file -tclargs \[--help\]\n"
|
| 38 |
+
puts "Usage:"
|
| 39 |
+
puts "Name Description"
|
| 40 |
+
puts "-------------------------------------------------------------------------"
|
| 41 |
+
puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
|
| 42 |
+
puts " origin_dir path value is \".\", otherwise, the value"
|
| 43 |
+
puts " that was set with the \"-paths_relative_to\" switch"
|
| 44 |
+
puts " when this script was generated.\n"
|
| 45 |
+
puts "\[--project_name <name>\] Create project with the specified name. Default"
|
| 46 |
+
puts " name is the name of the project from where this"
|
| 47 |
+
puts " script was generated.\n"
|
| 48 |
+
puts "\[--help\] Print help information for this script"
|
| 49 |
+
puts "-------------------------------------------------------------------------\n"
|
| 50 |
+
exit 0
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
if { $::argc > 0 } {
|
| 54 |
+
for {set i 0} {$i < $::argc} {incr i} {
|
| 55 |
+
set option [string trim [lindex $::argv $i]]
|
| 56 |
+
switch -regexp -- $option {
|
| 57 |
+
"--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
|
| 58 |
+
"--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
|
| 59 |
+
"--help" { print_help }
|
| 60 |
+
default {
|
| 61 |
+
if { [regexp {^-} $option] } {
|
| 62 |
+
puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
|
| 63 |
+
return 1
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
# Set the directory path for the original project from where this script was exported
|
| 71 |
+
set orig_proj_dir "[file normalize "$origin_dir/pcileech_squirrel"]"
|
| 72 |
+
|
| 73 |
+
# Create project
|
| 74 |
+
create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7a75tfgg484-2
|
| 75 |
+
|
| 76 |
+
# Set the directory path for the new project
|
| 77 |
+
set proj_dir [get_property directory [current_project]]
|
| 78 |
+
|
| 79 |
+
# Set project properties
|
| 80 |
+
set obj [current_project]
|
| 81 |
+
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
|
| 82 |
+
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
|
| 83 |
+
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
|
| 84 |
+
set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
|
| 85 |
+
set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
|
| 86 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 87 |
+
set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
|
| 88 |
+
set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
|
| 89 |
+
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
|
| 90 |
+
set_property -name "simulator_language" -value "Mixed" -objects $obj
|
| 91 |
+
set_property -name "webtalk.activehdl_export_sim" -value "5" -objects $obj
|
| 92 |
+
set_property -name "webtalk.ies_export_sim" -value "5" -objects $obj
|
| 93 |
+
set_property -name "webtalk.modelsim_export_sim" -value "5" -objects $obj
|
| 94 |
+
set_property -name "webtalk.questa_export_sim" -value "5" -objects $obj
|
| 95 |
+
set_property -name "webtalk.riviera_export_sim" -value "5" -objects $obj
|
| 96 |
+
set_property -name "webtalk.vcs_export_sim" -value "5" -objects $obj
|
| 97 |
+
set_property -name "webtalk.xsim_export_sim" -value "5" -objects $obj
|
| 98 |
+
set_property -name "xpm_libraries" -value "XPM_CDC XPM_MEMORY" -objects $obj
|
| 99 |
+
|
| 100 |
+
# Create 'sources_1' fileset (if not found)
|
| 101 |
+
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
| 102 |
+
create_fileset -srcset sources_1
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
# Set 'sources_1' fileset object
|
| 106 |
+
set obj [get_filesets sources_1]
|
| 107 |
+
# Import local files from the original project
|
| 108 |
+
set files [list \
|
| 109 |
+
[file normalize "${origin_dir}/src/pcileech_header.svh"]\
|
| 110 |
+
[file normalize "${origin_dir}/src/pcileech_com.sv" ]\
|
| 111 |
+
[file normalize "${origin_dir}/src/pcileech_fifo.sv"]\
|
| 112 |
+
[file normalize "${origin_dir}/src/pcileech_ft601.sv"]\
|
| 113 |
+
[file normalize "${origin_dir}/src/pcileech_mux.sv"]\
|
| 114 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_a7.sv"]\
|
| 115 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_cfg_a7.sv"]\
|
| 116 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_tlp_a7.sv"]\
|
| 117 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_bar_controller.sv"]\
|
| 118 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_cfgspace_shadow.sv"]\
|
| 119 |
+
[file normalize "${origin_dir}/src/pcileech_squirrel_top.sv"]\
|
| 120 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0.v"]\
|
| 121 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx.v"]\
|
| 122 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"]\
|
| 123 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"]\
|
| 124 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_top.v"]\
|
| 125 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx.v"]\
|
| 126 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"]\
|
| 127 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"]\
|
| 128 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_core_top.v"]\
|
| 129 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_common.v"]\
|
| 130 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"]\
|
| 131 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_top.v"]\
|
| 132 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_wrapper.v"]\
|
| 133 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"]\
|
| 134 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_drp.v"]\
|
| 135 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_rate.v"]\
|
| 136 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_reset.v"]\
|
| 137 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"]\
|
| 138 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_7x.v"]\
|
| 139 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_7x.v"]\
|
| 140 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"]\
|
| 141 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_brams_7x.v"]\
|
| 142 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_lane.v"]\
|
| 143 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_misc.v"]\
|
| 144 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"]\
|
| 145 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_top.v"]\
|
| 146 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie2_top.v"]\
|
| 147 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_clock.v"]\
|
| 148 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_drp.v"]\
|
| 149 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_eq.v"]\
|
| 150 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_rate.v"]\
|
| 151 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_reset.v"]\
|
| 152 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_sync.v"]\
|
| 153 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_user.v"]\
|
| 154 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_wrapper.v"]\
|
| 155 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_drp.v"]\
|
| 156 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_reset.v"]\
|
| 157 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_wrapper.v"]\
|
| 158 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_rxeq_scan.v"]\
|
| 159 |
+
]
|
| 160 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 161 |
+
|
| 162 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 163 |
+
# None
|
| 164 |
+
|
| 165 |
+
# Set 'sources_1' fileset file properties for local files
|
| 166 |
+
set file "src/pcileech_header.svh"
|
| 167 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 168 |
+
set_property -name "file_type" -value "Verilog Header" -objects $file_obj
|
| 169 |
+
|
| 170 |
+
set file "src/pcileech_com.sv"
|
| 171 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 172 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 173 |
+
|
| 174 |
+
set file "src/pcileech_fifo.sv"
|
| 175 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 176 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 177 |
+
|
| 178 |
+
set file "src/pcileech_ft601.sv"
|
| 179 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 180 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 181 |
+
|
| 182 |
+
set file "src/pcileech_mux.sv"
|
| 183 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 184 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 185 |
+
|
| 186 |
+
set file "src/pcileech_pcie_a7.sv"
|
| 187 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 188 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 189 |
+
|
| 190 |
+
set file "src/pcileech_pcie_cfg_a7.sv"
|
| 191 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 192 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 193 |
+
|
| 194 |
+
set file "src/pcileech_pcie_tlp_a7.sv"
|
| 195 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 196 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 197 |
+
|
| 198 |
+
set file "src/pcileech_tlps128_bar_controller.sv"
|
| 199 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 200 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 201 |
+
|
| 202 |
+
set file "src/pcileech_tlps128_cfgspace_shadow.sv"
|
| 203 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 204 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 205 |
+
|
| 206 |
+
set file "src/pcileech_squirrel_top.sv"
|
| 207 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 208 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 209 |
+
|
| 210 |
+
set file "pcie_7x/pcie_7x_0.v"
|
| 211 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 212 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 213 |
+
|
| 214 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx.v"
|
| 215 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 216 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 217 |
+
|
| 218 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"
|
| 219 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 220 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 221 |
+
|
| 222 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"
|
| 223 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 224 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 225 |
+
|
| 226 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_top.v"
|
| 227 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 228 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 229 |
+
|
| 230 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx.v"
|
| 231 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 232 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 233 |
+
|
| 234 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"
|
| 235 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 236 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 237 |
+
|
| 238 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"
|
| 239 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 240 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 241 |
+
|
| 242 |
+
set file "pcie_7x/pcie_7x_0_core_top.v"
|
| 243 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 244 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 245 |
+
|
| 246 |
+
set file "pcie_7x/pcie_7x_0_gt_common.v"
|
| 247 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 248 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 249 |
+
|
| 250 |
+
set file "pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"
|
| 251 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 252 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 253 |
+
|
| 254 |
+
set file "pcie_7x/pcie_7x_0_gt_top.v"
|
| 255 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 256 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 257 |
+
|
| 258 |
+
set file "pcie_7x/pcie_7x_0_gt_wrapper.v"
|
| 259 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 260 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 261 |
+
|
| 262 |
+
set file "pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"
|
| 263 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 264 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 265 |
+
|
| 266 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_drp.v"
|
| 267 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 268 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 269 |
+
|
| 270 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_rate.v"
|
| 271 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 272 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 273 |
+
|
| 274 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_reset.v"
|
| 275 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 276 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 277 |
+
|
| 278 |
+
set file "pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"
|
| 279 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 280 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 281 |
+
|
| 282 |
+
set file "pcie_7x/pcie_7x_0_pcie_7x.v"
|
| 283 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 284 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 285 |
+
|
| 286 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_7x.v"
|
| 287 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 288 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 289 |
+
|
| 290 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"
|
| 291 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 292 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 293 |
+
|
| 294 |
+
set file "pcie_7x/pcie_7x_0_pcie_brams_7x.v"
|
| 295 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 296 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 297 |
+
|
| 298 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_lane.v"
|
| 299 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 300 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 301 |
+
|
| 302 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_misc.v"
|
| 303 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 304 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 305 |
+
|
| 306 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"
|
| 307 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 308 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 309 |
+
|
| 310 |
+
set file "pcie_7x/pcie_7x_0_pcie_top.v"
|
| 311 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 312 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 313 |
+
|
| 314 |
+
set file "pcie_7x/pcie_7x_0_pcie2_top.v"
|
| 315 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 316 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 317 |
+
|
| 318 |
+
set file "pcie_7x/pcie_7x_0_pipe_clock.v"
|
| 319 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 320 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 321 |
+
|
| 322 |
+
set file "pcie_7x/pcie_7x_0_pipe_drp.v"
|
| 323 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 324 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 325 |
+
|
| 326 |
+
set file "pcie_7x/pcie_7x_0_pipe_eq.v"
|
| 327 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 328 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 329 |
+
|
| 330 |
+
set file "pcie_7x/pcie_7x_0_pipe_rate.v"
|
| 331 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 332 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 333 |
+
|
| 334 |
+
set file "pcie_7x/pcie_7x_0_pipe_reset.v"
|
| 335 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 336 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 337 |
+
|
| 338 |
+
set file "pcie_7x/pcie_7x_0_pipe_sync.v"
|
| 339 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 340 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 341 |
+
|
| 342 |
+
set file "pcie_7x/pcie_7x_0_pipe_user.v"
|
| 343 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 344 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 345 |
+
|
| 346 |
+
set file "pcie_7x/pcie_7x_0_qpll_drp.v"
|
| 347 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 348 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 349 |
+
|
| 350 |
+
set file "pcie_7x/pcie_7x_0_pipe_wrapper.v"
|
| 351 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 352 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 353 |
+
|
| 354 |
+
set file "pcie_7x/pcie_7x_0_qpll_reset.v"
|
| 355 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 356 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 357 |
+
|
| 358 |
+
set file "pcie_7x/pcie_7x_0_qpll_wrapper.v"
|
| 359 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 360 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 361 |
+
|
| 362 |
+
set file "pcie_7x/pcie_7x_0_rxeq_scan.v"
|
| 363 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 364 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 365 |
+
|
| 366 |
+
# Set 'sources_1' fileset properties
|
| 367 |
+
set obj [get_filesets sources_1]
|
| 368 |
+
set_property -name "top" -value "pcileech_squirrel_top" -objects $obj
|
| 369 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
# Set 'sources_1' fileset object
|
| 373 |
+
set obj [get_filesets sources_1]
|
| 374 |
+
# Import local files from the original project
|
| 375 |
+
set files [list \
|
| 376 |
+
[file normalize "${origin_dir}/ip/pcileech_bar_zero4k.coe" ]\
|
| 377 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace.coe" ]\
|
| 378 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace_writemask.coe" ]\
|
| 379 |
+
[file normalize "${origin_dir}/ip/bram_pcie_cfgspace.xci" ]\
|
| 380 |
+
]
|
| 381 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 382 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 383 |
+
# None
|
| 384 |
+
# Set 'sources_1' fileset file properties for local files
|
| 385 |
+
set file "bram_pcie_cfgspace/bram_pcie_cfgspace.xci"
|
| 386 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 387 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 388 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 389 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 390 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
# Set 'sources_1' fileset object
|
| 395 |
+
set obj [get_filesets sources_1]
|
| 396 |
+
# Import local files from the original project
|
| 397 |
+
set files [list \
|
| 398 |
+
[file normalize "${origin_dir}/ip/drom_pcie_cfgspace_writemask.xci"]\
|
| 399 |
+
]
|
| 400 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 401 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 402 |
+
# None
|
| 403 |
+
# Set 'sources_1' fileset file properties for local files
|
| 404 |
+
set file "drom_pcie_cfgspace_writemask/drom_pcie_cfgspace_writemask.xci"
|
| 405 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 406 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 407 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 408 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 409 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
# Set 'sources_1' fileset object
|
| 414 |
+
set obj [get_filesets sources_1]
|
| 415 |
+
# Import local files from the original project
|
| 416 |
+
set files [list \
|
| 417 |
+
[file normalize "${origin_dir}/ip/fifo_74_74_clk1_bar_rd1.xci"]\
|
| 418 |
+
]
|
| 419 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 420 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 421 |
+
# None
|
| 422 |
+
# Set 'sources_1' fileset file properties for local files
|
| 423 |
+
set file "fifo_74_74_clk1_bar_rd1/fifo_74_74_clk1_bar_rd1.xci"
|
| 424 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 425 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 426 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 427 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 428 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
|
| 432 |
+
# Set 'sources_1' fileset object
|
| 433 |
+
set obj [get_filesets sources_1]
|
| 434 |
+
# Import local files from the original project
|
| 435 |
+
set files [list \
|
| 436 |
+
[file normalize "${origin_dir}/ip/bram_bar_zero4k.xci"]\
|
| 437 |
+
]
|
| 438 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 439 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 440 |
+
# None
|
| 441 |
+
# Set 'sources_1' fileset file properties for local files
|
| 442 |
+
set file "bram_bar_zero4k/bram_bar_zero4k.xci"
|
| 443 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 444 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 445 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 446 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 447 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
# Set 'sources_1' fileset object
|
| 452 |
+
set obj [get_filesets sources_1]
|
| 453 |
+
# Import local files from the original project
|
| 454 |
+
set files [list \
|
| 455 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk1_bar_rdrsp.xci"]\
|
| 456 |
+
]
|
| 457 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 458 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 459 |
+
# None
|
| 460 |
+
# Set 'sources_1' fileset file properties for local files
|
| 461 |
+
set file "fifo_134_134_clk1_bar_rdrsp/fifo_134_134_clk1_bar_rdrsp.xci"
|
| 462 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 463 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 464 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 465 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 466 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
# Set 'sources_1' fileset object
|
| 471 |
+
set obj [get_filesets sources_1]
|
| 472 |
+
# Import local files from the original project
|
| 473 |
+
set files [list \
|
| 474 |
+
[file normalize "${origin_dir}/ip/fifo_141_141_clk1_bar_wr.xci"]\
|
| 475 |
+
]
|
| 476 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 477 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 478 |
+
# None
|
| 479 |
+
# Set 'sources_1' fileset file properties for local files
|
| 480 |
+
set file "fifo_141_141_clk1_bar_wr/fifo_141_141_clk1_bar_wr.xci"
|
| 481 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 482 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 483 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 484 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 485 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
# Set 'sources_1' fileset object
|
| 490 |
+
set obj [get_filesets sources_1]
|
| 491 |
+
# Import local files from the original project
|
| 492 |
+
set files [list \
|
| 493 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2_rxfifo.xci"]\
|
| 494 |
+
]
|
| 495 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 496 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 497 |
+
# None
|
| 498 |
+
# Set 'sources_1' fileset file properties for local files
|
| 499 |
+
set file "fifo_134_134_clk2_rxfifo/fifo_134_134_clk2_rxfifo.xci"
|
| 500 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 501 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 502 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 503 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 504 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
# Set 'sources_1' fileset object
|
| 509 |
+
set obj [get_filesets sources_1]
|
| 510 |
+
# Import local files from the original project
|
| 511 |
+
set files [list \
|
| 512 |
+
[file normalize "${origin_dir}/ip/fifo_1_1_clk2.xci"]\
|
| 513 |
+
]
|
| 514 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 515 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 516 |
+
# None
|
| 517 |
+
# Set 'sources_1' fileset file properties for local files
|
| 518 |
+
set file "fifo_1_1_clk2/fifo_1_1_clk2.xci"
|
| 519 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 520 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 521 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 522 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 523 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
|
| 527 |
+
# Set 'sources_1' fileset object
|
| 528 |
+
set obj [get_filesets sources_1]
|
| 529 |
+
# Import local files from the original project
|
| 530 |
+
set files [list \
|
| 531 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2.xci"]\
|
| 532 |
+
]
|
| 533 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 534 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 535 |
+
# None
|
| 536 |
+
# Set 'sources_1' fileset file properties for local files
|
| 537 |
+
set file "fifo_134_134_clk2/fifo_134_134_clk2.xci"
|
| 538 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 539 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 540 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 541 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 542 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
|
| 546 |
+
# Set 'sources_1' fileset object
|
| 547 |
+
set obj [get_filesets sources_1]
|
| 548 |
+
# Import local files from the original project
|
| 549 |
+
set files [list \
|
| 550 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk1_fifocmd.xci"]\
|
| 551 |
+
]
|
| 552 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 553 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 554 |
+
# None
|
| 555 |
+
# Set 'sources_1' fileset file properties for local files
|
| 556 |
+
set file "fifo_64_64_clk1_fifocmd/fifo_64_64_clk1_fifocmd.xci"
|
| 557 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 558 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 559 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 560 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 561 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
# Set 'sources_1' fileset object
|
| 566 |
+
set obj [get_filesets sources_1]
|
| 567 |
+
# Import local files from the original project
|
| 568 |
+
set files [list \
|
| 569 |
+
[file normalize "${origin_dir}/ip/fifo_256_32_clk2_comtx.xci"]\
|
| 570 |
+
]
|
| 571 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 572 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 573 |
+
# None
|
| 574 |
+
# Set 'sources_1' fileset file properties for local files
|
| 575 |
+
set file "fifo_256_32_clk2_comtx/fifo_256_32_clk2_comtx.xci"
|
| 576 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 577 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 578 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 579 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 580 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
# Set 'sources_1' fileset object
|
| 585 |
+
set obj [get_filesets sources_1]
|
| 586 |
+
# Import local files from the original project
|
| 587 |
+
set files [list \
|
| 588 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk1_comtx.xci"]\
|
| 589 |
+
]
|
| 590 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 591 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 592 |
+
# None
|
| 593 |
+
# Set 'sources_1' fileset file properties for local files
|
| 594 |
+
set file "fifo_32_32_clk1_comtx/fifo_32_32_clk1_comtx.xci"
|
| 595 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 596 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 597 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 598 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 599 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
# Set 'sources_1' fileset object
|
| 604 |
+
set obj [get_filesets sources_1]
|
| 605 |
+
# Import local files from the original project
|
| 606 |
+
set files [list \
|
| 607 |
+
[file normalize "${origin_dir}/ip/fifo_129_129_clk1.xci"]\
|
| 608 |
+
]
|
| 609 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 610 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 611 |
+
# None
|
| 612 |
+
# Set 'sources_1' fileset file properties for local files
|
| 613 |
+
set file "fifo_129_129_clk1/fifo_129_129_clk1.xci"
|
| 614 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 615 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 616 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 617 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 618 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
# Set 'sources_1' fileset object
|
| 623 |
+
set obj [get_filesets sources_1]
|
| 624 |
+
# Import local files from the original project
|
| 625 |
+
set files [list \
|
| 626 |
+
[file normalize "${origin_dir}/ip/fifo_64_64.xci"]\
|
| 627 |
+
]
|
| 628 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 629 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 630 |
+
# None
|
| 631 |
+
# Set 'sources_1' fileset file properties for local files
|
| 632 |
+
set file "fifo_64_64/fifo_64_64.xci"
|
| 633 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 634 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 635 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 636 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 637 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 638 |
+
}
|
| 639 |
+
|
| 640 |
+
|
| 641 |
+
# Set 'sources_1' fileset object
|
| 642 |
+
set obj [get_filesets sources_1]
|
| 643 |
+
# Import local files from the original project
|
| 644 |
+
set files [list \
|
| 645 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk2.xci"]\
|
| 646 |
+
]
|
| 647 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 648 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 649 |
+
# None
|
| 650 |
+
# Set 'sources_1' fileset file properties for local files
|
| 651 |
+
set file "fifo_32_32_clk2/fifo_32_32_clk2.xci"
|
| 652 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 653 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 654 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 655 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 656 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
|
| 660 |
+
# Set 'sources_1' fileset object
|
| 661 |
+
set obj [get_filesets sources_1]
|
| 662 |
+
# Import local files from the original project
|
| 663 |
+
set files [list \
|
| 664 |
+
[file normalize "${origin_dir}/ip/fifo_49_49_clk2.xci"]\
|
| 665 |
+
]
|
| 666 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 667 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 668 |
+
# None
|
| 669 |
+
# Set 'sources_1' fileset file properties for local files
|
| 670 |
+
set file "fifo_49_49_clk2/fifo_49_49_clk2.xci"
|
| 671 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 672 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 673 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 674 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 675 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
|
| 679 |
+
# Set 'sources_1' fileset object
|
| 680 |
+
set obj [get_filesets sources_1]
|
| 681 |
+
# Import local files from the original project
|
| 682 |
+
set files [list \
|
| 683 |
+
[file normalize "${origin_dir}/ip/fifo_43_43_clk2.xci"]\
|
| 684 |
+
]
|
| 685 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 686 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 687 |
+
# None
|
| 688 |
+
# Set 'sources_1' fileset file properties for local files
|
| 689 |
+
set file "fifo_43_43_clk2/fifo_43_43_clk2.xci"
|
| 690 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 691 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 692 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 693 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 694 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
|
| 698 |
+
# Set 'sources_1' fileset object
|
| 699 |
+
set obj [get_filesets sources_1]
|
| 700 |
+
# Import local files from the original project
|
| 701 |
+
set files [list \
|
| 702 |
+
[file normalize "${origin_dir}/ip/fifo_34_34.xci"]\
|
| 703 |
+
]
|
| 704 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 705 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 706 |
+
# None
|
| 707 |
+
# Set 'sources_1' fileset file properties for local files
|
| 708 |
+
set file "fifo_34_34/fifo_34_34.xci"
|
| 709 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 710 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 711 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 712 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 713 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 714 |
+
}
|
| 715 |
+
|
| 716 |
+
|
| 717 |
+
# Set 'sources_1' fileset object
|
| 718 |
+
set obj [get_filesets sources_1]
|
| 719 |
+
# Import local files from the original project
|
| 720 |
+
set files [list \
|
| 721 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk2_comrx.xci" ]\
|
| 722 |
+
]
|
| 723 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 724 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 725 |
+
# None
|
| 726 |
+
# Set 'sources_1' fileset file properties for local files
|
| 727 |
+
set file "fifo_64_64_clk2_comrx/fifo_64_64_clk2_comrx.xci"
|
| 728 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 729 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 730 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 731 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 732 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 733 |
+
}
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
# Create 'constrs_1' fileset (if not found)
|
| 737 |
+
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
| 738 |
+
create_fileset -constrset constrs_1
|
| 739 |
+
}
|
| 740 |
+
# Set 'constrs_1' fileset object
|
| 741 |
+
set obj [get_filesets constrs_1]
|
| 742 |
+
# Add/Import constrs file and set constrs file properties
|
| 743 |
+
set file "[file normalize ${origin_dir}/src/pcileech_squirrel.xdc]"
|
| 744 |
+
set file_imported [import_files -fileset constrs_1 [list $file]]
|
| 745 |
+
set file "src/pcileech_squirrel.xdc"
|
| 746 |
+
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
|
| 747 |
+
set_property -name "file_type" -value "XDC" -objects $file_obj
|
| 748 |
+
|
| 749 |
+
# Set 'constrs_1' fileset properties
|
| 750 |
+
set obj [get_filesets constrs_1]
|
| 751 |
+
set_property -name "target_part" -value "xc7a75tfgg484-2" -objects $obj
|
| 752 |
+
|
| 753 |
+
# Create 'sim_1' fileset (if not found)
|
| 754 |
+
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
| 755 |
+
create_fileset -simset sim_1
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
# Set 'sim_1' fileset object
|
| 759 |
+
set obj [get_filesets sim_1]
|
| 760 |
+
# Empty (no sources present)
|
| 761 |
+
|
| 762 |
+
# Set 'sim_1' fileset properties
|
| 763 |
+
set obj [get_filesets sim_1]
|
| 764 |
+
set_property -name "top" -value "pcileech_squirrel_top" -objects $obj
|
| 765 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 766 |
+
|
| 767 |
+
# Upgrade IP from the currently installed Vivado version
|
| 768 |
+
upgrade_ip [get_ips *]
|
| 769 |
+
|
| 770 |
+
# Set 'utils_1' fileset object
|
| 771 |
+
set obj [get_filesets utils_1]
|
| 772 |
+
# Empty (no sources present)
|
| 773 |
+
|
| 774 |
+
# Set 'utils_1' fileset properties
|
| 775 |
+
set obj [get_filesets utils_1]
|
| 776 |
+
|
| 777 |
+
# Create 'synth_1' run (if not found)
|
| 778 |
+
if {[string equal [get_runs -quiet synth_1] ""]} {
|
| 779 |
+
create_run -name synth_1 -part xc7a75tfgg484-2 -flow {Vivado Synthesis 2022} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
|
| 780 |
+
} else {
|
| 781 |
+
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
|
| 782 |
+
set_property flow "Vivado Synthesis 2022" [get_runs synth_1]
|
| 783 |
+
}
|
| 784 |
+
set obj [get_runs synth_1]
|
| 785 |
+
set_property set_report_strategy_name 1 $obj
|
| 786 |
+
set_property report_strategy {Vivado Synthesis Default Reports} $obj
|
| 787 |
+
set_property set_report_strategy_name 0 $obj
|
| 788 |
+
# Create 'synth_1_synth_report_utilization_0' report (if not found)
|
| 789 |
+
if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
|
| 790 |
+
create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
|
| 791 |
+
}
|
| 792 |
+
set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
|
| 793 |
+
if { $obj != "" } {
|
| 794 |
+
|
| 795 |
+
}
|
| 796 |
+
set obj [get_runs synth_1]
|
| 797 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 798 |
+
set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
|
| 799 |
+
|
| 800 |
+
# set the current synth run
|
| 801 |
+
current_run -synthesis [get_runs synth_1]
|
| 802 |
+
|
| 803 |
+
# Create 'impl_1' run (if not found)
|
| 804 |
+
if {[string equal [get_runs -quiet impl_1] ""]} {
|
| 805 |
+
create_run -name impl_1 -part xc7a75tfgg484-2 -flow {Vivado Implementation 2022} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
|
| 806 |
+
} else {
|
| 807 |
+
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
|
| 808 |
+
set_property flow "Vivado Implementation 2022" [get_runs impl_1]
|
| 809 |
+
}
|
| 810 |
+
set obj [get_runs impl_1]
|
| 811 |
+
set_property set_report_strategy_name 1 $obj
|
| 812 |
+
set_property report_strategy {Vivado Implementation Default Reports} $obj
|
| 813 |
+
set_property set_report_strategy_name 0 $obj
|
| 814 |
+
# Create 'impl_1_init_report_timing_summary_0' report (if not found)
|
| 815 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
|
| 816 |
+
create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
|
| 817 |
+
}
|
| 818 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
|
| 819 |
+
if { $obj != "" } {
|
| 820 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 821 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 822 |
+
|
| 823 |
+
}
|
| 824 |
+
# Create 'impl_1_opt_report_drc_0' report (if not found)
|
| 825 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
|
| 826 |
+
create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
|
| 827 |
+
}
|
| 828 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
|
| 829 |
+
if { $obj != "" } {
|
| 830 |
+
|
| 831 |
+
}
|
| 832 |
+
# Create 'impl_1_opt_report_timing_summary_0' report (if not found)
|
| 833 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
|
| 834 |
+
create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
|
| 835 |
+
}
|
| 836 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
|
| 837 |
+
if { $obj != "" } {
|
| 838 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 839 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 840 |
+
|
| 841 |
+
}
|
| 842 |
+
# Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
|
| 843 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
|
| 844 |
+
create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
|
| 845 |
+
}
|
| 846 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
|
| 847 |
+
if { $obj != "" } {
|
| 848 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 849 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 850 |
+
|
| 851 |
+
}
|
| 852 |
+
# Create 'impl_1_place_report_io_0' report (if not found)
|
| 853 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
|
| 854 |
+
create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
|
| 855 |
+
}
|
| 856 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
|
| 857 |
+
if { $obj != "" } {
|
| 858 |
+
|
| 859 |
+
}
|
| 860 |
+
# Create 'impl_1_place_report_utilization_0' report (if not found)
|
| 861 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
|
| 862 |
+
create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
|
| 863 |
+
}
|
| 864 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
|
| 865 |
+
if { $obj != "" } {
|
| 866 |
+
|
| 867 |
+
}
|
| 868 |
+
# Create 'impl_1_place_report_control_sets_0' report (if not found)
|
| 869 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
|
| 870 |
+
create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
|
| 871 |
+
}
|
| 872 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
|
| 873 |
+
if { $obj != "" } {
|
| 874 |
+
set_property -name "options.verbose" -value "1" -objects $obj
|
| 875 |
+
|
| 876 |
+
}
|
| 877 |
+
# Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
|
| 878 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
|
| 879 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 880 |
+
}
|
| 881 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
|
| 882 |
+
if { $obj != "" } {
|
| 883 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 884 |
+
|
| 885 |
+
}
|
| 886 |
+
# Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
|
| 887 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
|
| 888 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 889 |
+
}
|
| 890 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
|
| 891 |
+
if { $obj != "" } {
|
| 892 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 893 |
+
|
| 894 |
+
}
|
| 895 |
+
# Create 'impl_1_place_report_timing_summary_0' report (if not found)
|
| 896 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
|
| 897 |
+
create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
|
| 898 |
+
}
|
| 899 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
|
| 900 |
+
if { $obj != "" } {
|
| 901 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 902 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 903 |
+
|
| 904 |
+
}
|
| 905 |
+
# Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
|
| 906 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
|
| 907 |
+
create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
|
| 908 |
+
}
|
| 909 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
|
| 910 |
+
if { $obj != "" } {
|
| 911 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 912 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 913 |
+
|
| 914 |
+
}
|
| 915 |
+
# Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
|
| 916 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
|
| 917 |
+
create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
|
| 918 |
+
}
|
| 919 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
|
| 920 |
+
if { $obj != "" } {
|
| 921 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 922 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 923 |
+
|
| 924 |
+
}
|
| 925 |
+
# Create 'impl_1_route_report_drc_0' report (if not found)
|
| 926 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
|
| 927 |
+
create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
|
| 928 |
+
}
|
| 929 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
|
| 930 |
+
if { $obj != "" } {
|
| 931 |
+
|
| 932 |
+
}
|
| 933 |
+
# Create 'impl_1_route_report_methodology_0' report (if not found)
|
| 934 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
|
| 935 |
+
create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
|
| 936 |
+
}
|
| 937 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
|
| 938 |
+
if { $obj != "" } {
|
| 939 |
+
|
| 940 |
+
}
|
| 941 |
+
# Create 'impl_1_route_report_power_0' report (if not found)
|
| 942 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
|
| 943 |
+
create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
|
| 944 |
+
}
|
| 945 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
|
| 946 |
+
if { $obj != "" } {
|
| 947 |
+
|
| 948 |
+
}
|
| 949 |
+
# Create 'impl_1_route_report_route_status_0' report (if not found)
|
| 950 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
|
| 951 |
+
create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
|
| 952 |
+
}
|
| 953 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
|
| 954 |
+
if { $obj != "" } {
|
| 955 |
+
|
| 956 |
+
}
|
| 957 |
+
# Create 'impl_1_route_report_timing_summary_0' report (if not found)
|
| 958 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
|
| 959 |
+
create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
|
| 960 |
+
}
|
| 961 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
|
| 962 |
+
if { $obj != "" } {
|
| 963 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 964 |
+
|
| 965 |
+
}
|
| 966 |
+
# Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
|
| 967 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
|
| 968 |
+
create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
|
| 969 |
+
}
|
| 970 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
|
| 971 |
+
if { $obj != "" } {
|
| 972 |
+
|
| 973 |
+
}
|
| 974 |
+
# Create 'impl_1_route_report_clock_utilization_0' report (if not found)
|
| 975 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
|
| 976 |
+
create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
|
| 977 |
+
}
|
| 978 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
|
| 979 |
+
if { $obj != "" } {
|
| 980 |
+
|
| 981 |
+
}
|
| 982 |
+
# Create 'impl_1_route_report_bus_skew_0' report (if not found)
|
| 983 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
|
| 984 |
+
create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
|
| 985 |
+
}
|
| 986 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
|
| 987 |
+
if { $obj != "" } {
|
| 988 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 989 |
+
|
| 990 |
+
}
|
| 991 |
+
# Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
|
| 992 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
|
| 993 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
|
| 994 |
+
}
|
| 995 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
|
| 996 |
+
if { $obj != "" } {
|
| 997 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 998 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 999 |
+
|
| 1000 |
+
}
|
| 1001 |
+
# Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
|
| 1002 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
|
| 1003 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
|
| 1004 |
+
}
|
| 1005 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
|
| 1006 |
+
if { $obj != "" } {
|
| 1007 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 1008 |
+
|
| 1009 |
+
}
|
| 1010 |
+
set obj [get_runs impl_1]
|
| 1011 |
+
set_property -name "part" -value "xc7a75tfgg484-2" -objects $obj
|
| 1012 |
+
set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
|
| 1013 |
+
set_property -name "steps.phys_opt_design.is_enabled" -value "1" -objects $obj
|
| 1014 |
+
set_property -name "steps.write_bitstream.args.bin_file" -value "1" -objects $obj
|
| 1015 |
+
set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
|
| 1016 |
+
set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
|
| 1017 |
+
|
| 1018 |
+
# set the current impl run
|
| 1019 |
+
current_run -implementation [get_runs impl_1]
|
| 1020 |
+
|
| 1021 |
+
puts "INFO: Project created:${_xil_proj_name_}"
|
| 1022 |
+
# Create 'drc_1' gadget (if not found)
|
| 1023 |
+
if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
|
| 1024 |
+
create_dashboard_gadget -name {drc_1} -type drc
|
| 1025 |
+
}
|
| 1026 |
+
set obj [get_dashboard_gadgets [ list "drc_1" ] ]
|
| 1027 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
|
| 1028 |
+
|
| 1029 |
+
# Create 'methodology_1' gadget (if not found)
|
| 1030 |
+
if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
|
| 1031 |
+
create_dashboard_gadget -name {methodology_1} -type methodology
|
| 1032 |
+
}
|
| 1033 |
+
set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
|
| 1034 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
|
| 1035 |
+
|
| 1036 |
+
# Create 'power_1' gadget (if not found)
|
| 1037 |
+
if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
|
| 1038 |
+
create_dashboard_gadget -name {power_1} -type power
|
| 1039 |
+
}
|
| 1040 |
+
set obj [get_dashboard_gadgets [ list "power_1" ] ]
|
| 1041 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
|
| 1042 |
+
|
| 1043 |
+
# Create 'timing_1' gadget (if not found)
|
| 1044 |
+
if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
|
| 1045 |
+
create_dashboard_gadget -name {timing_1} -type timing
|
| 1046 |
+
}
|
| 1047 |
+
set obj [get_dashboard_gadgets [ list "timing_1" ] ]
|
| 1048 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
|
| 1049 |
+
|
| 1050 |
+
# Create 'utilization_1' gadget (if not found)
|
| 1051 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
|
| 1052 |
+
create_dashboard_gadget -name {utilization_1} -type utilization
|
| 1053 |
+
}
|
| 1054 |
+
set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
|
| 1055 |
+
set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
|
| 1056 |
+
set_property -name "run.step" -value "synth_design" -objects $obj
|
| 1057 |
+
set_property -name "run.type" -value "synthesis" -objects $obj
|
| 1058 |
+
|
| 1059 |
+
# Create 'utilization_2' gadget (if not found)
|
| 1060 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
|
| 1061 |
+
create_dashboard_gadget -name {utilization_2} -type utilization
|
| 1062 |
+
}
|
| 1063 |
+
set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
|
| 1064 |
+
set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
|
| 1065 |
+
|
| 1066 |
+
move_dashboard_gadget -name {utilization_1} -row 0 -col 0
|
| 1067 |
+
move_dashboard_gadget -name {power_1} -row 1 -col 0
|
| 1068 |
+
move_dashboard_gadget -name {drc_1} -row 2 -col 0
|
| 1069 |
+
move_dashboard_gadget -name {timing_1} -row 0 -col 1
|
| 1070 |
+
move_dashboard_gadget -name {utilization_2} -row 1 -col 1
|
| 1071 |
+
move_dashboard_gadget -name {methodology_1} -row 2 -col 1
|
JOKOSAHS_DMA-Pcileech/vivado_generate_project_m2.tcl
ADDED
|
@@ -0,0 +1,1071 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
| 1 |
+
#
|
| 2 |
+
# Vivado generated .tcl for creating the pcileech_screamer_m2 vivado project.
|
| 3 |
+
# Run from within "Vivado Tcl Shell" with command: source vivado_generate_project.tcl -notrace
|
| 4 |
+
#
|
| 5 |
+
|
| 6 |
+
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
| 7 |
+
set origin_dir "."
|
| 8 |
+
|
| 9 |
+
# Use origin directory path location variable, if specified in the tcl shell
|
| 10 |
+
if { [info exists ::origin_dir_loc] } {
|
| 11 |
+
set origin_dir $::origin_dir_loc
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
# Set the project name
|
| 15 |
+
set _xil_proj_name_ "pcileech_screamer_m2"
|
| 16 |
+
|
| 17 |
+
# Use project name variable, if specified in the tcl shell
|
| 18 |
+
if { [info exists ::user_project_name] } {
|
| 19 |
+
set _xil_proj_name_ $::user_project_name
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
variable script_file
|
| 23 |
+
set script_file "vivado_generate_project.tcl"
|
| 24 |
+
|
| 25 |
+
# Help information for this script
|
| 26 |
+
proc print_help {} {
|
| 27 |
+
variable script_file
|
| 28 |
+
puts "\nDescription:"
|
| 29 |
+
puts "Recreate a Vivado project from this script. The created project will be"
|
| 30 |
+
puts "functionally equivalent to the original project for which this script was"
|
| 31 |
+
puts "generated. The script contains commands for creating a project, filesets,"
|
| 32 |
+
puts "runs, adding/importing sources and setting properties on various objects.\n"
|
| 33 |
+
puts "Syntax:"
|
| 34 |
+
puts "$script_file"
|
| 35 |
+
puts "$script_file -tclargs \[--origin_dir <path>\]"
|
| 36 |
+
puts "$script_file -tclargs \[--project_name <name>\]"
|
| 37 |
+
puts "$script_file -tclargs \[--help\]\n"
|
| 38 |
+
puts "Usage:"
|
| 39 |
+
puts "Name Description"
|
| 40 |
+
puts "-------------------------------------------------------------------------"
|
| 41 |
+
puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
|
| 42 |
+
puts " origin_dir path value is \".\", otherwise, the value"
|
| 43 |
+
puts " that was set with the \"-paths_relative_to\" switch"
|
| 44 |
+
puts " when this script was generated.\n"
|
| 45 |
+
puts "\[--project_name <name>\] Create project with the specified name. Default"
|
| 46 |
+
puts " name is the name of the project from where this"
|
| 47 |
+
puts " script was generated.\n"
|
| 48 |
+
puts "\[--help\] Print help information for this script"
|
| 49 |
+
puts "-------------------------------------------------------------------------\n"
|
| 50 |
+
exit 0
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
if { $::argc > 0 } {
|
| 54 |
+
for {set i 0} {$i < $::argc} {incr i} {
|
| 55 |
+
set option [string trim [lindex $::argv $i]]
|
| 56 |
+
switch -regexp -- $option {
|
| 57 |
+
"--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
|
| 58 |
+
"--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
|
| 59 |
+
"--help" { print_help }
|
| 60 |
+
default {
|
| 61 |
+
if { [regexp {^-} $option] } {
|
| 62 |
+
puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
|
| 63 |
+
return 1
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
# Set the directory path for the original project from where this script was exported
|
| 71 |
+
set orig_proj_dir "[file normalize "$origin_dir/pcileech_screamer_m2"]"
|
| 72 |
+
|
| 73 |
+
# Create project
|
| 74 |
+
create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7a35tcsg325-2
|
| 75 |
+
|
| 76 |
+
# Set the directory path for the new project
|
| 77 |
+
set proj_dir [get_property directory [current_project]]
|
| 78 |
+
|
| 79 |
+
# Set project properties
|
| 80 |
+
set obj [current_project]
|
| 81 |
+
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
|
| 82 |
+
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
|
| 83 |
+
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
|
| 84 |
+
set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
|
| 85 |
+
set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
|
| 86 |
+
set_property -name "part" -value "xc7a35tcsg325-2" -objects $obj
|
| 87 |
+
set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
|
| 88 |
+
set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
|
| 89 |
+
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
|
| 90 |
+
set_property -name "simulator_language" -value "Mixed" -objects $obj
|
| 91 |
+
set_property -name "webtalk.activehdl_export_sim" -value "5" -objects $obj
|
| 92 |
+
set_property -name "webtalk.ies_export_sim" -value "5" -objects $obj
|
| 93 |
+
set_property -name "webtalk.modelsim_export_sim" -value "5" -objects $obj
|
| 94 |
+
set_property -name "webtalk.questa_export_sim" -value "5" -objects $obj
|
| 95 |
+
set_property -name "webtalk.riviera_export_sim" -value "5" -objects $obj
|
| 96 |
+
set_property -name "webtalk.vcs_export_sim" -value "5" -objects $obj
|
| 97 |
+
set_property -name "webtalk.xsim_export_sim" -value "5" -objects $obj
|
| 98 |
+
set_property -name "xpm_libraries" -value "XPM_CDC XPM_MEMORY" -objects $obj
|
| 99 |
+
|
| 100 |
+
# Create 'sources_1' fileset (if not found)
|
| 101 |
+
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
| 102 |
+
create_fileset -srcset sources_1
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
# Set 'sources_1' fileset object
|
| 106 |
+
set obj [get_filesets sources_1]
|
| 107 |
+
# Import local files from the original project
|
| 108 |
+
set files [list \
|
| 109 |
+
[file normalize "${origin_dir}/src/pcileech_header.svh"]\
|
| 110 |
+
[file normalize "${origin_dir}/src/pcileech_com.sv" ]\
|
| 111 |
+
[file normalize "${origin_dir}/src/pcileech_fifo.sv"]\
|
| 112 |
+
[file normalize "${origin_dir}/src/pcileech_ft601.sv"]\
|
| 113 |
+
[file normalize "${origin_dir}/src/pcileech_mux.sv"]\
|
| 114 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_a7.sv"]\
|
| 115 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_cfg_a7.sv"]\
|
| 116 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_tlp_a7.sv"]\
|
| 117 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_bar_controller.sv"]\
|
| 118 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_cfgspace_shadow.sv"]\
|
| 119 |
+
[file normalize "${origin_dir}/src/pcileech_screamer_m2_top.sv"]\
|
| 120 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0.v"]\
|
| 121 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx.v"]\
|
| 122 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"]\
|
| 123 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"]\
|
| 124 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_top.v"]\
|
| 125 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx.v"]\
|
| 126 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"]\
|
| 127 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"]\
|
| 128 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_core_top.v"]\
|
| 129 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_common.v"]\
|
| 130 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"]\
|
| 131 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_top.v"]\
|
| 132 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_wrapper.v"]\
|
| 133 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"]\
|
| 134 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_drp.v"]\
|
| 135 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_rate.v"]\
|
| 136 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_reset.v"]\
|
| 137 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"]\
|
| 138 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_7x.v"]\
|
| 139 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_7x.v"]\
|
| 140 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"]\
|
| 141 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_brams_7x.v"]\
|
| 142 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_lane.v"]\
|
| 143 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_misc.v"]\
|
| 144 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"]\
|
| 145 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_top.v"]\
|
| 146 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie2_top.v"]\
|
| 147 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_clock.v"]\
|
| 148 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_drp.v"]\
|
| 149 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_eq.v"]\
|
| 150 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_rate.v"]\
|
| 151 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_reset.v"]\
|
| 152 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_sync.v"]\
|
| 153 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_user.v"]\
|
| 154 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_wrapper.v"]\
|
| 155 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_drp.v"]\
|
| 156 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_reset.v"]\
|
| 157 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_wrapper.v"]\
|
| 158 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_rxeq_scan.v"]\
|
| 159 |
+
]
|
| 160 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 161 |
+
|
| 162 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 163 |
+
# None
|
| 164 |
+
|
| 165 |
+
# Set 'sources_1' fileset file properties for local files
|
| 166 |
+
set file "src/pcileech_header.svh"
|
| 167 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 168 |
+
set_property -name "file_type" -value "Verilog Header" -objects $file_obj
|
| 169 |
+
|
| 170 |
+
set file "src/pcileech_com.sv"
|
| 171 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 172 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 173 |
+
|
| 174 |
+
set file "src/pcileech_fifo.sv"
|
| 175 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 176 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 177 |
+
|
| 178 |
+
set file "src/pcileech_ft601.sv"
|
| 179 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 180 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 181 |
+
|
| 182 |
+
set file "src/pcileech_mux.sv"
|
| 183 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 184 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 185 |
+
|
| 186 |
+
set file "src/pcileech_pcie_a7.sv"
|
| 187 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 188 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 189 |
+
|
| 190 |
+
set file "src/pcileech_pcie_cfg_a7.sv"
|
| 191 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 192 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 193 |
+
|
| 194 |
+
set file "src/pcileech_pcie_tlp_a7.sv"
|
| 195 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 196 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 197 |
+
|
| 198 |
+
set file "src/pcileech_tlps128_bar_controller.sv"
|
| 199 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 200 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 201 |
+
|
| 202 |
+
set file "src/pcileech_tlps128_cfgspace_shadow.sv"
|
| 203 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 204 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 205 |
+
|
| 206 |
+
set file "src/pcileech_screamer_m2_top.sv"
|
| 207 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 208 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 209 |
+
|
| 210 |
+
set file "pcie_7x/pcie_7x_0.v"
|
| 211 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 212 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 213 |
+
|
| 214 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx.v"
|
| 215 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 216 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 217 |
+
|
| 218 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"
|
| 219 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 220 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 221 |
+
|
| 222 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"
|
| 223 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 224 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 225 |
+
|
| 226 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_top.v"
|
| 227 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 228 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 229 |
+
|
| 230 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx.v"
|
| 231 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 232 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 233 |
+
|
| 234 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"
|
| 235 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 236 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 237 |
+
|
| 238 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"
|
| 239 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 240 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 241 |
+
|
| 242 |
+
set file "pcie_7x/pcie_7x_0_core_top.v"
|
| 243 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 244 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 245 |
+
|
| 246 |
+
set file "pcie_7x/pcie_7x_0_gt_common.v"
|
| 247 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 248 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 249 |
+
|
| 250 |
+
set file "pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"
|
| 251 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 252 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 253 |
+
|
| 254 |
+
set file "pcie_7x/pcie_7x_0_gt_top.v"
|
| 255 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 256 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 257 |
+
|
| 258 |
+
set file "pcie_7x/pcie_7x_0_gt_wrapper.v"
|
| 259 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 260 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 261 |
+
|
| 262 |
+
set file "pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"
|
| 263 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 264 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 265 |
+
|
| 266 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_drp.v"
|
| 267 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 268 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 269 |
+
|
| 270 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_rate.v"
|
| 271 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 272 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 273 |
+
|
| 274 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_reset.v"
|
| 275 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 276 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 277 |
+
|
| 278 |
+
set file "pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"
|
| 279 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 280 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 281 |
+
|
| 282 |
+
set file "pcie_7x/pcie_7x_0_pcie_7x.v"
|
| 283 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 284 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 285 |
+
|
| 286 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_7x.v"
|
| 287 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 288 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 289 |
+
|
| 290 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"
|
| 291 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 292 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 293 |
+
|
| 294 |
+
set file "pcie_7x/pcie_7x_0_pcie_brams_7x.v"
|
| 295 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 296 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 297 |
+
|
| 298 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_lane.v"
|
| 299 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 300 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 301 |
+
|
| 302 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_misc.v"
|
| 303 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 304 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 305 |
+
|
| 306 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"
|
| 307 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 308 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 309 |
+
|
| 310 |
+
set file "pcie_7x/pcie_7x_0_pcie_top.v"
|
| 311 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 312 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 313 |
+
|
| 314 |
+
set file "pcie_7x/pcie_7x_0_pcie2_top.v"
|
| 315 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 316 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 317 |
+
|
| 318 |
+
set file "pcie_7x/pcie_7x_0_pipe_clock.v"
|
| 319 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 320 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 321 |
+
|
| 322 |
+
set file "pcie_7x/pcie_7x_0_pipe_drp.v"
|
| 323 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 324 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 325 |
+
|
| 326 |
+
set file "pcie_7x/pcie_7x_0_pipe_eq.v"
|
| 327 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 328 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 329 |
+
|
| 330 |
+
set file "pcie_7x/pcie_7x_0_pipe_rate.v"
|
| 331 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 332 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 333 |
+
|
| 334 |
+
set file "pcie_7x/pcie_7x_0_pipe_reset.v"
|
| 335 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 336 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 337 |
+
|
| 338 |
+
set file "pcie_7x/pcie_7x_0_pipe_sync.v"
|
| 339 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 340 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 341 |
+
|
| 342 |
+
set file "pcie_7x/pcie_7x_0_pipe_user.v"
|
| 343 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 344 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 345 |
+
|
| 346 |
+
set file "pcie_7x/pcie_7x_0_qpll_drp.v"
|
| 347 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 348 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 349 |
+
|
| 350 |
+
set file "pcie_7x/pcie_7x_0_pipe_wrapper.v"
|
| 351 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 352 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 353 |
+
|
| 354 |
+
set file "pcie_7x/pcie_7x_0_qpll_reset.v"
|
| 355 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 356 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 357 |
+
|
| 358 |
+
set file "pcie_7x/pcie_7x_0_qpll_wrapper.v"
|
| 359 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 360 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 361 |
+
|
| 362 |
+
set file "pcie_7x/pcie_7x_0_rxeq_scan.v"
|
| 363 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 364 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 365 |
+
|
| 366 |
+
# Set 'sources_1' fileset properties
|
| 367 |
+
set obj [get_filesets sources_1]
|
| 368 |
+
set_property -name "top" -value "pcileech_screamer_m2_top" -objects $obj
|
| 369 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
# Set 'sources_1' fileset object
|
| 373 |
+
set obj [get_filesets sources_1]
|
| 374 |
+
# Import local files from the original project
|
| 375 |
+
set files [list \
|
| 376 |
+
[file normalize "${origin_dir}/ip/pcileech_bar_zero4k.coe" ]\
|
| 377 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace.coe" ]\
|
| 378 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace_writemask.coe" ]\
|
| 379 |
+
[file normalize "${origin_dir}/ip/bram_pcie_cfgspace.xci" ]\
|
| 380 |
+
]
|
| 381 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 382 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 383 |
+
# None
|
| 384 |
+
# Set 'sources_1' fileset file properties for local files
|
| 385 |
+
set file "bram_pcie_cfgspace/bram_pcie_cfgspace.xci"
|
| 386 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 387 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 388 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 389 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 390 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
# Set 'sources_1' fileset object
|
| 395 |
+
set obj [get_filesets sources_1]
|
| 396 |
+
# Import local files from the original project
|
| 397 |
+
set files [list \
|
| 398 |
+
[file normalize "${origin_dir}/ip/drom_pcie_cfgspace_writemask.xci"]\
|
| 399 |
+
]
|
| 400 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 401 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 402 |
+
# None
|
| 403 |
+
# Set 'sources_1' fileset file properties for local files
|
| 404 |
+
set file "drom_pcie_cfgspace_writemask/drom_pcie_cfgspace_writemask.xci"
|
| 405 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 406 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 407 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 408 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 409 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
# Set 'sources_1' fileset object
|
| 414 |
+
set obj [get_filesets sources_1]
|
| 415 |
+
# Import local files from the original project
|
| 416 |
+
set files [list \
|
| 417 |
+
[file normalize "${origin_dir}/ip/fifo_74_74_clk1_bar_rd1.xci"]\
|
| 418 |
+
]
|
| 419 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 420 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 421 |
+
# None
|
| 422 |
+
# Set 'sources_1' fileset file properties for local files
|
| 423 |
+
set file "fifo_74_74_clk1_bar_rd1/fifo_74_74_clk1_bar_rd1.xci"
|
| 424 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 425 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 426 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 427 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 428 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
|
| 432 |
+
# Set 'sources_1' fileset object
|
| 433 |
+
set obj [get_filesets sources_1]
|
| 434 |
+
# Import local files from the original project
|
| 435 |
+
set files [list \
|
| 436 |
+
[file normalize "${origin_dir}/ip/bram_bar_zero4k.xci"]\
|
| 437 |
+
]
|
| 438 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 439 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 440 |
+
# None
|
| 441 |
+
# Set 'sources_1' fileset file properties for local files
|
| 442 |
+
set file "bram_bar_zero4k/bram_bar_zero4k.xci"
|
| 443 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 444 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 445 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 446 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 447 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
# Set 'sources_1' fileset object
|
| 452 |
+
set obj [get_filesets sources_1]
|
| 453 |
+
# Import local files from the original project
|
| 454 |
+
set files [list \
|
| 455 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk1_bar_rdrsp.xci"]\
|
| 456 |
+
]
|
| 457 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 458 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 459 |
+
# None
|
| 460 |
+
# Set 'sources_1' fileset file properties for local files
|
| 461 |
+
set file "fifo_134_134_clk1_bar_rdrsp/fifo_134_134_clk1_bar_rdrsp.xci"
|
| 462 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 463 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 464 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 465 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 466 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
# Set 'sources_1' fileset object
|
| 471 |
+
set obj [get_filesets sources_1]
|
| 472 |
+
# Import local files from the original project
|
| 473 |
+
set files [list \
|
| 474 |
+
[file normalize "${origin_dir}/ip/fifo_141_141_clk1_bar_wr.xci"]\
|
| 475 |
+
]
|
| 476 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 477 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 478 |
+
# None
|
| 479 |
+
# Set 'sources_1' fileset file properties for local files
|
| 480 |
+
set file "fifo_141_141_clk1_bar_wr/fifo_141_141_clk1_bar_wr.xci"
|
| 481 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 482 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 483 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 484 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 485 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
# Set 'sources_1' fileset object
|
| 490 |
+
set obj [get_filesets sources_1]
|
| 491 |
+
# Import local files from the original project
|
| 492 |
+
set files [list \
|
| 493 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2_rxfifo.xci"]\
|
| 494 |
+
]
|
| 495 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 496 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 497 |
+
# None
|
| 498 |
+
# Set 'sources_1' fileset file properties for local files
|
| 499 |
+
set file "fifo_134_134_clk2_rxfifo/fifo_134_134_clk2_rxfifo.xci"
|
| 500 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 501 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 502 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 503 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 504 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
# Set 'sources_1' fileset object
|
| 509 |
+
set obj [get_filesets sources_1]
|
| 510 |
+
# Import local files from the original project
|
| 511 |
+
set files [list \
|
| 512 |
+
[file normalize "${origin_dir}/ip/fifo_1_1_clk2.xci"]\
|
| 513 |
+
]
|
| 514 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 515 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 516 |
+
# None
|
| 517 |
+
# Set 'sources_1' fileset file properties for local files
|
| 518 |
+
set file "fifo_1_1_clk2/fifo_1_1_clk2.xci"
|
| 519 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 520 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 521 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 522 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 523 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
|
| 527 |
+
# Set 'sources_1' fileset object
|
| 528 |
+
set obj [get_filesets sources_1]
|
| 529 |
+
# Import local files from the original project
|
| 530 |
+
set files [list \
|
| 531 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2.xci"]\
|
| 532 |
+
]
|
| 533 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 534 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 535 |
+
# None
|
| 536 |
+
# Set 'sources_1' fileset file properties for local files
|
| 537 |
+
set file "fifo_134_134_clk2/fifo_134_134_clk2.xci"
|
| 538 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 539 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 540 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 541 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 542 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
|
| 546 |
+
# Set 'sources_1' fileset object
|
| 547 |
+
set obj [get_filesets sources_1]
|
| 548 |
+
# Import local files from the original project
|
| 549 |
+
set files [list \
|
| 550 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk1_fifocmd.xci"]\
|
| 551 |
+
]
|
| 552 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 553 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 554 |
+
# None
|
| 555 |
+
# Set 'sources_1' fileset file properties for local files
|
| 556 |
+
set file "fifo_64_64_clk1_fifocmd/fifo_64_64_clk1_fifocmd.xci"
|
| 557 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 558 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 559 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 560 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 561 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
# Set 'sources_1' fileset object
|
| 566 |
+
set obj [get_filesets sources_1]
|
| 567 |
+
# Import local files from the original project
|
| 568 |
+
set files [list \
|
| 569 |
+
[file normalize "${origin_dir}/ip/fifo_256_32_clk2_comtx.xci"]\
|
| 570 |
+
]
|
| 571 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 572 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 573 |
+
# None
|
| 574 |
+
# Set 'sources_1' fileset file properties for local files
|
| 575 |
+
set file "fifo_256_32_clk2_comtx/fifo_256_32_clk2_comtx.xci"
|
| 576 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 577 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 578 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 579 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 580 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
# Set 'sources_1' fileset object
|
| 585 |
+
set obj [get_filesets sources_1]
|
| 586 |
+
# Import local files from the original project
|
| 587 |
+
set files [list \
|
| 588 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk1_comtx.xci"]\
|
| 589 |
+
]
|
| 590 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 591 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 592 |
+
# None
|
| 593 |
+
# Set 'sources_1' fileset file properties for local files
|
| 594 |
+
set file "fifo_32_32_clk1_comtx/fifo_32_32_clk1_comtx.xci"
|
| 595 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 596 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 597 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 598 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 599 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
# Set 'sources_1' fileset object
|
| 604 |
+
set obj [get_filesets sources_1]
|
| 605 |
+
# Import local files from the original project
|
| 606 |
+
set files [list \
|
| 607 |
+
[file normalize "${origin_dir}/ip/fifo_129_129_clk1.xci"]\
|
| 608 |
+
]
|
| 609 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 610 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 611 |
+
# None
|
| 612 |
+
# Set 'sources_1' fileset file properties for local files
|
| 613 |
+
set file "fifo_129_129_clk1/fifo_129_129_clk1.xci"
|
| 614 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 615 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 616 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 617 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 618 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
# Set 'sources_1' fileset object
|
| 623 |
+
set obj [get_filesets sources_1]
|
| 624 |
+
# Import local files from the original project
|
| 625 |
+
set files [list \
|
| 626 |
+
[file normalize "${origin_dir}/ip/fifo_64_64.xci"]\
|
| 627 |
+
]
|
| 628 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 629 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 630 |
+
# None
|
| 631 |
+
# Set 'sources_1' fileset file properties for local files
|
| 632 |
+
set file "fifo_64_64/fifo_64_64.xci"
|
| 633 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 634 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 635 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 636 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 637 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 638 |
+
}
|
| 639 |
+
|
| 640 |
+
|
| 641 |
+
# Set 'sources_1' fileset object
|
| 642 |
+
set obj [get_filesets sources_1]
|
| 643 |
+
# Import local files from the original project
|
| 644 |
+
set files [list \
|
| 645 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk2.xci"]\
|
| 646 |
+
]
|
| 647 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 648 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 649 |
+
# None
|
| 650 |
+
# Set 'sources_1' fileset file properties for local files
|
| 651 |
+
set file "fifo_32_32_clk2/fifo_32_32_clk2.xci"
|
| 652 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 653 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 654 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 655 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 656 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
|
| 660 |
+
# Set 'sources_1' fileset object
|
| 661 |
+
set obj [get_filesets sources_1]
|
| 662 |
+
# Import local files from the original project
|
| 663 |
+
set files [list \
|
| 664 |
+
[file normalize "${origin_dir}/ip/fifo_49_49_clk2.xci"]\
|
| 665 |
+
]
|
| 666 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 667 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 668 |
+
# None
|
| 669 |
+
# Set 'sources_1' fileset file properties for local files
|
| 670 |
+
set file "fifo_49_49_clk2/fifo_49_49_clk2.xci"
|
| 671 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 672 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 673 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 674 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 675 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
|
| 679 |
+
# Set 'sources_1' fileset object
|
| 680 |
+
set obj [get_filesets sources_1]
|
| 681 |
+
# Import local files from the original project
|
| 682 |
+
set files [list \
|
| 683 |
+
[file normalize "${origin_dir}/ip/fifo_43_43_clk2.xci"]\
|
| 684 |
+
]
|
| 685 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 686 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 687 |
+
# None
|
| 688 |
+
# Set 'sources_1' fileset file properties for local files
|
| 689 |
+
set file "fifo_43_43_clk2/fifo_43_43_clk2.xci"
|
| 690 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 691 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 692 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 693 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 694 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
|
| 698 |
+
# Set 'sources_1' fileset object
|
| 699 |
+
set obj [get_filesets sources_1]
|
| 700 |
+
# Import local files from the original project
|
| 701 |
+
set files [list \
|
| 702 |
+
[file normalize "${origin_dir}/ip/fifo_34_34.xci"]\
|
| 703 |
+
]
|
| 704 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 705 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 706 |
+
# None
|
| 707 |
+
# Set 'sources_1' fileset file properties for local files
|
| 708 |
+
set file "fifo_34_34/fifo_34_34.xci"
|
| 709 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 710 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 711 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 712 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 713 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 714 |
+
}
|
| 715 |
+
|
| 716 |
+
|
| 717 |
+
# Set 'sources_1' fileset object
|
| 718 |
+
set obj [get_filesets sources_1]
|
| 719 |
+
# Import local files from the original project
|
| 720 |
+
set files [list \
|
| 721 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk2_comrx.xci" ]\
|
| 722 |
+
]
|
| 723 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 724 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 725 |
+
# None
|
| 726 |
+
# Set 'sources_1' fileset file properties for local files
|
| 727 |
+
set file "fifo_64_64_clk2_comrx/fifo_64_64_clk2_comrx.xci"
|
| 728 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 729 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 730 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 731 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 732 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 733 |
+
}
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
# Create 'constrs_1' fileset (if not found)
|
| 737 |
+
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
| 738 |
+
create_fileset -constrset constrs_1
|
| 739 |
+
}
|
| 740 |
+
# Set 'constrs_1' fileset object
|
| 741 |
+
set obj [get_filesets constrs_1]
|
| 742 |
+
# Add/Import constrs file and set constrs file properties
|
| 743 |
+
set file "[file normalize ${origin_dir}/src/pcileech_screamer_m2.xdc]"
|
| 744 |
+
set file_imported [import_files -fileset constrs_1 [list $file]]
|
| 745 |
+
set file "src/pcileech_screamer_m2.xdc"
|
| 746 |
+
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
|
| 747 |
+
set_property -name "file_type" -value "XDC" -objects $file_obj
|
| 748 |
+
|
| 749 |
+
# Set 'constrs_1' fileset properties
|
| 750 |
+
set obj [get_filesets constrs_1]
|
| 751 |
+
set_property -name "target_part" -value "xc7a35tcsg325-2" -objects $obj
|
| 752 |
+
|
| 753 |
+
# Create 'sim_1' fileset (if not found)
|
| 754 |
+
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
| 755 |
+
create_fileset -simset sim_1
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
# Set 'sim_1' fileset object
|
| 759 |
+
set obj [get_filesets sim_1]
|
| 760 |
+
# Empty (no sources present)
|
| 761 |
+
|
| 762 |
+
# Set 'sim_1' fileset properties
|
| 763 |
+
set obj [get_filesets sim_1]
|
| 764 |
+
set_property -name "top" -value "pcileech_screamer_m2_top" -objects $obj
|
| 765 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 766 |
+
|
| 767 |
+
# Upgrade IP from the currently installed Vivado version
|
| 768 |
+
upgrade_ip [get_ips *]
|
| 769 |
+
|
| 770 |
+
# Set 'utils_1' fileset object
|
| 771 |
+
set obj [get_filesets utils_1]
|
| 772 |
+
# Empty (no sources present)
|
| 773 |
+
|
| 774 |
+
# Set 'utils_1' fileset properties
|
| 775 |
+
set obj [get_filesets utils_1]
|
| 776 |
+
|
| 777 |
+
# Create 'synth_1' run (if not found)
|
| 778 |
+
if {[string equal [get_runs -quiet synth_1] ""]} {
|
| 779 |
+
create_run -name synth_1 -part xc7a35tcsg325-2 -flow {Vivado Synthesis 2022} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
|
| 780 |
+
} else {
|
| 781 |
+
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
|
| 782 |
+
set_property flow "Vivado Synthesis 2022" [get_runs synth_1]
|
| 783 |
+
}
|
| 784 |
+
set obj [get_runs synth_1]
|
| 785 |
+
set_property set_report_strategy_name 1 $obj
|
| 786 |
+
set_property report_strategy {Vivado Synthesis Default Reports} $obj
|
| 787 |
+
set_property set_report_strategy_name 0 $obj
|
| 788 |
+
# Create 'synth_1_synth_report_utilization_0' report (if not found)
|
| 789 |
+
if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
|
| 790 |
+
create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
|
| 791 |
+
}
|
| 792 |
+
set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
|
| 793 |
+
if { $obj != "" } {
|
| 794 |
+
|
| 795 |
+
}
|
| 796 |
+
set obj [get_runs synth_1]
|
| 797 |
+
set_property -name "part" -value "xc7a35tcsg325-2" -objects $obj
|
| 798 |
+
set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
|
| 799 |
+
|
| 800 |
+
# set the current synth run
|
| 801 |
+
current_run -synthesis [get_runs synth_1]
|
| 802 |
+
|
| 803 |
+
# Create 'impl_1' run (if not found)
|
| 804 |
+
if {[string equal [get_runs -quiet impl_1] ""]} {
|
| 805 |
+
create_run -name impl_1 -part xc7a35tcsg325-2 -flow {Vivado Implementation 2022} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
|
| 806 |
+
} else {
|
| 807 |
+
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
|
| 808 |
+
set_property flow "Vivado Implementation 2022" [get_runs impl_1]
|
| 809 |
+
}
|
| 810 |
+
set obj [get_runs impl_1]
|
| 811 |
+
set_property set_report_strategy_name 1 $obj
|
| 812 |
+
set_property report_strategy {Vivado Implementation Default Reports} $obj
|
| 813 |
+
set_property set_report_strategy_name 0 $obj
|
| 814 |
+
# Create 'impl_1_init_report_timing_summary_0' report (if not found)
|
| 815 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
|
| 816 |
+
create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
|
| 817 |
+
}
|
| 818 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
|
| 819 |
+
if { $obj != "" } {
|
| 820 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 821 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 822 |
+
|
| 823 |
+
}
|
| 824 |
+
# Create 'impl_1_opt_report_drc_0' report (if not found)
|
| 825 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
|
| 826 |
+
create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
|
| 827 |
+
}
|
| 828 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
|
| 829 |
+
if { $obj != "" } {
|
| 830 |
+
|
| 831 |
+
}
|
| 832 |
+
# Create 'impl_1_opt_report_timing_summary_0' report (if not found)
|
| 833 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
|
| 834 |
+
create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
|
| 835 |
+
}
|
| 836 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
|
| 837 |
+
if { $obj != "" } {
|
| 838 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 839 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 840 |
+
|
| 841 |
+
}
|
| 842 |
+
# Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
|
| 843 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
|
| 844 |
+
create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
|
| 845 |
+
}
|
| 846 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
|
| 847 |
+
if { $obj != "" } {
|
| 848 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 849 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 850 |
+
|
| 851 |
+
}
|
| 852 |
+
# Create 'impl_1_place_report_io_0' report (if not found)
|
| 853 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
|
| 854 |
+
create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
|
| 855 |
+
}
|
| 856 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
|
| 857 |
+
if { $obj != "" } {
|
| 858 |
+
|
| 859 |
+
}
|
| 860 |
+
# Create 'impl_1_place_report_utilization_0' report (if not found)
|
| 861 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
|
| 862 |
+
create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
|
| 863 |
+
}
|
| 864 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
|
| 865 |
+
if { $obj != "" } {
|
| 866 |
+
|
| 867 |
+
}
|
| 868 |
+
# Create 'impl_1_place_report_control_sets_0' report (if not found)
|
| 869 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
|
| 870 |
+
create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
|
| 871 |
+
}
|
| 872 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
|
| 873 |
+
if { $obj != "" } {
|
| 874 |
+
set_property -name "options.verbose" -value "1" -objects $obj
|
| 875 |
+
|
| 876 |
+
}
|
| 877 |
+
# Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
|
| 878 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
|
| 879 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 880 |
+
}
|
| 881 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
|
| 882 |
+
if { $obj != "" } {
|
| 883 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 884 |
+
|
| 885 |
+
}
|
| 886 |
+
# Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
|
| 887 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
|
| 888 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 889 |
+
}
|
| 890 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
|
| 891 |
+
if { $obj != "" } {
|
| 892 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 893 |
+
|
| 894 |
+
}
|
| 895 |
+
# Create 'impl_1_place_report_timing_summary_0' report (if not found)
|
| 896 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
|
| 897 |
+
create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
|
| 898 |
+
}
|
| 899 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
|
| 900 |
+
if { $obj != "" } {
|
| 901 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 902 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 903 |
+
|
| 904 |
+
}
|
| 905 |
+
# Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
|
| 906 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
|
| 907 |
+
create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
|
| 908 |
+
}
|
| 909 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
|
| 910 |
+
if { $obj != "" } {
|
| 911 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 912 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 913 |
+
|
| 914 |
+
}
|
| 915 |
+
# Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
|
| 916 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
|
| 917 |
+
create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
|
| 918 |
+
}
|
| 919 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
|
| 920 |
+
if { $obj != "" } {
|
| 921 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 922 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 923 |
+
|
| 924 |
+
}
|
| 925 |
+
# Create 'impl_1_route_report_drc_0' report (if not found)
|
| 926 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
|
| 927 |
+
create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
|
| 928 |
+
}
|
| 929 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
|
| 930 |
+
if { $obj != "" } {
|
| 931 |
+
|
| 932 |
+
}
|
| 933 |
+
# Create 'impl_1_route_report_methodology_0' report (if not found)
|
| 934 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
|
| 935 |
+
create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
|
| 936 |
+
}
|
| 937 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
|
| 938 |
+
if { $obj != "" } {
|
| 939 |
+
|
| 940 |
+
}
|
| 941 |
+
# Create 'impl_1_route_report_power_0' report (if not found)
|
| 942 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
|
| 943 |
+
create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
|
| 944 |
+
}
|
| 945 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
|
| 946 |
+
if { $obj != "" } {
|
| 947 |
+
|
| 948 |
+
}
|
| 949 |
+
# Create 'impl_1_route_report_route_status_0' report (if not found)
|
| 950 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
|
| 951 |
+
create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
|
| 952 |
+
}
|
| 953 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
|
| 954 |
+
if { $obj != "" } {
|
| 955 |
+
|
| 956 |
+
}
|
| 957 |
+
# Create 'impl_1_route_report_timing_summary_0' report (if not found)
|
| 958 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
|
| 959 |
+
create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
|
| 960 |
+
}
|
| 961 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
|
| 962 |
+
if { $obj != "" } {
|
| 963 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 964 |
+
|
| 965 |
+
}
|
| 966 |
+
# Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
|
| 967 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
|
| 968 |
+
create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
|
| 969 |
+
}
|
| 970 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
|
| 971 |
+
if { $obj != "" } {
|
| 972 |
+
|
| 973 |
+
}
|
| 974 |
+
# Create 'impl_1_route_report_clock_utilization_0' report (if not found)
|
| 975 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
|
| 976 |
+
create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
|
| 977 |
+
}
|
| 978 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
|
| 979 |
+
if { $obj != "" } {
|
| 980 |
+
|
| 981 |
+
}
|
| 982 |
+
# Create 'impl_1_route_report_bus_skew_0' report (if not found)
|
| 983 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
|
| 984 |
+
create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
|
| 985 |
+
}
|
| 986 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
|
| 987 |
+
if { $obj != "" } {
|
| 988 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 989 |
+
|
| 990 |
+
}
|
| 991 |
+
# Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
|
| 992 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
|
| 993 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
|
| 994 |
+
}
|
| 995 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
|
| 996 |
+
if { $obj != "" } {
|
| 997 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 998 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 999 |
+
|
| 1000 |
+
}
|
| 1001 |
+
# Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
|
| 1002 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
|
| 1003 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
|
| 1004 |
+
}
|
| 1005 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
|
| 1006 |
+
if { $obj != "" } {
|
| 1007 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 1008 |
+
|
| 1009 |
+
}
|
| 1010 |
+
set obj [get_runs impl_1]
|
| 1011 |
+
set_property -name "part" -value "xc7a35tcsg325-2" -objects $obj
|
| 1012 |
+
set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
|
| 1013 |
+
set_property -name "steps.phys_opt_design.is_enabled" -value "1" -objects $obj
|
| 1014 |
+
set_property -name "steps.write_bitstream.args.bin_file" -value "1" -objects $obj
|
| 1015 |
+
set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
|
| 1016 |
+
set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
|
| 1017 |
+
|
| 1018 |
+
# set the current impl run
|
| 1019 |
+
current_run -implementation [get_runs impl_1]
|
| 1020 |
+
|
| 1021 |
+
puts "INFO: Project created:${_xil_proj_name_}"
|
| 1022 |
+
# Create 'drc_1' gadget (if not found)
|
| 1023 |
+
if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
|
| 1024 |
+
create_dashboard_gadget -name {drc_1} -type drc
|
| 1025 |
+
}
|
| 1026 |
+
set obj [get_dashboard_gadgets [ list "drc_1" ] ]
|
| 1027 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
|
| 1028 |
+
|
| 1029 |
+
# Create 'methodology_1' gadget (if not found)
|
| 1030 |
+
if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
|
| 1031 |
+
create_dashboard_gadget -name {methodology_1} -type methodology
|
| 1032 |
+
}
|
| 1033 |
+
set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
|
| 1034 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
|
| 1035 |
+
|
| 1036 |
+
# Create 'power_1' gadget (if not found)
|
| 1037 |
+
if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
|
| 1038 |
+
create_dashboard_gadget -name {power_1} -type power
|
| 1039 |
+
}
|
| 1040 |
+
set obj [get_dashboard_gadgets [ list "power_1" ] ]
|
| 1041 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
|
| 1042 |
+
|
| 1043 |
+
# Create 'timing_1' gadget (if not found)
|
| 1044 |
+
if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
|
| 1045 |
+
create_dashboard_gadget -name {timing_1} -type timing
|
| 1046 |
+
}
|
| 1047 |
+
set obj [get_dashboard_gadgets [ list "timing_1" ] ]
|
| 1048 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
|
| 1049 |
+
|
| 1050 |
+
# Create 'utilization_1' gadget (if not found)
|
| 1051 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
|
| 1052 |
+
create_dashboard_gadget -name {utilization_1} -type utilization
|
| 1053 |
+
}
|
| 1054 |
+
set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
|
| 1055 |
+
set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
|
| 1056 |
+
set_property -name "run.step" -value "synth_design" -objects $obj
|
| 1057 |
+
set_property -name "run.type" -value "synthesis" -objects $obj
|
| 1058 |
+
|
| 1059 |
+
# Create 'utilization_2' gadget (if not found)
|
| 1060 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
|
| 1061 |
+
create_dashboard_gadget -name {utilization_2} -type utilization
|
| 1062 |
+
}
|
| 1063 |
+
set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
|
| 1064 |
+
set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
|
| 1065 |
+
|
| 1066 |
+
move_dashboard_gadget -name {utilization_1} -row 0 -col 0
|
| 1067 |
+
move_dashboard_gadget -name {power_1} -row 1 -col 0
|
| 1068 |
+
move_dashboard_gadget -name {drc_1} -row 2 -col 0
|
| 1069 |
+
move_dashboard_gadget -name {timing_1} -row 0 -col 1
|
| 1070 |
+
move_dashboard_gadget -name {utilization_2} -row 1 -col 1
|
| 1071 |
+
move_dashboard_gadget -name {methodology_1} -row 2 -col 1
|
JOKOSAHS_DMA-Pcileech/vivado_generate_project_squirrel.tcl
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Vivado generated .tcl for creating the pcileech_squirrel vivado project.
|
| 3 |
+
# Run from within "Vivado Tcl Shell" with command: source vivado_generate_project.tcl -notrace
|
| 4 |
+
#
|
| 5 |
+
|
| 6 |
+
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
| 7 |
+
set origin_dir "."
|
| 8 |
+
|
| 9 |
+
# Use origin directory path location variable, if specified in the tcl shell
|
| 10 |
+
if { [info exists ::origin_dir_loc] } {
|
| 11 |
+
set origin_dir $::origin_dir_loc
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
# Set the project name
|
| 15 |
+
set _xil_proj_name_ "pcileech_squirrel"
|
| 16 |
+
|
| 17 |
+
# Use project name variable, if specified in the tcl shell
|
| 18 |
+
if { [info exists ::user_project_name] } {
|
| 19 |
+
set _xil_proj_name_ $::user_project_name
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
variable script_file
|
| 23 |
+
set script_file "vivado_generate_project.tcl"
|
| 24 |
+
|
| 25 |
+
# Help information for this script
|
| 26 |
+
proc print_help {} {
|
| 27 |
+
variable script_file
|
| 28 |
+
puts "\nDescription:"
|
| 29 |
+
puts "Recreate a Vivado project from this script. The created project will be"
|
| 30 |
+
puts "functionally equivalent to the original project for which this script was"
|
| 31 |
+
puts "generated. The script contains commands for creating a project, filesets,"
|
| 32 |
+
puts "runs, adding/importing sources and setting properties on various objects.\n"
|
| 33 |
+
puts "Syntax:"
|
| 34 |
+
puts "$script_file"
|
| 35 |
+
puts "$script_file -tclargs \[--origin_dir <path>\]"
|
| 36 |
+
puts "$script_file -tclargs \[--project_name <name>\]"
|
| 37 |
+
puts "$script_file -tclargs \[--help\]\n"
|
| 38 |
+
puts "Usage:"
|
| 39 |
+
puts "Name Description"
|
| 40 |
+
puts "-------------------------------------------------------------------------"
|
| 41 |
+
puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
|
| 42 |
+
puts " origin_dir path value is \".\", otherwise, the value"
|
| 43 |
+
puts " that was set with the \"-paths_relative_to\" switch"
|
| 44 |
+
puts " when this script was generated.\n"
|
| 45 |
+
puts "\[--project_name <name>\] Create project with the specified name. Default"
|
| 46 |
+
puts " name is the name of the project from where this"
|
| 47 |
+
puts " script was generated.\n"
|
| 48 |
+
puts "\[--help\] Print help information for this script"
|
| 49 |
+
puts "-------------------------------------------------------------------------\n"
|
| 50 |
+
exit 0
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
if { $::argc > 0 } {
|
| 54 |
+
for {set i 0} {$i < $::argc} {incr i} {
|
| 55 |
+
set option [string trim [lindex $::argv $i]]
|
| 56 |
+
switch -regexp -- $option {
|
| 57 |
+
"--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
|
| 58 |
+
"--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
|
| 59 |
+
"--help" { print_help }
|
| 60 |
+
default {
|
| 61 |
+
if { [regexp {^-} $option] } {
|
| 62 |
+
puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
|
| 63 |
+
return 1
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
# Set the directory path for the original project from where this script was exported
|
| 71 |
+
set orig_proj_dir "[file normalize "$origin_dir/pcileech_squirrel"]"
|
| 72 |
+
|
| 73 |
+
# Create project
|
| 74 |
+
create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7a35tfgg484-2
|
| 75 |
+
|
| 76 |
+
# Set the directory path for the new project
|
| 77 |
+
set proj_dir [get_property directory [current_project]]
|
| 78 |
+
|
| 79 |
+
# Set project properties
|
| 80 |
+
set obj [current_project]
|
| 81 |
+
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
|
| 82 |
+
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
|
| 83 |
+
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
|
| 84 |
+
set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
|
| 85 |
+
set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
|
| 86 |
+
set_property -name "part" -value "xc7a35tfgg484-2" -objects $obj
|
| 87 |
+
set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
|
| 88 |
+
set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
|
| 89 |
+
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
|
| 90 |
+
set_property -name "simulator_language" -value "Mixed" -objects $obj
|
| 91 |
+
set_property -name "webtalk.activehdl_export_sim" -value "5" -objects $obj
|
| 92 |
+
set_property -name "webtalk.ies_export_sim" -value "5" -objects $obj
|
| 93 |
+
set_property -name "webtalk.modelsim_export_sim" -value "5" -objects $obj
|
| 94 |
+
set_property -name "webtalk.questa_export_sim" -value "5" -objects $obj
|
| 95 |
+
set_property -name "webtalk.riviera_export_sim" -value "5" -objects $obj
|
| 96 |
+
set_property -name "webtalk.vcs_export_sim" -value "5" -objects $obj
|
| 97 |
+
set_property -name "webtalk.xsim_export_sim" -value "5" -objects $obj
|
| 98 |
+
set_property -name "xpm_libraries" -value "XPM_CDC XPM_MEMORY" -objects $obj
|
| 99 |
+
|
| 100 |
+
# Create 'sources_1' fileset (if not found)
|
| 101 |
+
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
| 102 |
+
create_fileset -srcset sources_1
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
# Set 'sources_1' fileset object
|
| 106 |
+
set obj [get_filesets sources_1]
|
| 107 |
+
# Import local files from the original project
|
| 108 |
+
set files [list \
|
| 109 |
+
[file normalize "${origin_dir}/src/pcileech_header.svh"]\
|
| 110 |
+
[file normalize "${origin_dir}/src/pcileech_com.sv" ]\
|
| 111 |
+
[file normalize "${origin_dir}/src/pcileech_fifo.sv"]\
|
| 112 |
+
[file normalize "${origin_dir}/src/pcileech_ft601.sv"]\
|
| 113 |
+
[file normalize "${origin_dir}/src/pcileech_mux.sv"]\
|
| 114 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_a7.sv"]\
|
| 115 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_cfg_a7.sv"]\
|
| 116 |
+
[file normalize "${origin_dir}/src/pcileech_pcie_tlp_a7.sv"]\
|
| 117 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_bar_controller.sv"]\
|
| 118 |
+
[file normalize "${origin_dir}/src/pcileech_tlps128_cfgspace_shadow.sv"]\
|
| 119 |
+
[file normalize "${origin_dir}/src/pcileech_squirrel_top.sv"]\
|
| 120 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0.v"]\
|
| 121 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx.v"]\
|
| 122 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"]\
|
| 123 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"]\
|
| 124 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_top.v"]\
|
| 125 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx.v"]\
|
| 126 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"]\
|
| 127 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"]\
|
| 128 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_core_top.v"]\
|
| 129 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_common.v"]\
|
| 130 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"]\
|
| 131 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_top.v"]\
|
| 132 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gt_wrapper.v"]\
|
| 133 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"]\
|
| 134 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_drp.v"]\
|
| 135 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_rate.v"]\
|
| 136 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtp_pipe_reset.v"]\
|
| 137 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"]\
|
| 138 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_7x.v"]\
|
| 139 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_7x.v"]\
|
| 140 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"]\
|
| 141 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_brams_7x.v"]\
|
| 142 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_lane.v"]\
|
| 143 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_misc.v"]\
|
| 144 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"]\
|
| 145 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie_top.v"]\
|
| 146 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pcie2_top.v"]\
|
| 147 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_clock.v"]\
|
| 148 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_drp.v"]\
|
| 149 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_eq.v"]\
|
| 150 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_rate.v"]\
|
| 151 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_reset.v"]\
|
| 152 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_sync.v"]\
|
| 153 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_user.v"]\
|
| 154 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_pipe_wrapper.v"]\
|
| 155 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_drp.v"]\
|
| 156 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_reset.v"]\
|
| 157 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_qpll_wrapper.v"]\
|
| 158 |
+
[file normalize "${origin_dir}/pcie_7x/pcie_7x_0_rxeq_scan.v"]\
|
| 159 |
+
]
|
| 160 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 161 |
+
|
| 162 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 163 |
+
# None
|
| 164 |
+
|
| 165 |
+
# Set 'sources_1' fileset file properties for local files
|
| 166 |
+
set file "src/pcileech_header.svh"
|
| 167 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 168 |
+
set_property -name "file_type" -value "Verilog Header" -objects $file_obj
|
| 169 |
+
|
| 170 |
+
set file "src/pcileech_com.sv"
|
| 171 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 172 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 173 |
+
|
| 174 |
+
set file "src/pcileech_fifo.sv"
|
| 175 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 176 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 177 |
+
|
| 178 |
+
set file "src/pcileech_ft601.sv"
|
| 179 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 180 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 181 |
+
|
| 182 |
+
set file "src/pcileech_mux.sv"
|
| 183 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 184 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 185 |
+
|
| 186 |
+
set file "src/pcileech_pcie_a7.sv"
|
| 187 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 188 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 189 |
+
|
| 190 |
+
set file "src/pcileech_pcie_cfg_a7.sv"
|
| 191 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 192 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 193 |
+
|
| 194 |
+
set file "src/pcileech_pcie_tlp_a7.sv"
|
| 195 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 196 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 197 |
+
|
| 198 |
+
set file "src/pcileech_tlps128_bar_controller.sv"
|
| 199 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 200 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 201 |
+
|
| 202 |
+
set file "src/pcileech_tlps128_cfgspace_shadow.sv"
|
| 203 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 204 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 205 |
+
|
| 206 |
+
set file "src/pcileech_squirrel_top.sv"
|
| 207 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 208 |
+
set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
|
| 209 |
+
|
| 210 |
+
set file "pcie_7x/pcie_7x_0.v"
|
| 211 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 212 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 213 |
+
|
| 214 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx.v"
|
| 215 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 216 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 217 |
+
|
| 218 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_null_gen.v"
|
| 219 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 220 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 221 |
+
|
| 222 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_rx_pipeline.v"
|
| 223 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 224 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 225 |
+
|
| 226 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_top.v"
|
| 227 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 228 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 229 |
+
|
| 230 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx.v"
|
| 231 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 232 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 233 |
+
|
| 234 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_pipeline.v"
|
| 235 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 236 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 237 |
+
|
| 238 |
+
set file "pcie_7x/pcie_7x_0_axi_basic_tx_thrtl_ctl.v"
|
| 239 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 240 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 241 |
+
|
| 242 |
+
set file "pcie_7x/pcie_7x_0_core_top.v"
|
| 243 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 244 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 245 |
+
|
| 246 |
+
set file "pcie_7x/pcie_7x_0_gt_common.v"
|
| 247 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 248 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 249 |
+
|
| 250 |
+
set file "pcie_7x/pcie_7x_0_gt_rx_valid_filter_7x.v"
|
| 251 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 252 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 253 |
+
|
| 254 |
+
set file "pcie_7x/pcie_7x_0_gt_top.v"
|
| 255 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 256 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 257 |
+
|
| 258 |
+
set file "pcie_7x/pcie_7x_0_gt_wrapper.v"
|
| 259 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 260 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 261 |
+
|
| 262 |
+
set file "pcie_7x/pcie_7x_0_gtp_cpllpd_ovrd.v"
|
| 263 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 264 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 265 |
+
|
| 266 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_drp.v"
|
| 267 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 268 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 269 |
+
|
| 270 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_rate.v"
|
| 271 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 272 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 273 |
+
|
| 274 |
+
set file "pcie_7x/pcie_7x_0_gtp_pipe_reset.v"
|
| 275 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 276 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 277 |
+
|
| 278 |
+
set file "pcie_7x/pcie_7x_0_gtx_cpllpd_ovrd.v"
|
| 279 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 280 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 281 |
+
|
| 282 |
+
set file "pcie_7x/pcie_7x_0_pcie_7x.v"
|
| 283 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 284 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 285 |
+
|
| 286 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_7x.v"
|
| 287 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 288 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 289 |
+
|
| 290 |
+
set file "pcie_7x/pcie_7x_0_pcie_bram_top_7x.v"
|
| 291 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 292 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 293 |
+
|
| 294 |
+
set file "pcie_7x/pcie_7x_0_pcie_brams_7x.v"
|
| 295 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 296 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 297 |
+
|
| 298 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_lane.v"
|
| 299 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 300 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 301 |
+
|
| 302 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_misc.v"
|
| 303 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 304 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 305 |
+
|
| 306 |
+
set file "pcie_7x/pcie_7x_0_pcie_pipe_pipeline.v"
|
| 307 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 308 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 309 |
+
|
| 310 |
+
set file "pcie_7x/pcie_7x_0_pcie_top.v"
|
| 311 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 312 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 313 |
+
|
| 314 |
+
set file "pcie_7x/pcie_7x_0_pcie2_top.v"
|
| 315 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 316 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 317 |
+
|
| 318 |
+
set file "pcie_7x/pcie_7x_0_pipe_clock.v"
|
| 319 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 320 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 321 |
+
|
| 322 |
+
set file "pcie_7x/pcie_7x_0_pipe_drp.v"
|
| 323 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 324 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 325 |
+
|
| 326 |
+
set file "pcie_7x/pcie_7x_0_pipe_eq.v"
|
| 327 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 328 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 329 |
+
|
| 330 |
+
set file "pcie_7x/pcie_7x_0_pipe_rate.v"
|
| 331 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 332 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 333 |
+
|
| 334 |
+
set file "pcie_7x/pcie_7x_0_pipe_reset.v"
|
| 335 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 336 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 337 |
+
|
| 338 |
+
set file "pcie_7x/pcie_7x_0_pipe_sync.v"
|
| 339 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 340 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 341 |
+
|
| 342 |
+
set file "pcie_7x/pcie_7x_0_pipe_user.v"
|
| 343 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 344 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 345 |
+
|
| 346 |
+
set file "pcie_7x/pcie_7x_0_qpll_drp.v"
|
| 347 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 348 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 349 |
+
|
| 350 |
+
set file "pcie_7x/pcie_7x_0_pipe_wrapper.v"
|
| 351 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 352 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 353 |
+
|
| 354 |
+
set file "pcie_7x/pcie_7x_0_qpll_reset.v"
|
| 355 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 356 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 357 |
+
|
| 358 |
+
set file "pcie_7x/pcie_7x_0_qpll_wrapper.v"
|
| 359 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 360 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 361 |
+
|
| 362 |
+
set file "pcie_7x/pcie_7x_0_rxeq_scan.v"
|
| 363 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 364 |
+
set_property -name "file_type" -value "Verilog" -objects $file_obj
|
| 365 |
+
|
| 366 |
+
# Set 'sources_1' fileset properties
|
| 367 |
+
set obj [get_filesets sources_1]
|
| 368 |
+
set_property -name "top" -value "pcileech_squirrel_top" -objects $obj
|
| 369 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
# Set 'sources_1' fileset object
|
| 373 |
+
set obj [get_filesets sources_1]
|
| 374 |
+
# Import local files from the original project
|
| 375 |
+
set files [list \
|
| 376 |
+
[file normalize "${origin_dir}/ip/pcileech_bar_zero4k.coe" ]\
|
| 377 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace.coe" ]\
|
| 378 |
+
[file normalize "${origin_dir}/ip/pcileech_cfgspace_writemask.coe" ]\
|
| 379 |
+
[file normalize "${origin_dir}/ip/bram_pcie_cfgspace.xci" ]\
|
| 380 |
+
]
|
| 381 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 382 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 383 |
+
# None
|
| 384 |
+
# Set 'sources_1' fileset file properties for local files
|
| 385 |
+
set file "bram_pcie_cfgspace/bram_pcie_cfgspace.xci"
|
| 386 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 387 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 388 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 389 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 390 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
# Set 'sources_1' fileset object
|
| 395 |
+
set obj [get_filesets sources_1]
|
| 396 |
+
# Import local files from the original project
|
| 397 |
+
set files [list \
|
| 398 |
+
[file normalize "${origin_dir}/ip/drom_pcie_cfgspace_writemask.xci"]\
|
| 399 |
+
]
|
| 400 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 401 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 402 |
+
# None
|
| 403 |
+
# Set 'sources_1' fileset file properties for local files
|
| 404 |
+
set file "drom_pcie_cfgspace_writemask/drom_pcie_cfgspace_writemask.xci"
|
| 405 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 406 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 407 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 408 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 409 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
# Set 'sources_1' fileset object
|
| 414 |
+
set obj [get_filesets sources_1]
|
| 415 |
+
# Import local files from the original project
|
| 416 |
+
set files [list \
|
| 417 |
+
[file normalize "${origin_dir}/ip/fifo_74_74_clk1_bar_rd1.xci"]\
|
| 418 |
+
]
|
| 419 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 420 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 421 |
+
# None
|
| 422 |
+
# Set 'sources_1' fileset file properties for local files
|
| 423 |
+
set file "fifo_74_74_clk1_bar_rd1/fifo_74_74_clk1_bar_rd1.xci"
|
| 424 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 425 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 426 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 427 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 428 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
|
| 432 |
+
# Set 'sources_1' fileset object
|
| 433 |
+
set obj [get_filesets sources_1]
|
| 434 |
+
# Import local files from the original project
|
| 435 |
+
set files [list \
|
| 436 |
+
[file normalize "${origin_dir}/ip/bram_bar_zero4k.xci"]\
|
| 437 |
+
]
|
| 438 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 439 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 440 |
+
# None
|
| 441 |
+
# Set 'sources_1' fileset file properties for local files
|
| 442 |
+
set file "bram_bar_zero4k/bram_bar_zero4k.xci"
|
| 443 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 444 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 445 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 446 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 447 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
# Set 'sources_1' fileset object
|
| 452 |
+
set obj [get_filesets sources_1]
|
| 453 |
+
# Import local files from the original project
|
| 454 |
+
set files [list \
|
| 455 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk1_bar_rdrsp.xci"]\
|
| 456 |
+
]
|
| 457 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 458 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 459 |
+
# None
|
| 460 |
+
# Set 'sources_1' fileset file properties for local files
|
| 461 |
+
set file "fifo_134_134_clk1_bar_rdrsp/fifo_134_134_clk1_bar_rdrsp.xci"
|
| 462 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 463 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 464 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 465 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 466 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
# Set 'sources_1' fileset object
|
| 471 |
+
set obj [get_filesets sources_1]
|
| 472 |
+
# Import local files from the original project
|
| 473 |
+
set files [list \
|
| 474 |
+
[file normalize "${origin_dir}/ip/fifo_141_141_clk1_bar_wr.xci"]\
|
| 475 |
+
]
|
| 476 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 477 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 478 |
+
# None
|
| 479 |
+
# Set 'sources_1' fileset file properties for local files
|
| 480 |
+
set file "fifo_141_141_clk1_bar_wr/fifo_141_141_clk1_bar_wr.xci"
|
| 481 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 482 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 483 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 484 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 485 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
# Set 'sources_1' fileset object
|
| 490 |
+
set obj [get_filesets sources_1]
|
| 491 |
+
# Import local files from the original project
|
| 492 |
+
set files [list \
|
| 493 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2_rxfifo.xci"]\
|
| 494 |
+
]
|
| 495 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 496 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 497 |
+
# None
|
| 498 |
+
# Set 'sources_1' fileset file properties for local files
|
| 499 |
+
set file "fifo_134_134_clk2_rxfifo/fifo_134_134_clk2_rxfifo.xci"
|
| 500 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 501 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 502 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 503 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 504 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
# Set 'sources_1' fileset object
|
| 509 |
+
set obj [get_filesets sources_1]
|
| 510 |
+
# Import local files from the original project
|
| 511 |
+
set files [list \
|
| 512 |
+
[file normalize "${origin_dir}/ip/fifo_1_1_clk2.xci"]\
|
| 513 |
+
]
|
| 514 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 515 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 516 |
+
# None
|
| 517 |
+
# Set 'sources_1' fileset file properties for local files
|
| 518 |
+
set file "fifo_1_1_clk2/fifo_1_1_clk2.xci"
|
| 519 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 520 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 521 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 522 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 523 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
|
| 527 |
+
# Set 'sources_1' fileset object
|
| 528 |
+
set obj [get_filesets sources_1]
|
| 529 |
+
# Import local files from the original project
|
| 530 |
+
set files [list \
|
| 531 |
+
[file normalize "${origin_dir}/ip/fifo_134_134_clk2.xci"]\
|
| 532 |
+
]
|
| 533 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 534 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 535 |
+
# None
|
| 536 |
+
# Set 'sources_1' fileset file properties for local files
|
| 537 |
+
set file "fifo_134_134_clk2/fifo_134_134_clk2.xci"
|
| 538 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 539 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 540 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 541 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 542 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
|
| 546 |
+
# Set 'sources_1' fileset object
|
| 547 |
+
set obj [get_filesets sources_1]
|
| 548 |
+
# Import local files from the original project
|
| 549 |
+
set files [list \
|
| 550 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk1_fifocmd.xci"]\
|
| 551 |
+
]
|
| 552 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 553 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 554 |
+
# None
|
| 555 |
+
# Set 'sources_1' fileset file properties for local files
|
| 556 |
+
set file "fifo_64_64_clk1_fifocmd/fifo_64_64_clk1_fifocmd.xci"
|
| 557 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 558 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 559 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 560 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 561 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
# Set 'sources_1' fileset object
|
| 566 |
+
set obj [get_filesets sources_1]
|
| 567 |
+
# Import local files from the original project
|
| 568 |
+
set files [list \
|
| 569 |
+
[file normalize "${origin_dir}/ip/fifo_256_32_clk2_comtx.xci"]\
|
| 570 |
+
]
|
| 571 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 572 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 573 |
+
# None
|
| 574 |
+
# Set 'sources_1' fileset file properties for local files
|
| 575 |
+
set file "fifo_256_32_clk2_comtx/fifo_256_32_clk2_comtx.xci"
|
| 576 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 577 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 578 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 579 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 580 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
# Set 'sources_1' fileset object
|
| 585 |
+
set obj [get_filesets sources_1]
|
| 586 |
+
# Import local files from the original project
|
| 587 |
+
set files [list \
|
| 588 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk1_comtx.xci"]\
|
| 589 |
+
]
|
| 590 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 591 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 592 |
+
# None
|
| 593 |
+
# Set 'sources_1' fileset file properties for local files
|
| 594 |
+
set file "fifo_32_32_clk1_comtx/fifo_32_32_clk1_comtx.xci"
|
| 595 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 596 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 597 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 598 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 599 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
# Set 'sources_1' fileset object
|
| 604 |
+
set obj [get_filesets sources_1]
|
| 605 |
+
# Import local files from the original project
|
| 606 |
+
set files [list \
|
| 607 |
+
[file normalize "${origin_dir}/ip/fifo_129_129_clk1.xci"]\
|
| 608 |
+
]
|
| 609 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 610 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 611 |
+
# None
|
| 612 |
+
# Set 'sources_1' fileset file properties for local files
|
| 613 |
+
set file "fifo_129_129_clk1/fifo_129_129_clk1.xci"
|
| 614 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 615 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 616 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 617 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 618 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
# Set 'sources_1' fileset object
|
| 623 |
+
set obj [get_filesets sources_1]
|
| 624 |
+
# Import local files from the original project
|
| 625 |
+
set files [list \
|
| 626 |
+
[file normalize "${origin_dir}/ip/fifo_64_64.xci"]\
|
| 627 |
+
]
|
| 628 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 629 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 630 |
+
# None
|
| 631 |
+
# Set 'sources_1' fileset file properties for local files
|
| 632 |
+
set file "fifo_64_64/fifo_64_64.xci"
|
| 633 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 634 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 635 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 636 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 637 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 638 |
+
}
|
| 639 |
+
|
| 640 |
+
|
| 641 |
+
# Set 'sources_1' fileset object
|
| 642 |
+
set obj [get_filesets sources_1]
|
| 643 |
+
# Import local files from the original project
|
| 644 |
+
set files [list \
|
| 645 |
+
[file normalize "${origin_dir}/ip/fifo_32_32_clk2.xci"]\
|
| 646 |
+
]
|
| 647 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 648 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 649 |
+
# None
|
| 650 |
+
# Set 'sources_1' fileset file properties for local files
|
| 651 |
+
set file "fifo_32_32_clk2/fifo_32_32_clk2.xci"
|
| 652 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 653 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 654 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 655 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 656 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
|
| 660 |
+
# Set 'sources_1' fileset object
|
| 661 |
+
set obj [get_filesets sources_1]
|
| 662 |
+
# Import local files from the original project
|
| 663 |
+
set files [list \
|
| 664 |
+
[file normalize "${origin_dir}/ip/fifo_49_49_clk2.xci"]\
|
| 665 |
+
]
|
| 666 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 667 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 668 |
+
# None
|
| 669 |
+
# Set 'sources_1' fileset file properties for local files
|
| 670 |
+
set file "fifo_49_49_clk2/fifo_49_49_clk2.xci"
|
| 671 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 672 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 673 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 674 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 675 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
|
| 679 |
+
# Set 'sources_1' fileset object
|
| 680 |
+
set obj [get_filesets sources_1]
|
| 681 |
+
# Import local files from the original project
|
| 682 |
+
set files [list \
|
| 683 |
+
[file normalize "${origin_dir}/ip/fifo_43_43_clk2.xci"]\
|
| 684 |
+
]
|
| 685 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 686 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 687 |
+
# None
|
| 688 |
+
# Set 'sources_1' fileset file properties for local files
|
| 689 |
+
set file "fifo_43_43_clk2/fifo_43_43_clk2.xci"
|
| 690 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 691 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 692 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 693 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 694 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
|
| 698 |
+
# Set 'sources_1' fileset object
|
| 699 |
+
set obj [get_filesets sources_1]
|
| 700 |
+
# Import local files from the original project
|
| 701 |
+
set files [list \
|
| 702 |
+
[file normalize "${origin_dir}/ip/fifo_34_34.xci"]\
|
| 703 |
+
]
|
| 704 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 705 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 706 |
+
# None
|
| 707 |
+
# Set 'sources_1' fileset file properties for local files
|
| 708 |
+
set file "fifo_34_34/fifo_34_34.xci"
|
| 709 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 710 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 711 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 712 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 713 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 714 |
+
}
|
| 715 |
+
|
| 716 |
+
|
| 717 |
+
# Set 'sources_1' fileset object
|
| 718 |
+
set obj [get_filesets sources_1]
|
| 719 |
+
# Import local files from the original project
|
| 720 |
+
set files [list \
|
| 721 |
+
[file normalize "${origin_dir}/ip/fifo_64_64_clk2_comrx.xci" ]\
|
| 722 |
+
]
|
| 723 |
+
set imported_files [import_files -fileset sources_1 $files]
|
| 724 |
+
# Set 'sources_1' fileset file properties for remote files
|
| 725 |
+
# None
|
| 726 |
+
# Set 'sources_1' fileset file properties for local files
|
| 727 |
+
set file "fifo_64_64_clk2_comrx/fifo_64_64_clk2_comrx.xci"
|
| 728 |
+
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
|
| 729 |
+
set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
|
| 730 |
+
set_property -name "registered_with_manager" -value "1" -objects $file_obj
|
| 731 |
+
if { ![get_property "is_locked" $file_obj] } {
|
| 732 |
+
set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
|
| 733 |
+
}
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
# Create 'constrs_1' fileset (if not found)
|
| 737 |
+
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
| 738 |
+
create_fileset -constrset constrs_1
|
| 739 |
+
}
|
| 740 |
+
# Set 'constrs_1' fileset object
|
| 741 |
+
set obj [get_filesets constrs_1]
|
| 742 |
+
# Add/Import constrs file and set constrs file properties
|
| 743 |
+
set file "[file normalize ${origin_dir}/src/pcileech_squirrel.xdc]"
|
| 744 |
+
set file_imported [import_files -fileset constrs_1 [list $file]]
|
| 745 |
+
set file "src/pcileech_squirrel.xdc"
|
| 746 |
+
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
|
| 747 |
+
set_property -name "file_type" -value "XDC" -objects $file_obj
|
| 748 |
+
|
| 749 |
+
# Set 'constrs_1' fileset properties
|
| 750 |
+
set obj [get_filesets constrs_1]
|
| 751 |
+
set_property -name "target_part" -value "xc7a35tfgg484-2" -objects $obj
|
| 752 |
+
|
| 753 |
+
# Create 'sim_1' fileset (if not found)
|
| 754 |
+
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
| 755 |
+
create_fileset -simset sim_1
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
# Set 'sim_1' fileset object
|
| 759 |
+
set obj [get_filesets sim_1]
|
| 760 |
+
# Empty (no sources present)
|
| 761 |
+
|
| 762 |
+
# Set 'sim_1' fileset properties
|
| 763 |
+
set obj [get_filesets sim_1]
|
| 764 |
+
set_property -name "top" -value "pcileech_squirrel_top" -objects $obj
|
| 765 |
+
set_property -name "top_auto_set" -value "0" -objects $obj
|
| 766 |
+
|
| 767 |
+
# Upgrade IP from the currently installed Vivado version
|
| 768 |
+
upgrade_ip [get_ips *]
|
| 769 |
+
|
| 770 |
+
# Set 'utils_1' fileset object
|
| 771 |
+
set obj [get_filesets utils_1]
|
| 772 |
+
# Empty (no sources present)
|
| 773 |
+
|
| 774 |
+
# Set 'utils_1' fileset properties
|
| 775 |
+
set obj [get_filesets utils_1]
|
| 776 |
+
|
| 777 |
+
# Create 'synth_1' run (if not found)
|
| 778 |
+
if {[string equal [get_runs -quiet synth_1] ""]} {
|
| 779 |
+
create_run -name synth_1 -part xc7a35tfgg484-2 -flow {Vivado Synthesis 2022} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
|
| 780 |
+
} else {
|
| 781 |
+
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
|
| 782 |
+
set_property flow "Vivado Synthesis 2022" [get_runs synth_1]
|
| 783 |
+
}
|
| 784 |
+
set obj [get_runs synth_1]
|
| 785 |
+
set_property set_report_strategy_name 1 $obj
|
| 786 |
+
set_property report_strategy {Vivado Synthesis Default Reports} $obj
|
| 787 |
+
set_property set_report_strategy_name 0 $obj
|
| 788 |
+
# Create 'synth_1_synth_report_utilization_0' report (if not found)
|
| 789 |
+
if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
|
| 790 |
+
create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
|
| 791 |
+
}
|
| 792 |
+
set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
|
| 793 |
+
if { $obj != "" } {
|
| 794 |
+
|
| 795 |
+
}
|
| 796 |
+
set obj [get_runs synth_1]
|
| 797 |
+
set_property -name "part" -value "xc7a35tfgg484-2" -objects $obj
|
| 798 |
+
set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
|
| 799 |
+
|
| 800 |
+
# set the current synth run
|
| 801 |
+
current_run -synthesis [get_runs synth_1]
|
| 802 |
+
|
| 803 |
+
# Create 'impl_1' run (if not found)
|
| 804 |
+
if {[string equal [get_runs -quiet impl_1] ""]} {
|
| 805 |
+
create_run -name impl_1 -part xc7a35tfgg484-2 -flow {Vivado Implementation 2022} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
|
| 806 |
+
} else {
|
| 807 |
+
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
|
| 808 |
+
set_property flow "Vivado Implementation 2022" [get_runs impl_1]
|
| 809 |
+
}
|
| 810 |
+
set obj [get_runs impl_1]
|
| 811 |
+
set_property set_report_strategy_name 1 $obj
|
| 812 |
+
set_property report_strategy {Vivado Implementation Default Reports} $obj
|
| 813 |
+
set_property set_report_strategy_name 0 $obj
|
| 814 |
+
# Create 'impl_1_init_report_timing_summary_0' report (if not found)
|
| 815 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
|
| 816 |
+
create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
|
| 817 |
+
}
|
| 818 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
|
| 819 |
+
if { $obj != "" } {
|
| 820 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 821 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 822 |
+
|
| 823 |
+
}
|
| 824 |
+
# Create 'impl_1_opt_report_drc_0' report (if not found)
|
| 825 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
|
| 826 |
+
create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
|
| 827 |
+
}
|
| 828 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
|
| 829 |
+
if { $obj != "" } {
|
| 830 |
+
|
| 831 |
+
}
|
| 832 |
+
# Create 'impl_1_opt_report_timing_summary_0' report (if not found)
|
| 833 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
|
| 834 |
+
create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
|
| 835 |
+
}
|
| 836 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
|
| 837 |
+
if { $obj != "" } {
|
| 838 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 839 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 840 |
+
|
| 841 |
+
}
|
| 842 |
+
# Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
|
| 843 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
|
| 844 |
+
create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
|
| 845 |
+
}
|
| 846 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
|
| 847 |
+
if { $obj != "" } {
|
| 848 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 849 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 850 |
+
|
| 851 |
+
}
|
| 852 |
+
# Create 'impl_1_place_report_io_0' report (if not found)
|
| 853 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
|
| 854 |
+
create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
|
| 855 |
+
}
|
| 856 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
|
| 857 |
+
if { $obj != "" } {
|
| 858 |
+
|
| 859 |
+
}
|
| 860 |
+
# Create 'impl_1_place_report_utilization_0' report (if not found)
|
| 861 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
|
| 862 |
+
create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
|
| 863 |
+
}
|
| 864 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
|
| 865 |
+
if { $obj != "" } {
|
| 866 |
+
|
| 867 |
+
}
|
| 868 |
+
# Create 'impl_1_place_report_control_sets_0' report (if not found)
|
| 869 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
|
| 870 |
+
create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
|
| 871 |
+
}
|
| 872 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
|
| 873 |
+
if { $obj != "" } {
|
| 874 |
+
set_property -name "options.verbose" -value "1" -objects $obj
|
| 875 |
+
|
| 876 |
+
}
|
| 877 |
+
# Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
|
| 878 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
|
| 879 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 880 |
+
}
|
| 881 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
|
| 882 |
+
if { $obj != "" } {
|
| 883 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 884 |
+
|
| 885 |
+
}
|
| 886 |
+
# Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
|
| 887 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
|
| 888 |
+
create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
|
| 889 |
+
}
|
| 890 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
|
| 891 |
+
if { $obj != "" } {
|
| 892 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 893 |
+
|
| 894 |
+
}
|
| 895 |
+
# Create 'impl_1_place_report_timing_summary_0' report (if not found)
|
| 896 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
|
| 897 |
+
create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
|
| 898 |
+
}
|
| 899 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
|
| 900 |
+
if { $obj != "" } {
|
| 901 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 902 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 903 |
+
|
| 904 |
+
}
|
| 905 |
+
# Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
|
| 906 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
|
| 907 |
+
create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
|
| 908 |
+
}
|
| 909 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
|
| 910 |
+
if { $obj != "" } {
|
| 911 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 912 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 913 |
+
|
| 914 |
+
}
|
| 915 |
+
# Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
|
| 916 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
|
| 917 |
+
create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
|
| 918 |
+
}
|
| 919 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
|
| 920 |
+
if { $obj != "" } {
|
| 921 |
+
set_property -name "is_enabled" -value "0" -objects $obj
|
| 922 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 923 |
+
|
| 924 |
+
}
|
| 925 |
+
# Create 'impl_1_route_report_drc_0' report (if not found)
|
| 926 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
|
| 927 |
+
create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
|
| 928 |
+
}
|
| 929 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
|
| 930 |
+
if { $obj != "" } {
|
| 931 |
+
|
| 932 |
+
}
|
| 933 |
+
# Create 'impl_1_route_report_methodology_0' report (if not found)
|
| 934 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
|
| 935 |
+
create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
|
| 936 |
+
}
|
| 937 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
|
| 938 |
+
if { $obj != "" } {
|
| 939 |
+
|
| 940 |
+
}
|
| 941 |
+
# Create 'impl_1_route_report_power_0' report (if not found)
|
| 942 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
|
| 943 |
+
create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
|
| 944 |
+
}
|
| 945 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
|
| 946 |
+
if { $obj != "" } {
|
| 947 |
+
|
| 948 |
+
}
|
| 949 |
+
# Create 'impl_1_route_report_route_status_0' report (if not found)
|
| 950 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
|
| 951 |
+
create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
|
| 952 |
+
}
|
| 953 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
|
| 954 |
+
if { $obj != "" } {
|
| 955 |
+
|
| 956 |
+
}
|
| 957 |
+
# Create 'impl_1_route_report_timing_summary_0' report (if not found)
|
| 958 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
|
| 959 |
+
create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
|
| 960 |
+
}
|
| 961 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
|
| 962 |
+
if { $obj != "" } {
|
| 963 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 964 |
+
|
| 965 |
+
}
|
| 966 |
+
# Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
|
| 967 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
|
| 968 |
+
create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
|
| 969 |
+
}
|
| 970 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
|
| 971 |
+
if { $obj != "" } {
|
| 972 |
+
|
| 973 |
+
}
|
| 974 |
+
# Create 'impl_1_route_report_clock_utilization_0' report (if not found)
|
| 975 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
|
| 976 |
+
create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
|
| 977 |
+
}
|
| 978 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
|
| 979 |
+
if { $obj != "" } {
|
| 980 |
+
|
| 981 |
+
}
|
| 982 |
+
# Create 'impl_1_route_report_bus_skew_0' report (if not found)
|
| 983 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
|
| 984 |
+
create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
|
| 985 |
+
}
|
| 986 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
|
| 987 |
+
if { $obj != "" } {
|
| 988 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 989 |
+
|
| 990 |
+
}
|
| 991 |
+
# Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
|
| 992 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
|
| 993 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
|
| 994 |
+
}
|
| 995 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
|
| 996 |
+
if { $obj != "" } {
|
| 997 |
+
set_property -name "options.max_paths" -value "10" -objects $obj
|
| 998 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 999 |
+
|
| 1000 |
+
}
|
| 1001 |
+
# Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
|
| 1002 |
+
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
|
| 1003 |
+
create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
|
| 1004 |
+
}
|
| 1005 |
+
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
|
| 1006 |
+
if { $obj != "" } {
|
| 1007 |
+
set_property -name "options.warn_on_violation" -value "1" -objects $obj
|
| 1008 |
+
|
| 1009 |
+
}
|
| 1010 |
+
set obj [get_runs impl_1]
|
| 1011 |
+
set_property -name "part" -value "xc7a35tfgg484-2" -objects $obj
|
| 1012 |
+
set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
|
| 1013 |
+
set_property -name "steps.phys_opt_design.is_enabled" -value "1" -objects $obj
|
| 1014 |
+
set_property -name "steps.write_bitstream.args.bin_file" -value "1" -objects $obj
|
| 1015 |
+
set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
|
| 1016 |
+
set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
|
| 1017 |
+
|
| 1018 |
+
# set the current impl run
|
| 1019 |
+
current_run -implementation [get_runs impl_1]
|
| 1020 |
+
|
| 1021 |
+
puts "INFO: Project created:${_xil_proj_name_}"
|
| 1022 |
+
# Create 'drc_1' gadget (if not found)
|
| 1023 |
+
if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
|
| 1024 |
+
create_dashboard_gadget -name {drc_1} -type drc
|
| 1025 |
+
}
|
| 1026 |
+
set obj [get_dashboard_gadgets [ list "drc_1" ] ]
|
| 1027 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
|
| 1028 |
+
|
| 1029 |
+
# Create 'methodology_1' gadget (if not found)
|
| 1030 |
+
if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
|
| 1031 |
+
create_dashboard_gadget -name {methodology_1} -type methodology
|
| 1032 |
+
}
|
| 1033 |
+
set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
|
| 1034 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
|
| 1035 |
+
|
| 1036 |
+
# Create 'power_1' gadget (if not found)
|
| 1037 |
+
if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
|
| 1038 |
+
create_dashboard_gadget -name {power_1} -type power
|
| 1039 |
+
}
|
| 1040 |
+
set obj [get_dashboard_gadgets [ list "power_1" ] ]
|
| 1041 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
|
| 1042 |
+
|
| 1043 |
+
# Create 'timing_1' gadget (if not found)
|
| 1044 |
+
if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
|
| 1045 |
+
create_dashboard_gadget -name {timing_1} -type timing
|
| 1046 |
+
}
|
| 1047 |
+
set obj [get_dashboard_gadgets [ list "timing_1" ] ]
|
| 1048 |
+
set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
|
| 1049 |
+
|
| 1050 |
+
# Create 'utilization_1' gadget (if not found)
|
| 1051 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
|
| 1052 |
+
create_dashboard_gadget -name {utilization_1} -type utilization
|
| 1053 |
+
}
|
| 1054 |
+
set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
|
| 1055 |
+
set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
|
| 1056 |
+
set_property -name "run.step" -value "synth_design" -objects $obj
|
| 1057 |
+
set_property -name "run.type" -value "synthesis" -objects $obj
|
| 1058 |
+
|
| 1059 |
+
# Create 'utilization_2' gadget (if not found)
|
| 1060 |
+
if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
|
| 1061 |
+
create_dashboard_gadget -name {utilization_2} -type utilization
|
| 1062 |
+
}
|
| 1063 |
+
set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
|
| 1064 |
+
set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
|
| 1065 |
+
|
| 1066 |
+
move_dashboard_gadget -name {utilization_1} -row 0 -col 0
|
| 1067 |
+
move_dashboard_gadget -name {power_1} -row 1 -col 0
|
| 1068 |
+
move_dashboard_gadget -name {drc_1} -row 2 -col 0
|
| 1069 |
+
move_dashboard_gadget -name {timing_1} -row 0 -col 1
|
| 1070 |
+
move_dashboard_gadget -name {utilization_2} -row 1 -col 1
|
| 1071 |
+
move_dashboard_gadget -name {methodology_1} -row 2 -col 1
|
lawrie_fpga_pio/.gitignore
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
bin/
|
| 2 |
+
__pycache__/
|
| 3 |
+
tb
|
| 4 |
+
*.vcd
|
| 5 |
+
|
lawrie_fpga_pio/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
BSD 2-Clause License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2022, Lawrie Griffiths
|
| 4 |
+
All rights reserved.
|
| 5 |
+
|
| 6 |
+
Redistribution and use in source and binary forms, with or without
|
| 7 |
+
modification, are permitted provided that the following conditions are met:
|
| 8 |
+
|
| 9 |
+
1. Redistributions of source code must retain the above copyright notice, this
|
| 10 |
+
list of conditions and the following disclaimer.
|
| 11 |
+
|
| 12 |
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
| 13 |
+
this list of conditions and the following disclaimer in the documentation
|
| 14 |
+
and/or other materials provided with the distribution.
|
| 15 |
+
|
| 16 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 17 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 18 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 19 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 20 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 21 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 22 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 23 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 24 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 25 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
lawrie_fpga_pio/README.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FPGA RP2040 PIO
|
| 2 |
+
|
| 3 |
+
## Introduction
|
| 4 |
+
|
| 5 |
+
This is an attempt to recreate the Raspberry Pi RP2040 PIO interface in Verilog.
|
| 6 |
+
|
| 7 |
+
PIO stands for Progammable I/O, and it is a peripheral that is part of the RP2040 SoC, which is much more flexible than hardware implementations of specific protocols like SPI, I2C, UART etc. It can implement all these protocols and more at high speed and on any GPIO pins.
|
| 8 |
+
|
| 9 |
+
It runs in up to 8 special processors, known as State Machines, which are programmed in assembler using a machine language designed specifically for fast cycle-accurate I/O. These processors run independently of the main CPUs.
|
| 10 |
+
|
| 11 |
+
This implementation has been done from the specification, without access to any Raspberry Pi HDL. It is currently incomplete, but some programs run in simulation and on open source FPGA boards.
|
| 12 |
+
|
| 13 |
+
The current supported boards are the Blackice MX and the Ulx3s.
|
| 14 |
+
|
| 15 |
+
The current method of configuring and controlling PIO from a top-level module is different from that used on the RP2040 chip, and will probably be changed for closer compatibility.
|
| 16 |
+
|
| 17 |
+
For use by a SoC, e.g. a RISC-V SoC such as SaxonSoc, the appropriate peripheral bus interface would need to be added.
|
| 18 |
+
|
| 19 |
+
For use from a host processor, such as one running micropython, an SPI read/write memory interface could be added. This would be a lot slower than a bus interface but speed is not usually an issue for configuration and control. There are usually too few pins between a host processor and the fpga to implement a 32-bit (or even an 8-bit) bus interface.
|
| 20 |
+
|
| 21 |
+
## Simulation
|
| 22 |
+
|
| 23 |
+
To run a program in simulation, clone the repository and do:
|
| 24 |
+
|
| 25 |
+
```sh
|
| 26 |
+
cd fpga_pio/sim
|
| 27 |
+
make sim
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
That runs the tb.v testbench. You can see the results by opening waves.vcd using gtkwave.
|
| 31 |
+
|
| 32 |
+
You can run the other test programs in the sim directory, such as uart_tx.v, by:
|
| 33 |
+
|
| 34 |
+
```sh
|
| 35 |
+
make sim TB=uart_tx
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Synthesis
|
| 39 |
+
|
| 40 |
+
To run the top.v Verilog file on the Blackice MX board, do:
|
| 41 |
+
|
| 42 |
+
```sh
|
| 43 |
+
cd blackicemx
|
| 44 |
+
make prog
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
For the Ulxs3 board use the ulx3s directory.
|
| 48 |
+
|
| 49 |
+
The current program flashes the red led approximately once per second.
|
| 50 |
+
|
| 51 |
+
You can select a different top-level module by, for example:
|
| 52 |
+
|
| 53 |
+
```sh
|
| 54 |
+
make clean prog TOP=hello
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
Current working top level modules include: blink, hello, wds812, exec, uart_tx.
|
| 58 |
+
|
| 59 |
+
## Assembling programs
|
| 60 |
+
|
| 61 |
+
You can assemble program using the Adafuit pioasm assembler (used by CircuitPython), by:
|
| 62 |
+
|
| 63 |
+
```sh
|
| 64 |
+
cd asm
|
| 65 |
+
./compile square.asm square.mem
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
and then move square.mem to the src/top and/or the sim directory.
|
| 69 |
+
|
| 70 |
+
The compiler is currently incomplete and so the .mem files sometimes need modification, e.g when the "'side_set opt" option is used.
|
| 71 |
+
|
| 72 |
+
## Examples
|
| 73 |
+
|
| 74 |
+
### Blink
|
| 75 |
+
|
| 76 |
+
```
|
| 77 |
+
.program blink
|
| 78 |
+
set pindirs 1
|
| 79 |
+
again:
|
| 80 |
+
set pins 1 [31] ; Drive pin high and then delay for 31 cycles
|
| 81 |
+
nop [31]
|
| 82 |
+
nop [31]
|
| 83 |
+
nop [31]
|
| 84 |
+
nop [31]
|
| 85 |
+
set pins 0 [30] ; Drive pin low
|
| 86 |
+
nop [31]
|
| 87 |
+
nop [31]
|
| 88 |
+
nop [31]
|
| 89 |
+
nop [31]
|
| 90 |
+
jmp again
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
This blinks every 320 cycles. so with a maximum clock divider of 64K -1 (0xFFFF), and a 25MHz FPGA clock, it blinks approximately every 1.2 seconds.
|
| 94 |
+
|
| 95 |
+
### Hello
|
| 96 |
+
|
| 97 |
+
```
|
| 98 |
+
.program uart_tx
|
| 99 |
+
.side_set 1 opt
|
| 100 |
+
pull block side 1
|
| 101 |
+
set x 7 side 0 [7]
|
| 102 |
+
again:
|
| 103 |
+
out pins 1
|
| 104 |
+
jmp x-- again [6]
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
This example outputs a message repeatedly on the console.
|
| 108 |
+
|
| 109 |
+
### Exec
|
| 110 |
+
|
| 111 |
+
The exec examples needs no PIO program as it executes a SET PINS instruction immediately. The machine does not need to be enabled.
|
| 112 |
+
The top/exec.v Verilog module uses immediate execution to blink the led approximately once per second.
|
| 113 |
+
|
| 114 |
+
### Pwm
|
| 115 |
+
|
| 116 |
+
```
|
| 117 |
+
.program pwm
|
| 118 |
+
.side_set 1 opt
|
| 119 |
+
pull noblock side 0
|
| 120 |
+
mov x osr
|
| 121 |
+
mov y isr
|
| 122 |
+
countloop:
|
| 123 |
+
jmp x!=y noset
|
| 124 |
+
jmp skip side 1
|
| 125 |
+
noset:
|
| 126 |
+
nop
|
| 127 |
+
skip:
|
| 128 |
+
jmp y-- countloop
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
The pwm example set the led off and then increases its brightness, repeatedly.
|
| 132 |
+
|
| 133 |
+
### Neopixels
|
| 134 |
+
|
| 135 |
+
```
|
| 136 |
+
.program ws2812
|
| 137 |
+
.side_set 1
|
| 138 |
+
.wrap_target
|
| 139 |
+
bitloop:
|
| 140 |
+
out x 1 side 0 [1]; Side-set still takes place when instruction stalls
|
| 141 |
+
jmp !x do_zero side 1 [1]; Branch on the bit we shifted out. Positive pulse
|
| 142 |
+
do_one:
|
| 143 |
+
jmp bitloop side 1 [1]; Continue driving high, for a long pulse
|
| 144 |
+
do_zero:
|
| 145 |
+
nop side 0
|
| 146 |
+
```
|
| 147 |
+
|
| 148 |
+

|
| 149 |
+
|
| 150 |
+
### Stepper motor
|
| 151 |
+
|
| 152 |
+
This example shows driving a stepper motor with PIO.
|
| 153 |
+
|
| 154 |
+
You set the direction by pushing the required phase patterns as a set of 8 4-bit values, and then you push the required number of half steps.
|
| 155 |
+
|
| 156 |
+
To start again with a new set of steps, you execute an immediate jump to the start of the program.
|
| 157 |
+
|
| 158 |
+
```
|
| 159 |
+
.program stepper
|
| 160 |
+
pull block
|
| 161 |
+
mov isr osr
|
| 162 |
+
pull block
|
| 163 |
+
mov y osr
|
| 164 |
+
outer:
|
| 165 |
+
mov osr isr
|
| 166 |
+
set x 6
|
| 167 |
+
inner:
|
| 168 |
+
out pins 4 [2]
|
| 169 |
+
jmp x-- inner
|
| 170 |
+
out pins 4
|
| 171 |
+
jmp y-- outer
|
| 172 |
+
wrap_target:
|
| 173 |
+
out pins 4
|
| 174 |
+
jmp wrap_target
|
| 175 |
+
```
|
| 176 |
+
|
| 177 |
+
Here is is driving a stepper motor from a Blackice MX:
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
|
| 181 |
+
### I2S
|
| 182 |
+
|
| 183 |
+
```
|
| 184 |
+
.program i2s
|
| 185 |
+
.side_set 2
|
| 186 |
+
pull noblock side 3
|
| 187 |
+
mov x osr side 3
|
| 188 |
+
set y 14 side 3 [1]
|
| 189 |
+
loop1:
|
| 190 |
+
out pins 1 side 2 [3]
|
| 191 |
+
jmp y-- loop1 side 3 [3]
|
| 192 |
+
out pins 1 side 0 [3]
|
| 193 |
+
set y 14 side 1 [3]
|
| 194 |
+
loop0:
|
| 195 |
+
out pins 1 side 0 [3]
|
| 196 |
+
jmp y-- loop0 side 1 [3]
|
| 197 |
+
out pins 1 side 2 [3]
|
| 198 |
+
```
|
| 199 |
+
|
| 200 |
+
The I2S example (top/i2s.v) plays a wave file in 16-bit 44100Hz stereo, from BRAM to a Digilent I2S Pmod. It works better on the Ulx3s board, which has more BRAM.
|
lawrie_fpga_pio/asm/adafruit_pioasm.py
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2021 Scott Shawcroft for Adafruit Industries LLC
|
| 2 |
+
#
|
| 3 |
+
# SPDX-License-Identifier: MIT
|
| 4 |
+
"""
|
| 5 |
+
`adafruit_pioasm`
|
| 6 |
+
================================================================================
|
| 7 |
+
|
| 8 |
+
Simple assembler to convert pioasm to bytes
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
* Author(s): Scott Shawcroft
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
import array
|
| 15 |
+
|
| 16 |
+
__version__ = "0.0.0-auto.0"
|
| 17 |
+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PIOASM.git"
|
| 18 |
+
|
| 19 |
+
CONDITIONS = ["", "!x", "x--", "!y", "y--", "x!=y", "pin", "!osre"]
|
| 20 |
+
IN_SOURCES = ["pins", "x", "y", "null", None, None, "isr", "osr"]
|
| 21 |
+
OUT_DESTINATIONS = ["pins", "x", "y", "null", "pindirs", "pc", "isr", "exec"]
|
| 22 |
+
WAIT_SOURCES = ["gpio", "pin", "irq", None]
|
| 23 |
+
MOV_DESTINATIONS = ["pins", "x", "y", None, "exec", "pc", "isr", "osr"]
|
| 24 |
+
MOV_SOURCES = ["pins", "x", "y", "null", None, "status", "isr", "osr"]
|
| 25 |
+
MOV_OPS = [None, "~", "::", None]
|
| 26 |
+
SET_DESTINATIONS = ["pins", "x", "y", None, "pindirs", None, None, None]
|
| 27 |
+
|
| 28 |
+
def assemble(text_program):
|
| 29 |
+
"""Converts pioasm text to encoded instruction bytes"""
|
| 30 |
+
assembled = []
|
| 31 |
+
program_name = None
|
| 32 |
+
labels = {}
|
| 33 |
+
instructions = []
|
| 34 |
+
sideset_count = 0
|
| 35 |
+
for line in text_program.split("\n"):
|
| 36 |
+
line = line.strip()
|
| 37 |
+
if not line:
|
| 38 |
+
continue
|
| 39 |
+
if ";" in line:
|
| 40 |
+
line = line.split(";")[0].strip()
|
| 41 |
+
if line.startswith(".program"):
|
| 42 |
+
if program_name:
|
| 43 |
+
raise RuntimeError("Multiple programs not supported")
|
| 44 |
+
program_name = line.split()[1]
|
| 45 |
+
elif line.startswith(".wrap_target"):
|
| 46 |
+
if len(instructions) > 0:
|
| 47 |
+
raise RuntimeError("wrap_target not supported")
|
| 48 |
+
elif line.startswith(".wrap"):
|
| 49 |
+
pass
|
| 50 |
+
elif line.startswith(".side_set"):
|
| 51 |
+
sideset_count = int(line.split()[1])
|
| 52 |
+
elif line.endswith(":"):
|
| 53 |
+
labels[line[:-1]] = len(instructions)
|
| 54 |
+
else:
|
| 55 |
+
instructions.append(line)
|
| 56 |
+
|
| 57 |
+
max_delay = 2 ** (5 - sideset_count) - 1
|
| 58 |
+
assembled = []
|
| 59 |
+
for instruction in instructions:
|
| 60 |
+
print(instruction)
|
| 61 |
+
instruction = instruction.split()
|
| 62 |
+
delay = 0
|
| 63 |
+
if instruction[-1].endswith("]"): # Delay
|
| 64 |
+
delay = int(instruction[-1].strip("[]"))
|
| 65 |
+
if delay > max_delay:
|
| 66 |
+
raise RuntimeError("Delay too long:", delay)
|
| 67 |
+
instruction.pop()
|
| 68 |
+
if len(instruction) > 1 and instruction[-2] == "side":
|
| 69 |
+
sideset_value = int(instruction[-1])
|
| 70 |
+
if sideset_value > 2 ** sideset_count:
|
| 71 |
+
raise RuntimeError("Sideset value too large")
|
| 72 |
+
delay |= sideset_value << (5 - sideset_count)
|
| 73 |
+
instruction.pop()
|
| 74 |
+
instruction.pop()
|
| 75 |
+
|
| 76 |
+
if instruction[0] == "nop":
|
| 77 |
+
# mov delay y op y
|
| 78 |
+
assembled.append(0b101_00000_010_00_010)
|
| 79 |
+
elif instruction[0] == "jmp":
|
| 80 |
+
# instr delay cnd addr
|
| 81 |
+
assembled.append(0b000_00000_000_00000)
|
| 82 |
+
if instruction[-1] in labels:
|
| 83 |
+
assembled[-1] |= labels[instruction[-1]]
|
| 84 |
+
else:
|
| 85 |
+
assembled[-1] |= int(instruction[-1])
|
| 86 |
+
|
| 87 |
+
if len(instruction) > 2:
|
| 88 |
+
assembled[-1] |= CONDITIONS.index(instruction[1]) << 5
|
| 89 |
+
|
| 90 |
+
elif instruction[0] == "wait":
|
| 91 |
+
# instr delay p sr index
|
| 92 |
+
assembled.append(0b001_00000_0_00_00000)
|
| 93 |
+
polarity = int(instruction[1])
|
| 94 |
+
if not 0 <= polarity <= 1:
|
| 95 |
+
raise RuntimeError("Invalid polarity")
|
| 96 |
+
assembled[-1] |= polarity << 7
|
| 97 |
+
assembled[-1] |= WAIT_SOURCES.index(instruction[2]) << 4
|
| 98 |
+
num = int(instruction[3])
|
| 99 |
+
if not 0 <= num <= 31:
|
| 100 |
+
raise RuntimeError("Wait num out of range")
|
| 101 |
+
assembled[-1] |= num
|
| 102 |
+
if instruction[-1] == "rel":
|
| 103 |
+
assembled[-1] |= 0x10 # Set the high bit of the irq value
|
| 104 |
+
elif instruction[0] == "in":
|
| 105 |
+
# instr delay src count
|
| 106 |
+
assembled.append(0b010_00000_000_00000)
|
| 107 |
+
assembled[-1] |= IN_SOURCES.index(instruction[1]) << 5
|
| 108 |
+
count = int(instruction[-1])
|
| 109 |
+
if not 1 <= count <=32:
|
| 110 |
+
raise RuntimeError("Count out of range")
|
| 111 |
+
assembled[-1] |= (count & 0x1f) # 32 is 00000 so we mask the top
|
| 112 |
+
elif instruction[0] == "out":
|
| 113 |
+
# instr delay dst count
|
| 114 |
+
assembled.append(0b011_00000_000_00000)
|
| 115 |
+
assembled[-1] |= OUT_DESTINATIONS.index(instruction[1]) << 5
|
| 116 |
+
count = int(instruction[-1])
|
| 117 |
+
if not 1 <= count <=32:
|
| 118 |
+
raise RuntimeError("Count out of range")
|
| 119 |
+
assembled[-1] |= (count & 0x1f) # 32 is 00000 so we mask the top
|
| 120 |
+
elif instruction[0] == "push" or instruction[0] == "pull":
|
| 121 |
+
# instr delay d i b zero
|
| 122 |
+
assembled.append(0b100_00000_0_0_0_00000)
|
| 123 |
+
if instruction[0] == "pull":
|
| 124 |
+
assembled[-1] |= 0x80
|
| 125 |
+
if instruction[-1] == "block" or not instruction[-1].endswith("block"):
|
| 126 |
+
assembled[-1] |= 0x20
|
| 127 |
+
if instruction[1] in ("ifempty", "iffull"):
|
| 128 |
+
assembled[-1] |= 0x40
|
| 129 |
+
elif instruction[0] == "mov":
|
| 130 |
+
# instr delay dst op src
|
| 131 |
+
assembled.append(0b101_00000_000_00_000)
|
| 132 |
+
assembled[-1] |= MOV_DESTINATIONS.index(instruction[1]) << 5
|
| 133 |
+
assembled[-1] |= MOV_SOURCES.index(instruction[-1])
|
| 134 |
+
if len(instruction) > 3:
|
| 135 |
+
assembled[-1] |= MOV_OPS.index(instruction[-2])
|
| 136 |
+
elif instruction[0] == "irq":
|
| 137 |
+
# instr delay z c w index
|
| 138 |
+
assembled.append(0b110_00000_0_0_0_00000)
|
| 139 |
+
if instruction[-1] == "rel":
|
| 140 |
+
assembled[-1] |= 0x10 # Set the high bit of the irq value
|
| 141 |
+
instruction.pop()
|
| 142 |
+
num = int(instruction[-1])
|
| 143 |
+
if not 0 <= num <= 7:
|
| 144 |
+
raise RuntimeError("Interrupt index out of range")
|
| 145 |
+
assembled[-1] |= num
|
| 146 |
+
if len(instruction) == 3: # after rel has been removed
|
| 147 |
+
if instruction[1] == "wait":
|
| 148 |
+
assembled[-1] |= 0x20
|
| 149 |
+
elif instruction[1] == "clear":
|
| 150 |
+
assembled[-1] |= 0x40
|
| 151 |
+
# All other values are the default of set without waiting
|
| 152 |
+
elif instruction[0] == "set":
|
| 153 |
+
# instr delay dst data
|
| 154 |
+
assembled.append(0b111_00000_000_00000)
|
| 155 |
+
assembled[-1] |= SET_DESTINATIONS.index(instruction[1]) << 5
|
| 156 |
+
value = int(instruction[-1])
|
| 157 |
+
if not 0 <= value <=31:
|
| 158 |
+
raise RuntimeError("Set value out of range")
|
| 159 |
+
assembled[-1] |= value
|
| 160 |
+
else:
|
| 161 |
+
raise RuntimeError("Unknown instruction:" + instruction)
|
| 162 |
+
assembled[-1] |= delay << 8
|
| 163 |
+
print(hex(assembled[-1]))
|
| 164 |
+
|
| 165 |
+
return array.array("H", assembled)
|
lawrie_fpga_pio/asm/add.asm
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program add
|
| 2 |
+
pull block
|
| 3 |
+
mov x ~osr
|
| 4 |
+
pull block
|
| 5 |
+
mov y osr
|
| 6 |
+
jmp test
|
| 7 |
+
incr:
|
| 8 |
+
jmp x-- test
|
| 9 |
+
test:
|
| 10 |
+
jmp y-- incr
|
| 11 |
+
mv isr ~x
|
| 12 |
+
push
|
| 13 |
+
|
lawrie_fpga_pio/asm/blink.asm
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program blink
|
| 2 |
+
set pindirs 1
|
| 3 |
+
again:
|
| 4 |
+
set pins 1 [31] ; Drive pin high and then delay for 31 cycles
|
| 5 |
+
nop [31]
|
| 6 |
+
nop [31]
|
| 7 |
+
nop [31]
|
| 8 |
+
nop [31]
|
| 9 |
+
set pins 0 [30] ; Drive pin low
|
| 10 |
+
nop [31]
|
| 11 |
+
nop [31]
|
| 12 |
+
nop [31]
|
| 13 |
+
nop [31]
|
| 14 |
+
jmp again
|
| 15 |
+
|
lawrie_fpga_pio/asm/compile
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/python3
|
| 2 |
+
|
| 3 |
+
from adafruit_pioasm import assemble
|
| 4 |
+
import sys
|
| 5 |
+
|
| 6 |
+
args=sys.argv
|
| 7 |
+
|
| 8 |
+
if len(args) < 3:
|
| 9 |
+
print("Usage: " + args[0] + " <text program file> <hex program file>")
|
| 10 |
+
sys.exit(1)
|
| 11 |
+
|
| 12 |
+
f=open(args[1],"r");
|
| 13 |
+
text = f.read();
|
| 14 |
+
f.close()
|
| 15 |
+
|
| 16 |
+
bin=assemble(text)
|
| 17 |
+
|
| 18 |
+
f=open(args[2],"w")
|
| 19 |
+
|
| 20 |
+
for i in bin:
|
| 21 |
+
h = format(i,"04x")
|
| 22 |
+
f.write(h + "\n")
|
| 23 |
+
|
| 24 |
+
f.close()
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
|
lawrie_fpga_pio/asm/copybit.asm
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program copybit
|
| 2 |
+
pull block
|
| 3 |
+
out pins 1
|
| 4 |
+
|
lawrie_fpga_pio/asm/i2s.asm
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program i2s
|
| 2 |
+
.side_set 2
|
| 3 |
+
pull noblock side 3
|
| 4 |
+
mov x osr side 3
|
| 5 |
+
set y 14 side 3 [1]
|
| 6 |
+
loop1:
|
| 7 |
+
out pins 1 side 2 [3]
|
| 8 |
+
jmp y-- loop1 side 3 [3]
|
| 9 |
+
out pins 1 side 0 [3]
|
| 10 |
+
set y 14 side 1 [3]
|
| 11 |
+
loop0:
|
| 12 |
+
out pins 1 side 0 [3]
|
| 13 |
+
jmp y-- loop0 side 1 [3]
|
| 14 |
+
out pins 1 side 2 [3]
|
| 15 |
+
|
lawrie_fpga_pio/asm/pwm.asm
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program pwm
|
| 2 |
+
.side_set 1 opt
|
| 3 |
+
pull noblock side 0
|
| 4 |
+
mov x osr
|
| 5 |
+
mov y isr
|
| 6 |
+
countloop:
|
| 7 |
+
jmp x!=y noset
|
| 8 |
+
jmp skip side 1
|
| 9 |
+
noset:
|
| 10 |
+
nop
|
| 11 |
+
skip:
|
| 12 |
+
jmp y-- countloop
|
| 13 |
+
|
lawrie_fpga_pio/asm/spi.asm
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program spi
|
| 2 |
+
.side_set 1
|
| 3 |
+
out pins 1 side 0 [1]
|
| 4 |
+
in pins 1 side 1 [1]
|
| 5 |
+
|
lawrie_fpga_pio/asm/square.asm
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program square
|
| 2 |
+
set pins 1 ; Drive pin high
|
| 3 |
+
set pins 0 ; Drive pin low
|
| 4 |
+
|
lawrie_fpga_pio/asm/step2.asm
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program stepper
|
| 2 |
+
pull block
|
| 3 |
+
mov isr osr
|
| 4 |
+
pull block
|
| 5 |
+
mov y osr
|
| 6 |
+
outer:
|
| 7 |
+
mov osr isr
|
| 8 |
+
set x 6
|
| 9 |
+
inner:
|
| 10 |
+
out pins 4 [2]
|
| 11 |
+
jmp x-- inner
|
| 12 |
+
out pins 4
|
| 13 |
+
jmp y-- outer
|
| 14 |
+
wrap_target:
|
| 15 |
+
out pins 4
|
| 16 |
+
jmp wrap_target
|
| 17 |
+
|
lawrie_fpga_pio/asm/stepper.asm
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program stepper
|
| 2 |
+
mov osr isr
|
| 3 |
+
set x 6
|
| 4 |
+
loop:
|
| 5 |
+
out pins 4 [1]
|
| 6 |
+
jmp x-- loop
|
| 7 |
+
out pins 4
|
| 8 |
+
|
| 9 |
+
|
lawrie_fpga_pio/asm/uart_rx.asm
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program uart_rx
|
| 2 |
+
wait 0 pin 0
|
| 3 |
+
set x 7 [10]
|
| 4 |
+
again:
|
| 5 |
+
in pins 1
|
| 6 |
+
jmp x-- again [6]
|
| 7 |
+
|
lawrie_fpga_pio/asm/uart_tx.asm
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.program uart_tx
|
| 2 |
+
.side_set 1 opt
|
| 3 |
+
pull block side 1
|
| 4 |
+
set x 7 side 0 [7]
|
| 5 |
+
again:
|
| 6 |
+
out pins 1
|
| 7 |
+
jmp x-- again [6]
|